mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Get rid of yyrhs and yyprhs in yacc.c.
They were used to get the symbol types, given a rule number, when displaying the top of the stack before a reduction. But the symbol type is available from the state stack. This has two be benefits: two tables less in the parser (making it smaller), and a more consistent use of the three stacks which will help to fuse them. * data/yacc.c (yyprhs, yyrhs): Remove. (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print. (yy_reduce_print): Take yyssp as argument. Use it, together with yystos, to get the symbol type. * tests/regression.at (Web2c Report): Remove these tables from the expected output.
This commit is contained in:
@@ -754,15 +754,6 @@ AT_CHECK([[cat tables.c]], 0,
|
||||
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
|
||||
5, 6
|
||||
};
|
||||
static const yytype_uint8 yyprhs[] =
|
||||
{
|
||||
0, 0, 3, 5, 6, 9, 14
|
||||
};
|
||||
static const yytype_int8 yyrhs[] =
|
||||
{
|
||||
8, 0, -1, 9, -1, -1, 10, 11, -1, 3,
|
||||
4, 5, 8, -1, 6, 8, -1
|
||||
};
|
||||
static const yytype_uint8 yyrline[] =
|
||||
{
|
||||
0, 2, 2, 3, 3, 4, 5
|
||||
|
||||
Reference in New Issue
Block a user