[ragel-users] Gearman Protocol

Adrian Thurston adrian.thurston at esentire.com
Fri Aug 13 23:01:38 UTC 2010

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.


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
ragel-users at complang.org

More information about the ragel-users mailing list