
August 12th, 2006, 11:09 AM
|
|
Contributing User
|
|
Join Date: Oct 2004
Posts: 268
Time spent in forums: 3 Days 12 h 59 m 13 sec
Reputation Power: 4
|
|
|
Choosing lr 1 lookahead
I didnt know where to put this q.
Its a compiler design question about constructing lr 1 itemsets from a grammar.
I have an lr1 itemset example here and I dont understand it.
I cant understand how the lookaheads are got in the lr 1 example. (lookaheads are after the ',')
I2: S -> C.C , $
C ->.cC ,$
C ->.d ,$
why are all lookaheads end of inputs?
Theres a C after the dot in S so why isnt the lookahead
cd?
|