mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
d: create getter for the number of errors from the parser
* data/skeletons/lalr1.d: Here.
This commit is contained in:
committed by
Akim Demaille
parent
c13b3c02d3
commit
8d01c60e9c
@@ -303,6 +303,12 @@ b4_user_union_members
|
||||
yylexer.yyerror (]b4_locations_if([loc, ])[s);
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of syntax errors so far.
|
||||
*/
|
||||
public int numberOfErrors() const { return yynerrs_; }
|
||||
private int yynerrs_ = 0;
|
||||
|
||||
/**
|
||||
* Returned by a Bison action in order to stop the parsing process and
|
||||
* return success (<tt>true</tt>). */
|
||||
@@ -434,7 +440,7 @@ b4_user_union_members
|
||||
YYStack yystack;
|
||||
|
||||
/* Error handling. */
|
||||
int yynerrs_ = 0;]b4_locations_if([[
|
||||
]b4_locations_if([[
|
||||
/// The location where the error started.
|
||||
Location yyerrloc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user