[antlr-interest] Removing parse trees from antlr grammars.

Ymo ymo.mail at gmail.com
Thu Dec 25 08:28:56 PST 2008


Hi.

I discovered this tool ...
http://www.antlr.org/wiki/display/ANTLR3/Tool+showing+grammatical+structure+of+Java+code

This tool depends on the Antlrv3 grammar with all the tree construction code
striped.

1) is there a way i can automatically remove all the tree construction code
from any grammar? I don't know if the person that wrote the tool did this by
hand but i found it was very tedious.

2) Is there an API in the antlr source code for parsing and "visiting" antlr
grammars ? Where should i start in the source code if there is no such API ?

3) I saw few versions of the Java.g grammar. Which one is the "official" or
recommended one ?

First there is http://antlr.org/grammar/1152141644268/Java.g
And then http://antlr.org/grammar/1207932239307/Java1_5Grammars
and now there is the Java.g grammar at :
http://openjdk.java.net/projects/compiler-grammar/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081225/88ab0d1a/attachment.html 


More information about the antlr-interest mailing list