0
$\begingroup$

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 :)

$\endgroup$
  • $\begingroup$ I don't believe you can, in general. $\endgroup$ – orlp Jan 8 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$ – Daniel Dissegna Jan 8 at 10:25
  • $\begingroup$ @orlp: cs.stackexchange.com/questions/51658/how-to-convert-pda-to-cfg $\endgroup$ – rici Jan 8 at 15:13
  • $\begingroup$ Technically, you could prove equivalence without a constructive proof but the constructive proof is available. $\endgroup$ – rici Jan 8 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 Jan 8 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.