diff options
Diffstat (limited to 'examples/c/lexcalc/scan.l')
-rw-r--r-- | examples/c/lexcalc/scan.l | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/c/lexcalc/scan.l b/examples/c/lexcalc/scan.l index 51129a56..983fbdaf 100644 --- a/examples/c/lexcalc/scan.l +++ b/examples/c/lexcalc/scan.l @@ -61,7 +61,7 @@ errno = 0; long n = strtol (yytext, NULL, 10); if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE)) - yyerror (yylloc, "integer is out of range"); + yyerror (yylloc, nerrs, "integer is out of range"); yylval->TOK_NUM = (int) n; return TOK_NUM; } @@ -71,7 +71,7 @@ /* Ignore white spaces. */ [ \t]+ LOCATION_STEP (); continue; -. yyerror (yylloc, "syntax error, invalid character"); continue; +. yyerror (yylloc, nerrs, "syntax error, invalid character"); continue; <<EOF>> return TOK_YYEOF; %% |