[antlr-interest] Using range operator (INT .. INT)

Bart Kiers bkiers at gmail.com
Sun Nov 13 03:27:38 PST 2011


On Sun, Nov 13, 2011 at 10:31 AM, Jiwon Seo <seojiwon at gmail.com> wrote:

> I'm trying to add range operator in my language, and I'm having a
> problem with it.
>
> The range operator is defined as following:
>
> range: INT '..' INT ;
>
> where INT is '0'..'9'+
>
> I do have FLOAT, but it is defined such that it does not have conflict
> with the range operator:


Hi Jiwon,

See these documents:
http://www.antlr.org/wiki/pages/viewpage.action?pageId=3604497
http://www.antlr.org/wiki/display/ANTLR3/Lexer+grammar+for+floating+point,+dot,+range,+time+specs

Regards,

Bart.


More information about the antlr-interest mailing list