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.
_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to