I have a problem with this exercise. This is the LALR(1) parsing table for the grammar G. How can i get the productions of G?

LALR(1) Parsing Table

Thanks :)

  • $\begingroup$ I don't believe you can, in general. $\endgroup$
    – orlp
    Commented Jan 8, 2019 at 10:22
  • $\begingroup$ I agree with you, but this was an exercise from an exam of Formal Languages and Compilers of my university... $\endgroup$ Commented Jan 8, 2019 at 10:25
  • $\begingroup$ @orlp: cs.stackexchange.com/questions/51658/how-to-convert-pda-to-cfg $\endgroup$
    – rici
    Commented Jan 8, 2019 at 15:13
  • $\begingroup$ Technically, you could prove equivalence without a constructive proof but the constructive proof is available. $\endgroup$
    – rici
    Commented Jan 8, 2019 at 15:15
  • $\begingroup$ @rici The OP asks for the production rules of grammar $G$, not an arbitrary one of the language it generates. $\endgroup$
    – orlp
    Commented Jan 8, 2019 at 18:52


Your Answer

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

Browse other questions tagged or ask your own question.