mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-10-28 21:37:56 +01:00
lex: split posix, bsd and linux (#10001)
This commit is contained in:
parent
90499b3bf2
commit
07bec36551
3 changed files with 36 additions and 2 deletions
|
@ -10,8 +10,8 @@
|
|||
|
||||
- Specify the output file:
|
||||
|
||||
`lex {{analyzer.l}} --outfile {{analyzer.c}}`
|
||||
`lex -t {{analyzer.l}} > {{analyzer.c}}`
|
||||
|
||||
- Compile a C file generated by Lex:
|
||||
|
||||
`cc {{path/to/lex.yy.c}} --output {{executable}}`
|
||||
`c99 {{path/to/lex.yy.c}} -o {{executable}}`
|
||||
|
|
17
pages/linux/lex.md
Normal file
17
pages/linux/lex.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# 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 {{analyzer.l}} --outfile {{analyzer.c}}`
|
||||
|
||||
- Compile a C file generated by Lex:
|
||||
|
||||
`cc {{path/to/lex.yy.c}} --output {{executable}}`
|
17
pages/osx/lex.md
Normal file
17
pages/osx/lex.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# lex
|
||||
|
||||
> Lexical analyzer generator.
|
||||
> Given the specification for a lexical analyzer, generates C code implementing it.
|
||||
> More information: <https://keith.github.io/xcode-man-pages/lex.1.html>.
|
||||
|
||||
- Generate an analyzer from a Lex file:
|
||||
|
||||
`lex {{analyzer.l}}`
|
||||
|
||||
- Specify the output file:
|
||||
|
||||
`lex {{analyzer.l}} --outfile {{analyzer.c}}`
|
||||
|
||||
- Compile a C file generated by Lex:
|
||||
|
||||
`cc {{path/to/lex.yy.c}} --output {{executable}}`
|
Loading…
Reference in a new issue