From fa32c9bba61464eb77b10a5caac1c8727984b50a Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 9 May 2018 20:27:29 -0400 Subject: [PATCH] Allow TYPE_NAME or IDENTIFIER to follow struct/union --- src/parser/parser.yc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/parser/parser.yc b/src/parser/parser.yc index 1d9e9b5..35125d0 100644 --- a/src/parser/parser.yc +++ b/src/parser/parser.yc @@ -354,9 +354,14 @@ type_specifier ; struct_or_union_specifier - : struct_or_union IDENTIFIER LCURLY struct_declaration_list RCURLY + : struct_or_union identifier_or_type_name LCURLY struct_declaration_list RCURLY | struct_or_union LCURLY struct_declaration_list RCURLY - | struct_or_union IDENTIFIER + | struct_or_union identifier_or_type_name + ; + +identifier_or_type_name + : IDENTIFIER + | TYPE_NAME ; struct_or_union