[ragel-users] semantic conditions and alphtype
thurston at complang.org
Sun Jun 26 17:54:17 UTC 2011
Fixing the condition implementation is the focus of 7.0. Conditions will
have a representation in the data structures of the transition list. We
won't rely rely on expansion to larger values in the alphabet space.
On 11-06-26 06:22 AM, Iain Nicol wrote:
> At the moment, if you're on a 32-bit machine and have alphtype signed or
> unsigned int, you cannot use semantic conditions. The longs Ragel
> store the characters in have no free space.
> IMHO this is unfortunate. Suppose you want (basic) Unicode support. It
> is tempting to use unsigned int as the alphtype, and feed Ragel Unicode
> code points (equivalently, UCS-4 encoded data). No more than 21 bits are
> needed to do this, but Ragel has no way of knowing that the alphabet
> doesn't cover the whole range of the unsigned int.
> I realise there's contrib/Unicode2Ragel which has support for UTF-8, but
> (again IMO) it's nice to deal with encoding completely separately from
> Ragel, and hence give Ragel the abstract code points.
> Would either of the following be reasonable?
> * have some way to give Ragel a more specific alphabet range. (Would
> this be an extra parameter to alphtype, or would it replace the
> existing parameters to alphtype?)
> * allow Ragel to (conditionally?) use long longs internally.
Dr. Adrian D. Thurston
ragel-users mailing list
ragel-users at complang.org
More information about the ragel-users