re2c
« Back to VersTracker
Description:
Generate C-based recognizers from regular expressions
Type: Formula  |  Latest Version: 4.3.1@0  |  Tracked Since: Dec 1, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: regex lexer parser code-generation c++ compiler
Install: brew install re2c
About:
re2c is a powerful command-line tool that generates C/C++ source code from regular expressions defined within comments. It enables developers to write highly efficient lexical analyzers by embedding regex directly into their code, which are then compiled into optimized state machines. This approach significantly improves performance compared to traditional regex libraries while maintaining code readability.
Key Features:
  • Generates highly optimized C/C++ code from regular expressions
  • Zero runtime overhead with direct code generation
  • Supports both C and C++ output with flexible syntax
  • Advanced features like reusable lexers and custom encodings
Use Cases:
  • Building high-performance lexical analyzers and parsers
  • Optimizing pattern matching in compilers and interpreters
  • Creating fast tokenizers for data processing applications
Alternatives:
  • flex – Generates C lexers but uses different syntax and runtime approach
  • lex – Traditional Unix lexer generator, less optimized for modern C++
Version History
Detected Version Rev Change Commit
Dec 20, 2025 11:10pm 4.3.1 0 VERSION_BUMP 59027e6c
Dec 1, 2025 11:26pm 0 VERSION_BUMP 11104543
Sep 11, 2025 2:36am 0 VERSION_BUMP c824dc60
Dec 11, 2024 6:24pm 0 VERSION_BUMP 4a387f00
Dec 11, 2024 5:21pm 0 VERSION_BUMP 22a6605d