{"id":13578974,"url":"https://github.com/Genivia/RE-flex","last_synced_at":"2025-04-05T20:32:54.028Z","repository":{"id":41492009,"uuid":"46450827","full_name":"Genivia/RE-flex","owner":"Genivia","description":"A high-performance C++ regex library and lexical analyzer generator with Unicode support. Extends Flex++ with Unicode support, indent/dedent anchors, lazy quantifiers, functions for lex and syntax error reporting and more. Seamlessly integrates with Bison and other parsers.","archived":false,"fork":false,"pushed_at":"2025-03-29T20:49:13.000Z","size":73659,"stargazers_count":551,"open_issues_count":5,"forks_count":88,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-01T16:15:39.799Z","etag":null,"topics":["bison","compiler","flex","flex-regex","fuzzy-matching","graphviz-dot","lex","lexer","lexer-generator","lexical-analyzer","pcre","regex","regex-engine","regex-library","regex-pattern","regular-expression","regular-expressions"],"latest_commit_sha":null,"homepage":"https://www.genivia.com/doc/reflex/html","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Genivia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-18T22:11:44.000Z","updated_at":"2025-03-30T22:21:44.000Z","dependencies_parsed_at":"2023-02-15T22:15:59.442Z","dependency_job_id":"63479e0a-7f3d-4887-a846-03df4a2dd80c","html_url":"https://github.com/Genivia/RE-flex","commit_stats":null,"previous_names":[],"tags_count":113,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genivia%2FRE-flex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genivia%2FRE-flex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genivia%2FRE-flex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Genivia%2FRE-flex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Genivia","download_url":"https://codeload.github.com/Genivia/RE-flex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399818,"owners_count":20932875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bison","compiler","flex","flex-regex","fuzzy-matching","graphviz-dot","lex","lexer","lexer-generator","lexical-analyzer","pcre","regex","regex-engine","regex-library","regex-pattern","regular-expression","regular-expressions"],"created_at":"2024-08-01T15:01:35.499Z","updated_at":"2025-04-05T20:32:49.011Z","avatar_url":"https://github.com/Genivia.png","language":"C++","readme":"\n[![logo][logo-url]][reflex-url]\n\n[![build status][ci-image]][ci-url] [![license][bsd-3-image]][bsd-3-url] [![CodeProject][codeproject-image]][codeproject-url]\n\nA high-performance C++ regex library and lexical analyzer generator with\nUnicode support.\n\nTwo example use cases:\n\n1. A RE/flex-generated tokenizer is used by the\n   [Tiger Compiler](https://assignments.lrde.epita.fr/tools/reflex.html).\n2. The RE/flex C++ regex engines are used by [ugrep](https://ugrep.com).\n\nThe RE/flex lexical analyzer generator extends Flex++ with Unicode support,\nindent/dedent anchors, POSIX regex lazy quantifiers, word boundaries, functions\nfor lex and syntax error reporting, lexer rule execution performance profiling,\nand other new features.\n\nOnly RE/flex supports POSIX regex lazy matching in linear time using an\nadvanced DFA transformation algorithm (invented by Dr. Robert van Engelen.)\n\nRE/flex is faster than Flex and much faster than regex libraries such as\nBoost.Regex, C++11 std::regex, PCRE2 and RE2.  For example, tokenizing a 2 KB\nrepresentative C source code file into 244 tokens takes only 8.7 microseconds:\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth\u003eCommand / Function\u003c/th\u003e\u003cth\u003eSoftware\u003c/th\u003e\u003cth\u003eTime (μs)\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cb\u003ereflex --fast --noindent\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eRE/flex 3.4.1\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e8.7\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cb\u003ereflex --fast\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003eRE/flex 3.4.1\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e8.9\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eflex -+ --full\u003c/td\u003e\u003ctd\u003eFlex 2.5.35\u003c/td\u003e\u003ctd\u003e9.8\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eboost::spirit::lex::lexertl::actor_lexer::iterator_type\u003c/td\u003e\u003ctd\u003eBoost.Spirit.Lex 1.82.0\u003c/td\u003e\u003ctd\u003e10.7\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ereflex --full\u003c/td\u003e\u003ctd\u003eRE/flex 3.4.1\u003c/td\u003e\u003ctd\u003e20.6\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003epcre2_jit_match()\u003c/td\u003e\u003ctd\u003ePCRE2 (jit) 10.42\u003c/td\u003e\u003ctd\u003e60.8\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ehs_compile_multi(), hs_scan()\u003c/td\u003e\u003ctd\u003eHyperscan 5.4.2\u003c/td\u003e\u003ctd\u003e129\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ereflex -m=boost-perl\u003c/td\u003e\u003ctd\u003eBoost.Regex 1.82.0\u003c/td\u003e\u003ctd\u003e205\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eRE2::Consume()\u003c/td\u003e\u003ctd\u003eRE2 (pre-compiled) 2023-09-01\u003c/td\u003e\u003ctd\u003e218\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003ereflex -m=boost\u003c/td\u003e\u003ctd\u003eBoost.Regex POSIX 1.82.0\u003c/td\u003e\u003ctd\u003e392\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003epcre2_match()\u003c/td\u003e\u003ctd\u003ePCRE2 10.42\u003c/td\u003e\u003ctd\u003e500\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eRE2::Consume()\u003c/td\u003e\u003ctd\u003eRE2 POSIX (pre-compiled) 2023-09-01\u003c/td\u003e\u003ctd\u003e534\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eflex -+\u003c/td\u003e\u003ctd\u003eFlex 2.5.35\u003c/td\u003e\u003ctd\u003e3759\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003epcre2_dfa_match()\u003c/td\u003e\u003ctd\u003ePCRE2 POSIX (dfa) 10.42\u003c/td\u003e\u003ctd\u003e4029\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eregcomp(), regexec()\u003c/td\u003e\u003ctd\u003eGNU C POSIX.2 regex\u003c/td\u003e\u003ctd\u003e4932\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003estd::cregex_iterator()\u003c/td\u003e\u003ctd\u003eC++11 std::regex\u003c/td\u003e\u003ctd\u003e6490\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\nNote: *performance in elapsed time (lower is better) in microseconds for 1000 to 10000\nbenchmark runs using Mac OS X 12.6.9 with clang 12.0.0 -O2, 2.9 GHz Intel Core\ni7, 16 GB 2133 MHz LPDDR3.  Hyperscan disqualifies as a scanner due to its \"All\nmatches reported\" semantics resulting in 1915 matches for this test, and due to\nits event handler requirements.*\n[Download the tests](https://www.genivia.com/files/perfcomp.zip)\n\nThe performance table is indicative of the impact on performance when using\nPCRE2 and Boost.Regex with RE/flex.  PCRE2 and Boost.Regex are optional\nlibraries integrated with RE/flex for Perl matching because of their\nefficiency.  By default, RE/flex uses DFA-based extended regular expression\nmatching in linear time, the fastest method (as shown in the table).\n\nThe RE/flex matcher tracks line numbers, column numbers, and indentations,\nwhereas Lex and Flex do not (option noyylineno) and neither do the other regex\nmatchers in the table (except PCRE2 and Boost.Regex when used with RE/flex).\nTracking this information incurs some overhead.  RE/flex also automatically\ndecodes UTF-8/16/32 input and accepts `std::istream`, strings, and wide strings\nas input.\n\nFeatures\n--------\n\n- Includes many examples, such as a mini C compiler to Java bytecode, a\n  tokenizer for C/C++ source code, a tokenizer for Python source code, a\n  tokenizer for Java source code, Lua, JSON, XML, YAML, and more.\n- Compatible with Flex and Bison to eliminate a learning curve, making a\n  transition from Flex++ to RE/flex frustration-free.\n- Auto-generates code that integrates seamlessly with Bison Reentrant,\n  Bison-Bridge, Bison-Locations, Bison 3.0 C++ interface `%skeleton\n  \"lalr1.cc\"` and Bison Complete Symbols.\n- Generates code and includes methods for lexical and syntax error reporting\n  and recovery.\n- The generated scanner source code is structured and easy to understand.\n- Fully supports Unicode and Unicode properties `\\p{C}`, including Unicode\n  identifier matching for C++11, Java, C#, and Python source code.\n- Auto-detects UTF-8/16/32 input to match Unicode patterns.\n- Supports file encodings ISO-8859-1 through ISO-8859-15, CP 1250 through 1258,\n  CP 437, CP 850, CP 858, KOI8, MACROMAN, EBCDIC, and custom code pages.\n- Generates scanners for lexical analysis on files, C++ streams, (wide)\n  strings, and memory such as mmap files.\n- Indent/nodent/dedent anchors to match indentation levels to tokenize.\n- Lazy quantifiers for POSIX regex matching, i.e. no hacks are needed to work\n  around greedy repetitions.\n- Word boundary anchors.\n- Freespace mode option to improve readability of lexer specifications.\n- `%class` and `%init` to customize the generated Lexer classes.\n- `%include` to modularize lexer specifications.\n- Multiple lexer classes can be combined and used in one application, e.g. by\n  multiple threads in a thread-safe manner.\n- Configurable Lexer class generation to customize the interface for various\n  parsers, including Yacc and Bison.\n- Generates Graphviz files to visualize FSMs with the Graphviz dot tool.\n- Includes an extensible hierarchy of pattern matcher engines, with a choice of\n  regex engines, including the RE/flex regex engine, PCRE2, and Boost.Regex.\n- The RE/flex regex library makes C++11 std::regex, PCRE2, and Boost.Regex much\n  easier to use for pattern matching on (wide) strings, files, and streams.\n- IEEE POSIX P1003.2 standard compliant (like Lex and Flex).\n- Extensive documentation in the online [User Guide][manual-url].\n- Lots of other improvements over Flex++, such as `yypush_buffer_state` saves\n  the scanner state (line, column, and indentation positions), not just the\n  input buffer; no input buffer length limit (Flex has a 16KB limit); `line()`\n  returns the current line (e.g. for error reporting).\n\nNote: PCRE2 and Boost.Regex are not dependencies, they can be used as optional\nregex engines in addition to the RE/flex regex engine.\n\nInstallation\n------------\n\n### Windows\n\nUse `reflex/bin/reflex.exe` from the command line or add a **Custom Build\nStep** in MSVC++ as follows:\n\n1. select the project name in **Solution Explorer** then **Property Pages**\n   from the **Project** menu (see also\n   [custom-build steps in Visual Studio](http://msdn.microsoft.com/en-us/library/hefydhhy.aspx));\n\n2. add an extra path to the `reflex/include` folder in the **Include\n   Directories** under **VC++ Directories**, which should look like\n   `$(VC_IncludePath);$(WindowsSDK_IncludePath);C:\\Users\\YourUserName\\Documents\\reflex\\include`\n   (this assumes the `reflex` source package is in your **Documents** folder).\n\n3. enter `\"C:\\Users\\YourUserName\\Documents\\reflex\\bin\\win32\\reflex.exe\" --header-file\n   \"C:\\Users\\YourUserName\\Documents\\mylexer.l\"` in the **Command Line** property\n   under **Custom Build Step** (this assumes `mylexer.l` is in your\n   **Documents** folder);\n\n4. enter `lex.yy.h lex.yy.cpp` in the **Outputs** property;\n\n5. specify **Execute Before** as `PreBuildEvent`.\n\nIf you are using specific reflex options such as `--flex` then add these in step 3.\n\nBefore compiling your program with MSVC++, drag the folders `reflex/lib` and\n`reflex/unicode` to the **Source Files** in the **Solution Explorer** panel of\nyour project.  Next, run `reflex.exe` simply by compiling your project (which\nmay fail, but that is OK for now as long as we executed the custom build step\nto run `reflex.exe`).  Drag the generated `lex.yy.h` (if present) and\n`lex.yy.cpp` files to the **Source Files**.  Now you are all set!\n\nIn addition, the `reflex/vs` directory contains batch scripts to build projects\nwith MS Visual Studio C++.\n\n### MacOS\n\nOn macOS systems you can use [homebrew](https://brew.sh) to install RE/flex\nwith `brew install re-flex`.  Or use [MacPorts](https://www.macports.org)\nto install RE/flex with `sudo port install re-flex`.\n\n### NetBSD\n\nOn NetBSD systems you can use the standard NetBSD package installer (pkgsrc):\n\u003chttp://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/RE-flex/README.html\u003e\n\n### Quick install\n\nFirst clone the code:\n\n    $ git clone https://github.com/Genivia/RE-flex\n\nThen simply do a quick clean build, assuming your environment is pretty much\nstandard:\n\n    $ ./clean.sh\n    $ ./build.sh\n\nThis compiles the **reflex** tool and installs it locally in `reflex/bin`.  For\nlocal use of RE/flex in your project, you can add this location to your `$PATH`\nvariable to enable the new `reflex` command:\n\n    $ export PATH=$PATH:/your_path_to_reflex/reflex/bin\n\nNote that the `libreflex.a` and `libreflex.so` libraries are saved locally in\n`reflex/lib`.  Link against the library when you use the RE/flex regex engine\nin your code, such as:\n\n    $ c++ \u003coptions and .o/.cpp files\u003e -L/your_path_to_reflex/reflex/lib -lreflex\n\nor you could statically link libreflex.a with:\n\n    $ c++ \u003coptions and .o/.cpp files\u003e /your_path_to_reflex/reflex/lib/libreflex.a\n\nAlso note that the RE/flex header files that you will need to include in your\nproject are locally located in `include/reflex`.\n\nTo install the man page, the header files in `/usr/local/include/reflex`, the\nlibrary in `/usr/local/lib` and the `reflex` command in `/usr/local/bin`:\n\n    $ sudo ./allinstall.sh\n\n### Configure and make\n\nThe configure script accepts configuration and installation options.  To view\nthese options, run:\n\n    $ ./configure --help\n\nRun configure and make:\n\n    $ ./configure \u0026\u0026 make\n\nTo build the examples also:\n\n    $ ./configure --enable-examples \u0026\u0026 make\n\nAfter this successfully completes, you can optionally run `make install` to\ninstall the `reflex` command and the `libreflex` library:\n\n    $ sudo make install\n\nUnfortunately, cloning from Git does not preserve timestamps which means that\nyou may run into \"WARNING: 'aclocal-1.15' is missing on your system.\"  To\nwork around this problem, run:\n\n    $ autoreconf -fi\n    $ ./configure \u0026\u0026 make\n\nThe above builds the library with SSE/AVX optimizations applied.  To disable\nAVX optimizations:\n\n    $ ./configure --disable-avx \u0026\u0026 make\n\nTo disable both SSE2 and AVX optimizations:\n\n    $ ./configure --disable-sse2 \u0026\u0026 make\n\n### Optional libraries to install\n\n- To use PCRE2 as a regex engine with the RE/flex library and scanner\n  generator, install [PCRE2][pcre-url] and link your code with `-lpcre2-8`.\n\n- To use Boost.Regex as a regex engine with the RE/flex library and scanner\n  generator, install [Boost][boost-url] and link your code with\n  `-lboost_regex` or `-lboost_regex-mt`.\n\n- To visualize the FSM graphs generated with **reflex** option `--graphs-file`,\n  install [Graphviz dot][dot-url].\n\n### Improved Vim syntax highlighting\n\nCopy the `lex.vim` file to `~/.vim/syntax/` to enjoy improved syntax\nhighlighting for both Flex and RE/flex.\n\n\nUsage\n-----\n\nThere are two ways you can use this project:\n\n1. as a scanner generator for C++, similar to Flex;\n2. as a flexible regex library API for C++.\n\nFor the first option, simply build the **reflex** tool and run it on the\ncommand line on a lexer specification:\n\n    $ reflex --flex --bison --graphs-file lexspec.l\n\nThis generates a scanner for Bison from the lexer specification `lexspec.l` and\nsaves the finite state machine (FSM) as a Graphviz `.gv` file that can be\nvisualized with the [Graphviz dot][dot-url] tool:\n\n    $ dot -Tpdf reflex.INITIAL.gv \u003e reflex.INITIAL.pdf\n    $ open reflex.INITIAL.pdf\n\n![Visualize DFA graphs with Graphviz dot][FSM-url]\n\nSeveral examples are included to get you started.  See the [manual][manual-url]\nfor more details.\n\nFor the second option, simply use the RE/flex matcher API classes to start\npattern search, matching, splitting and scanning on strings, wide strings,\nfiles, and streams.\n\nYou can select matchers that are based on different regex engines:\n\n- RE/flex regex: `#include \u003creflex/matcher.h\u003e` and use `reflex::Matcher`;\n- PCRE2: `#include \u003creflex/pcre2matcher.h\u003e` and use `reflex::PCRE2Matcher` or\n  `reflex::PCRE2UTFMatcher`.\n- Boost.Regex: `#include \u003creflex/boostmatcher.h\u003e` and use\n  `reflex::BoostMatcher` or `reflex::BoostPosixMatcher`;\n- C++11 std::regex: `#include \u003creflex/stdmatcher.h\u003e` and use\n  `reflex::StdMatcher` or `reflex::StdPosixMatcher`.\n\nEach matcher may differ in regex syntax features (see the full documentation),\nbut they all share the same methods and iterators, such as:\n\n- `matches()` returns nonzero if the input matches the specified pattern;\n- `find()` search input and returns nonzero if a match was found;\n- `scan()` scan input and returns nonzero if input at current position matches;\n- `split()` returns nonzero for a split of the input at the next match;\n- `find.begin()`...`find.end()` filter iterator;\n- `scan.begin()`...`scan.end()` tokenizer iterator;\n- `split.begin()`...`split.end()` splitter iterator.\n\nFor example, using Boost.Regex (alternatively use PCRE2 `reflex::PCRE2Matcher`):\n\n```{.cpp}\n#include \u003creflex/boostmatcher.h\u003e // reflex::BoostMatcher, reflex::Input, boost::regex\n// use a BoostMatcher to check if the birthdate string is a valid date\nif (reflex::BoostMatcher(\"\\\\d{4}-\\\\d{2}-\\\\d{2}\", birthdate).matches() != 0)\n  std::cout \u003c\u003c \"Valid date!\" \u003c\u003c std::endl;\n```\n\nWith a group capture to fetch the year:\n\n```{.cpp}\n#include \u003creflex/boostmatcher.h\u003e // reflex::BoostMatcher, reflex::Input, boost::regex\n// use a BoostMatcher to check if the birthdate string is a valid date\nreflex::BoostMatcher matcher(\"(\\\\d{4})-\\\\d{2}-\\\\d{2}\", birthdate);\nif (matcher.matches() != 0)\n  std::cout \u003c\u003c std::string(matcher[1].first, matcher[1].second) \u003c\u003c \" was a good year!\" \u003c\u003c std::endl;\n```\n\nTo search a string for words `\\w+`:\n\n```{.cpp}\n#include \u003creflex/boostmatcher.h\u003e // reflex::BoostMatcher, reflex::Input, boost::regex\n// use a BoostMatcher to search for words in a sentence\nreflex::BoostMatcher matcher(\"\\\\w+\", \"How now brown cow.\");\nwhile (matcher.find() != 0)\n  std::cout \u003c\u003c \"Found \" \u003c\u003c matcher.text() \u003c\u003c std::endl;\n```\n\nThe `split` method is roughly the inverse of the `find` method and returns text\nlocated between matches.  For example using non-word matching `\\W+`:\n\n```{.cpp}\n#include \u003creflex/boostmatcher.h\u003e // reflex::BoostMatcher, reflex::Input, boost::regex\n// use a BoostMatcher to search for words in a sentence\nreflex::BoostMatcher matcher(\"\\\\W+\", \"How now brown cow.\");\nwhile (matcher.split())\n  std::cout \u003c\u003c \"Found \" \u003c\u003c matcher.text() \u003c\u003c std::endl;\n```\n\nTo pattern match the content of a file, where the file may use UTF-8, 16, or 32\nencodings that are automatically converted when a UTF BOM is present:\n\n```{.cpp}\n#include \u003creflex/boostmatcher.h\u003e // reflex::BoostMatcher, reflex::Input, boost::regex\n// use a BoostMatcher to search and display words from a FILE\nFILE *fd = fopen(\"somefile.txt\", \"r\");\nif (fd == NULL)\n  exit(EXIT_FAILURE);\nreflex::BoostMatcher matcher(\"\\\\w+\", fd);\nwhile (matcher.find())\n  std::cout \u003c\u003c \"Found \" \u003c\u003c matcher.text() \u003c\u003c std::endl;\nfclose(fd);\n```\n\nSame again, but this time with a C++ input stream:\n\n```{.cpp}\n#include \u003creflex/boostmatcher.h\u003e // reflex::BoostMatcher, reflex::Input, boost::regex\n// use a BoostMatcher to search and display words from a stream\nstd::ifstream file(\"somefile.txt\", std::ifstream::in);\nreflex::BoostMatcher matcher(\"\\\\w+\", file);\nwhile (matcher.find())\n  std::cout \u003c\u003c \"Found \" \u003c\u003c matcher.text() \u003c\u003c std::endl;\nfile.close();\n```\n\nStuffing the search results into a container using RE/flex iterators:\n\n```{.cpp}\n#include \u003creflex/boostmatcher.h\u003e // reflex::BoostMatcher, reflex::Input, boost::regex\n#include \u003cvector\u003e         // std::vector\n// use a BoostMatcher to convert words of a sentence into a string vector\nreflex::BoostMatcher matcher(\"\\\\w+\", \"How now brown cow.\");\nstd::vector\u003cstd::string\u003e words(matcher.find.begin(), matcher.find.end());\n```\n\nUse C++11 range-based loops with RE/flex iterators:\n\n```{.cpp}\n#include \u003creflex/pcre2matcher.h\u003e // reflex::PCRE2TFMatcher, reflex::Input, std::regex\n// use a PCRE2UTFMatcher to search for words in a sentence\nreflex::PCRE2UTFMatcher matcher(\"\\\\w+\", \"How now brown cow.\");\nfor (auto\u0026 match : matcher.find)\n  std::cout \u003c\u003c \"Found \" \u003c\u003c match.text() \u003c\u003c std::endl;\n```\n\nNote that we cannot generally simplify this loop to the following, because the\ntemporary matcher object is destroyed (some compilers handle this in C++23):\n\n```{.cpp}\nfor (auto\u0026 match : reflex::PCRE2UTFMatcher matcher(\"\\\\w+\", \"How now brown cow.\").find);\n  std::cout \u003c\u003c \"Found \" \u003c\u003c match.text() \u003c\u003c std::endl;\n```\n\nRE/flex also allows you to convert expressive regex syntax forms such as `\\p`\nUnicode classes, character class set operations such as `[a-z--[aeiou]]`,\nescapes such as `\\X`, and `(?x)` mode modifiers, to a regex string that the\nunderlying regex library understands and will be able to use:\n\n- `std::string reflex::Matcher::convert(const std::string\u0026 regex, reflex::convert_flag_type flags)`\n- `std::string reflex::PCRE2Matcher::convert(const std::string\u0026 regex, reflex::convert_flag_type flags)`\n- `std::string reflex::PCRE2UTFMatcher::convert(const std::string\u0026 regex, reflex::convert_flag_type flags)`\n- `std::string reflex::BoostMatcher::convert(const std::string\u0026 regex, reflex::convert_flag_type flags)`\n- `std::string reflex::StdMatcher::convert(const std::string\u0026 regex, reflex::convert_flag_type flags)`\n\nFor example:\n\n```{.cpp}\n#include \u003creflex/matcher.h\u003e // reflex::Matcher, reflex::Input, reflex::Pattern\n// use a Matcher to check if sentence is in Greek:\nstatic const reflex::Pattern pattern(reflex::Matcher::convert(\"[\\\\p{Greek}\\\\p{Zs}\\\\pP]+\", reflex::convert_flag::unicode));\nif (reflex::Matcher(pattern, sentence).matches() != 0)\n  std::cout \u003c\u003c \"This is Greek\" \u003c\u003c std::endl;\n```\n\nWe use `convert` with optional flag `reflex::convert_flag::unicode` to make `.`\n(dot), `\\w`, `\\s` and so on match Unicode and to convert `\\p` Unicode character\nclasses.\n\nConversion is fast (it runs in linear time in the size of the regex), but it is\nnot without some overhead.  Making converted regex patterns `static` as shown\nabove saves the cost of conversion to just once to support many matchings.\n\n\nHow to contribute?\n------------------\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md).\n\n\nWhere do I find the documentation?\n----------------------------------\n\nRead more about RE/flex in the [manual][manual-url].\n\n\nLicense and copyright\n---------------------\n\nRE/flex by Robert van Engelen, Genivia Inc.\nCopyright (c) 2016-2023, All rights reserved.\n\nRE/flex is distributed under the BSD-3 license LICENSE.txt.\nUse, modification, and distribution are subject to the BSD-3 license.\n\n\nReporting bugs\n--------------\n\nVisit GitHub to report bugs: https://github.com/Genivia/RE-flex\n\n\nChangelog\n---------\n\n- Nov 14, 2016: 0.9.0  beta released\n- Nov 15, 2016: 0.9.1  improved portability\n- Nov 17, 2016: 0.9.2  improvements and fixes for minor issues\n- Nov 19, 2016: 0.9.3  replaces `%import` with `%include`, adds freespace option `-x`, fixes minor issues\n- Nov 20, 2016: 0.9.4  fixes minor issues, added new examples/json.l\n- Nov 25, 2016: 0.9.5  bug fixes and improvements\n- Dec  1, 2016: 0.9.6  portability improvements\n- Dec  6, 2016: 0.9.7  bug fixes, added option `--regexp-file`, Python tokenizer\n- Dec  9, 2016: 0.9.8  fixes minor issues, improved reflex tool options `--full` and `--fast`, generates scanner with FSM table or a fast scanner with FSM code, respectively\n- Jan  8, 2017: 0.9.9  bug fixes and improved Flex compatibility\n- Jan 15, 2017: 0.9.10 improved compatibility with Flex options, fixed critical issue with range unions\n- Jan 25, 2017: 0.9.11 added C++11 std::regex matching engine support, moved .h files to include/reflex, requires `#include \u003creflex/xyz.h\u003e` from now on, fixed `errno_t` portability issue\n- Mar  3, 2017: 0.9.12 refactored and improved, includes new regex converters for regex engines that lack regex features such as Unicode character classes\n- Mar  4, 2017: 0.9.13 improved warning and error messages\n- Mar  6, 2017: 0.9.14 reflex option `-v` shows stats with execution timings, bug fixes\n- Mar  8, 2017: 0.9.15 added `wtext()`, `wpair()`, `winput()` methods, other improvements\n- Mar 22, 2017: 0.9.16 bug fixes, speed improvements, improved option `--unicode` regex conversion, also with `(?u:)`, changed `wtext()` to `wstr()` and added a `str()` method\n- Mar 24, 2017: 0.9.17 improvements\n- Mar 26, 2017: 0.9.18 added reflex option `-p` (`--perf-report`) for performance debugging, added doc/man/reflex.1 man page, added interactive readline example\n- Mar 31, 2017: 0.9.19 fixed reflex option `-m`, `lexer.in(i)` now resets the lexer, fixed reassigning the same input to the lexer that caused UTF BOM to be read twice\n- Apr  5, 2017: 0.9.20 EBCDIC file translation, other improvements\n- Apr 10, 2017: 0.9.21 fixed option `-P` to support multiple lexer classes in one application, added `configure` installation script, optional quick install with `allinstall.sh` (renamed from `install.sh`)\n- Apr 12, 2017: 0.9.22 improved explanations of `matches()`, `find()`, `scan()`, `split()` that return nonzero for a match, other minor improvements\n- May 24, 2017: 0.9.23 improved portability, added file encoding conversions for CP-1250 to CP-1258, CP 437, and CP 850/858\n- Jun 24, 2017: 0.9.24 added an option for users to define their own custom code pages to translate input, fixed `#` in free space mode\n- Jun 28, 2017: 0.9.25 fixed `--fast` FSM not always halting on EOF after a mismatch; fixed buffer realloc, added new examples/csv.l\n- Jul  5, 2017: 0.9.26 fixed `wstr()` always returning UTF-16 strings (should be UTF-16 only when `std::wstring` requires it)\n- Sep 26, 2017: 0.9.27 the Flex-compatible `yy_scan_string()`, `yy_scan_bytes()` and `yy_scan_buffer()` functions now create a new buffer as in Flex, delete this buffer with `yy_delete_buffer()`; fixed examples to work with newer Bison versions (Bison 3.0.4)\n- Dec 12, 2017: 0.9.28 added `yy_scan_wstring` and `yy_scan_wbuffer` for wide string scanning with Flex-like functions\n- Jan 28, 2018: 1.0.0 removed dynamic exception specifications to comply with C++17, upgraded to stable release 1.0\n- Feb 24, 2018: 1.0.1 added Unicode IsBlockName categories\n- Mar  6, 2018: 1.0.2 added namespace nesting with `%option namespace=NAME1.NAME2.NAME3 ...`\n- Mar  7, 2018: 1.0.3 fixed `--namespace` and `%option namespace`\n- Apr 22, 2018: 1.0.4 updated to Unicode 10, cleaned up code to remove tool warnings\n- Jun 29, 2018: 1.0.5 updated `--namespace` for options `--fast` and `--full` to support the generation of multiple optimized lexers placed in namespaces.\n- Jul  9, 2018: 1.0.6 added `--bison-cc` option to generate scanners for Bison 3.0 `%skeleton \"lalr1.cc\"` C++ parsers, included two examples `flexexample9xx` and `reflexexample9xx` to demo this feature.\n- Jul 12, 2018: 1.0.7 added `--bison-cc-namespace` and `--bison-cc-parser` options to customize Bison 3.0 `%skeleton \"lalr1.cc\"` C++ parsers.\n- Jul 30, 2018: 1.0.8 updated to Unicode 11.\n- Aug 21, 2018: 1.0.9 fixed reflex regex library matching with range quantifiers by correcting coding typo.\n- Dec  8, 2018: 1.0.10 fixed `columno()` to take tab spacing into account.\n- Jan 18, 2019: 1.0.11 fixed GCC 8.2 warnings, additional enhancements.\n- Jan 21, 2019: 1.0.12 the reflex tool now reads files using `reflex::Input`.\n- Feb 20, 2019: 1.1.0 code quality updates.\n- Mar  6, 2019: 1.1.1 fixed `configure` and `make install` header files, updated `--bison-locations` option.\n- Mar  7, 2019: 1.1.2 fixed reflex tool handling of backslashes in file paths.\n- Mar 11, 2019: 1.1.3 updated to Unicode 12, examples can now be built with `./configure --enable-examples`.\n- Mar 27, 2019: 1.1.4 fixed reflex tool common top code block insertion for all inclusive states.\n- Apr  6, 2019: 1.1.5 improved reflex tool command-line option handling, updated documentation.\n- Apr 29, 2019: 1.2.0 added `--bison-complete` option, new ugrep utility example, updated manual, fixes minor issues.\n- May 15, 2019: 1.2.1 added `reflex::convert_flag::basic` to convert BRE syntax to ERE syntax, used by [ugrep](https://github.com/Genivia/ugrep).\n- May 28, 2019: 1.2.2 fixed MinGW builds, fixed `reflex::Input::get()` to return positive character code, matcher option `\"N\"` for `scan` and `find` matches empty input (`^$`).\n- Jun 21, 2019: 1.2.3 fixed reflex long regex string generation, namespaces with option `--full`, updated documentation and other improvements.\n- Jun 24, 2019: 1.2.4 fixed an issue with `reflex::StdMatcher` (`std::regex`) causing failures to match input with `split`.\n- Jul  2, 2019: 1.2.5 added `reflex::Input::in(const char *memptr, size_t memlen)` to read a memory segment (for scanning etc.), added `reflex::Input::streambuf` class to use a `reflex::Input` object as a `std::streambuf`, improved `yy_scan_buffer` and `yy_scan_bytes`.\n- Jul  3, 2019: 1.2.6 fixed a problem with lazy quantifiers used within negative patterns.\n- Jul  4, 2019: 1.2.7 added `reflex::Input::dos_streambuf` to convert DOS CRLF to LF, other improvements.\n- Jul  8, 2019: 1.2.8 added support for inverted mode modifiers `(?-imsux)` to `reflex::convert` and `reflex::Pattern`.\n- Jul 11, 2019: 1.2.9 portability improvements.\n- Jul 14, 2019: 1.2.10 added `AbstractMatcher::set_bob()`, moved `AbstractMatcher::peek()` to public, minor improvements.\n- Jul 21, 2019: 1.3.0 added subtractive start condition scoping with `\u003c^...\u003e`, added undent `\\k` anchor to undo indenting changes (\"undenting\") with an example in `examples/indent2.l`, improved indent `\\i` and dedent `\\j` anchors and other improvements.\n- Jul 24, 2019: 1.3.1 added `matcher().tabs(n)` to set tab size, used by `columno()` and indent `\\i` and dedent `\\j` anchors, new `reflex::Pattern` methods, other improvements.\n- Jul 27, 2019: 1.3.2 added defined name expansion in bracket lists for the union `||`, intersection `\u0026\u0026`, and subtraction `--` operations, e.g. `[||{letter}||{digit}]` expands into `[a-zA-Z0-9]` when `letter` is defined as `[a-zA-Z]` and `digit` is defined as `[0-9]`, see Character Classes in the documentation.\n- Aug  5, 2019: 1.3.3 fixed `reflex::BoostMatcher` (and derived `reflex::BoostPosixMatcher`, `reflex::BoostPerlMatcher`) regression bug that crept into the 1.2.4 update.\n- Aug  7, 2019: 1.3.4 speed improvements for non-fast options.\n- Aug  8, 2019: 1.3.5 further speed improvements for both fast and non-fast options (15% to 30% faster).\n- Aug 12, 2019: 1.3.6 added lexer and matcher `buffer(base, size)` methods and improved Flex-compatible `yy_scan_buffer(base, size)`, these functions scan memory fast with zero copy overhead; added `mmap.l` example to scan an mmap-ed file fast with mmap(2) and `buffer(base, size)`; other improvements.\n- Aug 16, 2019: 1.3.7 added `reflex::BufferedInput::dos_streambuf` to improve `dos_streambuf` speed by buffering (`reflex::Input::dos_streambuf` is unbuffered), fixed `%option token-type` to apply without restrictions.\n- Aug 17, 2019: 1.3.8 added caching of `lineno()` and `columno()` to increase speed, which is essential for large buffers such as large mmap-ed files scanned with `buffer(base, size)`; other improvements.\n- Sep  4, 2019: 1.4.0 added reflex option `-S` (`--find`) for efficient searching instead of scanning input (i.e. efficiently ignoring unmatched input) demonstrated with new `findfast` and `findsearch` examples; changed `--nodefault` to throw an exception when option `--flex` is not used and when the default rule is triggered.\n- Sep 10, 2019: 1.4.1 fixed `lineno()` caching issue (1.3.8 bug); faster `find`.\n- Sep 15, 2019: 1.4.2 faster `find` for patterns beginning with optional repetitions such as `.*`.\n- Sep 29, 2019: 1.4.3 added `reflex::AbstractMatcher::clone()` to clone a referenced concrete matcher object.\n- Oct 23, 2019: 1.4.4 improved option `--flex` for Flex compatibility; fixed option `--token-type` with option `--flex`, now properly defines `YY_NULL` and `yyterminate`; fixed `AbstractMatcher::buffer(n)` for large `n`; faster `find`.\n- Nov  5, 2019: 1.5.0 added `border()`, `span()`, `line()`, `wline()`, and `skip(c)` methods; added new section on error reporting and recovery to the documentation; fixed `yy_scan_string()` and `yy_scan_buffer()` when called before calling `yylex()` for the first time; improved performance.\n- Nov  7, 2019: 1.5.1 improvements; added `dos.l` demo example of `reflex::InputBuffer::dos_streambuf`.\n- Nov 12, 2019: 1.5.2 fixed an internal buffer allocation issue that may cause a crash when input lines are longer than 16KB (regression bug that crept into in 1.5.0).\n- Nov 21, 2019: 1.5.3 added `lineno_end()` and `columno_end()` methods, updated `columns()` with clarifications in the updated documentation; expanded the documentation with additional error reporting and handling techniques with RE/flex and Bison bridge and complete configurations; FSM code generation improvements.\n- Nov 22, 2019: 1.5.4 added `flexexample11xx` example with Flex specification and Bison complete parser; minor improvements.\n- Dec 23, 2019: 1.5.5 expanded the `skip(c)` methods with a `wchar_t` wide character parameter and a UTF-8 string parameter to skip input; added new option `--token-eof`.\n- Dec 28, 2019: 1.5.6 added new option `--noindent` to speed up pattern matching and lexical analysis by disabling indentation tracking in the input (also disables anchors `\\i`, `\\j`, and `\\k`); speed improvements.\n- Jan 19, 2020: 1.5.7 expanded file encoding formats to include ISO-8859-2 to 16, MacRoman, KOI8; fixed a bug in `line()` and `span()`.\n- Feb  3, 2020: 1.5.8 added `wunput()` method; added `lex.vim` improved Flex and RE/flex Vim syntax highlighting; added `yaml.l` example; fixed `--freespace` with `--unicode` when bracket lists contain a `#`; character class operators `{+}`, `{-}`, `{\u0026}` now accept defined names as first operands and inverted character classes; indent anchor `\\k` now matches only when indent level is changed as documented.\n- Mar  2, 2020: 1.6.0 added PCRE2 regex matcher classes and updated reflex option `--matcher=pcre2-perl`; optimized RE/flex matcher `find()` with AVX/SSE2/NEON/AArch64; updated and improved regex converters.\n- Mar  3, 2020: 1.6.1 fixed missing PCRE2 regex type `std::string` in generated scanners.\n- Mar 10, 2020: 1.6.2 improved `reflex::PCRE2Matcher`; fixed MSVC++ x86 32-bit build error when `HAVE_AVX512BW` is enabled (requires AVX512BW).\n- Mar 19, 2020: 1.6.3 updated to Unicode 13; fixed start condition scope specifications for patterns that start with a `{`; updated lex.vim.\n- Mar 22, 2020: 1.6.4 added option `--yy` to enable `--flex` and `--bison`, but also defines the global `FILE*` variables `yyin` and `yyout` for enhanced Lex/Flex compatibility (`yyin` is otherwise a pointer to the `reflex::Input` object to read files, streams, and strings).\n- Mar 23, 2020: 1.6.5 updated to permit `}` as closing marker for `%top{`, `%class{`, and `%init{` code blocks, i.e. `%}` or `}` may be used as closing markers.\n- Mar 31, 2020: 1.6.6 fixed an issue where a trailing backslash in a pattern in a lexer specification causes a reflex-generated C++ comment to extend to the next line, which results in a compilation warning and possibly a line of code being skipped.\n- Apr 30, 2020: 1.6.7 minor improvements to parse and convert regex patterns to FSMs.\n- May 14, 2020: 2.0.0 faster FSM construction; new FSM VM opcodes; relaxed limits of pattern length and complexity (max 16,711,679 FSM opcode words, from 65,536 words previously) for high-performance pattern matching with very long and complex regex patterns.\n- May 25, 2020: 2.0.1 resolved 64-bit build warnings; fixed reflex CRLF output in C++ source code on Windows.\n- Jun 29, 2020: 2.1.0 added Bison complete locations filename member access; added example Mini C compiler `minic` using RE/flex scanner with Bison 3.2 C++ complete locations, compiles C-like source code to Java bytecode (class files); added fast fuzzy (approximate) regex matcher `reflex::FuzzyMatcher` derived from `reflex::Matcher`.\n- Jul  8, 2020: 2.1.1 added `%option params` to extend `lex()`/`yylex()` parameters; updated AVX2 detection for SIMD optimizations.\n- Jul  9, 2020: 2.1.2 minor update to fix MSVC++ compiler error.\n- Aug  3, 2020: 2.1.3 improved `--bison-bridge` option; updated examples.\n- Aug 19, 2020: 2.1.4 changed `IN_HEADER` to `yyIN_HEADER` when `--flex` is used with `--header-file`; added `reflex::Input::Handler` event handler for custom handling of `FILE*` errors and non-blocking `FILE*` streams.\n- Sep 20, 2020: 2.1.5 added matcher method `lineno(n)` to set or change the line number to `n`; added `yyset_lineno(n,s)` to `flexlexer.h`; updated Mini C compiler example.\n- Oct 12, 2020: 3.0.0 fixed a regression bug since v2.x; redesigned internals to increase IO efficiency and regex pattern search speed.\n- Oct 24, 2020: 3.0.1 improved handling of UTF-16/32 file encodings on Windows to prevent ^Z eof when files are opened in text mode.\n- Mar 16, 2021: 3.0.2 minor improvements and additions; fixed MinGW builds.\n- Apr 29, 2021: 3.0.3 fixed `reflex::Input` copy constructor; minor improvements.\n- May 27, 2021: 3.0.4 improvements and fixes for minor issues.\n- Jun  1, 2021: 3.0.5 minor usability improvements; changed `\\d` to match Unicode when option `unicode` is enabled.\n- Jun  4, 2021: 3.0.6 minor improvements.\n- Jun  6, 2021: 3.0.7 updated examples to fix build problems.\n- Jul 15, 2021: 3.0.8 minor improvements.\n- Jul 22, 2021: 3.0.9 SIMD code split into `simd_avx2.cpp` and `simd_avx512bw.cpp` to support runtime CPU ID checking when the library is built with `./configure; make`, disable AVX with `./configure --disable-avx`, disable SSE2 with `./configure --disable-sse2`; UTF-16LE BOM detection correction.\n- Aug 14, 2021: 3.0.10 fixed missing `simd.h` after installation, added `REFLEX_BUFFER_SIZE` to customize the initial size and growth of the input buffer.\n- Sep 14, 2021: 3.0.11 minor change to apply `--prefix` to the generated `REFLEX_code_[PREFIX]STATE` code.\n- Oct 11, 2021: 3.0.12 updated to Unicode 14; fixed a compilation issue with `--params` when used with `--flex`.\n- Dec 10, 2021: 3.1.0 improved buffering mechanism with reduced buffer sizes; faster `columno()` for long lines; fix CP-1251 table typo.\n- Feb 20, 2022: 3.2.0 new `%option ctorinit`; faster compilation of regular expressions to tables and direct code DFAs; refactored SIMD source code to enable AVX2 and AVX512BW optimizations in multi-version matcher code; updated Windows binary file opening.\n- Feb 23, 2022: 3.2.1 regression bug in 3.2.0 fix.\n- Mar 13, 2022: 3.2.2 minor improvements.\n- Apr  2, 2022: 3.2.3 fixed C++17 compliance and dso build.\n- Apr 29, 2022: 3.2.4 new `%begin` directive; new `--batch=SIZE` option argument.\n- Apr 30, 2022: 3.2.5 minor correction.\n- May  6, 2022: 3.2.6 improved fuzzy matcher.\n- May 10, 2022: 3.2.7 improved fuzzy matcher, see also \u003chttps://github.com/Genivia/FuzzyMatcher\u003e.\n- Jul  6, 2022: 3.2.8 minor update to correct a lexer file parsing issue in the reflex code generator tool.\n- Aug 12, 2022: 3.2.9 add cmake rules for Windows builds.\n- Aug 21, 2022: 3.2.10 bug fix in regular expression converter.\n- Aug 29, 2022: 3.2.11 new lua2lisp transpiler example with Bison complete symbols and locations.\n- Jan  6, 2023: 3.2.12 regression bug fix in trailing context pattern matching, e.g. `xy` and `x/x` patterns collided when they should not; updated yaml parser example.\n- Jan 24, 2023: 3.3.0 overall update; corrected a problem with Unicode characters in regex patterns adjacent to curly braces; permit cxx extension in FSM filename output.\n- Mar  6, 2023: 3.3.1 for consistency include NAME in default header file name, tables file name, and graphs file name when option `--prefix` is specified.\n- Mar 17, 2023: 3.3.2 fix a performance issue with case-insensitive pattern construction.\n- May 28, 2023: 3.3.3 fix `yyrestart` dropping the first character; faster `Matcher::find()`.\n- May 31, 2023: 3.3.4 fix `Matcher::find()` initialization issue in 3.3.3.\n- Jun 12, 2023: 3.3.5 improve source code output of lexer class definitions.\n- Jul 11, 2023: 3.3.6 faster `Matcher::find()`; improved `--stdout` to include tables.\n- Jul 17, 2023: 3.3.7 faster `Matcher::find()`.\n- Aug  4, 2023: 3.3.8 minor update to sync up the code base with the ugrep project.\n- Aug 16, 2023: 3.3.9 fix avx512bw compilation error; new LineMatcher matching engine.\n- Sep 16, 2023: 3.4.0 fix `FuzzyMatcher::DEL` flag when this is the only flag selected; fix `FuzzyMatcher::matches()` bug that incorrectly matched an extra character before the end of the input; optimize `find()`; updated saving the FSM `pred[]` hashes to a file, which has changed; increase default buffer size `REFLEX_BUFSZ` to 128K for best throughput performance.\n- Sep 25, 2023: 3.4.1 make word boundaries `\\b`, `\\B`, `\\\u003c` and `\\\u003e` applicable anywhere in a pattern.\n- Oct  7, 2023: 3.5.0 updated to Unicode 15.1; clarify `.` (dot) with `%unicode` enabled, which is a catch-all pattern; update `\\X` to match only valid Unicode characters.\n- Nov  5, 2023: 3.5.1 minor improvements.\n- Feb 17, 2024: 4.0.0 faster `Matcher::find()` with a new DFA cut algorithm to optimize match prediction speed and accuracy, see also ugrep 5.0; apply Unicode pattern canonicalization with `reflex::convert(..., reflex::convert_flag::unicode)`.\n- Feb 23, 2024: 4.0.1 new `rawk` example to demonstrate awk-like fast search in C++; enable `\u003c\u003cEOF\u003e\u003e` rules for option `find` to generate a fast search engine.\n- Mar  5, 2024: 4.1.0 improved lazy quantifiers for POSIX regex lazy matching in linear time using an advanced DFA transformation algorithm introduced in RE/flex in 2016.\n- Mar 11, 2024: 4.1.1 minor update to correct a DFA construction problem for POSIX regex lazy quantifiers matching too much in some cases.\n- Mar 17, 2024: 4.1.2 updated configure scripts; cast negative ctype function arguments (problem detected on NetBSD 10).\n- Mar 27, 2024: 4.2.0 support pkg-config with `reflex.pc` (and `reflexmin.pc` minimized library) to use the reflex library `-lreflex`.\n- Apr 10, 2024: 4.2.1 minor update to adjust the current input pointer by one when not matching anything.\n- May 12, 2024: 4.3.0 faster `Matcher::find()` with refactored SIMD (SSE2/AVX2/AVX512BW/NEON/AArch64) code; larger default 256KB buffer (from 128KB).\n- Jun  6, 2024: 4.4.0 upgraded `reflex::Matcher` and `reflex::FuzzyMatcher` to respect Unicode word boundaries instead of only ASCII `\\\u003c`, `\\\u003e`, `\\b`, `\\B`; upgraded regex Unicode converters to Unicode `[::]` character classes instead of only ASCII `[[:alpha:]]` etc.; improved FSM code generation without local c0.\n- Aug  1, 2024: 4.5.0 minor speed improvements.\n- Oct 29, 2024: 5.0.0 faster SIMD regex search methods; improved anchor and word boundary matching speed and support; new `std::string_view strview()` matcher method.\n\n[logo-url]: https://www.genivia.com/images/reflex-logo.png\n[reflex-url]: https://www.genivia.com/reflex.html\n[manual-url]: https://www.genivia.com/doc/reflex/html\n[flex-url]: http://dinosaur.compilertools.net/#flex\n[lex-url]: http://dinosaur.compilertools.net/#lex\n[bison-url]: http://dinosaur.compilertools.net/#bison\n[dot-url]: http://www.graphviz.org\n[FSM-url]: https://www.genivia.com/images/reflex-FSM.png\n[boost-url]: http://www.boost.org\n[pcre-url]: http://www.pcre.org\n[ci-image]: https://github.com/Genivia/RE-flex/actions/workflows/c-cpp.yml/badge.svg\n[ci-url]: https://github.com/Genivia/RE-flex/actions/workflows/c-cpp.yml\n[bsd-3-image]: https://img.shields.io/badge/license-BSD%203--Clause-blue.svg\n[bsd-3-url]: https://opensource.org/licenses/BSD-3-Clause\n[codeproject-image]: https://img.shields.io/badge/CodeProject-★★★★★-orange.svg\n[codeproject-url]: https://www.codeproject.com/Articles/1180430/Constructing-Fast-Lexical-Analyzers-with-RE-flex-W\n","funding_links":[],"categories":["\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGenivia%2FRE-flex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGenivia%2FRE-flex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGenivia%2FRE-flex/lists"}