* 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:
Akim Demaille
2002-04-22 08:22:11 +00:00
parent 5fbb0954b8
commit 23c5a17453
5 changed files with 52 additions and 16 deletions

View File

@@ -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