adplus-dvertising
frame-decoration

Question

Assume that the SLR parser for a grammar G has n1 states and the LALR parser for G has n2 states.

a.

n1 is necessarily less than n2

b.

n1 is necessarily equal to n2

c.

n1 is necessarily greater than n2

d.

None of the mentioned

Answer: (b).n1 is necessarily equal to n2

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Assume that the SLR parser for a grammar G has n1 states and the LALR parser for G has n2 states.