Hi, Ming
 
> I would expect the myaction would be run when the machine consumes
> the first chunk and waiting for the rest of the data to complete the
> matching.
 
AFAIK machine itself does not distinguish chunks
EOF action should be executed in the very end of the last chunk, which you should explicitly
mark yourself by setting
const char* eof = pe
23.01.2012, 22:19, "Ming Fu" <[email protected]>:

Hi,

I am new to the ragel, I was trying to see the effect of eof action.

I made up some patterns and defines an eof action for the pattern3.

something like:

pattern1 = ....
pattern2 = ....
pattern3 = ( pattern1 | pattern2) $eof myaction ;

I send in a block of data that would match pattern1, the machine report
matching pattern3 and the myaction is not run.

If I send in the same block of data, but in two chunks, the machine
report matching after the second chunk is processed, but myaction is not
run. I would expect the myaction would be run when the machine consumes
the first chunk and waiting for the rest of the data to complete the
matching.

Regards,
Ming

All the information contained in this e-mail and its attachments is confidential.
Please consider the environment before printing this e-mail


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

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

Reply via email to