3 ms·
I've been using re2c lately and it's really great. It's this gem from the 90's that not a lot of people know about; I encountered it in the Ninja build system,
by chubot 11y ago
I've been using re2c lately and it's really great. It's this gem from the 90's that not a lot of people know about; I encountered it in the Ninja build system, where they were concerned about parsing megabytes of text very quickly.
It basically generates a bunch of gotos from readable regexes.
http://re2c.org/ http://re2c.org/
One thing I haven't explored is "push vs pull" scanners. It's basically the same thing as threads vs. async, so it could be really useful for async servers. Normal scanners will pull data in when needed, but if you pass -f, it can apparently have data pushed upon it.
I guess Ragel can be used easily like this since Mongrel is async (?)