[antlr-interest] manual AST creation
mzukowski at yci.com
mzukowski at yci.com
Tue Sep 16 08:55:44 PDT 2003
Actually, don't turn off tree construction for the whole rule and you will
get what you want. Just turn off tree constrcution for NEWLINE which I
assume you don't want.
start: b:(B)* NEWLINE!;
{#start = #([B,"start"],b);};
Monty
-----Original Message-----
From: Ben [mailto:ben at spectrum.uni-bielefeld.de]
Sent: Friday, September 12, 2003 3:48 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] manual AST creation
Hi,
I am totaly new to ANTLR, so forgive me, if I ask something stupid or
obvious...
Here is a part of a very simple grammar I use for testing
start!: b:(B)* NEWLINE;
{#start = #([B,"start"],b);};
I would like to construct a tree that looks like that
(start B B B B...). The action above does not work. I also tried to
substitute (B)* with another rule, but that does not work, too. I believe
that I am missing some basic understanding here. Can someone enlightmen me??
Thank you very much,
Ben
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list