/* Generated by re2c 3.1 on Tue Jan 27 20:35:15 2026 */
#line 1 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
/**
 * @file  FilterLexer.re
 *
 * @brief Lexer for the filter parser.
 */
#line 11 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"


#include "pch.h"
#include "FilterParser.h"
#include "FilterLexer.h"
#include <string>

int FilterLexer::yylex()
{
begin:
	
#line 21 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
{
	char yych;
	unsigned int yyaccept = 0;
	yych = *YYCURSOR;
	switch (yych) {
		case '\t':
		case '\n':
		case '\r':
		case ' ': goto yy3;
		case '!': goto yy5;
		case '"': goto yy6;
		case '%': goto yy7;
		case '(': goto yy8;
		case ')': goto yy9;
		case '*': goto yy10;
		case '+': goto yy11;
		case ',': goto yy12;
		case '-': goto yy13;
		case '.': goto yy14;
		case '/': goto yy15;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy16;
		case '<': goto yy18;
		case '=': goto yy20;
		case '>': goto yy22;
		case 'A':
		case 'a': goto yy24;
		case 'B':
		case 'E':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'P':
		case 'Q':
		case 'S':
		case 'U':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'b':
		case 'e':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'p':
		case 'q':
		case 's':
		case 'u':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		case 'C':
		case 'c': goto yy28;
		case 'D':
		case 'd': goto yy29;
		case 'F':
		case 'f': goto yy30;
		case 'L':
		case 'l': goto yy31;
		case 'M':
		case 'm': goto yy32;
		case 'N':
		case 'n': goto yy33;
		case 'O':
		case 'o': goto yy34;
		case 'R':
		case 'r': goto yy35;
		case 'T':
		case 't': goto yy36;
		case 'V':
		case 'v': goto yy37;
		default:
			if (YYLIMIT <= YYCURSOR) goto yy128;
			goto yy1;
	}
yy1:
	++YYCURSOR;
yy2:
#line 104 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return LEXER_ERR_UNKNOWN_CHAR; }
#line 117 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy3:
	yych = *++YYCURSOR;
	switch (yych) {
		case '\t':
		case '\n':
		case '\r':
		case ' ': goto yy3;
		default: goto yy4;
	}
yy4:
#line 22 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ goto begin; }
#line 130 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy5:
	yych = *++YYCURSOR;
	switch (yych) {
		case '=': goto yy38;
		default: goto yy2;
	}
yy6:
	++YYCURSOR;
#line 80 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{
		int errorCode = 0;
		std::string str = UnescapeQuotes(YYCURSOR, errorCode);
		if (errorCode != 0)
			return errorCode;
		yylval.string = DupString(str.c_str());
		return TK_STRING_LITERAL;
	}
#line 148 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy7:
	++YYCURSOR;
#line 101 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_MOD; }
#line 153 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy8:
	++YYCURSOR;
#line 95 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_LPAREN; }
#line 158 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy9:
	++YYCURSOR;
#line 96 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_RPAREN; }
#line 163 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy10:
	++YYCURSOR;
#line 99 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_STAR; }
#line 168 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy11:
	++YYCURSOR;
#line 97 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_PLUS; }
#line 173 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy12:
	++YYCURSOR;
#line 103 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_COMMA; }
#line 178 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy13:
	++YYCURSOR;
#line 98 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_MINUS; }
#line 183 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy14:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy39;
		default: goto yy2;
	}
yy15:
	++YYCURSOR;
#line 100 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_SLASH; }
#line 203 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy16:
	yyaccept = 0;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case '.': goto yy41;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy16;
		case 'B':
		case 'b': goto yy42;
		case 'D':
		case 'd': goto yy43;
		case 'E':
		case 'e': goto yy45;
		case 'G':
		case 'K':
		case 'T':
		case 'g':
		case 'k':
		case 't': goto yy47;
		case 'H':
		case 'h': goto yy48;
		case 'M':
		case 'm': goto yy49;
		case 'S':
		case 's': goto yy50;
		case 'W':
		case 'w': goto yy51;
		default: goto yy17;
	}
yy17:
#line 68 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{
		yylval.integer = std::stoi(std::string((const char*)yycursor, YYCURSOR - yycursor));
		return TK_INTEGER_LITERAL;
	}
#line 247 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy18:
	yych = *++YYCURSOR;
	switch (yych) {
		case '=': goto yy52;
		default: goto yy19;
	}
yy19:
#line 91 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_LT; }
#line 257 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy20:
	yych = *++YYCURSOR;
	switch (yych) {
		case '=': goto yy53;
		default: goto yy21;
	}
yy21:
#line 89 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_EQ; }
#line 267 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy22:
	yych = *++YYCURSOR;
	switch (yych) {
		case '=': goto yy54;
		default: goto yy23;
	}
yy23:
#line 93 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_GT; }
#line 277 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy24:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'N':
		case 'n': goto yy55;
		default: goto yy27;
	}
yy25:
#line 72 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{
		const char* p = yycursor;
		while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n')
			p++;
		std::string tmp = std::string(p, YYCURSOR - p);
		yylval.string = DupString(tmp.c_str());
		return TK_IDENTIFIER;
	}
#line 296 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy26:
	yych = *++YYCURSOR;
yy27:
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy25;
	}
yy28:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'O':
		case 'o': goto yy56;
		default: goto yy27;
	}
yy29:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case '"': goto yy57;
		default: goto yy27;
	}
yy30:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'A':
		case 'a': goto yy58;
		default: goto yy27;
	}
yy31:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'I':
		case 'i': goto yy59;
		default: goto yy27;
	}
yy32:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'A':
		case 'a': goto yy60;
		default: goto yy27;
	}
yy33:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'O':
		case 'o': goto yy61;
		default: goto yy27;
	}
yy34:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'R':
		case 'r': goto yy62;
		default: goto yy27;
	}
yy35:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'E':
		case 'e': goto yy64;
		default: goto yy27;
	}
yy36:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'R':
		case 'r': goto yy65;
		default: goto yy27;
	}
yy37:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case '"': goto yy66;
		default: goto yy27;
	}
yy38:
	++YYCURSOR;
#line 90 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_NE; }
#line 448 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy39:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy39;
		default: goto yy40;
	}
yy40:
#line 64 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{
		yylval.real = std::stod(std::string((const char*)yycursor, YYCURSOR - yycursor));
		return TK_DOUBLE_LITERAL;
	}
#line 470 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy41:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy67;
		default: goto yy40;
	}
yy42:
	++YYCURSOR;
#line 32 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{
		const char* p = yycursor;
		while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n')
			p++;
		std::string lit(p, YYCURSOR - p);
		yylval.string = DupString(lit.c_str());
		return TK_SIZE_LITERAL;
	}
#line 497 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy43:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 'A':
		case 'a': goto yy68;
		default: goto yy44;
	}
yy44:
#line 40 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{
		const char* p = yycursor;
		while (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n')
			p++;
		std::string lit(p, YYCURSOR - p);
		yylval.string = DupString(lit.c_str());
		return TK_DURATION_LITERAL;
	}
#line 516 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy45:
	yych = *++YYCURSOR;
	switch (yych) {
		case '+':
		case '-': goto yy69;
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy39;
		default: goto yy46;
	}
yy46:
	YYCURSOR = YYMARKER;
	switch (yyaccept) {
		case 0: goto yy17;
		case 1: goto yy44;
		default: goto yy40;
	}
yy47:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'B':
		case 'b': goto yy42;
		default: goto yy46;
	}
yy48:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 'O':
		case 'o': goto yy70;
		case 'R':
		case 'r': goto yy71;
		default: goto yy44;
	}
yy49:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 'B':
		case 'b': goto yy42;
		case 'I':
		case 'i': goto yy72;
		case 'S':
		case 's': goto yy73;
		default: goto yy44;
	}
yy50:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 'E':
		case 'e': goto yy74;
		default: goto yy44;
	}
yy51:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 'E':
		case 'e': goto yy75;
		default: goto yy44;
	}
yy52:
	++YYCURSOR;
#line 92 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_LE; }
#line 590 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy53:
	++YYCURSOR;
#line 88 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_EQ; }
#line 595 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy54:
	++YYCURSOR;
#line 94 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_GE; }
#line 600 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy55:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'D':
		case 'd': goto yy76;
		default: goto yy27;
	}
yy56:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'N':
		case 'n': goto yy78;
		default: goto yy27;
	}
yy57:
	++YYCURSOR;
#line 48 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{
		int errorCode = 0;
		std::string str = UnescapeQuotes(YYCURSOR, errorCode);
		if (errorCode != 0)
			return errorCode;
		yylval.string = DupString(str.c_str());
		return TK_DATETIME_LITERAL;
	}
#line 628 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy58:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'L':
		case 'l': goto yy79;
		default: goto yy27;
	}
yy59:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'K':
		case 'k': goto yy80;
		default: goto yy27;
	}
yy60:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'T':
		case 't': goto yy81;
		default: goto yy27;
	}
yy61:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'T':
		case 't': goto yy82;
		default: goto yy27;
	}
yy62:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy63;
	}
yy63:
#line 24 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_OR; }
#line 732 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy64:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'C':
		case 'c': goto yy84;
		default: goto yy27;
	}
yy65:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'U':
		case 'u': goto yy85;
		default: goto yy27;
	}
yy66:
	++YYCURSOR;
#line 56 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{
		int errorCode = 0;
		std::string str = UnescapeQuotes(YYCURSOR, errorCode);
		if (errorCode != 0)
			return errorCode;
		yylval.string = DupString(str.c_str());
		return TK_VERSION_LITERAL;
	}
#line 760 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy67:
	yyaccept = 2;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy67;
		case 'B':
		case 'b': goto yy42;
		case 'D':
		case 'd': goto yy43;
		case 'E':
		case 'e': goto yy45;
		case 'G':
		case 'K':
		case 'T':
		case 'g':
		case 'k':
		case 't': goto yy47;
		case 'H':
		case 'h': goto yy48;
		case 'M':
		case 'm': goto yy49;
		case 'S':
		case 's': goto yy50;
		case 'W':
		case 'w': goto yy51;
		default: goto yy40;
	}
yy68:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'Y':
		case 'y': goto yy86;
		default: goto yy46;
	}
yy69:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9': goto yy39;
		default: goto yy46;
	}
yy70:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'U':
		case 'u': goto yy87;
		default: goto yy46;
	}
yy71:
	++YYCURSOR;
	goto yy44;
yy72:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'L':
		case 'l': goto yy88;
		case 'N':
		case 'n': goto yy89;
		default: goto yy46;
	}
yy73:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 'E':
		case 'e': goto yy90;
		default: goto yy44;
	}
yy74:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'C':
		case 'c': goto yy91;
		default: goto yy46;
	}
yy75:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'E':
		case 'e': goto yy92;
		default: goto yy46;
	}
yy76:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy77;
	}
yy77:
#line 23 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_AND; }
#line 931 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy78:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'T':
		case 't': goto yy93;
		default: goto yy27;
	}
yy79:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'S':
		case 's': goto yy94;
		default: goto yy27;
	}
yy80:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'E':
		case 'e': goto yy95;
		default: goto yy27;
	}
yy81:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'C':
		case 'c': goto yy97;
		default: goto yy27;
	}
yy82:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy83;
	}
yy83:
#line 25 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_NOT; }
#line 1035 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy84:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'O':
		case 'o': goto yy98;
		default: goto yy27;
	}
yy85:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'E':
		case 'e': goto yy99;
		default: goto yy27;
	}
yy86:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'S':
		case 's': goto yy71;
		default: goto yy44;
	}
yy87:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'R':
		case 'r': goto yy86;
		default: goto yy46;
	}
yy88:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'L':
		case 'l': goto yy101;
		default: goto yy46;
	}
yy89:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 'U':
		case 'u': goto yy102;
		default: goto yy44;
	}
yy90:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'C':
		case 'c': goto yy71;
		default: goto yy46;
	}
yy91:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case 'O':
		case 'o': goto yy103;
		default: goto yy44;
	}
yy92:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'K':
		case 'k': goto yy86;
		default: goto yy46;
	}
yy93:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'A':
		case 'a': goto yy104;
		default: goto yy27;
	}
yy94:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'E':
		case 'e': goto yy105;
		default: goto yy27;
	}
yy95:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy96;
	}
yy96:
#line 30 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_LIKE; }
#line 1190 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy97:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'H':
		case 'h': goto yy107;
		default: goto yy27;
	}
yy98:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'N':
		case 'n': goto yy108;
		default: goto yy27;
	}
yy99:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy100;
	}
yy100:
#line 26 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ yylval.boolean = true; return TK_TRUE_LITERAL; }
#line 1278 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy101:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'I':
		case 'i': goto yy109;
		default: goto yy46;
	}
yy102:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'T':
		case 't': goto yy110;
		default: goto yy46;
	}
yy103:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'N':
		case 'n': goto yy111;
		default: goto yy46;
	}
yy104:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'I':
		case 'i': goto yy112;
		default: goto yy27;
	}
yy105:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy106;
	}
yy106:
#line 27 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ yylval.boolean = false; return TK_FALSE_LITERAL; }
#line 1379 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy107:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'E':
		case 'e': goto yy113;
		default: goto yy27;
	}
yy108:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'T':
		case 't': goto yy114;
		default: goto yy27;
	}
yy109:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'S':
		case 's': goto yy115;
		default: goto yy46;
	}
yy110:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'E':
		case 'e': goto yy86;
		default: goto yy46;
	}
yy111:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'D':
		case 'd': goto yy86;
		default: goto yy46;
	}
yy112:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'N':
		case 'n': goto yy116;
		default: goto yy27;
	}
yy113:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'S':
		case 's': goto yy117;
		default: goto yy27;
	}
yy114:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'A':
		case 'a': goto yy119;
		default: goto yy27;
	}
yy115:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'E':
		case 'e': goto yy120;
		default: goto yy46;
	}
yy116:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'S':
		case 's': goto yy121;
		default: goto yy27;
	}
yy117:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy118;
	}
yy118:
#line 31 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_MATCHES; }
#line 1527 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy119:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'I':
		case 'i': goto yy123;
		default: goto yy27;
	}
yy120:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'C':
		case 'c': goto yy124;
		default: goto yy46;
	}
yy121:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy122;
	}
yy122:
#line 28 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_CONTAINS; }
#line 1614 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy123:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'N':
		case 'n': goto yy125;
		default: goto yy27;
	}
yy124:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'O':
		case 'o': goto yy103;
		default: goto yy46;
	}
yy125:
	yych = *++YYCURSOR;
	switch (yych) {
		case 0x00: goto yy25;
		case 'S':
		case 's': goto yy126;
		default: goto yy27;
	}
yy126:
	yych = *++YYCURSOR;
	switch (yych) {
		case '0':
		case '1':
		case '2':
		case '3':
		case '4':
		case '5':
		case '6':
		case '7':
		case '8':
		case '9':
		case 'A':
		case 'B':
		case 'C':
		case 'D':
		case 'E':
		case 'F':
		case 'G':
		case 'H':
		case 'I':
		case 'J':
		case 'K':
		case 'L':
		case 'M':
		case 'N':
		case 'O':
		case 'P':
		case 'Q':
		case 'R':
		case 'S':
		case 'T':
		case 'U':
		case 'V':
		case 'W':
		case 'X':
		case 'Y':
		case 'Z':
		case '_':
		case 'a':
		case 'b':
		case 'c':
		case 'd':
		case 'e':
		case 'f':
		case 'g':
		case 'h':
		case 'i':
		case 'j':
		case 'k':
		case 'l':
		case 'm':
		case 'n':
		case 'o':
		case 'p':
		case 'q':
		case 'r':
		case 's':
		case 't':
		case 'u':
		case 'v':
		case 'w':
		case 'x':
		case 'y':
		case 'z': goto yy26;
		default: goto yy127;
	}
yy127:
#line 29 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return TK_RECONTAINS; }
#line 1709 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
yy128:
#line 102 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"
	{ return 0; }
#line 1713 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.cpp"
}
#line 105 "d:\\dev\\winmerge-stable\\BuildTmp\\Src\\Src\\FilterEngine\\FilterLexer.re"

}

std::string FilterLexer::UnescapeQuotes(char*& str, int& errorCode)
{
	errorCode = LEXER_ERR_UNTERMINATED_STRING;
	std::string result;
	while (*str != '\0')
	{
		if (*str == '"')
		{
			if (*(str + 1) == '"')
			{
				result += '"';
				str += 2;
			}
			else
			{
				str++;
				errorCode = 0;
				break;
			}
		}
		else
		{
			result += *str++;
		}
	}
	return result;
}

const char* FilterLexer::DupString(const char* str)
{
	char* newStr = _strdup(str);
	strings.push_back(newStr);
	return newStr;
}

void FilterLexer::FreeStrings()
{
	for (auto str : strings)
		free(str);
	strings.clear();
}

