Command-line tool
flex
brew/flex
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Fast Lexical Analyzer, generates Scanners (tokenizers)
At a glance
- Type
- Command-line tool
- Install on
- macOS
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
macOS
brew install flex
Generate an analyzer from a Lex file, storing it to the file `lex.yy.c`
flex analyzer.l
Write analyzer to `stdout`
flex -t analyzer.l
Specify the output file
flex analyzer.l -o analyzer.c
Related command-line tools
- jison-lex
lexical analyzer generator used by jison jison parser generator lexer flex tokenizer - quex
Generate lexical analyzers - jflex
Lexical analyzer generator for Java, written in Java - re-flex
Regex-centric, fast and flexible scanner generator for C++ - jison
A parser generator with Bison's API jison bison yacc parser generator lexer flex tokenizer compiler - odict
A blazingly-fast, offline-first format and toolchain for lexical data - pylyzer
Fast static code analyzer & language server for Python - logswan
Fast Web log analyzer using probabilistic data structures
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents