radhika
radhika

Reputation: 29

What is the real meaning of having multiple entries in the LL(1) parse table?

For the Grammar :

S->aABb
A->a/epsilon
B->b/epsilon 

This grammar is not LL(1) but this grammar is Unambiguous, so even after having multiple entries in the table, this grammar is Unambiguous. So, what is the intuitive meaning of having multiple entries in the table when the grammar is Unambiguous.

When the parser visits the column M[B, b], it has 2 choices B->b and B-> epsilon. This nature is not non-deterministic but this grammar is unambiguous in reality so how to resolve this conflict wherein although we are having multiple entries in the parsing table still the grammar is Unambiguous.

Upvotes: 1

Views: 1426

Answers (1)

sepp2k
sepp2k

Reputation: 370092

It means that the grammar is not LL(1) and you'll either need to use another parsing algorithm or rewrite the grammar to be LL(1) if possible (which in this case would just mean switching the b and the B in the S rule).

Upvotes: 2

Related Questions