[ragel-users] How to convert [#x2070-#x218F] to Ragel grammar?

Iñaki Baz Castillo ibc at aliax.net
Sat Nov 21 02:13:20 UTC 2009

El Viernes, 20 de Noviembre de 2009, Григорий Фучеджи escribió:
> I think this would work
> (0x20 0x70..0xFF) | (0x21 0x00..0x8F)
> But I think there should be better solution

Finally I've understood that this conversion is not valid:
  #x2070-#x218F  !=   (0x20 0x70..0xFF) | (0x21 0x00..0x8F)

The former grammar are Unicode character representation in hexadecimal code 
point. It represents the symbol ⁰ and in hex UTF-8 bytes it would be "0xE2 
0x81 0xB0".

A conversor utility:


Of course it would be great if Ragel wouud provide Unicode hex code point 
grammar in the .rl files so I could do:


instead of having to convert it to lots of hexadecimal bytes ranges.


Iñaki Baz Castillo <ibc at aliax.net>

More information about the ragel-users mailing list