For example, "SERVICE" is a keyword in my grammar:
tokens
{
SERVICE = 'SERVICE';
OTHER_KEYWORD = 'OTHER_KEYWORD'
.
}
Therefore, I can't use SERVICE as a value to OTHER_KEYWORD, like this:
OTHER_KEYWORD=SERVICE
Based on this grammar rule:
keywordValuePair
: keyword=identifier EQUAL
keywordValue=identifier
-> ^(KEYWORD_VALUE_PAIR $keyword
$keywordValue)
In fact, I can't use *any* token in my grammar on the right side of the
equal sign above.
There are times when I want SERVICE, or any value in tokens {.}, to be
considered an IDENTIFIER, not a token:
identifier
: IDENTIFIER;
.
IDENTIFIER : ( 'A' .. 'Z' | 'a'..'z' | '_') ( 'A' .. 'Z' | 'a'..'z' | '0' ..
'9' | '_' | '.' )* ;
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.