RE/flex is the fast lexical analyzer generator (faster than Flex) with full Unicode support, indent/nodent/dedent anchors, lazy quantifiers, and many other modern features. Accepts Flex lexer specification syntax and is compatible with Bison/Yacc parsers. Generates reusable source code that is easy to understand. Supports fast scanning of UTF-8/16/32 files, strings, and streams. The reflex scanner generator tool generates clean lexer class code that is thread-safe. Generates Graphviz files to visualize state machine DFAs. RE/flex works seamlessly with Bison.
Language: C++
License: BSD-3
Documentation: https://www.genivia.com/doc/reflex/html/index.html
Repository: https://github.com/Genivia/RE-flex
Changelog: see SF-README.md
Features
- RE/flex is fast: faster than Flex, see Wiki for performance comparisons
- Generates reusable source code that is easy to understand
- Compatible with Flex and Bison to eliminate a learning curve
- Extensive documentation in the online manual
- Adds Unicode support, property matching \p{C} and C++11, Java, C#, and Python Unicode properties for identifier name matching
- Adds indent/nodent/dedent anchors to match rules on text with indentation
- Adds lazy quantifiers to the POSIX regular expression syntax
- Adds word boundaries to the POSIX regular expression syntax
- Works with Bison and supports reentrant, bison-bridge, bison-locations, bison-complete
- Includes many examples, such as a mini C compiler, a tokenizer for C/C++ code, a tokenizer for C/C++, a tokenizer Python, a tokenizer Java, and more
- Generates clean thread-safe C++ lexer classes
- Fast and adaptive buffering of input files (UTF-8/16/32, ASCII, ISO-8859-1, EBCDIC), C++ streams, and (wide) strings
- Generates Graphviz files to visualize DFAs with the Graphviz dot tool
- Configurable Lexer class generation to customize the interface for various parsers, including Yacc and Bison
- %class and %init to customize the generated Lexer classes
- %include to modularize lex specifications
- RE/flex generates lex.yy.cpp files while Flex generates lex.yy.cc files (C++ with option -+)
- Adds an extensible hierarchy of pattern matcher engines, with a choice of regex engines, such as PCRE2, Boost.Regex, and RE/flex regex
- The RE/flex regex library makes C++11 std::regex and Boost.Regex much easier to use in plain C++ code for pattern matching on (wide) strings, files, and streams of potentially unlimited length
License
BSD LicenseFollow RE/flex lexical analyzer generator
You Might Also Like
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of RE/flex lexical analyzer generator!