0
$\begingroup$

We are given the following grammar.

S-->AS/b

A-->SA/a

We have to tell if its LALR or not.

As we all know that LALR is only minimization of CLR, So first I constructed the CLR parsing table using canonical collection of LR(1) items.

In the table there was no conflict.But There is no minimization possible.Does that mean that the given grammar is LALR as there are no conflicts.

$\endgroup$

1 Answer 1

1
$\begingroup$

The grammar is always LALR, if no merging is possible and in this case LALR = CLR, but when merging is possible, we have to see that if conflicts come up and if they do come up, grammar is not LALR and if they don't,the grammar is LALR.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.