mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
d: add yyerrok
In D's case, yyerrok() is a private method of the Parser class. It can be called directly as `yyerrok()` from the grammar rules section. * data/skeletons/lalr1.d: Add yyerrok(). * examples/d/calc/calc.y, examples/d/simple/calc.y: Demonstrate yyerrok(). * tests/calc.at: Update D tests to use yyerrok().
This commit is contained in:
committed by
Akim Demaille
parent
d49da0101a
commit
abf5f7f90e
@@ -53,7 +53,7 @@ input:
|
||||
line:
|
||||
EOL
|
||||
| exp EOL { writeln ($exp); }
|
||||
| error EOL
|
||||
| error EOL { yyerrok(); }
|
||||
;
|
||||
|
||||
exp:
|
||||
|
||||
@@ -51,7 +51,7 @@ input:
|
||||
line:
|
||||
EOL
|
||||
| exp EOL { writeln ($exp); }
|
||||
| error EOL
|
||||
| error EOL { yyerrok(); }
|
||||
;
|
||||
|
||||
exp:
|
||||
|
||||
Reference in New Issue
Block a user