[antlr-interest] Java AST Grammar

Andy Tripp antlr at jazillian.com
Fri Feb 15 10:11:45 PST 2008


Adam,
You might want to just stick with ANTLR2 for building a Java AST.
See this: 
http://www.antlr.org/pipermail/antlr-interest/2004-October/009742.html
for a comparison of two existing ANTLR2 Java grammars.
Andy

Adam Cooney wrote:
> Thanks John, I'm going to look into using the AST grammar you've 
> provided. Hopefully it will be adequate enough even if it is still a 
> work in progress. Please, when you update it could you send me a copy 
> of the Grammar if that's at all possible.
>  
> @Peter Bulychev
> Thanks for showing me the Same project, I am also going to look into 
> the grammar they use and hopefully one of the two will do what I want. 
> I honestly dont have the time and also the knowledge to create my own 
> Java AST grammar at the moment. I believe I also share similar 
> requirements to you except that my language will just be Java files 
> (it's meant to also have PHP support but I have yet to find a PHP AST 
> grammar, or even an up to date PHP grammar). Sharing advice etc would 
> be quite good, but I cannot share the task because my project is for a 
> 3rd year university dissertation and thus, has to be done sololy. I am 
> allowed to use other peoples grammars though as the time frame I have 
> to attempt this is so small that if I had to make everything myself I 
> can't see it happening. The project itself seems to be much more 
> complicated than I or my lecturer most likely anticipated, but I'm 
> pretty sure general advice is allowed.
>  
> Thanks for the help so far guys, it is much appreciated.
> Adam
>
>
>     ------------------------------------------------------------------------
>     CC: john at jacelridge.com; antlr-interest at antlr.org
>     From: john at jacelridge.com
>     To: ad_cooney at hotmail.com
>     Subject: Re: [antlr-interest] Java AST Grammar
>     Date: Tue, 12 Feb 2008 17:41:05 -0500
>
>     I have been working on a Java grammar that produces an AST; and a
>     companion tree grammar that produces equivalent Java code from an
>     AST.  This is still a work-in-progress, but you're welcome to what
>     I have.
>
>     Please let me know if you run into any problems with this, as I'm
>     trying to make it work nicely.
>
>     Peace
>     - John
>
>
> ------------------------------------------------------------------------
> She said what? About who? Shameful celebrity quotes on Search Star! 
> <http://www.msnsearchstar.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080215/25e240cc/attachment.html 


More information about the antlr-interest mailing list