|LALR(1) differences to LR(1) firstname.lastname@example.org (aegis) (2005-11-01)|
|Re: LALR(1) differences to LR(1) email@example.com (2005-11-01)|
|Re: LALR(1) differences to LR(1) firstname.lastname@example.org (2005-11-08)|
|Re: LALR(1) differences to LR(1) email@example.com (SLK Parsers) (2005-11-12)|
|Date:||8 Nov 2005 23:35:52 -0500|
|Posted-Date:||08 Nov 2005 23:35:52 EST|
> Also, what is
> considered a follow set in contrast with a lookahead set?
From my very limited understanding, the follow set is the set of
tokens that may follow a given production step (that is, an "Item", in
LR terms), while the lookahead set is the set of tokens that is used
by a parser to decide which alternative production to take at a given
point in parsing time.
The lookahead set is built in terms of the follow set of the Item being
evaluated, but may (contrary to follow sets, it seems to me) include
the follow sets of additional items, according to the level of
In other words, one token of lookahead would require the parser to
consider just the immediate follow set of the Item being parsed. Two
tokens of lookahead would require the parser to consider also the
follow sets of all the items that contributed to the current follow
set, and so on.
Return to the
Search the comp.compilers archives again.