[ragel-users] Searching a buffer
Smelly Pooh
plop at redbrick.dcu.ie
Mon Apr 20 21:45:22 UTC 2009
Hi,
What's the best way to search a buffer for a list of patterns using ragel?
I've tried:
search = A | B | C;
main := any* search;
which works ok but generates a lot of states.
I've also tried using a scanner like:
main := |*
A;
B;
C;
any;
*|;
which also works and generates much fewer states, but I'm not interested in
writing extra code to handle te, ts, eof etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20090420/03e278c4/attachment-0001.html>
More information about the ragel-users
mailing list