[ragel-users] Work On Binary datagrams

Adrian Thurston thurston at complang.org
Sat Dec 25 00:10:00 UTC 2010

I had a chance to have a little closer look. Do something like this.

Note theat the %when !check  syntax isn't documented yet. It's been 
around for a few years and works (I use it at work), I'm just not 
totally happy with the implementation.

action check {len--}

buffer =
     (any when check)*
     %when !check
     @{ printf("[%d]:%d\n", len, *p); };

close =
     @{ printf("end XRNDATA\n"); };

expr = open len buffer close;

ragel-users mailing list
ragel-users at complang.org

More information about the ragel-users mailing list