[antlr-interest] ANTLRv3 AST-creating grammars for C and Java?

Andy Tripp antlr at jazillian.com
Thu Jan 8 14:11:55 PST 2009


I meant "an ANTLRv3 grammar that will produce a lexer/parser for lexing/parsing
the C programming language and produces an AST". i.e. I'm looking for
a C.g that has "output=AST" and lots of little "^" and/or "->" tokens ;)
Same for a java.g grammar. And C.tree.g and java.tree.g to go with them would
be a nice bonus.

My target language happens to be Java, but that doesn't matter.

Andy

Jack Pan wrote:
> If your parser grammar has no embedded code snippet, you can switch
> target language just by changing @options. ie. The parser grammar itself
> is language neutral.
> 
> 
> 
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org
> [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Andy Tripp
> Sent: Thursday, January 08, 2009 2:54 PM
> To: antlr-interest
> Subject: [antlr-interest] ANTLRv3 AST-creating grammars for C and Java?
> 
> Does anyone have a ANTLRv3 C grammar that creates an AST?
> How about a Java grammar that creates an AST?
> And if either of these exist, how about a treewalker grammar to go with
> it?
> 
> Thanks,
> Andy
> 
> 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