mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 01:33:03 +00:00
examples: don't demonstrate multistart, which is not part of 3.8
Besides, for mysterious reasons, this fails on some environment. Reported by Dagobert Michelsen. <https://lists.gnu.org/archive/html/bug-bison/2021-08/msg00008.html> * examples/c/lexcalc/lexcalc.test, examples/c/lexcalc/parse.y, * examples/c/lexcalc/scan.l: Revert to a single-start example.
This commit is contained in:
@@ -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;
|
||||
%%
|
||||
|
||||
Reference in New Issue
Block a user