@@ -632,6 +632,7 @@ TOKEN : /* Statement Separators */
632632TOKEN : /* Operators */
633633{
634634 <OP_GREATERTHANEQUALS: ">" (<WHITESPACE>)* "=">
635+ | <OP_COSINESIMILARITY: "<=>">
635636| <OP_MINORTHANEQUALS: "<" (<WHITESPACE>)* "=">
636637| <OP_NOTEQUALSSTANDARD: "<" (<WHITESPACE>)* ">">
637638| <OP_NOTEQUALSBANG: "!" (<WHITESPACE>)* "=">
@@ -758,11 +759,15 @@ TOKEN:
758759 // 2) continue tokenizing after that <SPECIAL_ESC> with a new <S_CHAR_LITERAL> or any other Token
759760 if ( !configuration.getAsBoolean(Feature.allowBackslashEscapeCharacter)
760761 && matchedToken.image.contains("\\'") ) {
762+
761763 matchedToken.image = "'" + image.substring( 0, image.indexOf("\\'") + 1 ) + "'";
762764 // `charLiteralIndex` defined in TokenManagerDeclaration above
763765 matchedToken.kind = charLiteralIndex;
764766 input_stream.backup(image.length() + 1 - matchedToken.image.length());
765- } else if ( configuration.getAsBoolean(Feature.allowBackslashEscapeCharacter) && matchedToken.image.contains("\\''") ) {
767+
768+ } else if ( configuration.getAsBoolean(Feature.allowBackslashEscapeCharacter)
769+ && matchedToken.image.contains("\\''") ) {
770+
766771 matchedToken.image = "'" + image.substring( 0, image.lastIndexOf("\\'") + 3);
767772 // `charLiteralIndex` defined in TokenManagerDeclaration above
768773 matchedToken.kind = charLiteralIndex;
@@ -771,7 +776,9 @@ TOKEN:
771776 }
772777| < S_QUOTED_IDENTIFIER: "\"" ( "\"\"" | ~["\n","\r","\""])* "\"" | "$$" (~["$"])* "$$" | ("`" (~["\n","\r","`"])+ "`") | ( "[" (~["\n","\r","]"])* "]" ) >
773778 {
774- if ( !configuration.getAsBoolean(Feature.allowSquareBracketQuotation) && matchedToken.image.charAt(0) == '[' ) {
779+ if ( !configuration.getAsBoolean(Feature.allowSquareBracketQuotation)
780+ && matchedToken.image.charAt(0) == '[' ) {
781+
775782 matchedToken.image = "[";
776783 // `squaredBracketOpenIndex` defined in TokenManagerDeclaration above
777784 matchedToken.kind = squaredBracketOpenIndex;
@@ -4624,7 +4631,7 @@ Expression RegularCondition() #RegularCondition:
46244631 | "-#" { result = new JsonOperator("-#"); }
46254632 | "<->" { result = new GeometryDistance("<->"); }
46264633 | "<#>" { result = new GeometryDistance("<#>"); }
4627- | "<=>" { result = new CosineSimilarity(); }
4634+ | <OP_COSINESIMILARITY> { result = new CosineSimilarity(); }
46284635 )
46294636
46304637 ( LOOKAHEAD(2) <K_PRIOR> rightExpression=ComparisonItem() { oraclePrior = EqualsTo.ORACLE_PRIOR_END; }
0 commit comments