]> git.saurik.com Git - bison.git/commit - src/reduce.c
Stop storing rules from 1 to nrules + 1.
authorAkim Demaille <akim@epita.fr>
Thu, 25 Jul 2002 21:21:02 +0000 (21:21 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 25 Jul 2002 21:21:02 +0000 (21:21 +0000)
commit4b3d3a8e4629cc3b0a6d011d80e1997f8306c304
tree48c7f20a53e1ea1921970479005672bae095e385
parent4a2a22f4c0b1ce06a0a473038436bd8a8116b2aa
Stop storing rules from 1 to nrules + 1.
* src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
* src/nullable.c, src/output.c, src/print.c, src/reader.c
* src/reduce.c: Allocate and free from &rules[0], not &rules[1].
Iterate from 0 to nrules.
Use rule_number_as_item_number and item_number_as_rule_number.
Adjust to `derive' now containing possibly 0.
* src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
Handle the `- 1' part in rule numbers from/to item numbers.
* src/conflicts.c (log_resolution): Fix the message which reversed
shift and reduce.
* src/output.c (action_row): Initialize default_rule to -1.
(token_actions): Adjust.
* tests/sets.at (Nullable, Firsts): Fix the previously bogus
expected output.
* tests/conflicts.at (Resolved SR Conflicts): Likewise.
15 files changed:
ChangeLog
src/LR0.c
src/closure.c
src/conflicts.c
src/derives.c
src/gram.c
src/gram.h
src/lalr.c
src/nullable.c
src/output.c
src/print.c
src/reader.c
src/reduce.c
tests/conflicts.at
tests/sets.at