481 |
#else /* !YYDEBUG */ |
#else /* !YYDEBUG */ |
482 |
|
|
483 |
/* Avoid empty `if' bodies. */ |
/* Avoid empty `if' bodies. */ |
484 |
# define YYDPRINTF(Args) {} |
# define YYDPRINTF(Args) |
485 |
# define YYDSYMPRINT(Args) {} |
# define YYDSYMPRINT(Args) |
486 |
# define YYDSYMPRINTF(Title, Token, Value, Location) {} |
# define YYDSYMPRINTF(Title, Token, Value, Location) |
487 |
|
|
488 |
#endif /* !YYDEBUG */ |
#endif /* !YYDEBUG */ |
489 |
|
|
790 |
|
|
791 |
/* GLRStates */ |
/* GLRStates */ |
792 |
|
|
|
/** True iff the semantic value of the edge leading to STATE is |
|
|
* resolved. */ |
|
|
static inline bool |
|
|
yyhasResolvedValue (yyGLRState* yystate) |
|
|
{ |
|
|
return yystate->yyresolved; |
|
|
} |
|
|
|
|
793 |
static void |
static void |
794 |
yyaddDeferredAction (yyGLRStack* yystack, yyGLRState* yystate, |
yyaddDeferredAction (yyGLRStack* yystack, yyGLRState* yystate, |
795 |
yyGLRState* rhs, yyRuleNum yyrule]b4_pure_formals[) |
yyGLRState* rhs, yyRuleNum yyrule]b4_pure_formals[) |
959 |
if (yystack->yytops.yystates[yyi] == NULL) |
if (yystack->yytops.yystates[yyi] == NULL) |
960 |
{ |
{ |
961 |
if (yyi == yyj) |
if (yyi == yyj) |
962 |
YYDPRINTF ((stderr, "Removing dead stacks.\n")); |
{ |
963 |
|
YYDPRINTF ((stderr, "Removing dead stacks.\n")); |
964 |
|
} |
965 |
yystack->yytops.yysize -= 1; |
yystack->yytops.yysize -= 1; |
966 |
} |
} |
967 |
else |
else |
968 |
{ |
{ |
969 |
yystack->yytops.yystates[yyj] = yystack->yytops.yystates[yyi]; |
yystack->yytops.yystates[yyj] = yystack->yytops.yystates[yyi]; |
970 |
if (yyj != yyi) |
if (yyj != yyi) |
971 |
YYDPRINTF ((stderr, "Rename stack %d -> %d.\n", yyi, yyj)); |
{ |
972 |
|
YYDPRINTF ((stderr, "Rename stack %d -> %d.\n", yyi, yyj)); |
973 |
|
} |
974 |
yyj += 1; |
yyj += 1; |
975 |
} |
} |
976 |
yyi += 1; |
yyi += 1; |
1246 |
yySemanticOption* yyz; |
yySemanticOption* yyz; |
1247 |
for (yyz = yys0->yysemantics.yyfirstVal; yyz->yynext != NULL; |
for (yyz = yys0->yysemantics.yyfirstVal; yyz->yynext != NULL; |
1248 |
yyz = yyz->yynext) |
yyz = yyz->yynext) |
1249 |
; |
continue; |
1250 |
yyz->yynext = yys1->yysemantics.yyfirstVal; |
yyz->yynext = yys1->yysemantics.yyfirstVal; |
1251 |
} |
} |
1252 |
} |
} |
1456 |
for (yyn = 0, yys = yystack->yytops.yystates[0]; |
for (yyn = 0, yys = yystack->yytops.yystates[0]; |
1457 |
yys != yystack->yysplitPoint; |
yys != yystack->yysplitPoint; |
1458 |
yys = yys->yypred, yyn += 1) |
yys = yys->yypred, yyn += 1) |
1459 |
; |
continue; |
1460 |
YYCHK (yyresolveStates (yystack->yytops.yystates[0], yyn, yystack |
YYCHK (yyresolveStates (yystack->yytops.yystates[0], yyn, yystack |
1461 |
]b4_user_args[)); |
]b4_user_args[)); |
1462 |
} |
} |
1567 |
} |
} |
1568 |
|
|
1569 |
static void |
static void |
1570 |
yyreportParseError (yyGLRStack* yystack, |
yyreportSyntaxError (yyGLRStack* yystack, |
1571 |
YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[) |
YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[) |
1572 |
{ |
{ |
1573 |
/* `Unused' warnings. */ |
/* `Unused' warnings. */ |
1574 |
(void) yylvalp; |
(void) yylvalp; |
1626 |
YYLVALP, and YYLLOCP point to the syntactic category, semantic |
YYLVALP, and YYLLOCP point to the syntactic category, semantic |
1627 |
value, and location of the lookahead. */ |
value, and location of the lookahead. */ |
1628 |
static void |
static void |
1629 |
yyrecoverParseError (yyGLRStack* yystack, |
yyrecoverSyntaxError (yyGLRStack* yystack, |
1630 |
YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[) |
YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[) |
1631 |
{ |
{ |
1632 |
yySymbol* const yytokenp = yystack->yytokenp; |
yySymbol* const yytokenp = yystack->yytokenp; |
1633 |
size_t yyk; |
size_t yyk; |
1792 |
yyrule = yydefaultAction (yystate); |
yyrule = yydefaultAction (yystate); |
1793 |
if (yyrule == 0) |
if (yyrule == 0) |
1794 |
{ |
{ |
1795 |
yyreportParseError (&yystack, yylvalp, yyllocp]b4_user_args[); |
yyreportSyntaxError (&yystack, yylvalp, yyllocp]b4_user_args[); |
1796 |
goto yyuser_error; |
goto yyuser_error; |
1797 |
} |
} |
1798 |
YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue]b4_lpure_args[)); |
YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue]b4_lpure_args[)); |
1823 |
} |
} |
1824 |
else if (yyisErrorAction (yyaction)) |
else if (yyisErrorAction (yyaction)) |
1825 |
{ |
{ |
1826 |
yyreportParseError (&yystack, yylvalp, yyllocp]b4_user_args[); |
yyreportSyntaxError (&yystack, yylvalp, yyllocp]b4_user_args[); |
1827 |
goto yyuser_error; |
goto yyuser_error; |
1828 |
} |
} |
1829 |
else |
else |
1848 |
yyFail (&yystack][]b4_lpure_args[, "syntax error"); |
yyFail (&yystack][]b4_lpure_args[, "syntax error"); |
1849 |
YYCHK1 (yyresolveStack (&yystack]b4_user_args[)); |
YYCHK1 (yyresolveStack (&yystack]b4_user_args[)); |
1850 |
YYDPRINTF ((stderr, "Returning to deterministic operation.\n")); |
YYDPRINTF ((stderr, "Returning to deterministic operation.\n")); |
1851 |
yyreportParseError (&yystack, yylvalp, yyllocp]b4_user_args[); |
yyreportSyntaxError (&yystack, yylvalp, yyllocp]b4_user_args[); |
1852 |
goto yyuser_error; |
goto yyuser_error; |
1853 |
} |
} |
1854 |
else if (yystack.yytops.yysize == 1) |
else if (yystack.yytops.yysize == 1) |
1861 |
} |
} |
1862 |
continue; |
continue; |
1863 |
yyuser_error: |
yyuser_error: |
1864 |
yyrecoverParseError (&yystack, yylvalp, yyllocp]b4_user_args[); |
yyrecoverSyntaxError (&yystack, yylvalp, yyllocp]b4_user_args[); |
1865 |
yyposn = yystack.yytops.yystates[0]->yyposn; |
yyposn = yystack.yytops.yystates[0]->yyposn; |
1866 |
} |
} |
1867 |
yyDone: |
yyDone: |