mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
style: comment changes
* src/closure.h, src/closure.c, src/lalr.c: here.
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
item_number *itemset;
|
||||
size_t nitemset;
|
||||
|
||||
/* RULESET contains a bit for each rule. CLOSURE sets the bits for
|
||||
all rules which could potentially describe the next input to be
|
||||
read. */
|
||||
static bitset ruleset;
|
||||
|
||||
/* internal data. See comments before set_fderives and set_firsts. */
|
||||
|
||||
@@ -33,24 +33,21 @@ void closure_new (unsigned n);
|
||||
/* 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.
|
||||
|
||||
RULESET contains a bit for each rule. CLOSURE sets the bits for
|
||||
all rules which could potentially describe the next input to be
|
||||
read.
|
||||
|
||||
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. */
|
||||
items are the active ones. */
|
||||
|
||||
void closure (item_number const *items, size_t n);
|
||||
|
||||
|
||||
/* Frees ITEMSET, RULESET and internal data. */
|
||||
/* Free ITEMSET, RULESET and internal data. */
|
||||
|
||||
void closure_free (void);
|
||||
|
||||
|
||||
/* 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. */
|
||||
|
||||
extern item_number *itemset;
|
||||
extern size_t nitemset;
|
||||
|
||||
|
||||
@@ -72,6 +72,12 @@ static bitsetv LA = NULL;
|
||||
size_t nLA;
|
||||
|
||||
|
||||
/* "(p, A) includes (p', B)" iff
|
||||
B → βAγ, γ nullable, and p'-- β --> p (i.e., state p' reaches p on label β).
|
||||
|
||||
Definition p.621 [DeRemer 1982].
|
||||
|
||||
INCLUDES[(p, A)] = [(p', B),...] */
|
||||
static goto_number **includes;
|
||||
|
||||
/* "(q, A → ω) lookback (p, A)" iff state p reaches state q on label ω.
|
||||
|
||||
Reference in New Issue
Block a user