Module Name: src
Committed By: christos
Date: Fri Jun 29 20:18:36 UTC 2018
Modified Files:
src/usr.bin/xlint/lint1: cgram.y scan.l
Log Message:
Add our syslog format.
To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.80 -r1.81 src/usr.bin/xlint/lint1/scan.l
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.95 src/usr.bin/xlint/lint1/cgram.y:1.96
--- src/usr.bin/xlint/lint1/cgram.y:1.95 Mon Jan 15 16:58:54 2018
+++ src/usr.bin/xlint/lint1/cgram.y Fri Jun 29 16:18:36 2018
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: cgram.y,v 1.95 2018/01/15 21:58:54 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.96 2018/06/29 20:18:36 christos Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.95 2018/01/15 21:58:54 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.96 2018/06/29 20:18:36 christos Exp $");
#endif
#include <stdlib.h>
@@ -214,6 +214,7 @@ anonymize(sym_t *s)
%token <y_type> T_AT_FORMAT_SCANF
%token <y_type> T_AT_FORMAT_STRFMON
%token <y_type> T_AT_FORMAT_STRFTIME
+%token <y_type> T_AT_FORMAT_SYSLOG
%token <y_type> T_AT_GNU_INLINE
%token <y_type> T_AT_MAY_ALIAS
%token <y_type> T_AT_MINBYTES
@@ -512,6 +513,7 @@ type_attribute_format_type:
| T_AT_FORMAT_SCANF
| T_AT_FORMAT_STRFMON
| T_AT_FORMAT_STRFTIME
+ | T_AT_FORMAT_SYSLOG
;
type_attribute_bounded_type:
Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.80 src/usr.bin/xlint/lint1/scan.l:1.81
--- src/usr.bin/xlint/lint1/scan.l:1.80 Mon Jan 15 16:58:54 2018
+++ src/usr.bin/xlint/lint1/scan.l Fri Jun 29 16:18:36 2018
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: scan.l,v 1.80 2018/01/15 21:58:54 christos Exp $ */
+/* $NetBSD: scan.l,v 1.81 2018/06/29 20:18:36 christos Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.80 2018/01/15 21:58:54 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.81 2018/06/29 20:18:36 christos Exp $");
#endif
#include <stdlib.h>
@@ -275,6 +275,7 @@ static struct kwtab {
{ "struct", T_SOU, 0, STRUCT, 0, 0,0,0,0,1 },
{ "switch", T_SWITCH, 0, 0, 0, 0,0,0,0,1 },
{ "symbolrename", T_SYMBOLRENAME, 0, 0, 0, 0,0,0,0,2 },
+ { "syslog", T_AT_FORMAT_SYSLOG,0, 0, 0, 0,0,1,1,5 },
{ "transparent_union",T_AT_TUNION,0, 0, 0, 0,0,1,1,5 },
{ "typedef", T_SCLASS, TYPEDEF, 0, 0, 0,0,0,0,1 },
{ "typeof", T_TYPEOF, 0, 0, 0, 0,0,1,0,7 },