allow enum {...} name; but ignore name (eases C <-> QC header compat)

This commit is contained in:
Bill Currie 2002-01-21 19:09:23 +00:00
parent 64c5983742
commit 2ce5a91373
1 changed files with 6 additions and 1 deletions

View File

@ -160,10 +160,15 @@ def
{ current_type = build_type ($1, $4); } func_def_list
| STRUCT NAME
{ struct_type = new_struct ($2); } '=' '{' struct_defs '}'
| ENUM '{' enum_list opt_comma '}'
| ENUM '{' enum_list opt_comma '}' opt_name
{ process_enum ($3); }
;
opt_name
: /* empty */
| NAME {}
;
struct_defs
: /* empty */
| struct_defs struct_def ';'