A C++ high-performance regex library and Flex-compatible lexical analyzer generator with full Unicode support, new indentation 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 generates clean C++ 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

  • C++ high-performance regex library
  • Uniform C++ API for pattern matching with the RE/flex regex engine, PCRE2, Boost.Regex and std::regex
  • Optional efficient fuzzy (approximate) regex matching
  • Compatible with Flex, accepts Flex specifications to eliminate a learning curve
  • Compatible with Bison, supports reentrant, bison-bridge, bison-locations, bison-complete
  • Includes many examples, a mini C compiler, a tokenizer for C and C++, Python, Java, Lua, CSV, XML, YAML, and more
  • Unicode support, including \p{C} , Java, C#, and Python Unicode properties for identifier name matching
  • Indentation anchors to match rules on text with indentation
  • Regex lazy quantifiers
  • Faster than Flex tokenizers, see Wiki for performance comparisons
  • Efficient adaptive buffering of input files (UTF-8/16/32, ASCII, ISO-8859-1, EBCDIC), C++ streams, and (wide) strings
  • Configurable Lexer class generation to customize the interface for various parsers, including Yacc and Bison
  • Generates clean thread-safe C++ lexer classes
  • Generates Graphviz files to visualize DFAs with the Graphviz dot tool
  • Generates lex.yy.cpp files while Flex generates lex.yy.cc files (C++ with option -+)
  • %class and %init to customize the generated Lexer classes
  • %include to modularize lex specifications
  • Extensive documentation in the online manual

Project Samples

Project Activity

See All Activity >

License

BSD License

Follow RE/flex lexical analyzer generator

RE/flex lexical analyzer generator Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
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

Android, Apple iPhone, Linux, 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