Improve some comments in parser table construction.

* src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
(generate_states): Don't mention ruleset, which is internal to closure.
* src/closure.c (closure): Explain sorting of core and itemset, which
is required for this function to behave correctly.
* src/closure.h (closure): Mention sorting.
This commit is contained in:
Joel E. Denny
2007-05-29 04:24:17 +00:00
parent b1a8161341
commit 71b61d4db5
4 changed files with 17 additions and 6 deletions

View File

@@ -32,7 +32,7 @@
void new_closure (unsigned int n);
/* Given the kernel (aka core) of a state (a vector of item numbers
/* Given the kernel (aka core) of a state (a sorted vector of item numbers
ITEMS, of length N), set up RULESET and ITEMSET to indicate what
rules could be run and which items could be accepted when those
items are the active ones.
@@ -41,7 +41,7 @@ void new_closure (unsigned int n);
all rules which could potentially describe the next input to be
read.
ITEMSET is a vector of item numbers; NITEMSET is its size
ITEMSET is a sorted vector of item numbers; NITEMSET is its size
(actually, points to just beyond the end of the part of it that is
significant). CLOSURE places there the indices of all items which
represent units of input that could arrive next. */