[antlr-interest] question on simple grammar for tick format to
decimal conversion
Micheal J
open.zone at virgin.net
Wed Nov 30 17:29:08 PST 2005
> parse returns [decimal result]
> {result = -1.0;}
> : Number (MINUS DigitsA)? EOF
>
> Number: (DigitsA | DigitsB | DigitsC)+
> ;
>
> My lexer has the following literals
<SNIP>
> But antlr is complaining that "Lexical rule Number defined
> outside of lexer. Exiting due to errors"
>
> Can somebody explain what is wrong here ?
ANTLR parser rules cannot begin with an upper-case char. Trying changing
"Number" to "number".
Micheal
More information about the antlr-interest
mailing list