[antlr-interest] Modify java source code with ANTLR

Jim Idle jimi at temporal-wave.com
Mon Oct 22 08:49:12 PDT 2007


Do wish to actually comment them out, or just override them with methods
that do nothing, or something else of your choosing? Depending on how deep
you want to go into it, you may be able to just inherit from the lexer or
parser classes and implement your own methods? Of course the source code is
yours to do as you will with it, including make derivates as say Loring has
done, so if inheriting and overriding is not practical for you, then you
could just comment the code out and recompile, as you suggest :-)

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Friedhelm Hellerhoff
> Sent: Monday, October 22, 2007 2:38 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Modify java source code with ANTLR
> 
> What is the best way to modify some only specific
> methods in a java source code file using ANTLR?
> 
> I have already downloaded and compiled the Java 1.5
> grammar for v3. I can run the lexer and parser code
> successfully.
> I want to comment out a hand full of methods (with
> specific names that I know) in different java files.
> 
> Thanks for any answer!
> 
> 
> 
>       Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies
> und viel mehr bietet das neue Yahoo! Mail - www.yahoo.de/mail
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.488 / Virus Database: 269.15.5/1084 - Release Date:
> 10/21/2007 3:09 PM
> 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.15.5/1084 - Release Date: 10/21/2007
3:09 PM
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20071022/c0bc10dd/attachment.html 


More information about the antlr-interest mailing list