lex Command Examples

Lexical analyzer generator. Given the specification for a lexical analyzer, generates C code implementing it. Note: on most major OSes, this command is an alias for flex. More information: https://manned.org/lex.1.

lex {{analyzer.l}}

lex -t {{analyzer.l}} > {{analyzer.c}}

c99 {{path/to/lex.yy.c}} -o {{executable}}