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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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