[antlr-interest] Recover grammar file from generated code?

Indhu Bharathi indhu.b at s7software.com
Fri Sep 25 01:20:57 PDT 2009


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: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Hoang Phung
Sent: Friday, September 25, 2009 1:47 PM
To: antlr-interest at antlr.org
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



More information about the antlr-interest mailing list