+2002-06-04 Zack Weinberg <zack@codesourcery.com>
+
+ * gengtype-yacc.y: Make sure all rules end with a semicolon.
+
2002-06-04 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (xtensa_init_machine_status): Fix
| typedef_struct start
| externstatic start
| yacc_union start
+ ;
typedef_struct: ENT_TYPEDEF_STRUCT options '{' struct_fields '}' ID
{
lexer_toplevel_done = 1;
}
';'
+ ;
externstatic: ENT_EXTERNSTATIC options lasttype ID semiequal
{
$5),
$2, &lexer_line);
}
+ ;
lasttype: type
{
lexer_toplevel_done = 1;
$$ = $1;
}
+ ;
semiequal: ';'
| '='
;
-yacc_union: ENT_YACCUNION options struct_fields '}' yacc_typematch PERCENTPERCENT
+yacc_union: ENT_YACCUNION options struct_fields '}' yacc_typematch
+ PERCENTPERCENT
{
note_yacc_type ($2, $3, $5, &lexer_line);
}
+ ;
yacc_typematch: /* empty */
{ $$ = NULL; }
sprintf (p->opt->info, "'%s'", $2);
$$ = p;
}
+ ;
struct_fields: { $$ = NULL; }
| type optionsopt ID bitfieldopt ';' struct_fields
p->line = lexer_line;
$$ = p;
}
+ ;
bitfieldopt: /* empty */
| ':' NUM
+ ;
type: SCALAR
{ $$ = $1; }
{ $$ = create_scalar_type ($2, strlen ($2)); }
| ENUM ID '{' enum_items '}'
{ $$ = create_scalar_type ($2, strlen ($2)); }
+ ;
enum_items: /* empty */
| ID '=' NUM ',' enum_items
optionsopt: { $$ = NULL; }
| options { $$ = $1; }
+ ;
-options: GTY_TOKEN '(' '(' optionseqopt ')' ')' { $$ = $4; }
+options: GTY_TOKEN '(' '(' optionseqopt ')' ')'
+ { $$ = $4; }
+ ;
type_option : ALIAS
{ $$ = "ptr_alias"; }
| PARAM_IS
{ $$ = "param_is"; }
+ ;
option: type_option '(' type ')'
{
o->info = (void *)$3;
$$ = o;
}
+ ;
optionseq: option
{
$3->next = $1;
$$ = $3;
}
+ ;
optionseqopt: { $$ = NULL }
| optionseq { $$ = $1; }
-
+ ;
%%