Add our syslog format.

This commit is contained in:
christos 2018-06-29 20:18:36 +00:00
parent 8910c94cf4
commit 9f321dce94
2 changed files with 7 additions and 4 deletions

View File

@ -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:

View File

@ -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 },