mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +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:
@@ -213,6 +213,8 @@ 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.
|
||||
Compute itemset with the same sort. */
|
||||
nitemset = 0;
|
||||
c = 0;
|
||||
BITSET_FOR_EACH (iter, ruleset, ruleno, 0)
|
||||
|
||||
Reference in New Issue
Block a user