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:
Akim Demaille
2021-08-19 09:16:00 +02:00
parent 3afa9757da
commit a70e75b8a4
4 changed files with 18 additions and 58 deletions

View File

@@ -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;
%%