From 2ce5a91373c8aaef8d3c47c6b5287ac39a4cc579 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 21 Jan 2002 19:09:23 +0000 Subject: [PATCH] allow enum {...} name; but ignore name (eases C <-> QC header compat) --- tools/qfcc/source/qc-parse.y | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index 4a0af9791..af0eb8369 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -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 ';'