[antlr-interest] Priority in interpreting input

Bart Kiers bkiers at gmail.com
Tue Oct 23 04:31:05 PDT 2012


On Tue, Oct 23, 2012 at 1:10 PM, Peter Götz <peter.goetz at gutefrage.net>wrote:

> ... How do I tell ANTLR that a literal-recognition has precedence over a
> recognized metric?
>
>
Define LITERAL _before_ METRIC:

    LITERAL : '0'..'9';
    METRIC : (Letter|Digit|Separator)+;

Regards,

Bart.


More information about the antlr-interest mailing list