3
$\begingroup$

I think they are because, SLR and LALR have same number of states and, since there are no conflicts in SLR table this means all the SLR information is needed and correctly used for parsing, so all that has to be in LALR.

$\endgroup$

1 Answer 1

1
$\begingroup$

The tables aren't the same. The effect is not visible on correct inputs but on erroneous one. The SLR tables may indicate that a reduce operation is in order and then detect that the input is erroneous after the reduction when the LALR one will directly indicates that the input is erroneous without doing any reduction. That may have an influence on automatic error message generation and error recovery which are using the state of the push-down automaton to do their work.

$\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.