mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 07:43:03 +00:00
multistart: adjust computation of initial core and adjust reports
Currently the core of the initial state is limited to the single rule on $accept. * src/lr0.c (generate_states): There may now be several rules on $accept. * src/graphviz.c (conclude_red): Recognize "final" transitions by the fact that we reduce to "$accept". * src/print.c (print_reduction): Likewise. * src/print-xml.c (print_reduction): Likewise.
This commit is contained in:
@@ -395,9 +395,10 @@ generate_states (void)
|
||||
/* Create the initial state, whose accessing symbol (by convention)
|
||||
is 0, aka $end. */
|
||||
{
|
||||
/* The items of its core. */
|
||||
kernel_size[0] = 1;
|
||||
kernel_base[0][0] = 0;
|
||||
/* The items of its core: beginning of all the rules of $accept. */
|
||||
kernel_size[0] = 0;
|
||||
for (rule_number r = 0; r < nrules && rules[r].lhs->symbol == acceptsymbol; ++r)
|
||||
kernel_base[0][kernel_size[0]++] = rules[r].rhs - ritem;
|
||||
state_list_append (0, kernel_size[0], kernel_base[0]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user