4 ms·
I don't know about "state of the art", but they are tried and true for lexing and parsing respectively. If you are looking for something more exotic or a very
by yarou 11y ago
I don't know about "state of the art", but they are tried and true for lexing and parsing respectively.
If you are looking for something more exotic or a very specific use-case, I'd say use something like Ragel[0].
[0]http://www.colm.net/open-source/ragel/ http://www.colm.net/open-source/ragel/
- nly 11y agoRagel is great for replacing regex validation code ("Does this string look like a IP address, email address, or date?"), or for writing a lexer, but if you need to actually parse something (i.e. extract even a moderate amount of structured data) then you need something else. It has a particularly sublime output mode for generating Graphviz dot files however.