* 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:
Akim Demaille
2002-04-09 19:19:59 +00:00
parent 491bdd7ae5
commit 007a50a493
13 changed files with 67 additions and 33 deletions

View File

@@ -336,8 +336,8 @@ $ (0) 0
';' (59) 5
'=' (61) 5
error (256)
undef_id_tok (257) 5
const_id_tok (258) 5
undef_id_tok (258) 5
const_id_tok (259) 5
Nonterminals, with rules where they appear
$axiom (7)
on left: 0
@@ -460,8 +460,8 @@ AT_CHECK([[sed -n 's/ *$//;/^static const.*\[\] =/,/^}/p' input.c]], 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
6
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6
};
static const short yyprhs[] =
{
@@ -483,7 +483,7 @@ static const char *const yytname[] =
};
static const short yytoknum[] =
{
0, 256, 2, 257, 258, 259, 260, -1
0, 256, 257, 258, 259, 260, 261, -1
};
static const short yyr1[] =
{