Flex++

From Wikipedia, the free encyclopedia

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 Machines or 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 UNIX based development platforms and is free under the GNU license agreement. It is also available for non-UNIX systems.

[edit] Flex Creators

Vern Paxson, with the help of many ideas and much inspiration from Van Jacobson.

[edit] See also

  • 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)

[edit] External links

Languages