1 This is flex.info, produced by makeinfo version 4.8 from flex.texi.
3 INFO-DIR-SECTION Programming
5 * flex: (flex). Fast lexical analyzer generator (lex replacement).
8 The flex manual is placed under the same licensing conditions as the
11 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 The Flex
14 Copyright (C) 1990, 1997 The Regents of the University of California.
17 This code is derived from software contributed to Berkeley by Vern
20 The United States Government has rights in this work pursuant to
21 contract no. DE-AC03-76SF00098 between the United States Department of
22 Energy and the University of California.
24 Redistribution and use in source and binary forms, with or without
25 modification, are permitted provided that the following conditions are
28 1. Redistributions of source code must retain the above copyright
29 notice, this list of conditions and the following disclaimer.
31 2. Redistributions in binary form must reproduce the above copyright
32 notice, this list of conditions and the following disclaimer in the
33 documentation and/or other materials provided with the
36 Neither the name of the University nor the names of its contributors
37 may be used to endorse or promote products derived from this software
38 without specific prior written permission.
40 THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
41 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
42 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
52 Node: Copyright
\x7f7690
53 Node: Reporting Bugs
\x7f9203
54 Node: Introduction
\x7f9508
55 Node: Simple Examples
\x7f10336
57 Node: Definitions Section
\x7f14060
58 Ref: Definitions Section-Footnote-1
\x7f16323
59 Node: Rules Section
\x7f16391
60 Node: User Code Section
\x7f17549
61 Node: Comments in the Input
\x7f17987
62 Node: Patterns
\x7f19355
63 Ref: case and character ranges
\x7f26186
64 Node: Matching
\x7f30201
65 Node: Actions
\x7f33487
66 Node: Generated Scanner
\x7f42466
67 Node: Start Conditions
\x7f47484
68 Node: Multiple Input Buffers
\x7f58043
69 Ref: Scanning Strings
\x7f64581
71 Node: Misc Macros
\x7f67799
72 Node: User Values
\x7f70653
74 Node: Scanner Options
\x7f73880
75 Node: Options for Specifying Filenames
\x7f76638
76 Ref: option-header
\x7f76864
77 Ref: option-outfile
\x7f77576
78 Ref: option-stdout
\x7f77901
79 Node: Options Affecting Scanner Behavior
\x7f78883
80 Ref: option-case-insensitive
\x7f79124
81 Ref: option-lex-compat
\x7f79557
82 Ref: option-batch
\x7f80089
83 Ref: option-interactive
\x7f80613
84 Ref: option-7bit
\x7f81967
85 Ref: option-8bit
\x7f83271
86 Ref: option-default
\x7f83683
87 Ref: option-always-interactive
\x7f83747
88 Ref: option-posix
\x7f84351
89 Ref: option-stack
\x7f85498
90 Ref: option-stdinit
\x7f85606
91 Ref: option-yylineno
\x7f86084
92 Ref: option-yywrap
\x7f86527
93 Node: Code-Level And API Options
\x7f86795
94 Ref: option-ansi-definitions
\x7f87022
95 Ref: option-ansi-prototypes
\x7f87274
96 Ref: option-bison-bridge
\x7f87521
97 Ref: option-bison-locations
\x7f87860
98 Ref: option-noline
\x7f88120
99 Ref: option-reentrant
\x7f88634
100 Ref: option-c++
\x7f89245
101 Ref: option-array
\x7f89371
102 Ref: option-pointer
\x7f89469
103 Ref: option-prefix
\x7f89597
104 Ref: option-main
\x7f91126
105 Ref: option-nounistd
\x7f91310
106 Ref: option-yyclass
\x7f91818
107 Node: Options for Scanner Speed and Size
\x7f92304
108 Ref: option-align
\x7f92853
109 Ref: option-ecs
\x7f93354
110 Ref: option-meta-ecs
\x7f94390
111 Ref: option-read
\x7f94877
112 Ref: option-full
\x7f96760
113 Ref: option-fast
\x7f96955
114 Node: Debugging Options
\x7f97881
115 Ref: option-backup
\x7f98068
116 Ref: option-debug
\x7f98613
117 Ref: option-perf-report
\x7f99336
118 Ref: option-nodefault
\x7f99962
119 Ref: option-trace
\x7f100280
120 Ref: option-nowarn
\x7f100571
121 Ref: option-verbose
\x7f100639
122 Ref: option-warn
\x7f101068
123 Node: Miscellaneous Options
\x7f101287
124 Node: Performance
\x7f101744
126 Node: Reentrant
\x7f119531
127 Node: Reentrant Uses
\x7f120208
128 Node: Reentrant Overview
\x7f121771
129 Node: Reentrant Example
\x7f122570
130 Node: Reentrant Detail
\x7f123345
131 Node: Specify Reentrant
\x7f123778
132 Node: Extra Reentrant Argument
\x7f124425
133 Node: Global Replacement
\x7f125677
134 Node: Init and Destroy Functions
\x7f126906
135 Node: Accessor Methods
\x7f129418
136 Node: Extra Data
\x7f130762
137 Node: About yyscan_t
\x7f133029
138 Node: Reentrant Functions
\x7f133425
139 Ref: bison-functions
\x7f134909
140 Node: Lex and Posix
\x7f135650
141 Node: Memory Management
\x7f143034
142 Ref: memory-management
\x7f143180
143 Node: The Default Memory Management
\x7f143408
144 Ref: The Default Memory Management-Footnote-1
\x7f147217
145 Node: Overriding The Default Memory Management
\x7f147370
146 Ref: Overriding The Default Memory Management-Footnote-1
\x7f149769
147 Node: A Note About yytext And Memory
\x7f149933
148 Node: Serialized Tables
\x7f151166
149 Ref: serialization
\x7f151310
150 Node: Creating Serialized Tables
\x7f152075
151 Node: Loading and Unloading Serialized Tables
\x7f153685
152 Node: Tables File Format
\x7f155453
153 Node: Diagnostics
\x7f162468
154 Node: Limitations
\x7f165879
155 Node: Bibliography
\x7f167828
157 Node: When was flex born?
\x7f172741
158 Node: How do I expand backslash-escape sequences in C-style quoted strings?
\x7f173118
159 Node: Why do flex scanners call fileno if it is not ANSI compatible?
\x7f174422
160 Node: Does flex support recursive pattern definitions?
\x7f175217
161 Node: How do I skip huge chunks of input (tens of megabytes) while using flex?
\x7f176064
162 Node: Flex is not matching my patterns in the same order that I defined them.
\x7f176531
163 Node: My actions are executing out of order or sometimes not at all.
\x7f178277
164 Node: How can I have multiple input sources feed into the same scanner at the same time?
\x7f179052
165 Node: Can I build nested parsers that work with the same input file?
\x7f181040
166 Node: How can I match text only at the end of a file?
\x7f182046
167 Node: How can I make REJECT cascade across start condition boundaries?
\x7f182851
168 Node: Why cant I use fast or full tables with interactive mode?
\x7f183866
169 Node: How much faster is -F or -f than -C?
\x7f185124
170 Node: If I have a simple grammar cant I just parse it with flex?
\x7f185436
171 Node: Why doesn't yyrestart() set the start state back to INITIAL?
\x7f185917
172 Node: How can I match C-style comments?
\x7f186544
173 Node: The period isn't working the way I expected.
\x7f187358
174 Node: Can I get the flex manual in another format?
\x7f188605
175 Node: Does there exist a "faster" NDFA->DFA algorithm?
\x7f189094
176 Node: How does flex compile the DFA so quickly?
\x7f189604
177 Node: How can I use more than 8192 rules?
\x7f190571
178 Node: How do I abandon a file in the middle of a scan and switch to a new file?
\x7f191983
179 Node: How do I execute code only during initialization (only before the first scan)?
\x7f192536
180 Node: How do I execute code at termination?
\x7f193314
181 Node: Where else can I find help?
\x7f193640
182 Node: Can I include comments in the "rules" section of the file?
\x7f194013
183 Node: I get an error about undefined yywrap().
\x7f194392
184 Node: How can I change the matching pattern at run time?
\x7f194869
185 Node: How can I expand macros in the input?
\x7f195231
186 Node: How can I build a two-pass scanner?
\x7f196264
187 Node: How do I match any string not matched in the preceding rules?
\x7f197180
188 Node: I am trying to port code from AT&T lex that uses yysptr and yysbuf.
\x7f198090
189 Node: Is there a way to make flex treat NULL like a regular character?
\x7f198885
190 Node: Whenever flex can not match the input it says "flex scanner jammed".
\x7f199406
191 Node: Why doesn't flex have non-greedy operators like perl does?
\x7f200050
192 Node: Memory leak - 16386 bytes allocated by malloc.
\x7f201403
193 Ref: faq-memory-leak
\x7f201701
194 Node: How do I track the byte offset for lseek()?
\x7f202669
195 Node: How do I use my own I/O classes in a C++ scanner?
\x7f204180
196 Node: How do I skip as many chars as possible?
\x7f205023
197 Node: deleteme00
\x7f206100
198 Node: Are certain equivalent patterns faster than others?
\x7f206541
199 Node: Is backing up a big deal?
\x7f209960
200 Node: Can I fake multi-byte character support?
\x7f211867
201 Node: deleteme01
\x7f213309
202 Node: Can you discuss some flex internals?
\x7f214419
203 Node: unput() messes up yy_at_bol
\x7f216664
204 Node: The | operator is not doing what I want
\x7f217767
205 Node: Why can't flex understand this variable trailing context pattern?
\x7f219314
206 Node: The ^ operator isn't working
\x7f220564
207 Node: Trailing context is getting confused with trailing optional patterns
\x7f221800
208 Node: Is flex GNU or not?
\x7f223044
209 Node: ERASEME53
\x7f224718
210 Node: I need to scan if-then-else blocks and while loops
\x7f225489
211 Node: ERASEME55
\x7f226689
212 Node: ERASEME56
\x7f227788
213 Node: ERASEME57
\x7f229147
214 Node: Is there a repository for flex scanners?
\x7f230146
215 Node: How can I conditionally compile or preprocess my flex input file?
\x7f230461
216 Node: Where can I find grammars for lex and yacc?
\x7f230934
217 Node: I get an end-of-buffer message for each character scanned.
\x7f231281
218 Node: unnamed-faq-62
\x7f231876
219 Node: unnamed-faq-63
\x7f232895
220 Node: unnamed-faq-64
\x7f234193
221 Node: unnamed-faq-65
\x7f235160
222 Node: unnamed-faq-66
\x7f235947
223 Node: unnamed-faq-67
\x7f237063
224 Node: unnamed-faq-68
\x7f238051
225 Node: unnamed-faq-69
\x7f239194
226 Node: unnamed-faq-70
\x7f239908
227 Node: unnamed-faq-71
\x7f240670
228 Node: unnamed-faq-72
\x7f241880
229 Node: unnamed-faq-73
\x7f242924
230 Node: unnamed-faq-74
\x7f243849
231 Node: unnamed-faq-75
\x7f244795
232 Node: unnamed-faq-76
\x7f245928
233 Node: unnamed-faq-77
\x7f246635
234 Node: unnamed-faq-78
\x7f247529
235 Node: unnamed-faq-79
\x7f248528
236 Node: unnamed-faq-80
\x7f250229
237 Node: unnamed-faq-81
\x7f251548
238 Node: unnamed-faq-82
\x7f254349
239 Node: unnamed-faq-83
\x7f255307
240 Node: unnamed-faq-84
\x7f257088
241 Node: unnamed-faq-85
\x7f258192
242 Node: unnamed-faq-86
\x7f259200
243 Node: unnamed-faq-87
\x7f260139
244 Node: unnamed-faq-88
\x7f260786
245 Node: unnamed-faq-90
\x7f261618
246 Node: unnamed-faq-91
\x7f262882
247 Node: unnamed-faq-92
\x7f265311
248 Node: unnamed-faq-93
\x7f265811
249 Node: unnamed-faq-94
\x7f266739
250 Node: unnamed-faq-95
\x7f268152
251 Node: unnamed-faq-96
\x7f269671
252 Node: unnamed-faq-97
\x7f270431
253 Node: unnamed-faq-98
\x7f271099
254 Node: unnamed-faq-99
\x7f271765
255 Node: unnamed-faq-100
\x7f272695
256 Node: unnamed-faq-101
\x7f273406
257 Node: What is the difference between YYLEX_PARAM and YY_DECL?
\x7f274220
258 Node: Why do I get "conflicting types for yylex" error?
\x7f274742
259 Node: How do I access the values set in a Flex action from within a Bison action?
\x7f275272
260 Node: Appendices
\x7f275703
261 Node: Makefiles and Flex
\x7f275912
262 Ref: Makefiles and Flex-Footnote-1
\x7f279112
263 Ref: Makefiles and Flex-Footnote-2
\x7f279229
264 Ref: Makefiles and Flex-Footnote-3
\x7f279415
265 Node: Bison Bridge
\x7f279466
266 Ref: Bison Bridge-Footnote-1
\x7f282135
267 Node: M4 Dependency
\x7f282327
268 Ref: M4 Dependency-Footnote-1
\x7f283732
269 Node: Common Patterns
\x7f283867
270 Node: Numbers
\x7f284158
271 Node: Identifiers
\x7f285135
272 Node: Quoted Constructs
\x7f285964
273 Node: Addresses
\x7f287017
274 Node: Indices
\x7f287683
275 Node: Concept Index
\x7f287921
276 Node: Index of Functions and Macros
\x7f313204
277 Node: Index of Variables
\x7f318100
278 Node: Index of Data Types
\x7f319766
279 Node: Index of Hooks
\x7f320654
280 Node: Index of Scanner Options
\x7f321222