re2c
lexer generator for C, C++, Go, Java, Python, Rust, and others
Rust efforts
The index has yet to document a Rust effort for this project. An independent effort may already exist.
Search public Rust repositories
Original source check. The packaged source tree includes 40 files with the .rs suffix. This covers the Debian 13 snapshot and excludes common vendor directories. Independent repositories are outside this count.
Project structure
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.
Inside the source tree
test/· 3,030 indexed filesexamples/· 508 indexed filessrc/· 120 indexed filesdoc/· 52 indexed filesbootstrap/· 46 indexed files
Source files by extension in this snapshot · C (1,389), C++ (100), Go (54), Python (43), Rust (40)
Selected components packaged from this source in Debian 13.
re2c· lexer generator for C, C++, Go, Java, Python, Rust, and others