Stevenson, Todd (GE Healthcare, consultant) wrote:
> 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.
>  
> ------------------------------------------------------------------------------------------------------------------------

>  
> DataPath
>  : CODE keypath
>  ;

The initial capital makes this a lexer rule

> keypath
>  : SEP CODE
>  | SEP DOMAIN
>  ;
>  


This is a parser rule.

Lexer rules can't refer to parser rules (obviously). You probably just 
want to make DataPath -> dataPath.

Sam

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to