# Get grammar from his LALR(1) parsing table

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?

Thanks :)

• I don't believe you can, in general. – orlp Jan 8 at 10:22
• I agree with you, but this was an exercise from an exam of Formal Languages and Compilers of my university... – Daniel Dissegna Jan 8 at 10:25
• – rici Jan 8 at 15:13
• Technically, you could prove equivalence without a constructive proof but the constructive proof is available. – rici Jan 8 at 15:15
• @rici The OP asks for the production rules of grammar $G$, not an arbitrary one of the language it generates. – orlp Jan 8 at 18:52