πŸ”—re2c β€” Regular Expressions to Code is a lexer generator that supports C/C++, D, golang, haskell, java, javascript, ocaml, python, rust, V, ziglang, and can be extended to other languages by implementing a single syntax file. The primary focus of re2c is on generating fast code: it compiles regular expressions to deterministic finite automata and translates them into direct-coded lexers in the target language (such lexers are generally faster and easier to debug than their table-driven analogues). Secondary re2c focus is on flexibility: it does not assume a fixed program template; instead, it allows the user to embed lexers anywhere in the source code and configure them to avoid unnecessary buffering and bounds checks. Internal algorithm used by re2c is based on a special kind of deterministic finite automata: lookahead TDFA. These automata are as fast as ordinary DFA, but they are also capable of performing submatch extraction with minimal overhead. re2c is used in other open-source projects, such as php, ninja, yasm, spamassassin, BRL-CAD, wake, etc.