Asunto: RE: [antlr-interest] Newbie - rule help

mzukowski at yci.com mzukowski at yci.com
Mon Jul 21 14:09:22 PDT 2003


#modifiers is the AST being build for that rule.  ## is the same thing.  So
the first #modifiers is assigning the result of the tree construction.  The
second is making the #modifiers a child of the node MODIFIERS.

Monty

-----Original Message-----
From: nico123 at adinet.com.uy [mailto:nico123 at adinet.com.uy] 
Sent: Monday, July 21, 2003 12:48 PM
To: antlr-interest at yahoogroups.com
Subject: Asunto: RE: [antlr-interest] Newbie - rule help


Ok, but what exactly means
I know this #([MODIFIERS, "MODIFIERS"] means create a node, of type
MODIFIERS and text "MODIFIERS".

But what is the last #modifiers for ?
And the first one: #modifiers =

regards,


>-- Mensaje original --
>To: antlr-interest at yahoogroups.com
>From: mzukowski at yci.com
>Date: Mon, 21 Jul 2003 08:33:00 -0700
>Subject: RE: [antlr-interest] Newbie - rule help
>Reply-To: antlr-interest at yahoogroups.com
>
>
>They are both the same, one is just shorthand for the other.
>
>Monty
>
>-----Original Message-----
>From: Nico [mailto:nico123 at adinet.com.uy]
>Sent: Sunday, July 20, 2003 10:44 AM
>To: antlr-interest at yahoogroups.com
>Subject: [antlr-interest] Newbie - rule help
>
>
>Hi all. I don't have this rule very clear.
>Can anyone help me telling in detail what the code in braces does?
>
>modifiers
> : ( modifier )*
>  {#modifiers = #([MODIFIERS, "MODIFIERS"], #modifiers);}
> ;
>
>I have confusion because I have also found same rule like this
>
>modifiers
> : ( modifier )*
>  {#modifiers = #(#[MODIFIERS, "MODIFIERS"], #modifiers);}
> ;
>
>With an extra # before  [MODIFIERS
>
>regards
>
>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
> 
>
>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/ 


 

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




More information about the antlr-interest mailing list