Release of re2c lexer generator 3.0

Re2c 3.0, a free lexical analyzer generator for C, C++, Go, and the Rust language added in this release, has been released. To support Rust, I had to use a different code generation model, where the state machine is represented as a loop and a state variable, and not as labels and transitions (since Rust does not have a goto, unlike C, C++ and Go).

Re2c specializes in generating fast and easily embeddable lexers. It differs from the more well-known counterpart flex in its flexible interface, generation of optimized non-table lexers, and support for captures (submatch extraction) based on tagged deterministic finite automata (TDFA). Re2c is used in projects where lexer speed is important, such as Ninja and PHP. The project website has a selection of examples that are now ported to Rust as well.

Source: opennet.ru

Add a comment