[antlr-interest] Priority in interpreting input
Jim Idle
jimi at temporal-wave.com
Tue Oct 23 04:58:53 PDT 2012
That's not going to work when the tokens are ambiguous.
Also, look up fragment rules and go through all the examples in the
tar before trying your own.
Jim
On Oct 23, 2012, at 19:31, Bart Kiers <bkiers at gmail.com> wrote:
> 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.
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list