flex
« Back to VersTracker
Description:
Fast Lexical Analyzer, generates Scanners (tokenizers)
Type: Formula  |  Latest Version: 2.6.4@0  |  Tracked Since: Oct 15, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: lexer parser compiler code-generation scanning
Install: brew install flex
About:
Flex is a fast lexical analyzer generator that converts formal specifications of patterns into a C/C++ program for recognizing tokens in input text. It is widely used in compiler construction to build scanners that process source code, configuration files, and log data. Its main value proposition is high performance and seamless integration with parser generators like Yacc/Bison.
Key Features:
  • Generates highly efficient C/C++ scanners from pattern specifications
  • Supports start conditions and regular expression extensions for complex parsing
  • Seamless integration with Yacc/Bison and other parser generators
  • Cross-platform with extensive compatibility and mature community support
Use Cases:
  • Building lexical analyzers for custom programming languages
  • Parsing structured text formats like logs, configs, and data files
  • Tokenizing input for compilers and interpreters
Alternatives:
  • re2c – Generates C-based scanners from regular expressions; focuses on embedding regex directly in source code rather than separate spec files
  • ANTLR – Full parser generator with lexer and parser combined; supports multiple target languages but heavier than flex/bison workflow
Version History
Detected Version Rev Change Commit
Oct 15, 2025 5:02pm 2 VERSION_BUMP ea0f373d
Sep 14, 2025 6:33am 2 VERSION_BUMP 77b4d8df