[antlr-interest] Having trouble with creating a parser for my desired grammar. Running afoul of multiple alternatives warnings

Bart Kiers bkiers at gmail.com
Wed Nov 16 11:55:59 PST 2011


On Wed, Nov 16, 2011 at 8:45 PM, Jarrod Roberson <jarrod at vertigrated.com>wrote:

>
> > Or even the input: "123 /* some comments */ . /* more comments */ 5"
> would
> > be a valid `number`... :)
> >
>
> Is there a way to support both
>
> a -> 1.
> b -> 1.1.
>
> in a pure lexer rule then, I didn't think there was?
>
>
See my earlier reply: http://antlr.markmail.org/message/wtwq2vbmhedek2cn in
this thread.

"1." would become: INTEGER, DOT
"1.1." would become: FLOAT, DOT
"1 . 1" would become: INTEGER SPACE DOT SPACE INTEGER

Regards,

Bart.


More information about the antlr-interest mailing list