Genivia / RE-flex

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.
https://www.genivia.com/doc/reflex/html
BSD 3-Clause "New" or "Revised" License
504 stars 85 forks source link

Fixed erroneous pre-increment to post-increment. #167

Closed SouravKB closed 1 year ago

SouravKB commented 1 year ago

Previous pre-increment in absmatcher.h:1031 was actually causing the value to get incremented rather than the pointer. Also, pre-incrementing the pointer in absmatcher.h:1031 would not work as it is post-incremented in absmatcher.h:1029.

Sample test case:

    #include <cassert>
%o unicode
%%
. assert(matcher().winput() == int(U'§')); return 0;
%%
int main() {
    Lexer(u8"0§").lex();
}