summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ae2b48f)
Avoid that Bison's own use of "bison -Wall" trigger warnings.
* src/parse-gram.y: Use %empty for every empty rule.
`------------------------------------*/
prologue_declarations:
`------------------------------------*/
prologue_declarations:
| prologue_declarations prologue_declaration
;
| prologue_declarations prologue_declaration
;
%token PERCENT_UNION "%union";
union_name:
%token PERCENT_UNION "%union";
union_name:
- /* Nothing. */ {}
-| ID { muscle_code_grow ("union_name", $1, @1); }
+ %empty {}
+| ID { muscle_code_grow ("union_name", $1, @1); }
- /* Nothing. */ { current_type = NULL; }
-| TAG { current_type = $1; tag_seen = true; }
+ %empty { current_type = NULL; }
+| TAG { current_type = $1; tag_seen = true; }
;
/* Just like symbols.1 but accept INT for the sake of POSIX. */
;
/* Just like symbols.1 but accept INT for the sake of POSIX. */
%token PERCENT_EMPTY "%empty";
rhs:
%token PERCENT_EMPTY "%empty";
rhs:
{ grammar_current_rule_begin (current_lhs_symbol, current_lhs_location,
current_lhs_named_ref); }
| rhs symbol named_ref.opt
{ grammar_current_rule_begin (current_lhs_symbol, current_lhs_location,
current_lhs_named_ref); }
| rhs symbol named_ref.opt
- /* Nothing. */ { $$ = 0; }
-|
- BRACKETED_ID { $$ = named_ref_new ($1, @1); }
+ %empty { $$ = 0; }
+| BRACKETED_ID { $$ = named_ref_new($1, @1); }
;
/*---------------------------.
;
/*---------------------------.
/* Some content or empty by default. */
content.opt:
/* Some content or empty by default. */
content.opt:
- /* Nothing. */ { $$ = ""; }
-| ID { $$ = $1; }
-| STRING
+ %empty { $$ = ""; }
+| ID { $$ = $1; }
+| STRING { $$ = $1; }
| "%%" EPILOGUE
{
code_props plain_code;
| "%%" EPILOGUE
{
code_props plain_code;