mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 03:03:02 +00:00
style: comments changes about error handling
* data/skeletons/glr.c, data/skeletons/lalr1.cc, data/skeletons/lalr1.d, * data/skeletons/lalr1.java, data/skeletons/yacc.c: here. * data/skeletons/lalr1.cc: Reduce scope.
This commit is contained in:
@@ -2353,7 +2353,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
|||||||
yycompressStack (yystackp);
|
yycompressStack (yystackp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now pop stack until we find a state that shifts the error token. */
|
/* Pop stack until we find a state that shifts the error token. */
|
||||||
yystackp->yyerrState = 3;
|
yystackp->yyerrState = 3;
|
||||||
while (yystackp->yytops.yystates[0] != YY_NULLPTR)
|
while (yystackp->yytops.yystates[0] != YY_NULLPTR)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1124,8 +1124,7 @@ b4_dollar_popdef])[]dnl
|
|||||||
`-------------------------------------------------------------*/
|
`-------------------------------------------------------------*/
|
||||||
yyerrlab1:
|
yyerrlab1:
|
||||||
yyerrstatus_ = 3; // Each real token shifted decrements this.
|
yyerrstatus_ = 3; // Each real token shifted decrements this.
|
||||||
{
|
// Pop stack until we find a state that shifts the error token.
|
||||||
stack_symbol_type error_token;
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
yyn = yypact_[+yystack_[0].state];
|
yyn = yypact_[+yystack_[0].state];
|
||||||
@@ -1150,6 +1149,8 @@ b4_dollar_popdef])[]dnl
|
|||||||
yypop_ ();
|
yypop_ ();
|
||||||
YY_STACK_PRINT ();
|
YY_STACK_PRINT ();
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
stack_symbol_type error_token;
|
||||||
]b4_locations_if([[
|
]b4_locations_if([[
|
||||||
yyerror_range[2].location = yyla.location;
|
yyerror_range[2].location = yyla.location;
|
||||||
YYLLOC_DEFAULT (error_token.location, yyerror_range, 2);]])[
|
YYLLOC_DEFAULT (error_token.location, yyerror_range, 2);]])[
|
||||||
|
|||||||
@@ -618,6 +618,7 @@ m4_popdef([b4_at_dollar])])dnl
|
|||||||
case YYERRLAB1:
|
case YYERRLAB1:
|
||||||
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
|
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
|
||||||
|
|
||||||
|
// Pop stack until we find a state that shifts the error token.
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
yyn = yypact_[yystate];
|
yyn = yypact_[yystate];
|
||||||
|
|||||||
@@ -726,6 +726,7 @@ b4_dollar_popdef[]dnl
|
|||||||
case YYERRLAB1:
|
case YYERRLAB1:
|
||||||
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
|
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
|
||||||
|
|
||||||
|
// Pop stack until we find a state that shifts the error token.
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
yyn = yypact_[yystate];
|
yyn = yypact_[yystate];
|
||||||
|
|||||||
@@ -1998,6 +1998,7 @@ yyerrorlab:
|
|||||||
yyerrlab1:
|
yyerrlab1:
|
||||||
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
||||||
|
|
||||||
|
// Pop stack until we find a state that shifts the error token.
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
yyn = yypact[yystate];
|
yyn = yypact[yystate];
|
||||||
|
|||||||
Reference in New Issue
Block a user