2 votes 2 votes $S\rightarrow aA|bAc|dc$ $A\rightarrow d$ Number of states in $CLR\left ( 1 \right )$ parser construction _______________ Is $S\rightarrow d.c|$$ $A\rightarrow d.,a$ will be in $1$ state or in $2$ different states?? Compiler Design compiler-design made-easy-test-series + – srestha asked May 15, 2019 srestha 1.9k views answer comment Share Follow See all 45 Comments See all 45 45 Comments reply Show 42 previous comments Mk Utkarsh commented May 17, 2019 reply Follow Share your basics are not clear lookaheads don't merge You should read from page 260 0 votes 0 votes srestha commented May 17, 2019 reply Follow Share that line is correct coz that production is not added in that state @Mk Utkarsh yes, because it shouldnot add that state Check the rule lookahead1 is lookahead to that $A$ in red color ${\color{Red} A}\rightarrow a.A,a|b$ And that $A$ comes from prev. state And in prev state we got $A\rightarrow .aA$ which again has no follow set So, go to prev production again, i.e. $S\rightarrow .AA$ And from here we got value of $Follow\left ( A \right )=\left \{ a,b \right \}$ Ok?? 0 votes 0 votes srestha commented May 17, 2019 reply Follow Share your basics are not clear I just looking for a shortcut : | check the 3rd for loop for(each terminal $b$ in $first\left ( \beta a \right )$) What is $a$ here?? 0 votes 0 votes Please log in or register to add a comment.