mirror of https://github.com/CrimsonTome/tldr.git
18 lines
386 B
Markdown
18 lines
386 B
Markdown
# lex
|
|
|
|
> Lexical analyzer generator.
|
|
> Given the specification for a lexical analyzer, generates C code implementing it.
|
|
> More information: <https://manned.org/lex.1>.
|
|
|
|
- Generate an analyzer from a Lex file:
|
|
|
|
`lex {{analyzer.l}}`
|
|
|
|
- Specify the output file:
|
|
|
|
`lex -t {{analyzer.l}} > {{analyzer.c}}`
|
|
|
|
- Compile a C file generated by Lex:
|
|
|
|
`c99 {{path/to/lex.yy.c}} -o {{executable}}`
|