[ragel-users] How to convert [#x2070-#x218F] to Ragel grammar?
Iñaki Baz Castillo
ibc at aliax.net
Fri Nov 20 18:39:36 UTC 2009
Hi, I'm creating a parsing for XML Xpath but in the grammar specs I find:
http://www.w3.org/TR/REC-xml/#NT-NameStartChar
NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] |
[#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] |
[#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
[#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] |
[#x10000-#xEFFFF]
http://www.w3.org/TR/REC-xml/#NT-NameChar
NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 |
[#x0300-#x036F] | [#x203F-#x2040]
I've no idea of how to convert them to Ragel grammar. Of course the following
conversion is wrong:
[#x2070-#x218F] => 0x2070..0x218F
as Ragel complains "literal 0x2C00 overflows the alphabet type".
Any help please? Thanks a lot.
--
Iñaki Baz Castillo <ibc at aliax.net>
More information about the ragel-users
mailing list