Flex++ is a tool for creating a language parsing program. A parser generator creates a language parsing program. Flex++ is a general instantiation of the flex program.
These programs perform character parsing, and tokenizing via the use of a deterministic finite automata or
Deterministic finite state machine(DFA). A DFA (or NDFA) is a theoretical machine accepting regular languages. These machines are a subset of the collection of Turing machines. DFAs are equivalent to read only right moving Turing Machinesor NDFAs. The syntax is based on the use of Regular expressions.
Flex provides two different ways to generate scanners. It primarily generates C code to be compiled as opposed to
C++libraries and code. Flex++, an extension of flex, is used for generating C++ code and classes. The Flex++ classes and code require a C++ compiler to create lexical and pattern-matching programs. Flex, the alternative language parser, defaults to generating a parsing scanner in C code. The Flex++ generated C++scanner includes the header file FlexLexer.h, which defines the interfaces of the two C++generated classes.
Flex++ is generally available on
UNIXbased development platforms and is free under the GNUlicense agreement. It is also available for non-UNIX systems.
Vern Paxson, with the help of many ideas and much inspiration from Van Jacobson.
*John Levine, Tony Mason, and Doug Brown, "Lex & Yacc", O'Reilly and Associates (2nd edition).
*M. E. Lesk and E. Schmidt, "LEX - Lexical Analyzer Generator"
*Alfred Aho, Ravi Sethi and Jeffrey Ullman, "Compilers: Principles, Techniques and Tools", Addison-Wesley (1986). Describes the pattern-matching techniques used by flex (deterministic finite automata)
* [http://flex.sourceforge.net/ Flex Home Page]
* [http://flex.sourceforge.net/manual/ Flex Manual]
* [http://www.cs.wwc.edu/~aabyan/464/Book/index.html Compiler Construction using Flex and Bison - course by Anthony Aaby] A Romanian rebuild version of this book in pdf format "fb2-press.pdf" or "fb2-printing.pdf" may be downloaded from [http://cs.wwc.edu/~aabyan/publications.html] or directly from [http://cs.wwc.edu/~aabyan/Linux/fb2-press.pdf] or [http://cs.wwc.edu/~aabyan/Linux/fb2-printing.pdf] .
* [http://www.monmouth.com/~wstreett/lex-yacc/lex-yacc.html Download Win32 binaries of Flex and Bison]
* [http://www.quut.com/c/ANSI-C-grammar-l-1998.html ANSI-C Lex Specification]
* [http://www.jflex.de/ JFlex: Fast Scanner Generator for Java]
Wikimedia Foundation. 2010.