From: Akim Demaille Date: Sun, 7 Apr 2002 16:39:49 +0000 (+0000) Subject: * src/gram.h, src/gram.c (rules_swap): New. X-Git-Tag: BISON-1_49a~78 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/a31932aa0b2776b5040dcec84d91c5d2176de5f1?hp=a31932aa0b2776b5040dcec84d91c5d2176de5f1 * src/gram.h, src/gram.c (rules_swap): New. (ritem_longest_rhs): Use it. * src/gram.h (rule_t): `number' is a new member. * src/reader.c (packgram): Set it. * src/reduce.c (reduce_grammar_tables): Move the useless rules at the end of `rules', and count them out of `nrules'. (reduce_output, dump_grammar): Adjust. * src/print.c (print_grammar): It is no longer needed to check for the usefulness of a rule, as useless rules are beyond `nrules + 1'. * tests/reduce.at (Reduced Automaton): New test. ---