This grammar will not compile. I can't figure out why not. It
generates the error:
reference to undefined rule: keypath
even though it exists. Help!
Thanks.
------------------------------------------------------------------------
------------------------------------------------
grammar cepath;
options {
output=AST;
ASTLabelType=CommonTree;
}
start
: cpath EOF
;
cpath
: KEY keypath
| DataPath
;
DataPath
: CODE keypath
;
keypath
: SEP CODE
| SEP DOMAIN
;
// $<lex
KEY : 'key';
CODE : 'code';
DOMAIN : 'domain';
SEP : '.';
WS : ( '\r' | '\n')+ {skip();};
// $>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address