mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
* src/reader.c (grammar_current_rule_check): Also check that $$
is used. Take the rule to check as argument, hence rename as... (grammar_rule_check): this. * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end): Rename as... (grammar_rule_begin, grammar_rule_end): these, for consistency. (grammar_midrule_action, grammar_symbol_append): Now static. * tests/torture.at (input): Don't rely on the default action being always performed. * tests/calc.at: "Set" $$ even when the action is "cut" with YYERROR or other. * tests/actions.at (Exotic Dollars): Instead of using unused values, check that the warning is issued.
This commit is contained in:
@@ -129,15 +129,15 @@ exp:
|
||||
| exp '^' exp { $$ = power ($1, $3); }
|
||||
| '(' exp ')' { $$ = $2; }
|
||||
| '(' error ')' { $$ = 1111; }
|
||||
| '!' { YYERROR; }
|
||||
| '-' error { YYERROR; }
|
||||
| '!' { $$ = 0; YYERROR; }
|
||||
| '-' error { $$ = 0; YYERROR; }
|
||||
;
|
||||
%%
|
||||
/* The input. */
|
||||
/* The input. */
|
||||
static FILE *input;
|
||||
|
||||
]AT_LALR1_CC_IF(
|
||||
[/* A C++ error reporting function. */
|
||||
[/* A C++ error reporting function. */
|
||||
void
|
||||
yy::parser::error (const location& l, const std::string& m)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user