From 6ce2d93a9b49afbc196e764923d539bc0caa1120 Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Tue, 10 Jul 2007 02:57:31 +0000 Subject: [PATCH] * LR0.c (new_itemsets): Fix wording in comments: say item index rather than item number. * closure.c (closure): Likewise. * state.h (reductions): Comment sorting of rules. (state): Comment sorting of items. --- ChangeLog | 8 ++++++++ src/LR0.c | 6 +++--- src/closure.c | 2 +- src/state.h | 5 +++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c261894..8f331164 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-07-09 Joel E. Denny + + * LR0.c (new_itemsets): Fix wording in comments: say item index rather + than item number. + * closure.c (closure): Likewise. + * state.h (reductions): Comment sorting of rules. + (state): Comment sorting of items. + 2007-07-02 Joel E. Denny Fix C++ test cases after recent Gnulib changes. Discussed starting at diff --git a/src/LR0.c b/src/LR0.c index 6e3a4460..689bebcb 100644 --- a/src/LR0.c +++ b/src/LR0.c @@ -170,9 +170,9 @@ free_storage (void) | points to a vector of item numbers activated if that symbol is | | shifted, and kernel_size[symbol] is their numbers. | | | -| itemset is sorted on item number from ritem, which is sorted | -| on rule number. Compute each kernel_base[symbol] with the | -| same sort. | +| itemset is sorted on item index in ritem, which is sorted on | +| rule number. Compute each kernel_base[symbol] with the same | +| sort. | `---------------------------------------------------------------*/ static void diff --git a/src/closure.c b/src/closure.c index 339adf5d..a6cc784a 100644 --- a/src/closure.c +++ b/src/closure.c @@ -213,7 +213,7 @@ closure (item_number *core, size_t n) if (ISVAR (ritem[core[c]])) bitset_or (ruleset, ruleset, FDERIVES (ritem[core[c]])); - /* core is sorted on item number from ritem, which is sorted on rule number. + /* core is sorted on item index in ritem, which is sorted on rule number. Compute itemset with the same sort. */ nitemset = 0; c = 0; diff --git a/src/state.h b/src/state.h index 2d67bb7c..390ab8af 100644 --- a/src/state.h +++ b/src/state.h @@ -185,6 +185,7 @@ typedef struct { int num; bitset *lookahead_tokens; + /* Sorted ascendingly on rule number. */ rule *rules[1]; } reductions; @@ -210,8 +211,8 @@ struct state a human readable description of the resolution. */ const char *solved_conflicts; - /* Its items. Must be last, since ITEMS can be arbitrarily large. - */ + /* Its items. Must be last, since ITEMS can be arbitrarily large. Sorted + ascendingly on item index in RITEM, which is sorted on rule number. */ size_t nitems; item_number items[1]; }; -- 2.47.2