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

View file

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