1FLEX(1) User Commands FLEX(1)
2
3
4
6 flex - the fast lexical analyser generator
7
9 flex [OPTIONS] [FILE]...
10
12 Generates programs that perform pattern-matching on text.
13
14 Table Compression:
15 -Ca, --align
16 trade off larger tables for better memory alignment
17
18 -Ce, --ecs
19 construct equivalence classes
20
21 -Cf do not compress tables; use -f representation
22
23 -CF do not compress tables; use -F representation
24
25 -Cm, --meta-ecs
26 construct meta-equivalence classes
27
28 -Cr, --read
29 use read() instead of stdio for scanner input
30
31 -f, --full
32 generate fast, large scanner. Same as -Cfr
33
34 -F, --fast
35 use alternate table representation. Same as -CFr
36
37 -Cem default compression (same as --ecs --meta-ecs)
38
39 Debugging:
40 -d, --debug
41 enable debug mode in scanner
42
43 -b, --backup
44 write backing-up information to lex.backup
45
46 -p, --perf-report
47 write performance report to stderr
48
49 -s, --nodefault
50 suppress default rule to ECHO unmatched text
51
52 -T, --trace
53 flex should run in trace mode
54
55 -w, --nowarn
56 do not generate warnings
57
58 -v, --verbose
59 write summary of scanner statistics to stdout
60
61 --hex use hexadecimal numbers instead of octal in debug outputs
62
64 -o, --outfile=FILE
65 specify output filename
66
67 -S, --skel=FILE
68 specify skeleton file
69
70 -t, --stdout
71 write scanner on stdout instead of lex.yy.c
72
73 --yyclass=NAME
74 name of C++ class
75
76 --header-file=FILE
77 create a C header file in addition to the scanner
78
79 --tables-file[=FILE] write tables to FILE
80
81 Scanner behavior:
82 -7, --7bit
83 generate 7-bit scanner
84
85 -8, --8bit
86 generate 8-bit scanner
87
88 -B, --batch
89 generate batch scanner (opposite of -I)
90
91 -i, --case-insensitive
92 ignore case in patterns
93
94 -l, --lex-compat
95 maximal compatibility with original lex
96
97 -X, --posix-compat
98 maximal compatibility with POSIX lex
99
100 -I, --interactive
101 generate interactive scanner (opposite of -B)
102
103 --yylineno
104 track line count in yylineno
105
106 Generated code:
107 -+, --c++
108 generate C++ scanner class
109
110 -Dmacro[=defn]
111 #define macro defn (default defn is '1')
112
113 -L, --noline
114 suppress #line directives in scanner
115
116 -P, --prefix=STRING
117 use STRING as prefix instead of "yy"
118
119 -R, --reentrant
120 generate a reentrant C scanner
121
122 --bison-bridge
123 scanner for bison pure parser.
124
125 --bison-locations
126 include yylloc support.
127
128 --stdinit
129 initialize yyin/yyout to stdin/stdout
130
131 --noansi-definitions old-style function definitions
132
133 --noansi-prototypes
134 empty parameter list in prototypes
135
136 --nounistd
137 do not include <unistd.h>
138
139 --noFUNCTION
140 do not generate a particular FUNCTION
141
142 Miscellaneous:
143 -c do-nothing POSIX option
144
145 -n do-nothing POSIX option
146
147 -?
148
149 -h, --help
150 produce this help message
151
152 -V, --version
153 report flex version
154
156 The full documentation for flex is maintained as a Texinfo manual. If
157 the info and flex programs are properly installed at your site, the
158 command
159
160 info flex
161
162 should give you access to the complete manual.
163
164
165
166flex 2.6.1 May 2019 FLEX(1)