mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
add LR(0) output
This should not be used to generate parsers. My point is actually to facilitate debugging (when tweaking the generation of the LR(0) automaton for instance, not carying -yet- about lookaheads). * src/reader.c (prepare_percent_define_front_end_variables): Add lr(0). * src/conflicts.c (set_conflicts): Be robust to reds not having lookaheads at all. * src/ielr.c (LrType, lr_type_get): Adjust. (ielr): Implement support for LR(0). * src/lalr.c (lalr_free): Don't free LA when it's not computed.
This commit is contained in:
11
src/reader.c
11
src/reader.c
@@ -754,11 +754,12 @@ prepare_percent_define_front_end_variables (void)
|
||||
|
||||
/* Check %define front-end variables. */
|
||||
{
|
||||
static char const * const values[] = {
|
||||
"lr.type", "lalr", "ielr", "canonical-lr", NULL,
|
||||
"lr.default-reduction", "most", "consistent", "accepting", NULL,
|
||||
NULL
|
||||
};
|
||||
static char const * const values[] =
|
||||
{
|
||||
"lr.type", "lr(0)", "lalr", "ielr", "canonical-lr", NULL,
|
||||
"lr.default-reduction", "most", "consistent", "accepting", NULL,
|
||||
NULL
|
||||
};
|
||||
muscle_percent_define_check_values (values);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user