mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
tests: use the generalized default yylex.
* tests/actions.at, tests/glr-regression.at, tests/regression.at: here.
This commit is contained in:
@@ -1417,7 +1417,7 @@ AT_DATA_GRAMMAR([input.y],
|
||||
# include <assert.h>
|
||||
|
||||
]AT_YYERROR_DECLARE[
|
||||
static int yylex (YYSTYPE *yylval);
|
||||
]AT_YYLEX_DECLARE[
|
||||
}
|
||||
%%
|
||||
input:
|
||||
@@ -1432,15 +1432,7 @@ exp:
|
||||
|
||||
%%
|
||||
]AT_YYERROR_DEFINE[
|
||||
static int
|
||||
yylex (YYSTYPE *yylval)
|
||||
{
|
||||
static char const input[] = "bcd";
|
||||
static size_t toknum;
|
||||
assert (toknum < sizeof input);
|
||||
*yylval = (toknum + 1) * 10;
|
||||
return input[toknum++];
|
||||
}
|
||||
]AT_YYLEX_DEFINE(["bcd"], [*lvalp = (toknum + 1) * 10])[
|
||||
|
||||
int
|
||||
main (void)
|
||||
|
||||
Reference in New Issue
Block a user