Skip to content

Commit 75aeded

Browse files
committed
added lookahead for regexp binary
1 parent ec0dc88 commit 75aeded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/javacc/net/sf/jsqlparser/parser/JSqlParserCC.jj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
195195
| <K_CURRENT: "CURRENT">
196196
| <K_ROW: "ROW">
197197
| <K_RETURNING: "RETURNING">
198-
| <K_REGEXP_B: "REGEXP BINARY">
198+
| <K_BINARY: "BINARY">
199199
| <K_REGEXP: "REGEXP">
200200
}
201201

@@ -1280,8 +1280,8 @@ Expression RegularCondition():
12801280
| "!=" { result = new NotEqualsTo("!="); }
12811281
| "@@" { result = new Matches(); }
12821282
| "~" { result = new RegExpMatchOperator(RegExpMatchOperatorType.MATCH_CASESENSITIVE); }
1283+
| LOOKAHEAD(2) <K_REGEXP> <K_BINARY> { result = new RegExpMySQLOperator(RegExpMatchOperatorType.MATCH_CASESENSITIVE); }
12831284
| <K_REGEXP> { result = new RegExpMySQLOperator(RegExpMatchOperatorType.MATCH_CASEINSENSITIVE); }
1284-
| <K_REGEXP_B> { result = new RegExpMySQLOperator(RegExpMatchOperatorType.MATCH_CASESENSITIVE); }
12851285
| "~*" { result = new RegExpMatchOperator(RegExpMatchOperatorType.MATCH_CASEINSENSITIVE); }
12861286
| "!~" { result = new RegExpMatchOperator(RegExpMatchOperatorType.NOT_MATCH_CASESENSITIVE); }
12871287
| "!~*" { result = new RegExpMatchOperator(RegExpMatchOperatorType.NOT_MATCH_CASEINSENSITIVE); }

0 commit comments

Comments
 (0)