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}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.