Fork me on GitHub
#adventofcode
<
2018-01-19
>
bhauman14:01:20

I recently wrote a regexp to tokeninze clojure code it runs in under a single millis to parse a large amount of text. Regexps are freaking fast.

borkdude15:01:52

@bhauman yes, that’s what my handwritten parser does (well in multiple steps, but it could be optimized into a single regex maybe). It’s by far the fastest.

borkdude15:01:30

but regexes only go so far, context free grammars are more powerful (nested parens for example), so sometimes it’s very convenient to use something like Instaparse