[antlr-interest] Tree structure

Bryan Ewbank ewbank at synopsys.com
Fri Oct 1 08:02:42 PDT 2004


I think the problem here is that the tree is not constructed (because of the
"!" following priVal).  Therefore, INT is
not recognized as "special" in the context of tree-building directives #(
... ).  Try removing the "!" after "priVal",
as well as prefixing "[INT ...]" with another "#", and it should work.

It is throwing away some information (the original priVal node is lost), but
this way it correctly builds the tree
components you need.

> -----Original Message-----
> From: Anakreon [mailto:anakreonmejdi at yahoo.gr]
> Sent: Thursday, September 30, 2004 16:48
> To: antlr-interest at yahoogroups.com
> Subject: Re: [antlr-interest] Tree structure
>
>
>
> > priVal! : INT
> >
> > {
> >
> > #priVal = #([INT,"-15"]);
> This is a problem I have faced many times.
> The workaround for this is:
> int intType = INT;
> #priVal = #([intType, "-15"]);
>
> If this behaver is a feature of Antlr, I wish it's removed.
> Anakreon
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list