mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +00:00
Copy BYacc's nice way to report the grammar.
* src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print): New. Don't print the rules' location, it is confusing and useless. (rule_print): Use grammar_rhs_print. * src/print.c (print_grammar): Use grammar_rules_print.
This commit is contained in:
@@ -565,7 +565,7 @@ lookaheads_print (FILE *out)
|
||||
for (k = 0; k < ntokens; ++k)
|
||||
if (bitset_test (LA[states[i]->lookaheadsp + j], k))
|
||||
fprintf (out, " on %d (%s) -> rule %d\n",
|
||||
k, quotearg_style (escape_quoting_style, symbols[k]->tag),
|
||||
k, symbol_tag_get (symbols[k]),
|
||||
LArule[states[i]->lookaheadsp + j]->number - 1);
|
||||
}
|
||||
fprintf (out, "Lookaheads: END\n");
|
||||
|
||||
Reference in New Issue
Block a user