[ragel-users] more or less solved -- Overfrequent/premature call of 'on-exit-transition' action

Bernie Pallek berniepallek at brytech.com
Mon Sep 14 20:30:23 UTC 2009


Adrian Thurston wrote:
> You could do it like this. You'll have to remember to decrement 
> dataRemaining by two bytes first.
>
> dataBlock =
>      0 Word16b @storeSamplesPerBlock
>      (Word16b @storeData when dataRemaining)*
>      (Word16b @storeData when !dataRemaining)
>      @processCompleteMessage;
>
> One problem with this is that it assumes you've got at least one 2-byte 
> sample in each block. Is that an acceptable assumption?
>   

Ah yes, that looks like a good trick. No worries about having a minimum 
of one sample; we'll make that a requirement of the protocol.

Cheers,

- bernie





More information about the ragel-users mailing list