Usage: lex [OPTIONS] [FILE]...
Generates programs that perform pattern-matching on text.
Table Compression:
-Ca, --align trade off larger tables for better memory alignment
-Ce, --ecs construct equivalence classes
-Cf do not compress tables; use -f representation
-CF do not compress tables; use -F representation
-Cm, --meta-ecs construct meta-equivalence classes
-Cr, --read use read() instead of stdio for scanner input
-f, --full generate fast, large scanner. Same as -Cfr
-F, --fast use alternate table representation. Same as -CFr
-Cem default compression (same as --ecs --meta-ecs)
Debugging:
-d, --debug enable debug mode in scanner
-b, --backup write backing-up information to lex.backup
-p, --perf-report write performance report to stderr
-s, --nodefault suppress default rule to ECHO unmatched text
-T, --trace lex should run in trace mode
-w, --nowarn do not generate warnings
-v, --verbose write summary of scanner statistics to stdout
--hex use hexadecimal numbers instead of octal in debug outputs
Files:
-o, --outfile=FILE specify output filename
-S, --skel=FILE specify skeleton file
-t, --stdout write scanner on stdout instead of lex.yy.c
--yyclass=NAME name of C++ class
--header-file=FILE create a C header file in addition to the scanner
--tables-file[=FILE] write tables to FILE
Scanner behavior:
-7, --7bit generate 7-bit scanner
-8, --8bit generate 8-bit scanner
-B, --batch generate batch scanner (opposite of -I)
-i, --case-insensitive ignore case in patterns
-l, --lex-compat maximal compatibility with original lex
-X, --posix-compat maximal compatibility with POSIX lex
-I, --interactive generate interactive scanner (opposite of -B)
--yylineno track line count in yylineno
Generated code:
-+, --c++ generate C++ scanner class
-Dmacro[=defn] #define macro defn (default defn is '1')
-L, --noline suppress #line directives in scanner
-P, --prefix=STRING use STRING as prefix instead of "yy"
-R, --reentrant generate a reentrant C scanner
--bison-bridge scanner for bison pure parser.
--bison-locations include yylloc support.
--stdinit initialize yyin/yyout to stdin/stdout
--nounistd do not include <unistd.h>
--noFUNCTION do not generate a particular FUNCTION
Miscellaneous:
-c do-nothing POSIX option
-n do-nothing POSIX option
-?
-h, --help produce this help message
-V, --version report lex version
Options (44)
| Option | Description | Source |
|---|
-Ca, --align | trade off larger tables for better memory alignment | help |
-Ce, --ecs | construct equivalence classes | help |
-Cf | do not compress tables; | help |
-CF | do not compress tables; | help |
-Cm, --meta-ecs | construct meta-equivalence classes | help |
-Cr, --read | use read() instead of stdio for scanner input | help |
-f, --full | generate fast, large scanner. | help |
-F, --fast | use alternate table representation. | help |
-Cem | default compression (same as --ecs --meta-ecs) | help |
-d, --debug | enable debug mode in scanner | help |
-b, --backup | write backing-up information to lex.backup | help |
-p, --perf-report | write performance report to stderr | help |
-s, --nodefault | suppress default rule to ECHO unmatched text | help |
-T, --trace | lex should run in trace mode | help |
-w, --nowarn | do not generate warnings | help |
-v, --verbose | write summary of scanner statistics to stdout | help |
--hex | use hexadecimal numbers instead of octal in debug outputs | help |
-o, --outfile FILE | specify output filename | help |
-S, --skel FILE | specify skeleton file | help |
-t, --stdout | write scanner on stdout instead of lex.yy.c | help |
--yyclass NAME | name of C++ class | help |
--header-file FILE | create a C header file in addition to the scanner | help |
-7, --7bit | generate 7-bit scanner | help |
-8, --8bit | generate 8-bit scanner | help |
-B, --batch | generate batch scanner (opposite of -I) | help |
-i, --case-insensitive | ignore case in patterns | help |
-l, --lex-compat | maximal compatibility with original lex | help |
-X, --posix-compat | maximal compatibility with POSIX lex | help |
-I, --interactive | generate interactive scanner (opposite of -B) | help |
--yylineno | track line count in yylineno | help |
-Dmacro defn | #define macro defn (default defn is '1') | help |
-L | --noline suppress #line directives in scanner | help |
-P | --prefix=STRING use STRING as prefix instead of "yy" | help |
-R | --reentrant generate a reentrant C scanner | help |
--bison-bridge | scanner for bison pure parser. | help |
--bison-locations | include yylloc support. | help |
--stdinit | initialize yyin/yyout to stdin/stdout | help |
--nounistd | do not include <unistd.h> | help |
--noFUNCTION | do not generate a particular FUNCTION | help |
-c | do-nothing POSIX option | help |
-n | do-nothing POSIX option | help |
-? | | help |
-h, --help | produce this help message | help |
-V, --version | report lex version | help |
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.