[ragel-users] 0x0E..0xFF produces "lower end of range is greater then upper end"
Iñaki Baz Castillo
ibc at aliax.net
Fri Oct 25 15:39:01 UTC 2013
2013/10/21 Jan Kundrát <jkt at flaska.net>:
> On Monday, 21 October 2013 17:17:57 CEST, Iñaki Baz Castillo wrote:
>>
>> The following modification in the grammar fixes it:
>>
>> ( 0x01..0x09 | 0x0B..0x0C | 0x0E..0x7F | 0x80..0xFF)+;
>>
>> but I don't understand wht it is required to split the last range into
>> two ranges.
>
>
> Seems like ragel treats this as a signed char, i.e. -128..127. Your code
> appears to be a nice and portable workaround.
I've realized that setting:
alphtype unsigned char;
or
alphtype unsigned int;
also fixes the problem. Section 5.2 of the doc says that "The default
is char for all languages except Go where the default is byte" so it
makes sense.
Thanks a lot.
--
Iñaki Baz Castillo
<ibc at aliax.net>
_______________________________________________
ragel-users mailing list
ragel-users at complang.org
http://www.complang.org/mailman/listinfo/ragel-users
More information about the ragel-users
mailing list