diff --git a/CHANGELOG.md b/CHANGELOG.md index c9c84f7a..2aa72aba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ - Move `Misc::getAliases()` into `SelectStatement::getAliases()` (#454) - Drop `USE_UTF_STRINGS` constant (#471) +## [5.10.1] - 2024-11-10 + +### Fixed + +- Fix parsing of ALTER TABLE … RENAME KEY (#580) +- Fix parsing table names that start with "e1" (#578) +- Improve handling of negative and overflowed offsets on TokensList (#582) +- Fix parsing of queries with 'AND' (#590) +- Fix C style comments with two asterisks (#597) +- Fix parsing of SRID in column definition (#595) + ## [5.10.0] - 2024-08-29 - Fix parsing of UPDATE ... SET (#577) @@ -586,6 +597,7 @@ __Breaking changes:__ * First release of this library. +[5.10.1]: https://github.com/phpmyadmin/sql-parser/compare/5.10.0...5.10.1 [5.10.0]: https://github.com/phpmyadmin/sql-parser/compare/5.9.1...5.10.0 [5.9.1]: https://github.com/phpmyadmin/sql-parser/compare/5.9.0...5.9.1 [5.9.0]: https://github.com/phpmyadmin/sql-parser/compare/5.8.2...5.9.0 diff --git a/src/Lexer.php b/src/Lexer.php index b16608ff..69b33ca3 100644 --- a/src/Lexer.php +++ b/src/Lexer.php @@ -568,7 +568,7 @@ public function parseComment(): Token|null // - "SELECT */* comment */ FROM ..." // - "SELECT 2*/* comment */3 AS `six`;" $next = $this->last + 1; - if (($next < $this->len) && $this->str[$next] === '*') { + if (($next < $this->len) && $this->str[$next] === '*' && $token === '*/') { // Conflict in "*/*": first "*" was not for ending a comment. // Stop here and let other parsing method define the true behavior of that first star. $this->last = $iBak; diff --git a/src/Parsers/CreateDefinitions.php b/src/Parsers/CreateDefinitions.php index 0c79e69b..21cdff85 100644 --- a/src/Parsers/CreateDefinitions.php +++ b/src/Parsers/CreateDefinitions.php @@ -83,6 +83,7 @@ final class CreateDefinitions implements Parseable 'ENFORCED' => 14, 'NOT' => 15, 'COMPRESSED' => 16, + 'SRID' => [17, 'var'], // Common entries. // // NOTE: Some of the common options are not in the same order which diff --git a/tests/Lexer/LexerTest.php b/tests/Lexer/LexerTest.php index a1a40c8d..10d4d90d 100644 --- a/tests/Lexer/LexerTest.php +++ b/tests/Lexer/LexerTest.php @@ -75,6 +75,7 @@ public static function lexProvider(): array ['lexer/lexOperator'], ['lexer/lexOperatorStarIsArithmetic'], ['lexer/lexOperatorStarIsWildcard'], + ['lexer/lexEmptyCStyleComment'], ['lexer/lexString'], ['lexer/lexStringErr1'], ['lexer/lexSymbol'], diff --git a/tests/Parser/CreateStatementTest.php b/tests/Parser/CreateStatementTest.php index 543e93ed..7eaf4957 100644 --- a/tests/Parser/CreateStatementTest.php +++ b/tests/Parser/CreateStatementTest.php @@ -59,6 +59,7 @@ public static function createProvider(): array ['parser/parseCreateTableAsSelect'], ['parser/parseCreateTableLike'], ['parser/parseCreateTableSpatial'], + ['parser/parseCreateTableSRID'], ['parser/parseCreateTableTimestampWithPrecision'], ['parser/parseCreateTableEnforcedCheck'], ['parser/parseCreateTableNotEnforcedCheck'], diff --git a/tests/data/lexer/lexEmptyCStyleComment.in b/tests/data/lexer/lexEmptyCStyleComment.in new file mode 100644 index 00000000..b32191ce --- /dev/null +++ b/tests/data/lexer/lexEmptyCStyleComment.in @@ -0,0 +1,5 @@ +SELECT /**/ 1 +SELECT /*+*/ 1 +SELECT /***/ 1 +SELECT /** */ 1 +SELECT /* **/ 1 diff --git a/tests/data/lexer/lexEmptyCStyleComment.out b/tests/data/lexer/lexEmptyCStyleComment.out new file mode 100644 index 00000000..0313e276 --- /dev/null +++ b/tests/data/lexer/lexEmptyCStyleComment.out @@ -0,0 +1,376 @@ +{ + "query": "SELECT /**/ 1\nSELECT /*+*/ 1\nSELECT /***/ 1\nSELECT /** */ 1\nSELECT /* **/ 1\n", + "lexer": { + "@type": "PhpMyAdmin\\SqlParser\\Lexer", + "strict": false, + "errors": [], + "str": "SELECT /**/ 1\nSELECT /*+*/ 1\nSELECT /***/ 1\nSELECT /** */ 1\nSELECT /* **/ 1\n", + "len": 76, + "last": 76, + "list": { + "@type": "PhpMyAdmin\\SqlParser\\TokensList", + "count": 31, + "idx": 0, + "tokens": [ + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "SELECT", + "value": "SELECT", + "keyword": "SELECT", + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Keyword", + "value": 1 + }, + "flags": 3, + "position": 0 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Whitespace", + "value": 3 + }, + "flags": 0, + "position": 6 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "/**/", + "value": "/**/", + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Comment", + "value": 4 + }, + "flags": 2, + "position": 7 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 11 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "1", + "value": 1, + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Number", + "value": 6 + }, + "flags": 0, + "position": 12 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 13 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "SELECT", + "value": "SELECT", + "keyword": "SELECT", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 14 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 20 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "/*+*/", + "value": "/*+*/", + "keyword": null, + "type": { + "@type": "@7" + }, + "flags": 2, + "position": 21 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 26 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "1", + "value": 1, + "keyword": null, + "type": { + "@type": "@10" + }, + "flags": 0, + "position": 27 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 28 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "SELECT", + "value": "SELECT", + "keyword": "SELECT", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 29 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 35 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "/***/", + "value": "/***/", + "keyword": null, + "type": { + "@type": "@7" + }, + "flags": 2, + "position": 36 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 41 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "1", + "value": 1, + "keyword": null, + "type": { + "@type": "@10" + }, + "flags": 0, + "position": 42 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 43 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "SELECT", + "value": "SELECT", + "keyword": "SELECT", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 44 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 50 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "/** */", + "value": "/** */", + "keyword": null, + "type": { + "@type": "@7" + }, + "flags": 2, + "position": 51 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 57 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "1", + "value": 1, + "keyword": null, + "type": { + "@type": "@10" + }, + "flags": 0, + "position": 58 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 59 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "SELECT", + "value": "SELECT", + "keyword": "SELECT", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 60 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 66 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "/* **/", + "value": "/* **/", + "keyword": null, + "type": { + "@type": "@7" + }, + "flags": 2, + "position": 67 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 73 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "1", + "value": 1, + "keyword": null, + "type": { + "@type": "@10" + }, + "flags": 0, + "position": 74 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 75 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "", + "value": "", + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Delimiter", + "value": 9 + }, + "flags": 0, + "position": null + } + ] + }, + "delimiter": ";", + "delimiterLen": 1 + }, + "parser": null, + "errors": { + "lexer": [], + "parser": [] + } +} \ No newline at end of file diff --git a/tests/data/lexer/lexOperatorStarIsWildcard.in b/tests/data/lexer/lexOperatorStarIsWildcard.in index 087c3b99..c9270891 100644 --- a/tests/data/lexer/lexOperatorStarIsWildcard.in +++ b/tests/data/lexer/lexOperatorStarIsWildcard.in @@ -6,7 +6,7 @@ SELECT a.*, b.* FROM SELECT a.*, /* with a comment */ b.* FROM SELECT a.*,/* with a comment */b.* FROM SELECT a.* /* comment */ FROM --- SELECT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.) +SELECT a.*/* comment */ FROM SELECT DISTINCT * FROM SELECT DISTINCT *FROM SELECT DISTINCT a.* FROM @@ -15,7 +15,7 @@ SELECT DISTINCT a.*, b.* FROM SELECT DISTINCT a.*, /* with a comment */ b.* FROM SELECT DISTINCT a.*,/* with a comment */b.* FROM SELECT DISTINCT a.* /* comment */ FROM --- SELECT DISTINCT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.) +SELECT DISTINCT a.*/* comment */ FROM SELECT `*` FROM table_name SELECT `*`.* FROM table_name AS `*` SELECT COUNT(*) FROM table_name diff --git a/tests/data/lexer/lexOperatorStarIsWildcard.out b/tests/data/lexer/lexOperatorStarIsWildcard.out index 4ed29e17..37bd3130 100644 --- a/tests/data/lexer/lexOperatorStarIsWildcard.out +++ b/tests/data/lexer/lexOperatorStarIsWildcard.out @@ -1,15 +1,15 @@ { - "query": "SELECT * FROM\nSELECT *FROM\nSELECT a.* FROM\nSELECT a.*,b.* FROM\nSELECT a.*, b.* FROM\nSELECT a.*, /* with a comment */ b.* FROM\nSELECT a.*,/* with a comment */b.* FROM\nSELECT a.* /* comment */ FROM\n-- SELECT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.)\nSELECT DISTINCT * FROM\nSELECT DISTINCT *FROM\nSELECT DISTINCT a.* FROM\nSELECT DISTINCT a.*,b.* FROM\nSELECT DISTINCT a.*, b.* FROM\nSELECT DISTINCT a.*, /* with a comment */ b.* FROM\nSELECT DISTINCT a.*,/* with a comment */b.* FROM\nSELECT DISTINCT a.* /* comment */ FROM\n-- SELECT DISTINCT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.)\nSELECT `*` FROM table_name\nSELECT `*`.* FROM table_name AS `*`\nSELECT COUNT(*) FROM table_name\nSELECT COUNT( * ) FROM table_name\nSELECT COUNT( * /* comment with *,USING,FROM */) FROM table_name\nSELECT COUNT(`*`) FROM table_name\nSELECT 1 FROM table_name WHERE LABEL LIKE '%*%'\nDELETE a.* USING\nDELETE a.*, b.* USING\nDELETE a.* ,b.* USING\nDELETE a.* , b.* USING\nDELETE a.* /* comment */ USING\nDELETE a.* /* comment */, b.* /*comment*/ USING\nDELETE a.* /* comment */ ,b.* /*comment*/ USING\nDELETE a.* /* comment */ , b.* /*comment*/ USING\n\n", + "query": "SELECT * FROM\nSELECT *FROM\nSELECT a.* FROM\nSELECT a.*,b.* FROM\nSELECT a.*, b.* FROM\nSELECT a.*, /* with a comment */ b.* FROM\nSELECT a.*,/* with a comment */b.* FROM\nSELECT a.* /* comment */ FROM\nSELECT a.*/* comment */ FROM\nSELECT DISTINCT * FROM\nSELECT DISTINCT *FROM\nSELECT DISTINCT a.* FROM\nSELECT DISTINCT a.*,b.* FROM\nSELECT DISTINCT a.*, b.* FROM\nSELECT DISTINCT a.*, /* with a comment */ b.* FROM\nSELECT DISTINCT a.*,/* with a comment */b.* FROM\nSELECT DISTINCT a.* /* comment */ FROM\nSELECT DISTINCT a.*/* comment */ FROM\nSELECT `*` FROM table_name\nSELECT `*`.* FROM table_name AS `*`\nSELECT COUNT(*) FROM table_name\nSELECT COUNT( * ) FROM table_name\nSELECT COUNT( * /* comment with *,USING,FROM */) FROM table_name\nSELECT COUNT(`*`) FROM table_name\nSELECT 1 FROM table_name WHERE LABEL LIKE '%*%'\nDELETE a.* USING\nDELETE a.*, b.* USING\nDELETE a.* ,b.* USING\nDELETE a.* , b.* USING\nDELETE a.* /* comment */ USING\nDELETE a.* /* comment */, b.* /*comment*/ USING\nDELETE a.* /* comment */ ,b.* /*comment*/ USING\nDELETE a.* /* comment */ , b.* /*comment*/ USING\n\n", "lexer": { "@type": "PhpMyAdmin\\SqlParser\\Lexer", "strict": false, "errors": [], - "str": "SELECT * FROM\nSELECT *FROM\nSELECT a.* FROM\nSELECT a.*,b.* FROM\nSELECT a.*, b.* FROM\nSELECT a.*, /* with a comment */ b.* FROM\nSELECT a.*,/* with a comment */b.* FROM\nSELECT a.* /* comment */ FROM\n-- SELECT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.)\nSELECT DISTINCT * FROM\nSELECT DISTINCT *FROM\nSELECT DISTINCT a.* FROM\nSELECT DISTINCT a.*,b.* FROM\nSELECT DISTINCT a.*, b.* FROM\nSELECT DISTINCT a.*, /* with a comment */ b.* FROM\nSELECT DISTINCT a.*,/* with a comment */b.* FROM\nSELECT DISTINCT a.* /* comment */ FROM\n-- SELECT DISTINCT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.)\nSELECT `*` FROM table_name\nSELECT `*`.* FROM table_name AS `*`\nSELECT COUNT(*) FROM table_name\nSELECT COUNT( * ) FROM table_name\nSELECT COUNT( * /* comment with *,USING,FROM */) FROM table_name\nSELECT COUNT(`*`) FROM table_name\nSELECT 1 FROM table_name WHERE LABEL LIKE '%*%'\nDELETE a.* USING\nDELETE a.*, b.* USING\nDELETE a.* ,b.* USING\nDELETE a.* , b.* USING\nDELETE a.* /* comment */ USING\nDELETE a.* /* comment */, b.* /*comment*/ USING\nDELETE a.* /* comment */ ,b.* /*comment*/ USING\nDELETE a.* /* comment */ , b.* /*comment*/ USING\n\n", - "len": 1348, - "last": 1348, + "str": "SELECT * FROM\nSELECT *FROM\nSELECT a.* FROM\nSELECT a.*,b.* FROM\nSELECT a.*, b.* FROM\nSELECT a.*, /* with a comment */ b.* FROM\nSELECT a.*,/* with a comment */b.* FROM\nSELECT a.* /* comment */ FROM\nSELECT a.*/* comment */ FROM\nSELECT DISTINCT * FROM\nSELECT DISTINCT *FROM\nSELECT DISTINCT a.* FROM\nSELECT DISTINCT a.*,b.* FROM\nSELECT DISTINCT a.*, b.* FROM\nSELECT DISTINCT a.*, /* with a comment */ b.* FROM\nSELECT DISTINCT a.*,/* with a comment */b.* FROM\nSELECT DISTINCT a.* /* comment */ FROM\nSELECT DISTINCT a.*/* comment */ FROM\nSELECT `*` FROM table_name\nSELECT `*`.* FROM table_name AS `*`\nSELECT COUNT(*) FROM table_name\nSELECT COUNT( * ) FROM table_name\nSELECT COUNT( * /* comment with *,USING,FROM */) FROM table_name\nSELECT COUNT(`*`) FROM table_name\nSELECT 1 FROM table_name WHERE LABEL LIKE '%*%'\nDELETE a.* USING\nDELETE a.*, b.* USING\nDELETE a.* ,b.* USING\nDELETE a.* , b.* USING\nDELETE a.* /* comment */ USING\nDELETE a.* /* comment */, b.* /*comment*/ USING\nDELETE a.* /* comment */ ,b.* /*comment*/ USING\nDELETE a.* /* comment */ , b.* /*comment*/ USING\n\n", + "len": 1068, + "last": 1068, "list": { "@type": "PhpMyAdmin\\SqlParser\\TokensList", - "count": 382, + "count": 398, "idx": 0, "tokens": [ { @@ -926,14 +926,91 @@ }, { "@type": "PhpMyAdmin\\SqlParser\\Token", - "token": "-- SELECT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.)", - "value": "-- SELECT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.)", + "token": "SELECT", + "value": "SELECT", + "keyword": "SELECT", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 196 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 202 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "a", + "value": "a", + "keyword": null, + "type": { + "@type": "@19" + }, + "flags": 0, + "position": 203 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ".", + "value": ".", + "keyword": null, + "type": { + "@type": "@7" + }, + "flags": 16, + "position": 204 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "*", + "value": "*", + "keyword": null, + "type": { + "@type": "@7" + }, + "flags": 16, + "position": 205 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "/* comment */", + "value": "/* comment */", "keyword": null, "type": { "@type": "@58" }, - "flags": 4, - "position": 196 + "flags": 2, + "position": 206 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 219 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "FROM", + "value": "FROM", + "keyword": "FROM", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 220 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -944,7 +1021,7 @@ "@type": "@5" }, "flags": 0, - "position": 364 + "position": 224 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -955,7 +1032,7 @@ "@type": "@3" }, "flags": 3, - "position": 365 + "position": 225 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -966,7 +1043,7 @@ "@type": "@5" }, "flags": 0, - "position": 371 + "position": 231 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -977,7 +1054,7 @@ "@type": "@3" }, "flags": 3, - "position": 372 + "position": 232 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -988,7 +1065,7 @@ "@type": "@5" }, "flags": 0, - "position": 380 + "position": 240 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -999,7 +1076,7 @@ "@type": "@7" }, "flags": 16, - "position": 381 + "position": 241 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1010,7 +1087,7 @@ "@type": "@5" }, "flags": 0, - "position": 382 + "position": 242 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1021,7 +1098,7 @@ "@type": "@3" }, "flags": 3, - "position": 383 + "position": 243 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1032,7 +1109,7 @@ "@type": "@5" }, "flags": 0, - "position": 387 + "position": 247 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1043,7 +1120,7 @@ "@type": "@3" }, "flags": 3, - "position": 388 + "position": 248 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1054,7 +1131,7 @@ "@type": "@5" }, "flags": 0, - "position": 394 + "position": 254 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1065,7 +1142,7 @@ "@type": "@3" }, "flags": 3, - "position": 395 + "position": 255 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1076,7 +1153,7 @@ "@type": "@5" }, "flags": 0, - "position": 403 + "position": 263 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1087,7 +1164,7 @@ "@type": "@7" }, "flags": 16, - "position": 404 + "position": 264 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1098,7 +1175,7 @@ "@type": "@3" }, "flags": 3, - "position": 405 + "position": 265 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1109,7 +1186,7 @@ "@type": "@5" }, "flags": 0, - "position": 409 + "position": 269 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1120,7 +1197,7 @@ "@type": "@3" }, "flags": 3, - "position": 410 + "position": 270 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1131,7 +1208,7 @@ "@type": "@5" }, "flags": 0, - "position": 416 + "position": 276 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1142,7 +1219,7 @@ "@type": "@3" }, "flags": 3, - "position": 417 + "position": 277 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1153,7 +1230,7 @@ "@type": "@5" }, "flags": 0, - "position": 425 + "position": 285 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1164,7 +1241,7 @@ "@type": "@19" }, "flags": 0, - "position": 426 + "position": 286 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1175,7 +1252,7 @@ "@type": "@7" }, "flags": 16, - "position": 427 + "position": 287 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1186,7 +1263,7 @@ "@type": "@7" }, "flags": 16, - "position": 428 + "position": 288 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1197,7 +1274,7 @@ "@type": "@5" }, "flags": 0, - "position": 429 + "position": 289 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1208,7 +1285,7 @@ "@type": "@3" }, "flags": 3, - "position": 430 + "position": 290 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1219,7 +1296,7 @@ "@type": "@5" }, "flags": 0, - "position": 434 + "position": 294 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1230,7 +1307,7 @@ "@type": "@3" }, "flags": 3, - "position": 435 + "position": 295 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1241,7 +1318,7 @@ "@type": "@5" }, "flags": 0, - "position": 441 + "position": 301 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1252,7 +1329,7 @@ "@type": "@3" }, "flags": 3, - "position": 442 + "position": 302 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1263,7 +1340,7 @@ "@type": "@5" }, "flags": 0, - "position": 450 + "position": 310 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1274,7 +1351,7 @@ "@type": "@19" }, "flags": 0, - "position": 451 + "position": 311 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1285,7 +1362,7 @@ "@type": "@7" }, "flags": 16, - "position": 452 + "position": 312 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1296,7 +1373,7 @@ "@type": "@7" }, "flags": 16, - "position": 453 + "position": 313 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1307,7 +1384,7 @@ "@type": "@7" }, "flags": 16, - "position": 454 + "position": 314 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1318,7 +1395,7 @@ "@type": "@19" }, "flags": 0, - "position": 455 + "position": 315 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1329,7 +1406,7 @@ "@type": "@7" }, "flags": 16, - "position": 456 + "position": 316 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1340,7 +1417,7 @@ "@type": "@7" }, "flags": 16, - "position": 457 + "position": 317 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1351,7 +1428,7 @@ "@type": "@5" }, "flags": 0, - "position": 458 + "position": 318 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1362,7 +1439,7 @@ "@type": "@3" }, "flags": 3, - "position": 459 + "position": 319 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1373,7 +1450,7 @@ "@type": "@5" }, "flags": 0, - "position": 463 + "position": 323 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1384,7 +1461,7 @@ "@type": "@3" }, "flags": 3, - "position": 464 + "position": 324 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1395,7 +1472,7 @@ "@type": "@5" }, "flags": 0, - "position": 470 + "position": 330 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1406,7 +1483,7 @@ "@type": "@3" }, "flags": 3, - "position": 471 + "position": 331 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1417,7 +1494,7 @@ "@type": "@5" }, "flags": 0, - "position": 479 + "position": 339 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1428,7 +1505,7 @@ "@type": "@19" }, "flags": 0, - "position": 480 + "position": 340 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1439,7 +1516,7 @@ "@type": "@7" }, "flags": 16, - "position": 481 + "position": 341 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1450,7 +1527,7 @@ "@type": "@7" }, "flags": 16, - "position": 482 + "position": 342 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1461,7 +1538,7 @@ "@type": "@7" }, "flags": 16, - "position": 483 + "position": 343 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1472,7 +1549,7 @@ "@type": "@5" }, "flags": 0, - "position": 484 + "position": 344 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1483,7 +1560,7 @@ "@type": "@19" }, "flags": 0, - "position": 485 + "position": 345 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1494,7 +1571,7 @@ "@type": "@7" }, "flags": 16, - "position": 486 + "position": 346 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1505,7 +1582,7 @@ "@type": "@7" }, "flags": 16, - "position": 487 + "position": 347 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1516,7 +1593,7 @@ "@type": "@5" }, "flags": 0, - "position": 488 + "position": 348 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1527,7 +1604,7 @@ "@type": "@3" }, "flags": 3, - "position": 489 + "position": 349 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1538,7 +1615,7 @@ "@type": "@5" }, "flags": 0, - "position": 493 + "position": 353 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1549,7 +1626,7 @@ "@type": "@3" }, "flags": 3, - "position": 494 + "position": 354 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1560,7 +1637,7 @@ "@type": "@5" }, "flags": 0, - "position": 500 + "position": 360 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1571,7 +1648,7 @@ "@type": "@3" }, "flags": 3, - "position": 501 + "position": 361 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1582,7 +1659,7 @@ "@type": "@5" }, "flags": 0, - "position": 509 + "position": 369 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1593,7 +1670,7 @@ "@type": "@19" }, "flags": 0, - "position": 510 + "position": 370 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1604,7 +1681,7 @@ "@type": "@7" }, "flags": 16, - "position": 511 + "position": 371 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1615,7 +1692,7 @@ "@type": "@7" }, "flags": 16, - "position": 512 + "position": 372 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1626,7 +1703,7 @@ "@type": "@7" }, "flags": 16, - "position": 513 + "position": 373 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1637,7 +1714,7 @@ "@type": "@5" }, "flags": 0, - "position": 514 + "position": 374 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1648,7 +1725,7 @@ "@type": "@58" }, "flags": 2, - "position": 515 + "position": 375 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1659,7 +1736,7 @@ "@type": "@5" }, "flags": 0, - "position": 535 + "position": 395 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1670,7 +1747,7 @@ "@type": "@19" }, "flags": 0, - "position": 536 + "position": 396 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1681,7 +1758,7 @@ "@type": "@7" }, "flags": 16, - "position": 537 + "position": 397 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1692,7 +1769,7 @@ "@type": "@7" }, "flags": 16, - "position": 538 + "position": 398 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1703,7 +1780,7 @@ "@type": "@5" }, "flags": 0, - "position": 539 + "position": 399 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1714,7 +1791,7 @@ "@type": "@3" }, "flags": 3, - "position": 540 + "position": 400 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1725,7 +1802,7 @@ "@type": "@5" }, "flags": 0, - "position": 544 + "position": 404 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1736,7 +1813,7 @@ "@type": "@3" }, "flags": 3, - "position": 545 + "position": 405 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1747,7 +1824,7 @@ "@type": "@5" }, "flags": 0, - "position": 551 + "position": 411 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1758,7 +1835,7 @@ "@type": "@3" }, "flags": 3, - "position": 552 + "position": 412 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1769,7 +1846,7 @@ "@type": "@5" }, "flags": 0, - "position": 560 + "position": 420 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1780,7 +1857,7 @@ "@type": "@19" }, "flags": 0, - "position": 561 + "position": 421 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1791,7 +1868,7 @@ "@type": "@7" }, "flags": 16, - "position": 562 + "position": 422 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1802,7 +1879,7 @@ "@type": "@7" }, "flags": 16, - "position": 563 + "position": 423 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1813,7 +1890,7 @@ "@type": "@7" }, "flags": 16, - "position": 564 + "position": 424 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1824,7 +1901,7 @@ "@type": "@58" }, "flags": 2, - "position": 565 + "position": 425 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1835,7 +1912,7 @@ "@type": "@19" }, "flags": 0, - "position": 585 + "position": 445 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1846,7 +1923,7 @@ "@type": "@7" }, "flags": 16, - "position": 586 + "position": 446 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1857,7 +1934,7 @@ "@type": "@7" }, "flags": 16, - "position": 587 + "position": 447 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1868,7 +1945,7 @@ "@type": "@5" }, "flags": 0, - "position": 588 + "position": 448 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1879,7 +1956,7 @@ "@type": "@3" }, "flags": 3, - "position": 589 + "position": 449 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1890,7 +1967,7 @@ "@type": "@5" }, "flags": 0, - "position": 593 + "position": 453 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1901,7 +1978,7 @@ "@type": "@3" }, "flags": 3, - "position": 594 + "position": 454 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1912,7 +1989,7 @@ "@type": "@5" }, "flags": 0, - "position": 600 + "position": 460 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1923,7 +2000,7 @@ "@type": "@3" }, "flags": 3, - "position": 601 + "position": 461 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1934,7 +2011,7 @@ "@type": "@5" }, "flags": 0, - "position": 609 + "position": 469 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1945,7 +2022,7 @@ "@type": "@19" }, "flags": 0, - "position": 610 + "position": 470 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1956,7 +2033,7 @@ "@type": "@7" }, "flags": 16, - "position": 611 + "position": 471 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1967,7 +2044,7 @@ "@type": "@7" }, "flags": 16, - "position": 612 + "position": 472 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1978,7 +2055,7 @@ "@type": "@5" }, "flags": 0, - "position": 613 + "position": 473 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -1989,7 +2066,7 @@ "@type": "@58" }, "flags": 2, - "position": 614 + "position": 474 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2000,7 +2077,7 @@ "@type": "@5" }, "flags": 0, - "position": 627 + "position": 487 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2011,7 +2088,7 @@ "@type": "@3" }, "flags": 3, - "position": 628 + "position": 488 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2022,18 +2099,117 @@ "@type": "@5" }, "flags": 0, - "position": 632 + "position": 492 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "SELECT", + "value": "SELECT", + "keyword": "SELECT", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 493 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 499 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "DISTINCT", + "value": "DISTINCT", + "keyword": "DISTINCT", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 500 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 508 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "a", + "value": "a", + "keyword": null, + "type": { + "@type": "@19" + }, + "flags": 0, + "position": 509 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ".", + "value": ".", + "keyword": null, + "type": { + "@type": "@7" + }, + "flags": 16, + "position": 510 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "*", + "value": "*", + "keyword": null, + "type": { + "@type": "@7" + }, + "flags": 16, + "position": 511 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", - "token": "-- SELECT DISTINCT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.)", - "value": "-- SELECT DISTINCT a.*/* comment */ FROM (This one is not working yet because of https://github.com/phpmyadmin/sql-parser/issues/285. Please uncomment when this issue is fixed.)", + "token": "/* comment */", + "value": "/* comment */", "keyword": null, "type": { "@type": "@58" }, - "flags": 4, - "position": 633 + "flags": 2, + "position": 512 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 525 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "FROM", + "value": "FROM", + "keyword": "FROM", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 526 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2044,7 +2220,7 @@ "@type": "@5" }, "flags": 0, - "position": 810 + "position": 530 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2055,7 +2231,7 @@ "@type": "@3" }, "flags": 3, - "position": 811 + "position": 531 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2066,7 +2242,7 @@ "@type": "@5" }, "flags": 0, - "position": 817 + "position": 537 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2079,7 +2255,7 @@ "value": 8 }, "flags": 2, - "position": 818 + "position": 538 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2090,7 +2266,7 @@ "@type": "@5" }, "flags": 0, - "position": 821 + "position": 541 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2101,7 +2277,7 @@ "@type": "@3" }, "flags": 3, - "position": 822 + "position": 542 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2112,7 +2288,7 @@ "@type": "@5" }, "flags": 0, - "position": 826 + "position": 546 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2123,7 +2299,7 @@ "@type": "@3" }, "flags": 1, - "position": 827 + "position": 547 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2134,7 +2310,7 @@ "@type": "@5" }, "flags": 0, - "position": 837 + "position": 557 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2145,7 +2321,7 @@ "@type": "@3" }, "flags": 3, - "position": 838 + "position": 558 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2156,7 +2332,7 @@ "@type": "@5" }, "flags": 0, - "position": 844 + "position": 564 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2164,10 +2340,10 @@ "value": "*", "keyword": null, "type": { - "@type": "@194" + "@type": "@210" }, "flags": 2, - "position": 845 + "position": 565 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2178,7 +2354,7 @@ "@type": "@7" }, "flags": 16, - "position": 848 + "position": 568 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2189,7 +2365,7 @@ "@type": "@7" }, "flags": 16, - "position": 849 + "position": 569 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2200,7 +2376,7 @@ "@type": "@5" }, "flags": 0, - "position": 850 + "position": 570 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2211,7 +2387,7 @@ "@type": "@3" }, "flags": 3, - "position": 851 + "position": 571 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2222,7 +2398,7 @@ "@type": "@5" }, "flags": 0, - "position": 855 + "position": 575 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2233,7 +2409,7 @@ "@type": "@3" }, "flags": 1, - "position": 856 + "position": 576 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2244,7 +2420,7 @@ "@type": "@5" }, "flags": 0, - "position": 866 + "position": 586 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2255,7 +2431,7 @@ "@type": "@3" }, "flags": 3, - "position": 867 + "position": 587 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2266,7 +2442,7 @@ "@type": "@5" }, "flags": 0, - "position": 869 + "position": 589 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2274,10 +2450,10 @@ "value": "*", "keyword": null, "type": { - "@type": "@194" + "@type": "@210" }, "flags": 2, - "position": 870 + "position": 590 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2288,7 +2464,7 @@ "@type": "@5" }, "flags": 0, - "position": 873 + "position": 593 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2299,7 +2475,7 @@ "@type": "@3" }, "flags": 3, - "position": 874 + "position": 594 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2310,7 +2486,7 @@ "@type": "@5" }, "flags": 0, - "position": 880 + "position": 600 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2321,7 +2497,7 @@ "@type": "@3" }, "flags": 33, - "position": 881 + "position": 601 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2332,7 +2508,7 @@ "@type": "@7" }, "flags": 16, - "position": 886 + "position": 606 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2343,7 +2519,7 @@ "@type": "@7" }, "flags": 16, - "position": 887 + "position": 607 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2354,7 +2530,7 @@ "@type": "@7" }, "flags": 16, - "position": 888 + "position": 608 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2365,7 +2541,7 @@ "@type": "@5" }, "flags": 0, - "position": 889 + "position": 609 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2376,7 +2552,7 @@ "@type": "@3" }, "flags": 3, - "position": 890 + "position": 610 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2387,7 +2563,7 @@ "@type": "@5" }, "flags": 0, - "position": 894 + "position": 614 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2398,7 +2574,7 @@ "@type": "@3" }, "flags": 1, - "position": 895 + "position": 615 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2409,7 +2585,7 @@ "@type": "@5" }, "flags": 0, - "position": 905 + "position": 625 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2420,7 +2596,7 @@ "@type": "@3" }, "flags": 3, - "position": 906 + "position": 626 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2431,7 +2607,7 @@ "@type": "@5" }, "flags": 0, - "position": 912 + "position": 632 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2442,7 +2618,7 @@ "@type": "@3" }, "flags": 33, - "position": 913 + "position": 633 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2453,7 +2629,7 @@ "@type": "@7" }, "flags": 16, - "position": 918 + "position": 638 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2464,7 +2640,7 @@ "@type": "@5" }, "flags": 0, - "position": 919 + "position": 639 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2475,7 +2651,7 @@ "@type": "@7" }, "flags": 16, - "position": 920 + "position": 640 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2486,7 +2662,7 @@ "@type": "@5" }, "flags": 0, - "position": 921 + "position": 641 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2497,7 +2673,7 @@ "@type": "@7" }, "flags": 16, - "position": 922 + "position": 642 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2508,7 +2684,7 @@ "@type": "@5" }, "flags": 0, - "position": 923 + "position": 643 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2519,7 +2695,7 @@ "@type": "@3" }, "flags": 3, - "position": 924 + "position": 644 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2530,7 +2706,7 @@ "@type": "@5" }, "flags": 0, - "position": 928 + "position": 648 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2541,7 +2717,7 @@ "@type": "@3" }, "flags": 1, - "position": 929 + "position": 649 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2552,7 +2728,7 @@ "@type": "@5" }, "flags": 0, - "position": 939 + "position": 659 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2563,7 +2739,7 @@ "@type": "@3" }, "flags": 3, - "position": 940 + "position": 660 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2574,7 +2750,7 @@ "@type": "@5" }, "flags": 0, - "position": 946 + "position": 666 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2585,7 +2761,7 @@ "@type": "@3" }, "flags": 33, - "position": 947 + "position": 667 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2596,7 +2772,7 @@ "@type": "@7" }, "flags": 16, - "position": 952 + "position": 672 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2607,7 +2783,7 @@ "@type": "@5" }, "flags": 0, - "position": 953 + "position": 673 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2618,7 +2794,7 @@ "@type": "@7" }, "flags": 16, - "position": 954 + "position": 674 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2629,7 +2805,7 @@ "@type": "@5" }, "flags": 0, - "position": 955 + "position": 675 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2640,7 +2816,7 @@ "@type": "@58" }, "flags": 2, - "position": 956 + "position": 676 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2651,7 +2827,7 @@ "@type": "@7" }, "flags": 16, - "position": 987 + "position": 707 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2662,7 +2838,7 @@ "@type": "@5" }, "flags": 0, - "position": 988 + "position": 708 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2673,7 +2849,7 @@ "@type": "@3" }, "flags": 3, - "position": 989 + "position": 709 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2684,7 +2860,7 @@ "@type": "@5" }, "flags": 0, - "position": 993 + "position": 713 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2695,7 +2871,7 @@ "@type": "@3" }, "flags": 1, - "position": 994 + "position": 714 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2706,7 +2882,7 @@ "@type": "@5" }, "flags": 0, - "position": 1004 + "position": 724 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2717,7 +2893,7 @@ "@type": "@3" }, "flags": 3, - "position": 1005 + "position": 725 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2728,7 +2904,7 @@ "@type": "@5" }, "flags": 0, - "position": 1011 + "position": 731 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2739,7 +2915,7 @@ "@type": "@3" }, "flags": 33, - "position": 1012 + "position": 732 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2750,7 +2926,7 @@ "@type": "@7" }, "flags": 16, - "position": 1017 + "position": 737 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2758,10 +2934,10 @@ "value": "*", "keyword": null, "type": { - "@type": "@194" + "@type": "@210" }, "flags": 2, - "position": 1018 + "position": 738 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2772,7 +2948,7 @@ "@type": "@7" }, "flags": 16, - "position": 1021 + "position": 741 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2783,7 +2959,7 @@ "@type": "@5" }, "flags": 0, - "position": 1022 + "position": 742 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2794,7 +2970,7 @@ "@type": "@3" }, "flags": 3, - "position": 1023 + "position": 743 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2805,7 +2981,7 @@ "@type": "@5" }, "flags": 0, - "position": 1027 + "position": 747 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2816,7 +2992,7 @@ "@type": "@3" }, "flags": 1, - "position": 1028 + "position": 748 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2827,7 +3003,7 @@ "@type": "@5" }, "flags": 0, - "position": 1038 + "position": 758 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2838,7 +3014,7 @@ "@type": "@3" }, "flags": 3, - "position": 1039 + "position": 759 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2849,7 +3025,7 @@ "@type": "@5" }, "flags": 0, - "position": 1045 + "position": 765 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2862,7 +3038,7 @@ "value": 6 }, "flags": 0, - "position": 1046 + "position": 766 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2873,7 +3049,7 @@ "@type": "@5" }, "flags": 0, - "position": 1047 + "position": 767 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2884,7 +3060,7 @@ "@type": "@3" }, "flags": 3, - "position": 1048 + "position": 768 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2895,7 +3071,7 @@ "@type": "@5" }, "flags": 0, - "position": 1052 + "position": 772 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2906,7 +3082,7 @@ "@type": "@3" }, "flags": 1, - "position": 1053 + "position": 773 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2917,7 +3093,7 @@ "@type": "@5" }, "flags": 0, - "position": 1063 + "position": 783 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2928,7 +3104,7 @@ "@type": "@3" }, "flags": 3, - "position": 1064 + "position": 784 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2939,7 +3115,7 @@ "@type": "@5" }, "flags": 0, - "position": 1069 + "position": 789 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2950,7 +3126,7 @@ "@type": "@19" }, "flags": 0, - "position": 1070 + "position": 790 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2961,7 +3137,7 @@ "@type": "@5" }, "flags": 0, - "position": 1075 + "position": 795 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2972,7 +3148,7 @@ "@type": "@3" }, "flags": 3, - "position": 1076 + "position": 796 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2983,7 +3159,7 @@ "@type": "@5" }, "flags": 0, - "position": 1080 + "position": 800 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -2996,7 +3172,7 @@ "value": 7 }, "flags": 1, - "position": 1081 + "position": 801 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3007,7 +3183,7 @@ "@type": "@5" }, "flags": 0, - "position": 1086 + "position": 806 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3018,7 +3194,7 @@ "@type": "@3" }, "flags": 3, - "position": 1087 + "position": 807 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3029,7 +3205,7 @@ "@type": "@5" }, "flags": 0, - "position": 1093 + "position": 813 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3040,7 +3216,7 @@ "@type": "@19" }, "flags": 0, - "position": 1094 + "position": 814 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3051,7 +3227,7 @@ "@type": "@7" }, "flags": 16, - "position": 1095 + "position": 815 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3062,7 +3238,7 @@ "@type": "@7" }, "flags": 16, - "position": 1096 + "position": 816 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3073,7 +3249,7 @@ "@type": "@5" }, "flags": 0, - "position": 1097 + "position": 817 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3084,7 +3260,7 @@ "@type": "@3" }, "flags": 3, - "position": 1098 + "position": 818 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3095,7 +3271,7 @@ "@type": "@5" }, "flags": 0, - "position": 1103 + "position": 823 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3106,7 +3282,7 @@ "@type": "@3" }, "flags": 3, - "position": 1104 + "position": 824 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3117,7 +3293,7 @@ "@type": "@5" }, "flags": 0, - "position": 1110 + "position": 830 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3128,7 +3304,7 @@ "@type": "@19" }, "flags": 0, - "position": 1111 + "position": 831 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3139,7 +3315,7 @@ "@type": "@7" }, "flags": 16, - "position": 1112 + "position": 832 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3150,7 +3326,7 @@ "@type": "@7" }, "flags": 16, - "position": 1113 + "position": 833 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3161,7 +3337,7 @@ "@type": "@7" }, "flags": 16, - "position": 1114 + "position": 834 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3172,7 +3348,7 @@ "@type": "@5" }, "flags": 0, - "position": 1115 + "position": 835 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3183,7 +3359,7 @@ "@type": "@19" }, "flags": 0, - "position": 1116 + "position": 836 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3194,7 +3370,7 @@ "@type": "@7" }, "flags": 16, - "position": 1117 + "position": 837 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3205,7 +3381,7 @@ "@type": "@7" }, "flags": 16, - "position": 1118 + "position": 838 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3216,7 +3392,7 @@ "@type": "@5" }, "flags": 0, - "position": 1119 + "position": 839 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3227,7 +3403,7 @@ "@type": "@3" }, "flags": 3, - "position": 1120 + "position": 840 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3238,7 +3414,7 @@ "@type": "@5" }, "flags": 0, - "position": 1125 + "position": 845 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3249,7 +3425,7 @@ "@type": "@3" }, "flags": 3, - "position": 1126 + "position": 846 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3260,7 +3436,7 @@ "@type": "@5" }, "flags": 0, - "position": 1132 + "position": 852 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3271,7 +3447,7 @@ "@type": "@19" }, "flags": 0, - "position": 1133 + "position": 853 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3282,7 +3458,7 @@ "@type": "@7" }, "flags": 16, - "position": 1134 + "position": 854 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3293,7 +3469,7 @@ "@type": "@7" }, "flags": 16, - "position": 1135 + "position": 855 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3304,7 +3480,7 @@ "@type": "@5" }, "flags": 0, - "position": 1136 + "position": 856 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3315,7 +3491,7 @@ "@type": "@7" }, "flags": 16, - "position": 1137 + "position": 857 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3326,7 +3502,7 @@ "@type": "@19" }, "flags": 0, - "position": 1138 + "position": 858 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3337,7 +3513,7 @@ "@type": "@7" }, "flags": 16, - "position": 1139 + "position": 859 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3348,7 +3524,7 @@ "@type": "@7" }, "flags": 16, - "position": 1140 + "position": 860 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3359,7 +3535,7 @@ "@type": "@5" }, "flags": 0, - "position": 1141 + "position": 861 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3370,7 +3546,7 @@ "@type": "@3" }, "flags": 3, - "position": 1142 + "position": 862 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3381,7 +3557,7 @@ "@type": "@5" }, "flags": 0, - "position": 1147 + "position": 867 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3392,7 +3568,7 @@ "@type": "@3" }, "flags": 3, - "position": 1148 + "position": 868 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3403,7 +3579,7 @@ "@type": "@5" }, "flags": 0, - "position": 1154 + "position": 874 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3414,7 +3590,7 @@ "@type": "@19" }, "flags": 0, - "position": 1155 + "position": 875 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3425,7 +3601,7 @@ "@type": "@7" }, "flags": 16, - "position": 1156 + "position": 876 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3436,7 +3612,7 @@ "@type": "@7" }, "flags": 16, - "position": 1157 + "position": 877 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3447,7 +3623,7 @@ "@type": "@5" }, "flags": 0, - "position": 1158 + "position": 878 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3458,7 +3634,7 @@ "@type": "@7" }, "flags": 16, - "position": 1159 + "position": 879 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3469,7 +3645,7 @@ "@type": "@5" }, "flags": 0, - "position": 1160 + "position": 880 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3480,7 +3656,7 @@ "@type": "@19" }, "flags": 0, - "position": 1161 + "position": 881 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3491,7 +3667,7 @@ "@type": "@7" }, "flags": 16, - "position": 1162 + "position": 882 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3502,7 +3678,7 @@ "@type": "@7" }, "flags": 16, - "position": 1163 + "position": 883 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3513,7 +3689,7 @@ "@type": "@5" }, "flags": 0, - "position": 1164 + "position": 884 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3524,7 +3700,7 @@ "@type": "@3" }, "flags": 3, - "position": 1165 + "position": 885 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3535,7 +3711,7 @@ "@type": "@5" }, "flags": 0, - "position": 1170 + "position": 890 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3546,7 +3722,7 @@ "@type": "@3" }, "flags": 3, - "position": 1171 + "position": 891 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3557,7 +3733,7 @@ "@type": "@5" }, "flags": 0, - "position": 1177 + "position": 897 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3568,7 +3744,7 @@ "@type": "@19" }, "flags": 0, - "position": 1178 + "position": 898 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3579,7 +3755,7 @@ "@type": "@7" }, "flags": 16, - "position": 1179 + "position": 899 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3590,7 +3766,7 @@ "@type": "@7" }, "flags": 16, - "position": 1180 + "position": 900 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3601,7 +3777,7 @@ "@type": "@5" }, "flags": 0, - "position": 1181 + "position": 901 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3612,7 +3788,7 @@ "@type": "@58" }, "flags": 2, - "position": 1182 + "position": 902 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3623,7 +3799,7 @@ "@type": "@5" }, "flags": 0, - "position": 1195 + "position": 915 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3634,7 +3810,7 @@ "@type": "@3" }, "flags": 3, - "position": 1196 + "position": 916 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3645,7 +3821,7 @@ "@type": "@5" }, "flags": 0, - "position": 1201 + "position": 921 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3656,7 +3832,7 @@ "@type": "@3" }, "flags": 3, - "position": 1202 + "position": 922 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3667,7 +3843,7 @@ "@type": "@5" }, "flags": 0, - "position": 1208 + "position": 928 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3678,7 +3854,7 @@ "@type": "@19" }, "flags": 0, - "position": 1209 + "position": 929 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3689,7 +3865,7 @@ "@type": "@7" }, "flags": 16, - "position": 1210 + "position": 930 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3700,7 +3876,7 @@ "@type": "@7" }, "flags": 16, - "position": 1211 + "position": 931 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3711,7 +3887,7 @@ "@type": "@5" }, "flags": 0, - "position": 1212 + "position": 932 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3722,7 +3898,7 @@ "@type": "@58" }, "flags": 2, - "position": 1213 + "position": 933 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3733,7 +3909,7 @@ "@type": "@7" }, "flags": 16, - "position": 1226 + "position": 946 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3744,7 +3920,7 @@ "@type": "@5" }, "flags": 0, - "position": 1227 + "position": 947 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3755,7 +3931,7 @@ "@type": "@19" }, "flags": 0, - "position": 1228 + "position": 948 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3766,7 +3942,7 @@ "@type": "@7" }, "flags": 16, - "position": 1229 + "position": 949 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3777,7 +3953,7 @@ "@type": "@7" }, "flags": 16, - "position": 1230 + "position": 950 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3788,7 +3964,7 @@ "@type": "@5" }, "flags": 0, - "position": 1231 + "position": 951 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3799,7 +3975,7 @@ "@type": "@58" }, "flags": 2, - "position": 1232 + "position": 952 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3810,7 +3986,7 @@ "@type": "@5" }, "flags": 0, - "position": 1243 + "position": 963 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3821,7 +3997,7 @@ "@type": "@3" }, "flags": 3, - "position": 1244 + "position": 964 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3832,7 +4008,7 @@ "@type": "@5" }, "flags": 0, - "position": 1249 + "position": 969 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3843,7 +4019,7 @@ "@type": "@3" }, "flags": 3, - "position": 1250 + "position": 970 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3854,7 +4030,7 @@ "@type": "@5" }, "flags": 0, - "position": 1256 + "position": 976 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3865,7 +4041,7 @@ "@type": "@19" }, "flags": 0, - "position": 1257 + "position": 977 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3876,7 +4052,7 @@ "@type": "@7" }, "flags": 16, - "position": 1258 + "position": 978 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3887,7 +4063,7 @@ "@type": "@7" }, "flags": 16, - "position": 1259 + "position": 979 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3898,7 +4074,7 @@ "@type": "@5" }, "flags": 0, - "position": 1260 + "position": 980 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3909,7 +4085,7 @@ "@type": "@58" }, "flags": 2, - "position": 1261 + "position": 981 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3920,7 +4096,7 @@ "@type": "@5" }, "flags": 0, - "position": 1274 + "position": 994 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3931,7 +4107,7 @@ "@type": "@7" }, "flags": 16, - "position": 1275 + "position": 995 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3942,7 +4118,7 @@ "@type": "@19" }, "flags": 0, - "position": 1276 + "position": 996 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3953,7 +4129,7 @@ "@type": "@7" }, "flags": 16, - "position": 1277 + "position": 997 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3964,7 +4140,7 @@ "@type": "@7" }, "flags": 16, - "position": 1278 + "position": 998 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3975,7 +4151,7 @@ "@type": "@5" }, "flags": 0, - "position": 1279 + "position": 999 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3986,7 +4162,7 @@ "@type": "@58" }, "flags": 2, - "position": 1280 + "position": 1000 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -3997,7 +4173,7 @@ "@type": "@5" }, "flags": 0, - "position": 1291 + "position": 1011 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4008,7 +4184,7 @@ "@type": "@3" }, "flags": 3, - "position": 1292 + "position": 1012 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4019,7 +4195,7 @@ "@type": "@5" }, "flags": 0, - "position": 1297 + "position": 1017 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4030,7 +4206,7 @@ "@type": "@3" }, "flags": 3, - "position": 1298 + "position": 1018 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4041,7 +4217,7 @@ "@type": "@5" }, "flags": 0, - "position": 1304 + "position": 1024 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4052,7 +4228,7 @@ "@type": "@19" }, "flags": 0, - "position": 1305 + "position": 1025 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4063,7 +4239,7 @@ "@type": "@7" }, "flags": 16, - "position": 1306 + "position": 1026 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4074,7 +4250,7 @@ "@type": "@7" }, "flags": 16, - "position": 1307 + "position": 1027 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4085,7 +4261,7 @@ "@type": "@5" }, "flags": 0, - "position": 1308 + "position": 1028 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4096,7 +4272,7 @@ "@type": "@58" }, "flags": 2, - "position": 1309 + "position": 1029 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4107,7 +4283,7 @@ "@type": "@5" }, "flags": 0, - "position": 1322 + "position": 1042 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4118,7 +4294,7 @@ "@type": "@7" }, "flags": 16, - "position": 1323 + "position": 1043 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4129,7 +4305,7 @@ "@type": "@5" }, "flags": 0, - "position": 1324 + "position": 1044 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4140,7 +4316,7 @@ "@type": "@19" }, "flags": 0, - "position": 1325 + "position": 1045 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4151,7 +4327,7 @@ "@type": "@7" }, "flags": 16, - "position": 1326 + "position": 1046 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4162,7 +4338,7 @@ "@type": "@7" }, "flags": 16, - "position": 1327 + "position": 1047 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4173,7 +4349,7 @@ "@type": "@5" }, "flags": 0, - "position": 1328 + "position": 1048 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4184,7 +4360,7 @@ "@type": "@58" }, "flags": 2, - "position": 1329 + "position": 1049 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4195,7 +4371,7 @@ "@type": "@5" }, "flags": 0, - "position": 1340 + "position": 1060 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4206,7 +4382,7 @@ "@type": "@3" }, "flags": 3, - "position": 1341 + "position": 1061 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", @@ -4217,7 +4393,7 @@ "@type": "@5" }, "flags": 0, - "position": 1346 + "position": 1066 }, { "@type": "PhpMyAdmin\\SqlParser\\Token", diff --git a/tests/data/parser/parseCreateTableSRID.in b/tests/data/parser/parseCreateTableSRID.in new file mode 100644 index 00000000..1fbcbf9d --- /dev/null +++ b/tests/data/parser/parseCreateTableSRID.in @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS `public_areas` ( + `id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + `kind` enum('COUNTRY','REGION','DEPARTMENT','MUNICIPALITY') NOT NULL, + `area` geometry NOT NULL SRID 4326, + `properties` json NOT NULL, + `title` varchar(100) NOT NULL +); \ No newline at end of file diff --git a/tests/data/parser/parseCreateTableSRID.out b/tests/data/parser/parseCreateTableSRID.out new file mode 100644 index 00000000..db5b8b4a --- /dev/null +++ b/tests/data/parser/parseCreateTableSRID.out @@ -0,0 +1,980 @@ +{ + "query": "CREATE TABLE IF NOT EXISTS `public_areas` (\n `id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,\n `kind` enum('COUNTRY','REGION','DEPARTMENT','MUNICIPALITY') NOT NULL,\n `area` geometry NOT NULL SRID 4326,\n `properties` json NOT NULL,\n `title` varchar(100) NOT NULL\n);", + "lexer": { + "@type": "PhpMyAdmin\\SqlParser\\Lexer", + "strict": false, + "errors": [], + "str": "CREATE TABLE IF NOT EXISTS `public_areas` (\n `id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,\n `kind` enum('COUNTRY','REGION','DEPARTMENT','MUNICIPALITY') NOT NULL,\n `area` geometry NOT NULL SRID 4326,\n `properties` json NOT NULL,\n `title` varchar(100) NOT NULL\n);", + "len": 275, + "last": 275, + "list": { + "@type": "PhpMyAdmin\\SqlParser\\TokensList", + "count": 69, + "idx": 69, + "tokens": [ + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "CREATE", + "value": "CREATE", + "keyword": "CREATE", + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Keyword", + "value": 1 + }, + "flags": 3, + "position": 0 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Whitespace", + "value": 3 + }, + "flags": 0, + "position": 6 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "TABLE", + "value": "TABLE", + "keyword": "TABLE", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 7 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 12 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "IF NOT EXISTS", + "value": "IF NOT EXISTS", + "keyword": "IF NOT EXISTS", + "type": { + "@type": "@3" + }, + "flags": 7, + "position": 13 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 26 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "`public_areas`", + "value": "public_areas", + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Symbol", + "value": 8 + }, + "flags": 2, + "position": 27 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 41 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "(", + "value": "(", + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Operator", + "value": 2 + }, + "flags": 16, + "position": 42 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 43 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "`id`", + "value": "id", + "keyword": null, + "type": { + "@type": "@11" + }, + "flags": 2, + "position": 46 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 50 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "INT", + "value": "INT", + "keyword": "INT", + "type": { + "@type": "@3" + }, + "flags": 11, + "position": 51 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 54 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "UNSIGNED", + "value": "UNSIGNED", + "keyword": "UNSIGNED", + "type": { + "@type": "@3" + }, + "flags": 3, + "position": 55 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 63 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "NOT NULL", + "value": "NOT NULL", + "keyword": "NOT NULL", + "type": { + "@type": "@3" + }, + "flags": 7, + "position": 64 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 72 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "PRIMARY KEY", + "value": "PRIMARY KEY", + "keyword": "PRIMARY KEY", + "type": { + "@type": "@3" + }, + "flags": 23, + "position": 73 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 84 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "AUTO_INCREMENT", + "value": "AUTO_INCREMENT", + "keyword": "AUTO_INCREMENT", + "type": { + "@type": "@3" + }, + "flags": 1, + "position": 85 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ",", + "value": ",", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 99 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 100 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "`kind`", + "value": "kind", + "keyword": null, + "type": { + "@type": "@11" + }, + "flags": 2, + "position": 103 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 109 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "enum", + "value": "enum", + "keyword": "ENUM", + "type": { + "@type": "@3" + }, + "flags": 9, + "position": 110 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "(", + "value": "(", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 114 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "'COUNTRY'", + "value": "COUNTRY", + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "String", + "value": 7 + }, + "flags": 1, + "position": 115 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ",", + "value": ",", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 124 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "'REGION'", + "value": "REGION", + "keyword": null, + "type": { + "@type": "@34" + }, + "flags": 1, + "position": 125 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ",", + "value": ",", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 133 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "'DEPARTMENT'", + "value": "DEPARTMENT", + "keyword": null, + "type": { + "@type": "@34" + }, + "flags": 1, + "position": 134 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ",", + "value": ",", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 146 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "'MUNICIPALITY'", + "value": "MUNICIPALITY", + "keyword": null, + "type": { + "@type": "@34" + }, + "flags": 1, + "position": 147 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ")", + "value": ")", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 161 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 162 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "NOT NULL", + "value": "NOT NULL", + "keyword": "NOT NULL", + "type": { + "@type": "@3" + }, + "flags": 7, + "position": 163 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ",", + "value": ",", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 171 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 172 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "`area`", + "value": "area", + "keyword": null, + "type": { + "@type": "@11" + }, + "flags": 2, + "position": 175 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 181 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "geometry", + "value": "geometry", + "keyword": "GEOMETRY", + "type": { + "@type": "@3" + }, + "flags": 9, + "position": 182 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 190 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "NOT NULL", + "value": "NOT NULL", + "keyword": "NOT NULL", + "type": { + "@type": "@3" + }, + "flags": 7, + "position": 191 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 199 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "SRID", + "value": "SRID", + "keyword": "SRID", + "type": { + "@type": "@3" + }, + "flags": 33, + "position": 200 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 204 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "4326", + "value": 4326, + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Number", + "value": 6 + }, + "flags": 0, + "position": 205 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ",", + "value": ",", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 209 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 210 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "`properties`", + "value": "properties", + "keyword": null, + "type": { + "@type": "@11" + }, + "flags": 2, + "position": 213 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 225 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "json", + "value": "json", + "keyword": "JSON", + "type": { + "@type": "@3" + }, + "flags": 9, + "position": 226 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 230 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "NOT NULL", + "value": "NOT NULL", + "keyword": "NOT NULL", + "type": { + "@type": "@3" + }, + "flags": 7, + "position": 231 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ",", + "value": ",", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 239 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 240 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "`title`", + "value": "title", + "keyword": null, + "type": { + "@type": "@11" + }, + "flags": 2, + "position": 243 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 250 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "varchar", + "value": "VARCHAR", + "keyword": "VARCHAR", + "type": { + "@type": "@3" + }, + "flags": 11, + "position": 251 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "(", + "value": "(", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 258 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "100", + "value": 100, + "keyword": null, + "type": { + "@type": "@55" + }, + "flags": 0, + "position": 259 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ")", + "value": ")", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 262 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": " ", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 263 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "NOT NULL", + "value": "NOT NULL", + "keyword": "NOT NULL", + "type": { + "@type": "@3" + }, + "flags": 7, + "position": 264 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "\n", + "value": " ", + "keyword": null, + "type": { + "@type": "@5" + }, + "flags": 0, + "position": 272 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ")", + "value": ")", + "keyword": null, + "type": { + "@type": "@14" + }, + "flags": 16, + "position": 273 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": ";", + "value": ";", + "keyword": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\TokenType", + "name": "Delimiter", + "value": 9 + }, + "flags": 0, + "position": 274 + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Token", + "token": "", + "value": "", + "keyword": null, + "type": { + "@type": "@76" + }, + "flags": 0, + "position": null + } + ] + }, + "delimiter": ";", + "delimiterLen": 1 + }, + "parser": { + "@type": "PhpMyAdmin\\SqlParser\\Parser", + "strict": false, + "errors": [], + "list": { + "@type": "@1" + }, + "statements": [ + { + "@type": "PhpMyAdmin\\SqlParser\\Statements\\CreateStatement", + "name": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", + "database": null, + "table": "public_areas", + "column": null, + "expr": "`public_areas`", + "alias": null, + "function": null, + "subquery": null + }, + "entityOptions": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": [] + }, + "fields": [ + { + "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", + "name": "id", + "isConstraint": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", + "name": "INT", + "parameters": [], + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": { + "4": "UNSIGNED" + } + }, + "lowercase": false + }, + "key": null, + "references": null, + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": { + "1": "NOT NULL", + "4": "PRIMARY KEY", + "3": "AUTO_INCREMENT" + } + } + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", + "name": "kind", + "isConstraint": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", + "name": "ENUM", + "parameters": [ + "'COUNTRY'", + "'REGION'", + "'DEPARTMENT'", + "'MUNICIPALITY'" + ], + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": [] + }, + "lowercase": false + }, + "key": null, + "references": null, + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": { + "1": "NOT NULL" + } + } + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", + "name": "area", + "isConstraint": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", + "name": "GEOMETRY", + "parameters": [], + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": [] + }, + "lowercase": false + }, + "key": null, + "references": null, + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": { + "1": "NOT NULL", + "17": { + "name": "SRID", + "equals": false, + "expr": "4326", + "value": "4326" + } + } + } + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", + "name": "properties", + "isConstraint": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", + "name": "JSON", + "parameters": [], + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": [] + }, + "lowercase": false + }, + "key": null, + "references": null, + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": { + "1": "NOT NULL" + } + } + }, + { + "@type": "PhpMyAdmin\\SqlParser\\Components\\CreateDefinition", + "name": "title", + "isConstraint": null, + "type": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\DataType", + "name": "VARCHAR", + "parameters": [ + "100" + ], + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": [] + }, + "lowercase": false + }, + "key": null, + "references": null, + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": { + "1": "NOT NULL" + } + } + } + ], + "with": null, + "select": null, + "like": null, + "partitionBy": null, + "partitionsNum": null, + "subpartitionBy": null, + "subpartitionsNum": null, + "partitions": null, + "table": null, + "return": null, + "parameters": null, + "body": [], + "options": { + "@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", + "options": { + "6": "TABLE", + "7": "IF NOT EXISTS" + } + }, + "first": 0, + "last": 67 + } + ], + "brackets": 0 + }, + "errors": { + "lexer": [], + "parser": [] + } +} \ No newline at end of file diff --git a/tests/data/parser/parseSelectUnion2.out b/tests/data/parser/parseSelectUnion2.out index 99792891..38b4271b 100644 --- a/tests/data/parser/parseSelectUnion2.out +++ b/tests/data/parser/parseSelectUnion2.out @@ -1308,9 +1308,7 @@ "subquery": null }, "type": { - "@type": "PhpMyAdmin\\SqlParser\\Components\\OrderSortKeyword", - "name": "Asc", - "value": "ASC" + "@type": "@123" } } ],