I am studying LALR(1) parser and I have this question:
Consider the following Grammar
S - > V = E
E - > F | E+F
F - > V | int | (E)
V - > id
Construct the LALR(1) parsing table for this Grammar.
While generating the item-set DFA for this problem, I encountered a problem in the fifth set.
According to this website, http://jsmachines.sourceforge.net/machines/lalr1.html, the lookaheads for productions with F and V on the LHS have only \$ in the lookahead whereas I am getting $ and + in all. Could someone please explain which is correct?
jsmachines
site. Perhaps you entered your grammar incorrectly, or maybe you're misinterpreting its output. $\endgroup$