manpagez: man pages & more
info flex
Home | html | info | man

File: flex.info,  Node: Top,  Next: Copyright,  Up: (dir)

flex
****

This manual describes 'flex', a tool for generating programs that
perform pattern-matching on text.  The manual includes both tutorial and
reference sections.

   This edition of 'The flex Manual' documents 'flex' version 2.7.3.  It
was last updated on 20 November 2026.

   This manual was written by Vern Paxson, Will Estes and John Millaway.

* Menu:

* Copyright::
* Reporting Bugs::
* Introduction::
* Simple Examples::
* Format::
* Patterns::
* Matching::
* Actions::
* Generated Scanner::
* Start Conditions::
* Multiple Input Buffers::
* EOF::
* Misc Controls::
* User Values::
* Yacc::
* Scanner Options::
* Performance::
* Cxx::
* Reentrant::
* Lex and Posix::
* Memory Management::
* Serialized Tables::
* Diagnostics::
* Limitations::
* Bibliography::
* FAQ::
* Appendices::
* Indices::

 -- The Detailed Node Listing --

Format of the Input File

* Definitions Section::
* Rules Section::
* User Code Section::
* Comments in the Input::

Scanner Options

* Options for Specifying Filenames::
* Options Affecting Scanner Behavior::
* Code-Level And API Options::
* Options for Scanner Speed and Size::
* Debugging Options::
* Miscellaneous Options::

Reentrant C Scanners

* Reentrant Uses::
* Reentrant Overview::
* Reentrant Example::
* Reentrant Detail::
* Reentrant Functions::

The Reentrant API in Detail

* Specify Reentrant::
* Extra Reentrant Argument::
* Global Replacement::
* Init and Destroy Functions::
* Accessor Methods::
* Extra Data::
* About yyscan_t::

Memory Management

* The Default Memory Management::
* Overriding The Default Memory Management::
* A Note About yytext And Memory::

Serialized Tables

* Creating Serialized Tables::
* Loading and Unloading Serialized Tables::
* Tables File Format::

FAQ

* When was flex born??::
* How do I expand backslash-escape sequences in C-style quoted strings??::
* Why do flex scanners call fileno if it is not ANSI compatible??::
* Does flex support recursive pattern definitions??::
* How do I skip huge chunks of input (tens of megabytes) while using flex?::
* Flex is not matching my patterns in the same order that I defined them.::
* My actions are executing out of order or sometimes not at all.::
* How can I have multiple input sources feed into the same scanner at the same time??::
* Can I build nested parsers that work with the same input file??::
* How can I match text only at the end of a file??::
* How can I make yyreject() cascade across start condition boundaries?::
* Why cant I use fast or full tables with interactive mode??::
* How much faster is -F or -f than -C??::
* If I have a simple grammar cant I just parse it with flex??::
* Why doesn't yyrestart() set the start state back to INITIAL?::
* How can I match C-style comments??::
* The period isn't working the way I expected.::
* Can I get the flex manual in another format??::
* DFA_algorithm?.php">Does there exist a "faster" NDFA->DFA algorithm??::
* How does flex compile the DFA so quickly??::
* How can I use more than 8192 rules??::
* How do I abandon a file in the middle of a scan and switch to a new file??::
* How do I execute code only during initialization (only before the first scan)?(only before the first scan)?::
* How do I execute code at termination??::
* Where else can I find help??::
* Can I include comments in the "rules" section of the file??::
* I get an error about undefined yywrap().).::
* How can I change the matching pattern at run time??::
* How can I expand macros in the input??::
* How can I build a two-pass scanner??::
* How do I match any string not matched in the preceding rules??::
* I am trying to port code from AT&T lex that uses yysptr and yysbuf.::
* Is there a way to make flex treat NUL like a regular character??::
* Whenever flex can not match the input it says "flex scanner jammed".::
* Why doesn't flex have non-greedy operators like perl does??::
* Memory leak - 16386 bytes allocated by malloc.::
* How do I track the byte offset for lseek()?()?::
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.