diff options
Diffstat (limited to 'test/quote_calc3-s.tab.c')
-rw-r--r-- | test/quote_calc3-s.tab.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/test/quote_calc3-s.tab.c b/test/quote_calc3-s.tab.c index 4cd55a9318c9..237bf9d7b55a 100644 --- a/test/quote_calc3-s.tab.c +++ b/test/quote_calc3-s.tab.c @@ -246,6 +246,7 @@ static const short quote_calc3_check[] = { 10, #define YYDEBUG 0 #endif #define YYMAXTOKEN 271 +#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? (YYMAXTOKEN + 1) : (a)) #if YYDEBUG static const char *yyname[] = { @@ -258,7 +259,7 @@ static const char *yyname[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,"OP_ADD","\"ADD-operator\"","OP_SUB","\"SUB-operator\"","OP_MUL", "\"MUL-operator\"","OP_DIV","\"DIV-operator\"","OP_MOD","\"MOD-operator\"", -"OP_AND","\"AND-operator\"","DIGIT","LETTER","UMINUS", +"OP_AND","\"AND-operator\"","DIGIT","LETTER","UMINUS","illegal-symbol", }; static const char *yyrule[] = { "$accept : list", @@ -456,9 +457,7 @@ yyloop: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -540,9 +539,7 @@ yyinrecovery: #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, error recovery discards token %d (%s)\n", YYPREFIX, yystate, yychar, yys); } @@ -624,7 +621,7 @@ case 18: #line 70 "quote_calc3.y" { yyval = base * yystack.l_mark[-1] + yystack.l_mark[0]; } break; -#line 628 "quote_calc3-s.tab.c" +#line 624 "quote_calc3-s.tab.c" } yystack.s_mark -= yym; yystate = *yystack.s_mark; @@ -646,9 +643,7 @@ break; #if YYDEBUG if (yydebug) { - yys = 0; - if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; - if (!yys) yys = "illegal-symbol"; + yys = yyname[YYTRANSLATE(yychar)]; printf("%sdebug: state %d, reading %d (%s)\n", YYPREFIX, YYFINAL, yychar, yys); } |