From 2397c02e711b90af011d42ffd9696a89b3ba4834 Mon Sep 17 00:00:00 2001 From: xiyang Date: Mon, 11 Mar 2024 16:08:41 -0400 Subject: [PATCH] Fix issue-2984 --- scripts/antlr4/Cypher.g4.copy | 10 +- src/antlr4/Cypher.g4 | 10 +- test/test_files/common/comment.test | 23 ++ test/test_runner/test_runner.cpp | 5 + third_party/antlr4_cypher/cypher_lexer.cpp | 312 +++++++++--------- third_party/antlr4_cypher/cypher_parser.cpp | 30 +- .../antlr4_cypher/include/cypher_lexer.h | 2 +- .../antlr4_cypher/include/cypher_parser.h | 6 +- 8 files changed, 219 insertions(+), 179 deletions(-) create mode 100644 test/test_files/common/comment.test diff --git a/scripts/antlr4/Cypher.g4.copy b/scripts/antlr4/Cypher.g4.copy index 763bb33a91..b2a757176c 100644 --- a/scripts/antlr4/Cypher.g4.copy +++ b/scripts/antlr4/Cypher.g4.copy @@ -58,9 +58,9 @@ kU_StandaloneCall CALL : ( 'C' | 'c' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'L' | 'l' ) ; kU_CommentOn - : COMMENT SP ON SP TABLE SP oC_SchemaName SP IS SP StringLiteral ; + : COMMENT_ SP ON SP TABLE SP oC_SchemaName SP IS SP StringLiteral ; -COMMENT : ( 'C' | 'c' ) ( 'O' | 'o' ) ( 'M' | 'm' ) ( 'M' | 'm' ) ( 'E' | 'e' ) ( 'N' | 'n' ) ( 'T' | 't' ) ; +COMMENT_ : ( 'C' | 'c' ) ( 'O' | 'o' ) ( 'M' | 'm' ) ( 'M' | 'm' ) ( 'E' | 'e' ) ( 'N' | 'n' ) ( 'T' | 't' ) ; kU_CreateMacro : CREATE SP MACRO SP oC_FunctionName SP? '(' SP? kU_PositionalArgs? SP? kU_DefaultArg? ( SP? ',' SP? kU_DefaultArg )* SP? ')' SP AS SP oC_Expression ; @@ -754,7 +754,7 @@ oC_SymbolicName // example of BEGIN and END: TCKWith2.Scenario1 kU_NonReservedKeywords - : COMMENT + : COMMENT_ | COUNT | NODE | REL @@ -819,7 +819,9 @@ WHITESPACE ; Comment - : ( '/*' ( Comment_1 | ( '*' Comment_2 ) )* '*/' ) ; + : ( '/*' ( Comment_1 | ( '*' Comment_2 ) )* '*/' ) + | ( '//' ( Comment_3 )* CR? ( LF | EOF ) ) + ; oC_LeftArrowHead : '<' diff --git a/src/antlr4/Cypher.g4 b/src/antlr4/Cypher.g4 index 763bb33a91..b2a757176c 100644 --- a/src/antlr4/Cypher.g4 +++ b/src/antlr4/Cypher.g4 @@ -58,9 +58,9 @@ kU_StandaloneCall CALL : ( 'C' | 'c' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'L' | 'l' ) ; kU_CommentOn - : COMMENT SP ON SP TABLE SP oC_SchemaName SP IS SP StringLiteral ; + : COMMENT_ SP ON SP TABLE SP oC_SchemaName SP IS SP StringLiteral ; -COMMENT : ( 'C' | 'c' ) ( 'O' | 'o' ) ( 'M' | 'm' ) ( 'M' | 'm' ) ( 'E' | 'e' ) ( 'N' | 'n' ) ( 'T' | 't' ) ; +COMMENT_ : ( 'C' | 'c' ) ( 'O' | 'o' ) ( 'M' | 'm' ) ( 'M' | 'm' ) ( 'E' | 'e' ) ( 'N' | 'n' ) ( 'T' | 't' ) ; kU_CreateMacro : CREATE SP MACRO SP oC_FunctionName SP? '(' SP? kU_PositionalArgs? SP? kU_DefaultArg? ( SP? ',' SP? kU_DefaultArg )* SP? ')' SP AS SP oC_Expression ; @@ -754,7 +754,7 @@ oC_SymbolicName // example of BEGIN and END: TCKWith2.Scenario1 kU_NonReservedKeywords - : COMMENT + : COMMENT_ | COUNT | NODE | REL @@ -819,7 +819,9 @@ WHITESPACE ; Comment - : ( '/*' ( Comment_1 | ( '*' Comment_2 ) )* '*/' ) ; + : ( '/*' ( Comment_1 | ( '*' Comment_2 ) )* '*/' ) + | ( '//' ( Comment_3 )* CR? ( LF | EOF ) ) + ; oC_LeftArrowHead : '<' diff --git a/test/test_files/common/comment.test b/test/test_files/common/comment.test new file mode 100644 index 0000000000..710ab47883 --- /dev/null +++ b/test/test_files/common/comment.test @@ -0,0 +1,23 @@ +-GROUP CommentTests +-DATASET CSV empty + +-- + +-CASE CommentTest + +-STATEMENT RETURN 1; // This is a comment +---- 1 +1 +-STATEMENT RETURN 1 // This is a comment ; +---- 1 +1 +-STATEMENT RETURN 1; /* This is a commnet */ +---- 1 +1 +-STATEMENT RETURN 1 /* This is a commnet */ ; +---- 1 +1 +-STATEMENT /* This is a commnet */ + RETURN 1; +---- 1 +1 \ No newline at end of file diff --git a/test/test_runner/test_runner.cpp b/test/test_runner/test_runner.cpp index 055d3ae6f3..0f11043423 100644 --- a/test/test_runner/test_runner.cpp +++ b/test/test_runner/test_runner.cpp @@ -116,6 +116,11 @@ bool TestRunner::checkLogicalPlan(std::unique_ptr& preparedSt } else if (statement->expectedOk && result->isSuccess()) { return true; } else { + if (!preparedStatement->success) { + spdlog::info( + "Query compilation failed with error: {}", preparedStatement->getErrorMessage()); + return false; + } auto planStr = preparedStatement->logicalPlans[planIdx]->toString(); if (checkPlanResult(result, statement, planStr, planIdx)) { return true; diff --git a/third_party/antlr4_cypher/cypher_lexer.cpp b/third_party/antlr4_cypher/cypher_lexer.cpp index ef3eedf02c..c821166ff2 100644 --- a/third_party/antlr4_cypher/cypher_lexer.cpp +++ b/third_party/antlr4_cypher/cypher_lexer.cpp @@ -62,7 +62,7 @@ void cypherlexerLexerInitialize() { "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40", - "T__41", "T__42", "T__43", "T__44", "CALL", "COMMENT", "MACRO", "GLOB", + "T__41", "T__42", "T__43", "T__44", "CALL", "COMMENT_", "MACRO", "GLOB", "COPY", "FROM", "COLUMN", "EXPORT", "IMPORT", "DATABASE", "NODE", "TABLE", "GROUP", "RDFGRAPH", "DROP", "ALTER", "DEFAULT", "RENAME", "ADD", "PRIMARY", "KEY", "REL", "TO", "EXPLAIN", "PROFILE", "BEGIN", @@ -106,7 +106,7 @@ void cypherlexerLexerInitialize() { std::vector{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", "", "", "", "", "CALL", "COMMENT", + "", "", "", "", "", "", "", "", "", "", "", "", "CALL", "COMMENT_", "MACRO", "GLOB", "COPY", "FROM", "COLUMN", "EXPORT", "IMPORT", "DATABASE", "NODE", "TABLE", "GROUP", "RDFGRAPH", "DROP", "ALTER", "DEFAULT", "RENAME", "ADD", "PRIMARY", "KEY", "REL", "TO", "EXPLAIN", "PROFILE", @@ -126,7 +126,7 @@ void cypherlexerLexerInitialize() { } ); static const int32_t serializedATNSegment[] = { - 4,0,150,1166,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, + 4,0,150,1183,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2, 14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2, 21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2, @@ -213,134 +213,136 @@ void cypherlexerLexerInitialize() { 4,145,1088,8,145,11,145,12,145,1089,1,146,4,146,1093,8,146,11,146,12, 146,1094,1,147,1,147,1,147,1,147,1,147,1,147,1,147,1,147,1,147,1,147, 1,147,1,147,3,147,1109,8,147,1,148,1,148,1,148,1,148,1,148,1,148,5,148, - 1117,8,148,10,148,12,148,1120,9,148,1,148,1,148,1,148,1,149,1,149,1,150, - 1,150,1,151,1,151,1,152,1,152,1,153,1,153,1,154,1,154,1,155,1,155,1,156, - 1,156,1,157,1,157,1,158,1,158,1,159,1,159,1,160,1,160,1,161,1,161,1,162, - 1,162,1,163,1,163,1,164,1,164,1,165,1,165,1,166,1,166,1,167,1,167,1,168, - 1,168,1,169,1,169,0,0,170,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19, - 10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21, - 43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65, - 33,67,34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44, - 89,45,91,46,93,47,95,48,97,49,99,50,101,51,103,52,105,53,107,54,109,55, - 111,56,113,57,115,58,117,59,119,60,121,61,123,62,125,63,127,64,129,65, - 131,66,133,67,135,68,137,69,139,70,141,71,143,72,145,73,147,74,149,75, - 151,76,153,77,155,78,157,79,159,80,161,81,163,82,165,83,167,84,169,85, - 171,86,173,87,175,88,177,89,179,90,181,91,183,92,185,93,187,94,189,95, - 191,96,193,97,195,98,197,99,199,100,201,101,203,102,205,103,207,104,209, - 105,211,106,213,107,215,108,217,109,219,110,221,111,223,112,225,113,227, - 114,229,115,231,116,233,117,235,118,237,119,239,120,241,121,243,122,245, - 123,247,124,249,125,251,126,253,127,255,128,257,129,259,130,261,131,263, - 132,265,133,267,134,269,135,271,136,273,137,275,138,277,139,279,140,281, - 141,283,142,285,143,287,144,289,145,291,146,293,147,295,148,297,149,299, - 0,301,0,303,0,305,0,307,0,309,0,311,0,313,0,315,0,317,0,319,0,321,0,323, - 0,325,0,327,0,329,0,331,0,333,0,335,0,337,0,339,150,1,0,45,2,0,67,67, - 99,99,2,0,65,65,97,97,2,0,76,76,108,108,2,0,79,79,111,111,2,0,77,77,109, - 109,2,0,69,69,101,101,2,0,78,78,110,110,2,0,84,84,116,116,2,0,82,82,114, - 114,2,0,71,71,103,103,2,0,66,66,98,98,2,0,80,80,112,112,2,0,89,89,121, - 121,2,0,70,70,102,102,2,0,85,85,117,117,2,0,88,88,120,120,2,0,73,73,105, - 105,2,0,68,68,100,100,2,0,83,83,115,115,2,0,72,72,104,104,2,0,75,75,107, - 107,2,0,87,87,119,119,13,0,34,34,39,39,66,66,70,70,78,78,82,82,84,84, - 92,92,98,98,102,102,110,110,114,114,116,116,2,0,65,70,97,102,8,0,160, - 160,5760,5760,6158,6158,8192,8202,8232,8233,8239,8239,8287,8287,12288, - 12288,1,0,12,12,1,0,96,96,1,0,30,30,768,0,48,57,65,90,95,95,97,122,170, - 170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748, - 748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931, - 1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425, - 1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552, - 1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808, - 1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144, - 2154,2160,2183,2185,2190,2200,2273,2275,2403,2406,2415,2417,2435,2437, - 2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503, - 2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558, - 2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613, - 2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649, - 2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730, - 2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784, - 2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858, - 2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908, - 2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962, - 2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006, - 3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086, - 3088,3090,3112,3114,3129,3132,3140,3142,3144,3146,3149,3157,3158,3160, - 3162,3165,3165,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218, - 3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3293, - 3294,3296,3299,3302,3311,3313,3315,3328,3340,3342,3344,3346,3396,3398, - 3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3457,3459,3461, - 3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542, - 3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713, - 3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782, - 3782,3784,3790,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893, - 3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993, - 4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304, - 4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746, - 4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824, - 4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112, - 5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5909,5919, - 5940,5952,5971,5984,5996,5998,6000,6002,6003,6016,6099,6103,6103,6108, - 6109,6112,6121,6155,6157,6159,6169,6176,6264,6272,6314,6320,6389,6400, - 6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608, - 6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832, - 6845,6847,6862,6912,6988,6992,7001,7019,7027,7040,7155,7168,7223,7232, - 7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424, - 7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029, - 8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144, - 8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8276,8276,8305, - 8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455, - 8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490, - 8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11507, - 11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670, - 11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726, - 11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341, - 12344,12348,12353,12438,12441,12447,12449,12538,12540,12543,12549,12591, - 12593,12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237, - 42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783, - 42786,42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43047, - 43052,43052,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259, - 43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518, - 43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741, - 43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814, - 43816,43822,43824,43866,43868,43881,43888,44010,44012,44013,44016,44025, - 44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262, - 64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321, - 64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019, - 65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276, - 65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479, - 65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594, - 65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045, - 66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426, - 66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729, - 66736,66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954, - 66956,66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004, - 67072,67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514, - 67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669, - 67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897, - 67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119, - 68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295, - 68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680, - 68736,68786,68800,68850,68864,68903,68912,68921,69248,69289,69291,69292, - 69296,69297,69373,69404,69415,69415,69424,69456,69488,69509,69552,69572, - 69600,69622,69632,69702,69734,69749,69759,69818,69826,69826,69840,69864, - 69872,69881,69888,69940,69942,69951,69956,69959,69968,70003,70006,70006, - 70016,70084,70089,70092,70094,70106,70108,70108,70144,70161,70163,70199, - 70206,70209,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312, - 70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440, - 70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477, - 70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730, - 70736,70745,70750,70753,70784,70853,70855,70855,70864,70873,71040,71093, - 71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352, - 71360,71369,71424,71450,71453,71467,71472,71481,71488,71494,71680,71738, - 71840,71913,71935,71942,71945,71945,71948,71955,71957,71958,71960,71989, - 71991,71992,71995,72003,72016,72025,72096,72103,72106,72151,72154,72161, - 72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72368,72440, - 72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871, - 72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021, - 73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105, - 73107,73112,73120,73129,73440,73462,73472,73488,73490,73530,73534,73538, - 73552,73561,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808, - 77824,78895,78912,78933,82944,83526,92160,92728,92736,92766,92768,92777, - 92784,92862,92864,92873,92880,92909,92912,92916,92928,92982,92992,92995, - 93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087, - 94095,94111,94176,94177,94179,94180,94192,94193,94208,100343,100352,101589, + 1117,8,148,10,148,12,148,1120,9,148,1,148,1,148,1,148,1,148,1,148,1,148, + 5,148,1128,8,148,10,148,12,148,1131,9,148,1,148,3,148,1134,8,148,1,148, + 1,148,3,148,1138,8,148,3,148,1140,8,148,1,149,1,149,1,150,1,150,1,151, + 1,151,1,152,1,152,1,153,1,153,1,154,1,154,1,155,1,155,1,156,1,156,1,157, + 1,157,1,158,1,158,1,159,1,159,1,160,1,160,1,161,1,161,1,162,1,162,1,163, + 1,163,1,164,1,164,1,165,1,165,1,166,1,166,1,167,1,167,1,168,1,168,1,169, + 1,169,0,0,170,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23, + 12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23, + 47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69, + 35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46, + 93,47,95,48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113, + 57,115,58,117,59,119,60,121,61,123,62,125,63,127,64,129,65,131,66,133, + 67,135,68,137,69,139,70,141,71,143,72,145,73,147,74,149,75,151,76,153, + 77,155,78,157,79,159,80,161,81,163,82,165,83,167,84,169,85,171,86,173, + 87,175,88,177,89,179,90,181,91,183,92,185,93,187,94,189,95,191,96,193, + 97,195,98,197,99,199,100,201,101,203,102,205,103,207,104,209,105,211, + 106,213,107,215,108,217,109,219,110,221,111,223,112,225,113,227,114,229, + 115,231,116,233,117,235,118,237,119,239,120,241,121,243,122,245,123,247, + 124,249,125,251,126,253,127,255,128,257,129,259,130,261,131,263,132,265, + 133,267,134,269,135,271,136,273,137,275,138,277,139,279,140,281,141,283, + 142,285,143,287,144,289,145,291,146,293,147,295,148,297,149,299,0,301, + 0,303,0,305,0,307,0,309,0,311,0,313,0,315,0,317,0,319,0,321,0,323,0,325, + 0,327,0,329,0,331,0,333,0,335,0,337,0,339,150,1,0,45,2,0,67,67,99,99, + 2,0,65,65,97,97,2,0,76,76,108,108,2,0,79,79,111,111,2,0,77,77,109,109, + 2,0,69,69,101,101,2,0,78,78,110,110,2,0,84,84,116,116,2,0,82,82,114,114, + 2,0,71,71,103,103,2,0,66,66,98,98,2,0,80,80,112,112,2,0,89,89,121,121, + 2,0,70,70,102,102,2,0,85,85,117,117,2,0,88,88,120,120,2,0,73,73,105,105, + 2,0,68,68,100,100,2,0,83,83,115,115,2,0,72,72,104,104,2,0,75,75,107,107, + 2,0,87,87,119,119,13,0,34,34,39,39,66,66,70,70,78,78,82,82,84,84,92,92, + 98,98,102,102,110,110,114,114,116,116,2,0,65,70,97,102,8,0,160,160,5760, + 5760,6158,6158,8192,8202,8232,8233,8239,8239,8287,8287,12288,12288,1, + 0,12,12,1,0,96,96,1,0,30,30,768,0,48,57,65,90,95,95,97,122,170,170,181, + 181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750, + 750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013, + 1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469, + 1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562, + 1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866, + 1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154, + 2160,2183,2185,2190,2200,2273,2275,2403,2406,2415,2417,2435,2437,2444, + 2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504, + 2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558, + 2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614, + 2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652, + 2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736, + 2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787, + 2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864, + 2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908,2909, + 2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965, + 2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010, + 3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088, + 3090,3112,3114,3129,3132,3140,3142,3144,3146,3149,3157,3158,3160,3162, + 3165,3165,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240, + 3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3293,3294, + 3296,3299,3302,3311,3313,3315,3328,3340,3342,3344,3346,3396,3398,3400, + 3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3457,3459,3461,3478, + 3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542, + 3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714, + 3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782, + 3784,3790,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893, + 3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028, + 4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346, + 4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749, + 4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880, + 4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117, + 5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5909,5919,5940, + 5952,5971,5984,5996,5998,6000,6002,6003,6016,6099,6103,6103,6108,6109, + 6112,6121,6155,6157,6159,6169,6176,6264,6272,6314,6320,6389,6400,6430, + 6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618, + 6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845, + 6847,6862,6912,6988,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241, + 7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7957, + 7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029, + 8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147, + 8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8276,8276,8305,8305, + 8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455, + 8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505, + 8508,8511,8517,8521,8526,8526,8544,8584,11264,11492,11499,11507,11520, + 11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680, + 11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728, + 11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344, + 12348,12353,12438,12441,12447,12449,12538,12540,12543,12549,12591,12593, + 12686,12704,12735,12784,12799,13312,19903,19968,42124,42192,42237,42240, + 42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786, + 42888,42891,42954,42960,42961,42963,42963,42965,42969,42994,43047,43052, + 43052,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261, + 43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520, + 43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744, + 43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816, + 43822,43824,43866,43868,43881,43888,44010,44012,44013,44016,44025,44032, + 55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275, + 64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323, + 64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024, + 65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296, + 65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482, + 65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596, + 65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176, + 66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432, + 66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736, + 66771,66776,66811,66816,66855,66864,66915,66928,66938,66940,66954,66956, + 66962,66964,66965,66967,66977,66979,66993,66995,67001,67003,67004,67072, + 67382,67392,67413,67424,67431,67456,67461,67463,67504,67506,67514,67584, + 67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680, + 67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968, + 68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121, + 68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297, + 68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736, + 68786,68800,68850,68864,68903,68912,68921,69248,69289,69291,69292,69296, + 69297,69373,69404,69415,69415,69424,69456,69488,69509,69552,69572,69600, + 69622,69632,69702,69734,69749,69759,69818,69826,69826,69840,69864,69872, + 69881,69888,69940,69942,69951,69956,69959,69968,70003,70006,70006,70016, + 70084,70089,70092,70094,70106,70108,70108,70144,70161,70163,70199,70206, + 70209,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320, + 70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442, + 70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480, + 70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736, + 70745,70750,70753,70784,70853,70855,70855,70864,70873,71040,71093,71096, + 71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360, + 71369,71424,71450,71453,71467,71472,71481,71488,71494,71680,71738,71840, + 71913,71935,71942,71945,71945,71948,71955,71957,71958,71960,71989,71991, + 71992,71995,72003,72016,72025,72096,72103,72106,72151,72154,72161,72163, + 72164,72192,72254,72263,72263,72272,72345,72349,72349,72368,72440,72704, + 72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873, + 72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023, + 73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107, + 73112,73120,73129,73440,73462,73472,73488,73490,73530,73534,73538,73552, + 73561,73648,73648,73728,74649,74752,74862,74880,75075,77712,77808,77824, + 78895,78912,78933,82944,83526,92160,92728,92736,92766,92768,92777,92784, + 92862,92864,92873,92880,92909,92912,92916,92928,92982,92992,92995,93008, + 93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095, + 94111,94176,94177,94179,94180,94192,94193,94208,100343,100352,101589, 101632,101640,110576,110579,110581,110587,110589,110590,110592,110882, 110898,110898,110928,110930,110933,110933,110948,110951,110960,111355, 113664,113770,113776,113788,113792,113800,113808,113817,113821,113822, @@ -479,7 +481,7 @@ void cypherlexerLexerInitialize() { 126585,126588,126590,126590,126592,126601,126603,126619,126625,126627, 126629,126633,126635,126651,131072,173791,173824,177977,177984,178205, 178208,183969,183984,191456,194560,195101,196608,201546,201552,205743, - 1178,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11, + 1199,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11, 1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0, 0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0, 0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43, @@ -541,12 +543,12 @@ void cypherlexerLexerInitialize() { 1003,1,0,0,0,269,1031,1,0,0,0,271,1034,1,0,0,0,273,1038,1,0,0,0,275,1042, 1,0,0,0,277,1046,1,0,0,0,279,1048,1,0,0,0,281,1050,1,0,0,0,283,1055,1, 0,0,0,285,1064,1,0,0,0,287,1073,1,0,0,0,289,1077,1,0,0,0,291,1087,1,0, - 0,0,293,1092,1,0,0,0,295,1108,1,0,0,0,297,1110,1,0,0,0,299,1124,1,0,0, - 0,301,1126,1,0,0,0,303,1128,1,0,0,0,305,1130,1,0,0,0,307,1132,1,0,0,0, - 309,1134,1,0,0,0,311,1136,1,0,0,0,313,1138,1,0,0,0,315,1140,1,0,0,0,317, - 1142,1,0,0,0,319,1144,1,0,0,0,321,1146,1,0,0,0,323,1148,1,0,0,0,325,1150, - 1,0,0,0,327,1152,1,0,0,0,329,1154,1,0,0,0,331,1156,1,0,0,0,333,1158,1, - 0,0,0,335,1160,1,0,0,0,337,1162,1,0,0,0,339,1164,1,0,0,0,341,342,5,59, + 0,0,293,1092,1,0,0,0,295,1108,1,0,0,0,297,1139,1,0,0,0,299,1141,1,0,0, + 0,301,1143,1,0,0,0,303,1145,1,0,0,0,305,1147,1,0,0,0,307,1149,1,0,0,0, + 309,1151,1,0,0,0,311,1153,1,0,0,0,313,1155,1,0,0,0,315,1157,1,0,0,0,317, + 1159,1,0,0,0,319,1161,1,0,0,0,321,1163,1,0,0,0,323,1165,1,0,0,0,325,1167, + 1,0,0,0,327,1169,1,0,0,0,329,1171,1,0,0,0,331,1173,1,0,0,0,333,1175,1, + 0,0,0,335,1177,1,0,0,0,337,1179,1,0,0,0,339,1181,1,0,0,0,341,342,5,59, 0,0,342,2,1,0,0,0,343,344,5,40,0,0,344,4,1,0,0,0,345,346,5,41,0,0,346, 6,1,0,0,0,347,348,5,44,0,0,348,8,1,0,0,0,349,350,5,61,0,0,350,10,1,0, 0,0,351,352,5,91,0,0,352,12,1,0,0,0,353,354,5,93,0,0,354,14,1,0,0,0,355, @@ -742,20 +744,26 @@ void cypherlexerLexerInitialize() { 296,1,0,0,0,1110,1111,5,47,0,0,1111,1112,5,42,0,0,1112,1118,1,0,0,0,1113, 1117,3,307,153,0,1114,1115,5,42,0,0,1115,1117,3,313,156,0,1116,1113,1, 0,0,0,1116,1114,1,0,0,0,1117,1120,1,0,0,0,1118,1116,1,0,0,0,1118,1119, - 1,0,0,0,1119,1121,1,0,0,0,1120,1118,1,0,0,0,1121,1122,5,42,0,0,1122,1123, - 5,47,0,0,1123,298,1,0,0,0,1124,1125,7,25,0,0,1125,300,1,0,0,0,1126,1127, - 8,26,0,0,1127,302,1,0,0,0,1128,1129,7,27,0,0,1129,304,1,0,0,0,1130,1131, - 7,28,0,0,1131,306,1,0,0,0,1132,1133,8,29,0,0,1133,308,1,0,0,0,1134,1135, - 8,30,0,0,1135,310,1,0,0,0,1136,1137,8,31,0,0,1137,312,1,0,0,0,1138,1139, - 8,32,0,0,1139,314,1,0,0,0,1140,1141,7,33,0,0,1141,316,1,0,0,0,1142,1143, - 7,34,0,0,1143,318,1,0,0,0,1144,1145,7,35,0,0,1145,320,1,0,0,0,1146,1147, - 7,36,0,0,1147,322,1,0,0,0,1148,1149,7,37,0,0,1149,324,1,0,0,0,1150,1151, - 7,38,0,0,1151,326,1,0,0,0,1152,1153,7,39,0,0,1153,328,1,0,0,0,1154,1155, - 8,40,0,0,1155,330,1,0,0,0,1156,1157,7,41,0,0,1157,332,1,0,0,0,1158,1159, - 7,42,0,0,1159,334,1,0,0,0,1160,1161,7,43,0,0,1161,336,1,0,0,0,1162,1163, - 7,44,0,0,1163,338,1,0,0,0,1164,1165,9,0,0,0,1165,340,1,0,0,0,24,0,986, - 988,995,997,1001,1021,1028,1031,1034,1038,1042,1046,1055,1062,1068,1073, - 1077,1083,1089,1094,1108,1116,1118,0 + 1,0,0,0,1119,1121,1,0,0,0,1120,1118,1,0,0,0,1121,1122,5,42,0,0,1122,1140, + 5,47,0,0,1123,1124,5,47,0,0,1124,1125,5,47,0,0,1125,1129,1,0,0,0,1126, + 1128,3,311,155,0,1127,1126,1,0,0,0,1128,1131,1,0,0,0,1129,1127,1,0,0, + 0,1129,1130,1,0,0,0,1130,1133,1,0,0,0,1131,1129,1,0,0,0,1132,1134,3,319, + 159,0,1133,1132,1,0,0,0,1133,1134,1,0,0,0,1134,1137,1,0,0,0,1135,1138, + 3,331,165,0,1136,1138,5,0,0,1,1137,1135,1,0,0,0,1137,1136,1,0,0,0,1138, + 1140,1,0,0,0,1139,1110,1,0,0,0,1139,1123,1,0,0,0,1140,298,1,0,0,0,1141, + 1142,7,25,0,0,1142,300,1,0,0,0,1143,1144,8,26,0,0,1144,302,1,0,0,0,1145, + 1146,7,27,0,0,1146,304,1,0,0,0,1147,1148,7,28,0,0,1148,306,1,0,0,0,1149, + 1150,8,29,0,0,1150,308,1,0,0,0,1151,1152,8,30,0,0,1152,310,1,0,0,0,1153, + 1154,8,31,0,0,1154,312,1,0,0,0,1155,1156,8,32,0,0,1156,314,1,0,0,0,1157, + 1158,7,33,0,0,1158,316,1,0,0,0,1159,1160,7,34,0,0,1160,318,1,0,0,0,1161, + 1162,7,35,0,0,1162,320,1,0,0,0,1163,1164,7,36,0,0,1164,322,1,0,0,0,1165, + 1166,7,37,0,0,1166,324,1,0,0,0,1167,1168,7,38,0,0,1168,326,1,0,0,0,1169, + 1170,7,39,0,0,1170,328,1,0,0,0,1171,1172,8,40,0,0,1172,330,1,0,0,0,1173, + 1174,7,41,0,0,1174,332,1,0,0,0,1175,1176,7,42,0,0,1176,334,1,0,0,0,1177, + 1178,7,43,0,0,1178,336,1,0,0,0,1179,1180,7,44,0,0,1180,338,1,0,0,0,1181, + 1182,9,0,0,0,1182,340,1,0,0,0,28,0,986,988,995,997,1001,1021,1028,1031, + 1034,1038,1042,1046,1055,1062,1068,1073,1077,1083,1089,1094,1108,1116, + 1118,1129,1133,1137,1139,0 }; staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0])); diff --git a/third_party/antlr4_cypher/cypher_parser.cpp b/third_party/antlr4_cypher/cypher_parser.cpp index da4f0be3d7..4555c6900d 100644 --- a/third_party/antlr4_cypher/cypher_parser.cpp +++ b/third_party/antlr4_cypher/cypher_parser.cpp @@ -109,7 +109,7 @@ void cypherParserInitialize() { std::vector{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", "", "", "", "", "CALL", "COMMENT", + "", "", "", "", "", "", "", "", "", "", "", "", "CALL", "COMMENT_", "MACRO", "GLOB", "COPY", "FROM", "COLUMN", "EXPORT", "IMPORT", "DATABASE", "NODE", "TABLE", "GROUP", "RDFGRAPH", "DROP", "ALTER", "DEFAULT", "RENAME", "ADD", "PRIMARY", "KEY", "REL", "TO", "EXPLAIN", "PROFILE", @@ -1593,7 +1593,7 @@ CypherParser::KU_CopyFromContext* CypherParser::kU_CopyFrom() { break; } - case CypherParser::COMMENT: + case CypherParser::COMMENT_: case CypherParser::EXPORT: case CypherParser::IMPORT: case CypherParser::DATABASE: @@ -2294,8 +2294,8 @@ CypherParser::KU_CommentOnContext::KU_CommentOnContext(ParserRuleContext *parent : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_CommentOnContext::COMMENT() { - return getToken(CypherParser::COMMENT, 0); +tree::TerminalNode* CypherParser::KU_CommentOnContext::COMMENT_() { + return getToken(CypherParser::COMMENT_, 0); } std::vector CypherParser::KU_CommentOnContext::SP() { @@ -2346,7 +2346,7 @@ CypherParser::KU_CommentOnContext* CypherParser::kU_CommentOn() { try { enterOuterAlt(_localctx, 1); setState(490); - match(CypherParser::COMMENT); + match(CypherParser::COMMENT_); setState(491); match(CypherParser::SP); setState(492); @@ -5358,7 +5358,7 @@ CypherParser::KU_LoadExtensionContext* CypherParser::kU_LoadExtension() { break; } - case CypherParser::COMMENT: + case CypherParser::COMMENT_: case CypherParser::EXPORT: case CypherParser::IMPORT: case CypherParser::DATABASE: @@ -6517,7 +6517,7 @@ CypherParser::KU_LoadFromContext* CypherParser::kU_LoadFrom() { break; } - case CypherParser::COMMENT: + case CypherParser::COMMENT_: case CypherParser::EXPORT: case CypherParser::IMPORT: case CypherParser::DATABASE: @@ -7723,7 +7723,7 @@ CypherParser::OC_ProjectionItemsContext* CypherParser::oC_ProjectionItems() { case CypherParser::T__5: case CypherParser::T__7: case CypherParser::T__25: - case CypherParser::COMMENT: + case CypherParser::COMMENT_: case CypherParser::EXPORT: case CypherParser::IMPORT: case CypherParser::DATABASE: @@ -8354,7 +8354,7 @@ CypherParser::OC_PatternPartContext* CypherParser::oC_PatternPart() { setState(1394); _errHandler->sync(this); switch (_input->LA(1)) { - case CypherParser::COMMENT: + case CypherParser::COMMENT_: case CypherParser::EXPORT: case CypherParser::IMPORT: case CypherParser::DATABASE: @@ -12850,7 +12850,7 @@ CypherParser::KU_StructFieldContext* CypherParser::kU_StructField() { setState(2065); _errHandler->sync(this); switch (_input->LA(1)) { - case CypherParser::COMMENT: + case CypherParser::COMMENT_: case CypherParser::EXPORT: case CypherParser::IMPORT: case CypherParser::DATABASE: @@ -13699,7 +13699,7 @@ CypherParser::OC_PropertyLookupContext* CypherParser::oC_PropertyLookup() { setState(2214); _errHandler->sync(this); switch (_input->LA(1)) { - case CypherParser::COMMENT: + case CypherParser::COMMENT_: case CypherParser::EXPORT: case CypherParser::IMPORT: case CypherParser::DATABASE: @@ -14168,7 +14168,7 @@ CypherParser::OC_ParameterContext* CypherParser::oC_Parameter() { setState(2278); _errHandler->sync(this); switch (_input->LA(1)) { - case CypherParser::COMMENT: + case CypherParser::COMMENT_: case CypherParser::EXPORT: case CypherParser::IMPORT: case CypherParser::DATABASE: @@ -14500,7 +14500,7 @@ CypherParser::OC_SymbolicNameContext* CypherParser::oC_SymbolicName() { break; } - case CypherParser::COMMENT: + case CypherParser::COMMENT_: case CypherParser::EXPORT: case CypherParser::IMPORT: case CypherParser::DATABASE: @@ -14536,8 +14536,8 @@ CypherParser::KU_NonReservedKeywordsContext::KU_NonReservedKeywordsContext(Parse : ParserRuleContext(parent, invokingState) { } -tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::COMMENT() { - return getToken(CypherParser::COMMENT, 0); +tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::COMMENT_() { + return getToken(CypherParser::COMMENT_, 0); } tree::TerminalNode* CypherParser::KU_NonReservedKeywordsContext::COUNT() { diff --git a/third_party/antlr4_cypher/include/cypher_lexer.h b/third_party/antlr4_cypher/include/cypher_lexer.h index ef7e9367f0..ff904a1f41 100644 --- a/third_party/antlr4_cypher/include/cypher_lexer.h +++ b/third_party/antlr4_cypher/include/cypher_lexer.h @@ -19,7 +19,7 @@ class CypherLexer : public antlr4::Lexer { T__26 = 27, T__27 = 28, T__28 = 29, T__29 = 30, T__30 = 31, T__31 = 32, T__32 = 33, T__33 = 34, T__34 = 35, T__35 = 36, T__36 = 37, T__37 = 38, T__38 = 39, T__39 = 40, T__40 = 41, T__41 = 42, T__42 = 43, T__43 = 44, - T__44 = 45, CALL = 46, COMMENT = 47, MACRO = 48, GLOB = 49, COPY = 50, + T__44 = 45, CALL = 46, COMMENT_ = 47, MACRO = 48, GLOB = 49, COPY = 50, FROM = 51, COLUMN = 52, EXPORT = 53, IMPORT = 54, DATABASE = 55, NODE = 56, TABLE = 57, GROUP = 58, RDFGRAPH = 59, DROP = 60, ALTER = 61, DEFAULT = 62, RENAME = 63, ADD = 64, PRIMARY = 65, KEY = 66, REL = 67, TO = 68, EXPLAIN = 69, diff --git a/third_party/antlr4_cypher/include/cypher_parser.h b/third_party/antlr4_cypher/include/cypher_parser.h index 7b1e2a803f..e38c621b02 100644 --- a/third_party/antlr4_cypher/include/cypher_parser.h +++ b/third_party/antlr4_cypher/include/cypher_parser.h @@ -19,7 +19,7 @@ class CypherParser : public antlr4::Parser { T__26 = 27, T__27 = 28, T__28 = 29, T__29 = 30, T__30 = 31, T__31 = 32, T__32 = 33, T__33 = 34, T__34 = 35, T__35 = 36, T__36 = 37, T__37 = 38, T__38 = 39, T__39 = 40, T__40 = 41, T__41 = 42, T__42 = 43, T__43 = 44, - T__44 = 45, CALL = 46, COMMENT = 47, MACRO = 48, GLOB = 49, COPY = 50, + T__44 = 45, CALL = 46, COMMENT_ = 47, MACRO = 48, GLOB = 49, COPY = 50, FROM = 51, COLUMN = 52, EXPORT = 53, IMPORT = 54, DATABASE = 55, NODE = 56, TABLE = 57, GROUP = 58, RDFGRAPH = 59, DROP = 60, ALTER = 61, DEFAULT = 62, RENAME = 63, ADD = 64, PRIMARY = 65, KEY = 66, REL = 67, TO = 68, EXPLAIN = 69, @@ -427,7 +427,7 @@ class CypherParser : public antlr4::Parser { public: KU_CommentOnContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - antlr4::tree::TerminalNode *COMMENT(); + antlr4::tree::TerminalNode *COMMENT_(); std::vector SP(); antlr4::tree::TerminalNode* SP(size_t i); antlr4::tree::TerminalNode *ON(); @@ -2338,7 +2338,7 @@ class CypherParser : public antlr4::Parser { public: KU_NonReservedKeywordsContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; - antlr4::tree::TerminalNode *COMMENT(); + antlr4::tree::TerminalNode *COMMENT_(); antlr4::tree::TerminalNode *COUNT(); antlr4::tree::TerminalNode *NODE(); antlr4::tree::TerminalNode *REL();