What you're seeing is a limitation of conditions and large alphabets. To implement conditions Ragel eats up characters in the alphabet space. It does so quite aggressively (actually eats up bits). The int alphabet type doesn't have much space to begin with. The standard remedy is to use a smaller alphabet type.

What I need to do is to convert Ragel to internally use variable-size alphabet types so this limit is hit less, but that's further down the road for Ragel at this time.

-Adrian

On 10-08-11 05:20 PM, Colin Curtin wrote:
Howdy, I'm trying my hand at a Ragel machine to parse the Gearman
protocol found here: http://gearman.org/index.php?id=protocol

Here's what I have so far: http://gist.github.com/520065

I'm not sure why, but it's telling me:

$ ragel -R -s gearman.rl
lexer.rl:117:3: sorry, no more characters are available in the alphabet space
lexer.rl:117:3:   for conditions, please use a smaller alphtype or reduce
lexer.rl:117:3:   the span of characters on which conditions are embedded

It seems to be the line "  data        = (any when test_size)*;"

But I'm just going off of the Ragel guide, section 6.5. Is that "when"
syntax not supported? How can I guarantee the length and data's length
are the same?

Thanks!
Colin



_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to