Lookahead in parsers

Consider the following statements:
S1: Whenever we apply transition on any symbol the lookahead does not change
S2: The lookahead has effect on items of the form
[A → α. β, a] where β ≠ ∈ and [A → α., a]
Which of the above statements are true wrt LR(1) items?

Shraddha @shraddhagami
6 Feb 2017 10:23 am

Both are true


Lovely @cse23
6 Feb 2017 12:12 pm

how b is true

Shraddha @shraddhagami
6 Feb 2017 12:21 pm

If beta is non-terminal then we have to define closure of beta

So to determine lookaheads of new production it is useful.

So, look ahead has effects on items....