skvadrik/re2c
Lexer generator for C, C++, D, Go, Haskell, Java, JS, OCaml, Python, Rust, Swift, V and Zig. observed · 2026-08-28
Health v2 · maintenance only
87/100
- Activity 99
- Release rhythm 65
- Longevity 100
Flags: no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 65
- age_days: 4622
- days_rel: 159
- days_push: 7
- n_releases_24m: 10
Adoption not part of the score
1308 stars · 201 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
re2c is a free and open-source lexer generator that compiles regular expressions into fast, direct-coded lexers for many languages including C/C++, Go, Rust, Python, and Java. It embeds generated finite state automata directly as conditional jumps and comparisons, producing code that is as fast as hand-written lexers and easier to debug than table-driven alternatives.
Use cases
- generate a fast tokenizer for a C or C++ compiler
- generate lexer code in Go or Rust from regular expressions
- replace a slow table-driven lexer with direct-coded automata
- build a custom DSL parser with submatch extraction
- embed a lexer inside existing source code without a fixed program template
- generate Unicode-aware lexers with UTF-8/UTF-16/UTF-32 support
When to choose
- you need maximum lexer performance comparable to hand-coded tokenizers
- you want generated lexer code that is readable and debuggable
- you need lexers in one of many supported target languages
- you need flexible integration of lexing into arbitrary code rather than a fixed template
- you need submatch extraction with minimal overhead
When to avoid
- you want a full parser generator (use yacc/bison/ANTLR alongside)
- you prefer table-driven lexer generation like flex
- you need a runtime regex engine rather than compile-time code generation
- your target language is not supported and you cannot write a syntax file
Facets
cli-tool · maturity stable
parser compiler developer-tools parsers programming-languages developer-tools compilers windows cross-platform cli lexer-generator regular-expressions code-generation dfa tokenizer multi-language linux macos
5 sources
- readme: https://github.com/skvadrik/re2c · fetched 2026-08-28 · 309c5145d4eb
- homepage: https://re2c.org · fetched 2026-08-29 · 9a51458d3689
- site_page: https://re2c.org/build/build.html · fetched 2026-08-29 · 39763de1577f
- site_page: https://re2c.org/releases/release_notes.html · fetched 2026-08-29 · ef137703072c
- site_page: https://re2c.org/releases/changelog/changelog.html · fetched 2026-08-29 · 88c858b2c924
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| skvadrik/re2c | main | 87 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem