mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 07:13:02 +00:00
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:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user