mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* src/reader.c (token_translations_init): 256 is now the default
value for the error token, i.e., it will be assigned another number if the user assigned 256 to one of her tokens. (reader): Don't force 256 to error. * doc/bison.texinfo (Symbols): Adjust. * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR) (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3 etc. instead of 10, 20, 30 (which was used to `jump' over error (256) and undefined (2)).
This commit is contained in:
@@ -2218,11 +2218,9 @@ files before compiling them.
|
||||
|
||||
The symbol @code{error} is a terminal symbol reserved for error recovery
|
||||
(@pxref{Error Recovery}); you shouldn't use it for any other purpose.
|
||||
In particular, @code{yylex} should never return this value.
|
||||
The default value of the error token is 256, so in the
|
||||
unlikely event that you need to use a character token with numeric
|
||||
value 256 you must reassign the error token's value with a
|
||||
@code{%token} declaration.
|
||||
In particular, @code{yylex} should never return this value. The default
|
||||
value of the error token is 256, unless you explicitly assigned 256 to
|
||||
one of your tokens with a @code{%token} declaration.
|
||||
|
||||
@node Rules
|
||||
@section Syntax of Grammar Rules
|
||||
|
||||
Reference in New Issue
Block a user