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

Project Samples

Project Activity

See All Activity >

License

BSD License

Follow RE/flex lexical analyzer generator

RE/flex lexical analyzer generator Web Site

You Might Also Like
Employee monitoring software with screenshots Icon
Employee monitoring software with screenshots

Clear visibility and insights into how employees work. Even remotely

Our computer monitoring software allows employees, field contractors, and freelancers to manually clock in when they begin working on an assignment. The application will take screenshots randomly or at set intervals, which allows employers to observe the work process. The application only tracks activity when the employee is clocked in. No spying, only transparency.
Rate This Project
Login To Rate This Project

User Ratings

★★★★★
★★★★
★★★
★★
2
0
0
0
0
ease 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5
features 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5
design 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5
support 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5

User Reviews

  • Easy to use, out of the box support for moving from flex Additional syntactic features for generating regexp Matcher functionality in rules sections enables additional options for distributing logic between parser and lexer Compatible with UTF16 input which was a great deal breaker for my application
  • It's a fast and very user friendly flex derivative c++ scanner which provides more functionality over Flex. I find it more interesting when I used it for my grad level compiler project. So, I personally recommend people who use Flex/Lex should give a try to use RE/Flex for once and see the difference.
Read more reviews >

Additional Project Details

Operating Systems

Linux, Android, Apple iPhone, Mac, Windows

Intended Audience

Developers

User Interface

Command-line

Programming Language

C++

Related Categories

C++ Code Generators, C++ Compilers, C++ Libraries

Registered

2015-06-01