# How to get 2-LOOKAHEAD results in this grammar?

G:
S -> bRS | RcSa | @(epsilon)
R -> acR | b

....

2-LOOKAHEAD(S->@) = {$,a,aa} 2-LOOKAHEAD(R->b) = {b,ba,bb,bc}  I don't understand a result of these rules.. ----+ when I tried to solve 2-LOOKAHEAD(S->bRS), it solve easily.( {ba,bb} ). but I don't understand why 2-LOOKAHEAD(S->@) results are {$,a,aa} and

2-LOOKAHEAD(R->b) are {b,ba,bb,bc}. Please explain how to get these results.

• Possible duplicate of How to get LL Parser 2-LOOKAHEAD results in this grammar? Dec 8 '15 at 17:50
• I'll repeat the feedback I gave on the earlier copy of this question: "Please edit the question to clarify (a) ... (b) what you have tried or what research you have done (have you looked in standard textbooks?). See cs.stackexchange.com/help/how-to-ask.". Also, please don't delete a question and re-post the same exact question.
– D.W.
Dec 8 '15 at 18:19