It looks like you have a VAL
instead of a NUM
.
The "1" is both a VAL
and a NUM
but since VAL
comes first, there will never be NUM
tokens since every NUM
will be a VAL
.
Try putting the NUM
rule before the VAL
rule.
You could have found out this by yourself by looking at the token types from the lexer. This will tell you the actual type of the token that is present.
@TheAntlrGuy: Maybe one could add the actual token type to the error message?