IDN '{' ( modelDefinition* | modelDefinitions ) '}'
And
System.out.println($IDN.text);
> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of serge fukanchik
> Sent: Wednesday, October 06, 2010 5:48 AM
> To: [email protected]
> Subject: [antlr-interest] Token is not generated for IDN blah... and
generated
> for blah... IDN
>
> Hi,
> my problem is value of the token IDN in the code below:
>
> when the definition is as wollows:
> simpleDictionaryDefinition
> : IDN '{' modelDefinition* | modelDefinitions '}'
> {
> System.out.println($IDN);
> }
> ;
>
> antlr generates the following java code:
> match(input,10,FOLLOW_10_in_simpleDictionaryDefinition238);
>
> System.out.println(IDN);
>
> then System.out.println obviously fails to compile.
>
> and when the definition is as follows:
> simpleDictionaryDefinition
> : '{' modelDefinition* | modelDefinitions '}' IDN
> {
> System.out.println("2 "+$IDN);
> }
> ;
>
> antl generates the following:
>
> IDN1=(Token)match(input,IDN,FOLLOW_IDN_in_simpleDictionaryDefinition2
> 36);
>
> System.out.println(IDN1);
>
> this compiles and works.
>
> My question is - is this by design or a bug? And how can i make it
generate
> token for me?
>
> Thank you in advance!
> ---
> Sergey
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.