* src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.

* src/output.c (output_table_data): Return the longest number.
(prepare_tokens): Output `token_number_max').
* data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
New.
Use them to define yy_token_number_type/TokenNumberType.
Use this type for yytranslate.
* tests/torture.at (Big triangle): Push the limit from 124 to
253.
* tests/regression.at (Web2c Actions): Adjust.
This commit is contained in:
Akim Demaille
2002-04-07 17:44:59 +00:00
parent 817e9f41d1
commit 680e8701b5
11 changed files with 95 additions and 26 deletions

View File

@@ -433,7 +433,7 @@ AT_CHECK([bison -v input.y -o input.c])
# Check only the tables. We don't use --no-parser, because it is
# still to be implemented in the experimental branch of Bison.
AT_CHECK([[sed -n 's/ *$//;/^static const.*\[\] =/,/^}/p' input.c]], 0,
[[static const char yytranslate[] =
[[static const yy_token_number_type yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,

View File

@@ -127,11 +127,9 @@ mv stdout $1
## Big triangle. ##
## -------------- ##
# Arg, the upper limit, currently, is 124. Afterwards, the
# executable dumps core...
AT_SETUP([Big triangle])
AT_DATA_TRIANGULAR_GRAMMAR([input.y], [124])
AT_DATA_TRIANGULAR_GRAMMAR([input.y], [253])
AT_CHECK([bison input.y -v -o input.c])
AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -o input], 0, [], [ignore])
AT_CHECK([./input])