[ragel-users] foreach character?

Adrian Thurston adrian.thurston at esentire.com
Thu Jun 11 14:41:35 UTC 2009


Like so:

a_packet = 'a:' Part1 ':' Part2 ':' Part3 '\r' ${crcUpdate(*p);};

-Adrian

Gordon Smith wrote:
> Hello -
> 
> I have a functioning machine, a portion of which is below.
>  
> %%{
>     a_packet = 'a:' Part1 ':' Part2 ':' Part3 '\r';
> 
>     main := ( a_packet | b_packet | c_packet )+;
> }%%
> 
> Out of curiosity, is there a way to easily examine every input character 
> in order to calculate a running CRC value for "a_packet", for example? 
> Perhaps something like an action prior to the p++ operation?
> 
> Thanks,
> Gordon
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users




More information about the ragel-users mailing list