style: factor printing of rules

* src/gram.h, src/gram.c (rule_print): New.
Use it.
This commit is contained in:
Akim Demaille
2019-02-09 07:15:56 +01:00
parent f293345aa8
commit ad7d8af6d1
4 changed files with 15 additions and 7 deletions

View File

@@ -376,7 +376,7 @@ generate_states (void)
closure (s->items, s->nitems);
/* Record the reductions allowed out of this state. */
save_reductions (s);
/* Find the itemsets of the states that shifts can reach. */
/* Find the itemsets of the states that shifts/gotos can reach. */
new_itemsets (s);
/* Find or create the core structures for those states. */
append_states (s);