group the struct rules together

This commit is contained in:
Bill Currie 2006-12-02 06:49:55 +00:00 committed by Jeff Teunissen
parent 43b6aed397
commit 48f8bbd12e
1 changed files with 13 additions and 13 deletions

View File

@ -318,6 +318,19 @@ struct_def
: type { $$ = $1; } struct_def_list { $$ = $<type>2; }
;
struct_def_list
: struct_def_list ',' { $$ = $<type>0; } struct_def_item
{ (void) ($<type>3); }
| struct_def_item
;
struct_def_item
: identifier
{
new_struct_field (current_struct, $<type>0, $1, vis_public);
}
;
enum_list
: enum
| enum_list ',' enum
@ -437,19 +450,6 @@ array_decl
| '[' ']' { $$ = 0; }
;
struct_def_list
: struct_def_list ',' { $$ = $<type>0; } struct_def_item
{ (void) ($<type>3); }
| struct_def_item
;
struct_def_item
: identifier
{
new_struct_field (current_struct, $<type>0, $1, vis_public);
}
;
def_list
: def_list ',' { $$ = $<type>0; } def_item { (void) ($<type>3); }
| def_item