Hello every one,
Recently I'm rewrite a packet parser for a private network protocol, so
I found re2c, which is able to generate a push scanner, which works with
non-blocking I/O work flow.
But one thing troubles me a lot, that is because of YYMAXFILL. As far
as I know, YYMAXFILL is define to the max length of keyword, so if the
available bytes is less then YYMAXFILL, it will stop current matching,
and do YYFILL to fetch more, it boosts the performance. However, I need
a scanner which do *always* scan till the end of the buffer, because I'm
applying it to a socket, more bytes are not always available.
Then I looked into the manual of re2c, it does not provides such
options to make the scanner behave as I want. So finally I grabbed the
source of re2c. And I find it seems not so hard to add such options.
But I'm not sure with my works, so I put the patch here, could anyone
here make a comment, or help me.