[antlr-interest] Added ranges, escapes to [a-z] notation in lexer to honey badger

Terence Parr parrt at cs.usfca.edu
Sun Jan 22 14:51:32 PST 2012


On Jan 22, 2012, at 12:38 PM, Gavin Lambert wrote:

> At 09:04 23/01/2012, Terence Parr wrote:
>> Hi. grab another update. augmented […] in lexer:
>> a-z is the inclusive range
> [...]
>>   Inverted ranges give nothing
> 
> Why's that?  I would have thought that this:
>   ~[a-c]
> ought to be the same as this:
>   ~('a'|'b'|'c')
> …?

 whoops. Sorry. I meant that [z-a] gives nothing.

~[a-c] should give the right thing :)

Ter


More information about the antlr-interest mailing list