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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.