mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 07:13:02 +00:00
* src/gram.h, src/gram.c (error_token_number): Remove, use
errtoken->number. * src/reader.c (reader): Don't specify the user token number (2) for $undefined, as it uselessly prevents using it. * src/gram.h (token_number_t): Move to... * src/symtab.h: here. (state_t.number): Is a token_number_t. * src/print.c, src/reader.c: Use undeftoken->number instead of hard coded 2. (Even though this 2 is not the same as above: the number of the undeftoken remains being 2, it is its user token number which might not be 2). * src/output.c (prepare_tokens): Rename the `maxtok' muscle with `user_token_number_max'. Output `undef_token_number'. * data/bison.simple, data/bison.c++: Use them. Be sure to map invalid yylex return values to `undef_token_number'. This saves us from gratuitous SEGV. * tests/conflicts.at (Solved SR Conflicts) (Unresolved SR Conflicts): Adjust. * tests/regression.at (Web2c Actions): Adjust.
This commit is contained in:
@@ -154,7 +154,6 @@ extern symbol_t **symbols;
|
||||
/* TOKEN_TRANSLATION -- a table indexed by a token number as returned
|
||||
by the user's yylex routine, it yields the internal token number
|
||||
used by the parser and throughout bison. */
|
||||
typedef short token_number_t;
|
||||
extern token_number_t *token_translations;
|
||||
extern int max_user_token_number;
|
||||
|
||||
@@ -169,10 +168,6 @@ extern int semantic_parser;
|
||||
|
||||
extern int pure_parser;
|
||||
|
||||
/* ERROR_TOKEN_NUMBER is the token number of the error token. */
|
||||
|
||||
extern int error_token_number;
|
||||
|
||||
/* Report the length of the RHS. */
|
||||
int rule_rhs_length PARAMS ((rule_t *rule));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user