I don't think if any tool exists to do it automatically. But the generator adds the grammar also as comments into the generated lexer/parser. You can manually go through it and recover the grammar.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Hoang Phung Sent: Friday, September 25, 2009 1:47 PM To: [email protected] Subject: [antlr-interest] Recover grammar file from generated code? Hi all, In my project, I inherited the code (Parser and Lexer) generated with ANTLR by someone else but I couldn't retrieve the original grammar file from him. Can someone tell me if there is a way to recover the grammar file from the generated code and embedded comments? Thanks in advance. Cheers, Hoang -- Dr. M. Hoang Phung School of Computing and Communications Faculty of Engineering and IT, University of Technology, Sydney (UTS) Room: B10.4.347 Phone: +61 2 9514 4502 Fax: +61 2 9514 4492 List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
