* 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

@@ -60,7 +60,7 @@ EOF
for my $size (1 .. $max)
{
print "%token \"$size\" ", $size * 10, "\n";
print "%token \"$size\" ", $size, "\n";
};
print <<EOF;
@@ -100,7 +100,7 @@ yylex (void)
++outer;
return END;
}
return inner++ * 10;
return inner++;
}
static void
@@ -170,7 +170,7 @@ EOF
for my $size (1 .. $max)
{
print "%token \"$size\" ", $size * 10, "\n";
print "%token \"$size\" ", $size, "\n";
};
print <<EOF;
@@ -192,7 +192,7 @@ yylex (void)
if (counter > $max)
return 0;
else
return counter++ * 10;
return counter++;
}
static void