[ragel-users] How to convert [#x2070-#x218F] to Ragel grammar?
Iñaki Baz Castillo
ibc at aliax.net
Fri Nov 20 19:26:00 UTC 2009
El Viernes, 20 de Noviembre de 2009, Adrian Thurston escribió:
> If you wish to process a a byte at a time, this is what I would suggest.
>
> You may also want to do a first pass to convert to some multibyte
> encoding and then process that. In that case you set alphtype to
> something bigger than char.
If I understand correctly that option is not suitable for me as the 99% of the
grammar si "normal":
DIGIT = 0x30..0x39;
ALPHA = 0x41..0x5a | 0x61..0x7a;
att_name = QName;
att_value = AttValue;
attr_test = "@" att_name "=" att_value;
NameorAny = QName | "*";
position = ( DIGIT )+;
by_pos_attr = NameorAny "[" position "]" "[" attr_test "]";
by_attr = NameorAny "[" attr_test "]";
by_pos = NameorAny "[" position "]";
by_name = NameorAny;
attribute_selector = "@" att_name;
namespace_selector = "namespace::*";
and so on...
--
Iñaki Baz Castillo <ibc at aliax.net>
More information about the ragel-users
mailing list