- 主页 [re2c.org]
lexer generator for C, C++ and Go
re2c's main goal is generating fast lexers: at least as fast as their reasonably optimized hand-coded counterparts. Instead of using a traditional table-driven approach, re2c encodes the generated finite state automata directly in the form of conditional jumps and comparisons. The resulting programs are faster and often smaller than their table-driven analogues, and they are much easier to debug and understand. Quite a few optimizations are applied in order to speed up and compress the generated code.
Another distinctive feature is its flexible interface: instead of assuming a fixed program template, re2c lets the programmer write most of the interface code and adapt the generated lexer to any particular environment.
其他与 re2c 有关的软件包