mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: AT_YYERROR_DEFINE: prepare for list of ints.
* tests/local.at (AT_YYERROR_DEFINE): Don't add quotes, check their presence to detect char/int types. * tests/actions.at, tests/conflicts.at, tests/glr-regression.at, * tests/push.at, tests/regression.at: Adjust.
This commit is contained in:
@@ -291,8 +291,11 @@ $2])
|
||||
# AT_YYLEX_PROTOTYPE
|
||||
# AT_YYLEX_DECLARE_EXTERN
|
||||
# AT_YYLEX_DECLARE
|
||||
# AT_YYLEX_DEFINE(INPUT-STRING, [ACTION])
|
||||
# ---------------------------------------
|
||||
# AT_YYLEX_DEFINE([INPUT], [ACTION])
|
||||
# ----------------------------------
|
||||
# INPUT can be empty, or in double quotes, or a list (in braces).
|
||||
# ACTION may compute yylval for instance, using "res" as token type,
|
||||
# and "toknum" as the number of calls to yylex (starting at 0).
|
||||
m4_define([AT_YYLEX_PROTOTYPE],
|
||||
[int AT_NAME_PREFIX[]lex (]AT_YYLEX_FORMALS[)[]dnl
|
||||
])
|
||||
@@ -310,7 +313,9 @@ m4_define([AT_YYLEX_DEFINE],
|
||||
static
|
||||
]AT_YYLEX_PROTOTYPE[
|
||||
{
|
||||
static char const input[] = "$1";
|
||||
]m4_bmatch([$1], [^\(".*"\)?$],
|
||||
[[static char const input[] = ]m4_default([$1], [""])],
|
||||
[[static int const input[] = ]$1])[;
|
||||
static size_t toknum = 0;
|
||||
int res;
|
||||
]AT_USE_LEX_ARGS[;
|
||||
|
||||
Reference in New Issue
Block a user