[antlr-interest] ANTLRv3 AST-creating grammars for C and Java?
Jack Pan
Jack.Pan at Lewtan.com
Fri Jan 9 06:47:46 PST 2009
I didn't find one. The only thing close I found is a grammar file to
build JavaScript AST. I ended up combining C.g and that one to get my
grammar working.
-----Original Message-----
From: Andy Tripp [mailto:antlr at jazillian.com]
Sent: Thursday, January 08, 2009 5:12 PM
To: Jack Pan; antlr-interest
Subject: Re: [antlr-interest] ANTLRv3 AST-creating grammars for C and
Java?
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