mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
alternate fix for #13938 (folloup 5d989ab)
This commit is contained in:
parent
6a3753e2e8
commit
36000463ff
@ -132,45 +132,48 @@ string "'"{str_char}*"'"
|
||||
\n yylineno++;
|
||||
}
|
||||
|
||||
"NOT" { U_OP(uoNot); return NOT; }
|
||||
"AND" { B_OP(boAnd); return AND; }
|
||||
"OR" { B_OP(boOr); return OR; }
|
||||
"NOT" { U_OP(uoNot); return NOT; }
|
||||
"AND" { B_OP(boAnd); return AND; }
|
||||
"OR" { B_OP(boOr); return OR; }
|
||||
|
||||
"=" { B_OP(boEQ); return EQ; }
|
||||
"!=" { B_OP(boNE); return NE; }
|
||||
"<=" { B_OP(boLE); return LE; }
|
||||
">=" { B_OP(boGE); return GE; }
|
||||
"<>" { B_OP(boNE); return NE; }
|
||||
"<" { B_OP(boLT); return LT; }
|
||||
">" { B_OP(boGT); return GT; }
|
||||
"=" { B_OP(boEQ); return EQ; }
|
||||
"!=" { B_OP(boNE); return NE; }
|
||||
"<=" { B_OP(boLE); return LE; }
|
||||
">=" { B_OP(boGE); return GE; }
|
||||
"<>" { B_OP(boNE); return NE; }
|
||||
"<" { B_OP(boLT); return LT; }
|
||||
">" { B_OP(boGT); return GT; }
|
||||
|
||||
"~" { B_OP(boRegexp); return REGEXP; }
|
||||
"LIKE" { B_OP(boLike); return LIKE; }
|
||||
"ILIKE" { B_OP(boILike); return LIKE; }
|
||||
"IS" { B_OP(boIs); return IS; }
|
||||
"||" { B_OP(boConcat); return CONCAT; }
|
||||
"~" { B_OP(boRegexp); return REGEXP; }
|
||||
"LIKE" { B_OP(boLike); return LIKE; }
|
||||
"NOT"{white}"LIKE" { B_OP(boNotLike); return LIKE; }
|
||||
"ILIKE" { B_OP(boILike); return LIKE; }
|
||||
"NOT"{white}"ILIKE" { B_OP(boNotILike); return LIKE; }
|
||||
"IS" { B_OP(boIs); return IS; }
|
||||
"IS"{white}"NOT" { B_OP(boIsNot); return IS; }
|
||||
"||" { B_OP(boConcat); return CONCAT; }
|
||||
|
||||
"+" { B_OP(boPlus); return PLUS; }
|
||||
"-" { B_OP(boMinus); return MINUS; }
|
||||
"*" { B_OP(boMul); return MUL; }
|
||||
"//" { B_OP(boIntDiv); return INTDIV; }
|
||||
"/" { B_OP(boDiv); return DIV; }
|
||||
"%" { B_OP(boMod); return MOD; }
|
||||
"^" { B_OP(boPow); return POW; }
|
||||
"+" { B_OP(boPlus); return PLUS; }
|
||||
"-" { B_OP(boMinus); return MINUS; }
|
||||
"*" { B_OP(boMul); return MUL; }
|
||||
"//" { B_OP(boIntDiv); return INTDIV; }
|
||||
"/" { B_OP(boDiv); return DIV; }
|
||||
"%" { B_OP(boMod); return MOD; }
|
||||
"^" { B_OP(boPow); return POW; }
|
||||
|
||||
"IN" { return IN; }
|
||||
"IN" { return IN; }
|
||||
|
||||
"NULL" { return NULLVALUE; }
|
||||
"NULL" { return NULLVALUE; }
|
||||
|
||||
"CASE" { return CASE; }
|
||||
"WHEN" { return WHEN; }
|
||||
"THEN" { return THEN; }
|
||||
"ELSE" { return ELSE; }
|
||||
"END" { return END; }
|
||||
"CASE" { return CASE; }
|
||||
"WHEN" { return WHEN; }
|
||||
"THEN" { return THEN; }
|
||||
"ELSE" { return ELSE; }
|
||||
"END" { return END; }
|
||||
|
||||
[()] { return yytext[0]; }
|
||||
[()] { return yytext[0]; }
|
||||
|
||||
"," { return COMMA; }
|
||||
"," { return COMMA; }
|
||||
|
||||
{num_float} { yylval->numberFloat = cLocale.toDouble( QString::fromAscii(yytext) ); return NUMBER_FLOAT; }
|
||||
{num_int} {
|
||||
|
@ -168,9 +168,7 @@ expression:
|
||||
| expression GT expression { $$ = BINOP($2, $1, $3); }
|
||||
| expression REGEXP expression { $$ = BINOP($2, $1, $3); }
|
||||
| expression LIKE expression { $$ = BINOP($2, $1, $3); }
|
||||
| expression NOT LIKE expression { $$ = BINOP($3==QgsExpression::boLike ? QgsExpression::boNotLike : QgsExpression::boNotILike, $1, $4); }
|
||||
| expression IS expression { $$ = BINOP($2, $1, $3); }
|
||||
| expression IS NOT expression { $$ = BINOP(QgsExpression::boIsNot, $1, $4); }
|
||||
| expression PLUS expression { $$ = BINOP($2, $1, $3); }
|
||||
| expression MINUS expression { $$ = BINOP($2, $1, $3); }
|
||||
| expression MUL expression { $$ = BINOP($2, $1, $3); }
|
||||
@ -181,7 +179,6 @@ expression:
|
||||
| expression CONCAT expression { $$ = BINOP($2, $1, $3); }
|
||||
| NOT expression { $$ = new QgsExpression::NodeUnaryOperator($1, $2); }
|
||||
| '(' expression ')' { $$ = $2; }
|
||||
|
||||
| FUNCTION '(' exp_list ')'
|
||||
{
|
||||
int fnIndex = QgsExpression::functionIndex(*$1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user