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_simpleDictionaryDefinition236);
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
--
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.