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