From f815247510a1c332669ec27ac8364be99b9da2fc Mon Sep 17 00:00:00 2001 From: Pedro Flemming Date: Mon, 14 Aug 2017 15:13:56 +0200 Subject: [PATCH 01/19] Add documentation about missing features (#56) --- docs/README.md | 3 +- docs/known-limitations.md | 18 +++ docs/syntax-examples.md | 44 ------- docs/syntax-support.md | 53 +++++++++ src/sql/Expr.h | 3 - test/auto_query_file_test.cpp | 98 ++++++++++++++++ test/queries/queries-bad.sql | 11 ++ .../queries-good.sql} | 13 +-- test/sql_grammar_test.cpp | 107 ------------------ test/test.sh | 5 +- 10 files changed, 188 insertions(+), 167 deletions(-) create mode 100644 docs/known-limitations.md delete mode 100644 docs/syntax-examples.md create mode 100644 docs/syntax-support.md create mode 100644 test/auto_query_file_test.cpp create mode 100644 test/queries/queries-bad.sql rename test/{valid_queries.sql => queries/queries-good.sql} (90%) delete mode 100644 test/sql_grammar_test.cpp diff --git a/docs/README.md b/docs/README.md index f519412..f80ee5a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,8 @@ Documentation Internal Links: * [Developer Documentation](dev-docs.md) - * [Working SQL Syntax Examples](syntax-examples.md) + * [Supported SQL Queries](syntax-support.md) + * [Known Limitations & Missing Features](known-limitations.md) External Resources: diff --git a/docs/known-limitations.md b/docs/known-limitations.md new file mode 100644 index 0000000..0c91b04 --- /dev/null +++ b/docs/known-limitations.md @@ -0,0 +1,18 @@ +Known Limitations & Missing Features +==================================== + +This page contains an overview of known missing limitations and missing features in our SQL parser project. In general, we would like to see all of these features being supported at some point. If you are particularly interested in a specific feature, feel free to contribute to this project through a pull request. + +### Completely Missing Statement Types + + * EXPLAIN + * EXPORT + * RENAME + * ALTER + +Additionally, there are a lot of statement types that are specific to certain database systems. Supporting all of these is not on our roadmap, but if someone implements support for such a statement, we can also integrate it. + +### Other SQL Limitations + + * Tables names ignore the schema name (see grammar rule `table_name`). This affects, for example, `INSERT, IMPORT, DROP, DELETE`. + * Column data types only support `INT, DOUBLE, TEXT`. diff --git a/docs/syntax-examples.md b/docs/syntax-examples.md deleted file mode 100644 index be1d4d0..0000000 --- a/docs/syntax-examples.md +++ /dev/null @@ -1,44 +0,0 @@ -Syntax Examples -=============== - -This page contains some samples of SQL statements that can be executed in Hyrise. - - -**Create Tables** -```sql -CREATE TABLE IF NOT EXISTS students FROM TBL FILE 'test/students.tbl'; -CREATE TABLE test (v1 INTEGER, v2 INTEGER, v3 INTEGER); -``` - - -**Select with Join** -```sql -SELECT name, city, * FROM students AS t1 JOIN students AS t2 ON t1.city = t2.city WHERE t1.grade < 2.0 AND t2.grade > 2.0 AND t1.city = 'Frohnau' ORDER BY t1.grade DESC; -``` - - -**Group By** -```sql -SELECT city, AVG(grade) AS average, MIN(grade) AS best, MAX(grade) AS worst FROM students GROUP BY city; -``` - - -**Update and Delete** -```sql -UPDATE students SET name='Max Mustermann' WHERE name = 'Ralf Stiebitz'; -DELETE FROM students WHERE name = 'Max Mustermann'; -``` - - -**Prepare and Execute** -```sql -PREPARE batch_insert { - INSERT INTO test VALUES (?, 0, 0); - INSERT INTO test VALUES (?, 0, 0); - INSERT INTO test VALUES (?, 0, 0); - INSERT INTO test VALUES (?, 0, 0); - INSERT INTO test VALUES (?, 0, 0); -}; - -EXECUTE insert_test(1, 2, 3, 4 ,5); -``` diff --git a/docs/syntax-support.md b/docs/syntax-support.md new file mode 100644 index 0000000..59d08b9 --- /dev/null +++ b/docs/syntax-support.md @@ -0,0 +1,53 @@ +Supported SQL Queries +===================== + +This page contains a short list of queries that can be correctly parsed with our parser. If you are interested in finding out if a certain feature is supported, it is probably the easiest to checkout the repository and try the example project or check our [list of known limitations](known-limitations.md). Also the file [queries-good.sql](../test/queries/queries-good.sql) shows a list of queries which are parsable with the current version. + + +## Select Statements + +We implement a broad support for the most common elements for `SELECT` statements. Following are a few examples of basic constructs that are supported. + +```sql +SELECT name, city, * + FROM students AS t1 JOIN students AS t2 ON t1.city = t2.city + WHERE t1.grade < 2.0 AND + t2.grade > 2.0 AND + t1.city = 'Frohnau' + ORDER BY t1.grade DESC; + +SELECT city, AVG(grade) AS average, + MIN(grade) AS best, MAX(grade) AS worst + FROM students + GROUP BY city; +``` + +## Data Definition & Modification + +**Create Tables** +```sql +CREATE TABLE students ( + name TEXT, + student_number INTEGER, + city TEXT, + grade DOUBLE +); +``` + +**Update and Delete** +```sql +UPDATE students SET name='Max Mustermann' WHERE name = 'Ralf Mustermann'; + +DELETE FROM students WHERE name = 'Max Mustermann'; +``` + + +## Prepared Statements + +The definition and execution of prepared statements is supported using the following syntax. + +```sql +PREPARE select_test FROM 'SELECT * FROM customer WHERE c_name = ?;'; + +EXECUTE select_test('Max Mustermann'); +``` diff --git a/src/sql/Expr.h b/src/sql/Expr.h index 622bec3..dcaddee 100644 --- a/src/sql/Expr.h +++ b/src/sql/Expr.h @@ -29,9 +29,6 @@ namespace hsql { }; // Operator types. These are important for expressions of type kExprOperator. -// Trivial types are those that can be described by a single character e.g: -// + - * / < > = % -// Non-trivial are: <> <= >= LIKE ISNULL NOT enum OperatorType { kOpNone, diff --git a/test/auto_query_file_test.cpp b/test/auto_query_file_test.cpp new file mode 100644 index 0000000..ce18300 --- /dev/null +++ b/test/auto_query_file_test.cpp @@ -0,0 +1,98 @@ +#include +#include +#include +#include +#include +#include + +#include "thirdparty/microtest/microtest.h" +#include "SQLParser.h" + +// Read all lines from the given file path. Skips comment lines. +std::vector readlines(std::string path); + +// Read the queries from all files that were supplied to the test +// through the -f argument. For all queries it is checked whether they +// can be parsed successfully. +TEST(AutoQueryFileTest) { + const std::vector& args = mt::Runtime::args(); + + std::vector query_files; + + // Parse command line arguments to retrieve query files. + uint i = 1; + for (; i < args.size(); ++i) { + if (args[i] == "-f") { + query_files.push_back(args[++i]); + } + } + + + // Read list of queries from all input files. + std::vector lines; + for (std::string path : query_files) { + std::vector tmp = readlines(path); + lines.insert(lines.end(), tmp.begin(), tmp.end()); + } + + // Execute queries. + size_t num_executed = 0; + size_t num_failed = 0; + for (std::string line : lines) { + bool expected_result = true; + std::string query = line; + + // If a line starts with '!' parsing is expected to fail. + if (query.at(0) == '!') { + expected_result = false; + query = query.substr(1); + } + + // Measuring the parsing time. + std::chrono::time_point start, end; + start = std::chrono::system_clock::now(); + + // Parse the query. + hsql::SQLParserResult result; + hsql::SQLParser::parse(query, &result); + + end = std::chrono::system_clock::now(); + std::chrono::duration elapsed_seconds = end - start; + double us = elapsed_seconds.count() * 1000 * 1000; + + if (expected_result == result.isValid()) { + printf("\033[0;32m{ ok} (%.1fus)\033[0m %s\n", us, line.c_str()); + } else { + printf("\033[0;31m{ failed}\033[0m\n"); + printf("\t\033[0;31m%s (L%d:%d)\n\033[0m", result.errorMsg(), result.errorLine(), result.errorColumn()); + printf("\t%s\n", line.c_str()); + ++num_failed; + } + ++num_executed; + } + + if (num_failed == 0) { + printf("\033[0;32m{ ok} \033[0mAll %lu grammar tests completed successfully!\n", num_executed); + } else { + fprintf(stderr, "\033[0;31m{ failed} \033[0mSome grammar tests failed! %lu out of %lu tests failed!\n", num_failed, num_executed); + } + ASSERT_EQ(num_failed, 0); +} + +std::vector readlines(std::string path) { + std::ifstream infile(path); + std::vector lines; + std::string line; + while (std::getline(infile, line)) { + std::istringstream iss(line); + + // Skip comments. + if (line[0] == '#' || + (line[0] == '-' && line[1] == '-')) { + continue; + } + + lines.push_back(line); + } + return lines; +} diff --git a/test/queries/queries-bad.sql b/test/queries/queries-bad.sql new file mode 100644 index 0000000..f67c7c8 --- /dev/null +++ b/test/queries/queries-bad.sql @@ -0,0 +1,11 @@ +# This file contains a list of strings that are NOT valid SQL queries. +# Each line contains a single SQL query. +# Each line starts with a '!' char to indicate that parsing should fail. +! +!1 +!gibberish; +!SELECT abc; +!CREATE TABLE "table" FROM TBL FILE 'students.tbl';SELECT 1 +!CREATE TABLE "table" FROM TBL FILE 'students.tbl';1 +!INSERT INTO test_table VALUESd (1, 2, 'test'); +!SELECT * FROM t WHERE a = ? AND b = ?;SELECT 1; \ No newline at end of file diff --git a/test/valid_queries.sql b/test/queries/queries-good.sql similarity index 90% rename from test/valid_queries.sql rename to test/queries/queries-good.sql index ef08be0..294aa63 100644 --- a/test/valid_queries.sql +++ b/test/queries/queries-good.sql @@ -1,3 +1,5 @@ +# This file contains a list of strings that are NOT valid SQL queries. +# Each line contains a single SQL query. # SELECT statement SELECT * FROM orders; SELECT a FROM foo WHERE a > 12 OR b > 3 AND NOT c LIMIT 10 @@ -46,13 +48,4 @@ DEALLOCATE PREPARE prep; # HINTS SELECT * FROM test WITH HINT(NO_CACHE); SELECT * FROM test WITH HINT(NO_CACHE, NO_SAMPLING); -SELECT * FROM test WITH HINT(NO_CACHE, SAMPLE_RATE(0.1), OMW(1.0, 'test')); -# Error expeced -! -!1 -!gibberish; -!SELECT abc; -!CREATE TABLE "table" FROM TBL FILE 'students.tbl';SELECT 1 -!CREATE TABLE "table" FROM TBL FILE 'students.tbl';1 -!INSERT INTO test_table VALUESd (1, 2, 'test'); -!SELECT * FROM t WHERE a = ? AND b = ?;SELECT 1; \ No newline at end of file +SELECT * FROM test WITH HINT(NO_CACHE, SAMPLE_RATE(0.1), OMW(1.0, 'test')); \ No newline at end of file diff --git a/test/sql_grammar_test.cpp b/test/sql_grammar_test.cpp deleted file mode 100644 index 8429a43..0000000 --- a/test/sql_grammar_test.cpp +++ /dev/null @@ -1,107 +0,0 @@ - -#include -#include -#include -#include -#include -#include - -#include "thirdparty/microtest/microtest.h" -#include "SQLParser.h" - -using namespace hsql; - - -std::vector readlines(std::string path) { - std::ifstream infile(path); - std::vector lines; - std::string line; - while (std::getline(infile, line)) { - std::istringstream iss(line); - - // Skip comments - if (line[0] == '#' || - (line[0] == '-' && line[1] == '-')) { - continue; - } - - lines.push_back(line); - } - return lines; -} - -#define STREQ(a, b) (std::string(a).compare(std::string(b)) == 0) - -TEST(AutoGrammarTest) { - const std::vector& args = mt::Runtime::args(); - if (args.size() <= 1) { - fprintf(stderr, "Usage: grammar_test [--false] [-f path] query, ...\n"); - return; - } - - bool globalExpectFalse = false; - bool useFile = false; - std::string filePath = ""; - - // Parse command line arguments - uint i = 1; - for (; i < args.size(); ++i) { - if (STREQ(args[i], "--false")) globalExpectFalse = true; - else if (STREQ(args[i], "-f")) { - useFile = true; - filePath = args[++i]; - } else { - break; - } - } - - - // Read list of queries for this rest - std::vector queries; - if (useFile) { - queries = readlines(filePath); - } else { - for (; i < args.size(); ++i) queries.push_back(args[i]); - } - - - // Execute queries - int numFailed = 0; - for (std::string sql : queries) { - bool expectFalse = globalExpectFalse; - if (sql.at(0) == '!') { - expectFalse = !expectFalse; - sql = sql.substr(1); - } - - // Measuring the parsing time - std::chrono::time_point start, end; - start = std::chrono::system_clock::now(); - - // Parsing - SQLParserResult result; - SQLParser::parse(sql.c_str(), &result); - - end = std::chrono::system_clock::now(); - std::chrono::duration elapsed_seconds = end - start; - double us = elapsed_seconds.count() * 1000 * 1000; - - if (expectFalse == result.isValid()) { - printf("\033[0;31m{ failed}\033[0m\n"); - printf("\t\033[0;31m%s (L%d:%d)\n\033[0m", result.errorMsg(), result.errorLine(), result.errorColumn()); - printf("\t%s\n", sql.c_str()); - numFailed++; - } else { - // TODO: indicate whether expectFalse was set - printf("\033[0;32m{ ok} (%.1fus)\033[0m %s\n", us, sql.c_str()); - } - } - - if (numFailed == 0) { - printf("\033[0;32m{ ok} \033[0mAll %lu grammar tests completed successfully!\n", queries.size()); - } else { - fprintf(stderr, "\033[0;31m{ failed} \033[0mSome grammar tests failed! %d out of %lu tests failed!\n", numFailed, queries.size()); - } - ASSERT_EQ(numFailed, 0); -} - diff --git a/test/test.sh b/test/test.sh index 06cd93f..5766a13 100755 --- a/test/test.sh +++ b/test/test.sh @@ -17,7 +17,7 @@ CONFLICT_RET=0 ################################################# # Running SQL parser tests. printf "\n${GREEN}Running SQL parser tests...${NC}\n" -bin/tests -f "test/valid_queries.sql" +bin/tests -f "test/queries/queries-good.sql" -f "test/queries/queries-bad.sql" SQL_TEST_RET=$? if [ $SQL_TEST_RET -eq 0 ]; then @@ -31,7 +31,8 @@ fi # Running memory leak checks. printf "\n${GREEN}Running memory leak checks...${NC}\n" valgrind --leak-check=full --error-exitcode=200 --log-fd=3 \ - ./bin/tests -f "test/valid_queries.sql" 3>&1 >/dev/null 2>/dev/null + bin/tests -f "test/queries/queries-good.sql" -f "test/queries/queries-bad.sql" \ + 3>&1 >/dev/null 2>/dev/null MEM_LEAK_RET=$? if [ $MEM_LEAK_RET -ne 200 ]; then From 0233f77cef48795f5e0430867167c8c7ba270b72 Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Wed, 23 Aug 2017 23:09:02 +0200 Subject: [PATCH 02/19] Add support for SHOW TABLES statement --- .gitignore | 3 + src/parser/bison_parser.cpp | 2250 +++++++++++++++++---------------- src/parser/bison_parser.h | 11 +- src/parser/bison_parser.y | 27 +- src/parser/flex_lexer.cpp | 853 +++++-------- src/parser/flex_lexer.h | 503 +------- src/sql/SQLStatement.h | 3 +- src/sql/ShowStatement.h | 26 + src/sql/statements.cpp | 10 + src/sql/statements.h | 3 +- test/queries/queries-bad.sql | 3 +- test/queries/queries-good.sql | 4 +- test/sql_tests.cpp | 25 + 13 files changed, 1609 insertions(+), 2112 deletions(-) create mode 100644 src/sql/ShowStatement.h diff --git a/.gitignore b/.gitignore index 59c419d..d47c92e 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,6 @@ cmake-build-debug/ *.swp *.csv + +# macOS compilation dirs +*.dSYM diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 63fc7a9..4c1a629 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -303,7 +303,7 @@ extern int hsql_debug; /* Value type. */ #if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED - +typedef union HSQL_STYPE HSQL_STYPE; union HSQL_STYPE { #line 93 "bison_parser.y" /* yacc.c:355 */ @@ -324,6 +324,7 @@ union HSQL_STYPE hsql::DropStatement* drop_stmt; hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; + hsql::ShowStatement* show_stmt; hsql::TableRef* table; hsql::Expr* expr; @@ -343,10 +344,8 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; -#line 347 "bison_parser.cpp" /* yacc.c:355 */ +#line 348 "bison_parser.cpp" /* yacc.c:355 */ }; - -typedef union HSQL_STYPE HSQL_STYPE; # define HSQL_STYPE_IS_TRIVIAL 1 # define HSQL_STYPE_IS_DECLARED 1 #endif @@ -373,7 +372,7 @@ int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); /* Copy the second part of user declarations. */ -#line 377 "bison_parser.cpp" /* yacc.c:358 */ +#line 376 "bison_parser.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -615,18 +614,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 48 +#define YYFINAL 52 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 559 +#define YYLAST 530 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 151 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 85 +#define YYNNTS 86 /* YYNRULES -- Number of rules. */ -#define YYNRULES 196 +#define YYNRULES 199 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 362 +#define YYNSTATES 367 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -685,26 +684,26 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 240, 240, 261, 262, 266, 270, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 295, 296, 301, 302, - 306, 310, 322, 329, 332, 336, 348, 356, 360, 370, - 376, 382, 392, 393, 397, 398, 402, 409, 410, 411, - 412, 422, 426, 430, 442, 450, 462, 468, 478, 479, - 489, 498, 499, 503, 515, 516, 517, 534, 535, 539, - 540, 544, 554, 571, 575, 576, 577, 581, 582, 586, - 598, 599, 603, 607, 612, 613, 617, 622, 626, 627, - 630, 631, 635, 636, 640, 644, 645, 646, 652, 653, - 657, 658, 659, 666, 667, 671, 672, 676, 683, 684, - 685, 686, 687, 691, 692, 693, 694, 695, 696, 697, - 698, 699, 703, 704, 708, 709, 710, 711, 712, 716, - 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, - 730, 731, 735, 736, 737, 738, 743, 745, 749, 750, - 754, 755, 756, 757, 758, 759, 763, 764, 768, 772, - 776, 780, 781, 782, 783, 787, 788, 789, 790, 794, - 799, 800, 804, 808, 812, 824, 825, 835, 836, 840, - 841, 850, 851, 856, 866, 874, 875, 880, 881, 885, - 886, 894, 902, 912, 931, 932, 933, 934, 935, 936, - 937, 938, 943, 952, 953, 958, 959 + 0, 242, 242, 263, 264, 268, 272, 276, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 300, 301, 306, + 307, 311, 315, 327, 334, 337, 341, 353, 361, 365, + 375, 378, 391, 397, 403, 413, 414, 418, 419, 423, + 430, 431, 432, 433, 443, 447, 451, 463, 471, 483, + 489, 499, 500, 510, 519, 520, 524, 536, 537, 538, + 555, 556, 560, 561, 565, 575, 592, 596, 597, 598, + 602, 603, 607, 619, 620, 624, 628, 633, 634, 638, + 643, 647, 648, 651, 652, 656, 657, 661, 665, 666, + 667, 673, 674, 678, 679, 680, 687, 688, 692, 693, + 697, 704, 705, 706, 707, 708, 712, 713, 714, 715, + 716, 717, 718, 719, 720, 724, 725, 729, 730, 731, + 732, 733, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 751, 752, 756, 757, 758, 759, 764, + 766, 770, 771, 775, 776, 777, 778, 779, 780, 784, + 785, 789, 793, 797, 801, 802, 803, 804, 808, 809, + 810, 811, 815, 820, 821, 825, 829, 833, 845, 846, + 856, 857, 861, 862, 871, 872, 877, 887, 895, 896, + 901, 902, 906, 907, 915, 923, 933, 952, 953, 954, + 955, 956, 957, 958, 959, 964, 973, 974, 979, 980 }; #endif @@ -735,25 +734,25 @@ static const char *const yytname[] = "'.'", "';'", "','", "'?'", "$accept", "input", "statement_list", "statement", "preparable_statement", "opt_hints", "hint_list", "hint", "prepare_statement", "prepare_target_query", "execute_statement", - "import_statement", "import_file_type", "file_path", "create_statement", - "opt_not_exists", "column_def_commalist", "column_def", "column_type", - "drop_statement", "delete_statement", "truncate_statement", - "insert_statement", "opt_column_list", "update_statement", - "update_clause_commalist", "update_clause", "select_statement", - "select_with_paren", "select_paren_or_clause", "select_no_paren", - "set_operator", "set_type", "opt_all", "select_clause", "opt_distinct", - "select_list", "from_clause", "opt_where", "opt_group", "opt_having", - "opt_order", "order_list", "order_desc", "opt_order_type", "opt_top", - "opt_limit", "expr_list", "literal_list", "expr_alias", "expr", - "operand", "scalar_expr", "unary_expr", "binary_expr", "logic_expr", - "in_expr", "case_expr", "exists_expr", "comp_expr", "function_expr", - "array_expr", "array_index", "between_expr", "column_name", "literal", - "string_literal", "num_literal", "int_literal", "null_literal", - "param_expr", "table_ref", "table_ref_atomic", - "nonjoin_table_ref_atomic", "table_ref_commalist", "table_ref_name", - "table_ref_name_no_alias", "table_name", "alias", "opt_alias", - "join_clause", "opt_join_type", "join_condition", "opt_semicolon", - "ident_commalist", YY_NULLPTR + "import_statement", "import_file_type", "file_path", "show_statement", + "create_statement", "opt_not_exists", "column_def_commalist", + "column_def", "column_type", "drop_statement", "delete_statement", + "truncate_statement", "insert_statement", "opt_column_list", + "update_statement", "update_clause_commalist", "update_clause", + "select_statement", "select_with_paren", "select_paren_or_clause", + "select_no_paren", "set_operator", "set_type", "opt_all", + "select_clause", "opt_distinct", "select_list", "from_clause", + "opt_where", "opt_group", "opt_having", "opt_order", "order_list", + "order_desc", "opt_order_type", "opt_top", "opt_limit", "expr_list", + "literal_list", "expr_alias", "expr", "operand", "scalar_expr", + "unary_expr", "binary_expr", "logic_expr", "in_expr", "case_expr", + "exists_expr", "comp_expr", "function_expr", "array_expr", "array_index", + "between_expr", "column_name", "literal", "string_literal", + "num_literal", "int_literal", "null_literal", "param_expr", "table_ref", + "table_ref_atomic", "nonjoin_table_ref_atomic", "table_ref_commalist", + "table_ref_name", "table_ref_name_no_alias", "table_name", "alias", + "opt_alias", "join_clause", "opt_join_type", "join_condition", + "opt_semicolon", "ident_commalist", YY_NULLPTR }; #endif @@ -781,57 +780,57 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -259 +#define YYPACT_NINF -232 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-259))) + (!!((Yystate) == (-232))) -#define YYTABLE_NINF -192 +#define YYTABLE_NINF -195 #define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-192))) + (!!((Yytable_value) == (-195))) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { - 8, 44, 76, 85, 86, 68, 19, 28, 14, 26, - 76, 90, -8, 140, 33, -259, 63, 63, -259, -259, - -259, -259, -259, -259, -259, -259, -259, 37, -259, 132, - 186, 43, -259, 51, 120, 92, 92, 76, 98, 76, - 212, 210, 113, -259, 76, 76, 87, 89, -259, 8, - -259, 150, -259, -259, -259, -259, -259, -8, 148, 126, - -8, 187, -259, 248, 7, 252, 161, 76, 76, 202, - -259, 196, 135, -259, -259, -259, 123, 274, -259, -259, - -259, -259, -259, 136, -259, 215, -259, -259, -259, 123, - 215, 212, -259, -259, -259, -259, -259, -259, 31, -259, - -259, -259, -259, -259, -259, -259, -259, 245, -64, 135, - 123, -259, 284, 286, 127, 50, 145, 206, 129, 168, - 146, -259, 55, 232, 166, -259, 52, 169, -259, -259, - -259, -259, -259, -259, -259, -259, -259, -259, -259, -259, - -259, -259, 190, -48, -259, 314, 187, 170, -259, -49, - 187, 275, -259, 7, -259, 208, 321, 211, -39, 241, - -259, -259, 39, 182, -259, 12, 5, 279, 123, 184, - 146, 328, 123, 88, 189, -71, 3, 202, 123, -259, - 123, 327, 123, -259, -259, 146, -259, 146, -69, 188, - -3, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 212, 7, 274, -259, 191, - 45, -259, -259, 123, -259, -259, -259, -259, 212, -259, - 264, -11, 60, -259, -8, 76, -259, 329, 7, -259, - 123, -259, -259, 199, -18, 279, 260, -117, -259, -259, - -8, -259, 185, -259, -259, 17, -259, 298, -259, -259, - -259, 258, 269, 356, 146, 216, 55, -259, 272, 220, - 356, 356, 356, 382, 382, 382, 382, 88, 88, 18, - 18, 18, 32, 223, -259, -259, 7, -259, 314, -259, - -259, 284, -259, -259, -259, -259, -259, -259, 321, -259, - -259, -259, 61, 71, -259, 146, 218, -259, 222, 288, - -259, -259, -259, 302, 304, 3, 289, -259, 261, -259, - 146, 356, 55, 231, 91, -259, -259, 93, -259, -259, - -259, -259, -259, 213, -259, 17, 3, -259, -259, 472, - 230, 3, 123, 328, 234, 99, -259, -259, -259, 146, - -259, -259, -259, 3, 297, -13, -259, -259, 295, 472, - 236, 123, 123, -259, -259, 6, -39, -259, -39, 235, - 239, -259 + 10, 22, 66, 74, 86, -41, 23, 32, 20, -23, + 66, 95, 19, -34, 153, -36, -232, 65, 65, -232, + -232, -232, -232, -232, -232, -232, -232, -232, -232, 24, + -232, 157, 174, 63, -232, 68, 142, 118, 118, 66, + 134, 66, 238, 234, 143, -232, 66, 66, 66, -232, + 109, 114, -232, 10, -232, 184, -232, -232, -232, -232, + -232, -34, 160, 158, -34, 209, -232, 282, 7, 286, + 188, 66, 66, 229, -232, 223, 175, -232, -232, -232, + 81, 303, -232, -232, -232, -232, -232, -232, 176, -232, + 252, -232, -232, -232, 81, 252, 238, -232, -232, -232, + -232, -232, -232, 76, -232, -232, -232, -232, -232, -232, + -232, -232, 291, -63, 175, 81, -232, 331, 339, 156, + 31, 199, 248, 112, 204, 177, -232, 70, 267, 201, + -232, 49, 200, -232, -232, -232, -232, -232, -232, -232, + -232, -232, -232, -232, -232, -232, -232, 226, -49, -232, + 348, 209, 205, -232, -42, 209, 309, -232, 7, -232, + 245, 353, 246, -1, 273, -232, -232, 107, 214, -232, + 4, 5, 312, 81, 218, 177, 359, 81, 60, 219, + -79, 3, 229, 81, -232, 81, 361, 81, -232, -232, + 177, -232, 177, -67, 221, 64, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 238, 7, 303, -232, 222, 120, -232, -232, 81, -232, + -232, -232, -232, 238, -232, 295, -11, 146, -232, -34, + 66, -232, 373, 7, -232, 81, -232, -232, 233, 67, + 312, 298, 92, -232, -232, -34, -232, 40, -232, -232, + 28, -232, 329, -232, -232, -232, 288, 300, 387, 177, + 247, 70, -232, 301, 250, 387, 387, 387, 141, 141, + 141, 141, 60, 60, 71, 71, 71, 51, 251, -232, + -232, 7, -232, 348, -232, -232, 331, -232, -232, -232, + -232, -232, -232, 353, -232, -232, -232, 150, 152, -232, + 177, 253, -232, 254, 308, -232, -232, -232, 328, 330, + 3, 311, -232, 290, -232, 177, 387, 70, 255, 159, + -232, -232, 161, -232, -232, -232, -232, -232, 244, -232, + 28, 3, -232, -232, 225, 257, 3, 81, 359, 261, + 167, -232, -232, -232, 177, -232, -232, -232, 3, 171, + 9, -232, -232, 326, 225, 258, 81, 81, -232, -232, + 6, -1, -232, -1, 263, 262, -232 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -839,71 +838,71 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, - 0, 0, 0, 0, 194, 3, 17, 17, 15, 8, - 9, 14, 11, 12, 10, 13, 7, 54, 55, 81, - 0, 175, 45, 24, 0, 33, 33, 0, 0, 0, - 0, 71, 0, 174, 0, 0, 0, 0, 1, 193, - 2, 0, 6, 5, 65, 66, 64, 0, 68, 0, - 0, 92, 43, 0, 0, 0, 0, 0, 0, 75, - 27, 0, 49, 162, 88, 70, 0, 0, 41, 42, - 58, 57, 4, 0, 59, 81, 60, 67, 63, 0, - 81, 0, 61, 176, 159, 160, 163, 164, 0, 95, - 155, 156, 161, 157, 158, 23, 22, 0, 0, 49, - 0, 44, 0, 0, 0, 151, 0, 0, 0, 0, - 0, 153, 0, 0, 72, 93, 180, 98, 105, 106, - 107, 100, 102, 108, 101, 119, 109, 110, 104, 99, - 112, 113, 0, 75, 51, 0, 92, 80, 82, 87, - 92, 90, 25, 0, 32, 0, 0, 0, 74, 0, - 28, 195, 0, 0, 47, 71, 0, 0, 0, 0, - 0, 115, 0, 114, 0, 0, 0, 75, 0, 178, - 0, 0, 0, 179, 97, 0, 116, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, + 0, 0, 0, 0, 0, 197, 3, 18, 18, 16, + 9, 7, 10, 15, 12, 13, 11, 14, 8, 57, + 58, 84, 0, 178, 48, 25, 0, 36, 36, 0, + 0, 0, 0, 74, 0, 177, 0, 0, 0, 30, + 0, 0, 1, 196, 2, 0, 6, 5, 68, 69, + 67, 0, 71, 0, 0, 95, 46, 0, 0, 0, + 0, 0, 0, 78, 28, 0, 52, 165, 91, 73, + 0, 0, 44, 45, 31, 61, 60, 4, 0, 62, + 84, 63, 70, 66, 0, 84, 0, 64, 179, 162, + 163, 166, 167, 0, 98, 158, 159, 164, 160, 161, + 24, 23, 0, 0, 52, 0, 47, 0, 0, 0, + 154, 0, 0, 0, 0, 0, 156, 0, 0, 75, + 96, 183, 101, 108, 109, 110, 103, 105, 111, 104, + 122, 112, 113, 107, 102, 115, 116, 0, 78, 54, + 0, 95, 83, 85, 90, 95, 93, 26, 0, 35, + 0, 0, 0, 77, 0, 29, 198, 0, 0, 50, + 74, 0, 0, 0, 0, 0, 118, 0, 117, 0, + 0, 0, 78, 0, 181, 0, 0, 0, 182, 100, + 0, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 50, 20, - 0, 18, 56, 0, 86, 85, 84, 62, 0, 96, - 0, 0, 0, 34, 0, 0, 48, 0, 0, 146, - 0, 152, 154, 0, 0, 0, 0, 0, 111, 103, - 0, 73, 165, 167, 169, 180, 168, 77, 94, 130, - 177, 131, 0, 126, 0, 0, 0, 117, 0, 129, - 128, 140, 141, 142, 143, 144, 145, 121, 120, 123, - 122, 124, 125, 0, 53, 52, 0, 16, 0, 83, - 91, 0, 38, 39, 40, 37, 36, 30, 0, 31, - 26, 196, 0, 0, 138, 0, 0, 148, 0, 0, - 190, 184, 185, 189, 188, 0, 0, 173, 0, 69, - 0, 127, 0, 0, 0, 118, 149, 0, 19, 29, - 35, 46, 147, 0, 139, 180, 0, 187, 186, 171, - 166, 0, 0, 150, 0, 0, 134, 132, 21, 0, - 136, 170, 181, 0, 191, 79, 135, 133, 0, 172, - 0, 0, 0, 76, 137, 0, 192, 182, 78, 151, - 0, 183 + 0, 0, 0, 53, 21, 0, 19, 59, 0, 89, + 88, 87, 65, 0, 99, 0, 0, 0, 37, 0, + 0, 51, 0, 0, 149, 0, 155, 157, 0, 0, + 0, 0, 0, 114, 106, 0, 76, 168, 170, 172, + 183, 171, 80, 97, 133, 180, 134, 0, 129, 0, + 0, 0, 120, 0, 132, 131, 143, 144, 145, 146, + 147, 148, 124, 123, 126, 125, 127, 128, 0, 56, + 55, 0, 17, 0, 86, 94, 0, 41, 42, 43, + 40, 39, 33, 0, 34, 27, 199, 0, 0, 141, + 0, 0, 151, 0, 0, 193, 187, 188, 192, 191, + 0, 0, 176, 0, 72, 0, 130, 0, 0, 0, + 121, 152, 0, 20, 32, 38, 49, 150, 0, 142, + 183, 0, 190, 189, 174, 169, 0, 0, 153, 0, + 0, 137, 135, 22, 0, 139, 173, 184, 0, 194, + 82, 138, 136, 0, 175, 0, 0, 0, 79, 140, + 0, 195, 185, 81, 154, 0, 186 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -259, -259, -259, 337, -259, 371, -259, 111, -259, -259, - -259, -259, -259, 109, -259, 355, -259, 104, -259, -259, - -259, -259, -259, 287, -259, -259, 204, -191, 9, 354, - -12, 386, -259, -259, 205, 253, -259, -259, -107, -259, - -259, 94, -259, 209, -259, -259, -72, -165, -212, 262, - -88, -80, -259, -259, -259, -259, -259, -259, -259, -259, - -259, -259, -259, -259, 75, -60, -109, -259, -35, -259, - -259, -259, -258, 100, -259, -259, -259, 0, -259, -227, - -259, -259, -259, -259, -259 + -232, -232, -232, 358, -232, 394, -232, 130, -232, -232, + -232, -232, -232, 129, -232, -232, 378, -232, 124, -232, + -232, -232, -232, -232, 305, -232, -232, 208, -202, 17, + 357, -13, 391, -232, -232, 145, 272, -232, -232, -120, + -232, -232, 147, -232, 227, -232, -232, -115, -170, -213, + 240, -93, -68, -232, -232, -232, -232, -232, -232, -232, + -232, -232, -232, -232, -232, 88, -65, -112, -232, -38, + -232, -232, -232, -187, 96, -232, -232, -232, 0, -232, + -231, -232, -232, -232, -232, -232 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 13, 14, 15, 16, 52, 210, 211, 17, 106, - 18, 19, 71, 159, 20, 67, 222, 223, 286, 21, - 22, 23, 24, 114, 25, 143, 144, 26, 27, 85, - 28, 57, 58, 88, 29, 76, 123, 177, 111, 309, - 353, 61, 147, 148, 216, 41, 92, 124, 98, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 100, 101, 102, 103, - 104, 241, 242, 243, 330, 244, 42, 245, 183, 184, - 246, 306, 357, 50, 162 + -1, 14, 15, 16, 17, 56, 215, 216, 18, 111, + 19, 20, 75, 164, 21, 22, 71, 227, 228, 291, + 23, 24, 25, 26, 119, 27, 148, 149, 28, 29, + 90, 30, 61, 62, 93, 31, 80, 128, 182, 116, + 314, 358, 65, 152, 153, 221, 43, 97, 129, 103, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 105, 106, 107, + 108, 109, 246, 247, 248, 335, 249, 44, 250, 188, + 189, 251, 311, 362, 54, 167 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -911,122 +910,118 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 47, 149, 32, 160, 99, 74, 31, 237, 231, 359, - 43, 94, 95, 73, 282, 1, 292, 155, 307, 254, - 179, 46, 158, 2, 75, 110, 283, 297, 214, 352, - 3, 180, 178, 289, 175, 4, 208, 69, 171, 72, - 173, 9, 5, 6, 78, 79, 54, 329, 255, 298, - 182, 7, 8, 180, 215, 179, 151, 9, 115, 94, - 95, 73, 10, 180, 317, 293, 84, 108, 109, 84, - 247, 30, 182, 344, 212, 239, 55, 295, 217, 31, - 234, 156, 182, 284, 180, 349, 11, 257, 33, 34, - 171, 314, 249, 219, 251, 116, 285, 96, 341, 39, - 37, 207, 164, 182, 9, 252, 258, 253, 56, 38, - 174, 259, 260, 261, 262, 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, 149, 115, 94, 95, 73, - 117, 181, 115, 94, 95, 73, 178, 12, 35, 40, - 48, 54, 191, 232, 121, 96, 274, 335, 240, 115, - 94, 95, 73, 12, 180, 233, 191, 97, 229, 204, - 44, 205, 51, 116, 118, 36, 181, 345, 99, 169, - 273, 55, 160, 182, 311, 205, 9, 152, 119, 146, - 153, 49, 163, 280, 150, 226, 185, 45, 227, 62, - 63, 277, 120, 121, 278, 165, 64, 166, 117, 59, - 122, 65, 70, 56, 117, 97, 287, 321, 66, 288, - 153, 299, 191, 96, 186, 323, 99, 322, 73, 96, - 178, 117, 75, 296, 77, 290, 201, 202, 203, 204, - 333, 205, 118, 80, 83, 81, 96, 337, 170, 338, - 178, 89, 153, 300, 313, 347, 119, 301, 178, 87, - 91, 93, 119, 302, 303, 170, 105, 187, 186, 348, - 120, 121, 86, 356, 358, 86, 120, 121, 122, 119, - 107, -191, 304, 97, 122, 110, 112, 142, 188, 97, - 113, 145, 59, 120, 121, 154, 189, 190, 94, 161, - 167, 122, 339, 191, 192, 193, 97, 194, 195, 196, - 334, 187, 197, 198, 168, 199, 200, 201, 202, 203, - 204, 172, 205, 176, 186, 178, 206, 209, 340, 213, - 220, 218, 236, 299, 221, 224, 225, 228, 9, 235, - 250, 190, 291, 256, 305, 238, 276, 191, 192, 193, - 186, 194, 195, 196, 281, 294, 197, 198, 254, 199, - 200, 201, 202, 203, 204, 300, 205, 187, 308, 301, - 180, 312, 315, 205, 324, 302, 303, 316, 325, 350, - 327, 310, 328, 186, 326, 331, 332, 336, 236, 343, - 346, 355, 166, 187, 304, 361, 82, 190, 53, 318, - 319, 68, 320, 191, 192, 193, 157, 194, 195, 196, - 354, 186, 197, 198, 236, 199, 200, 201, 202, 203, - 204, 275, 205, 190, 90, 60, 187, 351, 230, 191, - 192, 193, 279, 194, 195, 196, 342, 186, 197, 198, - 360, 199, 200, 201, 202, 203, 204, 236, 205, 0, - 248, 0, 0, 0, -192, 0, 190, 0, 0, 0, - 0, 0, 191, 192, 193, 0, 194, 195, 196, 0, - 0, 197, 198, 0, 199, 200, 201, 202, 203, 204, - 0, 205, 0, 0, 190, 0, 0, 0, 0, 0, - 191, -192, -192, 0, -192, 195, 196, 0, 0, 197, - 198, 0, 199, 200, 201, 202, 203, 204, 299, 205, - 190, 0, 0, 0, 0, 0, 191, 0, 0, 0, - 0, -192, -192, 0, 0, -192, -192, 0, 199, 200, - 201, 202, 203, 204, 0, 205, 0, 0, 0, 0, - 300, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 302, 303, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -191, 304 + 51, 154, 34, 104, 78, 165, 33, 242, 236, 364, + 45, 99, 100, 77, 287, 9, 79, 1, 160, 312, + 297, 259, 163, 185, 115, 2, 288, 294, 213, 37, + 50, 184, 3, 58, 180, 219, 217, 4, 48, 73, + 222, 76, 187, 303, 5, 6, 82, 83, 84, 32, + 260, 357, 184, 7, 8, 176, 38, 178, 156, 9, + 185, 220, 252, 59, 10, 298, 304, 244, 322, 33, + 49, 113, 114, 120, 99, 100, 77, 35, 89, 187, + 239, 89, 161, 289, 120, 99, 100, 77, 11, 36, + 42, 319, 254, 224, 256, 60, 290, 101, 305, 346, + 212, 185, 306, 12, 39, 41, 169, 176, 307, 308, + 121, 13, 53, 40, 179, 120, 99, 100, 77, 9, + 187, 121, 257, 334, 258, 154, -194, 309, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 186, 237, 126, 122, 279, 340, 245, 349, + 234, 185, 174, 52, 262, 13, 122, 102, 183, 238, + 101, 354, 300, 186, 55, 46, 58, 350, 104, 185, + 187, 101, 278, 263, 165, 196, 170, 66, 171, 123, + 120, 99, 100, 77, 196, 285, 191, 122, 187, 310, + 123, 316, 47, 124, 210, 196, 59, 304, 206, 207, + 208, 209, 101, 210, 124, 9, 91, 125, 126, 91, + 67, 168, 209, 68, 210, 127, 104, 190, 125, 126, + 102, 175, 157, 69, 63, 158, 127, 301, 60, 305, + 295, 102, 328, 306, 70, 124, 302, 151, 74, 307, + 308, 183, 155, 355, 77, 191, 79, 338, 318, 125, + 126, 304, 122, 231, 81, 85, 232, 127, 309, 195, + 86, 92, 102, 361, 363, 196, 282, 101, 88, 283, + -195, -195, 96, 94, -195, -195, 353, 204, 205, 206, + 207, 208, 209, 305, 210, 98, 175, 306, 192, 191, + 110, 356, 292, 307, 308, 293, 326, 112, 327, 158, + 124, 183, 115, 117, 339, 342, 147, 343, 183, 193, + 158, -194, 309, 352, 125, 126, 183, 194, 195, 63, + 118, 150, 127, 344, 196, 197, 198, 102, 199, 200, + 201, 159, 192, 202, 203, 99, 204, 205, 206, 207, + 208, 209, 166, 210, 172, 191, 173, 177, 181, 345, + 183, 214, 211, 241, 218, 223, 226, 225, 230, 233, + 229, 9, 195, 240, 255, 243, 261, 281, 196, 197, + 198, 191, 199, 200, 201, 286, 296, 202, 203, 299, + 204, 205, 206, 207, 208, 209, 259, 210, 192, 313, + 185, 320, 317, 210, 331, 321, 332, 336, 333, 329, + 330, 341, 315, 360, 191, 337, 348, 351, 366, 241, + 171, 87, 57, 323, 192, 324, 72, 325, 195, 162, + 280, 95, 64, 253, 196, 197, 198, 347, 199, 200, + 201, 359, 191, 202, 203, 241, 204, 205, 206, 207, + 208, 209, 235, 210, 195, 284, 0, 192, 365, 0, + 196, 197, 198, 0, 199, 200, 201, 0, 0, 202, + 203, 0, 204, 205, 206, 207, 208, 209, 241, 210, + 0, 0, 0, 0, 0, -195, 0, 195, 0, 0, + 0, 0, 0, 196, 197, 198, 0, 199, 200, 201, + 0, 0, 202, 203, 0, 204, 205, 206, 207, 208, + 209, 0, 210, 0, 0, 195, 0, 0, 0, 0, + 0, 196, -195, -195, 0, -195, 200, 201, 0, 0, + 202, 203, 0, 204, 205, 206, 207, 208, 209, 0, + 210 }; static const yytype_int16 yycheck[] = { - 12, 89, 2, 112, 64, 40, 3, 172, 3, 3, - 10, 4, 5, 6, 25, 7, 228, 81, 245, 88, - 3, 12, 110, 15, 12, 73, 37, 144, 77, 42, - 22, 102, 149, 224, 122, 27, 143, 37, 118, 39, - 120, 49, 34, 35, 44, 45, 9, 305, 117, 240, - 121, 43, 44, 102, 103, 3, 91, 49, 3, 4, - 5, 6, 54, 102, 276, 230, 57, 67, 68, 60, - 177, 27, 121, 331, 146, 146, 39, 95, 150, 3, - 168, 145, 121, 94, 102, 343, 78, 90, 3, 3, - 170, 256, 180, 153, 182, 40, 107, 90, 325, 85, - 81, 149, 114, 121, 49, 185, 109, 187, 71, 81, - 122, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 213, 3, 4, 5, 6, - 75, 114, 3, 4, 5, 6, 149, 145, 70, 113, - 0, 9, 124, 138, 138, 90, 206, 312, 145, 3, - 4, 5, 6, 145, 102, 167, 124, 150, 146, 141, - 70, 143, 99, 40, 109, 97, 114, 332, 228, 40, - 205, 39, 281, 121, 254, 143, 49, 146, 123, 85, - 149, 148, 55, 218, 90, 146, 17, 97, 149, 3, - 147, 146, 137, 138, 149, 145, 145, 147, 75, 67, - 145, 81, 104, 71, 75, 150, 146, 146, 116, 149, - 149, 26, 124, 90, 45, 295, 276, 146, 6, 90, - 149, 75, 12, 235, 111, 225, 138, 139, 140, 141, - 310, 143, 109, 146, 84, 146, 90, 146, 109, 146, - 149, 115, 149, 58, 256, 146, 123, 62, 149, 101, - 63, 3, 123, 68, 69, 109, 4, 88, 45, 339, - 137, 138, 57, 351, 352, 60, 137, 138, 145, 123, - 109, 86, 87, 150, 145, 73, 80, 3, 109, 150, - 145, 145, 67, 137, 138, 40, 117, 118, 4, 3, - 145, 145, 79, 124, 125, 126, 150, 128, 129, 130, - 312, 88, 133, 134, 98, 136, 137, 138, 139, 140, - 141, 143, 143, 81, 45, 149, 126, 3, 105, 149, - 112, 46, 109, 26, 3, 114, 85, 145, 49, 145, - 3, 118, 3, 145, 149, 146, 145, 124, 125, 126, - 45, 128, 129, 130, 80, 146, 133, 134, 88, 136, - 137, 138, 139, 140, 141, 58, 143, 88, 60, 62, - 102, 145, 90, 143, 146, 68, 69, 144, 146, 72, - 68, 102, 68, 45, 86, 86, 115, 146, 109, 149, - 146, 145, 147, 88, 87, 146, 49, 118, 17, 278, - 281, 36, 288, 124, 125, 126, 109, 128, 129, 130, - 105, 45, 133, 134, 109, 136, 137, 138, 139, 140, - 141, 207, 143, 118, 60, 29, 88, 120, 165, 124, - 125, 126, 213, 128, 129, 130, 326, 45, 133, 134, - 355, 136, 137, 138, 139, 140, 141, 109, 143, -1, - 178, -1, -1, -1, 88, -1, 118, -1, -1, -1, - -1, -1, 124, 125, 126, -1, 128, 129, 130, -1, - -1, 133, 134, -1, 136, 137, 138, 139, 140, 141, - -1, 143, -1, -1, 118, -1, -1, -1, -1, -1, + 13, 94, 2, 68, 42, 117, 3, 177, 3, 3, + 10, 4, 5, 6, 25, 49, 12, 7, 81, 250, + 233, 88, 115, 102, 73, 15, 37, 229, 148, 70, + 13, 3, 22, 9, 127, 77, 151, 27, 19, 39, + 155, 41, 121, 245, 34, 35, 46, 47, 48, 27, + 117, 42, 3, 43, 44, 123, 97, 125, 96, 49, + 102, 103, 182, 39, 54, 235, 26, 146, 281, 3, + 51, 71, 72, 3, 4, 5, 6, 3, 61, 121, + 173, 64, 145, 94, 3, 4, 5, 6, 78, 3, + 113, 261, 185, 158, 187, 71, 107, 90, 58, 330, + 149, 102, 62, 93, 81, 85, 119, 175, 68, 69, + 40, 145, 148, 81, 127, 3, 4, 5, 6, 49, + 121, 40, 190, 310, 192, 218, 86, 87, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 114, 138, 138, 75, 211, 317, 145, 336, + 146, 102, 40, 0, 90, 145, 75, 150, 149, 172, + 90, 348, 95, 114, 99, 70, 9, 337, 233, 102, + 121, 90, 210, 109, 286, 124, 145, 3, 147, 109, + 3, 4, 5, 6, 124, 223, 45, 75, 121, 149, + 109, 259, 97, 123, 143, 124, 39, 26, 138, 139, + 140, 141, 90, 143, 123, 49, 61, 137, 138, 64, + 147, 55, 141, 145, 143, 145, 281, 17, 137, 138, + 150, 109, 146, 81, 67, 149, 145, 240, 71, 58, + 230, 150, 300, 62, 116, 123, 144, 90, 104, 68, + 69, 149, 95, 72, 6, 45, 12, 315, 261, 137, + 138, 26, 75, 146, 111, 146, 149, 145, 87, 118, + 146, 101, 150, 356, 357, 124, 146, 90, 84, 149, + 129, 130, 63, 115, 133, 134, 344, 136, 137, 138, + 139, 140, 141, 58, 143, 3, 109, 62, 88, 45, + 4, 120, 146, 68, 69, 149, 146, 109, 146, 149, + 123, 149, 73, 80, 317, 146, 3, 146, 149, 109, + 149, 86, 87, 146, 137, 138, 149, 117, 118, 67, + 145, 145, 145, 79, 124, 125, 126, 150, 128, 129, + 130, 40, 88, 133, 134, 4, 136, 137, 138, 139, + 140, 141, 3, 143, 145, 45, 98, 143, 81, 105, + 149, 3, 126, 109, 149, 46, 3, 112, 85, 145, + 114, 49, 118, 145, 3, 146, 145, 145, 124, 125, + 126, 45, 128, 129, 130, 80, 3, 133, 134, 146, + 136, 137, 138, 139, 140, 141, 88, 143, 88, 60, + 102, 90, 145, 143, 86, 144, 68, 86, 68, 146, + 146, 146, 102, 145, 45, 115, 149, 146, 146, 109, + 147, 53, 18, 283, 88, 286, 38, 293, 118, 114, + 212, 64, 31, 183, 124, 125, 126, 331, 128, 129, + 130, 105, 45, 133, 134, 109, 136, 137, 138, 139, + 140, 141, 170, 143, 118, 218, -1, 88, 360, -1, 124, 125, 126, -1, 128, 129, 130, -1, -1, 133, - 134, -1, 136, 137, 138, 139, 140, 141, 26, 143, - 118, -1, -1, -1, -1, -1, 124, -1, -1, -1, - -1, 129, 130, -1, -1, 133, 134, -1, 136, 137, - 138, 139, 140, 141, -1, 143, -1, -1, -1, -1, - 58, -1, -1, -1, 62, -1, -1, -1, -1, -1, - 68, 69, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 86, 87 + 134, -1, 136, 137, 138, 139, 140, 141, 109, 143, + -1, -1, -1, -1, -1, 88, -1, 118, -1, -1, + -1, -1, -1, 124, 125, 126, -1, 128, 129, 130, + -1, -1, 133, 134, -1, 136, 137, 138, 139, 140, + 141, -1, 143, -1, -1, 118, -1, -1, -1, -1, + -1, 124, 125, 126, -1, 128, 129, 130, -1, -1, + 133, 134, -1, 136, 137, 138, 139, 140, 141, -1, + 143 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1034,92 +1029,92 @@ static const yytype_int16 yycheck[] = static const yytype_uint8 yystos[] = { 0, 7, 15, 22, 27, 34, 35, 43, 44, 49, - 54, 78, 145, 152, 153, 154, 155, 159, 161, 162, - 165, 170, 171, 172, 173, 175, 178, 179, 181, 185, - 27, 3, 228, 3, 3, 70, 97, 81, 81, 85, - 113, 196, 227, 228, 70, 97, 179, 181, 0, 148, - 234, 99, 156, 156, 9, 39, 71, 182, 183, 67, - 182, 192, 3, 147, 145, 81, 116, 166, 166, 228, - 104, 163, 228, 6, 219, 12, 186, 111, 228, 228, - 146, 146, 154, 84, 179, 180, 185, 101, 184, 115, - 180, 63, 197, 3, 4, 5, 90, 150, 199, 216, - 217, 218, 219, 220, 221, 4, 160, 109, 228, 228, - 73, 189, 80, 145, 174, 3, 40, 75, 109, 123, - 137, 138, 145, 187, 198, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 3, 176, 177, 145, 192, 193, 194, 201, - 192, 219, 146, 149, 40, 81, 145, 174, 201, 164, - 217, 3, 235, 55, 181, 145, 147, 145, 98, 40, - 109, 202, 143, 202, 181, 201, 81, 188, 149, 3, - 102, 114, 121, 229, 230, 17, 45, 88, 109, 117, - 118, 124, 125, 126, 128, 129, 130, 133, 134, 136, - 137, 138, 139, 140, 141, 143, 126, 149, 189, 3, - 157, 158, 197, 149, 77, 103, 195, 197, 46, 216, - 112, 3, 167, 168, 114, 85, 146, 149, 145, 146, - 186, 3, 138, 181, 201, 145, 109, 198, 146, 146, - 145, 222, 223, 224, 226, 228, 231, 189, 200, 201, - 3, 201, 202, 202, 88, 117, 145, 90, 109, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 202, 219, 216, 177, 145, 146, 149, 194, - 219, 80, 25, 37, 94, 107, 169, 146, 149, 178, - 228, 3, 199, 198, 146, 95, 181, 144, 178, 26, - 58, 62, 68, 69, 87, 149, 232, 230, 60, 190, - 102, 202, 145, 181, 198, 90, 144, 199, 158, 164, - 168, 146, 146, 202, 146, 146, 86, 68, 68, 223, - 225, 86, 115, 202, 181, 198, 146, 146, 146, 79, - 105, 230, 224, 149, 223, 198, 146, 146, 202, 223, - 72, 120, 42, 191, 105, 145, 201, 233, 201, 3, - 215, 146 + 54, 78, 93, 145, 152, 153, 154, 155, 159, 161, + 162, 165, 166, 171, 172, 173, 174, 176, 179, 180, + 182, 186, 27, 3, 229, 3, 3, 70, 97, 81, + 81, 85, 113, 197, 228, 229, 70, 97, 19, 51, + 180, 182, 0, 148, 235, 99, 156, 156, 9, 39, + 71, 183, 184, 67, 183, 193, 3, 147, 145, 81, + 116, 167, 167, 229, 104, 163, 229, 6, 220, 12, + 187, 111, 229, 229, 229, 146, 146, 154, 84, 180, + 181, 186, 101, 185, 115, 181, 63, 198, 3, 4, + 5, 90, 150, 200, 217, 218, 219, 220, 221, 222, + 4, 160, 109, 229, 229, 73, 190, 80, 145, 175, + 3, 40, 75, 109, 123, 137, 138, 145, 188, 199, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 3, 177, 178, + 145, 193, 194, 195, 202, 193, 220, 146, 149, 40, + 81, 145, 175, 202, 164, 218, 3, 236, 55, 182, + 145, 147, 145, 98, 40, 109, 203, 143, 203, 182, + 202, 81, 189, 149, 3, 102, 114, 121, 230, 231, + 17, 45, 88, 109, 117, 118, 124, 125, 126, 128, + 129, 130, 133, 134, 136, 137, 138, 139, 140, 141, + 143, 126, 149, 190, 3, 157, 158, 198, 149, 77, + 103, 196, 198, 46, 217, 112, 3, 168, 169, 114, + 85, 146, 149, 145, 146, 187, 3, 138, 182, 202, + 145, 109, 199, 146, 146, 145, 223, 224, 225, 227, + 229, 232, 190, 201, 202, 3, 202, 203, 203, 88, + 117, 145, 90, 109, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 220, 217, + 178, 145, 146, 149, 195, 220, 80, 25, 37, 94, + 107, 170, 146, 149, 179, 229, 3, 200, 199, 146, + 95, 182, 144, 179, 26, 58, 62, 68, 69, 87, + 149, 233, 231, 60, 191, 102, 203, 145, 182, 199, + 90, 144, 200, 158, 164, 169, 146, 146, 203, 146, + 146, 86, 68, 68, 224, 226, 86, 115, 203, 182, + 199, 146, 146, 146, 79, 105, 231, 225, 149, 224, + 199, 146, 146, 203, 224, 72, 120, 42, 192, 105, + 145, 202, 234, 202, 3, 216, 146 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 151, 152, 153, 153, 154, 154, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 156, 156, 157, 157, - 158, 158, 159, 160, 161, 161, 162, 163, 164, 165, - 165, 165, 166, 166, 167, 167, 168, 169, 169, 169, - 169, 170, 170, 170, 171, 172, 173, 173, 174, 174, - 175, 176, 176, 177, 178, 178, 178, 179, 179, 180, - 180, 181, 181, 182, 183, 183, 183, 184, 184, 185, - 186, 186, 187, 188, 189, 189, 190, 190, 191, 191, - 192, 192, 193, 193, 194, 195, 195, 195, 196, 196, - 197, 197, 197, 198, 198, 199, 199, 200, 201, 201, - 201, 201, 201, 202, 202, 202, 202, 202, 202, 202, - 202, 202, 203, 203, 204, 204, 204, 204, 204, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, - 206, 206, 207, 207, 207, 207, 208, 208, 209, 209, - 210, 210, 210, 210, 210, 210, 211, 211, 212, 213, - 214, 215, 215, 215, 215, 216, 216, 216, 216, 217, - 218, 218, 219, 220, 221, 222, 222, 223, 223, 224, - 224, 225, 225, 226, 227, 228, 228, 229, 229, 230, - 230, 231, 231, 231, 232, 232, 232, 232, 232, 232, - 232, 232, 233, 234, 234, 235, 235 + 0, 151, 152, 153, 153, 154, 154, 154, 155, 155, + 155, 155, 155, 155, 155, 155, 155, 156, 156, 157, + 157, 158, 158, 159, 160, 161, 161, 162, 163, 164, + 165, 165, 166, 166, 166, 167, 167, 168, 168, 169, + 170, 170, 170, 170, 171, 171, 171, 172, 173, 174, + 174, 175, 175, 176, 177, 177, 178, 179, 179, 179, + 180, 180, 181, 181, 182, 182, 183, 184, 184, 184, + 185, 185, 186, 187, 187, 188, 189, 190, 190, 191, + 191, 192, 192, 193, 193, 194, 194, 195, 196, 196, + 196, 197, 197, 198, 198, 198, 199, 199, 200, 200, + 201, 202, 202, 202, 202, 202, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 204, 204, 205, 205, 205, + 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 207, 207, 208, 208, 208, 208, 209, + 209, 210, 210, 211, 211, 211, 211, 211, 211, 212, + 212, 213, 214, 215, 216, 216, 216, 216, 217, 217, + 217, 217, 218, 219, 219, 220, 221, 222, 223, 223, + 224, 224, 225, 225, 226, 226, 227, 228, 229, 229, + 230, 230, 231, 231, 232, 232, 232, 233, 233, 233, + 233, 233, 233, 233, 233, 234, 235, 235, 236, 236 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 2, 1, 3, 2, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, - 1, 4, 4, 1, 2, 5, 7, 1, 1, 8, - 7, 7, 3, 0, 1, 3, 2, 1, 1, 1, - 1, 3, 3, 3, 4, 2, 8, 5, 3, 0, - 5, 1, 3, 3, 1, 1, 5, 3, 3, 1, - 1, 3, 5, 2, 1, 1, 1, 1, 0, 7, - 1, 0, 1, 2, 2, 0, 4, 0, 2, 0, - 3, 0, 1, 3, 2, 1, 1, 0, 2, 0, - 2, 4, 0, 1, 3, 1, 3, 2, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 2, 2, 2, 3, 4, 1, - 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, - 3, 3, 5, 6, 5, 6, 6, 8, 4, 5, - 3, 3, 3, 3, 3, 3, 3, 5, 4, 4, - 5, 1, 3, 1, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 4, 1, 3, 2, 1, 1, 3, 2, 1, 1, - 0, 4, 6, 8, 1, 1, 2, 2, 1, 1, - 1, 0, 1, 1, 0, 1, 3 + 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, + 3, 1, 4, 4, 1, 2, 5, 7, 1, 1, + 2, 3, 8, 7, 7, 3, 0, 1, 3, 2, + 1, 1, 1, 1, 3, 3, 3, 4, 2, 8, + 5, 3, 0, 5, 1, 3, 3, 1, 1, 5, + 3, 3, 1, 1, 3, 5, 2, 1, 1, 1, + 1, 0, 7, 1, 0, 1, 2, 2, 0, 4, + 0, 2, 0, 3, 0, 1, 3, 2, 1, 1, + 0, 2, 0, 2, 4, 0, 1, 3, 1, 3, + 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 2, 2, 2, + 3, 4, 1, 3, 3, 3, 3, 3, 3, 3, + 4, 3, 3, 3, 3, 5, 6, 5, 6, 6, + 8, 4, 5, 3, 3, 3, 3, 3, 3, 3, + 5, 4, 4, 5, 1, 3, 1, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 4, 1, 3, 2, 1, 1, 3, + 2, 1, 1, 0, 4, 6, 8, 1, 1, 2, + 2, 1, 1, 1, 0, 1, 1, 0, 1, 3 }; @@ -1616,31 +1611,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio switch (yytype) { case 3: /* IDENTIFIER */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1622 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1617 "bison_parser.cpp" /* yacc.c:1257 */ break; case 4: /* STRING */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1628 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1623 "bison_parser.cpp" /* yacc.c:1257 */ break; case 5: /* FLOATVAL */ -#line 134 "bison_parser.y" /* yacc.c:1257 */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1634 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1629 "bison_parser.cpp" /* yacc.c:1257 */ break; case 6: /* INTVAL */ -#line 134 "bison_parser.y" /* yacc.c:1257 */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1640 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1635 "bison_parser.cpp" /* yacc.c:1257 */ break; case 153: /* statement_list */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1649,23 +1644,23 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).stmt_vec)); } -#line 1653 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1648 "bison_parser.cpp" /* yacc.c:1257 */ break; case 154: /* statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1659 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1654 "bison_parser.cpp" /* yacc.c:1257 */ break; case 155: /* preparable_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1665 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1660 "bison_parser.cpp" /* yacc.c:1257 */ break; case 156: /* opt_hints */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1674,11 +1669,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1678 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1673 "bison_parser.cpp" /* yacc.c:1257 */ break; case 157: /* hint_list */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1687,65 +1682,71 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1691 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1686 "bison_parser.cpp" /* yacc.c:1257 */ break; case 158: /* hint */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1697 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1692 "bison_parser.cpp" /* yacc.c:1257 */ break; case 159: /* prepare_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).prep_stmt)); } -#line 1703 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1698 "bison_parser.cpp" /* yacc.c:1257 */ break; case 160: /* prepare_target_query */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1709 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1704 "bison_parser.cpp" /* yacc.c:1257 */ break; case 161: /* execute_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).exec_stmt)); } -#line 1715 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1710 "bison_parser.cpp" /* yacc.c:1257 */ break; case 162: /* import_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).import_stmt)); } -#line 1721 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1716 "bison_parser.cpp" /* yacc.c:1257 */ break; case 163: /* import_file_type */ -#line 134 "bison_parser.y" /* yacc.c:1257 */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1727 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1722 "bison_parser.cpp" /* yacc.c:1257 */ break; case 164: /* file_path */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 1733 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 165: /* create_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ - { delete (((*yyvaluep).create_stmt)); } -#line 1739 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 166: /* opt_not_exists */ -#line 134 "bison_parser.y" /* yacc.c:1257 */ - { } -#line 1745 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 167: /* column_def_commalist */ #line 136 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 1728 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 165: /* show_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ + { delete (((*yyvaluep).show_stmt)); } +#line 1734 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 166: /* create_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ + { delete (((*yyvaluep).create_stmt)); } +#line 1740 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 167: /* opt_not_exists */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ + { } +#line 1746 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 168: /* column_def_commalist */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -1754,47 +1755,47 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).column_vec)); } -#line 1758 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1759 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 168: /* column_def */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 169: /* column_def */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).column_t)); } -#line 1764 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1765 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 169: /* column_type */ -#line 134 "bison_parser.y" /* yacc.c:1257 */ + case 170: /* column_type */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1770 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1771 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 170: /* drop_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 171: /* drop_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).drop_stmt)); } -#line 1776 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1777 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 171: /* delete_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 172: /* delete_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1782 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1783 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 172: /* truncate_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 173: /* truncate_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1788 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1789 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 173: /* insert_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 174: /* insert_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).insert_stmt)); } -#line 1794 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1795 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 174: /* opt_column_list */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 175: /* opt_column_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -1803,17 +1804,17 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 1807 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1808 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 175: /* update_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 176: /* update_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_stmt)); } -#line 1813 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1814 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 176: /* update_clause_commalist */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 177: /* update_clause_commalist */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -1822,53 +1823,53 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).update_vec)); } -#line 1826 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1827 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 177: /* update_clause */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 178: /* update_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_t)); } -#line 1832 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1833 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 178: /* select_statement */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 179: /* select_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1838 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1839 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 179: /* select_with_paren */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 180: /* select_with_paren */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1844 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1845 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 180: /* select_paren_or_clause */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 181: /* select_paren_or_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1850 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1851 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 181: /* select_no_paren */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 182: /* select_no_paren */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1856 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1857 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 185: /* select_clause */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 186: /* select_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1862 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1863 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 186: /* opt_distinct */ -#line 134 "bison_parser.y" /* yacc.c:1257 */ + case 187: /* opt_distinct */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1868 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1869 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 187: /* select_list */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 188: /* select_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1877,35 +1878,35 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1881 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1882 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 188: /* from_clause */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 189: /* from_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 1887 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1888 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 189: /* opt_where */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 190: /* opt_where */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1893 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1894 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 190: /* opt_group */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 191: /* opt_group */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).group_t)); } -#line 1899 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1900 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 191: /* opt_having */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 192: /* opt_having */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1905 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1906 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 192: /* opt_order */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 193: /* opt_order */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1914,11 +1915,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1918 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1919 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 193: /* order_list */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 194: /* order_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1927,35 +1928,35 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1931 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1932 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 194: /* order_desc */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 195: /* order_desc */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).order)); } -#line 1937 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1938 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 195: /* opt_order_type */ -#line 134 "bison_parser.y" /* yacc.c:1257 */ + case 196: /* opt_order_type */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1943 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1944 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 196: /* opt_top */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 197: /* opt_top */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1949 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1950 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 197: /* opt_limit */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 198: /* opt_limit */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1955 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1956 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 198: /* expr_list */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 199: /* expr_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1964,11 +1965,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1968 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1969 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 199: /* literal_list */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 200: /* literal_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1977,161 +1978,161 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1981 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1982 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 200: /* expr_alias */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 201: /* expr_alias */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1987 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1988 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 201: /* expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 202: /* expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1993 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1994 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 202: /* operand */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 203: /* operand */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1999 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2000 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 203: /* scalar_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 204: /* scalar_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2005 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2006 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 204: /* unary_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 205: /* unary_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2011 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2012 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 205: /* binary_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 206: /* binary_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2017 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2018 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 206: /* logic_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 207: /* logic_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2023 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2024 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 207: /* in_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 208: /* in_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2029 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2030 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 208: /* case_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 209: /* case_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2035 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2036 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 209: /* exists_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 210: /* exists_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2041 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2042 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 210: /* comp_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 211: /* comp_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2047 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2048 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 211: /* function_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 212: /* function_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2053 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2054 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 212: /* array_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 213: /* array_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2059 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2060 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 213: /* array_index */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 214: /* array_index */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2065 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2066 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 214: /* between_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 215: /* between_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2071 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2072 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 215: /* column_name */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 216: /* column_name */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2077 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2078 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 216: /* literal */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 217: /* literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2083 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2084 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 217: /* string_literal */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 218: /* string_literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2089 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2090 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 218: /* num_literal */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 219: /* num_literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2095 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2096 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 219: /* int_literal */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 220: /* int_literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2101 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2102 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 220: /* null_literal */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 221: /* null_literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2107 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2108 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 221: /* param_expr */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 222: /* param_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2113 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2114 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 222: /* table_ref */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 223: /* table_ref */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2119 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2120 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 223: /* table_ref_atomic */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 224: /* table_ref_atomic */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2125 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2126 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 224: /* nonjoin_table_ref_atomic */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 225: /* nonjoin_table_ref_atomic */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2131 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2132 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 225: /* table_ref_commalist */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 226: /* table_ref_commalist */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2140,59 +2141,59 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).table_vec)); } -#line 2144 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2145 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 226: /* table_ref_name */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 227: /* table_ref_name */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2150 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2151 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 227: /* table_ref_name_no_alias */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ + case 228: /* table_ref_name_no_alias */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2156 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2157 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 228: /* table_name */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2162 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 229: /* alias */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2168 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 230: /* opt_alias */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2174 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 231: /* join_clause */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ - { delete (((*yyvaluep).table)); } -#line 2180 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 232: /* opt_join_type */ -#line 134 "bison_parser.y" /* yacc.c:1257 */ - { } -#line 2186 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 233: /* join_condition */ -#line 144 "bison_parser.y" /* yacc.c:1257 */ - { delete (((*yyvaluep).expr)); } -#line 2192 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 235: /* ident_commalist */ + case 229: /* table_name */ #line 136 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2163 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 230: /* alias */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2169 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 231: /* opt_alias */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2175 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 232: /* join_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ + { delete (((*yyvaluep).table)); } +#line 2181 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 233: /* opt_join_type */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ + { } +#line 2187 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 234: /* join_condition */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ + { delete (((*yyvaluep).expr)); } +#line 2193 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 236: /* ident_commalist */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2201,7 +2202,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2205 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2206 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -2319,7 +2320,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.total_column = 0; } -#line 2323 "bison_parser.cpp" /* yacc.c:1429 */ +#line 2324 "bison_parser.cpp" /* yacc.c:1429 */ yylsp[0] = yylloc; goto yysetstate; @@ -2506,7 +2507,7 @@ yyreduce: switch (yyn) { case 2: -#line 240 "bison_parser.y" /* yacc.c:1646 */ +#line 242 "bison_parser.y" /* yacc.c:1646 */ { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -2524,211 +2525,236 @@ yyreduce: } delete (yyvsp[-1].stmt_vec); } -#line 2528 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2529 "bison_parser.cpp" /* yacc.c:1646 */ break; case 3: -#line 261 "bison_parser.y" /* yacc.c:1646 */ +#line 263 "bison_parser.y" /* yacc.c:1646 */ { (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 2534 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2535 "bison_parser.cpp" /* yacc.c:1646 */ break; case 4: -#line 262 "bison_parser.y" /* yacc.c:1646 */ +#line 264 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 2540 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2541 "bison_parser.cpp" /* yacc.c:1646 */ break; case 5: -#line 266 "bison_parser.y" /* yacc.c:1646 */ +#line 268 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2549 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2550 "bison_parser.cpp" /* yacc.c:1646 */ break; case 6: -#line 270 "bison_parser.y" /* yacc.c:1646 */ +#line 272 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2558 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2559 "bison_parser.cpp" /* yacc.c:1646 */ break; case 7: -#line 278 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 2564 "bison_parser.cpp" /* yacc.c:1646 */ +#line 276 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.statement) = (yyvsp[0].show_stmt); + } +#line 2567 "bison_parser.cpp" /* yacc.c:1646 */ break; case 8: -#line 279 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 2570 "bison_parser.cpp" /* yacc.c:1646 */ +#line 283 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.statement) = (yyvsp[0].select_stmt); } +#line 2573 "bison_parser.cpp" /* yacc.c:1646 */ break; case 9: -#line 280 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 2576 "bison_parser.cpp" /* yacc.c:1646 */ +#line 284 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.statement) = (yyvsp[0].import_stmt); } +#line 2579 "bison_parser.cpp" /* yacc.c:1646 */ break; case 10: -#line 281 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 2582 "bison_parser.cpp" /* yacc.c:1646 */ +#line 285 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.statement) = (yyvsp[0].create_stmt); } +#line 2585 "bison_parser.cpp" /* yacc.c:1646 */ break; case 11: -#line 282 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2588 "bison_parser.cpp" /* yacc.c:1646 */ +#line 286 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.statement) = (yyvsp[0].insert_stmt); } +#line 2591 "bison_parser.cpp" /* yacc.c:1646 */ break; case 12: -#line 283 "bison_parser.y" /* yacc.c:1646 */ +#line 287 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2594 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2597 "bison_parser.cpp" /* yacc.c:1646 */ break; case 13: -#line 284 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 2600 "bison_parser.cpp" /* yacc.c:1646 */ +#line 288 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.statement) = (yyvsp[0].delete_stmt); } +#line 2603 "bison_parser.cpp" /* yacc.c:1646 */ break; case 14: -#line 285 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 2606 "bison_parser.cpp" /* yacc.c:1646 */ +#line 289 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.statement) = (yyvsp[0].update_stmt); } +#line 2609 "bison_parser.cpp" /* yacc.c:1646 */ break; case 15: -#line 286 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 2612 "bison_parser.cpp" /* yacc.c:1646 */ +#line 290 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.statement) = (yyvsp[0].drop_stmt); } +#line 2615 "bison_parser.cpp" /* yacc.c:1646 */ break; case 16: -#line 295 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 2618 "bison_parser.cpp" /* yacc.c:1646 */ +#line 291 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.statement) = (yyvsp[0].exec_stmt); } +#line 2621 "bison_parser.cpp" /* yacc.c:1646 */ break; case 17: -#line 296 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = nullptr; } -#line 2624 "bison_parser.cpp" /* yacc.c:1646 */ +#line 300 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } +#line 2627 "bison_parser.cpp" /* yacc.c:1646 */ break; case 18: #line 301 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 2630 "bison_parser.cpp" /* yacc.c:1646 */ + { (yyval.expr_vec) = nullptr; } +#line 2633 "bison_parser.cpp" /* yacc.c:1646 */ break; case 19: -#line 302 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 2636 "bison_parser.cpp" /* yacc.c:1646 */ +#line 306 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 2639 "bison_parser.cpp" /* yacc.c:1646 */ break; case 20: -#line 306 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.expr) = Expr::make(kExprHint); - (yyval.expr)->name = (yyvsp[0].sval); - } +#line 307 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } #line 2645 "bison_parser.cpp" /* yacc.c:1646 */ break; case 21: -#line 310 "bison_parser.y" /* yacc.c:1646 */ +#line 311 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.expr) = Expr::make(kExprHint); + (yyval.expr)->name = (yyvsp[0].sval); + } +#line 2654 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 22: +#line 315 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 2655 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2664 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 22: -#line 322 "bison_parser.y" /* yacc.c:1646 */ + case 23: +#line 327 "bison_parser.y" /* yacc.c:1646 */ { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 2665 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 24: -#line 332 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.exec_stmt) = new ExecuteStatement(); - (yyval.exec_stmt)->name = (yyvsp[0].sval); - } #line 2674 "bison_parser.cpp" /* yacc.c:1646 */ break; case 25: -#line 336 "bison_parser.y" /* yacc.c:1646 */ +#line 337 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.exec_stmt) = new ExecuteStatement(); + (yyval.exec_stmt)->name = (yyvsp[0].sval); + } +#line 2683 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 26: +#line 341 "bison_parser.y" /* yacc.c:1646 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 2684 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2693 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 26: -#line 348 "bison_parser.y" /* yacc.c:1646 */ + case 27: +#line 353 "bison_parser.y" /* yacc.c:1646 */ { (yyval.import_stmt) = new ImportStatement((ImportType) (yyvsp[-4].uval)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->tableName = (yyvsp[0].sval); } -#line 2694 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 27: -#line 356 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kImportCSV; } -#line 2700 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2703 "bison_parser.cpp" /* yacc.c:1646 */ break; case 28: -#line 360 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 2706 "bison_parser.cpp" /* yacc.c:1646 */ +#line 361 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kImportCSV; } +#line 2709 "bison_parser.cpp" /* yacc.c:1646 */ break; case 29: -#line 370 "bison_parser.y" /* yacc.c:1646 */ +#line 365 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } +#line 2715 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 30: +#line 375 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.show_stmt) = new ShowStatement(kShowTables); + } +#line 2723 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 31: +#line 378 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.show_stmt) = new ShowStatement(kShowColumns); + (yyval.show_stmt)->name = (yyvsp[0].sval); + } +#line 2732 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 32: +#line 391 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); (yyval.create_stmt)->tableName = (yyvsp[-4].sval); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 2717 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2743 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 30: -#line 376 "bison_parser.y" /* yacc.c:1646 */ + case 33: +#line 397 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); (yyval.create_stmt)->tableName = (yyvsp[-3].sval); (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 2728 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2754 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 31: -#line 382 "bison_parser.y" /* yacc.c:1646 */ + case 34: +#line 403 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -2736,180 +2762,180 @@ yyreduce: (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 2740 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 32: -#line 392 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = true; } -#line 2746 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 33: -#line 393 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 2752 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 34: -#line 397 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 2758 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2766 "bison_parser.cpp" /* yacc.c:1646 */ break; case 35: -#line 398 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 2764 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 36: -#line 402 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); - } +#line 413 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = true; } #line 2772 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 37: -#line 409 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = ColumnDefinition::INT; } + case 36: +#line 414 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = false; } #line 2778 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 38: -#line 410 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = ColumnDefinition::INT; } + case 37: +#line 418 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } #line 2784 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 39: -#line 411 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = ColumnDefinition::DOUBLE; } + case 38: +#line 419 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } #line 2790 "bison_parser.cpp" /* yacc.c:1646 */ break; + case 39: +#line 423 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); + } +#line 2798 "bison_parser.cpp" /* yacc.c:1646 */ + break; + case 40: -#line 412 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = ColumnDefinition::TEXT; } -#line 2796 "bison_parser.cpp" /* yacc.c:1646 */ +#line 430 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = ColumnDefinition::INT; } +#line 2804 "bison_parser.cpp" /* yacc.c:1646 */ break; case 41: -#line 422 "bison_parser.y" /* yacc.c:1646 */ +#line 431 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = ColumnDefinition::INT; } +#line 2810 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 42: +#line 432 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = ColumnDefinition::DOUBLE; } +#line 2816 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 43: +#line 433 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = ColumnDefinition::TEXT; } +#line 2822 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 44: +#line 443 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropTable); (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2805 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2831 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 42: -#line 426 "bison_parser.y" /* yacc.c:1646 */ + case 45: +#line 447 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropView); (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2814 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2840 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 43: -#line 430 "bison_parser.y" /* yacc.c:1646 */ + case 46: +#line 451 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2823 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2849 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 44: -#line 442 "bison_parser.y" /* yacc.c:1646 */ + case 47: +#line 463 "bison_parser.y" /* yacc.c:1646 */ { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->tableName = (yyvsp[-1].sval); (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 2833 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2859 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 45: -#line 450 "bison_parser.y" /* yacc.c:1646 */ + case 48: +#line 471 "bison_parser.y" /* yacc.c:1646 */ { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->tableName = (yyvsp[0].sval); } -#line 2842 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2868 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 46: -#line 462 "bison_parser.y" /* yacc.c:1646 */ + case 49: +#line 483 "bison_parser.y" /* yacc.c:1646 */ { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->tableName = (yyvsp[-5].sval); (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 2853 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2879 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 47: -#line 468 "bison_parser.y" /* yacc.c:1646 */ + case 50: +#line 489 "bison_parser.y" /* yacc.c:1646 */ { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->tableName = (yyvsp[-2].sval); (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 2864 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2890 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 48: -#line 478 "bison_parser.y" /* yacc.c:1646 */ + case 51: +#line 499 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 2870 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2896 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 49: -#line 479 "bison_parser.y" /* yacc.c:1646 */ + case 52: +#line 500 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = nullptr; } -#line 2876 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2902 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 50: -#line 489 "bison_parser.y" /* yacc.c:1646 */ + case 53: +#line 510 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_stmt) = new UpdateStatement(); (yyval.update_stmt)->table = (yyvsp[-3].table); (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 2887 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2913 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 51: -#line 498 "bison_parser.y" /* yacc.c:1646 */ + case 54: +#line 519 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 2893 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2919 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 52: -#line 499 "bison_parser.y" /* yacc.c:1646 */ + case 55: +#line 520 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 2899 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2925 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 53: -#line 503 "bison_parser.y" /* yacc.c:1646 */ + case 56: +#line 524 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 2909 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2935 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 56: -#line 517 "bison_parser.y" /* yacc.c:1646 */ + case 59: +#line 538 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -2924,23 +2950,23 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2928 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2954 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 57: -#line 534 "bison_parser.y" /* yacc.c:1646 */ + case 60: +#line 555 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2934 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 58: -#line 535 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2940 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2960 "bison_parser.cpp" /* yacc.c:1646 */ break; case 61: -#line 544 "bison_parser.y" /* yacc.c:1646 */ +#line 556 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } +#line 2966 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 64: +#line 565 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -2951,11 +2977,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2955 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2981 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 62: -#line 554 "bison_parser.y" /* yacc.c:1646 */ + case 65: +#line 575 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -2970,11 +2996,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2974 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3000 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 69: -#line 586 "bison_parser.y" /* yacc.c:1646 */ + case 72: +#line 607 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -2984,538 +3010,538 @@ yyreduce: (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 2988 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 70: -#line 598 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = true; } -#line 2994 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 71: -#line 599 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 3000 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3014 "bison_parser.cpp" /* yacc.c:1646 */ break; case 73: -#line 607 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table) = (yyvsp[0].table); } -#line 3006 "bison_parser.cpp" /* yacc.c:1646 */ +#line 619 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = true; } +#line 3020 "bison_parser.cpp" /* yacc.c:1646 */ break; case 74: -#line 612 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3012 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 75: -#line 613 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3018 "bison_parser.cpp" /* yacc.c:1646 */ +#line 620 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = false; } +#line 3026 "bison_parser.cpp" /* yacc.c:1646 */ break; case 76: -#line 617 "bison_parser.y" /* yacc.c:1646 */ +#line 628 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table) = (yyvsp[0].table); } +#line 3032 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 77: +#line 633 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3038 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 78: +#line 634 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = nullptr; } +#line 3044 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 79: +#line 638 "bison_parser.y" /* yacc.c:1646 */ { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3028 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 77: -#line 622 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.group_t) = nullptr; } -#line 3034 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 78: -#line 626 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3040 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 79: -#line 627 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3046 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3054 "bison_parser.cpp" /* yacc.c:1646 */ break; case 80: -#line 630 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3052 "bison_parser.cpp" /* yacc.c:1646 */ +#line 643 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.group_t) = nullptr; } +#line 3060 "bison_parser.cpp" /* yacc.c:1646 */ break; case 81: -#line 631 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = nullptr; } -#line 3058 "bison_parser.cpp" /* yacc.c:1646 */ +#line 647 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3066 "bison_parser.cpp" /* yacc.c:1646 */ break; case 82: -#line 635 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3064 "bison_parser.cpp" /* yacc.c:1646 */ +#line 648 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = nullptr; } +#line 3072 "bison_parser.cpp" /* yacc.c:1646 */ break; case 83: -#line 636 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3070 "bison_parser.cpp" /* yacc.c:1646 */ +#line 651 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = (yyvsp[0].order_vec); } +#line 3078 "bison_parser.cpp" /* yacc.c:1646 */ break; case 84: -#line 640 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3076 "bison_parser.cpp" /* yacc.c:1646 */ +#line 652 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = nullptr; } +#line 3084 "bison_parser.cpp" /* yacc.c:1646 */ break; case 85: -#line 644 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } -#line 3082 "bison_parser.cpp" /* yacc.c:1646 */ +#line 656 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } +#line 3090 "bison_parser.cpp" /* yacc.c:1646 */ break; case 86: -#line 645 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderDesc; } -#line 3088 "bison_parser.cpp" /* yacc.c:1646 */ +#line 657 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } +#line 3096 "bison_parser.cpp" /* yacc.c:1646 */ break; case 87: -#line 646 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } -#line 3094 "bison_parser.cpp" /* yacc.c:1646 */ +#line 661 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } +#line 3102 "bison_parser.cpp" /* yacc.c:1646 */ break; case 88: -#line 652 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3100 "bison_parser.cpp" /* yacc.c:1646 */ +#line 665 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderAsc; } +#line 3108 "bison_parser.cpp" /* yacc.c:1646 */ break; case 89: -#line 653 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } -#line 3106 "bison_parser.cpp" /* yacc.c:1646 */ +#line 666 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderDesc; } +#line 3114 "bison_parser.cpp" /* yacc.c:1646 */ break; case 90: -#line 657 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3112 "bison_parser.cpp" /* yacc.c:1646 */ +#line 667 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderAsc; } +#line 3120 "bison_parser.cpp" /* yacc.c:1646 */ break; case 91: -#line 658 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } -#line 3118 "bison_parser.cpp" /* yacc.c:1646 */ +#line 673 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } +#line 3126 "bison_parser.cpp" /* yacc.c:1646 */ break; case 92: -#line 659 "bison_parser.y" /* yacc.c:1646 */ +#line 674 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = nullptr; } -#line 3124 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3132 "bison_parser.cpp" /* yacc.c:1646 */ break; case 93: -#line 666 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3130 "bison_parser.cpp" /* yacc.c:1646 */ +#line 678 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } +#line 3138 "bison_parser.cpp" /* yacc.c:1646 */ break; case 94: -#line 667 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3136 "bison_parser.cpp" /* yacc.c:1646 */ +#line 679 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } +#line 3144 "bison_parser.cpp" /* yacc.c:1646 */ break; case 95: -#line 671 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3142 "bison_parser.cpp" /* yacc.c:1646 */ +#line 680 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = nullptr; } +#line 3150 "bison_parser.cpp" /* yacc.c:1646 */ break; case 96: -#line 672 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3148 "bison_parser.cpp" /* yacc.c:1646 */ +#line 687 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3156 "bison_parser.cpp" /* yacc.c:1646 */ break; case 97: -#line 676 "bison_parser.y" /* yacc.c:1646 */ +#line 688 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3162 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 98: +#line 692 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3168 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 99: +#line 693 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3174 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 100: +#line 697 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); (yyval.expr)->alias = (yyvsp[0].sval); } -#line 3157 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3183 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 103: -#line 691 "bison_parser.y" /* yacc.c:1646 */ + case 106: +#line 712 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); } -#line 3163 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 111: -#line 699 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3169 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3189 "bison_parser.cpp" /* yacc.c:1646 */ break; case 114: -#line 708 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3175 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 115: -#line 709 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3181 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 116: -#line 710 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 3187 "bison_parser.cpp" /* yacc.c:1646 */ +#line 720 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } +#line 3195 "bison_parser.cpp" /* yacc.c:1646 */ break; case 117: -#line 711 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 3193 "bison_parser.cpp" /* yacc.c:1646 */ +#line 729 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } +#line 3201 "bison_parser.cpp" /* yacc.c:1646 */ break; case 118: -#line 712 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 3199 "bison_parser.cpp" /* yacc.c:1646 */ +#line 730 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } +#line 3207 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 119: +#line 731 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } +#line 3213 "bison_parser.cpp" /* yacc.c:1646 */ break; case 120: -#line 717 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 3205 "bison_parser.cpp" /* yacc.c:1646 */ +#line 732 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } +#line 3219 "bison_parser.cpp" /* yacc.c:1646 */ break; case 121: -#line 718 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 3211 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 122: -#line 719 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 3217 "bison_parser.cpp" /* yacc.c:1646 */ +#line 733 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } +#line 3225 "bison_parser.cpp" /* yacc.c:1646 */ break; case 123: -#line 720 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 3223 "bison_parser.cpp" /* yacc.c:1646 */ +#line 738 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } +#line 3231 "bison_parser.cpp" /* yacc.c:1646 */ break; case 124: -#line 721 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 3229 "bison_parser.cpp" /* yacc.c:1646 */ +#line 739 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } +#line 3237 "bison_parser.cpp" /* yacc.c:1646 */ break; case 125: -#line 722 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 3235 "bison_parser.cpp" /* yacc.c:1646 */ +#line 740 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } +#line 3243 "bison_parser.cpp" /* yacc.c:1646 */ break; case 126: -#line 723 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 3241 "bison_parser.cpp" /* yacc.c:1646 */ +#line 741 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } +#line 3249 "bison_parser.cpp" /* yacc.c:1646 */ break; case 127: -#line 724 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 3247 "bison_parser.cpp" /* yacc.c:1646 */ +#line 742 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } +#line 3255 "bison_parser.cpp" /* yacc.c:1646 */ break; case 128: -#line 725 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 3253 "bison_parser.cpp" /* yacc.c:1646 */ +#line 743 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } +#line 3261 "bison_parser.cpp" /* yacc.c:1646 */ break; case 129: -#line 726 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 3259 "bison_parser.cpp" /* yacc.c:1646 */ +#line 744 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } +#line 3267 "bison_parser.cpp" /* yacc.c:1646 */ break; case 130: -#line 730 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 3265 "bison_parser.cpp" /* yacc.c:1646 */ +#line 745 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } +#line 3273 "bison_parser.cpp" /* yacc.c:1646 */ break; case 131: -#line 731 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 3271 "bison_parser.cpp" /* yacc.c:1646 */ +#line 746 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } +#line 3279 "bison_parser.cpp" /* yacc.c:1646 */ break; case 132: -#line 735 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 3277 "bison_parser.cpp" /* yacc.c:1646 */ +#line 747 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } +#line 3285 "bison_parser.cpp" /* yacc.c:1646 */ break; case 133: -#line 736 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 3283 "bison_parser.cpp" /* yacc.c:1646 */ +#line 751 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } +#line 3291 "bison_parser.cpp" /* yacc.c:1646 */ break; case 134: -#line 737 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 3289 "bison_parser.cpp" /* yacc.c:1646 */ +#line 752 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } +#line 3297 "bison_parser.cpp" /* yacc.c:1646 */ break; case 135: -#line 738 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 3295 "bison_parser.cpp" /* yacc.c:1646 */ +#line 756 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } +#line 3303 "bison_parser.cpp" /* yacc.c:1646 */ break; case 136: -#line 743 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3301 "bison_parser.cpp" /* yacc.c:1646 */ +#line 757 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } +#line 3309 "bison_parser.cpp" /* yacc.c:1646 */ break; case 137: -#line 745 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3307 "bison_parser.cpp" /* yacc.c:1646 */ +#line 758 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } +#line 3315 "bison_parser.cpp" /* yacc.c:1646 */ break; case 138: -#line 749 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 3313 "bison_parser.cpp" /* yacc.c:1646 */ +#line 759 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } +#line 3321 "bison_parser.cpp" /* yacc.c:1646 */ break; case 139: -#line 750 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 3319 "bison_parser.cpp" /* yacc.c:1646 */ +#line 764 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3327 "bison_parser.cpp" /* yacc.c:1646 */ break; case 140: -#line 754 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 3325 "bison_parser.cpp" /* yacc.c:1646 */ +#line 766 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3333 "bison_parser.cpp" /* yacc.c:1646 */ break; case 141: -#line 755 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 3331 "bison_parser.cpp" /* yacc.c:1646 */ +#line 770 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } +#line 3339 "bison_parser.cpp" /* yacc.c:1646 */ break; case 142: -#line 756 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 3337 "bison_parser.cpp" /* yacc.c:1646 */ +#line 771 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } +#line 3345 "bison_parser.cpp" /* yacc.c:1646 */ break; case 143: -#line 757 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 3343 "bison_parser.cpp" /* yacc.c:1646 */ +#line 775 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 3351 "bison_parser.cpp" /* yacc.c:1646 */ break; case 144: -#line 758 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 3349 "bison_parser.cpp" /* yacc.c:1646 */ +#line 776 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } +#line 3357 "bison_parser.cpp" /* yacc.c:1646 */ break; case 145: -#line 759 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 3355 "bison_parser.cpp" /* yacc.c:1646 */ +#line 777 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } +#line 3363 "bison_parser.cpp" /* yacc.c:1646 */ break; case 146: -#line 763 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 3361 "bison_parser.cpp" /* yacc.c:1646 */ +#line 778 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } +#line 3369 "bison_parser.cpp" /* yacc.c:1646 */ break; case 147: -#line 764 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 3367 "bison_parser.cpp" /* yacc.c:1646 */ +#line 779 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } +#line 3375 "bison_parser.cpp" /* yacc.c:1646 */ break; case 148: -#line 768 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 3373 "bison_parser.cpp" /* yacc.c:1646 */ +#line 780 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } +#line 3381 "bison_parser.cpp" /* yacc.c:1646 */ break; case 149: -#line 772 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 3379 "bison_parser.cpp" /* yacc.c:1646 */ +#line 784 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } +#line 3387 "bison_parser.cpp" /* yacc.c:1646 */ break; case 150: -#line 776 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3385 "bison_parser.cpp" /* yacc.c:1646 */ +#line 785 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } +#line 3393 "bison_parser.cpp" /* yacc.c:1646 */ break; case 151: -#line 780 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 3391 "bison_parser.cpp" /* yacc.c:1646 */ +#line 789 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } +#line 3399 "bison_parser.cpp" /* yacc.c:1646 */ break; case 152: -#line 781 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 3397 "bison_parser.cpp" /* yacc.c:1646 */ +#line 793 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } +#line 3405 "bison_parser.cpp" /* yacc.c:1646 */ break; case 153: -#line 782 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeStar(); } -#line 3403 "bison_parser.cpp" /* yacc.c:1646 */ +#line 797 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 3411 "bison_parser.cpp" /* yacc.c:1646 */ break; case 154: -#line 783 "bison_parser.y" /* yacc.c:1646 */ +#line 801 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } +#line 3417 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 155: +#line 802 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } +#line 3423 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 156: +#line 803 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeStar(); } +#line 3429 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 157: +#line 804 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 3409 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 159: -#line 794 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 3415 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 160: -#line 799 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 3421 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3435 "bison_parser.cpp" /* yacc.c:1646 */ break; case 162: -#line 804 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 3427 "bison_parser.cpp" /* yacc.c:1646 */ +#line 815 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } +#line 3441 "bison_parser.cpp" /* yacc.c:1646 */ break; case 163: -#line 808 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeNullLiteral(); } -#line 3433 "bison_parser.cpp" /* yacc.c:1646 */ +#line 820 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } +#line 3447 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 164: -#line 812 "bison_parser.y" /* yacc.c:1646 */ + case 165: +#line 825 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } +#line 3453 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 166: +#line 829 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeNullLiteral(); } +#line 3459 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 167: +#line 833 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 3443 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3469 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 166: -#line 825 "bison_parser.y" /* yacc.c:1646 */ + case 169: +#line 846 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[0].table_vec)->push_back((yyvsp[-2].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[0].table_vec); (yyval.table) = tbl; } -#line 3454 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3480 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 170: -#line 841 "bison_parser.y" /* yacc.c:1646 */ + case 173: +#line 862 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3465 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3491 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 171: -#line 850 "bison_parser.y" /* yacc.c:1646 */ + case 174: +#line 871 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 3471 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3497 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 172: -#line 851 "bison_parser.y" /* yacc.c:1646 */ + case 175: +#line 872 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 3477 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3503 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 173: -#line 856 "bison_parser.y" /* yacc.c:1646 */ + case 176: +#line 877 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableName); tbl->name = (yyvsp[-1].sval); tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3488 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3514 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 174: -#line 866 "bison_parser.y" /* yacc.c:1646 */ + case 177: +#line 887 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableName); (yyval.table)->name = (yyvsp[0].sval); } -#line 3497 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3523 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 176: -#line 875 "bison_parser.y" /* yacc.c:1646 */ + case 179: +#line 896 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = (yyvsp[0].sval); } -#line 3503 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 177: -#line 880 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.sval) = (yyvsp[0].sval); } -#line 3509 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3529 "bison_parser.cpp" /* yacc.c:1646 */ break; case 180: -#line 886 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.sval) = nullptr; } -#line 3515 "bison_parser.cpp" /* yacc.c:1646 */ +#line 901 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.sval) = (yyvsp[0].sval); } +#line 3535 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 181: -#line 895 "bison_parser.y" /* yacc.c:1646 */ + case 183: +#line 907 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.sval) = nullptr; } +#line 3541 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 184: +#line 916 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3523,12 +3549,12 @@ yyreduce: (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 3527 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3553 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 182: -#line 903 "bison_parser.y" /* yacc.c:1646 */ - { + case 185: +#line 924 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); (yyval.table)->join->type = (JoinType) (yyvsp[-4].uval); @@ -3536,12 +3562,12 @@ yyreduce: (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 3540 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3566 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 183: -#line 913 "bison_parser.y" /* yacc.c:1646 */ - { + case 186: +#line 934 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); (yyval.table)->join->type = (JoinType) (yyvsp[-6].uval); @@ -3556,71 +3582,71 @@ yyreduce: (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 3560 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 184: -#line 931 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } -#line 3566 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 185: -#line 932 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinOuter; } -#line 3572 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 186: -#line 933 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeftOuter; } -#line 3578 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3586 "bison_parser.cpp" /* yacc.c:1646 */ break; case 187: -#line 934 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRightOuter; } -#line 3584 "bison_parser.cpp" /* yacc.c:1646 */ +#line 952 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinInner; } +#line 3592 "bison_parser.cpp" /* yacc.c:1646 */ break; case 188: -#line 935 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeft; } -#line 3590 "bison_parser.cpp" /* yacc.c:1646 */ +#line 953 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinOuter; } +#line 3598 "bison_parser.cpp" /* yacc.c:1646 */ break; case 189: -#line 936 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRight; } -#line 3596 "bison_parser.cpp" /* yacc.c:1646 */ +#line 954 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinLeftOuter; } +#line 3604 "bison_parser.cpp" /* yacc.c:1646 */ break; case 190: -#line 937 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinCross; } -#line 3602 "bison_parser.cpp" /* yacc.c:1646 */ +#line 955 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinRightOuter; } +#line 3610 "bison_parser.cpp" /* yacc.c:1646 */ break; case 191: -#line 938 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } -#line 3608 "bison_parser.cpp" /* yacc.c:1646 */ +#line 956 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinLeft; } +#line 3616 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 195: + case 192: +#line 957 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinRight; } +#line 3622 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 193: #line 958 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 3614 "bison_parser.cpp" /* yacc.c:1646 */ + { (yyval.uval) = kJoinCross; } +#line 3628 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 196: + case 194: #line 959 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinInner; } +#line 3634 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 198: +#line 979 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } +#line 3640 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 199: +#line 980 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 3620 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3646 "bison_parser.cpp" /* yacc.c:1646 */ break; -#line 3624 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3650 "bison_parser.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3855,7 +3881,7 @@ yyreturn: #endif return yyresult; } -#line 962 "bison_parser.y" /* yacc.c:1906 */ +#line 983 "bison_parser.y" /* yacc.c:1906 */ /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index e203b32..8a5d89d 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -214,7 +214,7 @@ extern int hsql_debug; /* Value type. */ #if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED - +typedef union HSQL_STYPE HSQL_STYPE; union HSQL_STYPE { #line 93 "bison_parser.y" /* yacc.c:1909 */ @@ -235,6 +235,7 @@ union HSQL_STYPE hsql::DropStatement* drop_stmt; hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; + hsql::ShowStatement* show_stmt; hsql::TableRef* table; hsql::Expr* expr; @@ -254,10 +255,8 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; -#line 258 "bison_parser.h" /* yacc.c:1909 */ +#line 259 "bison_parser.h" /* yacc.c:1909 */ }; - -typedef union HSQL_STYPE HSQL_STYPE; # define HSQL_STYPE_IS_TRIVIAL 1 # define HSQL_STYPE_IS_DECLARED 1 #endif diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index bb96826..d498bb3 100644 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -107,6 +107,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::DropStatement* drop_stmt; hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; + hsql::ShowStatement* show_stmt; hsql::TableRef* table; hsql::Expr* expr; @@ -182,6 +183,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type delete_statement truncate_statement %type update_statement %type drop_statement +%type show_statement %type table_name opt_alias alias file_path prepare_target_query %type opt_not_exists opt_distinct %type import_file_type opt_join_type column_type @@ -271,6 +273,9 @@ statement: $$ = $1; $$->hints = $2; } + | show_statement { + $$ = $1; + } ; @@ -361,6 +366,22 @@ file_path: ; +/****************************** + * Show Statement + * SHOW TABLES; + ******************************/ + +show_statement: + SHOW TABLES { + $$ = new ShowStatement(kShowTables); + } + | SHOW COLUMNS table_name { + $$ = new ShowStatement(kShowColumns); + $$->name = $3; + } + ; + + /****************************** * Create Statement * CREATE TABLE students (name TEXT, student_number INTEGER, city TEXT, grade DOUBLE) @@ -836,7 +857,7 @@ table_ref_atomic: | join_clause ; -nonjoin_table_ref_atomic: +nonjoin_table_ref_atomic: table_ref_name | '(' select_statement ')' opt_alias { auto tbl = new TableRef(kTableSelect); @@ -900,7 +921,7 @@ join_clause: $$->join->right = $4; } | table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition - { + { $$ = new TableRef(kTableJoin); $$->join = new JoinDefinition(); $$->join->type = (JoinType) $2; @@ -910,7 +931,7 @@ join_clause: } | table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' - { + { $$ = new TableRef(kTableJoin); $$->join = new JoinDefinition(); $$->join->type = (JoinType) $2; diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp index ceb87e2..2af46f3 100644 --- a/src/parser/flex_lexer.cpp +++ b/src/parser/flex_lexer.cpp @@ -1,6 +1,6 @@ -#line 1 "flex_lexer.cpp" +#line 2 "flex_lexer.cpp" -#line 3 "flex_lexer.cpp" +#line 4 "flex_lexer.cpp" #define YY_INT_ALIGNED short int @@ -8,246 +8,12 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 4 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif -#ifdef yy_create_buffer -#define hsql__create_buffer_ALREADY_DEFINED -#else -#define yy_create_buffer hsql__create_buffer -#endif - -#ifdef yy_delete_buffer -#define hsql__delete_buffer_ALREADY_DEFINED -#else -#define yy_delete_buffer hsql__delete_buffer -#endif - -#ifdef yy_scan_buffer -#define hsql__scan_buffer_ALREADY_DEFINED -#else -#define yy_scan_buffer hsql__scan_buffer -#endif - -#ifdef yy_scan_string -#define hsql__scan_string_ALREADY_DEFINED -#else -#define yy_scan_string hsql__scan_string -#endif - -#ifdef yy_scan_bytes -#define hsql__scan_bytes_ALREADY_DEFINED -#else -#define yy_scan_bytes hsql__scan_bytes -#endif - -#ifdef yy_init_buffer -#define hsql__init_buffer_ALREADY_DEFINED -#else -#define yy_init_buffer hsql__init_buffer -#endif - -#ifdef yy_flush_buffer -#define hsql__flush_buffer_ALREADY_DEFINED -#else -#define yy_flush_buffer hsql__flush_buffer -#endif - -#ifdef yy_load_buffer_state -#define hsql__load_buffer_state_ALREADY_DEFINED -#else -#define yy_load_buffer_state hsql__load_buffer_state -#endif - -#ifdef yy_switch_to_buffer -#define hsql__switch_to_buffer_ALREADY_DEFINED -#else -#define yy_switch_to_buffer hsql__switch_to_buffer -#endif - -#ifdef yypush_buffer_state -#define hsql_push_buffer_state_ALREADY_DEFINED -#else -#define yypush_buffer_state hsql_push_buffer_state -#endif - -#ifdef yypop_buffer_state -#define hsql_pop_buffer_state_ALREADY_DEFINED -#else -#define yypop_buffer_state hsql_pop_buffer_state -#endif - -#ifdef yyensure_buffer_stack -#define hsql_ensure_buffer_stack_ALREADY_DEFINED -#else -#define yyensure_buffer_stack hsql_ensure_buffer_stack -#endif - -#ifdef yylex -#define hsql_lex_ALREADY_DEFINED -#else -#define yylex hsql_lex -#endif - -#ifdef yyrestart -#define hsql_restart_ALREADY_DEFINED -#else -#define yyrestart hsql_restart -#endif - -#ifdef yylex_init -#define hsql_lex_init_ALREADY_DEFINED -#else -#define yylex_init hsql_lex_init -#endif - -#ifdef yylex_init_extra -#define hsql_lex_init_extra_ALREADY_DEFINED -#else -#define yylex_init_extra hsql_lex_init_extra -#endif - -#ifdef yylex_destroy -#define hsql_lex_destroy_ALREADY_DEFINED -#else -#define yylex_destroy hsql_lex_destroy -#endif - -#ifdef yyget_debug -#define hsql_get_debug_ALREADY_DEFINED -#else -#define yyget_debug hsql_get_debug -#endif - -#ifdef yyset_debug -#define hsql_set_debug_ALREADY_DEFINED -#else -#define yyset_debug hsql_set_debug -#endif - -#ifdef yyget_extra -#define hsql_get_extra_ALREADY_DEFINED -#else -#define yyget_extra hsql_get_extra -#endif - -#ifdef yyset_extra -#define hsql_set_extra_ALREADY_DEFINED -#else -#define yyset_extra hsql_set_extra -#endif - -#ifdef yyget_in -#define hsql_get_in_ALREADY_DEFINED -#else -#define yyget_in hsql_get_in -#endif - -#ifdef yyset_in -#define hsql_set_in_ALREADY_DEFINED -#else -#define yyset_in hsql_set_in -#endif - -#ifdef yyget_out -#define hsql_get_out_ALREADY_DEFINED -#else -#define yyget_out hsql_get_out -#endif - -#ifdef yyset_out -#define hsql_set_out_ALREADY_DEFINED -#else -#define yyset_out hsql_set_out -#endif - -#ifdef yyget_leng -#define hsql_get_leng_ALREADY_DEFINED -#else -#define yyget_leng hsql_get_leng -#endif - -#ifdef yyget_text -#define hsql_get_text_ALREADY_DEFINED -#else -#define yyget_text hsql_get_text -#endif - -#ifdef yyget_lineno -#define hsql_get_lineno_ALREADY_DEFINED -#else -#define yyget_lineno hsql_get_lineno -#endif - -#ifdef yyset_lineno -#define hsql_set_lineno_ALREADY_DEFINED -#else -#define yyset_lineno hsql_set_lineno -#endif - -#ifdef yyget_column -#define hsql_get_column_ALREADY_DEFINED -#else -#define yyget_column hsql_get_column -#endif - -#ifdef yyset_column -#define hsql_set_column_ALREADY_DEFINED -#else -#define yyset_column hsql_set_column -#endif - -#ifdef yywrap -#define hsql_wrap_ALREADY_DEFINED -#else -#define yywrap hsql_wrap -#endif - -#ifdef yyget_lval -#define hsql_get_lval_ALREADY_DEFINED -#else -#define yyget_lval hsql_get_lval -#endif - -#ifdef yyset_lval -#define hsql_set_lval_ALREADY_DEFINED -#else -#define yyset_lval hsql_set_lval -#endif - -#ifdef yyget_lloc -#define hsql_get_lloc_ALREADY_DEFINED -#else -#define yyget_lloc hsql_get_lloc -#endif - -#ifdef yyset_lloc -#define hsql_set_lloc_ALREADY_DEFINED -#else -#define yyset_lloc hsql_set_lloc -#endif - -#ifdef yyalloc -#define hsql_alloc_ALREADY_DEFINED -#else -#define yyalloc hsql_alloc -#endif - -#ifdef yyrealloc -#define hsql_realloc_ALREADY_DEFINED -#else -#define yyrealloc hsql_realloc -#endif - -#ifdef yyfree -#define hsql_free_ALREADY_DEFINED -#else -#define yyfree hsql_free -#endif - /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -318,32 +84,40 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) -#endif - #endif /* ! C99 */ #endif /* ! FLEXINT_H */ -/* begin standard C++ headers. */ +#ifdef __cplusplus -/* TODO: this is always defined, so inline it */ +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST #define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) #else -#define yynoreturn +#define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 -/* Promotes a possibly negative, possibly signed char to an - * integer in range [0..255] for use as an array index. +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. */ -#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* An opaque pointer. */ #ifndef YY_TYPEDEF_YY_SCANNER_T @@ -367,16 +141,20 @@ typedef void* yyscan_t; * definition of BEGIN. */ #define BEGIN yyg->yy_start = 1 + 2 * + /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yyg->yy_start - 1) / 2) #define YYSTATE YY_START + /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin , yyscanner ) +#define YY_NEW_FILE hsql_restart(yyin ,yyscanner ) + #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ @@ -401,17 +179,11 @@ typedef void* yyscan_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 - + #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -426,8 +198,14 @@ typedef size_t yy_size_t; YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) + #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -440,7 +218,7 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - int yy_buf_size; + yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -468,7 +246,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -485,7 +263,7 @@ struct yy_buffer_state * possible backing-up. * * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by + * (via hsql_restart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 @@ -502,77 +280,84 @@ struct yy_buffer_state #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ : NULL) + /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void hsql_restart (FILE *input_file ,yyscan_t yyscanner ); +void hsql__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void hsql__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void hsql__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void hsql_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void hsql_pop_buffer_state (yyscan_t yyscanner ); -static void yyensure_buffer_stack ( yyscan_t yyscanner ); -static void yy_load_buffer_state ( yyscan_t yyscanner ); -static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); -#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) +static void hsql_ensure_buffer_stack (yyscan_t yyscanner ); +static void hsql__load_buffer_state (yyscan_t yyscanner ); +static void hsql__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +#define YY_FLUSH_BUFFER hsql__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *hsql_alloc (yy_size_t ,yyscan_t yyscanner ); +void *hsql_realloc (void *,yy_size_t ,yyscan_t yyscanner ); +void hsql_free (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer hsql__create_buffer -#define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ + hsql_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + hsql__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } + #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ + hsql_ensure_buffer_stack (yyscanner); \ YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ + hsql__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } + #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ -#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) +#define hsql_wrap(n) 1 #define YY_SKIP_YYWRAP -typedef flex_uint8_t YY_CHAR; + +typedef unsigned char YY_CHAR; typedef int yy_state_type; #define yytext_ptr yytext_r -static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); -static int yy_get_next_buffer ( yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; + #define YY_NUM_RULES 136 #define YY_END_OF_BUFFER 137 /* This struct is not used in this scanner, @@ -582,7 +367,7 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[938] = +static yyconst flex_int16_t yy_accept[938] = { 0, 0, 0, 2, 2, 137, 135, 4, 4, 135, 135, 128, 135, 128, 128, 131, 128, 128, 133, 133, 133, @@ -689,7 +474,7 @@ static const flex_int16_t yy_accept[938] = 2, 2, 5, 6, 2, 2, 0 } ; -static const YY_CHAR yy_ec[256] = +static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -721,7 +506,7 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[68] = +static yyconst flex_int32_t yy_meta[68] = { 0, 1, 1, 2, 1, 3, 1, 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, @@ -732,7 +517,7 @@ static const YY_CHAR yy_meta[68] = 4, 4, 4, 4, 4, 4, 1 } ; -static const flex_int16_t yy_base[945] = +static yyconst flex_int16_t yy_base[945] = { 0, 0, 0, 67, 0, 433, 3713, 133, 135, 418, 0, 3713, 410, 131, 401, 133, 132, 384, 129, 129, 137, @@ -840,7 +625,7 @@ static const flex_int16_t yy_base[945] = 3696, 3700, 3704, 3708 } ; -static const flex_int16_t yy_def[945] = +static yyconst flex_int16_t yy_def[945] = { 0, 937, 1, 937, 3, 937, 937, 937, 937, 937, 938, 937, 939, 937, 937, 937, 937, 937, 940, 940, 940, @@ -948,7 +733,7 @@ static const flex_int16_t yy_def[945] = 937, 937, 937, 937 } ; -static const flex_int16_t yy_nxt[3781] = +static yyconst flex_int16_t yy_nxt[3781] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 11, 17, 18, 19, 20, 21, 22, 23, 24, @@ -1367,7 +1152,7 @@ static const flex_int16_t yy_nxt[3781] = 937, 937, 937, 937, 937, 937, 937, 937, 937, 937 } ; -static const flex_int16_t yy_chk[3781] = +static yyconst flex_int16_t yy_chk[3781] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1810,7 +1595,6 @@ static const flex_int16_t yy_chk[3781] = #define TOKEN(name) { return SQL_##name; } -#line 1813 "flex_lexer.cpp" /*************************** ** Section 2: Rules ***************************/ @@ -1823,7 +1607,7 @@ static const flex_int16_t yy_chk[3781] = /*************************** ** Section 3: Rules ***************************/ -#line 1826 "flex_lexer.cpp" +#line 1611 "flex_lexer.cpp" #define INITIAL 0 #define COMMENT 1 @@ -1878,7 +1662,7 @@ struct yyguts_t }; /* end struct yyguts_t */ -static int yy_init_globals ( yyscan_t yyscanner ); +static int yy_init_globals (yyscan_t yyscanner ); /* This must go here because YYSTYPE and YYLTYPE are included * from bison output in section 1.*/ @@ -1886,50 +1670,46 @@ static int yy_init_globals ( yyscan_t yyscanner ); # define yylloc yyg->yylloc_r -int yylex_init (yyscan_t* scanner); +int hsql_lex_init (yyscan_t* scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int hsql_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int hsql_lex_destroy (yyscan_t yyscanner ); -int yyget_debug ( yyscan_t yyscanner ); +int hsql_get_debug (yyscan_t yyscanner ); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void hsql_set_debug (int debug_flag ,yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE hsql_get_extra (yyscan_t yyscanner ); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *hsql_get_in (yyscan_t yyscanner ); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void hsql_set_in (FILE * in_str ,yyscan_t yyscanner ); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *hsql_get_out (yyscan_t yyscanner ); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void hsql_set_out (FILE * out_str ,yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); +int hsql_get_leng (yyscan_t yyscanner ); -char *yyget_text ( yyscan_t yyscanner ); +char *hsql_get_text (yyscan_t yyscanner ); -int yyget_lineno ( yyscan_t yyscanner ); +int hsql_get_lineno (yyscan_t yyscanner ); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void hsql_set_lineno (int line_number ,yyscan_t yyscanner ); -int yyget_column ( yyscan_t yyscanner ); +YYSTYPE * hsql_get_lval (yyscan_t yyscanner ); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void hsql_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); - -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); - - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + YYLTYPE *hsql_get_lloc (yyscan_t yyscanner ); - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + void hsql_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1937,29 +1717,26 @@ void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int hsql_wrap (yyscan_t yyscanner ); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int hsql_wrap (yyscan_t yyscanner ); #endif #endif -#ifndef YY_NO_UNPUT - -#endif - #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT + #ifdef __cplusplus -static int yyinput ( yyscan_t yyscanner ); +static int yyinput (yyscan_t yyscanner ); #else -static int input ( yyscan_t yyscanner ); +static int input (yyscan_t yyscanner ); #endif #endif @@ -1979,7 +1756,7 @@ static int input ( yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1990,7 +1767,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -2003,7 +1780,7 @@ static int input ( yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -2044,10 +1821,10 @@ static int input ( yyscan_t yyscanner ); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int hsql_lex \ + (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); -#define YY_DECL int yylex \ +#define YY_DECL int hsql_lex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ @@ -2060,7 +1837,7 @@ extern int yylex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK break; #endif #define YY_RULE_SETUP \ @@ -2070,11 +1847,16 @@ extern int yylex \ */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; +#line 51 "flex_lexer.l" + + +#line 1859 "flex_lexer.cpp" + yylval = yylval_param; yylloc = yylloc_param; @@ -2097,21 +1879,15 @@ YY_DECL yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); + hsql_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + hsql__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } - yy_load_buffer_state( yyscanner ); + hsql__load_buffer_state(yyscanner ); } - { -#line 51 "flex_lexer.l" - - -#line 2112 "flex_lexer.cpp" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -2127,7 +1903,7 @@ YY_DECL yy_match: do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -2137,9 +1913,9 @@ yy_match: { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 938 ) - yy_c = yy_meta[yy_c]; + yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 937 ); @@ -2858,7 +2634,7 @@ YY_RULE_SETUP #line 217 "flex_lexer.l" ECHO; YY_BREAK -#line 2861 "flex_lexer.cpp" +#line 2638 "flex_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): yyterminate(); @@ -2877,7 +2653,7 @@ case YY_STATE_EOF(COMMENT): /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure + * hsql_lex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a @@ -2938,7 +2714,7 @@ case YY_STATE_EOF(COMMENT): { yyg->yy_did_buffer_switch_on_eof = 0; - if ( yywrap( yyscanner ) ) + if ( hsql_wrap(yyscanner ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -2991,8 +2767,7 @@ case YY_STATE_EOF(COMMENT): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of yylex */ +} /* end of hsql_lex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -3004,9 +2779,9 @@ case YY_STATE_EOF(COMMENT): static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = yyg->yytext_ptr; + register int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -3035,7 +2810,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -3055,7 +2830,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); @@ -3071,12 +2846,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yyrealloc( (void *) b->yy_ch_buf, - (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + hsql_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; + b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -3094,7 +2868,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); + yyg->yy_n_chars, (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -3104,7 +2878,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin , yyscanner); + hsql_restart(yyin ,yyscanner); } else @@ -3118,15 +2892,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hsql_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - /* "- 2" to take care of EOB's */ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } yyg->yy_n_chars += number_to_move; @@ -3142,15 +2913,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; + register yy_state_type yy_current_state; + register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -3160,9 +2931,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 938 ) - yy_c = yy_meta[yy_c]; + yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; @@ -3175,11 +2946,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; + register int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; + register char *yy_cp = yyg->yy_c_buf_p; - YY_CHAR yy_c = 1; + register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -3189,19 +2960,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 938 ) - yy_c = yy_meta[yy_c]; + yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 937); - (void)yyg; return yy_is_jam ? 0 : yy_current_state; } -#ifndef YY_NO_UNPUT - -#endif - #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -3227,7 +2993,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -3244,14 +3010,14 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ /* Reset buffer status. */ - yyrestart( yyin , yyscanner); + hsql_restart(yyin ,yyscanner); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap( yyscanner ) ) - return 0; + if ( hsql_wrap(yyscanner ) ) + return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -3282,34 +3048,34 @@ static int yy_get_next_buffer (yyscan_t yyscanner) * @param yyscanner The scanner object. * @note This function does not reset the start condition to @c INITIAL . */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) + void hsql_restart (FILE * input_file , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); + hsql_ensure_buffer_stack (yyscanner); YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); + hsql__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); } - yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); - yy_load_buffer_state( yyscanner ); + hsql__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + hsql__load_buffer_state(yyscanner ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * @param yyscanner The scanner object. */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) + void hsql__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* TODO. We should be able to replace this entire function body * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); + * hsql_pop_buffer_state(); + * hsql_push_buffer_state(new_buffer); */ - yyensure_buffer_stack (yyscanner); + hsql_ensure_buffer_stack (yyscanner); if ( YY_CURRENT_BUFFER == new_buffer ) return; @@ -3322,17 +3088,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( yyscanner ); + hsql__load_buffer_state(yyscanner ); /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe + * EOF (hsql_wrap()) processing, but the only time this flag + * is looked at is after hsql_wrap() is called, so it's safe * to go ahead and always set it. */ yyg->yy_did_buffer_switch_on_eof = 1; } -static void yy_load_buffer_state (yyscan_t yyscanner) +static void hsql__load_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; @@ -3347,35 +3113,35 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the allocated buffer state. */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) + YY_BUFFER_STATE hsql__create_buffer (FILE * file, int size , yyscan_t yyscanner) { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + b = (YY_BUFFER_STATE) hsql_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in hsql__create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); + b->yy_ch_buf = (char *) hsql_alloc(b->yy_buf_size + 2 ,yyscanner ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in hsql__create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file , yyscanner); + hsql__init_buffer(b,file ,yyscanner); return b; } /** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() + * @param b a buffer created with hsql__create_buffer() * @param yyscanner The scanner object. */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) + void hsql__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -3386,28 +3152,28 @@ static void yy_load_buffer_state (yyscan_t yyscanner) YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yyfree( (void *) b->yy_ch_buf , yyscanner ); + hsql_free((void *) b->yy_ch_buf ,yyscanner ); - yyfree( (void *) b , yyscanner ); + hsql_free((void *) b ,yyscanner ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. + * such as during a hsql_restart() or at EOF. */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + static void hsql__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) { int oerrno = errno; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flush_buffer( b , yyscanner); + hsql__flush_buffer(b ,yyscanner); b->yy_input_file = file; b->yy_fill_buffer = 1; - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. + /* If b is the current buffer, then hsql__init_buffer was _probably_ + * called from hsql_restart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ @@ -3424,7 +3190,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * @param yyscanner The scanner object. */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) + void hsql__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if ( ! b ) @@ -3445,7 +3211,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner) b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( yyscanner ); + hsql__load_buffer_state(yyscanner ); } /** Pushes the new state onto the stack. The new state becomes @@ -3454,15 +3220,15 @@ static void yy_load_buffer_state (yyscan_t yyscanner) * @param new_buffer The new state. * @param yyscanner The scanner object. */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +void hsql_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (new_buffer == NULL) return; - yyensure_buffer_stack(yyscanner); + hsql_ensure_buffer_stack(yyscanner); - /* This block is copied from yy_switch_to_buffer. */ + /* This block is copied from hsql__switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ @@ -3476,8 +3242,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) yyg->yy_buffer_stack_top++; YY_CURRENT_BUFFER_LVALUE = new_buffer; - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( yyscanner ); + /* copied from hsql__switch_to_buffer. */ + hsql__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } @@ -3485,19 +3251,19 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) * The next element becomes the new top. * @param yyscanner The scanner object. */ -void yypop_buffer_state (yyscan_t yyscanner) +void hsql_pop_buffer_state (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!YY_CURRENT_BUFFER) return; - yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); + hsql__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); YY_CURRENT_BUFFER_LVALUE = NULL; if (yyg->yy_buffer_stack_top > 0) --yyg->yy_buffer_stack_top; if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( yyscanner ); + hsql__load_buffer_state(yyscanner ); yyg->yy_did_buffer_switch_on_eof = 1; } } @@ -3505,9 +3271,9 @@ void yypop_buffer_state (yyscan_t yyscanner) /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -static void yyensure_buffer_stack (yyscan_t yyscanner) +static void hsql_ensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; + int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -3516,15 +3282,15 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc + num_to_alloc = 1; + yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + YY_FATAL_ERROR( "out of dynamic memory in hsql_ensure_buffer_stack()" ); + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -3533,15 +3299,15 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; + int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc + yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_realloc (yyg->yy_buffer_stack, num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + YY_FATAL_ERROR( "out of dynamic memory in hsql_ensure_buffer_stack()" ); /* zero only the new slots.*/ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); @@ -3553,9 +3319,9 @@ static void yyensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { YY_BUFFER_STATE b; @@ -3563,49 +3329,49 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return NULL; + return 0; - b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); + b = (YY_BUFFER_STATE) hsql_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in hsql__scan_buffer()" ); - b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; + b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b , yyscanner ); + hsql__switch_to_buffer(b ,yyscanner ); return b; } -/** Setup the input buffer state to scan a string. The next call to yylex() will +/** Setup the input buffer state to scan a string. The next call to hsql_lex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. + * hsql__scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) +YY_BUFFER_STATE hsql__scan_string (yyconst char * yystr , yyscan_t yyscanner) { - return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); + return hsql__scan_bytes(yystr,strlen(yystr) ,yyscanner); } -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will +/** Setup the input buffer state to scan the given bytes. The next call to hsql_lex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; @@ -3613,19 +3379,19 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc( n , yyscanner ); + n = _yybytes_len + 2; + buf = (char *) hsql_alloc(n ,yyscanner ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in hsql__scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer( buf, n , yyscanner); + b = hsql__scan_buffer(buf,n ,yyscanner); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in hsql__scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -3639,11 +3405,9 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - fprintf( stderr, "%s\n", msg ); + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -3669,7 +3433,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) /** Get the user-defined data for this scanner. * @param yyscanner The scanner object. */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) +YY_EXTRA_TYPE hsql_get_extra (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyextra; @@ -3678,10 +3442,10 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) /** Get the current line number. * @param yyscanner The scanner object. */ -int yyget_lineno (yyscan_t yyscanner) +int hsql_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -3691,10 +3455,10 @@ int yyget_lineno (yyscan_t yyscanner) /** Get the current column number. * @param yyscanner The scanner object. */ -int yyget_column (yyscan_t yyscanner) +int hsql_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -3704,7 +3468,7 @@ int yyget_column (yyscan_t yyscanner) /** Get the input stream. * @param yyscanner The scanner object. */ -FILE *yyget_in (yyscan_t yyscanner) +FILE *hsql_get_in (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyin; @@ -3713,7 +3477,7 @@ FILE *yyget_in (yyscan_t yyscanner) /** Get the output stream. * @param yyscanner The scanner object. */ -FILE *yyget_out (yyscan_t yyscanner) +FILE *hsql_get_out (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyout; @@ -3722,7 +3486,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +int hsql_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -3732,7 +3496,7 @@ int yyget_leng (yyscan_t yyscanner) * @param yyscanner The scanner object. */ -char *yyget_text (yyscan_t yyscanner) +char *hsql_get_text (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yytext; @@ -3742,93 +3506,93 @@ char *yyget_text (yyscan_t yyscanner) * @param user_defined The data to be associated with this scanner. * @param yyscanner The scanner object. */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +void hsql_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yyextra = user_defined ; } /** Set the current line number. - * @param _line_number line number + * @param line_number * @param yyscanner The scanner object. */ -void yyset_lineno (int _line_number , yyscan_t yyscanner) +void hsql_set_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); + yy_fatal_error( "hsql_set_lineno called with no buffer" , yyscanner); - yylineno = _line_number; + yylineno = line_number; } /** Set the current column. - * @param _column_no column number + * @param line_number * @param yyscanner The scanner object. */ -void yyset_column (int _column_no , yyscan_t yyscanner) +void hsql_set_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "yyset_column called with no buffer" ); + yy_fatal_error( "hsql_set_column called with no buffer" , yyscanner); - yycolumn = _column_no; + yycolumn = column_no; } /** Set the input stream. This does not discard the current * input buffer. - * @param _in_str A readable stream. + * @param in_str A readable stream. * @param yyscanner The scanner object. - * @see yy_switch_to_buffer + * @see hsql__switch_to_buffer */ -void yyset_in (FILE * _in_str , yyscan_t yyscanner) +void hsql_set_in (FILE * in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + yyin = in_str ; } -void yyset_out (FILE * _out_str , yyscan_t yyscanner) +void hsql_set_out (FILE * out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + yyout = out_str ; } -int yyget_debug (yyscan_t yyscanner) +int hsql_get_debug (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yy_flex_debug; } -void yyset_debug (int _bdebug , yyscan_t yyscanner) +void hsql_set_debug (int bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + yy_flex_debug = bdebug ; } /* Accessor methods for yylval and yylloc */ -YYSTYPE * yyget_lval (yyscan_t yyscanner) +YYSTYPE * hsql_get_lval (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yylval; } -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +void hsql_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylval = yylval_param; } -YYLTYPE *yyget_lloc (yyscan_t yyscanner) +YYLTYPE *hsql_get_lloc (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yylloc; } -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) +void hsql_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yylloc = yylloc_param; @@ -3836,18 +3600,20 @@ void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) /* User-visible API */ -/* yylex_init is special because it creates the scanner itself, so it is +/* hsql_lex_init is special because it creates the scanner itself, so it is * the ONLY reentrant function that doesn't take the scanner as the last argument. * That's why we explicitly handle the declaration, instead of using our macros. */ -int yylex_init(yyscan_t* ptr_yy_globals) + +int hsql_lex_init(yyscan_t* ptr_yy_globals) + { if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + *ptr_yy_globals = (yyscan_t) hsql_alloc ( sizeof( struct yyguts_t ), NULL ); if (*ptr_yy_globals == NULL){ errno = ENOMEM; @@ -3860,37 +3626,39 @@ int yylex_init(yyscan_t* ptr_yy_globals) return yy_init_globals ( *ptr_yy_globals ); } -/* yylex_init_extra has the same functionality as yylex_init, but follows the +/* hsql_lex_init_extra has the same functionality as hsql_lex_init, but follows the * convention of taking the scanner as the last argument. Note however, that * this is a *pointer* to a scanner, as it will be allocated by this call (and * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to yyalloc in + * The user defined value in the first argument will be available to hsql_alloc in * the yyextra field. */ -int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) + +int hsql_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) + { struct yyguts_t dummy_yyguts; - yyset_extra (yy_user_defined, &dummy_yyguts); + hsql_set_extra (yy_user_defined, &dummy_yyguts); if (ptr_yy_globals == NULL){ errno = EINVAL; return 1; } - - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + + *ptr_yy_globals = (yyscan_t) hsql_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - yyset_extra (yy_user_defined, *ptr_yy_globals); - + + hsql_set_extra (yy_user_defined, *ptr_yy_globals); + return yy_init_globals ( *ptr_yy_globals ); } @@ -3898,13 +3666,13 @@ static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. + * This function is called from hsql_lex_destroy(), so don't allocate here. */ - yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; + yyg->yy_c_buf_p = (char *) 0; yyg->yy_init = 0; yyg->yy_start = 0; @@ -3917,42 +3685,42 @@ static int yy_init_globals (yyscan_t yyscanner) yyin = stdin; yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = (FILE *) 0; + yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by - * yylex_init() + * hsql_lex_init() */ return 0; } -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) +/* hsql_lex_destroy is for both reentrant and non-reentrant scanners. */ +int hsql_lex_destroy (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ - yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); + hsql__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); + hsql_pop_buffer_state(yyscanner); } /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack , yyscanner); + hsql_free(yyg->yy_buffer_stack ,yyscanner); yyg->yy_buffer_stack = NULL; /* Destroy the start condition stack. */ - yyfree( yyg->yy_start_stack , yyscanner ); + hsql_free(yyg->yy_start_stack ,yyscanner ); yyg->yy_start_stack = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ + * hsql_lex() is called, initialization will occur. */ yy_init_globals( yyscanner); /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); + hsql_free ( yyscanner , yyscanner ); yyscanner = NULL; return 0; } @@ -3962,21 +3730,18 @@ int yylex_destroy (yyscan_t yyscanner) */ #ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; + register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen (const char * s , yyscan_t yyscanner) +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { - int n; + register int n; for ( n = 0; s[n]; ++n ) ; @@ -3984,18 +3749,13 @@ static int yy_flex_strlen (const char * s , yyscan_t yyscanner) } #endif -void *yyalloc (yy_size_t size , yyscan_t yyscanner) +void *hsql_alloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + return (void *) malloc( size ); } -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +void *hsql_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -4003,20 +3763,19 @@ void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return realloc(ptr, size); + return (void *) realloc( (char *) ptr, size ); } -void yyfree (void * ptr , yyscan_t yyscanner) +void hsql_free (void * ptr , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see hsql_realloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 217 "flex_lexer.l" + /*************************** ** Section 3: User code ***************************/ diff --git a/src/parser/flex_lexer.h b/src/parser/flex_lexer.h index f500b82..d729bfc 100644 --- a/src/parser/flex_lexer.h +++ b/src/parser/flex_lexer.h @@ -2,9 +2,9 @@ #define hsql_HEADER_H 1 #define hsql_IN_HEADER 1 -#line 5 "flex_lexer.h" +#line 6 "flex_lexer.h" -#line 7 "flex_lexer.h" +#line 8 "flex_lexer.h" #define YY_INT_ALIGNED short int @@ -12,246 +12,12 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 4 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif -#ifdef yy_create_buffer -#define hsql__create_buffer_ALREADY_DEFINED -#else -#define yy_create_buffer hsql__create_buffer -#endif - -#ifdef yy_delete_buffer -#define hsql__delete_buffer_ALREADY_DEFINED -#else -#define yy_delete_buffer hsql__delete_buffer -#endif - -#ifdef yy_scan_buffer -#define hsql__scan_buffer_ALREADY_DEFINED -#else -#define yy_scan_buffer hsql__scan_buffer -#endif - -#ifdef yy_scan_string -#define hsql__scan_string_ALREADY_DEFINED -#else -#define yy_scan_string hsql__scan_string -#endif - -#ifdef yy_scan_bytes -#define hsql__scan_bytes_ALREADY_DEFINED -#else -#define yy_scan_bytes hsql__scan_bytes -#endif - -#ifdef yy_init_buffer -#define hsql__init_buffer_ALREADY_DEFINED -#else -#define yy_init_buffer hsql__init_buffer -#endif - -#ifdef yy_flush_buffer -#define hsql__flush_buffer_ALREADY_DEFINED -#else -#define yy_flush_buffer hsql__flush_buffer -#endif - -#ifdef yy_load_buffer_state -#define hsql__load_buffer_state_ALREADY_DEFINED -#else -#define yy_load_buffer_state hsql__load_buffer_state -#endif - -#ifdef yy_switch_to_buffer -#define hsql__switch_to_buffer_ALREADY_DEFINED -#else -#define yy_switch_to_buffer hsql__switch_to_buffer -#endif - -#ifdef yypush_buffer_state -#define hsql_push_buffer_state_ALREADY_DEFINED -#else -#define yypush_buffer_state hsql_push_buffer_state -#endif - -#ifdef yypop_buffer_state -#define hsql_pop_buffer_state_ALREADY_DEFINED -#else -#define yypop_buffer_state hsql_pop_buffer_state -#endif - -#ifdef yyensure_buffer_stack -#define hsql_ensure_buffer_stack_ALREADY_DEFINED -#else -#define yyensure_buffer_stack hsql_ensure_buffer_stack -#endif - -#ifdef yylex -#define hsql_lex_ALREADY_DEFINED -#else -#define yylex hsql_lex -#endif - -#ifdef yyrestart -#define hsql_restart_ALREADY_DEFINED -#else -#define yyrestart hsql_restart -#endif - -#ifdef yylex_init -#define hsql_lex_init_ALREADY_DEFINED -#else -#define yylex_init hsql_lex_init -#endif - -#ifdef yylex_init_extra -#define hsql_lex_init_extra_ALREADY_DEFINED -#else -#define yylex_init_extra hsql_lex_init_extra -#endif - -#ifdef yylex_destroy -#define hsql_lex_destroy_ALREADY_DEFINED -#else -#define yylex_destroy hsql_lex_destroy -#endif - -#ifdef yyget_debug -#define hsql_get_debug_ALREADY_DEFINED -#else -#define yyget_debug hsql_get_debug -#endif - -#ifdef yyset_debug -#define hsql_set_debug_ALREADY_DEFINED -#else -#define yyset_debug hsql_set_debug -#endif - -#ifdef yyget_extra -#define hsql_get_extra_ALREADY_DEFINED -#else -#define yyget_extra hsql_get_extra -#endif - -#ifdef yyset_extra -#define hsql_set_extra_ALREADY_DEFINED -#else -#define yyset_extra hsql_set_extra -#endif - -#ifdef yyget_in -#define hsql_get_in_ALREADY_DEFINED -#else -#define yyget_in hsql_get_in -#endif - -#ifdef yyset_in -#define hsql_set_in_ALREADY_DEFINED -#else -#define yyset_in hsql_set_in -#endif - -#ifdef yyget_out -#define hsql_get_out_ALREADY_DEFINED -#else -#define yyget_out hsql_get_out -#endif - -#ifdef yyset_out -#define hsql_set_out_ALREADY_DEFINED -#else -#define yyset_out hsql_set_out -#endif - -#ifdef yyget_leng -#define hsql_get_leng_ALREADY_DEFINED -#else -#define yyget_leng hsql_get_leng -#endif - -#ifdef yyget_text -#define hsql_get_text_ALREADY_DEFINED -#else -#define yyget_text hsql_get_text -#endif - -#ifdef yyget_lineno -#define hsql_get_lineno_ALREADY_DEFINED -#else -#define yyget_lineno hsql_get_lineno -#endif - -#ifdef yyset_lineno -#define hsql_set_lineno_ALREADY_DEFINED -#else -#define yyset_lineno hsql_set_lineno -#endif - -#ifdef yyget_column -#define hsql_get_column_ALREADY_DEFINED -#else -#define yyget_column hsql_get_column -#endif - -#ifdef yyset_column -#define hsql_set_column_ALREADY_DEFINED -#else -#define yyset_column hsql_set_column -#endif - -#ifdef yywrap -#define hsql_wrap_ALREADY_DEFINED -#else -#define yywrap hsql_wrap -#endif - -#ifdef yyget_lval -#define hsql_get_lval_ALREADY_DEFINED -#else -#define yyget_lval hsql_get_lval -#endif - -#ifdef yyset_lval -#define hsql_set_lval_ALREADY_DEFINED -#else -#define yyset_lval hsql_set_lval -#endif - -#ifdef yyget_lloc -#define hsql_get_lloc_ALREADY_DEFINED -#else -#define yyget_lloc hsql_get_lloc -#endif - -#ifdef yyset_lloc -#define hsql_set_lloc_ALREADY_DEFINED -#else -#define yyset_lloc hsql_set_lloc -#endif - -#ifdef yyalloc -#define hsql_alloc_ALREADY_DEFINED -#else -#define yyalloc hsql_alloc -#endif - -#ifdef yyrealloc -#define hsql_realloc_ALREADY_DEFINED -#else -#define yyrealloc hsql_realloc -#endif - -#ifdef yyfree -#define hsql_free_ALREADY_DEFINED -#else -#define yyfree hsql_free -#endif - /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ @@ -322,23 +88,29 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#ifndef SIZE_MAX -#define SIZE_MAX (~(size_t)0) -#endif - #endif /* ! C99 */ #endif /* ! FLEXINT_H */ -/* begin standard C++ headers. */ +#ifdef __cplusplus -/* TODO: this is always defined, so inline it */ +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST #define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) #else -#define yynoreturn +#define yyconst #endif /* An opaque pointer. */ @@ -393,7 +165,7 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - int yy_buf_size; + yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -421,7 +193,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -432,25 +204,25 @@ struct yy_buffer_state }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -void yyrestart ( FILE *input_file , yyscan_t yyscanner ); -void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); -void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); -void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); -void yypop_buffer_state ( yyscan_t yyscanner ); +void hsql_restart (FILE *input_file ,yyscan_t yyscanner ); +void hsql__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void hsql__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void hsql__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void hsql_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void hsql_pop_buffer_state (yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); -void *yyalloc ( yy_size_t , yyscan_t yyscanner ); -void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); -void yyfree ( void * , yyscan_t yyscanner ); +void *hsql_alloc (yy_size_t ,yyscan_t yyscanner ); +void *hsql_realloc (void *,yy_size_t ,yyscan_t yyscanner ); +void hsql_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) +#define hsql_wrap(n) 1 #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -473,50 +245,46 @@ void yyfree ( void * , yyscan_t yyscanner ); #define YY_EXTRA_TYPE void * #endif -int yylex_init (yyscan_t* scanner); +int hsql_lex_init (yyscan_t* scanner); -int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); +int hsql_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ -int yylex_destroy ( yyscan_t yyscanner ); +int hsql_lex_destroy (yyscan_t yyscanner ); -int yyget_debug ( yyscan_t yyscanner ); +int hsql_get_debug (yyscan_t yyscanner ); -void yyset_debug ( int debug_flag , yyscan_t yyscanner ); +void hsql_set_debug (int debug_flag ,yyscan_t yyscanner ); -YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); +YY_EXTRA_TYPE hsql_get_extra (yyscan_t yyscanner ); -void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); +void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); -FILE *yyget_in ( yyscan_t yyscanner ); +FILE *hsql_get_in (yyscan_t yyscanner ); -void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); +void hsql_set_in (FILE * in_str ,yyscan_t yyscanner ); -FILE *yyget_out ( yyscan_t yyscanner ); +FILE *hsql_get_out (yyscan_t yyscanner ); -void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); +void hsql_set_out (FILE * out_str ,yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); +int hsql_get_leng (yyscan_t yyscanner ); -char *yyget_text ( yyscan_t yyscanner ); +char *hsql_get_text (yyscan_t yyscanner ); -int yyget_lineno ( yyscan_t yyscanner ); +int hsql_get_lineno (yyscan_t yyscanner ); -void yyset_lineno ( int _line_number , yyscan_t yyscanner ); +void hsql_set_lineno (int line_number ,yyscan_t yyscanner ); -int yyget_column ( yyscan_t yyscanner ); +YYSTYPE * hsql_get_lval (yyscan_t yyscanner ); -void yyset_column ( int _column_no , yyscan_t yyscanner ); +void hsql_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); -YYSTYPE * yyget_lval ( yyscan_t yyscanner ); - -void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); - - YYLTYPE *yyget_lloc ( yyscan_t yyscanner ); + YYLTYPE *hsql_get_lloc (yyscan_t yyscanner ); - void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner ); + void hsql_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -524,18 +292,18 @@ void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap ( yyscan_t yyscanner ); +extern "C" int hsql_wrap (yyscan_t yyscanner ); #else -extern int yywrap ( yyscan_t yyscanner ); +extern int hsql_wrap (yyscan_t yyscanner ); #endif #endif #ifndef yytext_ptr -static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen ( const char * , yyscan_t yyscanner); +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); #endif #ifndef YY_NO_INPUT @@ -563,10 +331,10 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner); #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -extern int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner); +extern int hsql_lex \ + (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); -#define YY_DECL int yylex \ +#define YY_DECL int hsql_lex \ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) #endif /* !YY_DECL */ @@ -584,154 +352,9 @@ extern int yylex \ #undef YY_DECL #endif -#ifndef hsql__create_buffer_ALREADY_DEFINED -#undef yy_create_buffer -#endif -#ifndef hsql__delete_buffer_ALREADY_DEFINED -#undef yy_delete_buffer -#endif -#ifndef hsql__scan_buffer_ALREADY_DEFINED -#undef yy_scan_buffer -#endif -#ifndef hsql__scan_string_ALREADY_DEFINED -#undef yy_scan_string -#endif -#ifndef hsql__scan_bytes_ALREADY_DEFINED -#undef yy_scan_bytes -#endif -#ifndef hsql__init_buffer_ALREADY_DEFINED -#undef yy_init_buffer -#endif -#ifndef hsql__flush_buffer_ALREADY_DEFINED -#undef yy_flush_buffer -#endif -#ifndef hsql__load_buffer_state_ALREADY_DEFINED -#undef yy_load_buffer_state -#endif -#ifndef hsql__switch_to_buffer_ALREADY_DEFINED -#undef yy_switch_to_buffer -#endif -#ifndef hsql_push_buffer_state_ALREADY_DEFINED -#undef yypush_buffer_state -#endif -#ifndef hsql_pop_buffer_state_ALREADY_DEFINED -#undef yypop_buffer_state -#endif -#ifndef hsql_ensure_buffer_stack_ALREADY_DEFINED -#undef yyensure_buffer_stack -#endif -#ifndef hsql_lex_ALREADY_DEFINED -#undef yylex -#endif -#ifndef hsql_restart_ALREADY_DEFINED -#undef yyrestart -#endif -#ifndef hsql_lex_init_ALREADY_DEFINED -#undef yylex_init -#endif -#ifndef hsql_lex_init_extra_ALREADY_DEFINED -#undef yylex_init_extra -#endif -#ifndef hsql_lex_destroy_ALREADY_DEFINED -#undef yylex_destroy -#endif -#ifndef hsql_get_debug_ALREADY_DEFINED -#undef yyget_debug -#endif -#ifndef hsql_set_debug_ALREADY_DEFINED -#undef yyset_debug -#endif -#ifndef hsql_get_extra_ALREADY_DEFINED -#undef yyget_extra -#endif -#ifndef hsql_set_extra_ALREADY_DEFINED -#undef yyset_extra -#endif -#ifndef hsql_get_in_ALREADY_DEFINED -#undef yyget_in -#endif -#ifndef hsql_set_in_ALREADY_DEFINED -#undef yyset_in -#endif -#ifndef hsql_get_out_ALREADY_DEFINED -#undef yyget_out -#endif -#ifndef hsql_set_out_ALREADY_DEFINED -#undef yyset_out -#endif -#ifndef hsql_get_leng_ALREADY_DEFINED -#undef yyget_leng -#endif -#ifndef hsql_get_text_ALREADY_DEFINED -#undef yyget_text -#endif -#ifndef hsql_get_lineno_ALREADY_DEFINED -#undef yyget_lineno -#endif -#ifndef hsql_set_lineno_ALREADY_DEFINED -#undef yyset_lineno -#endif -#ifndef hsql_get_column_ALREADY_DEFINED -#undef yyget_column -#endif -#ifndef hsql_set_column_ALREADY_DEFINED -#undef yyset_column -#endif -#ifndef hsql_wrap_ALREADY_DEFINED -#undef yywrap -#endif -#ifndef hsql_get_lval_ALREADY_DEFINED -#undef yyget_lval -#endif -#ifndef hsql_set_lval_ALREADY_DEFINED -#undef yyset_lval -#endif -#ifndef hsql_get_lloc_ALREADY_DEFINED -#undef yyget_lloc -#endif -#ifndef hsql_set_lloc_ALREADY_DEFINED -#undef yyset_lloc -#endif -#ifndef hsql_alloc_ALREADY_DEFINED -#undef yyalloc -#endif -#ifndef hsql_realloc_ALREADY_DEFINED -#undef yyrealloc -#endif -#ifndef hsql_free_ALREADY_DEFINED -#undef yyfree -#endif -#ifndef hsql_text_ALREADY_DEFINED -#undef yytext -#endif -#ifndef hsql_leng_ALREADY_DEFINED -#undef yyleng -#endif -#ifndef hsql_in_ALREADY_DEFINED -#undef yyin -#endif -#ifndef hsql_out_ALREADY_DEFINED -#undef yyout -#endif -#ifndef hsql__flex_debug_ALREADY_DEFINED -#undef yy_flex_debug -#endif -#ifndef hsql_lineno_ALREADY_DEFINED -#undef yylineno -#endif -#ifndef hsql_tables_fload_ALREADY_DEFINED -#undef yytables_fload -#endif -#ifndef hsql_tables_destroy_ALREADY_DEFINED -#undef yytables_destroy -#endif -#ifndef hsql_TABLES_NAME_ALREADY_DEFINED -#undef yyTABLES_NAME -#endif - #line 217 "flex_lexer.l" -#line 735 "flex_lexer.h" +#line 359 "flex_lexer.h" #undef hsql_IN_HEADER #endif /* hsql_HEADER_H */ diff --git a/src/sql/SQLStatement.h b/src/sql/SQLStatement.h index 07996fc..db7cbf1 100644 --- a/src/sql/SQLStatement.h +++ b/src/sql/SQLStatement.h @@ -19,7 +19,8 @@ namespace hsql { kStmtExecute, kStmtExport, kStmtRename, - kStmtAlter + kStmtAlter, + kStmtShow }; // Base struct for every SQL statement diff --git a/src/sql/ShowStatement.h b/src/sql/ShowStatement.h new file mode 100644 index 0000000..206a819 --- /dev/null +++ b/src/sql/ShowStatement.h @@ -0,0 +1,26 @@ +#ifndef __SQLPARSER__SHOW_STATEMENT_H__ +#define __SQLPARSER__SHOW_STATEMENT_H__ + +#include "SQLStatement.h" + +// Note: Implementations of constructors and destructors can be found in statements.cpp. +namespace hsql { + + enum ShowType { + kShowColumns, + kShowTables + }; + + // Represents SQL SHOW statements. + // Example "SHOW TABLES;" + struct ShowStatement : SQLStatement { + + ShowStatement(ShowType type); + virtual ~ShowStatement(); + + ShowType type; + char* name; + }; + +} // namespace hsql +#endif diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp index ab4320a..af83ae2 100644 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -121,6 +121,16 @@ namespace hsql { } } + // ShowStatament + ShowStatement::ShowStatement(ShowType type) : + SQLStatement(kStmtShow), + type(type), + name(nullptr) {} + + ShowStatement::~ShowStatement() { + free(name); + } + // SelectStatement.h // OrderDescription diff --git a/src/sql/statements.h b/src/sql/statements.h index d9e59ea..0838256 100644 --- a/src/sql/statements.h +++ b/src/sql/statements.h @@ -10,5 +10,6 @@ #include "DropStatement.h" #include "PrepareStatement.h" #include "ExecuteStatement.h" +#include "ShowStatement.h" -#endif // __SQLPARSER__STATEMENTS_H__ \ No newline at end of file +#endif // __SQLPARSER__STATEMENTS_H__ diff --git a/test/queries/queries-bad.sql b/test/queries/queries-bad.sql index f67c7c8..5437c4f 100644 --- a/test/queries/queries-bad.sql +++ b/test/queries/queries-bad.sql @@ -8,4 +8,5 @@ !CREATE TABLE "table" FROM TBL FILE 'students.tbl';SELECT 1 !CREATE TABLE "table" FROM TBL FILE 'students.tbl';1 !INSERT INTO test_table VALUESd (1, 2, 'test'); -!SELECT * FROM t WHERE a = ? AND b = ?;SELECT 1; \ No newline at end of file +!SELECT * FROM t WHERE a = ? AND b = ?;SELECT 1; +!SHOW COLUMNS; diff --git a/test/queries/queries-good.sql b/test/queries/queries-good.sql index 294aa63..ec0d431 100644 --- a/test/queries/queries-good.sql +++ b/test/queries/queries-good.sql @@ -48,4 +48,6 @@ DEALLOCATE PREPARE prep; # HINTS SELECT * FROM test WITH HINT(NO_CACHE); SELECT * FROM test WITH HINT(NO_CACHE, NO_SAMPLING); -SELECT * FROM test WITH HINT(NO_CACHE, SAMPLE_RATE(0.1), OMW(1.0, 'test')); \ No newline at end of file +SELECT * FROM test WITH HINT(NO_CACHE, SAMPLE_RATE(0.1), OMW(1.0, 'test')); +SHOW TABLES; +SHOW COLUMNS students; diff --git a/test/sql_tests.cpp b/test/sql_tests.cpp index 5e63973..9c9cc82 100644 --- a/test/sql_tests.cpp +++ b/test/sql_tests.cpp @@ -127,6 +127,31 @@ TEST(ReleaseStatementTest) { } } +TEST(ShowTableStatementTest) { + TEST_PARSE_SINGLE_SQL( + "SHOW TABLES;", + kStmtShow, + ShowStatement, + result, + stmt); + + ASSERT_EQ(stmt->type, kShowTables); + ASSERT_NULL(stmt->name); +} + +TEST(ShowColumnsStatementTest) { + TEST_PARSE_SINGLE_SQL( + "SHOW COLUMNS students;", + kStmtShow, + ShowStatement, + result, + stmt); + + ASSERT_EQ(stmt->type, kShowColumns); + ASSERT_NOTNULL(stmt->name); + ASSERT_STREQ(stmt->name, "students"); +} + SQLParserResult parse_and_move(std::string query) { hsql::SQLParserResult result; From 2316e07d522e0479bab5cd1398d2c1c76b0fd0f0 Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Tue, 5 Sep 2017 10:24:13 +0000 Subject: [PATCH 03/19] Do not allow deprecated features for flex --- Makefile | 2 +- src/parser/bison_parser.cpp | 496 ++++++++++++++++++------------------ src/parser/bison_parser.h | 8 +- src/parser/flex_lexer.cpp | 242 ++++++++++-------- src/parser/flex_lexer.h | 46 ++-- 5 files changed, 403 insertions(+), 391 deletions(-) diff --git a/Makefile b/Makefile index bef6562..6083533 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ $(LIB_BUILD): $(LIB_OBJ) $(CXX) $(LIB_LFLAGS) -o $(LIB_BUILD) $(LIB_OBJ) $(SRCPARSER)/flex_lexer.o: $(SRCPARSER)/flex_lexer.cpp $(SRCPARSER)/bison_parser.cpp - $(CXX) $(LIB_CFLAGS) -c -o $@ $< -Wno-sign-compare -Wno-unneeded-internal-declaration -Wno-deprecated-register + $(CXX) $(LIB_CFLAGS) -c -o $@ $< -Wno-sign-compare -Wno-unneeded-internal-declaration %.o: %.cpp $(PARSER_CPP) $(LIB_H) $(CXX) $(LIB_CFLAGS) -c -o $@ $< diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 4c1a629..70f0566 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.2" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -303,7 +303,7 @@ extern int hsql_debug; /* Value type. */ #if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED -typedef union HSQL_STYPE HSQL_STYPE; + union HSQL_STYPE { #line 93 "bison_parser.y" /* yacc.c:355 */ @@ -346,6 +346,8 @@ union HSQL_STYPE #line 348 "bison_parser.cpp" /* yacc.c:355 */ }; + +typedef union HSQL_STYPE HSQL_STYPE; # define HSQL_STYPE_IS_TRIVIAL 1 # define HSQL_STYPE_IS_DECLARED 1 #endif @@ -372,7 +374,7 @@ int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); /* Copy the second part of user declarations. */ -#line 376 "bison_parser.cpp" /* yacc.c:358 */ +#line 378 "bison_parser.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -1613,25 +1615,25 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio case 3: /* IDENTIFIER */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1617 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1619 "bison_parser.cpp" /* yacc.c:1257 */ break; case 4: /* STRING */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1623 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1625 "bison_parser.cpp" /* yacc.c:1257 */ break; case 5: /* FLOATVAL */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1629 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1631 "bison_parser.cpp" /* yacc.c:1257 */ break; case 6: /* INTVAL */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1635 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1637 "bison_parser.cpp" /* yacc.c:1257 */ break; case 153: /* statement_list */ @@ -1644,19 +1646,19 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).stmt_vec)); } -#line 1648 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1650 "bison_parser.cpp" /* yacc.c:1257 */ break; case 154: /* statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1654 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1656 "bison_parser.cpp" /* yacc.c:1257 */ break; case 155: /* preparable_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1660 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1662 "bison_parser.cpp" /* yacc.c:1257 */ break; case 156: /* opt_hints */ @@ -1669,7 +1671,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1673 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1675 "bison_parser.cpp" /* yacc.c:1257 */ break; case 157: /* hint_list */ @@ -1682,67 +1684,67 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1686 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1688 "bison_parser.cpp" /* yacc.c:1257 */ break; case 158: /* hint */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1692 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1694 "bison_parser.cpp" /* yacc.c:1257 */ break; case 159: /* prepare_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).prep_stmt)); } -#line 1698 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1700 "bison_parser.cpp" /* yacc.c:1257 */ break; case 160: /* prepare_target_query */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1704 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1706 "bison_parser.cpp" /* yacc.c:1257 */ break; case 161: /* execute_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).exec_stmt)); } -#line 1710 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1712 "bison_parser.cpp" /* yacc.c:1257 */ break; case 162: /* import_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).import_stmt)); } -#line 1716 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1718 "bison_parser.cpp" /* yacc.c:1257 */ break; case 163: /* import_file_type */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1722 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1724 "bison_parser.cpp" /* yacc.c:1257 */ break; case 164: /* file_path */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1728 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1730 "bison_parser.cpp" /* yacc.c:1257 */ break; case 165: /* show_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).show_stmt)); } -#line 1734 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1736 "bison_parser.cpp" /* yacc.c:1257 */ break; case 166: /* create_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).create_stmt)); } -#line 1740 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1742 "bison_parser.cpp" /* yacc.c:1257 */ break; case 167: /* opt_not_exists */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1746 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1748 "bison_parser.cpp" /* yacc.c:1257 */ break; case 168: /* column_def_commalist */ @@ -1755,43 +1757,43 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).column_vec)); } -#line 1759 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1761 "bison_parser.cpp" /* yacc.c:1257 */ break; case 169: /* column_def */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).column_t)); } -#line 1765 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1767 "bison_parser.cpp" /* yacc.c:1257 */ break; case 170: /* column_type */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1771 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1773 "bison_parser.cpp" /* yacc.c:1257 */ break; case 171: /* drop_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).drop_stmt)); } -#line 1777 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1779 "bison_parser.cpp" /* yacc.c:1257 */ break; case 172: /* delete_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1783 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1785 "bison_parser.cpp" /* yacc.c:1257 */ break; case 173: /* truncate_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1789 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1791 "bison_parser.cpp" /* yacc.c:1257 */ break; case 174: /* insert_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).insert_stmt)); } -#line 1795 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1797 "bison_parser.cpp" /* yacc.c:1257 */ break; case 175: /* opt_column_list */ @@ -1804,13 +1806,13 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 1808 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1810 "bison_parser.cpp" /* yacc.c:1257 */ break; case 176: /* update_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_stmt)); } -#line 1814 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1816 "bison_parser.cpp" /* yacc.c:1257 */ break; case 177: /* update_clause_commalist */ @@ -1823,49 +1825,49 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).update_vec)); } -#line 1827 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1829 "bison_parser.cpp" /* yacc.c:1257 */ break; case 178: /* update_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_t)); } -#line 1833 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1835 "bison_parser.cpp" /* yacc.c:1257 */ break; case 179: /* select_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1839 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1841 "bison_parser.cpp" /* yacc.c:1257 */ break; case 180: /* select_with_paren */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1845 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1847 "bison_parser.cpp" /* yacc.c:1257 */ break; case 181: /* select_paren_or_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1851 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1853 "bison_parser.cpp" /* yacc.c:1257 */ break; case 182: /* select_no_paren */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1857 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1859 "bison_parser.cpp" /* yacc.c:1257 */ break; case 186: /* select_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1863 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1865 "bison_parser.cpp" /* yacc.c:1257 */ break; case 187: /* opt_distinct */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1869 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1871 "bison_parser.cpp" /* yacc.c:1257 */ break; case 188: /* select_list */ @@ -1878,31 +1880,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1882 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1884 "bison_parser.cpp" /* yacc.c:1257 */ break; case 189: /* from_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 1888 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1890 "bison_parser.cpp" /* yacc.c:1257 */ break; case 190: /* opt_where */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1894 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1896 "bison_parser.cpp" /* yacc.c:1257 */ break; case 191: /* opt_group */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).group_t)); } -#line 1900 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1902 "bison_parser.cpp" /* yacc.c:1257 */ break; case 192: /* opt_having */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1906 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1908 "bison_parser.cpp" /* yacc.c:1257 */ break; case 193: /* opt_order */ @@ -1915,7 +1917,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1919 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1921 "bison_parser.cpp" /* yacc.c:1257 */ break; case 194: /* order_list */ @@ -1928,31 +1930,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1932 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1934 "bison_parser.cpp" /* yacc.c:1257 */ break; case 195: /* order_desc */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).order)); } -#line 1938 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1940 "bison_parser.cpp" /* yacc.c:1257 */ break; case 196: /* opt_order_type */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1944 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1946 "bison_parser.cpp" /* yacc.c:1257 */ break; case 197: /* opt_top */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1950 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1952 "bison_parser.cpp" /* yacc.c:1257 */ break; case 198: /* opt_limit */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1956 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1958 "bison_parser.cpp" /* yacc.c:1257 */ break; case 199: /* expr_list */ @@ -1965,7 +1967,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1969 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1971 "bison_parser.cpp" /* yacc.c:1257 */ break; case 200: /* literal_list */ @@ -1978,157 +1980,157 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1982 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1984 "bison_parser.cpp" /* yacc.c:1257 */ break; case 201: /* expr_alias */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1988 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1990 "bison_parser.cpp" /* yacc.c:1257 */ break; case 202: /* expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1994 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1996 "bison_parser.cpp" /* yacc.c:1257 */ break; case 203: /* operand */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2000 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2002 "bison_parser.cpp" /* yacc.c:1257 */ break; case 204: /* scalar_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2006 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2008 "bison_parser.cpp" /* yacc.c:1257 */ break; case 205: /* unary_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2012 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2014 "bison_parser.cpp" /* yacc.c:1257 */ break; case 206: /* binary_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2018 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2020 "bison_parser.cpp" /* yacc.c:1257 */ break; case 207: /* logic_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2024 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2026 "bison_parser.cpp" /* yacc.c:1257 */ break; case 208: /* in_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2030 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2032 "bison_parser.cpp" /* yacc.c:1257 */ break; case 209: /* case_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2036 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2038 "bison_parser.cpp" /* yacc.c:1257 */ break; case 210: /* exists_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2042 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2044 "bison_parser.cpp" /* yacc.c:1257 */ break; case 211: /* comp_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2048 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2050 "bison_parser.cpp" /* yacc.c:1257 */ break; case 212: /* function_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2054 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2056 "bison_parser.cpp" /* yacc.c:1257 */ break; case 213: /* array_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2060 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2062 "bison_parser.cpp" /* yacc.c:1257 */ break; case 214: /* array_index */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2066 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2068 "bison_parser.cpp" /* yacc.c:1257 */ break; case 215: /* between_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2072 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2074 "bison_parser.cpp" /* yacc.c:1257 */ break; case 216: /* column_name */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2078 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2080 "bison_parser.cpp" /* yacc.c:1257 */ break; case 217: /* literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2084 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2086 "bison_parser.cpp" /* yacc.c:1257 */ break; case 218: /* string_literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2090 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2092 "bison_parser.cpp" /* yacc.c:1257 */ break; case 219: /* num_literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2096 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2098 "bison_parser.cpp" /* yacc.c:1257 */ break; case 220: /* int_literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2102 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2104 "bison_parser.cpp" /* yacc.c:1257 */ break; case 221: /* null_literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2108 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2110 "bison_parser.cpp" /* yacc.c:1257 */ break; case 222: /* param_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2114 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2116 "bison_parser.cpp" /* yacc.c:1257 */ break; case 223: /* table_ref */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2120 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2122 "bison_parser.cpp" /* yacc.c:1257 */ break; case 224: /* table_ref_atomic */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2126 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2128 "bison_parser.cpp" /* yacc.c:1257 */ break; case 225: /* nonjoin_table_ref_atomic */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2132 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2134 "bison_parser.cpp" /* yacc.c:1257 */ break; case 226: /* table_ref_commalist */ @@ -2141,55 +2143,55 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).table_vec)); } -#line 2145 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2147 "bison_parser.cpp" /* yacc.c:1257 */ break; case 227: /* table_ref_name */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2151 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2153 "bison_parser.cpp" /* yacc.c:1257 */ break; case 228: /* table_ref_name_no_alias */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2157 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2159 "bison_parser.cpp" /* yacc.c:1257 */ break; case 229: /* table_name */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 2163 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2165 "bison_parser.cpp" /* yacc.c:1257 */ break; case 230: /* alias */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 2169 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2171 "bison_parser.cpp" /* yacc.c:1257 */ break; case 231: /* opt_alias */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 2175 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2177 "bison_parser.cpp" /* yacc.c:1257 */ break; case 232: /* join_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2181 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2183 "bison_parser.cpp" /* yacc.c:1257 */ break; case 233: /* opt_join_type */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 2187 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2189 "bison_parser.cpp" /* yacc.c:1257 */ break; case 234: /* join_condition */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2193 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2195 "bison_parser.cpp" /* yacc.c:1257 */ break; case 236: /* ident_commalist */ @@ -2202,7 +2204,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2206 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2208 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -2320,7 +2322,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.total_column = 0; } -#line 2324 "bison_parser.cpp" /* yacc.c:1429 */ +#line 2326 "bison_parser.cpp" /* yacc.c:1429 */ yylsp[0] = yylloc; goto yysetstate; @@ -2525,19 +2527,19 @@ yyreduce: } delete (yyvsp[-1].stmt_vec); } -#line 2529 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2531 "bison_parser.cpp" /* yacc.c:1646 */ break; case 3: #line 263 "bison_parser.y" /* yacc.c:1646 */ { (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 2535 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2537 "bison_parser.cpp" /* yacc.c:1646 */ break; case 4: #line 264 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 2541 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2543 "bison_parser.cpp" /* yacc.c:1646 */ break; case 5: @@ -2546,7 +2548,7 @@ yyreduce: (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2550 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2552 "bison_parser.cpp" /* yacc.c:1646 */ break; case 6: @@ -2555,7 +2557,7 @@ yyreduce: (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2559 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2561 "bison_parser.cpp" /* yacc.c:1646 */ break; case 7: @@ -2563,85 +2565,85 @@ yyreduce: { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 2567 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2569 "bison_parser.cpp" /* yacc.c:1646 */ break; case 8: #line 283 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 2573 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2575 "bison_parser.cpp" /* yacc.c:1646 */ break; case 9: #line 284 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 2579 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2581 "bison_parser.cpp" /* yacc.c:1646 */ break; case 10: #line 285 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 2585 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2587 "bison_parser.cpp" /* yacc.c:1646 */ break; case 11: #line 286 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 2591 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2593 "bison_parser.cpp" /* yacc.c:1646 */ break; case 12: #line 287 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2597 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2599 "bison_parser.cpp" /* yacc.c:1646 */ break; case 13: #line 288 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2603 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2605 "bison_parser.cpp" /* yacc.c:1646 */ break; case 14: #line 289 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 2609 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2611 "bison_parser.cpp" /* yacc.c:1646 */ break; case 15: #line 290 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 2615 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2617 "bison_parser.cpp" /* yacc.c:1646 */ break; case 16: #line 291 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 2621 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2623 "bison_parser.cpp" /* yacc.c:1646 */ break; case 17: #line 300 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 2627 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2629 "bison_parser.cpp" /* yacc.c:1646 */ break; case 18: #line 301 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = nullptr; } -#line 2633 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2635 "bison_parser.cpp" /* yacc.c:1646 */ break; case 19: #line 306 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 2639 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2641 "bison_parser.cpp" /* yacc.c:1646 */ break; case 20: #line 307 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 2645 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2647 "bison_parser.cpp" /* yacc.c:1646 */ break; case 21: @@ -2650,7 +2652,7 @@ yyreduce: (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 2654 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2656 "bison_parser.cpp" /* yacc.c:1646 */ break; case 22: @@ -2660,7 +2662,7 @@ yyreduce: (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 2664 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2666 "bison_parser.cpp" /* yacc.c:1646 */ break; case 23: @@ -2670,7 +2672,7 @@ yyreduce: (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 2674 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2676 "bison_parser.cpp" /* yacc.c:1646 */ break; case 25: @@ -2679,7 +2681,7 @@ yyreduce: (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 2683 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2685 "bison_parser.cpp" /* yacc.c:1646 */ break; case 26: @@ -2689,7 +2691,7 @@ yyreduce: (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 2693 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2695 "bison_parser.cpp" /* yacc.c:1646 */ break; case 27: @@ -2699,19 +2701,19 @@ yyreduce: (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->tableName = (yyvsp[0].sval); } -#line 2703 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2705 "bison_parser.cpp" /* yacc.c:1646 */ break; case 28: #line 361 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kImportCSV; } -#line 2709 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2711 "bison_parser.cpp" /* yacc.c:1646 */ break; case 29: #line 365 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 2715 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2717 "bison_parser.cpp" /* yacc.c:1646 */ break; case 30: @@ -2719,7 +2721,7 @@ yyreduce: { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 2723 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2725 "bison_parser.cpp" /* yacc.c:1646 */ break; case 31: @@ -2728,7 +2730,7 @@ yyreduce: (yyval.show_stmt) = new ShowStatement(kShowColumns); (yyval.show_stmt)->name = (yyvsp[0].sval); } -#line 2732 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2734 "bison_parser.cpp" /* yacc.c:1646 */ break; case 32: @@ -2739,7 +2741,7 @@ yyreduce: (yyval.create_stmt)->tableName = (yyvsp[-4].sval); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 2743 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2745 "bison_parser.cpp" /* yacc.c:1646 */ break; case 33: @@ -2750,7 +2752,7 @@ yyreduce: (yyval.create_stmt)->tableName = (yyvsp[-3].sval); (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 2754 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2756 "bison_parser.cpp" /* yacc.c:1646 */ break; case 34: @@ -2762,31 +2764,31 @@ yyreduce: (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 2766 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2768 "bison_parser.cpp" /* yacc.c:1646 */ break; case 35: #line 413 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 2772 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2774 "bison_parser.cpp" /* yacc.c:1646 */ break; case 36: #line 414 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } -#line 2778 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2780 "bison_parser.cpp" /* yacc.c:1646 */ break; case 37: #line 418 "bison_parser.y" /* yacc.c:1646 */ { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 2784 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2786 "bison_parser.cpp" /* yacc.c:1646 */ break; case 38: #line 419 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 2790 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2792 "bison_parser.cpp" /* yacc.c:1646 */ break; case 39: @@ -2794,31 +2796,31 @@ yyreduce: { (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); } -#line 2798 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2800 "bison_parser.cpp" /* yacc.c:1646 */ break; case 40: #line 430 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2804 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2806 "bison_parser.cpp" /* yacc.c:1646 */ break; case 41: #line 431 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2810 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2812 "bison_parser.cpp" /* yacc.c:1646 */ break; case 42: #line 432 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::DOUBLE; } -#line 2816 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2818 "bison_parser.cpp" /* yacc.c:1646 */ break; case 43: #line 433 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::TEXT; } -#line 2822 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2824 "bison_parser.cpp" /* yacc.c:1646 */ break; case 44: @@ -2827,7 +2829,7 @@ yyreduce: (yyval.drop_stmt) = new DropStatement(kDropTable); (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2831 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2833 "bison_parser.cpp" /* yacc.c:1646 */ break; case 45: @@ -2836,7 +2838,7 @@ yyreduce: (yyval.drop_stmt) = new DropStatement(kDropView); (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2840 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2842 "bison_parser.cpp" /* yacc.c:1646 */ break; case 46: @@ -2845,7 +2847,7 @@ yyreduce: (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2849 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2851 "bison_parser.cpp" /* yacc.c:1646 */ break; case 47: @@ -2855,7 +2857,7 @@ yyreduce: (yyval.delete_stmt)->tableName = (yyvsp[-1].sval); (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 2859 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2861 "bison_parser.cpp" /* yacc.c:1646 */ break; case 48: @@ -2864,7 +2866,7 @@ yyreduce: (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->tableName = (yyvsp[0].sval); } -#line 2868 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2870 "bison_parser.cpp" /* yacc.c:1646 */ break; case 49: @@ -2875,7 +2877,7 @@ yyreduce: (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 2879 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2881 "bison_parser.cpp" /* yacc.c:1646 */ break; case 50: @@ -2886,19 +2888,19 @@ yyreduce: (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 2890 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2892 "bison_parser.cpp" /* yacc.c:1646 */ break; case 51: #line 499 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 2896 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2898 "bison_parser.cpp" /* yacc.c:1646 */ break; case 52: #line 500 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = nullptr; } -#line 2902 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2904 "bison_parser.cpp" /* yacc.c:1646 */ break; case 53: @@ -2909,19 +2911,19 @@ yyreduce: (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 2913 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2915 "bison_parser.cpp" /* yacc.c:1646 */ break; case 54: #line 519 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 2919 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2921 "bison_parser.cpp" /* yacc.c:1646 */ break; case 55: #line 520 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 2925 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2927 "bison_parser.cpp" /* yacc.c:1646 */ break; case 56: @@ -2931,7 +2933,7 @@ yyreduce: (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 2935 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2937 "bison_parser.cpp" /* yacc.c:1646 */ break; case 59: @@ -2950,19 +2952,19 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2954 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2956 "bison_parser.cpp" /* yacc.c:1646 */ break; case 60: #line 555 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2960 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2962 "bison_parser.cpp" /* yacc.c:1646 */ break; case 61: #line 556 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2966 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2968 "bison_parser.cpp" /* yacc.c:1646 */ break; case 64: @@ -2977,7 +2979,7 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2981 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2983 "bison_parser.cpp" /* yacc.c:1646 */ break; case 65: @@ -2996,7 +2998,7 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3000 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3002 "bison_parser.cpp" /* yacc.c:1646 */ break; case 72: @@ -3010,37 +3012,37 @@ yyreduce: (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3014 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3016 "bison_parser.cpp" /* yacc.c:1646 */ break; case 73: #line 619 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 3020 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3022 "bison_parser.cpp" /* yacc.c:1646 */ break; case 74: #line 620 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } -#line 3026 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3028 "bison_parser.cpp" /* yacc.c:1646 */ break; case 76: #line 628 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = (yyvsp[0].table); } -#line 3032 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3034 "bison_parser.cpp" /* yacc.c:1646 */ break; case 77: #line 633 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[0].expr); } -#line 3038 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3040 "bison_parser.cpp" /* yacc.c:1646 */ break; case 78: #line 634 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = nullptr; } -#line 3044 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3046 "bison_parser.cpp" /* yacc.c:1646 */ break; case 79: @@ -3050,127 +3052,127 @@ yyreduce: (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3054 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3056 "bison_parser.cpp" /* yacc.c:1646 */ break; case 80: #line 643 "bison_parser.y" /* yacc.c:1646 */ { (yyval.group_t) = nullptr; } -#line 3060 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3062 "bison_parser.cpp" /* yacc.c:1646 */ break; case 81: #line 647 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[0].expr); } -#line 3066 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3068 "bison_parser.cpp" /* yacc.c:1646 */ break; case 82: #line 648 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = nullptr; } -#line 3072 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3074 "bison_parser.cpp" /* yacc.c:1646 */ break; case 83: #line 651 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3078 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3080 "bison_parser.cpp" /* yacc.c:1646 */ break; case 84: #line 652 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_vec) = nullptr; } -#line 3084 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3086 "bison_parser.cpp" /* yacc.c:1646 */ break; case 85: #line 656 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3090 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3092 "bison_parser.cpp" /* yacc.c:1646 */ break; case 86: #line 657 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3096 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3098 "bison_parser.cpp" /* yacc.c:1646 */ break; case 87: #line 661 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3102 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3104 "bison_parser.cpp" /* yacc.c:1646 */ break; case 88: #line 665 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderAsc; } -#line 3108 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3110 "bison_parser.cpp" /* yacc.c:1646 */ break; case 89: #line 666 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderDesc; } -#line 3114 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3116 "bison_parser.cpp" /* yacc.c:1646 */ break; case 90: #line 667 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderAsc; } -#line 3120 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3122 "bison_parser.cpp" /* yacc.c:1646 */ break; case 91: #line 673 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3126 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3128 "bison_parser.cpp" /* yacc.c:1646 */ break; case 92: #line 674 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = nullptr; } -#line 3132 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3134 "bison_parser.cpp" /* yacc.c:1646 */ break; case 93: #line 678 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3138 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3140 "bison_parser.cpp" /* yacc.c:1646 */ break; case 94: #line 679 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } -#line 3144 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3146 "bison_parser.cpp" /* yacc.c:1646 */ break; case 95: #line 680 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = nullptr; } -#line 3150 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3152 "bison_parser.cpp" /* yacc.c:1646 */ break; case 96: #line 687 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3156 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3158 "bison_parser.cpp" /* yacc.c:1646 */ break; case 97: #line 688 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3162 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3164 "bison_parser.cpp" /* yacc.c:1646 */ break; case 98: #line 692 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3168 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3170 "bison_parser.cpp" /* yacc.c:1646 */ break; case 99: #line 693 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3174 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3176 "bison_parser.cpp" /* yacc.c:1646 */ break; case 100: @@ -3179,283 +3181,283 @@ yyreduce: (yyval.expr) = (yyvsp[-1].expr); (yyval.expr)->alias = (yyvsp[0].sval); } -#line 3183 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3185 "bison_parser.cpp" /* yacc.c:1646 */ break; case 106: #line 712 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); } -#line 3189 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3191 "bison_parser.cpp" /* yacc.c:1646 */ break; case 114: #line 720 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3195 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3197 "bison_parser.cpp" /* yacc.c:1646 */ break; case 117: #line 729 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3201 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3203 "bison_parser.cpp" /* yacc.c:1646 */ break; case 118: #line 730 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3207 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3209 "bison_parser.cpp" /* yacc.c:1646 */ break; case 119: #line 731 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 3213 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3215 "bison_parser.cpp" /* yacc.c:1646 */ break; case 120: #line 732 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 3219 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3221 "bison_parser.cpp" /* yacc.c:1646 */ break; case 121: #line 733 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 3225 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3227 "bison_parser.cpp" /* yacc.c:1646 */ break; case 123: #line 738 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 3231 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3233 "bison_parser.cpp" /* yacc.c:1646 */ break; case 124: #line 739 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 3237 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3239 "bison_parser.cpp" /* yacc.c:1646 */ break; case 125: #line 740 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 3243 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3245 "bison_parser.cpp" /* yacc.c:1646 */ break; case 126: #line 741 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 3249 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3251 "bison_parser.cpp" /* yacc.c:1646 */ break; case 127: #line 742 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 3255 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3257 "bison_parser.cpp" /* yacc.c:1646 */ break; case 128: #line 743 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 3261 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3263 "bison_parser.cpp" /* yacc.c:1646 */ break; case 129: #line 744 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 3267 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3269 "bison_parser.cpp" /* yacc.c:1646 */ break; case 130: #line 745 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 3273 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3275 "bison_parser.cpp" /* yacc.c:1646 */ break; case 131: #line 746 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 3279 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3281 "bison_parser.cpp" /* yacc.c:1646 */ break; case 132: #line 747 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 3285 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3287 "bison_parser.cpp" /* yacc.c:1646 */ break; case 133: #line 751 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 3291 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3293 "bison_parser.cpp" /* yacc.c:1646 */ break; case 134: #line 752 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 3297 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3299 "bison_parser.cpp" /* yacc.c:1646 */ break; case 135: #line 756 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 3303 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3305 "bison_parser.cpp" /* yacc.c:1646 */ break; case 136: #line 757 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 3309 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3311 "bison_parser.cpp" /* yacc.c:1646 */ break; case 137: #line 758 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 3315 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3317 "bison_parser.cpp" /* yacc.c:1646 */ break; case 138: #line 759 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 3321 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3323 "bison_parser.cpp" /* yacc.c:1646 */ break; case 139: #line 764 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3327 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3329 "bison_parser.cpp" /* yacc.c:1646 */ break; case 140: #line 766 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3333 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3335 "bison_parser.cpp" /* yacc.c:1646 */ break; case 141: #line 770 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 3339 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3341 "bison_parser.cpp" /* yacc.c:1646 */ break; case 142: #line 771 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 3345 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3347 "bison_parser.cpp" /* yacc.c:1646 */ break; case 143: #line 775 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 3351 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3353 "bison_parser.cpp" /* yacc.c:1646 */ break; case 144: #line 776 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 3357 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3359 "bison_parser.cpp" /* yacc.c:1646 */ break; case 145: #line 777 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 3363 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3365 "bison_parser.cpp" /* yacc.c:1646 */ break; case 146: #line 778 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 3369 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3371 "bison_parser.cpp" /* yacc.c:1646 */ break; case 147: #line 779 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 3375 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3377 "bison_parser.cpp" /* yacc.c:1646 */ break; case 148: #line 780 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 3381 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3383 "bison_parser.cpp" /* yacc.c:1646 */ break; case 149: #line 784 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 3387 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3389 "bison_parser.cpp" /* yacc.c:1646 */ break; case 150: #line 785 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 3393 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3395 "bison_parser.cpp" /* yacc.c:1646 */ break; case 151: #line 789 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 3399 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3401 "bison_parser.cpp" /* yacc.c:1646 */ break; case 152: #line 793 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 3405 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3407 "bison_parser.cpp" /* yacc.c:1646 */ break; case 153: #line 797 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3411 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3413 "bison_parser.cpp" /* yacc.c:1646 */ break; case 154: #line 801 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 3417 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3419 "bison_parser.cpp" /* yacc.c:1646 */ break; case 155: #line 802 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 3423 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3425 "bison_parser.cpp" /* yacc.c:1646 */ break; case 156: #line 803 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar(); } -#line 3429 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3431 "bison_parser.cpp" /* yacc.c:1646 */ break; case 157: #line 804 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 3435 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3437 "bison_parser.cpp" /* yacc.c:1646 */ break; case 162: #line 815 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 3441 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3443 "bison_parser.cpp" /* yacc.c:1646 */ break; case 163: #line 820 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 3447 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3449 "bison_parser.cpp" /* yacc.c:1646 */ break; case 165: #line 825 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 3453 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3455 "bison_parser.cpp" /* yacc.c:1646 */ break; case 166: #line 829 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeNullLiteral(); } -#line 3459 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3461 "bison_parser.cpp" /* yacc.c:1646 */ break; case 167: @@ -3465,7 +3467,7 @@ yyreduce: (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 3469 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3471 "bison_parser.cpp" /* yacc.c:1646 */ break; case 169: @@ -3476,7 +3478,7 @@ yyreduce: tbl->list = (yyvsp[0].table_vec); (yyval.table) = tbl; } -#line 3480 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3482 "bison_parser.cpp" /* yacc.c:1646 */ break; case 173: @@ -3487,19 +3489,19 @@ yyreduce: tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3491 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3493 "bison_parser.cpp" /* yacc.c:1646 */ break; case 174: #line 871 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 3497 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3499 "bison_parser.cpp" /* yacc.c:1646 */ break; case 175: #line 872 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 3503 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3505 "bison_parser.cpp" /* yacc.c:1646 */ break; case 176: @@ -3510,7 +3512,7 @@ yyreduce: tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3514 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3516 "bison_parser.cpp" /* yacc.c:1646 */ break; case 177: @@ -3519,25 +3521,25 @@ yyreduce: (yyval.table) = new TableRef(kTableName); (yyval.table)->name = (yyvsp[0].sval); } -#line 3523 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3525 "bison_parser.cpp" /* yacc.c:1646 */ break; case 179: #line 896 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = (yyvsp[0].sval); } -#line 3529 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3531 "bison_parser.cpp" /* yacc.c:1646 */ break; case 180: #line 901 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = (yyvsp[0].sval); } -#line 3535 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3537 "bison_parser.cpp" /* yacc.c:1646 */ break; case 183: #line 907 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = nullptr; } -#line 3541 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3543 "bison_parser.cpp" /* yacc.c:1646 */ break; case 184: @@ -3549,7 +3551,7 @@ yyreduce: (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 3553 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3555 "bison_parser.cpp" /* yacc.c:1646 */ break; case 185: @@ -3562,7 +3564,7 @@ yyreduce: (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 3566 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3568 "bison_parser.cpp" /* yacc.c:1646 */ break; case 186: @@ -3582,71 +3584,71 @@ yyreduce: (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 3586 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3588 "bison_parser.cpp" /* yacc.c:1646 */ break; case 187: #line 952 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinInner; } -#line 3592 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3594 "bison_parser.cpp" /* yacc.c:1646 */ break; case 188: #line 953 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinOuter; } -#line 3598 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3600 "bison_parser.cpp" /* yacc.c:1646 */ break; case 189: #line 954 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinLeftOuter; } -#line 3604 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3606 "bison_parser.cpp" /* yacc.c:1646 */ break; case 190: #line 955 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinRightOuter; } -#line 3610 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3612 "bison_parser.cpp" /* yacc.c:1646 */ break; case 191: #line 956 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinLeft; } -#line 3616 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3618 "bison_parser.cpp" /* yacc.c:1646 */ break; case 192: #line 957 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinRight; } -#line 3622 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3624 "bison_parser.cpp" /* yacc.c:1646 */ break; case 193: #line 958 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinCross; } -#line 3628 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3630 "bison_parser.cpp" /* yacc.c:1646 */ break; case 194: #line 959 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinInner; } -#line 3634 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3636 "bison_parser.cpp" /* yacc.c:1646 */ break; case 198: #line 979 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 3640 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3642 "bison_parser.cpp" /* yacc.c:1646 */ break; case 199: #line 980 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 3646 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3648 "bison_parser.cpp" /* yacc.c:1646 */ break; -#line 3650 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3652 "bison_parser.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 8a5d89d..c2a852d 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -214,7 +214,7 @@ extern int hsql_debug; /* Value type. */ #if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED -typedef union HSQL_STYPE HSQL_STYPE; + union HSQL_STYPE { #line 93 "bison_parser.y" /* yacc.c:1909 */ @@ -257,6 +257,8 @@ union HSQL_STYPE #line 259 "bison_parser.h" /* yacc.c:1909 */ }; + +typedef union HSQL_STYPE HSQL_STYPE; # define HSQL_STYPE_IS_TRIVIAL 1 # define HSQL_STYPE_IS_DECLARED 1 #endif diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp index 2af46f3..094f831 100644 --- a/src/parser/flex_lexer.cpp +++ b/src/parser/flex_lexer.cpp @@ -8,8 +8,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -88,25 +88,13 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ @@ -179,11 +167,17 @@ typedef void* yyscan_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -201,11 +195,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -218,7 +207,7 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -246,7 +235,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -334,7 +323,7 @@ void hsql_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define hsql_wrap(n) 1 +#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -346,14 +335,14 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (int) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -474,7 +463,7 @@ static yyconst flex_int16_t yy_accept[938] = 2, 2, 5, 6, 2, 2, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -506,7 +495,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[68] = +static yyconst YY_CHAR yy_meta[68] = { 0, 1, 1, 2, 1, 3, 1, 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, @@ -517,7 +506,7 @@ static yyconst flex_int32_t yy_meta[68] = 4, 4, 4, 4, 4, 4, 1 } ; -static yyconst flex_int16_t yy_base[945] = +static yyconst flex_uint16_t yy_base[945] = { 0, 0, 0, 67, 0, 433, 3713, 133, 135, 418, 0, 3713, 410, 131, 401, 133, 132, 384, 129, 129, 137, @@ -733,7 +722,7 @@ static yyconst flex_int16_t yy_def[945] = 937, 937, 937, 937 } ; -static yyconst flex_int16_t yy_nxt[3781] = +static yyconst flex_uint16_t yy_nxt[3781] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 11, 17, 18, 19, 20, 21, 22, 23, 24, @@ -1607,7 +1596,7 @@ static yyconst flex_int16_t yy_chk[3781] = /*************************** ** Section 3: Rules ***************************/ -#line 1611 "flex_lexer.cpp" +#line 1600 "flex_lexer.cpp" #define INITIAL 0 #define COMMENT 1 @@ -1689,19 +1678,23 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *hsql_get_in (yyscan_t yyscanner ); -void hsql_set_in (FILE * in_str ,yyscan_t yyscanner ); +void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner ); FILE *hsql_get_out (yyscan_t yyscanner ); -void hsql_set_out (FILE * out_str ,yyscan_t yyscanner ); +void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner ); -int hsql_get_leng (yyscan_t yyscanner ); + int hsql_get_leng (yyscan_t yyscanner ); char *hsql_get_text (yyscan_t yyscanner ); int hsql_get_lineno (yyscan_t yyscanner ); -void hsql_set_lineno (int line_number ,yyscan_t yyscanner ); +void hsql_set_lineno (int _line_number ,yyscan_t yyscanner ); + +int hsql_get_column (yyscan_t yyscanner ); + +void hsql_set_column (int _column_no ,yyscan_t yyscanner ); YYSTYPE * hsql_get_lval (yyscan_t yyscanner ); @@ -1723,6 +1716,10 @@ extern int hsql_wrap (yyscan_t yyscanner ); #endif #endif +#ifndef YY_NO_UNPUT + +#endif + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif @@ -1756,7 +1753,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1780,7 +1777,7 @@ static int input (yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -1837,7 +1834,7 @@ extern int hsql_lex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -1847,16 +1844,11 @@ extern int hsql_lex \ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 51 "flex_lexer.l" - - -#line 1859 "flex_lexer.cpp" - yylval = yylval_param; yylloc = yylloc_param; @@ -1887,7 +1879,13 @@ YY_DECL hsql__load_buffer_state(yyscanner ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 51 "flex_lexer.l" + + +#line 1887 "flex_lexer.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -1903,7 +1901,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1915,7 +1913,7 @@ yy_match: if ( yy_current_state >= 938 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; ++yy_cp; } while ( yy_current_state != 937 ); @@ -2634,7 +2632,7 @@ YY_RULE_SETUP #line 217 "flex_lexer.l" ECHO; YY_BREAK -#line 2638 "flex_lexer.cpp" +#line 2636 "flex_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): yyterminate(); @@ -2767,6 +2765,7 @@ case YY_STATE_EOF(COMMENT): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of hsql_lex */ /* yy_get_next_buffer - try to read in a new buffer @@ -2779,9 +2778,9 @@ case YY_STATE_EOF(COMMENT): static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -2810,7 +2809,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -2830,7 +2829,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) (yyg->yy_c_buf_p - b->yy_ch_buf); @@ -2850,7 +2849,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -2868,7 +2867,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); + yyg->yy_n_chars, num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -2892,9 +2891,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hsql_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); @@ -2913,15 +2912,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -2933,7 +2932,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( yy_current_state >= 938 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; } return yy_current_state; @@ -2946,11 +2945,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - register int yy_is_jam; + int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; + char *yy_cp = yyg->yy_c_buf_p; - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -2962,12 +2961,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( yy_current_state >= 938 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; yy_is_jam = (yy_current_state == 937); + (void)yyg; return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT + +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -3017,7 +3021,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) case EOB_ACT_END_OF_FILE: { if ( hsql_wrap(yyscanner ) ) - return EOF; + return 0; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -3121,7 +3125,7 @@ static void hsql__load_buffer_state (yyscan_t yyscanner) if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in hsql__create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = (yy_size_t)size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. @@ -3282,15 +3286,15 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in hsql_ensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -3299,7 +3303,7 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_realloc @@ -3319,7 +3323,7 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { @@ -3329,7 +3333,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return NULL; b = (YY_BUFFER_STATE) hsql_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) @@ -3338,7 +3342,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -3361,7 +3365,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc YY_BUFFER_STATE hsql__scan_string (yyconst char * yystr , yyscan_t yyscanner) { - return hsql__scan_bytes(yystr,strlen(yystr) ,yyscanner); + return hsql__scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to hsql_lex() will @@ -3379,7 +3383,7 @@ YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , y int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; + n = (yy_size_t) (_yybytes_len + 2); buf = (char *) hsql_alloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in hsql__scan_bytes()" ); @@ -3405,9 +3409,11 @@ YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , y #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { - (void) fprintf( stderr, "%s\n", msg ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -3445,7 +3451,7 @@ YY_EXTRA_TYPE hsql_get_extra (yyscan_t yyscanner) int hsql_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -3458,7 +3464,7 @@ int hsql_get_lineno (yyscan_t yyscanner) int hsql_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -3513,51 +3519,51 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) } /** Set the current line number. - * @param line_number + * @param _line_number line number * @param yyscanner The scanner object. */ -void hsql_set_lineno (int line_number , yyscan_t yyscanner) +void hsql_set_lineno (int _line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* lineno is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "hsql_set_lineno called with no buffer" , yyscanner); + YY_FATAL_ERROR( "hsql_set_lineno called with no buffer" ); - yylineno = line_number; + yylineno = _line_number; } /** Set the current column. - * @param line_number + * @param _column_no column number * @param yyscanner The scanner object. */ -void hsql_set_column (int column_no , yyscan_t yyscanner) +void hsql_set_column (int _column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "hsql_set_column called with no buffer" , yyscanner); + YY_FATAL_ERROR( "hsql_set_column called with no buffer" ); - yycolumn = column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * @param yyscanner The scanner object. * @see hsql__switch_to_buffer */ -void hsql_set_in (FILE * in_str , yyscan_t yyscanner) +void hsql_set_in (FILE * _in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; + yyin = _in_str ; } -void hsql_set_out (FILE * out_str , yyscan_t yyscanner) +void hsql_set_out (FILE * _out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; + yyout = _out_str ; } int hsql_get_debug (yyscan_t yyscanner) @@ -3566,10 +3572,10 @@ int hsql_get_debug (yyscan_t yyscanner) return yy_flex_debug; } -void hsql_set_debug (int bdebug , yyscan_t yyscanner) +void hsql_set_debug (int _bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ @@ -3645,20 +3651,20 @@ int hsql_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) hsql_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + hsql_set_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -3669,10 +3675,10 @@ static int yy_init_globals (yyscan_t yyscanner) * This function is called from hsql_lex_destroy(), so don't allocate here. */ - yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack = NULL; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; + yyg->yy_c_buf_p = NULL; yyg->yy_init = 0; yyg->yy_start = 0; @@ -3685,8 +3691,8 @@ static int yy_init_globals (yyscan_t yyscanner) yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -3732,7 +3738,10 @@ int hsql_lex_destroy (yyscan_t yyscanner) #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { - register int i; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -3741,7 +3750,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -3751,11 +3760,16 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) void *hsql_alloc (yy_size_t size , yyscan_t yyscanner) { - return (void *) malloc( size ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } void *hsql_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -3763,11 +3777,13 @@ void *hsql_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void hsql_free (void * ptr , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; free( (char *) ptr ); /* see hsql_realloc() for (char *) cast */ } diff --git a/src/parser/flex_lexer.h b/src/parser/flex_lexer.h index d729bfc..cedea38 100644 --- a/src/parser/flex_lexer.h +++ b/src/parser/flex_lexer.h @@ -12,8 +12,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -92,25 +92,13 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* An opaque pointer. */ @@ -165,7 +153,7 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -193,7 +181,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -222,7 +210,7 @@ void hsql_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define hsql_wrap(n) 1 +#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -264,19 +252,23 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *hsql_get_in (yyscan_t yyscanner ); -void hsql_set_in (FILE * in_str ,yyscan_t yyscanner ); +void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner ); FILE *hsql_get_out (yyscan_t yyscanner ); -void hsql_set_out (FILE * out_str ,yyscan_t yyscanner ); +void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner ); -int hsql_get_leng (yyscan_t yyscanner ); + int hsql_get_leng (yyscan_t yyscanner ); char *hsql_get_text (yyscan_t yyscanner ); int hsql_get_lineno (yyscan_t yyscanner ); -void hsql_set_lineno (int line_number ,yyscan_t yyscanner ); +void hsql_set_lineno (int _line_number ,yyscan_t yyscanner ); + +int hsql_get_column (yyscan_t yyscanner ); + +void hsql_set_column (int _column_no ,yyscan_t yyscanner ); YYSTYPE * hsql_get_lval (yyscan_t yyscanner ); @@ -355,6 +347,6 @@ extern int hsql_lex \ #line 217 "flex_lexer.l" -#line 359 "flex_lexer.h" +#line 351 "flex_lexer.h" #undef hsql_IN_HEADER #endif /* hsql_HEADER_H */ From 5346810e67623f24bebed9c0b343cb9417d47a2b Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Tue, 5 Sep 2017 10:55:46 +0000 Subject: [PATCH 04/19] Switch to C++1z --- Makefile | 4 ++-- example/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6083533..06359fd 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ PARSER_CPP = $(SRCPARSER)/bison_parser.cpp $(SRCPARSER)/flex_lexer.cpp PARSER_H = $(SRCPARSER)/bison_parser.h $(SRCPARSER)/flex_lexer.h LIB_BUILD = libsqlparser.so -LIB_CFLAGS = -std=c++11 -Wall -Werror -fPIC $(OPT_FLAG) +LIB_CFLAGS = -std=c++1z -Wall -Werror -fPIC $(OPT_FLAG) LIB_LFLAGS = -shared $(OPT_FLAG) LIB_CPP = $(shell find $(SRC) -name '*.cpp' -not -path "$(SRCPARSER)/*") $(PARSER_CPP) LIB_H = $(shell find $(SRC) -name '*.h' -not -path "$(SRCPARSER)/*") $(PARSER_H) @@ -110,7 +110,7 @@ $(BM_BUILD): $(BM_ALL) $(LIB_BUILD) ############ Test & Example ############ ######################################## TEST_BUILD = $(BIN)/tests -TEST_CFLAGS = -std=c++11 -Wall -Werror -Isrc/ -Itest/ -L./ $(OPT_FLAG) +TEST_CFLAGS = -std=c++1z -Wall -Werror -Isrc/ -Itest/ -L./ $(OPT_FLAG) TEST_CPP = $(shell find test/ -name '*.cpp') TEST_ALL = $(shell find test/ -name '*.cpp') $(shell find test/ -name '*.h') EXAMPLE_SRC = $(shell find example/ -name '*.cpp') $(shell find example/ -name '*.h') diff --git a/example/Makefile b/example/Makefile index 8e241c1..387b553 100644 --- a/example/Makefile +++ b/example/Makefile @@ -1,5 +1,5 @@ -CFLAGS = -std=c++11 -lstdc++ -Wall -Werror -I../src/ -L../ +CFLAGS = -std=c++1z -lstdc++ -Wall -Werror -I../src/ -L../ all: $(CXX) $(CFLAGS) example.cpp -o example -lsqlparser From daf5250df68304cc3d1b2b7a2d56da229a64a7e2 Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Wed, 6 Sep 2017 13:03:32 +0000 Subject: [PATCH 05/19] Switch to gcc5, provide stdlib for clang builds Trying to fix CI --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b6fd166..8a08b6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ language: cpp install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get -qq update - - sudo apt-get install -y g++-4.8 libstdc++-4.8-dev + - sudo apt-get install -y g++-5 libstdc++-5-dev - sudo apt-get install -y flex valgrind - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 90 @@ -22,6 +22,7 @@ install: - bison --version - flex --version - valgrind --version + - if [ "$CXX" = "clang++" ]; then export CXXFLAGS="-stdlib=libc++"; fi compiler: - gcc From cace5319b98b9fd4f628efc4c390234bb02425a5 Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Wed, 6 Sep 2017 13:10:25 +0000 Subject: [PATCH 06/19] Link binaries --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a08b6c..a2c1f38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,10 @@ language: cpp install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get -qq update - - sudo apt-get install -y g++-5 libstdc++-5-dev + - sudo apt-get install -y g++-6 libstdc++-6-dev - sudo apt-get install -y flex valgrind - - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90 - - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 90 + - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90 + - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90 # Install bison 3.0.4. - wget http://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz From f5f7f8b4081e5545a8716cfd9331a65637d57223 Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Wed, 6 Sep 2017 13:22:03 +0000 Subject: [PATCH 07/19] Build flex with current version --- .travis.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2c1f38..4bbbb59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get -qq update - sudo apt-get install -y g++-6 libstdc++-6-dev - - sudo apt-get install -y flex valgrind + - sudo apt-get install -y valgrind - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90 @@ -16,6 +16,13 @@ install: - ./configure && make && sudo make install - cd .. + # Install flex 2.6.4 + - wget https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz + - tar -xvzf flex-2.6.4.tar.gz + - cd flex-2.6.4 + - ./configure && make && sudo make install + - cd .. + # Show installed versions. - which g++ - g++ -v @@ -29,9 +36,14 @@ compiler: - clang script: + # bi build with flex/bison files checked into repo + - make -j4 + - make test + - make test_example + + # build flex/bison files in CI - make cleanall - make -j4 - - make test - make test_example From 68e4d1b207de8939f359ebf8b5e5a534e6ce8ddf Mon Sep 17 00:00:00 2001 From: Markus Dreseler Date: Tue, 12 Sep 2017 19:50:34 +0200 Subject: [PATCH 08/19] Make UPDATE use expression, not literal This allows for things like UPDATE x SET a = a + 1 --- src/parser/bison_parser.cpp | 796 ++++++++++++++++++------------------ src/parser/bison_parser.y | 2 +- 2 files changed, 403 insertions(+), 395 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 70f0566..6cbaf04 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -618,7 +618,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 52 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 530 +#define YYLAST 574 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 151 @@ -782,10 +782,10 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -232 +#define YYPACT_NINF -231 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-232))) + (!!((Yystate) == (-231))) #define YYTABLE_NINF -195 @@ -796,43 +796,43 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 10, 22, 66, 74, 86, -41, 23, 32, 20, -23, - 66, 95, 19, -34, 153, -36, -232, 65, 65, -232, - -232, -232, -232, -232, -232, -232, -232, -232, -232, 24, - -232, 157, 174, 63, -232, 68, 142, 118, 118, 66, - 134, 66, 238, 234, 143, -232, 66, 66, 66, -232, - 109, 114, -232, 10, -232, 184, -232, -232, -232, -232, - -232, -34, 160, 158, -34, 209, -232, 282, 7, 286, - 188, 66, 66, 229, -232, 223, 175, -232, -232, -232, - 81, 303, -232, -232, -232, -232, -232, -232, 176, -232, - 252, -232, -232, -232, 81, 252, 238, -232, -232, -232, - -232, -232, -232, 76, -232, -232, -232, -232, -232, -232, - -232, -232, 291, -63, 175, 81, -232, 331, 339, 156, - 31, 199, 248, 112, 204, 177, -232, 70, 267, 201, - -232, 49, 200, -232, -232, -232, -232, -232, -232, -232, - -232, -232, -232, -232, -232, -232, -232, 226, -49, -232, - 348, 209, 205, -232, -42, 209, 309, -232, 7, -232, - 245, 353, 246, -1, 273, -232, -232, 107, 214, -232, - 4, 5, 312, 81, 218, 177, 359, 81, 60, 219, - -79, 3, 229, 81, -232, 81, 361, 81, -232, -232, - 177, -232, 177, -67, 221, 64, 177, 177, 177, 177, + 231, -3, 32, 33, 50, -30, 15, 22, 10, 34, + 32, -28, 9, -34, 115, 16, -231, 66, 66, -231, + -231, -231, -231, -231, -231, -231, -231, -231, -231, 20, + -231, 12, 160, 23, -231, 24, 96, 68, 68, 32, + 94, 32, 206, 205, 112, -231, 32, 32, 32, -231, + 78, 83, -231, 231, -231, 150, -231, -231, -231, -231, + -231, -34, 134, 125, -34, 178, -231, 242, 7, 245, + 141, 32, 32, 184, -231, 179, 123, -231, -231, -231, + 81, 257, -231, -231, -231, -231, -231, -231, 126, -231, + 210, -231, -231, -231, 81, 210, 206, -231, -231, -231, + -231, -231, -231, 29, -231, -231, -231, -231, -231, -231, + -231, -231, 232, -64, 123, 81, -231, 275, 278, -17, + 8, 133, 195, 146, 139, 177, -231, 70, 213, 148, + -231, 74, 211, -231, -231, -231, -231, -231, -231, -231, + -231, -231, -231, -231, -231, -231, -231, 169, -50, -231, + 295, 178, 152, -231, -59, 178, 259, -231, 7, -231, + 191, 304, 194, -53, 225, -231, -231, 48, 166, -231, + 2, 4, 268, 81, 173, 177, 377, 81, 149, 180, + -76, 13, 184, 81, -231, 81, 320, 81, -231, -231, + 177, -231, 177, -63, 176, 14, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 238, 7, 303, -232, 222, 120, -232, -232, 81, -232, - -232, -232, -232, 238, -232, 295, -11, 146, -232, -34, - 66, -232, 373, 7, -232, 81, -232, -232, 233, 67, - 312, 298, 92, -232, -232, -34, -232, 40, -232, -232, - 28, -232, 329, -232, -232, -232, 288, 300, 387, 177, - 247, 70, -232, 301, 250, 387, 387, 387, 141, 141, - 141, 141, 60, 60, 71, 71, 71, 51, 251, -232, - -232, 7, -232, 348, -232, -232, 331, -232, -232, -232, - -232, -232, -232, 353, -232, -232, -232, 150, 152, -232, - 177, 253, -232, 254, 308, -232, -232, -232, 328, 330, - 3, 311, -232, 290, -232, 177, 387, 70, 255, 159, - -232, -232, 161, -232, -232, -232, -232, -232, 244, -232, - 28, 3, -232, -232, 225, 257, 3, 81, 359, 261, - 167, -232, -232, -232, 177, -232, -232, -232, 3, 171, - 9, -232, -232, 326, 225, 258, 81, 81, -232, -232, - 6, -1, -232, -1, 263, 262, -232 + 206, 81, 257, -231, 185, 54, -231, -231, 81, -231, + -231, -231, -231, 206, -231, 252, -6, 56, -231, -34, + 32, -231, 322, 7, -231, 81, -231, -231, 187, -39, + 268, 246, -32, -231, -231, -34, -231, 40, -231, -231, + 6, -231, 282, -231, -231, -231, 236, 318, 405, 177, + 198, 70, -231, 256, 212, 405, 405, 405, 431, 431, + 431, 431, 149, 149, -91, -91, -91, 30, 214, -53, + -231, 7, -231, 295, -231, -231, 275, -231, -231, -231, + -231, -231, -231, 304, -231, -231, -231, 60, 64, -231, + 177, 215, -231, 219, 270, -231, -231, -231, 289, 291, + 13, 280, -231, 253, -231, 177, 405, 70, 221, 65, + -231, -231, 76, -231, -231, -231, -231, -231, 274, -231, + 6, 13, -231, -231, 175, 220, 13, 81, 377, 224, + 93, -231, -231, -231, 177, -231, -231, -231, 13, 244, + -5, -231, -231, 344, 175, 226, 81, 81, -231, -231, + 5, -53, -231, -53, 227, 229, -231 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -882,15 +882,15 @@ static const yytype_uint8 yydefact[] = /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -232, -232, -232, 358, -232, 394, -232, 130, -232, -232, - -232, -232, -232, 129, -232, -232, 378, -232, 124, -232, - -232, -232, -232, -232, 305, -232, -232, 208, -202, 17, - 357, -13, 391, -232, -232, 145, 272, -232, -232, -120, - -232, -232, 147, -232, 227, -232, -232, -115, -170, -213, - 240, -93, -68, -232, -232, -232, -232, -232, -232, -232, - -232, -232, -232, -232, -232, 88, -65, -112, -232, -38, - -232, -232, -232, -187, 96, -232, -232, -232, 0, -232, - -231, -232, -232, -232, -232, -232 + -231, -231, -231, 307, -231, 354, -231, 90, -231, -231, + -231, -231, -231, 91, -231, -231, 340, -231, 87, -231, + -231, -231, -231, -231, 267, -231, -231, 170, -140, 52, + 321, -13, 353, -231, -231, 190, 216, -231, -231, -121, + -231, -231, 72, -231, 172, -231, -231, 41, -171, -203, + 204, -93, -68, -231, -231, -231, -231, -231, -231, -231, + -231, -231, -231, -231, -231, 28, -65, -112, -231, -38, + -231, -231, -231, -149, 62, -231, -231, -231, 0, -231, + -230, -231, -231, -231, -231, -231 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -912,118 +912,126 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 51, 154, 34, 104, 78, 165, 33, 242, 236, 364, - 45, 99, 100, 77, 287, 9, 79, 1, 160, 312, - 297, 259, 163, 185, 115, 2, 288, 294, 213, 37, - 50, 184, 3, 58, 180, 219, 217, 4, 48, 73, - 222, 76, 187, 303, 5, 6, 82, 83, 84, 32, - 260, 357, 184, 7, 8, 176, 38, 178, 156, 9, - 185, 220, 252, 59, 10, 298, 304, 244, 322, 33, - 49, 113, 114, 120, 99, 100, 77, 35, 89, 187, - 239, 89, 161, 289, 120, 99, 100, 77, 11, 36, - 42, 319, 254, 224, 256, 60, 290, 101, 305, 346, - 212, 185, 306, 12, 39, 41, 169, 176, 307, 308, - 121, 13, 53, 40, 179, 120, 99, 100, 77, 9, - 187, 121, 257, 334, 258, 154, -194, 309, 264, 265, + 51, 154, 34, 104, 78, 165, 242, 236, 364, 184, + 45, 99, 100, 77, 79, 9, 33, 160, 219, 287, + 312, 58, 163, 115, 32, 259, 185, 213, 48, 58, + 297, 288, 9, 196, 180, 33, 35, 357, 168, 73, + 37, 76, 46, 185, 220, 187, 82, 83, 84, 185, + 209, 59, 210, 36, 260, 176, 300, 178, 156, 59, + 49, 252, 187, 185, 298, 50, 304, 38, 187, 47, + 244, 113, 114, 120, 99, 100, 77, 184, 322, 63, + 239, 161, 187, 60, 120, 99, 100, 77, 289, 294, + 319, 60, 254, 224, 256, 41, 39, 101, 305, 212, + 346, 290, 306, 40, 262, 303, 169, 176, 307, 308, + 121, 13, 302, 89, 179, 52, 89, 183, 279, 9, + 186, 121, 257, 263, 258, 154, -194, 309, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 186, 237, 126, 122, 279, 340, 245, 349, - 234, 185, 174, 52, 262, 13, 122, 102, 183, 238, - 101, 354, 300, 186, 55, 46, 58, 350, 104, 185, - 187, 101, 278, 263, 165, 196, 170, 66, 171, 123, - 120, 99, 100, 77, 196, 285, 191, 122, 187, 310, - 123, 316, 47, 124, 210, 196, 59, 304, 206, 207, - 208, 209, 101, 210, 124, 9, 91, 125, 126, 91, - 67, 168, 209, 68, 210, 127, 104, 190, 125, 126, - 102, 175, 157, 69, 63, 158, 127, 301, 60, 305, - 295, 102, 328, 306, 70, 124, 302, 151, 74, 307, - 308, 183, 155, 355, 77, 191, 79, 338, 318, 125, - 126, 304, 122, 231, 81, 85, 232, 127, 309, 195, - 86, 92, 102, 361, 363, 196, 282, 101, 88, 283, - -195, -195, 96, 94, -195, -195, 353, 204, 205, 206, - 207, 208, 209, 305, 210, 98, 175, 306, 192, 191, - 110, 356, 292, 307, 308, 293, 326, 112, 327, 158, - 124, 183, 115, 117, 339, 342, 147, 343, 183, 193, - 158, -194, 309, 352, 125, 126, 183, 194, 195, 63, - 118, 150, 127, 344, 196, 197, 198, 102, 199, 200, - 201, 159, 192, 202, 203, 99, 204, 205, 206, 207, - 208, 209, 166, 210, 172, 191, 173, 177, 181, 345, - 183, 214, 211, 241, 218, 223, 226, 225, 230, 233, - 229, 9, 195, 240, 255, 243, 261, 281, 196, 197, - 198, 191, 199, 200, 201, 286, 296, 202, 203, 299, - 204, 205, 206, 207, 208, 209, 259, 210, 192, 313, - 185, 320, 317, 210, 331, 321, 332, 336, 333, 329, - 330, 341, 315, 360, 191, 337, 348, 351, 366, 241, - 171, 87, 57, 323, 192, 324, 72, 325, 195, 162, - 280, 95, 64, 253, 196, 197, 198, 347, 199, 200, - 201, 359, 191, 202, 203, 241, 204, 205, 206, 207, - 208, 209, 235, 210, 195, 284, 0, 192, 365, 0, - 196, 197, 198, 0, 199, 200, 201, 0, 0, 202, - 203, 0, 204, 205, 206, 207, 208, 209, 241, 210, - 0, 0, 0, 0, 0, -195, 0, 195, 0, 0, - 0, 0, 0, 196, 197, 198, 0, 199, 200, 201, - 0, 0, 202, 203, 0, 204, 205, 206, 207, 208, - 209, 0, 210, 0, 0, 195, 0, 0, 0, 0, - 0, 196, -195, -195, 0, -195, 200, 201, 0, 0, + 276, 277, 237, 126, 183, 122, 340, 42, 234, 120, + 99, 100, 77, 170, 196, 171, 122, 102, 245, 238, + 101, 334, 151, 66, 53, 55, 350, 155, 104, 68, + 67, 101, 278, 210, 165, 157, 185, 69, 158, 123, + 120, 99, 100, 77, 70, 285, 174, 349, 186, 310, + 123, 316, 217, 124, 231, 187, 222, 232, 74, 354, + 282, 304, 292, 283, 124, 293, 326, 125, 126, 158, + 327, 342, 77, 183, 183, 127, 104, 79, 125, 126, + 102, 122, 343, 81, 85, 158, 127, 301, 190, 86, + 295, 102, 328, 305, 88, 92, 101, 306, 1, 352, + 94, 96, 183, 307, 308, 98, 2, 338, 318, 110, + 112, 91, 122, 3, 91, 175, 191, 115, 4, 117, + 147, -194, 309, 361, 363, 5, 6, 101, 118, 124, + 304, 150, 159, 196, 7, 8, 353, 63, 172, 99, + 9, 166, 177, 125, 126, 10, 175, 206, 207, 208, + 209, 127, 210, 173, 181, 211, 102, 183, 214, 192, + 124, 218, 305, 225, 339, 223, 306, 226, 229, 11, + 230, 233, 307, 308, 125, 126, 355, 9, 240, 191, + 193, 261, 127, 255, 12, 296, 243, 102, 194, 195, + 281, 309, 286, 299, 259, 196, 197, 198, 185, 199, + 200, 201, 313, 317, 202, 203, 320, 204, 205, 206, + 207, 208, 209, 344, 210, 210, 331, 332, 321, 333, + 87, 329, 192, 191, 356, 330, 336, 341, 337, 348, + 351, 360, 57, 323, 171, 366, 13, 324, 72, 345, + 325, 162, 280, 241, 64, 95, 235, 253, 365, 191, + 284, 0, 195, 347, 0, 0, 0, 0, 196, 197, + 198, 0, 199, 200, 201, 0, 192, 202, 203, 0, + 204, 205, 206, 207, 208, 209, 0, 210, 0, 0, + 315, 0, 191, 0, 0, 0, 0, 241, 0, 0, + 0, 0, 192, 0, 0, 0, 195, 0, 0, 0, + 0, 0, 196, 197, 198, 0, 199, 200, 201, 359, + 191, 202, 203, 241, 204, 205, 206, 207, 208, 209, + 0, 210, 195, 0, 0, 192, 0, 0, 196, 197, + 198, 0, 199, 200, 201, 0, 191, 202, 203, 0, + 204, 205, 206, 207, 208, 209, 241, 210, 0, 0, + 0, 0, 0, -195, 0, 195, 0, 0, 0, 0, + 0, 196, 197, 198, 0, 199, 200, 201, 0, 0, 202, 203, 0, 204, 205, 206, 207, 208, 209, 0, - 210 + 210, 0, 0, 195, 0, 0, 0, 0, 0, 196, + -195, -195, 0, -195, 200, 201, 0, 0, 202, 203, + 0, 204, 205, 206, 207, 208, 209, 0, 210, 195, + 0, 0, 0, 0, 0, 196, 0, 0, 0, 0, + -195, -195, 0, 0, -195, -195, 0, 204, 205, 206, + 207, 208, 209, 0, 210 }; static const yytype_int16 yycheck[] = { - 13, 94, 2, 68, 42, 117, 3, 177, 3, 3, - 10, 4, 5, 6, 25, 49, 12, 7, 81, 250, - 233, 88, 115, 102, 73, 15, 37, 229, 148, 70, - 13, 3, 22, 9, 127, 77, 151, 27, 19, 39, - 155, 41, 121, 245, 34, 35, 46, 47, 48, 27, - 117, 42, 3, 43, 44, 123, 97, 125, 96, 49, - 102, 103, 182, 39, 54, 235, 26, 146, 281, 3, - 51, 71, 72, 3, 4, 5, 6, 3, 61, 121, - 173, 64, 145, 94, 3, 4, 5, 6, 78, 3, - 113, 261, 185, 158, 187, 71, 107, 90, 58, 330, - 149, 102, 62, 93, 81, 85, 119, 175, 68, 69, - 40, 145, 148, 81, 127, 3, 4, 5, 6, 49, - 121, 40, 190, 310, 192, 218, 86, 87, 196, 197, + 13, 94, 2, 68, 42, 117, 177, 3, 3, 3, + 10, 4, 5, 6, 12, 49, 3, 81, 77, 25, + 250, 9, 115, 73, 27, 88, 102, 148, 19, 9, + 233, 37, 49, 124, 127, 3, 3, 42, 55, 39, + 70, 41, 70, 102, 103, 121, 46, 47, 48, 102, + 141, 39, 143, 3, 117, 123, 95, 125, 96, 39, + 51, 182, 121, 102, 235, 13, 26, 97, 121, 97, + 146, 71, 72, 3, 4, 5, 6, 3, 281, 67, + 173, 145, 121, 71, 3, 4, 5, 6, 94, 229, + 261, 71, 185, 158, 187, 85, 81, 90, 58, 149, + 330, 107, 62, 81, 90, 245, 119, 175, 68, 69, + 40, 145, 144, 61, 127, 0, 64, 149, 211, 49, + 114, 40, 190, 109, 192, 218, 86, 87, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 114, 138, 138, 75, 211, 317, 145, 336, - 146, 102, 40, 0, 90, 145, 75, 150, 149, 172, - 90, 348, 95, 114, 99, 70, 9, 337, 233, 102, - 121, 90, 210, 109, 286, 124, 145, 3, 147, 109, - 3, 4, 5, 6, 124, 223, 45, 75, 121, 149, - 109, 259, 97, 123, 143, 124, 39, 26, 138, 139, - 140, 141, 90, 143, 123, 49, 61, 137, 138, 64, - 147, 55, 141, 145, 143, 145, 281, 17, 137, 138, - 150, 109, 146, 81, 67, 149, 145, 240, 71, 58, - 230, 150, 300, 62, 116, 123, 144, 90, 104, 68, - 69, 149, 95, 72, 6, 45, 12, 315, 261, 137, - 138, 26, 75, 146, 111, 146, 149, 145, 87, 118, - 146, 101, 150, 356, 357, 124, 146, 90, 84, 149, - 129, 130, 63, 115, 133, 134, 344, 136, 137, 138, - 139, 140, 141, 58, 143, 3, 109, 62, 88, 45, - 4, 120, 146, 68, 69, 149, 146, 109, 146, 149, - 123, 149, 73, 80, 317, 146, 3, 146, 149, 109, - 149, 86, 87, 146, 137, 138, 149, 117, 118, 67, - 145, 145, 145, 79, 124, 125, 126, 150, 128, 129, - 130, 40, 88, 133, 134, 4, 136, 137, 138, 139, - 140, 141, 3, 143, 145, 45, 98, 143, 81, 105, - 149, 3, 126, 109, 149, 46, 3, 112, 85, 145, - 114, 49, 118, 145, 3, 146, 145, 145, 124, 125, - 126, 45, 128, 129, 130, 80, 3, 133, 134, 146, - 136, 137, 138, 139, 140, 141, 88, 143, 88, 60, - 102, 90, 145, 143, 86, 144, 68, 86, 68, 146, - 146, 146, 102, 145, 45, 115, 149, 146, 146, 109, - 147, 53, 18, 283, 88, 286, 38, 293, 118, 114, - 212, 64, 31, 183, 124, 125, 126, 331, 128, 129, - 130, 105, 45, 133, 134, 109, 136, 137, 138, 139, - 140, 141, 170, 143, 118, 218, -1, 88, 360, -1, - 124, 125, 126, -1, 128, 129, 130, -1, -1, 133, - 134, -1, 136, 137, 138, 139, 140, 141, 109, 143, - -1, -1, -1, -1, -1, 88, -1, 118, -1, -1, - -1, -1, -1, 124, 125, 126, -1, 128, 129, 130, - -1, -1, 133, 134, -1, 136, 137, 138, 139, 140, - 141, -1, 143, -1, -1, 118, -1, -1, -1, -1, + 208, 209, 138, 138, 149, 75, 317, 113, 146, 3, + 4, 5, 6, 145, 124, 147, 75, 150, 145, 172, + 90, 310, 90, 3, 148, 99, 337, 95, 233, 145, + 147, 90, 210, 143, 286, 146, 102, 81, 149, 109, + 3, 4, 5, 6, 116, 223, 40, 336, 114, 149, + 109, 259, 151, 123, 146, 121, 155, 149, 104, 348, + 146, 26, 146, 149, 123, 149, 146, 137, 138, 149, + 146, 146, 6, 149, 149, 145, 281, 12, 137, 138, + 150, 75, 146, 111, 146, 149, 145, 240, 17, 146, + 230, 150, 300, 58, 84, 101, 90, 62, 7, 146, + 115, 63, 149, 68, 69, 3, 15, 315, 261, 4, + 109, 61, 75, 22, 64, 109, 45, 73, 27, 80, + 3, 86, 87, 356, 357, 34, 35, 90, 145, 123, + 26, 145, 40, 124, 43, 44, 344, 67, 145, 4, + 49, 3, 143, 137, 138, 54, 109, 138, 139, 140, + 141, 145, 143, 98, 81, 126, 150, 149, 3, 88, + 123, 149, 58, 112, 317, 46, 62, 3, 114, 78, + 85, 145, 68, 69, 137, 138, 72, 49, 145, 45, + 109, 145, 145, 3, 93, 3, 146, 150, 117, 118, + 145, 87, 80, 146, 88, 124, 125, 126, 102, 128, + 129, 130, 60, 145, 133, 134, 90, 136, 137, 138, + 139, 140, 141, 79, 143, 143, 86, 68, 144, 68, + 53, 146, 88, 45, 120, 146, 86, 146, 115, 149, + 146, 145, 18, 283, 147, 146, 145, 286, 38, 105, + 293, 114, 212, 109, 31, 64, 170, 183, 360, 45, + 218, -1, 118, 331, -1, -1, -1, -1, 124, 125, + 126, -1, 128, 129, 130, -1, 88, 133, 134, -1, + 136, 137, 138, 139, 140, 141, -1, 143, -1, -1, + 102, -1, 45, -1, -1, -1, -1, 109, -1, -1, + -1, -1, 88, -1, -1, -1, 118, -1, -1, -1, + -1, -1, 124, 125, 126, -1, 128, 129, 130, 105, + 45, 133, 134, 109, 136, 137, 138, 139, 140, 141, + -1, 143, 118, -1, -1, 88, -1, -1, 124, 125, + 126, -1, 128, 129, 130, -1, 45, 133, 134, -1, + 136, 137, 138, 139, 140, 141, 109, 143, -1, -1, + -1, -1, -1, 88, -1, 118, -1, -1, -1, -1, -1, 124, 125, 126, -1, 128, 129, 130, -1, -1, 133, 134, -1, 136, 137, 138, 139, 140, 141, -1, - 143 + 143, -1, -1, 118, -1, -1, -1, -1, -1, 124, + 125, 126, -1, 128, 129, 130, -1, -1, 133, 134, + -1, 136, 137, 138, 139, 140, 141, -1, 143, 118, + -1, -1, -1, -1, -1, 124, -1, -1, -1, -1, + 129, 130, -1, -1, 133, 134, -1, 136, 137, 138, + 139, 140, 141, -1, 143 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1057,7 +1065,7 @@ static const yytype_uint8 yystos[] = 145, 109, 199, 146, 146, 145, 223, 224, 225, 227, 229, 232, 190, 201, 202, 3, 202, 203, 203, 88, 117, 145, 90, 109, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 220, 217, + 203, 203, 203, 203, 203, 203, 203, 203, 220, 202, 178, 145, 146, 149, 195, 220, 80, 25, 37, 94, 107, 170, 146, 149, 179, 229, 3, 200, 199, 146, 95, 182, 144, 179, 26, 58, 62, 68, 69, 87, @@ -1615,25 +1623,25 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio case 3: /* IDENTIFIER */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1619 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1627 "bison_parser.cpp" /* yacc.c:1257 */ break; case 4: /* STRING */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1625 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1633 "bison_parser.cpp" /* yacc.c:1257 */ break; case 5: /* FLOATVAL */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1631 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1639 "bison_parser.cpp" /* yacc.c:1257 */ break; case 6: /* INTVAL */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1637 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1645 "bison_parser.cpp" /* yacc.c:1257 */ break; case 153: /* statement_list */ @@ -1646,19 +1654,19 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).stmt_vec)); } -#line 1650 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1658 "bison_parser.cpp" /* yacc.c:1257 */ break; case 154: /* statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1656 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1664 "bison_parser.cpp" /* yacc.c:1257 */ break; case 155: /* preparable_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1662 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1670 "bison_parser.cpp" /* yacc.c:1257 */ break; case 156: /* opt_hints */ @@ -1671,7 +1679,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1675 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1683 "bison_parser.cpp" /* yacc.c:1257 */ break; case 157: /* hint_list */ @@ -1684,67 +1692,67 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1688 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1696 "bison_parser.cpp" /* yacc.c:1257 */ break; case 158: /* hint */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1694 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1702 "bison_parser.cpp" /* yacc.c:1257 */ break; case 159: /* prepare_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).prep_stmt)); } -#line 1700 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1708 "bison_parser.cpp" /* yacc.c:1257 */ break; case 160: /* prepare_target_query */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1706 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1714 "bison_parser.cpp" /* yacc.c:1257 */ break; case 161: /* execute_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).exec_stmt)); } -#line 1712 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1720 "bison_parser.cpp" /* yacc.c:1257 */ break; case 162: /* import_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).import_stmt)); } -#line 1718 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1726 "bison_parser.cpp" /* yacc.c:1257 */ break; case 163: /* import_file_type */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1724 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1732 "bison_parser.cpp" /* yacc.c:1257 */ break; case 164: /* file_path */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1730 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1738 "bison_parser.cpp" /* yacc.c:1257 */ break; case 165: /* show_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).show_stmt)); } -#line 1736 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1744 "bison_parser.cpp" /* yacc.c:1257 */ break; case 166: /* create_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).create_stmt)); } -#line 1742 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1750 "bison_parser.cpp" /* yacc.c:1257 */ break; case 167: /* opt_not_exists */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1748 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1756 "bison_parser.cpp" /* yacc.c:1257 */ break; case 168: /* column_def_commalist */ @@ -1757,43 +1765,43 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).column_vec)); } -#line 1761 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1769 "bison_parser.cpp" /* yacc.c:1257 */ break; case 169: /* column_def */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).column_t)); } -#line 1767 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1775 "bison_parser.cpp" /* yacc.c:1257 */ break; case 170: /* column_type */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1773 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1781 "bison_parser.cpp" /* yacc.c:1257 */ break; case 171: /* drop_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).drop_stmt)); } -#line 1779 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1787 "bison_parser.cpp" /* yacc.c:1257 */ break; case 172: /* delete_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1785 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1793 "bison_parser.cpp" /* yacc.c:1257 */ break; case 173: /* truncate_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1791 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1799 "bison_parser.cpp" /* yacc.c:1257 */ break; case 174: /* insert_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).insert_stmt)); } -#line 1797 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1805 "bison_parser.cpp" /* yacc.c:1257 */ break; case 175: /* opt_column_list */ @@ -1806,13 +1814,13 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 1810 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1818 "bison_parser.cpp" /* yacc.c:1257 */ break; case 176: /* update_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_stmt)); } -#line 1816 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1824 "bison_parser.cpp" /* yacc.c:1257 */ break; case 177: /* update_clause_commalist */ @@ -1825,49 +1833,49 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).update_vec)); } -#line 1829 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1837 "bison_parser.cpp" /* yacc.c:1257 */ break; case 178: /* update_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_t)); } -#line 1835 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1843 "bison_parser.cpp" /* yacc.c:1257 */ break; case 179: /* select_statement */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1841 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1849 "bison_parser.cpp" /* yacc.c:1257 */ break; case 180: /* select_with_paren */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1847 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1855 "bison_parser.cpp" /* yacc.c:1257 */ break; case 181: /* select_paren_or_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1853 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1861 "bison_parser.cpp" /* yacc.c:1257 */ break; case 182: /* select_no_paren */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1859 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1867 "bison_parser.cpp" /* yacc.c:1257 */ break; case 186: /* select_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1865 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1873 "bison_parser.cpp" /* yacc.c:1257 */ break; case 187: /* opt_distinct */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1871 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1879 "bison_parser.cpp" /* yacc.c:1257 */ break; case 188: /* select_list */ @@ -1880,31 +1888,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1884 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1892 "bison_parser.cpp" /* yacc.c:1257 */ break; case 189: /* from_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 1890 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1898 "bison_parser.cpp" /* yacc.c:1257 */ break; case 190: /* opt_where */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1896 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1904 "bison_parser.cpp" /* yacc.c:1257 */ break; case 191: /* opt_group */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).group_t)); } -#line 1902 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1910 "bison_parser.cpp" /* yacc.c:1257 */ break; case 192: /* opt_having */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1908 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1916 "bison_parser.cpp" /* yacc.c:1257 */ break; case 193: /* opt_order */ @@ -1917,7 +1925,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1921 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1929 "bison_parser.cpp" /* yacc.c:1257 */ break; case 194: /* order_list */ @@ -1930,31 +1938,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1934 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1942 "bison_parser.cpp" /* yacc.c:1257 */ break; case 195: /* order_desc */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).order)); } -#line 1940 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1948 "bison_parser.cpp" /* yacc.c:1257 */ break; case 196: /* opt_order_type */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1946 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1954 "bison_parser.cpp" /* yacc.c:1257 */ break; case 197: /* opt_top */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1952 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1960 "bison_parser.cpp" /* yacc.c:1257 */ break; case 198: /* opt_limit */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1958 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1966 "bison_parser.cpp" /* yacc.c:1257 */ break; case 199: /* expr_list */ @@ -1967,7 +1975,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1971 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1979 "bison_parser.cpp" /* yacc.c:1257 */ break; case 200: /* literal_list */ @@ -1980,157 +1988,157 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1984 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1992 "bison_parser.cpp" /* yacc.c:1257 */ break; case 201: /* expr_alias */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1990 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1998 "bison_parser.cpp" /* yacc.c:1257 */ break; case 202: /* expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1996 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2004 "bison_parser.cpp" /* yacc.c:1257 */ break; case 203: /* operand */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2002 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2010 "bison_parser.cpp" /* yacc.c:1257 */ break; case 204: /* scalar_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2008 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2016 "bison_parser.cpp" /* yacc.c:1257 */ break; case 205: /* unary_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2014 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2022 "bison_parser.cpp" /* yacc.c:1257 */ break; case 206: /* binary_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2020 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2028 "bison_parser.cpp" /* yacc.c:1257 */ break; case 207: /* logic_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2026 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2034 "bison_parser.cpp" /* yacc.c:1257 */ break; case 208: /* in_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2032 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2040 "bison_parser.cpp" /* yacc.c:1257 */ break; case 209: /* case_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2038 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2046 "bison_parser.cpp" /* yacc.c:1257 */ break; case 210: /* exists_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2044 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2052 "bison_parser.cpp" /* yacc.c:1257 */ break; case 211: /* comp_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2050 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2058 "bison_parser.cpp" /* yacc.c:1257 */ break; case 212: /* function_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2056 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2064 "bison_parser.cpp" /* yacc.c:1257 */ break; case 213: /* array_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2062 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2070 "bison_parser.cpp" /* yacc.c:1257 */ break; case 214: /* array_index */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2068 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2076 "bison_parser.cpp" /* yacc.c:1257 */ break; case 215: /* between_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2074 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2082 "bison_parser.cpp" /* yacc.c:1257 */ break; case 216: /* column_name */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2080 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2088 "bison_parser.cpp" /* yacc.c:1257 */ break; case 217: /* literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2086 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2094 "bison_parser.cpp" /* yacc.c:1257 */ break; case 218: /* string_literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2092 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2100 "bison_parser.cpp" /* yacc.c:1257 */ break; case 219: /* num_literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2098 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2106 "bison_parser.cpp" /* yacc.c:1257 */ break; case 220: /* int_literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2104 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2112 "bison_parser.cpp" /* yacc.c:1257 */ break; case 221: /* null_literal */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2110 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2118 "bison_parser.cpp" /* yacc.c:1257 */ break; case 222: /* param_expr */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2116 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2124 "bison_parser.cpp" /* yacc.c:1257 */ break; case 223: /* table_ref */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2122 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2130 "bison_parser.cpp" /* yacc.c:1257 */ break; case 224: /* table_ref_atomic */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2128 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2136 "bison_parser.cpp" /* yacc.c:1257 */ break; case 225: /* nonjoin_table_ref_atomic */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2134 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2142 "bison_parser.cpp" /* yacc.c:1257 */ break; case 226: /* table_ref_commalist */ @@ -2143,55 +2151,55 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).table_vec)); } -#line 2147 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2155 "bison_parser.cpp" /* yacc.c:1257 */ break; case 227: /* table_ref_name */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2153 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2161 "bison_parser.cpp" /* yacc.c:1257 */ break; case 228: /* table_ref_name_no_alias */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2159 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2167 "bison_parser.cpp" /* yacc.c:1257 */ break; case 229: /* table_name */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 2165 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2173 "bison_parser.cpp" /* yacc.c:1257 */ break; case 230: /* alias */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 2171 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2179 "bison_parser.cpp" /* yacc.c:1257 */ break; case 231: /* opt_alias */ #line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 2177 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2185 "bison_parser.cpp" /* yacc.c:1257 */ break; case 232: /* join_clause */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2183 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2191 "bison_parser.cpp" /* yacc.c:1257 */ break; case 233: /* opt_join_type */ #line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 2189 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2197 "bison_parser.cpp" /* yacc.c:1257 */ break; case 234: /* join_condition */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2195 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2203 "bison_parser.cpp" /* yacc.c:1257 */ break; case 236: /* ident_commalist */ @@ -2204,7 +2212,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2208 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2216 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -2322,7 +2330,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.total_column = 0; } -#line 2326 "bison_parser.cpp" /* yacc.c:1429 */ +#line 2334 "bison_parser.cpp" /* yacc.c:1429 */ yylsp[0] = yylloc; goto yysetstate; @@ -2527,19 +2535,19 @@ yyreduce: } delete (yyvsp[-1].stmt_vec); } -#line 2531 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2539 "bison_parser.cpp" /* yacc.c:1646 */ break; case 3: #line 263 "bison_parser.y" /* yacc.c:1646 */ { (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 2537 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2545 "bison_parser.cpp" /* yacc.c:1646 */ break; case 4: #line 264 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 2543 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2551 "bison_parser.cpp" /* yacc.c:1646 */ break; case 5: @@ -2548,7 +2556,7 @@ yyreduce: (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2552 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2560 "bison_parser.cpp" /* yacc.c:1646 */ break; case 6: @@ -2557,7 +2565,7 @@ yyreduce: (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2561 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2569 "bison_parser.cpp" /* yacc.c:1646 */ break; case 7: @@ -2565,85 +2573,85 @@ yyreduce: { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 2569 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2577 "bison_parser.cpp" /* yacc.c:1646 */ break; case 8: #line 283 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 2575 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2583 "bison_parser.cpp" /* yacc.c:1646 */ break; case 9: #line 284 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 2581 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2589 "bison_parser.cpp" /* yacc.c:1646 */ break; case 10: #line 285 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 2587 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2595 "bison_parser.cpp" /* yacc.c:1646 */ break; case 11: #line 286 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 2593 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2601 "bison_parser.cpp" /* yacc.c:1646 */ break; case 12: #line 287 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2599 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2607 "bison_parser.cpp" /* yacc.c:1646 */ break; case 13: #line 288 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2605 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2613 "bison_parser.cpp" /* yacc.c:1646 */ break; case 14: #line 289 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 2611 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2619 "bison_parser.cpp" /* yacc.c:1646 */ break; case 15: #line 290 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 2617 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2625 "bison_parser.cpp" /* yacc.c:1646 */ break; case 16: #line 291 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 2623 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2631 "bison_parser.cpp" /* yacc.c:1646 */ break; case 17: #line 300 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 2629 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2637 "bison_parser.cpp" /* yacc.c:1646 */ break; case 18: #line 301 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = nullptr; } -#line 2635 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2643 "bison_parser.cpp" /* yacc.c:1646 */ break; case 19: #line 306 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 2641 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2649 "bison_parser.cpp" /* yacc.c:1646 */ break; case 20: #line 307 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 2647 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2655 "bison_parser.cpp" /* yacc.c:1646 */ break; case 21: @@ -2652,7 +2660,7 @@ yyreduce: (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 2656 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2664 "bison_parser.cpp" /* yacc.c:1646 */ break; case 22: @@ -2662,7 +2670,7 @@ yyreduce: (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 2666 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2674 "bison_parser.cpp" /* yacc.c:1646 */ break; case 23: @@ -2672,7 +2680,7 @@ yyreduce: (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 2676 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2684 "bison_parser.cpp" /* yacc.c:1646 */ break; case 25: @@ -2681,7 +2689,7 @@ yyreduce: (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 2685 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2693 "bison_parser.cpp" /* yacc.c:1646 */ break; case 26: @@ -2691,7 +2699,7 @@ yyreduce: (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 2695 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2703 "bison_parser.cpp" /* yacc.c:1646 */ break; case 27: @@ -2701,19 +2709,19 @@ yyreduce: (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->tableName = (yyvsp[0].sval); } -#line 2705 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2713 "bison_parser.cpp" /* yacc.c:1646 */ break; case 28: #line 361 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kImportCSV; } -#line 2711 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2719 "bison_parser.cpp" /* yacc.c:1646 */ break; case 29: #line 365 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 2717 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2725 "bison_parser.cpp" /* yacc.c:1646 */ break; case 30: @@ -2721,7 +2729,7 @@ yyreduce: { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 2725 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2733 "bison_parser.cpp" /* yacc.c:1646 */ break; case 31: @@ -2730,7 +2738,7 @@ yyreduce: (yyval.show_stmt) = new ShowStatement(kShowColumns); (yyval.show_stmt)->name = (yyvsp[0].sval); } -#line 2734 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2742 "bison_parser.cpp" /* yacc.c:1646 */ break; case 32: @@ -2741,7 +2749,7 @@ yyreduce: (yyval.create_stmt)->tableName = (yyvsp[-4].sval); (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 2745 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2753 "bison_parser.cpp" /* yacc.c:1646 */ break; case 33: @@ -2752,7 +2760,7 @@ yyreduce: (yyval.create_stmt)->tableName = (yyvsp[-3].sval); (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 2756 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2764 "bison_parser.cpp" /* yacc.c:1646 */ break; case 34: @@ -2764,31 +2772,31 @@ yyreduce: (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 2768 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2776 "bison_parser.cpp" /* yacc.c:1646 */ break; case 35: #line 413 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 2774 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2782 "bison_parser.cpp" /* yacc.c:1646 */ break; case 36: #line 414 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } -#line 2780 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2788 "bison_parser.cpp" /* yacc.c:1646 */ break; case 37: #line 418 "bison_parser.y" /* yacc.c:1646 */ { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 2786 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2794 "bison_parser.cpp" /* yacc.c:1646 */ break; case 38: #line 419 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 2792 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2800 "bison_parser.cpp" /* yacc.c:1646 */ break; case 39: @@ -2796,31 +2804,31 @@ yyreduce: { (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); } -#line 2800 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2808 "bison_parser.cpp" /* yacc.c:1646 */ break; case 40: #line 430 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2806 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2814 "bison_parser.cpp" /* yacc.c:1646 */ break; case 41: #line 431 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2812 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2820 "bison_parser.cpp" /* yacc.c:1646 */ break; case 42: #line 432 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::DOUBLE; } -#line 2818 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2826 "bison_parser.cpp" /* yacc.c:1646 */ break; case 43: #line 433 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::TEXT; } -#line 2824 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2832 "bison_parser.cpp" /* yacc.c:1646 */ break; case 44: @@ -2829,7 +2837,7 @@ yyreduce: (yyval.drop_stmt) = new DropStatement(kDropTable); (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2833 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2841 "bison_parser.cpp" /* yacc.c:1646 */ break; case 45: @@ -2838,7 +2846,7 @@ yyreduce: (yyval.drop_stmt) = new DropStatement(kDropView); (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2842 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2850 "bison_parser.cpp" /* yacc.c:1646 */ break; case 46: @@ -2847,7 +2855,7 @@ yyreduce: (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2851 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2859 "bison_parser.cpp" /* yacc.c:1646 */ break; case 47: @@ -2857,7 +2865,7 @@ yyreduce: (yyval.delete_stmt)->tableName = (yyvsp[-1].sval); (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 2861 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2869 "bison_parser.cpp" /* yacc.c:1646 */ break; case 48: @@ -2866,7 +2874,7 @@ yyreduce: (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->tableName = (yyvsp[0].sval); } -#line 2870 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2878 "bison_parser.cpp" /* yacc.c:1646 */ break; case 49: @@ -2877,7 +2885,7 @@ yyreduce: (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 2881 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2889 "bison_parser.cpp" /* yacc.c:1646 */ break; case 50: @@ -2888,19 +2896,19 @@ yyreduce: (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 2892 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2900 "bison_parser.cpp" /* yacc.c:1646 */ break; case 51: #line 499 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 2898 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2906 "bison_parser.cpp" /* yacc.c:1646 */ break; case 52: #line 500 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = nullptr; } -#line 2904 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2912 "bison_parser.cpp" /* yacc.c:1646 */ break; case 53: @@ -2911,19 +2919,19 @@ yyreduce: (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 2915 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2923 "bison_parser.cpp" /* yacc.c:1646 */ break; case 54: #line 519 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 2921 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2929 "bison_parser.cpp" /* yacc.c:1646 */ break; case 55: #line 520 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 2927 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2935 "bison_parser.cpp" /* yacc.c:1646 */ break; case 56: @@ -2933,7 +2941,7 @@ yyreduce: (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 2937 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2945 "bison_parser.cpp" /* yacc.c:1646 */ break; case 59: @@ -2952,19 +2960,19 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2956 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2964 "bison_parser.cpp" /* yacc.c:1646 */ break; case 60: #line 555 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2962 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2970 "bison_parser.cpp" /* yacc.c:1646 */ break; case 61: #line 556 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2968 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2976 "bison_parser.cpp" /* yacc.c:1646 */ break; case 64: @@ -2979,7 +2987,7 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2983 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2991 "bison_parser.cpp" /* yacc.c:1646 */ break; case 65: @@ -2998,7 +3006,7 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3002 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3010 "bison_parser.cpp" /* yacc.c:1646 */ break; case 72: @@ -3012,37 +3020,37 @@ yyreduce: (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3016 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3024 "bison_parser.cpp" /* yacc.c:1646 */ break; case 73: #line 619 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 3022 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3030 "bison_parser.cpp" /* yacc.c:1646 */ break; case 74: #line 620 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } -#line 3028 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3036 "bison_parser.cpp" /* yacc.c:1646 */ break; case 76: #line 628 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = (yyvsp[0].table); } -#line 3034 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3042 "bison_parser.cpp" /* yacc.c:1646 */ break; case 77: #line 633 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[0].expr); } -#line 3040 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3048 "bison_parser.cpp" /* yacc.c:1646 */ break; case 78: #line 634 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = nullptr; } -#line 3046 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3054 "bison_parser.cpp" /* yacc.c:1646 */ break; case 79: @@ -3052,127 +3060,127 @@ yyreduce: (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3056 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3064 "bison_parser.cpp" /* yacc.c:1646 */ break; case 80: #line 643 "bison_parser.y" /* yacc.c:1646 */ { (yyval.group_t) = nullptr; } -#line 3062 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3070 "bison_parser.cpp" /* yacc.c:1646 */ break; case 81: #line 647 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[0].expr); } -#line 3068 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3076 "bison_parser.cpp" /* yacc.c:1646 */ break; case 82: #line 648 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = nullptr; } -#line 3074 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3082 "bison_parser.cpp" /* yacc.c:1646 */ break; case 83: #line 651 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3080 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3088 "bison_parser.cpp" /* yacc.c:1646 */ break; case 84: #line 652 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_vec) = nullptr; } -#line 3086 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3094 "bison_parser.cpp" /* yacc.c:1646 */ break; case 85: #line 656 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3092 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3100 "bison_parser.cpp" /* yacc.c:1646 */ break; case 86: #line 657 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3098 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3106 "bison_parser.cpp" /* yacc.c:1646 */ break; case 87: #line 661 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3104 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3112 "bison_parser.cpp" /* yacc.c:1646 */ break; case 88: #line 665 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderAsc; } -#line 3110 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3118 "bison_parser.cpp" /* yacc.c:1646 */ break; case 89: #line 666 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderDesc; } -#line 3116 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3124 "bison_parser.cpp" /* yacc.c:1646 */ break; case 90: #line 667 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderAsc; } -#line 3122 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3130 "bison_parser.cpp" /* yacc.c:1646 */ break; case 91: #line 673 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3128 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3136 "bison_parser.cpp" /* yacc.c:1646 */ break; case 92: #line 674 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = nullptr; } -#line 3134 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3142 "bison_parser.cpp" /* yacc.c:1646 */ break; case 93: #line 678 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3140 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3148 "bison_parser.cpp" /* yacc.c:1646 */ break; case 94: #line 679 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } -#line 3146 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3154 "bison_parser.cpp" /* yacc.c:1646 */ break; case 95: #line 680 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = nullptr; } -#line 3152 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3160 "bison_parser.cpp" /* yacc.c:1646 */ break; case 96: #line 687 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3158 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3166 "bison_parser.cpp" /* yacc.c:1646 */ break; case 97: #line 688 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3164 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3172 "bison_parser.cpp" /* yacc.c:1646 */ break; case 98: #line 692 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3170 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3178 "bison_parser.cpp" /* yacc.c:1646 */ break; case 99: #line 693 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3176 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3184 "bison_parser.cpp" /* yacc.c:1646 */ break; case 100: @@ -3181,283 +3189,283 @@ yyreduce: (yyval.expr) = (yyvsp[-1].expr); (yyval.expr)->alias = (yyvsp[0].sval); } -#line 3185 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3193 "bison_parser.cpp" /* yacc.c:1646 */ break; case 106: #line 712 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); } -#line 3191 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3199 "bison_parser.cpp" /* yacc.c:1646 */ break; case 114: #line 720 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3197 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3205 "bison_parser.cpp" /* yacc.c:1646 */ break; case 117: #line 729 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3203 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3211 "bison_parser.cpp" /* yacc.c:1646 */ break; case 118: #line 730 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3209 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3217 "bison_parser.cpp" /* yacc.c:1646 */ break; case 119: #line 731 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 3215 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3223 "bison_parser.cpp" /* yacc.c:1646 */ break; case 120: #line 732 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 3221 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3229 "bison_parser.cpp" /* yacc.c:1646 */ break; case 121: #line 733 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 3227 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3235 "bison_parser.cpp" /* yacc.c:1646 */ break; case 123: #line 738 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 3233 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3241 "bison_parser.cpp" /* yacc.c:1646 */ break; case 124: #line 739 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 3239 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3247 "bison_parser.cpp" /* yacc.c:1646 */ break; case 125: #line 740 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 3245 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3253 "bison_parser.cpp" /* yacc.c:1646 */ break; case 126: #line 741 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 3251 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3259 "bison_parser.cpp" /* yacc.c:1646 */ break; case 127: #line 742 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 3257 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3265 "bison_parser.cpp" /* yacc.c:1646 */ break; case 128: #line 743 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 3263 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3271 "bison_parser.cpp" /* yacc.c:1646 */ break; case 129: #line 744 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 3269 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3277 "bison_parser.cpp" /* yacc.c:1646 */ break; case 130: #line 745 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 3275 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3283 "bison_parser.cpp" /* yacc.c:1646 */ break; case 131: #line 746 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 3281 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3289 "bison_parser.cpp" /* yacc.c:1646 */ break; case 132: #line 747 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 3287 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3295 "bison_parser.cpp" /* yacc.c:1646 */ break; case 133: #line 751 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 3293 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3301 "bison_parser.cpp" /* yacc.c:1646 */ break; case 134: #line 752 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 3299 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3307 "bison_parser.cpp" /* yacc.c:1646 */ break; case 135: #line 756 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 3305 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3313 "bison_parser.cpp" /* yacc.c:1646 */ break; case 136: #line 757 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 3311 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3319 "bison_parser.cpp" /* yacc.c:1646 */ break; case 137: #line 758 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 3317 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3325 "bison_parser.cpp" /* yacc.c:1646 */ break; case 138: #line 759 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 3323 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3331 "bison_parser.cpp" /* yacc.c:1646 */ break; case 139: #line 764 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3329 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3337 "bison_parser.cpp" /* yacc.c:1646 */ break; case 140: #line 766 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3335 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3343 "bison_parser.cpp" /* yacc.c:1646 */ break; case 141: #line 770 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 3341 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3349 "bison_parser.cpp" /* yacc.c:1646 */ break; case 142: #line 771 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 3347 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3355 "bison_parser.cpp" /* yacc.c:1646 */ break; case 143: #line 775 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 3353 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3361 "bison_parser.cpp" /* yacc.c:1646 */ break; case 144: #line 776 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 3359 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3367 "bison_parser.cpp" /* yacc.c:1646 */ break; case 145: #line 777 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 3365 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3373 "bison_parser.cpp" /* yacc.c:1646 */ break; case 146: #line 778 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 3371 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3379 "bison_parser.cpp" /* yacc.c:1646 */ break; case 147: #line 779 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 3377 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3385 "bison_parser.cpp" /* yacc.c:1646 */ break; case 148: #line 780 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 3383 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3391 "bison_parser.cpp" /* yacc.c:1646 */ break; case 149: #line 784 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 3389 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3397 "bison_parser.cpp" /* yacc.c:1646 */ break; case 150: #line 785 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 3395 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3403 "bison_parser.cpp" /* yacc.c:1646 */ break; case 151: #line 789 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 3401 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3409 "bison_parser.cpp" /* yacc.c:1646 */ break; case 152: #line 793 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 3407 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3415 "bison_parser.cpp" /* yacc.c:1646 */ break; case 153: #line 797 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3413 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3421 "bison_parser.cpp" /* yacc.c:1646 */ break; case 154: #line 801 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 3419 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3427 "bison_parser.cpp" /* yacc.c:1646 */ break; case 155: #line 802 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 3425 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3433 "bison_parser.cpp" /* yacc.c:1646 */ break; case 156: #line 803 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar(); } -#line 3431 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3439 "bison_parser.cpp" /* yacc.c:1646 */ break; case 157: #line 804 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 3437 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3445 "bison_parser.cpp" /* yacc.c:1646 */ break; case 162: #line 815 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 3443 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3451 "bison_parser.cpp" /* yacc.c:1646 */ break; case 163: #line 820 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 3449 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3457 "bison_parser.cpp" /* yacc.c:1646 */ break; case 165: #line 825 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 3455 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3463 "bison_parser.cpp" /* yacc.c:1646 */ break; case 166: #line 829 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeNullLiteral(); } -#line 3461 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3469 "bison_parser.cpp" /* yacc.c:1646 */ break; case 167: @@ -3467,7 +3475,7 @@ yyreduce: (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 3471 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3479 "bison_parser.cpp" /* yacc.c:1646 */ break; case 169: @@ -3478,7 +3486,7 @@ yyreduce: tbl->list = (yyvsp[0].table_vec); (yyval.table) = tbl; } -#line 3482 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3490 "bison_parser.cpp" /* yacc.c:1646 */ break; case 173: @@ -3489,19 +3497,19 @@ yyreduce: tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3493 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3501 "bison_parser.cpp" /* yacc.c:1646 */ break; case 174: #line 871 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 3499 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3507 "bison_parser.cpp" /* yacc.c:1646 */ break; case 175: #line 872 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 3505 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3513 "bison_parser.cpp" /* yacc.c:1646 */ break; case 176: @@ -3512,7 +3520,7 @@ yyreduce: tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3516 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3524 "bison_parser.cpp" /* yacc.c:1646 */ break; case 177: @@ -3521,25 +3529,25 @@ yyreduce: (yyval.table) = new TableRef(kTableName); (yyval.table)->name = (yyvsp[0].sval); } -#line 3525 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3533 "bison_parser.cpp" /* yacc.c:1646 */ break; case 179: #line 896 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = (yyvsp[0].sval); } -#line 3531 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3539 "bison_parser.cpp" /* yacc.c:1646 */ break; case 180: #line 901 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = (yyvsp[0].sval); } -#line 3537 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3545 "bison_parser.cpp" /* yacc.c:1646 */ break; case 183: #line 907 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = nullptr; } -#line 3543 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3551 "bison_parser.cpp" /* yacc.c:1646 */ break; case 184: @@ -3551,7 +3559,7 @@ yyreduce: (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 3555 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3563 "bison_parser.cpp" /* yacc.c:1646 */ break; case 185: @@ -3564,7 +3572,7 @@ yyreduce: (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 3568 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3576 "bison_parser.cpp" /* yacc.c:1646 */ break; case 186: @@ -3584,71 +3592,71 @@ yyreduce: (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 3588 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3596 "bison_parser.cpp" /* yacc.c:1646 */ break; case 187: #line 952 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinInner; } -#line 3594 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3602 "bison_parser.cpp" /* yacc.c:1646 */ break; case 188: #line 953 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinOuter; } -#line 3600 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3608 "bison_parser.cpp" /* yacc.c:1646 */ break; case 189: #line 954 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinLeftOuter; } -#line 3606 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3614 "bison_parser.cpp" /* yacc.c:1646 */ break; case 190: #line 955 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinRightOuter; } -#line 3612 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3620 "bison_parser.cpp" /* yacc.c:1646 */ break; case 191: #line 956 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinLeft; } -#line 3618 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3626 "bison_parser.cpp" /* yacc.c:1646 */ break; case 192: #line 957 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinRight; } -#line 3624 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3632 "bison_parser.cpp" /* yacc.c:1646 */ break; case 193: #line 958 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinCross; } -#line 3630 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3638 "bison_parser.cpp" /* yacc.c:1646 */ break; case 194: #line 959 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinInner; } -#line 3636 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3644 "bison_parser.cpp" /* yacc.c:1646 */ break; case 198: #line 979 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 3642 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3650 "bison_parser.cpp" /* yacc.c:1646 */ break; case 199: #line 980 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 3648 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3656 "bison_parser.cpp" /* yacc.c:1646 */ break; -#line 3652 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3660 "bison_parser.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index d498bb3..8fd6a5b 100644 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -521,7 +521,7 @@ update_clause_commalist: ; update_clause: - IDENTIFIER '=' literal { + IDENTIFIER '=' expr { $$ = new UpdateClause(); $$->column = $1; $$->value = $3; From 1922210f70efabc1b0e6baf15fec4446b4f12886 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 13 Sep 2017 17:37:31 +0800 Subject: [PATCH 09/19] 1. add scheme name support for tables names 2. add IF EXIST support for DROP TABLE/VIEW 3. fix memory free bug: delete -> free 4. add features in sqlhelper.cpp --- src/parser/bison_parser.cpp | 2231 ++++++++++++++++++----------------- src/parser/bison_parser.h | 5 +- src/parser/bison_parser.y | 68 +- src/parser/flex_lexer.cpp | 254 ++-- src/parser/flex_lexer.h | 61 +- src/sql/CreateStatement.h | 5 +- src/sql/DeleteStatement.h | 1 + src/sql/DropStatement.h | 2 + src/sql/ImportStatement.h | 5 +- src/sql/InsertStatement.h | 1 + src/sql/ShowStatement.h | 1 + src/sql/Table.h | 5 + src/sql/statements.cpp | 16 +- src/util/sqlhelper.cpp | 29 +- 14 files changed, 1390 insertions(+), 1294 deletions(-) mode change 100644 => 100755 src/parser/bison_parser.y mode change 100644 => 100755 src/sql/CreateStatement.h mode change 100644 => 100755 src/sql/DeleteStatement.h mode change 100644 => 100755 src/sql/DropStatement.h mode change 100644 => 100755 src/sql/ImportStatement.h mode change 100644 => 100755 src/sql/InsertStatement.h mode change 100644 => 100755 src/sql/ShowStatement.h mode change 100644 => 100755 src/sql/Table.h mode change 100644 => 100755 src/sql/statements.cpp mode change 100644 => 100755 src/util/sqlhelper.cpp diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 6cbaf04..c8af8a9 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -325,7 +325,8 @@ union HSQL_STYPE hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; - + + hsql::TableName table_n; hsql::TableRef* table; hsql::Expr* expr; hsql::OrderDescription* order; @@ -344,7 +345,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; -#line 348 "bison_parser.cpp" /* yacc.c:355 */ +#line 349 "bison_parser.cpp" /* yacc.c:355 */ }; typedef union HSQL_STYPE HSQL_STYPE; @@ -374,7 +375,7 @@ int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); /* Copy the second part of user declarations. */ -#line 378 "bison_parser.cpp" /* yacc.c:358 */ +#line 379 "bison_parser.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -618,16 +619,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 52 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 574 +#define YYLAST 552 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 151 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 86 +#define YYNNTS 87 /* YYNRULES -- Number of rules. */ -#define YYNRULES 199 +#define YYNRULES 202 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 367 +#define YYNSTATES 371 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -686,26 +687,27 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 242, 242, 263, 264, 268, 272, 276, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 300, 301, 306, - 307, 311, 315, 327, 334, 337, 341, 353, 361, 365, - 375, 378, 391, 397, 403, 413, 414, 418, 419, 423, - 430, 431, 432, 433, 443, 447, 451, 463, 471, 483, - 489, 499, 500, 510, 519, 520, 524, 536, 537, 538, - 555, 556, 560, 561, 565, 575, 592, 596, 597, 598, - 602, 603, 607, 619, 620, 624, 628, 633, 634, 638, - 643, 647, 648, 651, 652, 656, 657, 661, 665, 666, - 667, 673, 674, 678, 679, 680, 687, 688, 692, 693, - 697, 704, 705, 706, 707, 708, 712, 713, 714, 715, - 716, 717, 718, 719, 720, 724, 725, 729, 730, 731, - 732, 733, 737, 738, 739, 740, 741, 742, 743, 744, - 745, 746, 747, 751, 752, 756, 757, 758, 759, 764, - 766, 770, 771, 775, 776, 777, 778, 779, 780, 784, - 785, 789, 793, 797, 801, 802, 803, 804, 808, 809, - 810, 811, 815, 820, 821, 825, 829, 833, 845, 846, - 856, 857, 861, 862, 871, 872, 877, 887, 895, 896, - 901, 902, 906, 907, 915, 923, 933, 952, 953, 954, - 955, 956, 957, 958, 959, 964, 973, 974, 979, 980 + 0, 244, 244, 265, 266, 270, 274, 278, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 302, 303, 308, + 309, 313, 317, 329, 336, 339, 343, 355, 364, 368, + 378, 381, 395, 402, 409, 420, 421, 425, 426, 430, + 437, 438, 439, 440, 450, 456, 462, 470, 471, 480, + 489, 502, 509, 520, 521, 531, 540, 541, 545, 557, + 558, 559, 576, 577, 581, 582, 586, 596, 613, 617, + 618, 619, 623, 624, 628, 640, 641, 645, 649, 650, + 655, 656, 660, 665, 669, 670, 673, 674, 678, 679, + 683, 687, 688, 689, 695, 696, 700, 701, 702, 709, + 710, 714, 715, 719, 726, 727, 728, 729, 730, 734, + 735, 736, 737, 738, 739, 740, 741, 742, 746, 747, + 751, 752, 753, 754, 755, 759, 760, 761, 762, 763, + 764, 765, 766, 767, 768, 769, 773, 774, 778, 779, + 780, 781, 786, 788, 792, 793, 797, 798, 799, 800, + 801, 802, 806, 807, 811, 815, 819, 823, 824, 825, + 826, 830, 831, 832, 833, 837, 842, 843, 847, 851, + 855, 867, 868, 878, 879, 883, 884, 893, 894, 899, + 910, 919, 920, 925, 926, 930, 931, 939, 947, 957, + 976, 977, 978, 979, 980, 981, 982, 983, 988, 997, + 998, 1003, 1004 }; #endif @@ -738,12 +740,12 @@ static const char *const yytname[] = "prepare_statement", "prepare_target_query", "execute_statement", "import_statement", "import_file_type", "file_path", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", - "column_def", "column_type", "drop_statement", "delete_statement", - "truncate_statement", "insert_statement", "opt_column_list", - "update_statement", "update_clause_commalist", "update_clause", - "select_statement", "select_with_paren", "select_paren_or_clause", - "select_no_paren", "set_operator", "set_type", "opt_all", - "select_clause", "opt_distinct", "select_list", "from_clause", + "column_def", "column_type", "drop_statement", "opt_exists", + "delete_statement", "truncate_statement", "insert_statement", + "opt_column_list", "update_statement", "update_clause_commalist", + "update_clause", "select_statement", "select_with_paren", + "select_paren_or_clause", "select_no_paren", "set_operator", "set_type", + "opt_all", "select_clause", "opt_distinct", "select_list", "from_clause", "opt_where", "opt_group", "opt_having", "opt_order", "order_list", "order_desc", "opt_order_type", "opt_top", "opt_limit", "expr_list", "literal_list", "expr_alias", "expr", "operand", "scalar_expr", @@ -782,57 +784,58 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -231 +#define YYPACT_NINF -232 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-231))) + (!!((Yystate) == (-232))) -#define YYTABLE_NINF -195 +#define YYTABLE_NINF -198 #define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-195))) + (!!((Yytable_value) == (-198))) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { - 231, -3, 32, 33, 50, -30, 15, 22, 10, 34, - 32, -28, 9, -34, 115, 16, -231, 66, 66, -231, - -231, -231, -231, -231, -231, -231, -231, -231, -231, 20, - -231, 12, 160, 23, -231, 24, 96, 68, 68, 32, - 94, 32, 206, 205, 112, -231, 32, 32, 32, -231, - 78, 83, -231, 231, -231, 150, -231, -231, -231, -231, - -231, -34, 134, 125, -34, 178, -231, 242, 7, 245, - 141, 32, 32, 184, -231, 179, 123, -231, -231, -231, - 81, 257, -231, -231, -231, -231, -231, -231, 126, -231, - 210, -231, -231, -231, 81, 210, 206, -231, -231, -231, - -231, -231, -231, 29, -231, -231, -231, -231, -231, -231, - -231, -231, 232, -64, 123, 81, -231, 275, 278, -17, - 8, 133, 195, 146, 139, 177, -231, 70, 213, 148, - -231, 74, 211, -231, -231, -231, -231, -231, -231, -231, - -231, -231, -231, -231, -231, -231, -231, 169, -50, -231, - 295, 178, 152, -231, -59, 178, 259, -231, 7, -231, - 191, 304, 194, -53, 225, -231, -231, 48, 166, -231, - 2, 4, 268, 81, 173, 177, 377, 81, 149, 180, - -76, 13, 184, 81, -231, 81, 320, 81, -231, -231, - 177, -231, 177, -63, 176, 14, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 206, 81, 257, -231, 185, 54, -231, -231, 81, -231, - -231, -231, -231, 206, -231, 252, -6, 56, -231, -34, - 32, -231, 322, 7, -231, 81, -231, -231, 187, -39, - 268, 246, -32, -231, -231, -34, -231, 40, -231, -231, - 6, -231, 282, -231, -231, -231, 236, 318, 405, 177, - 198, 70, -231, 256, 212, 405, 405, 405, 431, 431, - 431, 431, 149, 149, -91, -91, -91, 30, 214, -53, - -231, 7, -231, 295, -231, -231, 275, -231, -231, -231, - -231, -231, -231, 304, -231, -231, -231, 60, 64, -231, - 177, 215, -231, 219, 270, -231, -231, -231, 289, 291, - 13, 280, -231, 253, -231, 177, 405, 70, 221, 65, - -231, -231, 76, -231, -231, -231, -231, -231, 274, -231, - 6, 13, -231, -231, 175, 220, 13, 81, 377, 224, - 93, -231, -231, -231, 177, -231, -231, -231, 13, 244, - -5, -231, -231, 344, 175, 226, 81, 81, -231, -231, - 5, -53, -231, -53, 227, 229, -231 + 268, 42, 35, 73, 110, -43, -30, 39, 41, 32, + 35, 30, 11, -39, 147, 3, -232, 82, 82, -232, + -232, -232, -232, -232, -232, -232, -232, -232, -232, 28, + -232, 27, 169, 49, -232, 56, 126, 100, 100, 35, + 117, 35, 226, 205, 123, -232, 128, 128, 35, -232, + 101, 103, -232, 268, -232, 170, -232, -232, -232, -232, + -232, -39, 152, 144, -39, 194, -232, 258, 14, 261, + 159, 35, 35, 196, -232, 190, 127, -232, -232, -232, + 151, 270, 231, 35, 35, -232, -232, -232, -232, 131, + -232, 212, -232, -232, -232, 151, 212, 226, -232, -232, + -232, -232, -232, -232, -44, -232, -232, -232, -232, -232, + -232, -232, -232, 241, -56, 127, 151, -232, 280, 279, + -16, -84, 140, 188, 155, 161, 75, -232, 113, 213, + 157, -232, 65, 211, -232, -232, -232, -232, -232, -232, + -232, -232, -232, -232, -232, -232, -232, -232, 181, -61, + -232, -232, -232, -232, 306, 194, 164, -232, -46, 194, + 264, -232, 14, -232, 202, 315, 207, -78, 234, -232, + -232, -37, 179, -232, 2, 5, 276, 151, 185, 75, + 381, 151, 99, 180, -86, 4, 196, 151, -232, 151, + 324, 151, -232, -232, 75, -232, 75, -47, 186, -62, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 226, 151, 270, -232, 187, 34, + -232, -232, 151, -232, -232, -232, -232, 226, -232, 253, + 7, 48, -232, -39, 35, -232, 331, 14, -232, 151, + -232, -232, 192, -50, 276, 254, 26, -232, -232, -39, + -232, 24, -232, -232, 10, -232, 283, -232, -232, -232, + 256, 322, 409, 75, 210, 113, -232, 266, 217, 409, + 409, 409, 235, 235, 235, 235, 99, 99, -95, -95, + -95, 50, 218, -78, -232, 14, -232, 306, -232, -232, + 280, -232, -232, -232, -232, -232, -232, 315, -232, -232, + -232, 53, 59, -232, 75, 224, -232, 233, 277, -232, + -232, -232, 309, 312, 4, 295, -232, 267, -232, 75, + 409, 113, 238, 60, -232, -232, 69, -232, -232, -232, + -232, -232, 278, -232, 10, 4, -232, -232, 229, 236, + 4, 151, 381, 240, 78, -232, -232, -232, 75, -232, + -232, -232, 4, 142, -27, -232, -232, 348, 229, 243, + 151, 151, -232, -232, 6, -78, -232, -78, 242, 244, + -232 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -840,71 +843,72 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, - 0, 0, 0, 0, 0, 197, 3, 18, 18, 16, - 9, 7, 10, 15, 12, 13, 11, 14, 8, 57, - 58, 84, 0, 178, 48, 25, 0, 36, 36, 0, - 0, 0, 0, 74, 0, 177, 0, 0, 0, 30, - 0, 0, 1, 196, 2, 0, 6, 5, 68, 69, - 67, 0, 71, 0, 0, 95, 46, 0, 0, 0, - 0, 0, 0, 78, 28, 0, 52, 165, 91, 73, - 0, 0, 44, 45, 31, 61, 60, 4, 0, 62, - 84, 63, 70, 66, 0, 84, 0, 64, 179, 162, - 163, 166, 167, 0, 98, 158, 159, 164, 160, 161, - 24, 23, 0, 0, 52, 0, 47, 0, 0, 0, - 154, 0, 0, 0, 0, 0, 156, 0, 0, 75, - 96, 183, 101, 108, 109, 110, 103, 105, 111, 104, - 122, 112, 113, 107, 102, 115, 116, 0, 78, 54, - 0, 95, 83, 85, 90, 95, 93, 26, 0, 35, - 0, 0, 0, 77, 0, 29, 198, 0, 0, 50, - 74, 0, 0, 0, 0, 0, 118, 0, 117, 0, - 0, 0, 78, 0, 181, 0, 0, 0, 182, 100, - 0, 119, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, + 0, 0, 0, 0, 0, 200, 3, 18, 18, 16, + 9, 7, 10, 15, 12, 13, 11, 14, 8, 59, + 60, 87, 0, 181, 50, 25, 0, 36, 36, 0, + 0, 0, 0, 76, 0, 180, 48, 48, 0, 30, + 0, 0, 1, 199, 2, 0, 6, 5, 70, 71, + 69, 0, 73, 0, 0, 98, 46, 0, 0, 0, + 0, 0, 0, 81, 28, 0, 54, 168, 94, 75, + 0, 0, 0, 0, 0, 31, 63, 62, 4, 0, + 64, 87, 65, 72, 68, 0, 87, 0, 66, 182, + 165, 166, 169, 170, 0, 101, 161, 162, 167, 163, + 164, 24, 23, 0, 0, 54, 0, 49, 0, 0, + 0, 157, 0, 0, 0, 0, 0, 159, 0, 79, + 77, 99, 186, 104, 111, 112, 113, 106, 108, 114, + 107, 125, 115, 116, 110, 105, 118, 119, 0, 81, + 56, 47, 44, 45, 0, 98, 86, 88, 93, 98, + 96, 26, 0, 35, 0, 0, 0, 80, 0, 29, + 201, 0, 0, 52, 76, 0, 0, 0, 0, 0, + 121, 0, 120, 0, 0, 0, 81, 0, 184, 0, + 0, 0, 185, 103, 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 53, 21, 0, 19, 59, 0, 89, - 88, 87, 65, 0, 99, 0, 0, 0, 37, 0, - 0, 51, 0, 0, 149, 0, 155, 157, 0, 0, - 0, 0, 0, 114, 106, 0, 76, 168, 170, 172, - 183, 171, 80, 97, 133, 180, 134, 0, 129, 0, - 0, 0, 120, 0, 132, 131, 143, 144, 145, 146, - 147, 148, 124, 123, 126, 125, 127, 128, 0, 56, - 55, 0, 17, 0, 86, 94, 0, 41, 42, 43, - 40, 39, 33, 0, 34, 27, 199, 0, 0, 141, - 0, 0, 151, 0, 0, 193, 187, 188, 192, 191, - 0, 0, 176, 0, 72, 0, 130, 0, 0, 0, - 121, 152, 0, 20, 32, 38, 49, 150, 0, 142, - 183, 0, 190, 189, 174, 169, 0, 0, 153, 0, - 0, 137, 135, 22, 0, 139, 173, 184, 0, 194, - 82, 138, 136, 0, 175, 0, 0, 0, 79, 140, - 0, 195, 185, 81, 154, 0, 186 + 0, 0, 0, 0, 0, 0, 0, 55, 21, 0, + 19, 61, 0, 92, 91, 90, 67, 0, 102, 0, + 0, 0, 37, 0, 0, 53, 0, 0, 152, 0, + 158, 160, 0, 0, 0, 0, 0, 117, 109, 0, + 78, 171, 173, 175, 186, 174, 83, 100, 136, 183, + 137, 0, 132, 0, 0, 0, 123, 0, 135, 134, + 146, 147, 148, 149, 150, 151, 127, 126, 129, 128, + 130, 131, 0, 58, 57, 0, 17, 0, 89, 97, + 0, 41, 42, 43, 40, 39, 33, 0, 34, 27, + 202, 0, 0, 144, 0, 0, 154, 0, 0, 196, + 190, 191, 195, 194, 0, 0, 179, 0, 74, 0, + 133, 0, 0, 0, 124, 155, 0, 20, 32, 38, + 51, 153, 0, 145, 186, 0, 193, 192, 177, 172, + 0, 0, 156, 0, 0, 140, 138, 22, 0, 142, + 176, 187, 0, 197, 85, 141, 139, 0, 178, 0, + 0, 0, 82, 143, 0, 198, 188, 84, 157, 0, + 189 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -231, -231, -231, 307, -231, 354, -231, 90, -231, -231, - -231, -231, -231, 91, -231, -231, 340, -231, 87, -231, - -231, -231, -231, -231, 267, -231, -231, 170, -140, 52, - 321, -13, 353, -231, -231, 190, 216, -231, -231, -121, - -231, -231, 72, -231, 172, -231, -231, 41, -171, -203, - 204, -93, -68, -231, -231, -231, -231, -231, -231, -231, - -231, -231, -231, -231, -231, 28, -65, -112, -231, -38, - -231, -231, -231, -149, 62, -231, -231, -231, 0, -231, - -230, -231, -231, -231, -231, -231 + -232, -232, -232, 338, -232, 374, -232, 107, -232, -232, + -232, -232, -232, 105, -232, -232, 359, -232, 102, -232, + -232, 351, -232, -232, -232, 285, -232, -232, 189, -64, + 13, 337, -13, 378, -232, -232, 182, 246, -232, -232, + -128, -232, -232, 91, -232, 200, -232, -232, -68, -175, + -220, 245, -94, -71, -232, -232, -232, -232, -232, -232, + -232, -232, -232, -232, -232, -232, 61, -66, -113, -232, + -38, -232, -232, -232, -162, 88, -232, -232, -232, 1, + -232, -231, -232, -232, -232, -232, -232 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 14, 15, 16, 17, 56, 215, 216, 18, 111, - 19, 20, 75, 164, 21, 22, 71, 227, 228, 291, - 23, 24, 25, 26, 119, 27, 148, 149, 28, 29, - 90, 30, 61, 62, 93, 31, 80, 128, 182, 116, - 314, 358, 65, 152, 153, 221, 43, 97, 129, 103, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 105, 106, 107, - 108, 109, 246, 247, 248, 335, 249, 44, 250, 188, - 189, 251, 311, 362, 54, 167 + -1, 14, 15, 16, 17, 56, 219, 220, 18, 112, + 19, 20, 75, 168, 21, 22, 71, 231, 232, 295, + 23, 83, 24, 25, 26, 120, 27, 149, 150, 28, + 29, 91, 30, 61, 62, 94, 31, 80, 129, 186, + 117, 318, 362, 65, 156, 157, 225, 43, 98, 130, + 104, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 106, 107, + 108, 109, 110, 250, 251, 252, 339, 253, 44, 254, + 192, 193, 255, 315, 366, 54, 171 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -912,126 +916,122 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 51, 154, 34, 104, 78, 165, 242, 236, 364, 184, - 45, 99, 100, 77, 79, 9, 33, 160, 219, 287, - 312, 58, 163, 115, 32, 259, 185, 213, 48, 58, - 297, 288, 9, 196, 180, 33, 35, 357, 168, 73, - 37, 76, 46, 185, 220, 187, 82, 83, 84, 185, - 209, 59, 210, 36, 260, 176, 300, 178, 156, 59, - 49, 252, 187, 185, 298, 50, 304, 38, 187, 47, - 244, 113, 114, 120, 99, 100, 77, 184, 322, 63, - 239, 161, 187, 60, 120, 99, 100, 77, 289, 294, - 319, 60, 254, 224, 256, 41, 39, 101, 305, 212, - 346, 290, 306, 40, 262, 303, 169, 176, 307, 308, - 121, 13, 302, 89, 179, 52, 89, 183, 279, 9, - 186, 121, 257, 263, 258, 154, -194, 309, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 237, 126, 183, 122, 340, 42, 234, 120, - 99, 100, 77, 170, 196, 171, 122, 102, 245, 238, - 101, 334, 151, 66, 53, 55, 350, 155, 104, 68, - 67, 101, 278, 210, 165, 157, 185, 69, 158, 123, - 120, 99, 100, 77, 70, 285, 174, 349, 186, 310, - 123, 316, 217, 124, 231, 187, 222, 232, 74, 354, - 282, 304, 292, 283, 124, 293, 326, 125, 126, 158, - 327, 342, 77, 183, 183, 127, 104, 79, 125, 126, - 102, 122, 343, 81, 85, 158, 127, 301, 190, 86, - 295, 102, 328, 305, 88, 92, 101, 306, 1, 352, - 94, 96, 183, 307, 308, 98, 2, 338, 318, 110, - 112, 91, 122, 3, 91, 175, 191, 115, 4, 117, - 147, -194, 309, 361, 363, 5, 6, 101, 118, 124, - 304, 150, 159, 196, 7, 8, 353, 63, 172, 99, - 9, 166, 177, 125, 126, 10, 175, 206, 207, 208, - 209, 127, 210, 173, 181, 211, 102, 183, 214, 192, - 124, 218, 305, 225, 339, 223, 306, 226, 229, 11, - 230, 233, 307, 308, 125, 126, 355, 9, 240, 191, - 193, 261, 127, 255, 12, 296, 243, 102, 194, 195, - 281, 309, 286, 299, 259, 196, 197, 198, 185, 199, - 200, 201, 313, 317, 202, 203, 320, 204, 205, 206, - 207, 208, 209, 344, 210, 210, 331, 332, 321, 333, - 87, 329, 192, 191, 356, 330, 336, 341, 337, 348, - 351, 360, 57, 323, 171, 366, 13, 324, 72, 345, - 325, 162, 280, 241, 64, 95, 235, 253, 365, 191, - 284, 0, 195, 347, 0, 0, 0, 0, 196, 197, - 198, 0, 199, 200, 201, 0, 192, 202, 203, 0, - 204, 205, 206, 207, 208, 209, 0, 210, 0, 0, - 315, 0, 191, 0, 0, 0, 0, 241, 0, 0, - 0, 0, 192, 0, 0, 0, 195, 0, 0, 0, - 0, 0, 196, 197, 198, 0, 199, 200, 201, 359, - 191, 202, 203, 241, 204, 205, 206, 207, 208, 209, - 0, 210, 195, 0, 0, 192, 0, 0, 196, 197, - 198, 0, 199, 200, 201, 0, 191, 202, 203, 0, - 204, 205, 206, 207, 208, 209, 241, 210, 0, 0, - 0, 0, 0, -195, 0, 195, 0, 0, 0, 0, - 0, 196, 197, 198, 0, 199, 200, 201, 0, 0, - 202, 203, 0, 204, 205, 206, 207, 208, 209, 0, - 210, 0, 0, 195, 0, 0, 0, 0, 0, 196, - -195, -195, 0, -195, 200, 201, 0, 0, 202, 203, - 0, 204, 205, 206, 207, 208, 209, 0, 210, 195, - 0, 0, 0, 0, 0, 196, 0, 0, 0, 0, - -195, -195, 0, 0, -195, -195, 0, 204, 205, 206, - 207, 208, 209, 0, 210 + 51, 158, 105, 34, 78, 169, 246, 33, 240, 368, + 9, 45, 116, 188, 79, 361, 189, 301, 100, 101, + 77, 217, 167, 316, 189, 164, 50, 37, 266, 200, + 48, 223, 291, 9, 184, 191, 58, 58, 33, 172, + 73, 263, 76, 191, 292, 304, 213, 267, 214, 85, + 308, 39, 189, 180, 38, 182, 189, 224, 256, 160, + 248, 174, 49, 175, 302, 326, 59, 59, 188, 32, + 264, 191, 114, 115, 90, 191, 35, 90, 121, 100, + 101, 77, 309, 243, 152, 153, 310, 221, 216, 165, + 323, 226, 311, 312, 63, 258, 228, 260, 60, 60, + 46, 293, 161, 350, 102, 162, 13, 173, 180, 235, + -197, 313, 236, 36, 294, 183, 121, 100, 101, 77, + 40, 283, 187, 261, 190, 262, 41, 47, 158, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 241, 127, 42, 344, 52, 238, 249, + 123, 53, 338, 122, 121, 100, 101, 77, 121, 100, + 101, 77, 9, 242, 103, 102, 354, 189, 308, 298, + 306, 105, 66, 314, 200, 187, 282, 169, 353, 190, + 286, 55, 155, 287, 179, 307, 191, 159, 123, 289, + 358, 122, 320, 214, 296, 178, 67, 297, 125, 330, + 309, 68, 162, 102, 310, 331, 346, 69, 187, 187, + 311, 312, 126, 127, 359, 347, 70, 79, 162, 105, + 128, 74, 124, 200, 356, 103, 123, 187, 194, 313, + 123, 305, 77, 332, 81, 299, 125, 210, 211, 212, + 213, 102, 214, 92, 82, 102, 92, 86, 342, 87, + 126, 127, 322, 93, 89, 308, 195, 97, 128, 95, + 124, 99, 360, 103, 179, 111, 365, 367, 113, 116, + 118, 151, 119, 148, 125, 1, 154, 357, 125, 63, + 195, 163, 170, 2, 100, 176, 177, 309, 126, 127, + 3, 310, 126, 127, 185, 4, 128, 311, 312, 196, + 128, 103, 5, 6, 181, 103, 187, 215, 343, 218, + 227, 7, 8, 222, 229, -197, 313, 9, 230, 234, + 197, 233, 10, 195, 237, 9, 247, 259, 198, 199, + 244, 265, 285, 290, 300, 200, 201, 202, 303, 203, + 204, 205, 263, 317, 206, 207, 11, 208, 209, 210, + 211, 212, 213, 199, 214, 321, 324, 348, 189, 200, + 214, 12, 325, 335, -198, -198, 196, 195, -198, -198, + 333, 208, 209, 210, 211, 212, 213, 336, 214, 334, + 337, 340, 341, 349, 345, 352, 355, 245, 364, 175, + 370, 88, 57, 195, 327, 328, 199, 72, 84, 329, + 166, 96, 200, 201, 202, 284, 203, 204, 205, 64, + 196, 206, 207, 13, 208, 209, 210, 211, 212, 213, + 239, 214, 288, 351, 319, 369, 195, 0, 0, 0, + 0, 245, 257, 0, 0, 0, 196, 0, 0, 0, + 199, 0, 0, 0, 0, 0, 200, 201, 202, 0, + 203, 204, 205, 363, 195, 206, 207, 245, 208, 209, + 210, 211, 212, 213, 0, 214, 199, 0, 0, 196, + 0, 0, 200, 201, 202, 0, 203, 204, 205, 0, + 0, 206, 207, 0, 208, 209, 210, 211, 212, 213, + 245, 214, 0, 0, 0, 0, 0, -198, 0, 199, + 0, 0, 0, 0, 0, 200, 201, 202, 0, 203, + 204, 205, 0, 0, 206, 207, 0, 208, 209, 210, + 211, 212, 213, 0, 214, 0, 0, 199, 0, 0, + 0, 0, 0, 200, -198, -198, 0, -198, 204, 205, + 0, 0, 206, 207, 0, 208, 209, 210, 211, 212, + 213, 0, 214 }; static const yytype_int16 yycheck[] = { - 13, 94, 2, 68, 42, 117, 177, 3, 3, 3, - 10, 4, 5, 6, 12, 49, 3, 81, 77, 25, - 250, 9, 115, 73, 27, 88, 102, 148, 19, 9, - 233, 37, 49, 124, 127, 3, 3, 42, 55, 39, - 70, 41, 70, 102, 103, 121, 46, 47, 48, 102, - 141, 39, 143, 3, 117, 123, 95, 125, 96, 39, - 51, 182, 121, 102, 235, 13, 26, 97, 121, 97, - 146, 71, 72, 3, 4, 5, 6, 3, 281, 67, - 173, 145, 121, 71, 3, 4, 5, 6, 94, 229, - 261, 71, 185, 158, 187, 85, 81, 90, 58, 149, - 330, 107, 62, 81, 90, 245, 119, 175, 68, 69, - 40, 145, 144, 61, 127, 0, 64, 149, 211, 49, - 114, 40, 190, 109, 192, 218, 86, 87, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 138, 138, 149, 75, 317, 113, 146, 3, - 4, 5, 6, 145, 124, 147, 75, 150, 145, 172, - 90, 310, 90, 3, 148, 99, 337, 95, 233, 145, - 147, 90, 210, 143, 286, 146, 102, 81, 149, 109, - 3, 4, 5, 6, 116, 223, 40, 336, 114, 149, - 109, 259, 151, 123, 146, 121, 155, 149, 104, 348, - 146, 26, 146, 149, 123, 149, 146, 137, 138, 149, - 146, 146, 6, 149, 149, 145, 281, 12, 137, 138, - 150, 75, 146, 111, 146, 149, 145, 240, 17, 146, - 230, 150, 300, 58, 84, 101, 90, 62, 7, 146, - 115, 63, 149, 68, 69, 3, 15, 315, 261, 4, - 109, 61, 75, 22, 64, 109, 45, 73, 27, 80, - 3, 86, 87, 356, 357, 34, 35, 90, 145, 123, - 26, 145, 40, 124, 43, 44, 344, 67, 145, 4, - 49, 3, 143, 137, 138, 54, 109, 138, 139, 140, - 141, 145, 143, 98, 81, 126, 150, 149, 3, 88, - 123, 149, 58, 112, 317, 46, 62, 3, 114, 78, - 85, 145, 68, 69, 137, 138, 72, 49, 145, 45, - 109, 145, 145, 3, 93, 3, 146, 150, 117, 118, - 145, 87, 80, 146, 88, 124, 125, 126, 102, 128, - 129, 130, 60, 145, 133, 134, 90, 136, 137, 138, - 139, 140, 141, 79, 143, 143, 86, 68, 144, 68, - 53, 146, 88, 45, 120, 146, 86, 146, 115, 149, - 146, 145, 18, 283, 147, 146, 145, 286, 38, 105, - 293, 114, 212, 109, 31, 64, 170, 183, 360, 45, - 218, -1, 118, 331, -1, -1, -1, -1, 124, 125, - 126, -1, 128, 129, 130, -1, 88, 133, 134, -1, - 136, 137, 138, 139, 140, 141, -1, 143, -1, -1, - 102, -1, 45, -1, -1, -1, -1, 109, -1, -1, - -1, -1, 88, -1, -1, -1, 118, -1, -1, -1, - -1, -1, 124, 125, 126, -1, 128, 129, 130, 105, - 45, 133, 134, 109, 136, 137, 138, 139, 140, 141, - -1, 143, 118, -1, -1, 88, -1, -1, 124, 125, - 126, -1, 128, 129, 130, -1, 45, 133, 134, -1, - 136, 137, 138, 139, 140, 141, 109, 143, -1, -1, - -1, -1, -1, 88, -1, 118, -1, -1, -1, -1, - -1, 124, 125, 126, -1, 128, 129, 130, -1, -1, - 133, 134, -1, 136, 137, 138, 139, 140, 141, -1, - 143, -1, -1, 118, -1, -1, -1, -1, -1, 124, - 125, 126, -1, 128, 129, 130, -1, -1, 133, 134, - -1, 136, 137, 138, 139, 140, 141, -1, 143, 118, - -1, -1, -1, -1, -1, 124, -1, -1, -1, -1, + 13, 95, 68, 2, 42, 118, 181, 3, 3, 3, + 49, 10, 73, 3, 12, 42, 102, 237, 4, 5, + 6, 149, 116, 254, 102, 81, 13, 70, 90, 124, + 19, 77, 25, 49, 128, 121, 9, 9, 3, 55, + 39, 88, 41, 121, 37, 95, 141, 109, 143, 48, + 26, 81, 102, 124, 97, 126, 102, 103, 186, 97, + 146, 145, 51, 147, 239, 285, 39, 39, 3, 27, + 117, 121, 71, 72, 61, 121, 3, 64, 3, 4, + 5, 6, 58, 177, 83, 84, 62, 155, 149, 145, + 265, 159, 68, 69, 67, 189, 162, 191, 71, 71, + 70, 94, 146, 334, 90, 149, 145, 120, 179, 146, + 86, 87, 149, 3, 107, 128, 3, 4, 5, 6, + 81, 215, 149, 194, 114, 196, 85, 97, 222, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 138, 138, 113, 321, 0, 146, 145, + 75, 148, 314, 40, 3, 4, 5, 6, 3, 4, + 5, 6, 49, 176, 150, 90, 341, 102, 26, 233, + 144, 237, 3, 149, 124, 149, 214, 290, 340, 114, + 146, 99, 91, 149, 109, 249, 121, 96, 75, 227, + 352, 40, 263, 143, 146, 40, 147, 149, 123, 146, + 58, 145, 149, 90, 62, 146, 146, 81, 149, 149, + 68, 69, 137, 138, 72, 146, 116, 12, 149, 285, + 145, 104, 109, 124, 146, 150, 75, 149, 17, 87, + 75, 244, 6, 304, 111, 234, 123, 138, 139, 140, + 141, 90, 143, 61, 116, 90, 64, 146, 319, 146, + 137, 138, 265, 101, 84, 26, 45, 63, 145, 115, + 109, 3, 120, 150, 109, 4, 360, 361, 109, 73, + 80, 40, 145, 3, 123, 7, 145, 348, 123, 67, + 45, 40, 3, 15, 4, 145, 98, 58, 137, 138, + 22, 62, 137, 138, 81, 27, 145, 68, 69, 88, + 145, 150, 34, 35, 143, 150, 149, 126, 321, 3, + 46, 43, 44, 149, 112, 86, 87, 49, 3, 85, + 109, 114, 54, 45, 145, 49, 146, 3, 117, 118, + 145, 145, 145, 80, 3, 124, 125, 126, 146, 128, + 129, 130, 88, 60, 133, 134, 78, 136, 137, 138, + 139, 140, 141, 118, 143, 145, 90, 79, 102, 124, + 143, 93, 144, 86, 129, 130, 88, 45, 133, 134, + 146, 136, 137, 138, 139, 140, 141, 68, 143, 146, + 68, 86, 115, 105, 146, 149, 146, 109, 145, 147, + 146, 53, 18, 45, 287, 290, 118, 38, 47, 297, + 115, 64, 124, 125, 126, 216, 128, 129, 130, 31, + 88, 133, 134, 145, 136, 137, 138, 139, 140, 141, + 174, 143, 222, 335, 102, 364, 45, -1, -1, -1, + -1, 109, 187, -1, -1, -1, 88, -1, -1, -1, + 118, -1, -1, -1, -1, -1, 124, 125, 126, -1, + 128, 129, 130, 105, 45, 133, 134, 109, 136, 137, + 138, 139, 140, 141, -1, 143, 118, -1, -1, 88, + -1, -1, 124, 125, 126, -1, 128, 129, 130, -1, + -1, 133, 134, -1, 136, 137, 138, 139, 140, 141, + 109, 143, -1, -1, -1, -1, -1, 88, -1, 118, + -1, -1, -1, -1, -1, 124, 125, 126, -1, 128, 129, 130, -1, -1, 133, 134, -1, 136, 137, 138, - 139, 140, 141, -1, 143 + 139, 140, 141, -1, 143, -1, -1, 118, -1, -1, + -1, -1, -1, 124, 125, 126, -1, 128, 129, 130, + -1, -1, 133, 134, -1, 136, 137, 138, 139, 140, + 141, -1, 143 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1040,41 +1040,42 @@ static const yytype_uint8 yystos[] = { 0, 7, 15, 22, 27, 34, 35, 43, 44, 49, 54, 78, 93, 145, 152, 153, 154, 155, 159, 161, - 162, 165, 166, 171, 172, 173, 174, 176, 179, 180, - 182, 186, 27, 3, 229, 3, 3, 70, 97, 81, - 81, 85, 113, 197, 228, 229, 70, 97, 19, 51, - 180, 182, 0, 148, 235, 99, 156, 156, 9, 39, - 71, 183, 184, 67, 183, 193, 3, 147, 145, 81, - 116, 167, 167, 229, 104, 163, 229, 6, 220, 12, - 187, 111, 229, 229, 229, 146, 146, 154, 84, 180, - 181, 186, 101, 185, 115, 181, 63, 198, 3, 4, - 5, 90, 150, 200, 217, 218, 219, 220, 221, 222, - 4, 160, 109, 229, 229, 73, 190, 80, 145, 175, - 3, 40, 75, 109, 123, 137, 138, 145, 188, 199, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 3, 177, 178, - 145, 193, 194, 195, 202, 193, 220, 146, 149, 40, - 81, 145, 175, 202, 164, 218, 3, 236, 55, 182, - 145, 147, 145, 98, 40, 109, 203, 143, 203, 182, - 202, 81, 189, 149, 3, 102, 114, 121, 230, 231, - 17, 45, 88, 109, 117, 118, 124, 125, 126, 128, - 129, 130, 133, 134, 136, 137, 138, 139, 140, 141, - 143, 126, 149, 190, 3, 157, 158, 198, 149, 77, - 103, 196, 198, 46, 217, 112, 3, 168, 169, 114, - 85, 146, 149, 145, 146, 187, 3, 138, 182, 202, - 145, 109, 199, 146, 146, 145, 223, 224, 225, 227, - 229, 232, 190, 201, 202, 3, 202, 203, 203, 88, - 117, 145, 90, 109, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 220, 202, - 178, 145, 146, 149, 195, 220, 80, 25, 37, 94, - 107, 170, 146, 149, 179, 229, 3, 200, 199, 146, - 95, 182, 144, 179, 26, 58, 62, 68, 69, 87, - 149, 233, 231, 60, 191, 102, 203, 145, 182, 199, - 90, 144, 200, 158, 164, 169, 146, 146, 203, 146, - 146, 86, 68, 68, 224, 226, 86, 115, 203, 182, - 199, 146, 146, 146, 79, 105, 231, 225, 149, 224, - 199, 146, 146, 203, 224, 72, 120, 42, 192, 105, - 145, 202, 234, 202, 3, 216, 146 + 162, 165, 166, 171, 173, 174, 175, 177, 180, 181, + 183, 187, 27, 3, 230, 3, 3, 70, 97, 81, + 81, 85, 113, 198, 229, 230, 70, 97, 19, 51, + 181, 183, 0, 148, 236, 99, 156, 156, 9, 39, + 71, 184, 185, 67, 184, 194, 3, 147, 145, 81, + 116, 167, 167, 230, 104, 163, 230, 6, 221, 12, + 188, 111, 116, 172, 172, 230, 146, 146, 154, 84, + 181, 182, 187, 101, 186, 115, 182, 63, 199, 3, + 4, 5, 90, 150, 201, 218, 219, 220, 221, 222, + 223, 4, 160, 109, 230, 230, 73, 191, 80, 145, + 176, 3, 40, 75, 109, 123, 137, 138, 145, 189, + 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 3, 178, + 179, 40, 230, 230, 145, 194, 195, 196, 203, 194, + 221, 146, 149, 40, 81, 145, 176, 203, 164, 219, + 3, 237, 55, 183, 145, 147, 145, 98, 40, 109, + 204, 143, 204, 183, 203, 81, 190, 149, 3, 102, + 114, 121, 231, 232, 17, 45, 88, 109, 117, 118, + 124, 125, 126, 128, 129, 130, 133, 134, 136, 137, + 138, 139, 140, 141, 143, 126, 149, 191, 3, 157, + 158, 199, 149, 77, 103, 197, 199, 46, 218, 112, + 3, 168, 169, 114, 85, 146, 149, 145, 146, 188, + 3, 138, 183, 203, 145, 109, 200, 146, 146, 145, + 224, 225, 226, 228, 230, 233, 191, 202, 203, 3, + 203, 204, 204, 88, 117, 145, 90, 109, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, + 204, 204, 221, 203, 179, 145, 146, 149, 196, 221, + 80, 25, 37, 94, 107, 170, 146, 149, 180, 230, + 3, 201, 200, 146, 95, 183, 144, 180, 26, 58, + 62, 68, 69, 87, 149, 234, 232, 60, 192, 102, + 204, 145, 183, 200, 90, 144, 201, 158, 164, 169, + 146, 146, 204, 146, 146, 86, 68, 68, 225, 227, + 86, 115, 204, 183, 200, 146, 146, 146, 79, 105, + 232, 226, 149, 225, 200, 146, 146, 204, 225, 72, + 120, 42, 193, 105, 145, 203, 235, 203, 3, 217, + 146 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1084,22 +1085,23 @@ static const yytype_uint8 yyr1[] = 155, 155, 155, 155, 155, 155, 155, 156, 156, 157, 157, 158, 158, 159, 160, 161, 161, 162, 163, 164, 165, 165, 166, 166, 166, 167, 167, 168, 168, 169, - 170, 170, 170, 170, 171, 171, 171, 172, 173, 174, - 174, 175, 175, 176, 177, 177, 178, 179, 179, 179, - 180, 180, 181, 181, 182, 182, 183, 184, 184, 184, - 185, 185, 186, 187, 187, 188, 189, 190, 190, 191, - 191, 192, 192, 193, 193, 194, 194, 195, 196, 196, - 196, 197, 197, 198, 198, 198, 199, 199, 200, 200, - 201, 202, 202, 202, 202, 202, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 204, 204, 205, 205, 205, - 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 207, 207, 208, 208, 208, 208, 209, - 209, 210, 210, 211, 211, 211, 211, 211, 211, 212, - 212, 213, 214, 215, 216, 216, 216, 216, 217, 217, - 217, 217, 218, 219, 219, 220, 221, 222, 223, 223, - 224, 224, 225, 225, 226, 226, 227, 228, 229, 229, - 230, 230, 231, 231, 232, 232, 232, 233, 233, 233, - 233, 233, 233, 233, 233, 234, 235, 235, 236, 236 + 170, 170, 170, 170, 171, 171, 171, 172, 172, 173, + 174, 175, 175, 176, 176, 177, 178, 178, 179, 180, + 180, 180, 181, 181, 182, 182, 183, 183, 184, 185, + 185, 185, 186, 186, 187, 188, 188, 189, 190, 190, + 191, 191, 192, 192, 193, 193, 194, 194, 195, 195, + 196, 197, 197, 197, 198, 198, 199, 199, 199, 200, + 200, 201, 201, 202, 203, 203, 203, 203, 203, 204, + 204, 204, 204, 204, 204, 204, 204, 204, 205, 205, + 206, 206, 206, 206, 206, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 208, 208, 209, 209, + 209, 209, 210, 210, 211, 211, 212, 212, 212, 212, + 212, 212, 213, 213, 214, 215, 216, 217, 217, 217, + 217, 218, 218, 218, 218, 219, 220, 220, 221, 222, + 223, 224, 224, 225, 225, 226, 226, 227, 227, 228, + 229, 230, 230, 231, 231, 232, 232, 233, 233, 233, + 234, 234, 234, 234, 234, 234, 234, 234, 235, 236, + 236, 237, 237 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1109,22 +1111,23 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 4, 1, 2, 5, 7, 1, 1, 2, 3, 8, 7, 7, 3, 0, 1, 3, 2, - 1, 1, 1, 1, 3, 3, 3, 4, 2, 8, - 5, 3, 0, 5, 1, 3, 3, 1, 1, 5, - 3, 3, 1, 1, 3, 5, 2, 1, 1, 1, - 1, 0, 7, 1, 0, 1, 2, 2, 0, 4, - 0, 2, 0, 3, 0, 1, 3, 2, 1, 1, - 0, 2, 0, 2, 4, 0, 1, 3, 1, 3, - 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 2, 2, 2, - 3, 4, 1, 3, 3, 3, 3, 3, 3, 3, - 4, 3, 3, 3, 3, 5, 6, 5, 6, 6, - 8, 4, 5, 3, 3, 3, 3, 3, 3, 3, - 5, 4, 4, 5, 1, 3, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 4, 1, 3, 2, 1, 1, 3, - 2, 1, 1, 0, 4, 6, 8, 1, 1, 2, - 2, 1, 1, 1, 0, 1, 1, 0, 1, 3 + 1, 1, 1, 1, 4, 4, 3, 2, 0, 4, + 2, 8, 5, 3, 0, 5, 1, 3, 3, 1, + 1, 5, 3, 3, 1, 1, 3, 5, 2, 1, + 1, 1, 1, 0, 7, 1, 0, 1, 2, 0, + 2, 0, 4, 0, 2, 0, 3, 0, 1, 3, + 2, 1, 1, 0, 2, 0, 2, 4, 0, 1, + 3, 1, 3, 2, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 2, 2, 2, 3, 4, 1, 3, 3, 3, 3, + 3, 3, 3, 4, 3, 3, 3, 3, 5, 6, + 5, 6, 6, 8, 4, 5, 3, 3, 3, 3, + 3, 3, 3, 5, 4, 4, 5, 1, 3, 1, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 1, 1, 4, 1, 3, 2, + 1, 1, 3, 2, 1, 1, 0, 4, 6, 8, + 1, 1, 2, 2, 1, 1, 1, 0, 1, 1, + 0, 1, 3 }; @@ -1621,31 +1624,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio switch (yytype) { case 3: /* IDENTIFIER */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1627 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1630 "bison_parser.cpp" /* yacc.c:1257 */ break; case 4: /* STRING */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1633 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1636 "bison_parser.cpp" /* yacc.c:1257 */ break; case 5: /* FLOATVAL */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1639 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1642 "bison_parser.cpp" /* yacc.c:1257 */ break; case 6: /* INTVAL */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1645 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1648 "bison_parser.cpp" /* yacc.c:1257 */ break; case 153: /* statement_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1654,23 +1657,23 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).stmt_vec)); } -#line 1658 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1661 "bison_parser.cpp" /* yacc.c:1257 */ break; case 154: /* statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1664 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1667 "bison_parser.cpp" /* yacc.c:1257 */ break; case 155: /* preparable_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1670 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1673 "bison_parser.cpp" /* yacc.c:1257 */ break; case 156: /* opt_hints */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1679,11 +1682,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1683 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1686 "bison_parser.cpp" /* yacc.c:1257 */ break; case 157: /* hint_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1692,71 +1695,71 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1696 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1699 "bison_parser.cpp" /* yacc.c:1257 */ break; case 158: /* hint */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1702 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1705 "bison_parser.cpp" /* yacc.c:1257 */ break; case 159: /* prepare_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).prep_stmt)); } -#line 1708 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1711 "bison_parser.cpp" /* yacc.c:1257 */ break; case 160: /* prepare_target_query */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1714 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1717 "bison_parser.cpp" /* yacc.c:1257 */ break; case 161: /* execute_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).exec_stmt)); } -#line 1720 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1723 "bison_parser.cpp" /* yacc.c:1257 */ break; case 162: /* import_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).import_stmt)); } -#line 1726 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1729 "bison_parser.cpp" /* yacc.c:1257 */ break; case 163: /* import_file_type */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1732 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1735 "bison_parser.cpp" /* yacc.c:1257 */ break; case 164: /* file_path */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1738 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1741 "bison_parser.cpp" /* yacc.c:1257 */ break; case 165: /* show_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).show_stmt)); } -#line 1744 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1747 "bison_parser.cpp" /* yacc.c:1257 */ break; case 166: /* create_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).create_stmt)); } -#line 1750 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1753 "bison_parser.cpp" /* yacc.c:1257 */ break; case 167: /* opt_not_exists */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1756 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1759 "bison_parser.cpp" /* yacc.c:1257 */ break; case 168: /* column_def_commalist */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -1765,47 +1768,53 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).column_vec)); } -#line 1769 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1772 "bison_parser.cpp" /* yacc.c:1257 */ break; case 169: /* column_def */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).column_t)); } -#line 1775 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1778 "bison_parser.cpp" /* yacc.c:1257 */ break; case 170: /* column_type */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1781 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1784 "bison_parser.cpp" /* yacc.c:1257 */ break; case 171: /* drop_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).drop_stmt)); } -#line 1787 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1790 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 172: /* delete_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 172: /* opt_exists */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ + { } +#line 1796 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 173: /* delete_statement */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1793 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1802 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 173: /* truncate_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 174: /* truncate_statement */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1799 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1808 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 174: /* insert_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 175: /* insert_statement */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).insert_stmt)); } -#line 1805 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1814 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 175: /* opt_column_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 176: /* opt_column_list */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -1814,17 +1823,17 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 1818 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1827 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 176: /* update_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 177: /* update_statement */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_stmt)); } -#line 1824 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1833 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 177: /* update_clause_commalist */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 178: /* update_clause_commalist */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -1833,53 +1842,53 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).update_vec)); } -#line 1837 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1846 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 178: /* update_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 179: /* update_clause */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_t)); } -#line 1843 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1852 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 179: /* select_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 180: /* select_statement */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1849 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1858 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 180: /* select_with_paren */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 181: /* select_with_paren */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1855 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1864 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 181: /* select_paren_or_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 182: /* select_paren_or_clause */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1861 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1870 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 182: /* select_no_paren */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 183: /* select_no_paren */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1867 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1876 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 186: /* select_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 187: /* select_clause */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1873 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1882 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 187: /* opt_distinct */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ + case 188: /* opt_distinct */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1879 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1888 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 188: /* select_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 189: /* select_list */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1888,35 +1897,35 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1892 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1901 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 189: /* from_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 190: /* from_clause */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 1898 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1907 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 190: /* opt_where */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 191: /* opt_where */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1904 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1913 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 191: /* opt_group */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 192: /* opt_group */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).group_t)); } -#line 1910 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1919 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 192: /* opt_having */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 193: /* opt_having */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1916 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1925 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 193: /* opt_order */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 194: /* opt_order */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1925,11 +1934,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1929 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1938 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 194: /* order_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 195: /* order_list */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1938,35 +1947,35 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1942 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1951 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 195: /* order_desc */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 196: /* order_desc */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).order)); } -#line 1948 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1957 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 196: /* opt_order_type */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ + case 197: /* opt_order_type */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1954 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1963 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 197: /* opt_top */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 198: /* opt_top */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1960 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1969 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 198: /* opt_limit */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 199: /* opt_limit */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1966 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1975 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 199: /* expr_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 200: /* expr_list */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1975,11 +1984,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1979 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1988 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 200: /* literal_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 201: /* literal_list */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1988,161 +1997,161 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1992 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2001 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 201: /* expr_alias */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 202: /* expr_alias */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1998 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2007 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 202: /* expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 203: /* expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2004 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2013 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 203: /* operand */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 204: /* operand */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2010 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2019 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 204: /* scalar_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 205: /* scalar_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2016 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2025 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 205: /* unary_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 206: /* unary_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2022 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2031 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 206: /* binary_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 207: /* binary_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2028 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2037 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 207: /* logic_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 208: /* logic_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2034 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2043 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 208: /* in_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 209: /* in_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2040 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2049 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 209: /* case_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 210: /* case_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2046 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2055 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 210: /* exists_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 211: /* exists_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2052 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2061 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 211: /* comp_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 212: /* comp_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2058 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2067 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 212: /* function_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 213: /* function_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2064 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2073 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 213: /* array_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 214: /* array_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2070 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2079 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 214: /* array_index */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 215: /* array_index */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2076 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2085 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 215: /* between_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 216: /* between_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2082 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2091 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 216: /* column_name */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 217: /* column_name */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2088 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2097 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 217: /* literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 218: /* literal */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2094 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2103 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 218: /* string_literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 219: /* string_literal */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2100 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2109 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 219: /* num_literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 220: /* num_literal */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2106 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2115 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 220: /* int_literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 221: /* int_literal */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2112 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2121 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 221: /* null_literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 222: /* null_literal */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2118 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2127 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 222: /* param_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 223: /* param_expr */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2124 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2133 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 223: /* table_ref */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 224: /* table_ref */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2130 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2139 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 224: /* table_ref_atomic */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 225: /* table_ref_atomic */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2136 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2145 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 225: /* nonjoin_table_ref_atomic */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 226: /* nonjoin_table_ref_atomic */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2142 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2151 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 226: /* table_ref_commalist */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 227: /* table_ref_commalist */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2151,59 +2160,59 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).table_vec)); } -#line 2155 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2164 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 227: /* table_ref_name */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 228: /* table_ref_name */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2161 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2170 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 228: /* table_ref_name_no_alias */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 229: /* table_ref_name_no_alias */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2167 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2176 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 229: /* table_name */ + case 230: /* table_name */ #line 136 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2173 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 230: /* alias */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2179 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 231: /* opt_alias */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2185 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 232: /* join_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ - { delete (((*yyvaluep).table)); } -#line 2191 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 233: /* opt_join_type */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 2197 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2182 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 234: /* join_condition */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ - { delete (((*yyvaluep).expr)); } -#line 2203 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 236: /* ident_commalist */ + case 231: /* alias */ #line 137 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2188 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 232: /* opt_alias */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2194 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 233: /* join_clause */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ + { delete (((*yyvaluep).table)); } +#line 2200 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 234: /* opt_join_type */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ + { } +#line 2206 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 235: /* join_condition */ +#line 146 "bison_parser.y" /* yacc.c:1257 */ + { delete (((*yyvaluep).expr)); } +#line 2212 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 237: /* ident_commalist */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2212,7 +2221,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2216 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2225 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -2330,7 +2339,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.total_column = 0; } -#line 2334 "bison_parser.cpp" /* yacc.c:1429 */ +#line 2343 "bison_parser.cpp" /* yacc.c:1429 */ yylsp[0] = yylloc; goto yysetstate; @@ -2517,7 +2526,7 @@ yyreduce: switch (yyn) { case 2: -#line 242 "bison_parser.y" /* yacc.c:1646 */ +#line 244 "bison_parser.y" /* yacc.c:1646 */ { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -2535,417 +2544,443 @@ yyreduce: } delete (yyvsp[-1].stmt_vec); } -#line 2539 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2548 "bison_parser.cpp" /* yacc.c:1646 */ break; case 3: -#line 263 "bison_parser.y" /* yacc.c:1646 */ +#line 265 "bison_parser.y" /* yacc.c:1646 */ { (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 2545 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2554 "bison_parser.cpp" /* yacc.c:1646 */ break; case 4: -#line 264 "bison_parser.y" /* yacc.c:1646 */ +#line 266 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 2551 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 5: -#line 268 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.statement) = (yyvsp[-1].prep_stmt); - (yyval.statement)->hints = (yyvsp[0].expr_vec); - } #line 2560 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 6: -#line 272 "bison_parser.y" /* yacc.c:1646 */ + case 5: +#line 270 "bison_parser.y" /* yacc.c:1646 */ { - (yyval.statement) = (yyvsp[-1].statement); + (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } #line 2569 "bison_parser.cpp" /* yacc.c:1646 */ break; + case 6: +#line 274 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.statement) = (yyvsp[-1].statement); + (yyval.statement)->hints = (yyvsp[0].expr_vec); + } +#line 2578 "bison_parser.cpp" /* yacc.c:1646 */ + break; + case 7: -#line 276 "bison_parser.y" /* yacc.c:1646 */ +#line 278 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 2577 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2586 "bison_parser.cpp" /* yacc.c:1646 */ break; case 8: -#line 283 "bison_parser.y" /* yacc.c:1646 */ +#line 285 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 2583 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2592 "bison_parser.cpp" /* yacc.c:1646 */ break; case 9: -#line 284 "bison_parser.y" /* yacc.c:1646 */ +#line 286 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 2589 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2598 "bison_parser.cpp" /* yacc.c:1646 */ break; case 10: -#line 285 "bison_parser.y" /* yacc.c:1646 */ +#line 287 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 2595 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2604 "bison_parser.cpp" /* yacc.c:1646 */ break; case 11: -#line 286 "bison_parser.y" /* yacc.c:1646 */ +#line 288 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 2601 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2610 "bison_parser.cpp" /* yacc.c:1646 */ break; case 12: -#line 287 "bison_parser.y" /* yacc.c:1646 */ +#line 289 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2607 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2616 "bison_parser.cpp" /* yacc.c:1646 */ break; case 13: -#line 288 "bison_parser.y" /* yacc.c:1646 */ +#line 290 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2613 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2622 "bison_parser.cpp" /* yacc.c:1646 */ break; case 14: -#line 289 "bison_parser.y" /* yacc.c:1646 */ +#line 291 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 2619 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2628 "bison_parser.cpp" /* yacc.c:1646 */ break; case 15: -#line 290 "bison_parser.y" /* yacc.c:1646 */ +#line 292 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 2625 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2634 "bison_parser.cpp" /* yacc.c:1646 */ break; case 16: -#line 291 "bison_parser.y" /* yacc.c:1646 */ +#line 293 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 2631 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2640 "bison_parser.cpp" /* yacc.c:1646 */ break; case 17: -#line 300 "bison_parser.y" /* yacc.c:1646 */ +#line 302 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 2637 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2646 "bison_parser.cpp" /* yacc.c:1646 */ break; case 18: -#line 301 "bison_parser.y" /* yacc.c:1646 */ +#line 303 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = nullptr; } -#line 2643 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2652 "bison_parser.cpp" /* yacc.c:1646 */ break; case 19: -#line 306 "bison_parser.y" /* yacc.c:1646 */ +#line 308 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 2649 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2658 "bison_parser.cpp" /* yacc.c:1646 */ break; case 20: -#line 307 "bison_parser.y" /* yacc.c:1646 */ +#line 309 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 2655 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2664 "bison_parser.cpp" /* yacc.c:1646 */ break; case 21: -#line 311 "bison_parser.y" /* yacc.c:1646 */ +#line 313 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 2664 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2673 "bison_parser.cpp" /* yacc.c:1646 */ break; case 22: -#line 315 "bison_parser.y" /* yacc.c:1646 */ +#line 317 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 2674 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2683 "bison_parser.cpp" /* yacc.c:1646 */ break; case 23: -#line 327 "bison_parser.y" /* yacc.c:1646 */ +#line 329 "bison_parser.y" /* yacc.c:1646 */ { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 2684 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2693 "bison_parser.cpp" /* yacc.c:1646 */ break; case 25: -#line 337 "bison_parser.y" /* yacc.c:1646 */ +#line 339 "bison_parser.y" /* yacc.c:1646 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 2693 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2702 "bison_parser.cpp" /* yacc.c:1646 */ break; case 26: -#line 341 "bison_parser.y" /* yacc.c:1646 */ +#line 343 "bison_parser.y" /* yacc.c:1646 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 2703 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2712 "bison_parser.cpp" /* yacc.c:1646 */ break; case 27: -#line 353 "bison_parser.y" /* yacc.c:1646 */ +#line 355 "bison_parser.y" /* yacc.c:1646 */ { (yyval.import_stmt) = new ImportStatement((ImportType) (yyvsp[-4].uval)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); - (yyval.import_stmt)->tableName = (yyvsp[0].sval); + (yyval.import_stmt)->schema = (yyvsp[0].table_n).schema; + (yyval.import_stmt)->tableName = (yyvsp[0].table_n).name; } -#line 2713 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2723 "bison_parser.cpp" /* yacc.c:1646 */ break; case 28: -#line 361 "bison_parser.y" /* yacc.c:1646 */ +#line 364 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kImportCSV; } -#line 2719 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2729 "bison_parser.cpp" /* yacc.c:1646 */ break; case 29: -#line 365 "bison_parser.y" /* yacc.c:1646 */ +#line 368 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 2725 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2735 "bison_parser.cpp" /* yacc.c:1646 */ break; case 30: -#line 375 "bison_parser.y" /* yacc.c:1646 */ +#line 378 "bison_parser.y" /* yacc.c:1646 */ { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 2733 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2743 "bison_parser.cpp" /* yacc.c:1646 */ break; case 31: -#line 378 "bison_parser.y" /* yacc.c:1646 */ +#line 381 "bison_parser.y" /* yacc.c:1646 */ { (yyval.show_stmt) = new ShowStatement(kShowColumns); - (yyval.show_stmt)->name = (yyvsp[0].sval); - } -#line 2742 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 32: -#line 391 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); - (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); - (yyval.create_stmt)->tableName = (yyvsp[-4].sval); - (yyval.create_stmt)->filePath = (yyvsp[0].sval); + (yyval.show_stmt)->schema = (yyvsp[0].table_n).schema; + (yyval.show_stmt)->name = (yyvsp[0].table_n).name; } #line 2753 "bison_parser.cpp" /* yacc.c:1646 */ break; + case 32: +#line 395 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->schema = (yyvsp[-4].table_n).schema; + (yyval.create_stmt)->tableName = (yyvsp[-4].table_n).name; + (yyval.create_stmt)->filePath = (yyvsp[0].sval); + } +#line 2765 "bison_parser.cpp" /* yacc.c:1646 */ + break; + case 33: -#line 397 "bison_parser.y" /* yacc.c:1646 */ +#line 402 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->tableName = (yyvsp[-3].sval); + (yyval.create_stmt)->schema = (yyvsp[-3].table_n).schema; + (yyval.create_stmt)->tableName = (yyvsp[-3].table_n).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 2764 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2777 "bison_parser.cpp" /* yacc.c:1646 */ break; case 34: -#line 403 "bison_parser.y" /* yacc.c:1646 */ +#line 409 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->tableName = (yyvsp[-3].sval); + (yyval.create_stmt)->schema = (yyvsp[-3].table_n).schema; + (yyval.create_stmt)->tableName = (yyvsp[-3].table_n).name; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 2776 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2790 "bison_parser.cpp" /* yacc.c:1646 */ break; case 35: -#line 413 "bison_parser.y" /* yacc.c:1646 */ +#line 420 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 2782 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2796 "bison_parser.cpp" /* yacc.c:1646 */ break; case 36: -#line 414 "bison_parser.y" /* yacc.c:1646 */ +#line 421 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } -#line 2788 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2802 "bison_parser.cpp" /* yacc.c:1646 */ break; case 37: -#line 418 "bison_parser.y" /* yacc.c:1646 */ +#line 425 "bison_parser.y" /* yacc.c:1646 */ { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 2794 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 38: -#line 419 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 2800 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 39: -#line 423 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); - } #line 2808 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 40: -#line 430 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = ColumnDefinition::INT; } + case 38: +#line 426 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } #line 2814 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 41: -#line 431 "bison_parser.y" /* yacc.c:1646 */ + case 39: +#line 430 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); + } +#line 2822 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 40: +#line 437 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2820 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2828 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 41: +#line 438 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = ColumnDefinition::INT; } +#line 2834 "bison_parser.cpp" /* yacc.c:1646 */ break; case 42: -#line 432 "bison_parser.y" /* yacc.c:1646 */ +#line 439 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::DOUBLE; } -#line 2826 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2840 "bison_parser.cpp" /* yacc.c:1646 */ break; case 43: -#line 433 "bison_parser.y" /* yacc.c:1646 */ +#line 440 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::TEXT; } -#line 2832 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2846 "bison_parser.cpp" /* yacc.c:1646 */ break; case 44: -#line 443 "bison_parser.y" /* yacc.c:1646 */ +#line 450 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropTable); - (yyval.drop_stmt)->name = (yyvsp[0].sval); + (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); + (yyval.drop_stmt)->schema = (yyvsp[0].table_n).schema; + (yyval.drop_stmt)->name = (yyvsp[0].table_n).name; } -#line 2841 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2857 "bison_parser.cpp" /* yacc.c:1646 */ break; case 45: -#line 447 "bison_parser.y" /* yacc.c:1646 */ +#line 456 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropView); - (yyval.drop_stmt)->name = (yyvsp[0].sval); + (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); + (yyval.drop_stmt)->schema = (yyvsp[0].table_n).schema; + (yyval.drop_stmt)->name = (yyvsp[0].table_n).name; } -#line 2850 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2868 "bison_parser.cpp" /* yacc.c:1646 */ break; case 46: -#line 451 "bison_parser.y" /* yacc.c:1646 */ +#line 462 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); + (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2859 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 47: -#line 463 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.delete_stmt) = new DeleteStatement(); - (yyval.delete_stmt)->tableName = (yyvsp[-1].sval); - (yyval.delete_stmt)->expr = (yyvsp[0].expr); - } -#line 2869 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 48: -#line 471 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.delete_stmt) = new DeleteStatement(); - (yyval.delete_stmt)->tableName = (yyvsp[0].sval); - } #line 2878 "bison_parser.cpp" /* yacc.c:1646 */ break; + case 47: +#line 470 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = true; } +#line 2884 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 48: +#line 471 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = false; } +#line 2890 "bison_parser.cpp" /* yacc.c:1646 */ + break; + case 49: -#line 483 "bison_parser.y" /* yacc.c:1646 */ +#line 480 "bison_parser.y" /* yacc.c:1646 */ { - (yyval.insert_stmt) = new InsertStatement(kInsertValues); - (yyval.insert_stmt)->tableName = (yyvsp[-5].sval); - (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); - (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); + (yyval.delete_stmt) = new DeleteStatement(); + (yyval.delete_stmt)->schema = (yyvsp[-1].table_n).schema; + (yyval.delete_stmt)->tableName = (yyvsp[-1].table_n).name; + (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 2889 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2901 "bison_parser.cpp" /* yacc.c:1646 */ break; case 50: #line 489 "bison_parser.y" /* yacc.c:1646 */ { - (yyval.insert_stmt) = new InsertStatement(kInsertSelect); - (yyval.insert_stmt)->tableName = (yyvsp[-2].sval); - (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); - (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); + (yyval.delete_stmt) = new DeleteStatement(); + (yyval.delete_stmt)->schema = (yyvsp[0].table_n).schema; + (yyval.delete_stmt)->tableName = (yyvsp[0].table_n).name; } -#line 2900 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2911 "bison_parser.cpp" /* yacc.c:1646 */ break; case 51: -#line 499 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 2906 "bison_parser.cpp" /* yacc.c:1646 */ +#line 502 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.insert_stmt) = new InsertStatement(kInsertValues); + (yyval.insert_stmt)->schema = (yyvsp[-5].table_n).schema; + (yyval.insert_stmt)->tableName = (yyvsp[-5].table_n).name; + (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); + (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); + } +#line 2923 "bison_parser.cpp" /* yacc.c:1646 */ break; case 52: -#line 500 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = nullptr; } -#line 2912 "bison_parser.cpp" /* yacc.c:1646 */ +#line 509 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.insert_stmt) = new InsertStatement(kInsertSelect); + (yyval.insert_stmt)->schema = (yyvsp[-2].table_n).schema; + (yyval.insert_stmt)->tableName = (yyvsp[-2].table_n).name; + (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); + (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); + } +#line 2935 "bison_parser.cpp" /* yacc.c:1646 */ break; case 53: -#line 510 "bison_parser.y" /* yacc.c:1646 */ +#line 520 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.str_vec) = (yyvsp[-1].str_vec); } +#line 2941 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 54: +#line 521 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.str_vec) = nullptr; } +#line 2947 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 55: +#line 531 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_stmt) = new UpdateStatement(); (yyval.update_stmt)->table = (yyvsp[-3].table); (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 2923 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 54: -#line 519 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 2929 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 55: -#line 520 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 2935 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2958 "bison_parser.cpp" /* yacc.c:1646 */ break; case 56: -#line 524 "bison_parser.y" /* yacc.c:1646 */ +#line 540 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } +#line 2964 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 57: +#line 541 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } +#line 2970 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 58: +#line 545 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 2945 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2980 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 59: -#line 538 "bison_parser.y" /* yacc.c:1646 */ + case 61: +#line 559 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -2960,23 +2995,23 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2964 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2999 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 60: -#line 555 "bison_parser.y" /* yacc.c:1646 */ + case 62: +#line 576 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2970 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3005 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 61: -#line 556 "bison_parser.y" /* yacc.c:1646 */ + case 63: +#line 577 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2976 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3011 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 64: -#line 565 "bison_parser.y" /* yacc.c:1646 */ + case 66: +#line 586 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -2987,11 +3022,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2991 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3026 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 65: -#line 575 "bison_parser.y" /* yacc.c:1646 */ + case 67: +#line 596 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -3006,11 +3041,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3010 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3045 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 72: -#line 607 "bison_parser.y" /* yacc.c:1646 */ + case 74: +#line 628 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3020,538 +3055,552 @@ yyreduce: (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3024 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3059 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 73: -#line 619 "bison_parser.y" /* yacc.c:1646 */ + case 75: +#line 640 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 3030 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 74: -#line 620 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 3036 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3065 "bison_parser.cpp" /* yacc.c:1646 */ break; case 76: -#line 628 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table) = (yyvsp[0].table); } -#line 3042 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 77: -#line 633 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3048 "bison_parser.cpp" /* yacc.c:1646 */ +#line 641 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = false; } +#line 3071 "bison_parser.cpp" /* yacc.c:1646 */ break; case 78: -#line 634 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3054 "bison_parser.cpp" /* yacc.c:1646 */ +#line 649 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table) = (yyvsp[0].table); } +#line 3077 "bison_parser.cpp" /* yacc.c:1646 */ break; case 79: -#line 638 "bison_parser.y" /* yacc.c:1646 */ +#line 650 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table) = nullptr; } +#line 3083 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 80: +#line 655 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3089 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 81: +#line 656 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = nullptr; } +#line 3095 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 82: +#line 660 "bison_parser.y" /* yacc.c:1646 */ { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3064 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 80: -#line 643 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.group_t) = nullptr; } -#line 3070 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 81: -#line 647 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3076 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 82: -#line 648 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3082 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3105 "bison_parser.cpp" /* yacc.c:1646 */ break; case 83: -#line 651 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3088 "bison_parser.cpp" /* yacc.c:1646 */ +#line 665 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.group_t) = nullptr; } +#line 3111 "bison_parser.cpp" /* yacc.c:1646 */ break; case 84: -#line 652 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = nullptr; } -#line 3094 "bison_parser.cpp" /* yacc.c:1646 */ +#line 669 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3117 "bison_parser.cpp" /* yacc.c:1646 */ break; case 85: -#line 656 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3100 "bison_parser.cpp" /* yacc.c:1646 */ +#line 670 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = nullptr; } +#line 3123 "bison_parser.cpp" /* yacc.c:1646 */ break; case 86: -#line 657 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3106 "bison_parser.cpp" /* yacc.c:1646 */ +#line 673 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = (yyvsp[0].order_vec); } +#line 3129 "bison_parser.cpp" /* yacc.c:1646 */ break; case 87: -#line 661 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3112 "bison_parser.cpp" /* yacc.c:1646 */ +#line 674 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = nullptr; } +#line 3135 "bison_parser.cpp" /* yacc.c:1646 */ break; case 88: -#line 665 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } -#line 3118 "bison_parser.cpp" /* yacc.c:1646 */ +#line 678 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } +#line 3141 "bison_parser.cpp" /* yacc.c:1646 */ break; case 89: -#line 666 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderDesc; } -#line 3124 "bison_parser.cpp" /* yacc.c:1646 */ +#line 679 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } +#line 3147 "bison_parser.cpp" /* yacc.c:1646 */ break; case 90: -#line 667 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } -#line 3130 "bison_parser.cpp" /* yacc.c:1646 */ +#line 683 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } +#line 3153 "bison_parser.cpp" /* yacc.c:1646 */ break; case 91: -#line 673 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3136 "bison_parser.cpp" /* yacc.c:1646 */ +#line 687 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderAsc; } +#line 3159 "bison_parser.cpp" /* yacc.c:1646 */ break; case 92: -#line 674 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } -#line 3142 "bison_parser.cpp" /* yacc.c:1646 */ +#line 688 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderDesc; } +#line 3165 "bison_parser.cpp" /* yacc.c:1646 */ break; case 93: -#line 678 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3148 "bison_parser.cpp" /* yacc.c:1646 */ +#line 689 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderAsc; } +#line 3171 "bison_parser.cpp" /* yacc.c:1646 */ break; case 94: -#line 679 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } -#line 3154 "bison_parser.cpp" /* yacc.c:1646 */ +#line 695 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } +#line 3177 "bison_parser.cpp" /* yacc.c:1646 */ break; case 95: -#line 680 "bison_parser.y" /* yacc.c:1646 */ +#line 696 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = nullptr; } -#line 3160 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3183 "bison_parser.cpp" /* yacc.c:1646 */ break; case 96: -#line 687 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3166 "bison_parser.cpp" /* yacc.c:1646 */ +#line 700 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } +#line 3189 "bison_parser.cpp" /* yacc.c:1646 */ break; case 97: -#line 688 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3172 "bison_parser.cpp" /* yacc.c:1646 */ +#line 701 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } +#line 3195 "bison_parser.cpp" /* yacc.c:1646 */ break; case 98: -#line 692 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3178 "bison_parser.cpp" /* yacc.c:1646 */ +#line 702 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = nullptr; } +#line 3201 "bison_parser.cpp" /* yacc.c:1646 */ break; case 99: -#line 693 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3184 "bison_parser.cpp" /* yacc.c:1646 */ +#line 709 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3207 "bison_parser.cpp" /* yacc.c:1646 */ break; case 100: -#line 697 "bison_parser.y" /* yacc.c:1646 */ +#line 710 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3213 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 101: +#line 714 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3219 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 102: +#line 715 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3225 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 103: +#line 719 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); (yyval.expr)->alias = (yyvsp[0].sval); } -#line 3193 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3234 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 106: -#line 712 "bison_parser.y" /* yacc.c:1646 */ + case 109: +#line 734 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); } -#line 3199 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 114: -#line 720 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3205 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3240 "bison_parser.cpp" /* yacc.c:1646 */ break; case 117: -#line 729 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3211 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 118: -#line 730 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3217 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 119: -#line 731 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 3223 "bison_parser.cpp" /* yacc.c:1646 */ +#line 742 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } +#line 3246 "bison_parser.cpp" /* yacc.c:1646 */ break; case 120: -#line 732 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 3229 "bison_parser.cpp" /* yacc.c:1646 */ +#line 751 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } +#line 3252 "bison_parser.cpp" /* yacc.c:1646 */ break; case 121: -#line 733 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 3235 "bison_parser.cpp" /* yacc.c:1646 */ +#line 752 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } +#line 3258 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 122: +#line 753 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } +#line 3264 "bison_parser.cpp" /* yacc.c:1646 */ break; case 123: -#line 738 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 3241 "bison_parser.cpp" /* yacc.c:1646 */ +#line 754 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } +#line 3270 "bison_parser.cpp" /* yacc.c:1646 */ break; case 124: -#line 739 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 3247 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 125: -#line 740 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 3253 "bison_parser.cpp" /* yacc.c:1646 */ +#line 755 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } +#line 3276 "bison_parser.cpp" /* yacc.c:1646 */ break; case 126: -#line 741 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 3259 "bison_parser.cpp" /* yacc.c:1646 */ +#line 760 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } +#line 3282 "bison_parser.cpp" /* yacc.c:1646 */ break; case 127: -#line 742 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 3265 "bison_parser.cpp" /* yacc.c:1646 */ +#line 761 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } +#line 3288 "bison_parser.cpp" /* yacc.c:1646 */ break; case 128: -#line 743 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 3271 "bison_parser.cpp" /* yacc.c:1646 */ +#line 762 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } +#line 3294 "bison_parser.cpp" /* yacc.c:1646 */ break; case 129: -#line 744 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 3277 "bison_parser.cpp" /* yacc.c:1646 */ +#line 763 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } +#line 3300 "bison_parser.cpp" /* yacc.c:1646 */ break; case 130: -#line 745 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 3283 "bison_parser.cpp" /* yacc.c:1646 */ +#line 764 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } +#line 3306 "bison_parser.cpp" /* yacc.c:1646 */ break; case 131: -#line 746 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 3289 "bison_parser.cpp" /* yacc.c:1646 */ +#line 765 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } +#line 3312 "bison_parser.cpp" /* yacc.c:1646 */ break; case 132: -#line 747 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 3295 "bison_parser.cpp" /* yacc.c:1646 */ +#line 766 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } +#line 3318 "bison_parser.cpp" /* yacc.c:1646 */ break; case 133: -#line 751 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 3301 "bison_parser.cpp" /* yacc.c:1646 */ +#line 767 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } +#line 3324 "bison_parser.cpp" /* yacc.c:1646 */ break; case 134: -#line 752 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 3307 "bison_parser.cpp" /* yacc.c:1646 */ +#line 768 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } +#line 3330 "bison_parser.cpp" /* yacc.c:1646 */ break; case 135: -#line 756 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 3313 "bison_parser.cpp" /* yacc.c:1646 */ +#line 769 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } +#line 3336 "bison_parser.cpp" /* yacc.c:1646 */ break; case 136: -#line 757 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 3319 "bison_parser.cpp" /* yacc.c:1646 */ +#line 773 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } +#line 3342 "bison_parser.cpp" /* yacc.c:1646 */ break; case 137: -#line 758 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 3325 "bison_parser.cpp" /* yacc.c:1646 */ +#line 774 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } +#line 3348 "bison_parser.cpp" /* yacc.c:1646 */ break; case 138: -#line 759 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 3331 "bison_parser.cpp" /* yacc.c:1646 */ +#line 778 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } +#line 3354 "bison_parser.cpp" /* yacc.c:1646 */ break; case 139: -#line 764 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3337 "bison_parser.cpp" /* yacc.c:1646 */ +#line 779 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } +#line 3360 "bison_parser.cpp" /* yacc.c:1646 */ break; case 140: -#line 766 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3343 "bison_parser.cpp" /* yacc.c:1646 */ +#line 780 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } +#line 3366 "bison_parser.cpp" /* yacc.c:1646 */ break; case 141: -#line 770 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 3349 "bison_parser.cpp" /* yacc.c:1646 */ +#line 781 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } +#line 3372 "bison_parser.cpp" /* yacc.c:1646 */ break; case 142: -#line 771 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 3355 "bison_parser.cpp" /* yacc.c:1646 */ +#line 786 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3378 "bison_parser.cpp" /* yacc.c:1646 */ break; case 143: -#line 775 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 3361 "bison_parser.cpp" /* yacc.c:1646 */ +#line 788 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3384 "bison_parser.cpp" /* yacc.c:1646 */ break; case 144: -#line 776 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 3367 "bison_parser.cpp" /* yacc.c:1646 */ +#line 792 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } +#line 3390 "bison_parser.cpp" /* yacc.c:1646 */ break; case 145: -#line 777 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 3373 "bison_parser.cpp" /* yacc.c:1646 */ +#line 793 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } +#line 3396 "bison_parser.cpp" /* yacc.c:1646 */ break; case 146: -#line 778 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 3379 "bison_parser.cpp" /* yacc.c:1646 */ +#line 797 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 3402 "bison_parser.cpp" /* yacc.c:1646 */ break; case 147: -#line 779 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 3385 "bison_parser.cpp" /* yacc.c:1646 */ +#line 798 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } +#line 3408 "bison_parser.cpp" /* yacc.c:1646 */ break; case 148: -#line 780 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 3391 "bison_parser.cpp" /* yacc.c:1646 */ +#line 799 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } +#line 3414 "bison_parser.cpp" /* yacc.c:1646 */ break; case 149: -#line 784 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 3397 "bison_parser.cpp" /* yacc.c:1646 */ +#line 800 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } +#line 3420 "bison_parser.cpp" /* yacc.c:1646 */ break; case 150: -#line 785 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 3403 "bison_parser.cpp" /* yacc.c:1646 */ +#line 801 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } +#line 3426 "bison_parser.cpp" /* yacc.c:1646 */ break; case 151: -#line 789 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 3409 "bison_parser.cpp" /* yacc.c:1646 */ +#line 802 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } +#line 3432 "bison_parser.cpp" /* yacc.c:1646 */ break; case 152: -#line 793 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 3415 "bison_parser.cpp" /* yacc.c:1646 */ +#line 806 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } +#line 3438 "bison_parser.cpp" /* yacc.c:1646 */ break; case 153: -#line 797 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3421 "bison_parser.cpp" /* yacc.c:1646 */ +#line 807 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } +#line 3444 "bison_parser.cpp" /* yacc.c:1646 */ break; case 154: -#line 801 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 3427 "bison_parser.cpp" /* yacc.c:1646 */ +#line 811 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } +#line 3450 "bison_parser.cpp" /* yacc.c:1646 */ break; case 155: -#line 802 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 3433 "bison_parser.cpp" /* yacc.c:1646 */ +#line 815 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } +#line 3456 "bison_parser.cpp" /* yacc.c:1646 */ break; case 156: -#line 803 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeStar(); } -#line 3439 "bison_parser.cpp" /* yacc.c:1646 */ +#line 819 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 3462 "bison_parser.cpp" /* yacc.c:1646 */ break; case 157: -#line 804 "bison_parser.y" /* yacc.c:1646 */ +#line 823 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } +#line 3468 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 158: +#line 824 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } +#line 3474 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 159: +#line 825 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeStar(); } +#line 3480 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 160: +#line 826 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 3445 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 162: -#line 815 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 3451 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 163: -#line 820 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 3457 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3486 "bison_parser.cpp" /* yacc.c:1646 */ break; case 165: -#line 825 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 3463 "bison_parser.cpp" /* yacc.c:1646 */ +#line 837 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } +#line 3492 "bison_parser.cpp" /* yacc.c:1646 */ break; case 166: -#line 829 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeNullLiteral(); } -#line 3469 "bison_parser.cpp" /* yacc.c:1646 */ +#line 842 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } +#line 3498 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 167: -#line 833 "bison_parser.y" /* yacc.c:1646 */ + case 168: +#line 847 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } +#line 3504 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 169: +#line 851 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeNullLiteral(); } +#line 3510 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 170: +#line 855 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 3479 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3520 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 169: -#line 846 "bison_parser.y" /* yacc.c:1646 */ + case 172: +#line 868 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[0].table_vec)->push_back((yyvsp[-2].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[0].table_vec); (yyval.table) = tbl; } -#line 3490 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3531 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 173: -#line 862 "bison_parser.y" /* yacc.c:1646 */ + case 176: +#line 884 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3501 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 174: -#line 871 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 3507 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 175: -#line 872 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 3513 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 176: -#line 877 "bison_parser.y" /* yacc.c:1646 */ - { - auto tbl = new TableRef(kTableName); - tbl->name = (yyvsp[-1].sval); - tbl->alias = (yyvsp[0].sval); - (yyval.table) = tbl; - } -#line 3524 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3542 "bison_parser.cpp" /* yacc.c:1646 */ break; case 177: -#line 887 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.table) = new TableRef(kTableName); - (yyval.table)->name = (yyvsp[0].sval); - } -#line 3533 "bison_parser.cpp" /* yacc.c:1646 */ +#line 893 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } +#line 3548 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 178: +#line 894 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } +#line 3554 "bison_parser.cpp" /* yacc.c:1646 */ break; case 179: -#line 896 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.sval) = (yyvsp[0].sval); } -#line 3539 "bison_parser.cpp" /* yacc.c:1646 */ +#line 899 "bison_parser.y" /* yacc.c:1646 */ + { + auto tbl = new TableRef(kTableName); + tbl->schema = (yyvsp[-1].table_n).schema; + tbl->name = (yyvsp[-1].table_n).name; + tbl->alias = (yyvsp[0].sval); + (yyval.table) = tbl; + } +#line 3566 "bison_parser.cpp" /* yacc.c:1646 */ break; case 180: -#line 901 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.sval) = (yyvsp[0].sval); } -#line 3545 "bison_parser.cpp" /* yacc.c:1646 */ +#line 910 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.table) = new TableRef(kTableName); + (yyval.table)->schema = (yyvsp[0].table_n).schema; + (yyval.table)->name = (yyvsp[0].table_n).name; + } +#line 3576 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 181: +#line 919 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table_n).schema = nullptr; (yyval.table_n).name = (yyvsp[0].sval);} +#line 3582 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 182: +#line 920 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table_n).schema = (yyvsp[-2].sval); (yyval.table_n).name = (yyvsp[0].sval); } +#line 3588 "bison_parser.cpp" /* yacc.c:1646 */ break; case 183: -#line 907 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.sval) = nullptr; } -#line 3551 "bison_parser.cpp" /* yacc.c:1646 */ +#line 925 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.sval) = (yyvsp[0].sval); } +#line 3594 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 184: -#line 916 "bison_parser.y" /* yacc.c:1646 */ + case 186: +#line 931 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.sval) = nullptr; } +#line 3600 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 187: +#line 940 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3559,11 +3608,11 @@ yyreduce: (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 3563 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3612 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 185: -#line 924 "bison_parser.y" /* yacc.c:1646 */ + case 188: +#line 948 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3572,11 +3621,11 @@ yyreduce: (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 3576 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3625 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 186: -#line 934 "bison_parser.y" /* yacc.c:1646 */ + case 189: +#line 958 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3592,71 +3641,71 @@ yyreduce: (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 3596 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 187: -#line 952 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } -#line 3602 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 188: -#line 953 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinOuter; } -#line 3608 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 189: -#line 954 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeftOuter; } -#line 3614 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3645 "bison_parser.cpp" /* yacc.c:1646 */ break; case 190: -#line 955 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRightOuter; } -#line 3620 "bison_parser.cpp" /* yacc.c:1646 */ +#line 976 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinInner; } +#line 3651 "bison_parser.cpp" /* yacc.c:1646 */ break; case 191: -#line 956 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeft; } -#line 3626 "bison_parser.cpp" /* yacc.c:1646 */ +#line 977 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinOuter; } +#line 3657 "bison_parser.cpp" /* yacc.c:1646 */ break; case 192: -#line 957 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRight; } -#line 3632 "bison_parser.cpp" /* yacc.c:1646 */ +#line 978 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinLeftOuter; } +#line 3663 "bison_parser.cpp" /* yacc.c:1646 */ break; case 193: -#line 958 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinCross; } -#line 3638 "bison_parser.cpp" /* yacc.c:1646 */ +#line 979 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinRightOuter; } +#line 3669 "bison_parser.cpp" /* yacc.c:1646 */ break; case 194: -#line 959 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } -#line 3644 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 198: -#line 979 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 3650 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 199: #line 980 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinLeft; } +#line 3675 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 195: +#line 981 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinRight; } +#line 3681 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 196: +#line 982 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinCross; } +#line 3687 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 197: +#line 983 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinInner; } +#line 3693 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 201: +#line 1003 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } +#line 3699 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 202: +#line 1004 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 3656 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3705 "bison_parser.cpp" /* yacc.c:1646 */ break; -#line 3660 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3709 "bison_parser.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3891,7 +3940,7 @@ yyreturn: #endif return yyresult; } -#line 983 "bison_parser.y" /* yacc.c:1906 */ +#line 1007 "bison_parser.y" /* yacc.c:1906 */ /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index c2a852d..4a7af71 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -236,7 +236,8 @@ union HSQL_STYPE hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; - + + hsql::TableName table_n; hsql::TableRef* table; hsql::Expr* expr; hsql::OrderDescription* order; @@ -255,7 +256,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; -#line 259 "bison_parser.h" /* yacc.c:1909 */ +#line 260 "bison_parser.h" /* yacc.c:1909 */ }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y old mode 100644 new mode 100755 index 8fd6a5b..9c49d9b --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -108,7 +108,8 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; - + + hsql::TableName table_n; hsql::TableRef* table; hsql::Expr* expr; hsql::OrderDescription* order; @@ -132,7 +133,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha /********************************* ** Descrutor symbols *********************************/ -%destructor { } +%destructor { } %destructor { free( ($$) ); } %destructor { if (($$) != nullptr) { @@ -183,9 +184,10 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type delete_statement truncate_statement %type update_statement %type drop_statement -%type show_statement -%type table_name opt_alias alias file_path prepare_target_query -%type opt_not_exists opt_distinct +%type show_statement +%type table_name +%type opt_alias alias file_path prepare_target_query +%type opt_not_exists opt_exists opt_distinct %type import_file_type opt_join_type column_type %type from_clause table_ref table_ref_atomic table_ref_name nonjoin_table_ref_atomic %type
join_clause table_ref_name_no_alias @@ -353,7 +355,8 @@ import_statement: IMPORT FROM import_file_type FILE file_path INTO table_name { $$ = new ImportStatement((ImportType) $3); $$->filePath = $5; - $$->tableName = $7; + $$->schema = $7.schema; + $$->tableName = $7.name; } ; @@ -377,7 +380,8 @@ show_statement: } | SHOW COLUMNS table_name { $$ = new ShowStatement(kShowColumns); - $$->name = $3; + $$->schema = $3.schema; + $$->name = $3.name; } ; @@ -391,19 +395,22 @@ create_statement: CREATE TABLE opt_not_exists table_name FROM TBL FILE file_path { $$ = new CreateStatement(kCreateTableFromTbl); $$->ifNotExists = $3; - $$->tableName = $4; + $$->schema = $4.schema; + $$->tableName = $4.name; $$->filePath = $8; } | CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' { $$ = new CreateStatement(kCreateTable); $$->ifNotExists = $3; - $$->tableName = $4; + $$->schema = $4.schema; + $$->tableName = $4.name; $$->columns = $6; } | CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement { $$ = new CreateStatement(kCreateView); $$->ifNotExists = $3; - $$->tableName = $4; + $$->schema = $4.schema; + $$->tableName = $4.name; $$->viewColumns = $5; $$->select = $7; } @@ -440,20 +447,30 @@ column_type: ******************************/ drop_statement: - DROP TABLE table_name { + DROP TABLE opt_exists table_name { $$ = new DropStatement(kDropTable); - $$->name = $3; + $$->ifExists = $3; + $$->schema = $4.schema; + $$->name = $4.name; } - | DROP VIEW table_name { + | DROP VIEW opt_exists table_name { $$ = new DropStatement(kDropView); - $$->name = $3; + $$->ifExists = $3; + $$->schema = $4.schema; + $$->name = $4.name; } | DEALLOCATE PREPARE IDENTIFIER { $$ = new DropStatement(kDropPreparedStatement); + $$->ifExists = false; $$->name = $3; } ; +opt_exists: + IF EXISTS { $$ = true; } + | /* empty */ { $$ = false; } + ; + /****************************** * Delete Statement / Truncate statement * DELETE FROM students WHERE grade > 3.0 @@ -462,7 +479,8 @@ drop_statement: delete_statement: DELETE FROM table_name opt_where { $$ = new DeleteStatement(); - $$->tableName = $3; + $$->schema = $3.schema; + $$->tableName = $3.name; $$->expr = $4; } ; @@ -470,7 +488,8 @@ delete_statement: truncate_statement: TRUNCATE table_name { $$ = new DeleteStatement(); - $$->tableName = $2; + $$->schema = $2.schema; + $$->tableName = $2.name; } ; @@ -482,13 +501,15 @@ truncate_statement: insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' { $$ = new InsertStatement(kInsertValues); - $$->tableName = $3; + $$->schema = $3.schema; + $$->tableName = $3.name; $$->columns = $4; $$->values = $7; } | INSERT INTO table_name opt_column_list select_no_paren { $$ = new InsertStatement(kInsertSelect); - $$->tableName = $3; + $$->schema = $3.schema; + $$->tableName = $3.name; $$->columns = $4; $$->select = $5; } @@ -626,6 +647,7 @@ select_list: from_clause: FROM table_ref { $$ = $2; } + | /* empty */ { $$ = nullptr; } ; @@ -876,7 +898,8 @@ table_ref_commalist: table_ref_name: table_name opt_alias { auto tbl = new TableRef(kTableName); - tbl->name = $1; + tbl->schema = $1.schema; + tbl->name = $1.name; tbl->alias = $2; $$ = tbl; } @@ -886,14 +909,15 @@ table_ref_name: table_ref_name_no_alias: table_name { $$ = new TableRef(kTableName); - $$->name = $1; + $$->schema = $1.schema; + $$->name = $1.name; } ; table_name: - IDENTIFIER - | IDENTIFIER '.' IDENTIFIER { $$ = $3; } + IDENTIFIER { $$.schema = nullptr; $$.name = $1;} + | IDENTIFIER '.' IDENTIFIER { $$.schema = $1; $$.name = $3; } ; diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp index 094f831..029c86a 100644 --- a/src/parser/flex_lexer.cpp +++ b/src/parser/flex_lexer.cpp @@ -8,8 +8,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 37 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -88,13 +88,25 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ -/* TODO: this is always defined, so inline it */ -#define yyconst const +#ifdef __cplusplus -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const #else -#define yynoreturn +#define yyconst #endif /* Returned upon end-of-file. */ @@ -147,15 +159,7 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -177,7 +181,6 @@ typedef size_t yy_size_t; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -207,12 +210,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - int yy_buf_size; + yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -235,7 +238,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -291,7 +294,7 @@ static void hsql__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner YY_BUFFER_STATE hsql__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE hsql__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); void *hsql_alloc (yy_size_t ,yyscan_t yyscanner ); void *hsql_realloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -323,7 +326,7 @@ void hsql_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) +#define hsql_wrap(yyscanner) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -335,14 +338,14 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -463,7 +466,7 @@ static yyconst flex_int16_t yy_accept[938] = 2, 2, 5, 6, 2, 2, 0 } ; -static yyconst YY_CHAR yy_ec[256] = +static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -495,7 +498,7 @@ static yyconst YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst YY_CHAR yy_meta[68] = +static yyconst flex_int32_t yy_meta[68] = { 0, 1, 1, 2, 1, 3, 1, 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, @@ -506,7 +509,7 @@ static yyconst YY_CHAR yy_meta[68] = 4, 4, 4, 4, 4, 4, 1 } ; -static yyconst flex_uint16_t yy_base[945] = +static yyconst flex_int16_t yy_base[945] = { 0, 0, 0, 67, 0, 433, 3713, 133, 135, 418, 0, 3713, 410, 131, 401, 133, 132, 384, 129, 129, 137, @@ -722,7 +725,7 @@ static yyconst flex_int16_t yy_def[945] = 937, 937, 937, 937 } ; -static yyconst flex_uint16_t yy_nxt[3781] = +static yyconst flex_int16_t yy_nxt[3781] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 11, 17, 18, 19, 20, 21, 22, 23, 24, @@ -1596,7 +1599,7 @@ static yyconst flex_int16_t yy_chk[3781] = /*************************** ** Section 3: Rules ***************************/ -#line 1600 "flex_lexer.cpp" +#line 1603 "flex_lexer.cpp" #define INITIAL 0 #define COMMENT 1 @@ -1626,8 +1629,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -1678,23 +1681,23 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *hsql_get_in (yyscan_t yyscanner ); -void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner ); +void hsql_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *hsql_get_out (yyscan_t yyscanner ); -void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner ); +void hsql_set_out (FILE * out_str ,yyscan_t yyscanner ); - int hsql_get_leng (yyscan_t yyscanner ); +yy_size_t hsql_get_leng (yyscan_t yyscanner ); char *hsql_get_text (yyscan_t yyscanner ); int hsql_get_lineno (yyscan_t yyscanner ); -void hsql_set_lineno (int _line_number ,yyscan_t yyscanner ); +void hsql_set_lineno (int line_number ,yyscan_t yyscanner ); int hsql_get_column (yyscan_t yyscanner ); -void hsql_set_column (int _column_no ,yyscan_t yyscanner ); +void hsql_set_column (int column_no ,yyscan_t yyscanner ); YYSTYPE * hsql_get_lval (yyscan_t yyscanner ); @@ -1716,10 +1719,6 @@ extern int hsql_wrap (yyscan_t yyscanner ); #endif #endif -#ifndef YY_NO_UNPUT - -#endif - #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif @@ -1740,12 +1739,7 @@ static int input (yyscan_t yyscanner ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1753,7 +1747,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1777,7 +1771,7 @@ static int input (yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -1834,7 +1828,7 @@ extern int hsql_lex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; +#define YY_BREAK break; #endif #define YY_RULE_SETUP \ @@ -1844,11 +1838,16 @@ extern int hsql_lex \ */ YY_DECL { - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; +#line 51 "flex_lexer.l" + + +#line 1850 "flex_lexer.cpp" + yylval = yylval_param; yylloc = yylloc_param; @@ -1879,13 +1878,7 @@ YY_DECL hsql__load_buffer_state(yyscanner ); } - { -#line 51 "flex_lexer.l" - - -#line 1887 "flex_lexer.cpp" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ + while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -1901,7 +1894,7 @@ YY_DECL yy_match: do { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1913,7 +1906,7 @@ yy_match: if ( yy_current_state >= 938 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_current_state != 937 ); @@ -2632,7 +2625,7 @@ YY_RULE_SETUP #line 217 "flex_lexer.l" ECHO; YY_BREAK -#line 2636 "flex_lexer.cpp" +#line 2629 "flex_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): yyterminate(); @@ -2765,7 +2758,6 @@ case YY_STATE_EOF(COMMENT): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of user's declarations */ } /* end of hsql_lex */ /* yy_get_next_buffer - try to read in a new buffer @@ -2778,9 +2770,9 @@ case YY_STATE_EOF(COMMENT): static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - int number_to_move, i; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = yyg->yytext_ptr; + register int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -2809,7 +2801,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -2822,7 +2814,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2836,7 +2828,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2849,7 +2841,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; + b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -2891,9 +2883,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hsql_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); @@ -2912,15 +2904,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - yy_state_type yy_current_state; - char *yy_cp; + register yy_state_type yy_current_state; + register char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -2932,7 +2924,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( yy_current_state >= 938 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; @@ -2945,11 +2937,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - int yy_is_jam; + register int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; + register char *yy_cp = yyg->yy_c_buf_p; - YY_CHAR yy_c = 1; + register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -2961,17 +2953,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( yy_current_state >= 938 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 937); (void)yyg; return yy_is_jam ? 0 : yy_current_state; } -#ifndef YY_NO_UNPUT - -#endif - #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -2997,7 +2985,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -3021,7 +3009,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) case EOB_ACT_END_OF_FILE: { if ( hsql_wrap(yyscanner ) ) - return 0; + return EOF; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -3125,7 +3113,7 @@ static void hsql__load_buffer_state (yyscan_t yyscanner) if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in hsql__create_buffer()" ); - b->yy_buf_size = (yy_size_t)size; + b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. @@ -3277,7 +3265,7 @@ void hsql_pop_buffer_state (yyscan_t yyscanner) */ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) { - int num_to_alloc; + yy_size_t num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -3286,15 +3274,15 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ + num_to_alloc = 1; yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in hsql_ensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -3303,7 +3291,7 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; + int grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_realloc @@ -3323,7 +3311,7 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { @@ -3333,7 +3321,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return NULL; + return 0; b = (YY_BUFFER_STATE) hsql_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) @@ -3342,7 +3330,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = NULL; + b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -3365,7 +3353,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc YY_BUFFER_STATE hsql__scan_string (yyconst char * yystr , yyscan_t yyscanner) { - return hsql__scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); + return hsql__scan_bytes(yystr,strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to hsql_lex() will @@ -3375,7 +3363,7 @@ YY_BUFFER_STATE hsql__scan_string (yyconst char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; @@ -3383,7 +3371,7 @@ YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , y int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); + n = _yybytes_len + 2; buf = (char *) hsql_alloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in hsql__scan_bytes()" ); @@ -3409,11 +3397,9 @@ YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , y #define YY_EXIT_FAILURE 2 #endif -static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - (void) fprintf( stderr, "%s\n", msg ); + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -3451,7 +3437,7 @@ YY_EXTRA_TYPE hsql_get_extra (yyscan_t yyscanner) int hsql_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -3464,7 +3450,7 @@ int hsql_get_lineno (yyscan_t yyscanner) int hsql_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -3492,7 +3478,7 @@ FILE *hsql_get_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int hsql_get_leng (yyscan_t yyscanner) +yy_size_t hsql_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -3519,10 +3505,10 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) } /** Set the current line number. - * @param _line_number line number + * @param line_number * @param yyscanner The scanner object. */ -void hsql_set_lineno (int _line_number , yyscan_t yyscanner) +void hsql_set_lineno (int line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -3530,14 +3516,14 @@ void hsql_set_lineno (int _line_number , yyscan_t yyscanner) if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "hsql_set_lineno called with no buffer" ); - yylineno = _line_number; + yylineno = line_number; } /** Set the current column. - * @param _column_no column number + * @param line_number * @param yyscanner The scanner object. */ -void hsql_set_column (int _column_no , yyscan_t yyscanner) +void hsql_set_column (int column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -3545,25 +3531,25 @@ void hsql_set_column (int _column_no , yyscan_t yyscanner) if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "hsql_set_column called with no buffer" ); - yycolumn = _column_no; + yycolumn = column_no; } /** Set the input stream. This does not discard the current * input buffer. - * @param _in_str A readable stream. + * @param in_str A readable stream. * @param yyscanner The scanner object. * @see hsql__switch_to_buffer */ -void hsql_set_in (FILE * _in_str , yyscan_t yyscanner) +void hsql_set_in (FILE * in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; + yyin = in_str ; } -void hsql_set_out (FILE * _out_str , yyscan_t yyscanner) +void hsql_set_out (FILE * out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; + yyout = out_str ; } int hsql_get_debug (yyscan_t yyscanner) @@ -3572,10 +3558,10 @@ int hsql_get_debug (yyscan_t yyscanner) return yy_flex_debug; } -void hsql_set_debug (int _bdebug , yyscan_t yyscanner) +void hsql_set_debug (int bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; + yy_flex_debug = bdebug ; } /* Accessor methods for yylval and yylloc */ @@ -3651,20 +3637,20 @@ int hsql_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) hsql_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + hsql_set_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -3675,10 +3661,10 @@ static int yy_init_globals (yyscan_t yyscanner) * This function is called from hsql_lex_destroy(), so don't allocate here. */ - yyg->yy_buffer_stack = NULL; + yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = NULL; + yyg->yy_c_buf_p = (char *) 0; yyg->yy_init = 0; yyg->yy_start = 0; @@ -3691,8 +3677,8 @@ static int yy_init_globals (yyscan_t yyscanner) yyin = stdin; yyout = stdout; #else - yyin = NULL; - yyout = NULL; + yyin = (FILE *) 0; + yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by @@ -3738,10 +3724,7 @@ int hsql_lex_destroy (yyscan_t yyscanner) #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; + register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -3750,7 +3733,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { - int n; + register int n; for ( n = 0; s[n]; ++n ) ; @@ -3760,16 +3743,11 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) void *hsql_alloc (yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return malloc(size); + return (void *) malloc( size ); } void *hsql_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -3777,13 +3755,11 @@ void *hsql_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return realloc(ptr, size); + return (void *) realloc( (char *) ptr, size ); } void hsql_free (void * ptr , yyscan_t yyscanner) { - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; free( (char *) ptr ); /* see hsql_realloc() for (char *) cast */ } diff --git a/src/parser/flex_lexer.h b/src/parser/flex_lexer.h index cedea38..3b6dfc2 100644 --- a/src/parser/flex_lexer.h +++ b/src/parser/flex_lexer.h @@ -12,8 +12,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 37 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -92,13 +92,25 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ -/* TODO: this is always defined, so inline it */ -#define yyconst const +#ifdef __cplusplus -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const #else -#define yynoreturn +#define yyconst #endif /* An opaque pointer. */ @@ -120,15 +132,7 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE @@ -153,12 +157,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - int yy_buf_size; + yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -181,7 +185,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -202,7 +206,7 @@ void hsql_pop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE hsql__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE hsql__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); void *hsql_alloc (yy_size_t ,yyscan_t yyscanner ); void *hsql_realloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -210,7 +214,7 @@ void hsql_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) +#define hsql_wrap(yyscanner) 1 #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -252,23 +256,23 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *hsql_get_in (yyscan_t yyscanner ); -void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner ); +void hsql_set_in (FILE * in_str ,yyscan_t yyscanner ); FILE *hsql_get_out (yyscan_t yyscanner ); -void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner ); +void hsql_set_out (FILE * out_str ,yyscan_t yyscanner ); - int hsql_get_leng (yyscan_t yyscanner ); +yy_size_t hsql_get_leng (yyscan_t yyscanner ); char *hsql_get_text (yyscan_t yyscanner ); int hsql_get_lineno (yyscan_t yyscanner ); -void hsql_set_lineno (int _line_number ,yyscan_t yyscanner ); +void hsql_set_lineno (int line_number ,yyscan_t yyscanner ); int hsql_get_column (yyscan_t yyscanner ); -void hsql_set_column (int _column_no ,yyscan_t yyscanner ); +void hsql_set_column (int column_no ,yyscan_t yyscanner ); YYSTYPE * hsql_get_lval (yyscan_t yyscanner ); @@ -304,12 +308,7 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Number of entries by which start-condition stack grows. */ @@ -347,6 +346,6 @@ extern int hsql_lex \ #line 217 "flex_lexer.l" -#line 351 "flex_lexer.h" +#line 350 "flex_lexer.h" #undef hsql_IN_HEADER #endif /* hsql_HEADER_H */ diff --git a/src/sql/CreateStatement.h b/src/sql/CreateStatement.h old mode 100644 new mode 100755 index c341219..27c8625 --- a/src/sql/CreateStatement.h +++ b/src/sql/CreateStatement.h @@ -37,8 +37,9 @@ namespace hsql { CreateType type; bool ifNotExists; // default: false - char* filePath; // default: nullptr - char* tableName; // default: nullptr + char* filePath; // default: nullptr + char* schema; // default: nullptr + char* tableName; // default: nullptr std::vector* columns; // default: nullptr std::vector* viewColumns; SelectStatement* select; diff --git a/src/sql/DeleteStatement.h b/src/sql/DeleteStatement.h old mode 100644 new mode 100755 index 2aed8a5..6936147 --- a/src/sql/DeleteStatement.h +++ b/src/sql/DeleteStatement.h @@ -13,6 +13,7 @@ namespace hsql { DeleteStatement(); virtual ~DeleteStatement(); + char* schema; char* tableName; Expr* expr; }; diff --git a/src/sql/DropStatement.h b/src/sql/DropStatement.h old mode 100644 new mode 100755 index 5944463..f6ab1ad --- a/src/sql/DropStatement.h +++ b/src/sql/DropStatement.h @@ -22,6 +22,8 @@ namespace hsql { virtual ~DropStatement(); DropType type; + bool ifExists; + char* schema; char* name; }; diff --git a/src/sql/ImportStatement.h b/src/sql/ImportStatement.h old mode 100644 new mode 100755 index 1a63518..a10c88c --- a/src/sql/ImportStatement.h +++ b/src/sql/ImportStatement.h @@ -15,8 +15,9 @@ namespace hsql { virtual ~ImportStatement(); ImportType type; - const char* filePath; - const char* tableName; + char* filePath; + char* schema; + char* tableName; }; } // namespace hsql diff --git a/src/sql/InsertStatement.h b/src/sql/InsertStatement.h old mode 100644 new mode 100755 index bea006e..956f910 --- a/src/sql/InsertStatement.h +++ b/src/sql/InsertStatement.h @@ -17,6 +17,7 @@ namespace hsql { virtual ~InsertStatement(); InsertType type; + char* schema; char* tableName; std::vector* columns; std::vector* values; diff --git a/src/sql/ShowStatement.h b/src/sql/ShowStatement.h old mode 100644 new mode 100755 index 206a819..dcacbf5 --- a/src/sql/ShowStatement.h +++ b/src/sql/ShowStatement.h @@ -19,6 +19,7 @@ namespace hsql { virtual ~ShowStatement(); ShowType type; + char* schema; char* name; }; diff --git a/src/sql/Table.h b/src/sql/Table.h old mode 100644 new mode 100755 index 96ee775..f6257ee --- a/src/sql/Table.h +++ b/src/sql/Table.h @@ -19,6 +19,11 @@ namespace hsql { kTableCrossProduct }; + struct TableName { + char* schema; + char* name; + }; + // Holds reference to tables. Can be either table names or a select statement. struct TableRef { TableRef(TableRefType type); diff --git a/src/sql/statements.cpp b/src/sql/statements.cpp old mode 100644 new mode 100755 index af83ae2..380db06 --- a/src/sql/statements.cpp +++ b/src/sql/statements.cpp @@ -18,6 +18,7 @@ namespace hsql { type(type), ifNotExists(false), filePath(nullptr), + schema(nullptr), tableName(nullptr), columns(nullptr), viewColumns(nullptr), @@ -25,6 +26,7 @@ namespace hsql { CreateStatement::~CreateStatement() { free(filePath); + free(schema); free(tableName); delete select; @@ -46,10 +48,12 @@ namespace hsql { // DeleteStatement DeleteStatement::DeleteStatement() : SQLStatement(kStmtDelete), + schema(nullptr), tableName(nullptr), expr(nullptr) {}; DeleteStatement::~DeleteStatement() { + free(schema); free(tableName); delete expr; } @@ -58,9 +62,11 @@ namespace hsql { DropStatement::DropStatement(DropType type) : SQLStatement(kStmtDrop), type(type), + schema(nullptr), name(nullptr) {} DropStatement::~DropStatement() { + free(schema); free(name); } @@ -86,23 +92,27 @@ namespace hsql { SQLStatement(kStmtImport), type(type), filePath(nullptr), + schema(nullptr), tableName(nullptr) {}; ImportStatement::~ImportStatement() { - delete filePath; - delete tableName; + free(filePath); + free(schema); + free(tableName); } // InsertStatement InsertStatement::InsertStatement(InsertType type) : SQLStatement(kStmtInsert), type(type), + schema(nullptr), tableName(nullptr), columns(nullptr), values(nullptr), select(nullptr) {} InsertStatement::~InsertStatement() { + free(schema); free(tableName); delete select; @@ -125,9 +135,11 @@ namespace hsql { ShowStatement::ShowStatement(ShowType type) : SQLStatement(kStmtShow), type(type), + schema(nullptr), name(nullptr) {} ShowStatement::~ShowStatement() { + free(schema); free(name); } diff --git a/src/util/sqlhelper.cpp b/src/util/sqlhelper.cpp old mode 100644 new mode 100755 index 47c386c..ad286fd --- a/src/util/sqlhelper.cpp +++ b/src/util/sqlhelper.cpp @@ -33,6 +33,10 @@ namespace hsql { switch (table->type) { case kTableName: inprint(table->name, numIndent); + if(table->schema) { + inprint("Schema", numIndent + 1); + inprint(table->schema, numIndent + 2); + } break; case kTableSelect: printSelectStatementInfo(table->select, numIndent); @@ -87,6 +91,10 @@ namespace hsql { break; case kExprColumnRef: inprint(expr->name, numIndent); + if(expr->table) { + inprint("Table:", numIndent+1); + inprint(expr->table, numIndent+2); + } break; // case kExprTableColumnRef: inprint(expr->table, expr->name, numIndent); break; case kExprLiteralFloat: @@ -100,11 +108,24 @@ namespace hsql { break; case kExprFunctionRef: inprint(expr->name, numIndent); - for (Expr* e : *expr->exprList) inprint(e->name, numIndent + 1); + for (Expr* e : *expr->exprList) printExpression(e, numIndent + 1); break; case kExprOperator: printOperatorExpression(expr, numIndent); break; + case kExprSelect: + printSelectStatementInfo(expr->select, numIndent); + break; + case kExprParameter: + inprint(expr->ival, numIndent); + break; + case kExprArray: + for (Expr* e : *expr->exprList) printExpression(e, numIndent + 1); + break; + case kExprArrayIndex: + printExpression(expr->expr, numIndent + 1); + inprint(expr->ival, numIndent); + break; default: std::cerr << "Unrecognized expression type " << expr->type << std::endl; return; @@ -120,8 +141,10 @@ namespace hsql { inprint("Fields:", numIndent + 1); for (Expr* expr : *stmt->selectList) printExpression(expr, numIndent + 2); - inprint("Sources:", numIndent + 1); - printTableRefInfo(stmt->fromTable, numIndent + 2); + if (stmt->fromTable != nullptr) { + inprint("Sources:", numIndent + 1); + printTableRefInfo(stmt->fromTable, numIndent + 2); + } if (stmt->whereClause != nullptr) { inprint("Search Conditions:", numIndent + 1); From 45cae0bb0ba5607ad7d8ef8f80ecd1ffd834ca6e Mon Sep 17 00:00:00 2001 From: root Date: Wed, 13 Sep 2017 18:12:29 +0800 Subject: [PATCH 10/19] cancel empty from clause support --- src/parser/bison_parser.y | 1 - 1 file changed, 1 deletion(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 9c49d9b..a2607d5 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -647,7 +647,6 @@ select_list: from_clause: FROM table_ref { $$ = $2; } - | /* empty */ { $$ = nullptr; } ; From 4e3be32ba0b8fa56f42a6673175de62b08d92a4d Mon Sep 17 00:00:00 2001 From: root Date: Wed, 13 Sep 2017 18:24:41 +0800 Subject: [PATCH 11/19] cancel empty from clause support --- src/parser/bison_parser.cpp | 510 ++++++++++++++++++------------------ 1 file changed, 252 insertions(+), 258 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index c8af8a9..861f020 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -626,7 +626,7 @@ union yyalloc /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 87 /* YYNRULES -- Number of rules. */ -#define YYNRULES 202 +#define YYNRULES 201 /* YYNSTATES -- Number of states. */ #define YYNSTATES 371 @@ -694,20 +694,20 @@ static const yytype_uint16 yyrline[] = 437, 438, 439, 440, 450, 456, 462, 470, 471, 480, 489, 502, 509, 520, 521, 531, 540, 541, 545, 557, 558, 559, 576, 577, 581, 582, 586, 596, 613, 617, - 618, 619, 623, 624, 628, 640, 641, 645, 649, 650, - 655, 656, 660, 665, 669, 670, 673, 674, 678, 679, - 683, 687, 688, 689, 695, 696, 700, 701, 702, 709, - 710, 714, 715, 719, 726, 727, 728, 729, 730, 734, - 735, 736, 737, 738, 739, 740, 741, 742, 746, 747, - 751, 752, 753, 754, 755, 759, 760, 761, 762, 763, - 764, 765, 766, 767, 768, 769, 773, 774, 778, 779, - 780, 781, 786, 788, 792, 793, 797, 798, 799, 800, - 801, 802, 806, 807, 811, 815, 819, 823, 824, 825, - 826, 830, 831, 832, 833, 837, 842, 843, 847, 851, - 855, 867, 868, 878, 879, 883, 884, 893, 894, 899, - 910, 919, 920, 925, 926, 930, 931, 939, 947, 957, - 976, 977, 978, 979, 980, 981, 982, 983, 988, 997, - 998, 1003, 1004 + 618, 619, 623, 624, 628, 640, 641, 645, 649, 654, + 655, 659, 664, 668, 669, 672, 673, 677, 678, 682, + 686, 687, 688, 694, 695, 699, 700, 701, 708, 709, + 713, 714, 718, 725, 726, 727, 728, 729, 733, 734, + 735, 736, 737, 738, 739, 740, 741, 745, 746, 750, + 751, 752, 753, 754, 758, 759, 760, 761, 762, 763, + 764, 765, 766, 767, 768, 772, 773, 777, 778, 779, + 780, 785, 787, 791, 792, 796, 797, 798, 799, 800, + 801, 805, 806, 810, 814, 818, 822, 823, 824, 825, + 829, 830, 831, 832, 836, 841, 842, 846, 850, 854, + 866, 867, 877, 878, 882, 883, 892, 893, 898, 909, + 918, 919, 924, 925, 929, 930, 938, 946, 956, 975, + 976, 977, 978, 979, 980, 981, 982, 987, 996, 997, + 1002, 1003 }; #endif @@ -789,10 +789,10 @@ static const yytype_uint16 yytoknum[] = #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-232))) -#define YYTABLE_NINF -198 +#define YYTABLE_NINF -197 #define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-198))) + (!!((Yytable_value) == (-197))) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ @@ -843,44 +843,44 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, - 0, 0, 0, 0, 0, 200, 3, 18, 18, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, + 0, 0, 0, 0, 0, 199, 3, 18, 18, 16, 9, 7, 10, 15, 12, 13, 11, 14, 8, 59, - 60, 87, 0, 181, 50, 25, 0, 36, 36, 0, - 0, 0, 0, 76, 0, 180, 48, 48, 0, 30, - 0, 0, 1, 199, 2, 0, 6, 5, 70, 71, - 69, 0, 73, 0, 0, 98, 46, 0, 0, 0, - 0, 0, 0, 81, 28, 0, 54, 168, 94, 75, + 60, 86, 0, 180, 50, 25, 0, 36, 36, 0, + 0, 0, 0, 76, 0, 179, 48, 48, 0, 30, + 0, 0, 1, 198, 2, 0, 6, 5, 70, 71, + 69, 0, 73, 0, 0, 97, 46, 0, 0, 0, + 0, 0, 0, 80, 28, 0, 54, 167, 93, 75, 0, 0, 0, 0, 0, 31, 63, 62, 4, 0, - 64, 87, 65, 72, 68, 0, 87, 0, 66, 182, - 165, 166, 169, 170, 0, 101, 161, 162, 167, 163, - 164, 24, 23, 0, 0, 54, 0, 49, 0, 0, - 0, 157, 0, 0, 0, 0, 0, 159, 0, 79, - 77, 99, 186, 104, 111, 112, 113, 106, 108, 114, - 107, 125, 115, 116, 110, 105, 118, 119, 0, 81, - 56, 47, 44, 45, 0, 98, 86, 88, 93, 98, - 96, 26, 0, 35, 0, 0, 0, 80, 0, 29, - 201, 0, 0, 52, 76, 0, 0, 0, 0, 0, - 121, 0, 120, 0, 0, 0, 81, 0, 184, 0, - 0, 0, 185, 103, 0, 122, 0, 0, 0, 0, + 64, 86, 65, 72, 68, 0, 86, 0, 66, 181, + 164, 165, 168, 169, 0, 100, 160, 161, 166, 162, + 163, 24, 23, 0, 0, 54, 0, 49, 0, 0, + 0, 156, 0, 0, 0, 0, 0, 158, 0, 0, + 77, 98, 185, 103, 110, 111, 112, 105, 107, 113, + 106, 124, 114, 115, 109, 104, 117, 118, 0, 80, + 56, 47, 44, 45, 0, 97, 85, 87, 92, 97, + 95, 26, 0, 35, 0, 0, 0, 79, 0, 29, + 200, 0, 0, 52, 76, 0, 0, 0, 0, 0, + 120, 0, 119, 0, 0, 0, 80, 0, 183, 0, + 0, 0, 184, 102, 0, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 21, 0, - 19, 61, 0, 92, 91, 90, 67, 0, 102, 0, - 0, 0, 37, 0, 0, 53, 0, 0, 152, 0, - 158, 160, 0, 0, 0, 0, 0, 117, 109, 0, - 78, 171, 173, 175, 186, 174, 83, 100, 136, 183, - 137, 0, 132, 0, 0, 0, 123, 0, 135, 134, - 146, 147, 148, 149, 150, 151, 127, 126, 129, 128, - 130, 131, 0, 58, 57, 0, 17, 0, 89, 97, + 19, 61, 0, 91, 90, 89, 67, 0, 101, 0, + 0, 0, 37, 0, 0, 53, 0, 0, 151, 0, + 157, 159, 0, 0, 0, 0, 0, 116, 108, 0, + 78, 170, 172, 174, 185, 173, 82, 99, 135, 182, + 136, 0, 131, 0, 0, 0, 122, 0, 134, 133, + 145, 146, 147, 148, 149, 150, 126, 125, 128, 127, + 129, 130, 0, 58, 57, 0, 17, 0, 88, 96, 0, 41, 42, 43, 40, 39, 33, 0, 34, 27, - 202, 0, 0, 144, 0, 0, 154, 0, 0, 196, - 190, 191, 195, 194, 0, 0, 179, 0, 74, 0, - 133, 0, 0, 0, 124, 155, 0, 20, 32, 38, - 51, 153, 0, 145, 186, 0, 193, 192, 177, 172, - 0, 0, 156, 0, 0, 140, 138, 22, 0, 142, - 176, 187, 0, 197, 85, 141, 139, 0, 178, 0, - 0, 0, 82, 143, 0, 198, 188, 84, 157, 0, - 189 + 201, 0, 0, 143, 0, 0, 153, 0, 0, 195, + 189, 190, 194, 193, 0, 0, 178, 0, 74, 0, + 132, 0, 0, 0, 123, 154, 0, 20, 32, 38, + 51, 152, 0, 144, 185, 0, 192, 191, 176, 171, + 0, 0, 155, 0, 0, 139, 137, 22, 0, 141, + 175, 186, 0, 196, 84, 140, 138, 0, 177, 0, + 0, 0, 81, 142, 0, 197, 187, 83, 156, 0, + 188 }; /* YYPGOTO[NTERM-NUM]. */ @@ -927,7 +927,7 @@ static const yytype_int16 yytable[] = 101, 77, 309, 243, 152, 153, 310, 221, 216, 165, 323, 226, 311, 312, 63, 258, 228, 260, 60, 60, 46, 293, 161, 350, 102, 162, 13, 173, 180, 235, - -197, 313, 236, 36, 294, 183, 121, 100, 101, 77, + -196, 313, 236, 36, 294, 183, 121, 100, 101, 77, 40, 283, 187, 261, 190, 262, 41, 47, 158, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 241, 127, 42, 344, 52, 238, 249, @@ -947,12 +947,12 @@ static const yytype_int16 yytable[] = 195, 163, 170, 2, 100, 176, 177, 309, 126, 127, 3, 310, 126, 127, 185, 4, 128, 311, 312, 196, 128, 103, 5, 6, 181, 103, 187, 215, 343, 218, - 227, 7, 8, 222, 229, -197, 313, 9, 230, 234, + 227, 7, 8, 222, 229, -196, 313, 9, 230, 234, 197, 233, 10, 195, 237, 9, 247, 259, 198, 199, 244, 265, 285, 290, 300, 200, 201, 202, 303, 203, 204, 205, 263, 317, 206, 207, 11, 208, 209, 210, 211, 212, 213, 199, 214, 321, 324, 348, 189, 200, - 214, 12, 325, 335, -198, -198, 196, 195, -198, -198, + 214, 12, 325, 335, -197, -197, 196, 195, -197, -197, 333, 208, 209, 210, 211, 212, 213, 336, 214, 334, 337, 340, 341, 349, 345, 352, 355, 245, 364, 175, 370, 88, 57, 195, 327, 328, 199, 72, 84, 329, @@ -965,11 +965,11 @@ static const yytype_int16 yytable[] = 210, 211, 212, 213, 0, 214, 199, 0, 0, 196, 0, 0, 200, 201, 202, 0, 203, 204, 205, 0, 0, 206, 207, 0, 208, 209, 210, 211, 212, 213, - 245, 214, 0, 0, 0, 0, 0, -198, 0, 199, + 245, 214, 0, 0, 0, 0, 0, -197, 0, 199, 0, 0, 0, 0, 0, 200, 201, 202, 0, 203, 204, 205, 0, 0, 206, 207, 0, 208, 209, 210, 211, 212, 213, 0, 214, 0, 0, 199, 0, 0, - 0, 0, 0, 200, -198, -198, 0, -198, 204, 205, + 0, 0, 0, 200, -197, -197, 0, -197, 204, 205, 0, 0, 206, 207, 0, 208, 209, 210, 211, 212, 213, 0, 214 }; @@ -1088,20 +1088,20 @@ static const yytype_uint8 yyr1[] = 170, 170, 170, 170, 171, 171, 171, 172, 172, 173, 174, 175, 175, 176, 176, 177, 178, 178, 179, 180, 180, 180, 181, 181, 182, 182, 183, 183, 184, 185, - 185, 185, 186, 186, 187, 188, 188, 189, 190, 190, - 191, 191, 192, 192, 193, 193, 194, 194, 195, 195, - 196, 197, 197, 197, 198, 198, 199, 199, 199, 200, - 200, 201, 201, 202, 203, 203, 203, 203, 203, 204, - 204, 204, 204, 204, 204, 204, 204, 204, 205, 205, - 206, 206, 206, 206, 206, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 208, 208, 209, 209, - 209, 209, 210, 210, 211, 211, 212, 212, 212, 212, - 212, 212, 213, 213, 214, 215, 216, 217, 217, 217, - 217, 218, 218, 218, 218, 219, 220, 220, 221, 222, - 223, 224, 224, 225, 225, 226, 226, 227, 227, 228, - 229, 230, 230, 231, 231, 232, 232, 233, 233, 233, - 234, 234, 234, 234, 234, 234, 234, 234, 235, 236, - 236, 237, 237 + 185, 185, 186, 186, 187, 188, 188, 189, 190, 191, + 191, 192, 192, 193, 193, 194, 194, 195, 195, 196, + 197, 197, 197, 198, 198, 199, 199, 199, 200, 200, + 201, 201, 202, 203, 203, 203, 203, 203, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 205, 205, 206, + 206, 206, 206, 206, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 208, 208, 209, 209, 209, + 209, 210, 210, 211, 211, 212, 212, 212, 212, 212, + 212, 213, 213, 214, 215, 216, 217, 217, 217, 217, + 218, 218, 218, 218, 219, 220, 220, 221, 222, 223, + 224, 224, 225, 225, 226, 226, 227, 227, 228, 229, + 230, 230, 231, 231, 232, 232, 233, 233, 233, 234, + 234, 234, 234, 234, 234, 234, 234, 235, 236, 236, + 237, 237 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1114,20 +1114,20 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 4, 4, 3, 2, 0, 4, 2, 8, 5, 3, 0, 5, 1, 3, 3, 1, 1, 5, 3, 3, 1, 1, 3, 5, 2, 1, - 1, 1, 1, 0, 7, 1, 0, 1, 2, 0, - 2, 0, 4, 0, 2, 0, 3, 0, 1, 3, - 2, 1, 1, 0, 2, 0, 2, 4, 0, 1, - 3, 1, 3, 2, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, - 2, 2, 2, 3, 4, 1, 3, 3, 3, 3, - 3, 3, 3, 4, 3, 3, 3, 3, 5, 6, - 5, 6, 6, 8, 4, 5, 3, 3, 3, 3, - 3, 3, 3, 5, 4, 4, 5, 1, 3, 1, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 4, 1, 3, 2, - 1, 1, 3, 2, 1, 1, 0, 4, 6, 8, - 1, 1, 2, 2, 1, 1, 1, 0, 1, 1, - 0, 1, 3 + 1, 1, 1, 0, 7, 1, 0, 1, 2, 2, + 0, 4, 0, 2, 0, 3, 0, 1, 3, 2, + 1, 1, 0, 2, 0, 2, 4, 0, 1, 3, + 1, 3, 2, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, + 2, 2, 3, 4, 1, 3, 3, 3, 3, 3, + 3, 3, 4, 3, 3, 3, 3, 5, 6, 5, + 6, 6, 8, 4, 5, 3, 3, 3, 3, 3, + 3, 3, 5, 4, 4, 5, 1, 3, 1, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 4, 1, 3, 2, 1, + 1, 3, 2, 1, 1, 0, 4, 6, 8, 1, + 1, 2, 2, 1, 1, 1, 0, 1, 1, 0, + 1, 3 }; @@ -3077,484 +3077,478 @@ yyreduce: break; case 79: -#line 650 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table) = nullptr; } +#line 654 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } #line 3083 "bison_parser.cpp" /* yacc.c:1646 */ break; case 80: #line 655 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } + { (yyval.expr) = nullptr; } #line 3089 "bison_parser.cpp" /* yacc.c:1646 */ break; case 81: -#line 656 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3095 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 82: -#line 660 "bison_parser.y" /* yacc.c:1646 */ +#line 659 "bison_parser.y" /* yacc.c:1646 */ { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } +#line 3099 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 82: +#line 664 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.group_t) = nullptr; } #line 3105 "bison_parser.cpp" /* yacc.c:1646 */ break; case 83: -#line 665 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.group_t) = nullptr; } +#line 668 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } #line 3111 "bison_parser.cpp" /* yacc.c:1646 */ break; case 84: #line 669 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } + { (yyval.expr) = nullptr; } #line 3117 "bison_parser.cpp" /* yacc.c:1646 */ break; case 85: -#line 670 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } +#line 672 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = (yyvsp[0].order_vec); } #line 3123 "bison_parser.cpp" /* yacc.c:1646 */ break; case 86: #line 673 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = (yyvsp[0].order_vec); } + { (yyval.order_vec) = nullptr; } #line 3129 "bison_parser.cpp" /* yacc.c:1646 */ break; case 87: -#line 674 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = nullptr; } +#line 677 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } #line 3135 "bison_parser.cpp" /* yacc.c:1646 */ break; case 88: #line 678 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } + { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } #line 3141 "bison_parser.cpp" /* yacc.c:1646 */ break; case 89: -#line 679 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } +#line 682 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } #line 3147 "bison_parser.cpp" /* yacc.c:1646 */ break; case 90: -#line 683 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } +#line 686 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderAsc; } #line 3153 "bison_parser.cpp" /* yacc.c:1646 */ break; case 91: #line 687 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } + { (yyval.order_type) = kOrderDesc; } #line 3159 "bison_parser.cpp" /* yacc.c:1646 */ break; case 92: #line 688 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderDesc; } + { (yyval.order_type) = kOrderAsc; } #line 3165 "bison_parser.cpp" /* yacc.c:1646 */ break; case 93: -#line 689 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } +#line 694 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } #line 3171 "bison_parser.cpp" /* yacc.c:1646 */ break; case 94: #line 695 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } + { (yyval.limit) = nullptr; } #line 3177 "bison_parser.cpp" /* yacc.c:1646 */ break; case 95: -#line 696 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } +#line 699 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } #line 3183 "bison_parser.cpp" /* yacc.c:1646 */ break; case 96: #line 700 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } #line 3189 "bison_parser.cpp" /* yacc.c:1646 */ break; case 97: #line 701 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } + { (yyval.limit) = nullptr; } #line 3195 "bison_parser.cpp" /* yacc.c:1646 */ break; case 98: -#line 702 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } +#line 708 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } #line 3201 "bison_parser.cpp" /* yacc.c:1646 */ break; case 99: #line 709 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } #line 3207 "bison_parser.cpp" /* yacc.c:1646 */ break; case 100: -#line 710 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 713 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } #line 3213 "bison_parser.cpp" /* yacc.c:1646 */ break; case 101: #line 714 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } #line 3219 "bison_parser.cpp" /* yacc.c:1646 */ break; case 102: -#line 715 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3225 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 103: -#line 719 "bison_parser.y" /* yacc.c:1646 */ +#line 718 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); (yyval.expr)->alias = (yyvsp[0].sval); } +#line 3228 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 108: +#line 733 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[-1].expr); } #line 3234 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 109: -#line 734 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[-1].expr); } + case 116: +#line 741 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } #line 3240 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 117: -#line 742 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } + case 119: +#line 750 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } #line 3246 "bison_parser.cpp" /* yacc.c:1646 */ break; case 120: #line 751 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } #line 3252 "bison_parser.cpp" /* yacc.c:1646 */ break; case 121: #line 752 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } #line 3258 "bison_parser.cpp" /* yacc.c:1646 */ break; case 122: #line 753 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } #line 3264 "bison_parser.cpp" /* yacc.c:1646 */ break; case 123: #line 754 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } #line 3270 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 124: -#line 755 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } + case 125: +#line 759 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } #line 3276 "bison_parser.cpp" /* yacc.c:1646 */ break; case 126: #line 760 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } #line 3282 "bison_parser.cpp" /* yacc.c:1646 */ break; case 127: #line 761 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } #line 3288 "bison_parser.cpp" /* yacc.c:1646 */ break; case 128: #line 762 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } #line 3294 "bison_parser.cpp" /* yacc.c:1646 */ break; case 129: #line 763 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } #line 3300 "bison_parser.cpp" /* yacc.c:1646 */ break; case 130: #line 764 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } #line 3306 "bison_parser.cpp" /* yacc.c:1646 */ break; case 131: #line 765 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } #line 3312 "bison_parser.cpp" /* yacc.c:1646 */ break; case 132: #line 766 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } #line 3318 "bison_parser.cpp" /* yacc.c:1646 */ break; case 133: #line 767 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } #line 3324 "bison_parser.cpp" /* yacc.c:1646 */ break; case 134: #line 768 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } #line 3330 "bison_parser.cpp" /* yacc.c:1646 */ break; case 135: -#line 769 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } +#line 772 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } #line 3336 "bison_parser.cpp" /* yacc.c:1646 */ break; case 136: #line 773 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } #line 3342 "bison_parser.cpp" /* yacc.c:1646 */ break; case 137: -#line 774 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } +#line 777 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } #line 3348 "bison_parser.cpp" /* yacc.c:1646 */ break; case 138: #line 778 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } #line 3354 "bison_parser.cpp" /* yacc.c:1646 */ break; case 139: #line 779 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } #line 3360 "bison_parser.cpp" /* yacc.c:1646 */ break; case 140: #line 780 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } #line 3366 "bison_parser.cpp" /* yacc.c:1646 */ break; case 141: -#line 781 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } +#line 785 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } #line 3372 "bison_parser.cpp" /* yacc.c:1646 */ break; case 142: -#line 786 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 787 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } #line 3378 "bison_parser.cpp" /* yacc.c:1646 */ break; case 143: -#line 788 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 791 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } #line 3384 "bison_parser.cpp" /* yacc.c:1646 */ break; case 144: #line 792 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } #line 3390 "bison_parser.cpp" /* yacc.c:1646 */ break; case 145: -#line 793 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } +#line 796 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } #line 3396 "bison_parser.cpp" /* yacc.c:1646 */ break; case 146: #line 797 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } #line 3402 "bison_parser.cpp" /* yacc.c:1646 */ break; case 147: #line 798 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } #line 3408 "bison_parser.cpp" /* yacc.c:1646 */ break; case 148: #line 799 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } #line 3414 "bison_parser.cpp" /* yacc.c:1646 */ break; case 149: #line 800 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } #line 3420 "bison_parser.cpp" /* yacc.c:1646 */ break; case 150: #line 801 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } #line 3426 "bison_parser.cpp" /* yacc.c:1646 */ break; case 151: -#line 802 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } +#line 805 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } #line 3432 "bison_parser.cpp" /* yacc.c:1646 */ break; case 152: #line 806 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } #line 3438 "bison_parser.cpp" /* yacc.c:1646 */ break; case 153: -#line 807 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } +#line 810 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } #line 3444 "bison_parser.cpp" /* yacc.c:1646 */ break; case 154: -#line 811 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } +#line 814 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } #line 3450 "bison_parser.cpp" /* yacc.c:1646 */ break; case 155: -#line 815 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } +#line 818 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } #line 3456 "bison_parser.cpp" /* yacc.c:1646 */ break; case 156: -#line 819 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 822 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } #line 3462 "bison_parser.cpp" /* yacc.c:1646 */ break; case 157: #line 823 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } + { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } #line 3468 "bison_parser.cpp" /* yacc.c:1646 */ break; case 158: #line 824 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } + { (yyval.expr) = Expr::makeStar(); } #line 3474 "bison_parser.cpp" /* yacc.c:1646 */ break; case 159: #line 825 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeStar(); } + { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } #line 3480 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 160: -#line 826 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } + case 164: +#line 836 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } #line 3486 "bison_parser.cpp" /* yacc.c:1646 */ break; case 165: -#line 837 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } +#line 841 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } #line 3492 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 166: -#line 842 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } + case 167: +#line 846 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } #line 3498 "bison_parser.cpp" /* yacc.c:1646 */ break; case 168: -#line 847 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } +#line 850 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeNullLiteral(); } #line 3504 "bison_parser.cpp" /* yacc.c:1646 */ break; case 169: -#line 851 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeNullLiteral(); } -#line 3510 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 170: -#line 855 "bison_parser.y" /* yacc.c:1646 */ +#line 854 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 3520 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3514 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 172: -#line 868 "bison_parser.y" /* yacc.c:1646 */ + case 171: +#line 867 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[0].table_vec)->push_back((yyvsp[-2].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[0].table_vec); (yyval.table) = tbl; } -#line 3531 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3525 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 176: -#line 884 "bison_parser.y" /* yacc.c:1646 */ + case 175: +#line 883 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } +#line 3536 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 176: +#line 892 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } #line 3542 "bison_parser.cpp" /* yacc.c:1646 */ break; case 177: #line 893 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } + { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } #line 3548 "bison_parser.cpp" /* yacc.c:1646 */ break; case 178: -#line 894 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 3554 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 179: -#line 899 "bison_parser.y" /* yacc.c:1646 */ +#line 898 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_n).schema; @@ -3562,45 +3556,45 @@ yyreduce: tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3566 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3560 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 180: -#line 910 "bison_parser.y" /* yacc.c:1646 */ + case 179: +#line 909 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_n).schema; (yyval.table)->name = (yyvsp[0].table_n).name; } +#line 3570 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 180: +#line 918 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table_n).schema = nullptr; (yyval.table_n).name = (yyvsp[0].sval);} #line 3576 "bison_parser.cpp" /* yacc.c:1646 */ break; case 181: #line 919 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_n).schema = nullptr; (yyval.table_n).name = (yyvsp[0].sval);} + { (yyval.table_n).schema = (yyvsp[-2].sval); (yyval.table_n).name = (yyvsp[0].sval); } #line 3582 "bison_parser.cpp" /* yacc.c:1646 */ break; case 182: -#line 920 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_n).schema = (yyvsp[-2].sval); (yyval.table_n).name = (yyvsp[0].sval); } +#line 924 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.sval) = (yyvsp[0].sval); } #line 3588 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 183: -#line 925 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.sval) = (yyvsp[0].sval); } + case 185: +#line 930 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.sval) = nullptr; } #line 3594 "bison_parser.cpp" /* yacc.c:1646 */ break; case 186: -#line 931 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.sval) = nullptr; } -#line 3600 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 187: -#line 940 "bison_parser.y" /* yacc.c:1646 */ +#line 939 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3608,11 +3602,11 @@ yyreduce: (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 3612 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3606 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 188: -#line 948 "bison_parser.y" /* yacc.c:1646 */ + case 187: +#line 947 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3621,11 +3615,11 @@ yyreduce: (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 3625 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3619 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 189: -#line 958 "bison_parser.y" /* yacc.c:1646 */ + case 188: +#line 957 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3641,71 +3635,71 @@ yyreduce: (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } +#line 3639 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 189: +#line 975 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinInner; } #line 3645 "bison_parser.cpp" /* yacc.c:1646 */ break; case 190: #line 976 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } + { (yyval.uval) = kJoinOuter; } #line 3651 "bison_parser.cpp" /* yacc.c:1646 */ break; case 191: #line 977 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinOuter; } + { (yyval.uval) = kJoinLeftOuter; } #line 3657 "bison_parser.cpp" /* yacc.c:1646 */ break; case 192: #line 978 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeftOuter; } + { (yyval.uval) = kJoinRightOuter; } #line 3663 "bison_parser.cpp" /* yacc.c:1646 */ break; case 193: #line 979 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRightOuter; } + { (yyval.uval) = kJoinLeft; } #line 3669 "bison_parser.cpp" /* yacc.c:1646 */ break; case 194: #line 980 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeft; } + { (yyval.uval) = kJoinRight; } #line 3675 "bison_parser.cpp" /* yacc.c:1646 */ break; case 195: #line 981 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRight; } + { (yyval.uval) = kJoinCross; } #line 3681 "bison_parser.cpp" /* yacc.c:1646 */ break; case 196: #line 982 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinCross; } + { (yyval.uval) = kJoinInner; } #line 3687 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 197: -#line 983 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } + case 200: +#line 1002 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } #line 3693 "bison_parser.cpp" /* yacc.c:1646 */ break; case 201: #line 1003 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } + { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } #line 3699 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 202: -#line 1004 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 3705 "bison_parser.cpp" /* yacc.c:1646 */ - break; - -#line 3709 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3703 "bison_parser.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3940,7 +3934,7 @@ yyreturn: #endif return yyresult; } -#line 1007 "bison_parser.y" /* yacc.c:1906 */ +#line 1006 "bison_parser.y" /* yacc.c:1906 */ /********************************* ** Section 4: Additional C code From 7da22a8bb1fbe802fe14a4431285f5d63a5b3ba8 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 13 Sep 2017 21:59:15 +0800 Subject: [PATCH 12/19] fix %destructor of table_n --- src/parser/bison_parser.cpp | 516 ++++++++++++++++++------------------ src/parser/bison_parser.y | 3 +- 2 files changed, 260 insertions(+), 259 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 861f020..3bf56a0 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -687,27 +687,27 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 244, 244, 265, 266, 270, 274, 278, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 302, 303, 308, - 309, 313, 317, 329, 336, 339, 343, 355, 364, 368, - 378, 381, 395, 402, 409, 420, 421, 425, 426, 430, - 437, 438, 439, 440, 450, 456, 462, 470, 471, 480, - 489, 502, 509, 520, 521, 531, 540, 541, 545, 557, - 558, 559, 576, 577, 581, 582, 586, 596, 613, 617, - 618, 619, 623, 624, 628, 640, 641, 645, 649, 654, - 655, 659, 664, 668, 669, 672, 673, 677, 678, 682, - 686, 687, 688, 694, 695, 699, 700, 701, 708, 709, - 713, 714, 718, 725, 726, 727, 728, 729, 733, 734, - 735, 736, 737, 738, 739, 740, 741, 745, 746, 750, - 751, 752, 753, 754, 758, 759, 760, 761, 762, 763, - 764, 765, 766, 767, 768, 772, 773, 777, 778, 779, - 780, 785, 787, 791, 792, 796, 797, 798, 799, 800, - 801, 805, 806, 810, 814, 818, 822, 823, 824, 825, - 829, 830, 831, 832, 836, 841, 842, 846, 850, 854, - 866, 867, 877, 878, 882, 883, 892, 893, 898, 909, - 918, 919, 924, 925, 929, 930, 938, 946, 956, 975, - 976, 977, 978, 979, 980, 981, 982, 987, 996, 997, - 1002, 1003 + 0, 245, 245, 266, 267, 271, 275, 279, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 303, 304, 309, + 310, 314, 318, 330, 337, 340, 344, 356, 365, 369, + 379, 382, 396, 403, 410, 421, 422, 426, 427, 431, + 438, 439, 440, 441, 451, 457, 463, 471, 472, 481, + 490, 503, 510, 521, 522, 532, 541, 542, 546, 558, + 559, 560, 577, 578, 582, 583, 587, 597, 614, 618, + 619, 620, 624, 625, 629, 641, 642, 646, 650, 655, + 656, 660, 665, 669, 670, 673, 674, 678, 679, 683, + 687, 688, 689, 695, 696, 700, 701, 702, 709, 710, + 714, 715, 719, 726, 727, 728, 729, 730, 734, 735, + 736, 737, 738, 739, 740, 741, 742, 746, 747, 751, + 752, 753, 754, 755, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 773, 774, 778, 779, 780, + 781, 786, 788, 792, 793, 797, 798, 799, 800, 801, + 802, 806, 807, 811, 815, 819, 823, 824, 825, 826, + 830, 831, 832, 833, 837, 842, 843, 847, 851, 855, + 867, 868, 878, 879, 883, 884, 893, 894, 899, 910, + 919, 920, 925, 926, 930, 931, 939, 947, 957, 976, + 977, 978, 979, 980, 981, 982, 983, 988, 997, 998, + 1003, 1004 }; #endif @@ -1624,13 +1624,13 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio switch (yytype) { case 3: /* IDENTIFIER */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } #line 1630 "bison_parser.cpp" /* yacc.c:1257 */ break; case 4: /* STRING */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } #line 1636 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -1648,7 +1648,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 153: /* statement_list */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1661,19 +1661,19 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 154: /* statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } #line 1667 "bison_parser.cpp" /* yacc.c:1257 */ break; case 155: /* preparable_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } #line 1673 "bison_parser.cpp" /* yacc.c:1257 */ break; case 156: /* opt_hints */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1686,7 +1686,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 157: /* hint_list */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1699,31 +1699,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 158: /* hint */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 1705 "bison_parser.cpp" /* yacc.c:1257 */ break; case 159: /* prepare_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).prep_stmt)); } #line 1711 "bison_parser.cpp" /* yacc.c:1257 */ break; case 160: /* prepare_target_query */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } #line 1717 "bison_parser.cpp" /* yacc.c:1257 */ break; case 161: /* execute_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).exec_stmt)); } #line 1723 "bison_parser.cpp" /* yacc.c:1257 */ break; case 162: /* import_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).import_stmt)); } #line 1729 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -1735,19 +1735,19 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 164: /* file_path */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } #line 1741 "bison_parser.cpp" /* yacc.c:1257 */ break; case 165: /* show_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).show_stmt)); } #line 1747 "bison_parser.cpp" /* yacc.c:1257 */ break; case 166: /* create_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).create_stmt)); } #line 1753 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -1759,7 +1759,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 168: /* column_def_commalist */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -1772,7 +1772,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 169: /* column_def */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).column_t)); } #line 1778 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -1784,7 +1784,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 171: /* drop_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).drop_stmt)); } #line 1790 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -1796,25 +1796,25 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 173: /* delete_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } #line 1802 "bison_parser.cpp" /* yacc.c:1257 */ break; case 174: /* truncate_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } #line 1808 "bison_parser.cpp" /* yacc.c:1257 */ break; case 175: /* insert_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).insert_stmt)); } #line 1814 "bison_parser.cpp" /* yacc.c:1257 */ break; case 176: /* opt_column_list */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -1827,13 +1827,13 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 177: /* update_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_stmt)); } #line 1833 "bison_parser.cpp" /* yacc.c:1257 */ break; case 178: /* update_clause_commalist */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -1846,37 +1846,37 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 179: /* update_clause */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_t)); } #line 1852 "bison_parser.cpp" /* yacc.c:1257 */ break; case 180: /* select_statement */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } #line 1858 "bison_parser.cpp" /* yacc.c:1257 */ break; case 181: /* select_with_paren */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } #line 1864 "bison_parser.cpp" /* yacc.c:1257 */ break; case 182: /* select_paren_or_clause */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } #line 1870 "bison_parser.cpp" /* yacc.c:1257 */ break; case 183: /* select_no_paren */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } #line 1876 "bison_parser.cpp" /* yacc.c:1257 */ break; case 187: /* select_clause */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } #line 1882 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -1888,7 +1888,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 189: /* select_list */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1901,31 +1901,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 190: /* from_clause */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } #line 1907 "bison_parser.cpp" /* yacc.c:1257 */ break; case 191: /* opt_where */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 1913 "bison_parser.cpp" /* yacc.c:1257 */ break; case 192: /* opt_group */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).group_t)); } #line 1919 "bison_parser.cpp" /* yacc.c:1257 */ break; case 193: /* opt_having */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 1925 "bison_parser.cpp" /* yacc.c:1257 */ break; case 194: /* opt_order */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1938,7 +1938,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 195: /* order_list */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1951,7 +1951,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 196: /* order_desc */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).order)); } #line 1957 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -1963,19 +1963,19 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 198: /* opt_top */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } #line 1969 "bison_parser.cpp" /* yacc.c:1257 */ break; case 199: /* opt_limit */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } #line 1975 "bison_parser.cpp" /* yacc.c:1257 */ break; case 200: /* expr_list */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1988,7 +1988,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 201: /* literal_list */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -2001,157 +2001,157 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 202: /* expr_alias */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2007 "bison_parser.cpp" /* yacc.c:1257 */ break; case 203: /* expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2013 "bison_parser.cpp" /* yacc.c:1257 */ break; case 204: /* operand */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2019 "bison_parser.cpp" /* yacc.c:1257 */ break; case 205: /* scalar_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2025 "bison_parser.cpp" /* yacc.c:1257 */ break; case 206: /* unary_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2031 "bison_parser.cpp" /* yacc.c:1257 */ break; case 207: /* binary_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2037 "bison_parser.cpp" /* yacc.c:1257 */ break; case 208: /* logic_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2043 "bison_parser.cpp" /* yacc.c:1257 */ break; case 209: /* in_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2049 "bison_parser.cpp" /* yacc.c:1257 */ break; case 210: /* case_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2055 "bison_parser.cpp" /* yacc.c:1257 */ break; case 211: /* exists_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2061 "bison_parser.cpp" /* yacc.c:1257 */ break; case 212: /* comp_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2067 "bison_parser.cpp" /* yacc.c:1257 */ break; case 213: /* function_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2073 "bison_parser.cpp" /* yacc.c:1257 */ break; case 214: /* array_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2079 "bison_parser.cpp" /* yacc.c:1257 */ break; case 215: /* array_index */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2085 "bison_parser.cpp" /* yacc.c:1257 */ break; case 216: /* between_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2091 "bison_parser.cpp" /* yacc.c:1257 */ break; case 217: /* column_name */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2097 "bison_parser.cpp" /* yacc.c:1257 */ break; case 218: /* literal */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2103 "bison_parser.cpp" /* yacc.c:1257 */ break; case 219: /* string_literal */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2109 "bison_parser.cpp" /* yacc.c:1257 */ break; case 220: /* num_literal */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2115 "bison_parser.cpp" /* yacc.c:1257 */ break; case 221: /* int_literal */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2121 "bison_parser.cpp" /* yacc.c:1257 */ break; case 222: /* null_literal */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2127 "bison_parser.cpp" /* yacc.c:1257 */ break; case 223: /* param_expr */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2133 "bison_parser.cpp" /* yacc.c:1257 */ break; case 224: /* table_ref */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } #line 2139 "bison_parser.cpp" /* yacc.c:1257 */ break; case 225: /* table_ref_atomic */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } #line 2145 "bison_parser.cpp" /* yacc.c:1257 */ break; case 226: /* nonjoin_table_ref_atomic */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } #line 2151 "bison_parser.cpp" /* yacc.c:1257 */ break; case 227: /* table_ref_commalist */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2164,37 +2164,37 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 228: /* table_ref_name */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } #line 2170 "bison_parser.cpp" /* yacc.c:1257 */ break; case 229: /* table_ref_name_no_alias */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } #line 2176 "bison_parser.cpp" /* yacc.c:1257 */ break; case 230: /* table_name */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ - { } +#line 137 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).table_n).name) ); free( (((*yyvaluep).table_n).schema) ); } #line 2182 "bison_parser.cpp" /* yacc.c:1257 */ break; case 231: /* alias */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } #line 2188 "bison_parser.cpp" /* yacc.c:1257 */ break; case 232: /* opt_alias */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } #line 2194 "bison_parser.cpp" /* yacc.c:1257 */ break; case 233: /* join_clause */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } #line 2200 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -2206,13 +2206,13 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio break; case 235: /* join_condition */ -#line 146 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } #line 2212 "bison_parser.cpp" /* yacc.c:1257 */ break; case 237: /* ident_commalist */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2526,7 +2526,7 @@ yyreduce: switch (yyn) { case 2: -#line 244 "bison_parser.y" /* yacc.c:1646 */ +#line 245 "bison_parser.y" /* yacc.c:1646 */ { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -2548,19 +2548,19 @@ yyreduce: break; case 3: -#line 265 "bison_parser.y" /* yacc.c:1646 */ +#line 266 "bison_parser.y" /* yacc.c:1646 */ { (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } #line 2554 "bison_parser.cpp" /* yacc.c:1646 */ break; case 4: -#line 266 "bison_parser.y" /* yacc.c:1646 */ +#line 267 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } #line 2560 "bison_parser.cpp" /* yacc.c:1646 */ break; case 5: -#line 270 "bison_parser.y" /* yacc.c:1646 */ +#line 271 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); @@ -2569,7 +2569,7 @@ yyreduce: break; case 6: -#line 274 "bison_parser.y" /* yacc.c:1646 */ +#line 275 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); @@ -2578,7 +2578,7 @@ yyreduce: break; case 7: -#line 278 "bison_parser.y" /* yacc.c:1646 */ +#line 279 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].show_stmt); } @@ -2586,85 +2586,85 @@ yyreduce: break; case 8: -#line 285 "bison_parser.y" /* yacc.c:1646 */ +#line 286 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].select_stmt); } #line 2592 "bison_parser.cpp" /* yacc.c:1646 */ break; case 9: -#line 286 "bison_parser.y" /* yacc.c:1646 */ +#line 287 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].import_stmt); } #line 2598 "bison_parser.cpp" /* yacc.c:1646 */ break; case 10: -#line 287 "bison_parser.y" /* yacc.c:1646 */ +#line 288 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].create_stmt); } #line 2604 "bison_parser.cpp" /* yacc.c:1646 */ break; case 11: -#line 288 "bison_parser.y" /* yacc.c:1646 */ +#line 289 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].insert_stmt); } #line 2610 "bison_parser.cpp" /* yacc.c:1646 */ break; case 12: -#line 289 "bison_parser.y" /* yacc.c:1646 */ +#line 290 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } #line 2616 "bison_parser.cpp" /* yacc.c:1646 */ break; case 13: -#line 290 "bison_parser.y" /* yacc.c:1646 */ +#line 291 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } #line 2622 "bison_parser.cpp" /* yacc.c:1646 */ break; case 14: -#line 291 "bison_parser.y" /* yacc.c:1646 */ +#line 292 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].update_stmt); } #line 2628 "bison_parser.cpp" /* yacc.c:1646 */ break; case 15: -#line 292 "bison_parser.y" /* yacc.c:1646 */ +#line 293 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].drop_stmt); } #line 2634 "bison_parser.cpp" /* yacc.c:1646 */ break; case 16: -#line 293 "bison_parser.y" /* yacc.c:1646 */ +#line 294 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].exec_stmt); } #line 2640 "bison_parser.cpp" /* yacc.c:1646 */ break; case 17: -#line 302 "bison_parser.y" /* yacc.c:1646 */ +#line 303 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } #line 2646 "bison_parser.cpp" /* yacc.c:1646 */ break; case 18: -#line 303 "bison_parser.y" /* yacc.c:1646 */ +#line 304 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = nullptr; } #line 2652 "bison_parser.cpp" /* yacc.c:1646 */ break; case 19: -#line 308 "bison_parser.y" /* yacc.c:1646 */ +#line 309 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } #line 2658 "bison_parser.cpp" /* yacc.c:1646 */ break; case 20: -#line 309 "bison_parser.y" /* yacc.c:1646 */ +#line 310 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } #line 2664 "bison_parser.cpp" /* yacc.c:1646 */ break; case 21: -#line 313 "bison_parser.y" /* yacc.c:1646 */ +#line 314 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); @@ -2673,7 +2673,7 @@ yyreduce: break; case 22: -#line 317 "bison_parser.y" /* yacc.c:1646 */ +#line 318 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); @@ -2683,7 +2683,7 @@ yyreduce: break; case 23: -#line 329 "bison_parser.y" /* yacc.c:1646 */ +#line 330 "bison_parser.y" /* yacc.c:1646 */ { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); @@ -2693,7 +2693,7 @@ yyreduce: break; case 25: -#line 339 "bison_parser.y" /* yacc.c:1646 */ +#line 340 "bison_parser.y" /* yacc.c:1646 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); @@ -2702,7 +2702,7 @@ yyreduce: break; case 26: -#line 343 "bison_parser.y" /* yacc.c:1646 */ +#line 344 "bison_parser.y" /* yacc.c:1646 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); @@ -2712,7 +2712,7 @@ yyreduce: break; case 27: -#line 355 "bison_parser.y" /* yacc.c:1646 */ +#line 356 "bison_parser.y" /* yacc.c:1646 */ { (yyval.import_stmt) = new ImportStatement((ImportType) (yyvsp[-4].uval)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); @@ -2723,19 +2723,19 @@ yyreduce: break; case 28: -#line 364 "bison_parser.y" /* yacc.c:1646 */ +#line 365 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kImportCSV; } #line 2729 "bison_parser.cpp" /* yacc.c:1646 */ break; case 29: -#line 368 "bison_parser.y" /* yacc.c:1646 */ +#line 369 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } #line 2735 "bison_parser.cpp" /* yacc.c:1646 */ break; case 30: -#line 378 "bison_parser.y" /* yacc.c:1646 */ +#line 379 "bison_parser.y" /* yacc.c:1646 */ { (yyval.show_stmt) = new ShowStatement(kShowTables); } @@ -2743,7 +2743,7 @@ yyreduce: break; case 31: -#line 381 "bison_parser.y" /* yacc.c:1646 */ +#line 382 "bison_parser.y" /* yacc.c:1646 */ { (yyval.show_stmt) = new ShowStatement(kShowColumns); (yyval.show_stmt)->schema = (yyvsp[0].table_n).schema; @@ -2753,7 +2753,7 @@ yyreduce: break; case 32: -#line 395 "bison_parser.y" /* yacc.c:1646 */ +#line 396 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -2765,7 +2765,7 @@ yyreduce: break; case 33: -#line 402 "bison_parser.y" /* yacc.c:1646 */ +#line 403 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -2777,7 +2777,7 @@ yyreduce: break; case 34: -#line 409 "bison_parser.y" /* yacc.c:1646 */ +#line 410 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -2790,31 +2790,31 @@ yyreduce: break; case 35: -#line 420 "bison_parser.y" /* yacc.c:1646 */ +#line 421 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } #line 2796 "bison_parser.cpp" /* yacc.c:1646 */ break; case 36: -#line 421 "bison_parser.y" /* yacc.c:1646 */ +#line 422 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } #line 2802 "bison_parser.cpp" /* yacc.c:1646 */ break; case 37: -#line 425 "bison_parser.y" /* yacc.c:1646 */ +#line 426 "bison_parser.y" /* yacc.c:1646 */ { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } #line 2808 "bison_parser.cpp" /* yacc.c:1646 */ break; case 38: -#line 426 "bison_parser.y" /* yacc.c:1646 */ +#line 427 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } #line 2814 "bison_parser.cpp" /* yacc.c:1646 */ break; case 39: -#line 430 "bison_parser.y" /* yacc.c:1646 */ +#line 431 "bison_parser.y" /* yacc.c:1646 */ { (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); } @@ -2822,31 +2822,31 @@ yyreduce: break; case 40: -#line 437 "bison_parser.y" /* yacc.c:1646 */ +#line 438 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } #line 2828 "bison_parser.cpp" /* yacc.c:1646 */ break; case 41: -#line 438 "bison_parser.y" /* yacc.c:1646 */ +#line 439 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } #line 2834 "bison_parser.cpp" /* yacc.c:1646 */ break; case 42: -#line 439 "bison_parser.y" /* yacc.c:1646 */ +#line 440 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::DOUBLE; } #line 2840 "bison_parser.cpp" /* yacc.c:1646 */ break; case 43: -#line 440 "bison_parser.y" /* yacc.c:1646 */ +#line 441 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::TEXT; } #line 2846 "bison_parser.cpp" /* yacc.c:1646 */ break; case 44: -#line 450 "bison_parser.y" /* yacc.c:1646 */ +#line 451 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropTable); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); @@ -2857,7 +2857,7 @@ yyreduce: break; case 45: -#line 456 "bison_parser.y" /* yacc.c:1646 */ +#line 457 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropView); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); @@ -2868,7 +2868,7 @@ yyreduce: break; case 46: -#line 462 "bison_parser.y" /* yacc.c:1646 */ +#line 463 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; @@ -2878,19 +2878,19 @@ yyreduce: break; case 47: -#line 470 "bison_parser.y" /* yacc.c:1646 */ +#line 471 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } #line 2884 "bison_parser.cpp" /* yacc.c:1646 */ break; case 48: -#line 471 "bison_parser.y" /* yacc.c:1646 */ +#line 472 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } #line 2890 "bison_parser.cpp" /* yacc.c:1646 */ break; case 49: -#line 480 "bison_parser.y" /* yacc.c:1646 */ +#line 481 "bison_parser.y" /* yacc.c:1646 */ { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[-1].table_n).schema; @@ -2901,7 +2901,7 @@ yyreduce: break; case 50: -#line 489 "bison_parser.y" /* yacc.c:1646 */ +#line 490 "bison_parser.y" /* yacc.c:1646 */ { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_n).schema; @@ -2911,7 +2911,7 @@ yyreduce: break; case 51: -#line 502 "bison_parser.y" /* yacc.c:1646 */ +#line 503 "bison_parser.y" /* yacc.c:1646 */ { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_n).schema; @@ -2923,7 +2923,7 @@ yyreduce: break; case 52: -#line 509 "bison_parser.y" /* yacc.c:1646 */ +#line 510 "bison_parser.y" /* yacc.c:1646 */ { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_n).schema; @@ -2935,19 +2935,19 @@ yyreduce: break; case 53: -#line 520 "bison_parser.y" /* yacc.c:1646 */ +#line 521 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = (yyvsp[-1].str_vec); } #line 2941 "bison_parser.cpp" /* yacc.c:1646 */ break; case 54: -#line 521 "bison_parser.y" /* yacc.c:1646 */ +#line 522 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = nullptr; } #line 2947 "bison_parser.cpp" /* yacc.c:1646 */ break; case 55: -#line 531 "bison_parser.y" /* yacc.c:1646 */ +#line 532 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_stmt) = new UpdateStatement(); (yyval.update_stmt)->table = (yyvsp[-3].table); @@ -2958,19 +2958,19 @@ yyreduce: break; case 56: -#line 540 "bison_parser.y" /* yacc.c:1646 */ +#line 541 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } #line 2964 "bison_parser.cpp" /* yacc.c:1646 */ break; case 57: -#line 541 "bison_parser.y" /* yacc.c:1646 */ +#line 542 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } #line 2970 "bison_parser.cpp" /* yacc.c:1646 */ break; case 58: -#line 545 "bison_parser.y" /* yacc.c:1646 */ +#line 546 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); @@ -2980,7 +2980,7 @@ yyreduce: break; case 61: -#line 559 "bison_parser.y" /* yacc.c:1646 */ +#line 560 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -2999,19 +2999,19 @@ yyreduce: break; case 62: -#line 576 "bison_parser.y" /* yacc.c:1646 */ +#line 577 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } #line 3005 "bison_parser.cpp" /* yacc.c:1646 */ break; case 63: -#line 577 "bison_parser.y" /* yacc.c:1646 */ +#line 578 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } #line 3011 "bison_parser.cpp" /* yacc.c:1646 */ break; case 66: -#line 586 "bison_parser.y" /* yacc.c:1646 */ +#line 587 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3026,7 +3026,7 @@ yyreduce: break; case 67: -#line 596 "bison_parser.y" /* yacc.c:1646 */ +#line 597 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -3045,7 +3045,7 @@ yyreduce: break; case 74: -#line 628 "bison_parser.y" /* yacc.c:1646 */ +#line 629 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3059,37 +3059,37 @@ yyreduce: break; case 75: -#line 640 "bison_parser.y" /* yacc.c:1646 */ +#line 641 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } #line 3065 "bison_parser.cpp" /* yacc.c:1646 */ break; case 76: -#line 641 "bison_parser.y" /* yacc.c:1646 */ +#line 642 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } #line 3071 "bison_parser.cpp" /* yacc.c:1646 */ break; case 78: -#line 649 "bison_parser.y" /* yacc.c:1646 */ +#line 650 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = (yyvsp[0].table); } #line 3077 "bison_parser.cpp" /* yacc.c:1646 */ break; case 79: -#line 654 "bison_parser.y" /* yacc.c:1646 */ +#line 655 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[0].expr); } #line 3083 "bison_parser.cpp" /* yacc.c:1646 */ break; case 80: -#line 655 "bison_parser.y" /* yacc.c:1646 */ +#line 656 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = nullptr; } #line 3089 "bison_parser.cpp" /* yacc.c:1646 */ break; case 81: -#line 659 "bison_parser.y" /* yacc.c:1646 */ +#line 660 "bison_parser.y" /* yacc.c:1646 */ { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); @@ -3099,127 +3099,127 @@ yyreduce: break; case 82: -#line 664 "bison_parser.y" /* yacc.c:1646 */ +#line 665 "bison_parser.y" /* yacc.c:1646 */ { (yyval.group_t) = nullptr; } #line 3105 "bison_parser.cpp" /* yacc.c:1646 */ break; case 83: -#line 668 "bison_parser.y" /* yacc.c:1646 */ +#line 669 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[0].expr); } #line 3111 "bison_parser.cpp" /* yacc.c:1646 */ break; case 84: -#line 669 "bison_parser.y" /* yacc.c:1646 */ +#line 670 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = nullptr; } #line 3117 "bison_parser.cpp" /* yacc.c:1646 */ break; case 85: -#line 672 "bison_parser.y" /* yacc.c:1646 */ +#line 673 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_vec) = (yyvsp[0].order_vec); } #line 3123 "bison_parser.cpp" /* yacc.c:1646 */ break; case 86: -#line 673 "bison_parser.y" /* yacc.c:1646 */ +#line 674 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_vec) = nullptr; } #line 3129 "bison_parser.cpp" /* yacc.c:1646 */ break; case 87: -#line 677 "bison_parser.y" /* yacc.c:1646 */ +#line 678 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } #line 3135 "bison_parser.cpp" /* yacc.c:1646 */ break; case 88: -#line 678 "bison_parser.y" /* yacc.c:1646 */ +#line 679 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } #line 3141 "bison_parser.cpp" /* yacc.c:1646 */ break; case 89: -#line 682 "bison_parser.y" /* yacc.c:1646 */ +#line 683 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } #line 3147 "bison_parser.cpp" /* yacc.c:1646 */ break; case 90: -#line 686 "bison_parser.y" /* yacc.c:1646 */ +#line 687 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderAsc; } #line 3153 "bison_parser.cpp" /* yacc.c:1646 */ break; case 91: -#line 687 "bison_parser.y" /* yacc.c:1646 */ +#line 688 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderDesc; } #line 3159 "bison_parser.cpp" /* yacc.c:1646 */ break; case 92: -#line 688 "bison_parser.y" /* yacc.c:1646 */ +#line 689 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderAsc; } #line 3165 "bison_parser.cpp" /* yacc.c:1646 */ break; case 93: -#line 694 "bison_parser.y" /* yacc.c:1646 */ +#line 695 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } #line 3171 "bison_parser.cpp" /* yacc.c:1646 */ break; case 94: -#line 695 "bison_parser.y" /* yacc.c:1646 */ +#line 696 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = nullptr; } #line 3177 "bison_parser.cpp" /* yacc.c:1646 */ break; case 95: -#line 699 "bison_parser.y" /* yacc.c:1646 */ +#line 700 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } #line 3183 "bison_parser.cpp" /* yacc.c:1646 */ break; case 96: -#line 700 "bison_parser.y" /* yacc.c:1646 */ +#line 701 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } #line 3189 "bison_parser.cpp" /* yacc.c:1646 */ break; case 97: -#line 701 "bison_parser.y" /* yacc.c:1646 */ +#line 702 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = nullptr; } #line 3195 "bison_parser.cpp" /* yacc.c:1646 */ break; case 98: -#line 708 "bison_parser.y" /* yacc.c:1646 */ +#line 709 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } #line 3201 "bison_parser.cpp" /* yacc.c:1646 */ break; case 99: -#line 709 "bison_parser.y" /* yacc.c:1646 */ +#line 710 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } #line 3207 "bison_parser.cpp" /* yacc.c:1646 */ break; case 100: -#line 713 "bison_parser.y" /* yacc.c:1646 */ +#line 714 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } #line 3213 "bison_parser.cpp" /* yacc.c:1646 */ break; case 101: -#line 714 "bison_parser.y" /* yacc.c:1646 */ +#line 715 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } #line 3219 "bison_parser.cpp" /* yacc.c:1646 */ break; case 102: -#line 718 "bison_parser.y" /* yacc.c:1646 */ +#line 719 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); (yyval.expr)->alias = (yyvsp[0].sval); @@ -3228,283 +3228,283 @@ yyreduce: break; case 108: -#line 733 "bison_parser.y" /* yacc.c:1646 */ +#line 734 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); } #line 3234 "bison_parser.cpp" /* yacc.c:1646 */ break; case 116: -#line 741 "bison_parser.y" /* yacc.c:1646 */ +#line 742 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } #line 3240 "bison_parser.cpp" /* yacc.c:1646 */ break; case 119: -#line 750 "bison_parser.y" /* yacc.c:1646 */ +#line 751 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } #line 3246 "bison_parser.cpp" /* yacc.c:1646 */ break; case 120: -#line 751 "bison_parser.y" /* yacc.c:1646 */ +#line 752 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } #line 3252 "bison_parser.cpp" /* yacc.c:1646 */ break; case 121: -#line 752 "bison_parser.y" /* yacc.c:1646 */ +#line 753 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } #line 3258 "bison_parser.cpp" /* yacc.c:1646 */ break; case 122: -#line 753 "bison_parser.y" /* yacc.c:1646 */ +#line 754 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } #line 3264 "bison_parser.cpp" /* yacc.c:1646 */ break; case 123: -#line 754 "bison_parser.y" /* yacc.c:1646 */ +#line 755 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } #line 3270 "bison_parser.cpp" /* yacc.c:1646 */ break; case 125: -#line 759 "bison_parser.y" /* yacc.c:1646 */ +#line 760 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } #line 3276 "bison_parser.cpp" /* yacc.c:1646 */ break; case 126: -#line 760 "bison_parser.y" /* yacc.c:1646 */ +#line 761 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } #line 3282 "bison_parser.cpp" /* yacc.c:1646 */ break; case 127: -#line 761 "bison_parser.y" /* yacc.c:1646 */ +#line 762 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } #line 3288 "bison_parser.cpp" /* yacc.c:1646 */ break; case 128: -#line 762 "bison_parser.y" /* yacc.c:1646 */ +#line 763 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } #line 3294 "bison_parser.cpp" /* yacc.c:1646 */ break; case 129: -#line 763 "bison_parser.y" /* yacc.c:1646 */ +#line 764 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } #line 3300 "bison_parser.cpp" /* yacc.c:1646 */ break; case 130: -#line 764 "bison_parser.y" /* yacc.c:1646 */ +#line 765 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } #line 3306 "bison_parser.cpp" /* yacc.c:1646 */ break; case 131: -#line 765 "bison_parser.y" /* yacc.c:1646 */ +#line 766 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } #line 3312 "bison_parser.cpp" /* yacc.c:1646 */ break; case 132: -#line 766 "bison_parser.y" /* yacc.c:1646 */ +#line 767 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } #line 3318 "bison_parser.cpp" /* yacc.c:1646 */ break; case 133: -#line 767 "bison_parser.y" /* yacc.c:1646 */ +#line 768 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } #line 3324 "bison_parser.cpp" /* yacc.c:1646 */ break; case 134: -#line 768 "bison_parser.y" /* yacc.c:1646 */ +#line 769 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } #line 3330 "bison_parser.cpp" /* yacc.c:1646 */ break; case 135: -#line 772 "bison_parser.y" /* yacc.c:1646 */ +#line 773 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } #line 3336 "bison_parser.cpp" /* yacc.c:1646 */ break; case 136: -#line 773 "bison_parser.y" /* yacc.c:1646 */ +#line 774 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } #line 3342 "bison_parser.cpp" /* yacc.c:1646 */ break; case 137: -#line 777 "bison_parser.y" /* yacc.c:1646 */ +#line 778 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } #line 3348 "bison_parser.cpp" /* yacc.c:1646 */ break; case 138: -#line 778 "bison_parser.y" /* yacc.c:1646 */ +#line 779 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } #line 3354 "bison_parser.cpp" /* yacc.c:1646 */ break; case 139: -#line 779 "bison_parser.y" /* yacc.c:1646 */ +#line 780 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } #line 3360 "bison_parser.cpp" /* yacc.c:1646 */ break; case 140: -#line 780 "bison_parser.y" /* yacc.c:1646 */ +#line 781 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } #line 3366 "bison_parser.cpp" /* yacc.c:1646 */ break; case 141: -#line 785 "bison_parser.y" /* yacc.c:1646 */ +#line 786 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } #line 3372 "bison_parser.cpp" /* yacc.c:1646 */ break; case 142: -#line 787 "bison_parser.y" /* yacc.c:1646 */ +#line 788 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } #line 3378 "bison_parser.cpp" /* yacc.c:1646 */ break; case 143: -#line 791 "bison_parser.y" /* yacc.c:1646 */ +#line 792 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } #line 3384 "bison_parser.cpp" /* yacc.c:1646 */ break; case 144: -#line 792 "bison_parser.y" /* yacc.c:1646 */ +#line 793 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } #line 3390 "bison_parser.cpp" /* yacc.c:1646 */ break; case 145: -#line 796 "bison_parser.y" /* yacc.c:1646 */ +#line 797 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } #line 3396 "bison_parser.cpp" /* yacc.c:1646 */ break; case 146: -#line 797 "bison_parser.y" /* yacc.c:1646 */ +#line 798 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } #line 3402 "bison_parser.cpp" /* yacc.c:1646 */ break; case 147: -#line 798 "bison_parser.y" /* yacc.c:1646 */ +#line 799 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } #line 3408 "bison_parser.cpp" /* yacc.c:1646 */ break; case 148: -#line 799 "bison_parser.y" /* yacc.c:1646 */ +#line 800 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } #line 3414 "bison_parser.cpp" /* yacc.c:1646 */ break; case 149: -#line 800 "bison_parser.y" /* yacc.c:1646 */ +#line 801 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } #line 3420 "bison_parser.cpp" /* yacc.c:1646 */ break; case 150: -#line 801 "bison_parser.y" /* yacc.c:1646 */ +#line 802 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } #line 3426 "bison_parser.cpp" /* yacc.c:1646 */ break; case 151: -#line 805 "bison_parser.y" /* yacc.c:1646 */ +#line 806 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } #line 3432 "bison_parser.cpp" /* yacc.c:1646 */ break; case 152: -#line 806 "bison_parser.y" /* yacc.c:1646 */ +#line 807 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } #line 3438 "bison_parser.cpp" /* yacc.c:1646 */ break; case 153: -#line 810 "bison_parser.y" /* yacc.c:1646 */ +#line 811 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } #line 3444 "bison_parser.cpp" /* yacc.c:1646 */ break; case 154: -#line 814 "bison_parser.y" /* yacc.c:1646 */ +#line 815 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } #line 3450 "bison_parser.cpp" /* yacc.c:1646 */ break; case 155: -#line 818 "bison_parser.y" /* yacc.c:1646 */ +#line 819 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } #line 3456 "bison_parser.cpp" /* yacc.c:1646 */ break; case 156: -#line 822 "bison_parser.y" /* yacc.c:1646 */ +#line 823 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } #line 3462 "bison_parser.cpp" /* yacc.c:1646 */ break; case 157: -#line 823 "bison_parser.y" /* yacc.c:1646 */ +#line 824 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } #line 3468 "bison_parser.cpp" /* yacc.c:1646 */ break; case 158: -#line 824 "bison_parser.y" /* yacc.c:1646 */ +#line 825 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar(); } #line 3474 "bison_parser.cpp" /* yacc.c:1646 */ break; case 159: -#line 825 "bison_parser.y" /* yacc.c:1646 */ +#line 826 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } #line 3480 "bison_parser.cpp" /* yacc.c:1646 */ break; case 164: -#line 836 "bison_parser.y" /* yacc.c:1646 */ +#line 837 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } #line 3486 "bison_parser.cpp" /* yacc.c:1646 */ break; case 165: -#line 841 "bison_parser.y" /* yacc.c:1646 */ +#line 842 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } #line 3492 "bison_parser.cpp" /* yacc.c:1646 */ break; case 167: -#line 846 "bison_parser.y" /* yacc.c:1646 */ +#line 847 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } #line 3498 "bison_parser.cpp" /* yacc.c:1646 */ break; case 168: -#line 850 "bison_parser.y" /* yacc.c:1646 */ +#line 851 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeNullLiteral(); } #line 3504 "bison_parser.cpp" /* yacc.c:1646 */ break; case 169: -#line 854 "bison_parser.y" /* yacc.c:1646 */ +#line 855 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); @@ -3514,7 +3514,7 @@ yyreduce: break; case 171: -#line 867 "bison_parser.y" /* yacc.c:1646 */ +#line 868 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[0].table_vec)->push_back((yyvsp[-2].table)); auto tbl = new TableRef(kTableCrossProduct); @@ -3525,7 +3525,7 @@ yyreduce: break; case 175: -#line 883 "bison_parser.y" /* yacc.c:1646 */ +#line 884 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); @@ -3536,19 +3536,19 @@ yyreduce: break; case 176: -#line 892 "bison_parser.y" /* yacc.c:1646 */ +#line 893 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } #line 3542 "bison_parser.cpp" /* yacc.c:1646 */ break; case 177: -#line 893 "bison_parser.y" /* yacc.c:1646 */ +#line 894 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } #line 3548 "bison_parser.cpp" /* yacc.c:1646 */ break; case 178: -#line 898 "bison_parser.y" /* yacc.c:1646 */ +#line 899 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_n).schema; @@ -3560,7 +3560,7 @@ yyreduce: break; case 179: -#line 909 "bison_parser.y" /* yacc.c:1646 */ +#line 910 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_n).schema; @@ -3570,31 +3570,31 @@ yyreduce: break; case 180: -#line 918 "bison_parser.y" /* yacc.c:1646 */ +#line 919 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table_n).schema = nullptr; (yyval.table_n).name = (yyvsp[0].sval);} #line 3576 "bison_parser.cpp" /* yacc.c:1646 */ break; case 181: -#line 919 "bison_parser.y" /* yacc.c:1646 */ +#line 920 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table_n).schema = (yyvsp[-2].sval); (yyval.table_n).name = (yyvsp[0].sval); } #line 3582 "bison_parser.cpp" /* yacc.c:1646 */ break; case 182: -#line 924 "bison_parser.y" /* yacc.c:1646 */ +#line 925 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = (yyvsp[0].sval); } #line 3588 "bison_parser.cpp" /* yacc.c:1646 */ break; case 185: -#line 930 "bison_parser.y" /* yacc.c:1646 */ +#line 931 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = nullptr; } #line 3594 "bison_parser.cpp" /* yacc.c:1646 */ break; case 186: -#line 939 "bison_parser.y" /* yacc.c:1646 */ +#line 940 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3606,7 +3606,7 @@ yyreduce: break; case 187: -#line 947 "bison_parser.y" /* yacc.c:1646 */ +#line 948 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3619,7 +3619,7 @@ yyreduce: break; case 188: -#line 957 "bison_parser.y" /* yacc.c:1646 */ +#line 958 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3639,61 +3639,61 @@ yyreduce: break; case 189: -#line 975 "bison_parser.y" /* yacc.c:1646 */ +#line 976 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinInner; } #line 3645 "bison_parser.cpp" /* yacc.c:1646 */ break; case 190: -#line 976 "bison_parser.y" /* yacc.c:1646 */ +#line 977 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinOuter; } #line 3651 "bison_parser.cpp" /* yacc.c:1646 */ break; case 191: -#line 977 "bison_parser.y" /* yacc.c:1646 */ +#line 978 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinLeftOuter; } #line 3657 "bison_parser.cpp" /* yacc.c:1646 */ break; case 192: -#line 978 "bison_parser.y" /* yacc.c:1646 */ +#line 979 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinRightOuter; } #line 3663 "bison_parser.cpp" /* yacc.c:1646 */ break; case 193: -#line 979 "bison_parser.y" /* yacc.c:1646 */ +#line 980 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinLeft; } #line 3669 "bison_parser.cpp" /* yacc.c:1646 */ break; case 194: -#line 980 "bison_parser.y" /* yacc.c:1646 */ +#line 981 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinRight; } #line 3675 "bison_parser.cpp" /* yacc.c:1646 */ break; case 195: -#line 981 "bison_parser.y" /* yacc.c:1646 */ +#line 982 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinCross; } #line 3681 "bison_parser.cpp" /* yacc.c:1646 */ break; case 196: -#line 982 "bison_parser.y" /* yacc.c:1646 */ +#line 983 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinInner; } #line 3687 "bison_parser.cpp" /* yacc.c:1646 */ break; case 200: -#line 1002 "bison_parser.y" /* yacc.c:1646 */ +#line 1003 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } #line 3693 "bison_parser.cpp" /* yacc.c:1646 */ break; case 201: -#line 1003 "bison_parser.y" /* yacc.c:1646 */ +#line 1004 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } #line 3699 "bison_parser.cpp" /* yacc.c:1646 */ break; @@ -3934,7 +3934,7 @@ yyreturn: #endif return yyresult; } -#line 1006 "bison_parser.y" /* yacc.c:1906 */ +#line 1007 "bison_parser.y" /* yacc.c:1906 */ /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index a2607d5..3cd7ed8 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -133,7 +133,8 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha /********************************* ** Descrutor symbols *********************************/ -%destructor { } +%destructor { } +%destructor { free( ($$.name) ); free( ($$.schema) ); } %destructor { free( ($$) ); } %destructor { if (($$) != nullptr) { From bdc9a4b939fab00f07c97ce6f2224bc03d50d382 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 13 Sep 2017 22:21:09 +0800 Subject: [PATCH 13/19] fix clang++ errror report --- src/parser/bison_parser.cpp | 2153 +++++++++++++++++------------------ src/parser/bison_parser.h | 5 +- src/parser/flex_lexer.cpp | 254 +++-- src/parser/flex_lexer.h | 61 +- 4 files changed, 1227 insertions(+), 1246 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 3bf56a0..6cbaf04 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -325,8 +325,7 @@ union HSQL_STYPE hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; - - hsql::TableName table_n; + hsql::TableRef* table; hsql::Expr* expr; hsql::OrderDescription* order; @@ -345,7 +344,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; -#line 349 "bison_parser.cpp" /* yacc.c:355 */ +#line 348 "bison_parser.cpp" /* yacc.c:355 */ }; typedef union HSQL_STYPE HSQL_STYPE; @@ -375,7 +374,7 @@ int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); /* Copy the second part of user declarations. */ -#line 379 "bison_parser.cpp" /* yacc.c:358 */ +#line 378 "bison_parser.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -619,16 +618,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 52 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 552 +#define YYLAST 574 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 151 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 87 +#define YYNNTS 86 /* YYNRULES -- Number of rules. */ -#define YYNRULES 201 +#define YYNRULES 199 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 371 +#define YYNSTATES 367 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -687,27 +686,26 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 245, 245, 266, 267, 271, 275, 279, 286, 287, - 288, 289, 290, 291, 292, 293, 294, 303, 304, 309, - 310, 314, 318, 330, 337, 340, 344, 356, 365, 369, - 379, 382, 396, 403, 410, 421, 422, 426, 427, 431, - 438, 439, 440, 441, 451, 457, 463, 471, 472, 481, - 490, 503, 510, 521, 522, 532, 541, 542, 546, 558, - 559, 560, 577, 578, 582, 583, 587, 597, 614, 618, - 619, 620, 624, 625, 629, 641, 642, 646, 650, 655, - 656, 660, 665, 669, 670, 673, 674, 678, 679, 683, - 687, 688, 689, 695, 696, 700, 701, 702, 709, 710, - 714, 715, 719, 726, 727, 728, 729, 730, 734, 735, - 736, 737, 738, 739, 740, 741, 742, 746, 747, 751, - 752, 753, 754, 755, 759, 760, 761, 762, 763, 764, - 765, 766, 767, 768, 769, 773, 774, 778, 779, 780, - 781, 786, 788, 792, 793, 797, 798, 799, 800, 801, - 802, 806, 807, 811, 815, 819, 823, 824, 825, 826, - 830, 831, 832, 833, 837, 842, 843, 847, 851, 855, - 867, 868, 878, 879, 883, 884, 893, 894, 899, 910, - 919, 920, 925, 926, 930, 931, 939, 947, 957, 976, - 977, 978, 979, 980, 981, 982, 983, 988, 997, 998, - 1003, 1004 + 0, 242, 242, 263, 264, 268, 272, 276, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 300, 301, 306, + 307, 311, 315, 327, 334, 337, 341, 353, 361, 365, + 375, 378, 391, 397, 403, 413, 414, 418, 419, 423, + 430, 431, 432, 433, 443, 447, 451, 463, 471, 483, + 489, 499, 500, 510, 519, 520, 524, 536, 537, 538, + 555, 556, 560, 561, 565, 575, 592, 596, 597, 598, + 602, 603, 607, 619, 620, 624, 628, 633, 634, 638, + 643, 647, 648, 651, 652, 656, 657, 661, 665, 666, + 667, 673, 674, 678, 679, 680, 687, 688, 692, 693, + 697, 704, 705, 706, 707, 708, 712, 713, 714, 715, + 716, 717, 718, 719, 720, 724, 725, 729, 730, 731, + 732, 733, 737, 738, 739, 740, 741, 742, 743, 744, + 745, 746, 747, 751, 752, 756, 757, 758, 759, 764, + 766, 770, 771, 775, 776, 777, 778, 779, 780, 784, + 785, 789, 793, 797, 801, 802, 803, 804, 808, 809, + 810, 811, 815, 820, 821, 825, 829, 833, 845, 846, + 856, 857, 861, 862, 871, 872, 877, 887, 895, 896, + 901, 902, 906, 907, 915, 923, 933, 952, 953, 954, + 955, 956, 957, 958, 959, 964, 973, 974, 979, 980 }; #endif @@ -740,12 +738,12 @@ static const char *const yytname[] = "prepare_statement", "prepare_target_query", "execute_statement", "import_statement", "import_file_type", "file_path", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", - "column_def", "column_type", "drop_statement", "opt_exists", - "delete_statement", "truncate_statement", "insert_statement", - "opt_column_list", "update_statement", "update_clause_commalist", - "update_clause", "select_statement", "select_with_paren", - "select_paren_or_clause", "select_no_paren", "set_operator", "set_type", - "opt_all", "select_clause", "opt_distinct", "select_list", "from_clause", + "column_def", "column_type", "drop_statement", "delete_statement", + "truncate_statement", "insert_statement", "opt_column_list", + "update_statement", "update_clause_commalist", "update_clause", + "select_statement", "select_with_paren", "select_paren_or_clause", + "select_no_paren", "set_operator", "set_type", "opt_all", + "select_clause", "opt_distinct", "select_list", "from_clause", "opt_where", "opt_group", "opt_having", "opt_order", "order_list", "order_desc", "opt_order_type", "opt_top", "opt_limit", "expr_list", "literal_list", "expr_alias", "expr", "operand", "scalar_expr", @@ -784,58 +782,57 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -232 +#define YYPACT_NINF -231 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-232))) + (!!((Yystate) == (-231))) -#define YYTABLE_NINF -197 +#define YYTABLE_NINF -195 #define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-197))) + (!!((Yytable_value) == (-195))) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { - 268, 42, 35, 73, 110, -43, -30, 39, 41, 32, - 35, 30, 11, -39, 147, 3, -232, 82, 82, -232, - -232, -232, -232, -232, -232, -232, -232, -232, -232, 28, - -232, 27, 169, 49, -232, 56, 126, 100, 100, 35, - 117, 35, 226, 205, 123, -232, 128, 128, 35, -232, - 101, 103, -232, 268, -232, 170, -232, -232, -232, -232, - -232, -39, 152, 144, -39, 194, -232, 258, 14, 261, - 159, 35, 35, 196, -232, 190, 127, -232, -232, -232, - 151, 270, 231, 35, 35, -232, -232, -232, -232, 131, - -232, 212, -232, -232, -232, 151, 212, 226, -232, -232, - -232, -232, -232, -232, -44, -232, -232, -232, -232, -232, - -232, -232, -232, 241, -56, 127, 151, -232, 280, 279, - -16, -84, 140, 188, 155, 161, 75, -232, 113, 213, - 157, -232, 65, 211, -232, -232, -232, -232, -232, -232, - -232, -232, -232, -232, -232, -232, -232, -232, 181, -61, - -232, -232, -232, -232, 306, 194, 164, -232, -46, 194, - 264, -232, 14, -232, 202, 315, 207, -78, 234, -232, - -232, -37, 179, -232, 2, 5, 276, 151, 185, 75, - 381, 151, 99, 180, -86, 4, 196, 151, -232, 151, - 324, 151, -232, -232, 75, -232, 75, -47, 186, -62, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 226, 151, 270, -232, 187, 34, - -232, -232, 151, -232, -232, -232, -232, 226, -232, 253, - 7, 48, -232, -39, 35, -232, 331, 14, -232, 151, - -232, -232, 192, -50, 276, 254, 26, -232, -232, -39, - -232, 24, -232, -232, 10, -232, 283, -232, -232, -232, - 256, 322, 409, 75, 210, 113, -232, 266, 217, 409, - 409, 409, 235, 235, 235, 235, 99, 99, -95, -95, - -95, 50, 218, -78, -232, 14, -232, 306, -232, -232, - 280, -232, -232, -232, -232, -232, -232, 315, -232, -232, - -232, 53, 59, -232, 75, 224, -232, 233, 277, -232, - -232, -232, 309, 312, 4, 295, -232, 267, -232, 75, - 409, 113, 238, 60, -232, -232, 69, -232, -232, -232, - -232, -232, 278, -232, 10, 4, -232, -232, 229, 236, - 4, 151, 381, 240, 78, -232, -232, -232, 75, -232, - -232, -232, 4, 142, -27, -232, -232, 348, 229, 243, - 151, 151, -232, -232, 6, -78, -232, -78, 242, 244, - -232 + 231, -3, 32, 33, 50, -30, 15, 22, 10, 34, + 32, -28, 9, -34, 115, 16, -231, 66, 66, -231, + -231, -231, -231, -231, -231, -231, -231, -231, -231, 20, + -231, 12, 160, 23, -231, 24, 96, 68, 68, 32, + 94, 32, 206, 205, 112, -231, 32, 32, 32, -231, + 78, 83, -231, 231, -231, 150, -231, -231, -231, -231, + -231, -34, 134, 125, -34, 178, -231, 242, 7, 245, + 141, 32, 32, 184, -231, 179, 123, -231, -231, -231, + 81, 257, -231, -231, -231, -231, -231, -231, 126, -231, + 210, -231, -231, -231, 81, 210, 206, -231, -231, -231, + -231, -231, -231, 29, -231, -231, -231, -231, -231, -231, + -231, -231, 232, -64, 123, 81, -231, 275, 278, -17, + 8, 133, 195, 146, 139, 177, -231, 70, 213, 148, + -231, 74, 211, -231, -231, -231, -231, -231, -231, -231, + -231, -231, -231, -231, -231, -231, -231, 169, -50, -231, + 295, 178, 152, -231, -59, 178, 259, -231, 7, -231, + 191, 304, 194, -53, 225, -231, -231, 48, 166, -231, + 2, 4, 268, 81, 173, 177, 377, 81, 149, 180, + -76, 13, 184, 81, -231, 81, 320, 81, -231, -231, + 177, -231, 177, -63, 176, 14, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 206, 81, 257, -231, 185, 54, -231, -231, 81, -231, + -231, -231, -231, 206, -231, 252, -6, 56, -231, -34, + 32, -231, 322, 7, -231, 81, -231, -231, 187, -39, + 268, 246, -32, -231, -231, -34, -231, 40, -231, -231, + 6, -231, 282, -231, -231, -231, 236, 318, 405, 177, + 198, 70, -231, 256, 212, 405, 405, 405, 431, 431, + 431, 431, 149, 149, -91, -91, -91, 30, 214, -53, + -231, 7, -231, 295, -231, -231, 275, -231, -231, -231, + -231, -231, -231, 304, -231, -231, -231, 60, 64, -231, + 177, 215, -231, 219, 270, -231, -231, -231, 289, 291, + 13, 280, -231, 253, -231, 177, 405, 70, 221, 65, + -231, -231, 76, -231, -231, -231, -231, -231, 274, -231, + 6, 13, -231, -231, 175, 220, 13, 81, 377, 224, + 93, -231, -231, -231, 177, -231, -231, -231, 13, 244, + -5, -231, -231, 344, 175, 226, 81, 81, -231, -231, + 5, -53, -231, -53, 227, 229, -231 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -843,72 +840,71 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, - 0, 0, 0, 0, 0, 199, 3, 18, 18, 16, - 9, 7, 10, 15, 12, 13, 11, 14, 8, 59, - 60, 86, 0, 180, 50, 25, 0, 36, 36, 0, - 0, 0, 0, 76, 0, 179, 48, 48, 0, 30, - 0, 0, 1, 198, 2, 0, 6, 5, 70, 71, - 69, 0, 73, 0, 0, 97, 46, 0, 0, 0, - 0, 0, 0, 80, 28, 0, 54, 167, 93, 75, - 0, 0, 0, 0, 0, 31, 63, 62, 4, 0, - 64, 86, 65, 72, 68, 0, 86, 0, 66, 181, - 164, 165, 168, 169, 0, 100, 160, 161, 166, 162, - 163, 24, 23, 0, 0, 54, 0, 49, 0, 0, - 0, 156, 0, 0, 0, 0, 0, 158, 0, 0, - 77, 98, 185, 103, 110, 111, 112, 105, 107, 113, - 106, 124, 114, 115, 109, 104, 117, 118, 0, 80, - 56, 47, 44, 45, 0, 97, 85, 87, 92, 97, - 95, 26, 0, 35, 0, 0, 0, 79, 0, 29, - 200, 0, 0, 52, 76, 0, 0, 0, 0, 0, - 120, 0, 119, 0, 0, 0, 80, 0, 183, 0, - 0, 0, 184, 102, 0, 121, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, + 0, 0, 0, 0, 0, 197, 3, 18, 18, 16, + 9, 7, 10, 15, 12, 13, 11, 14, 8, 57, + 58, 84, 0, 178, 48, 25, 0, 36, 36, 0, + 0, 0, 0, 74, 0, 177, 0, 0, 0, 30, + 0, 0, 1, 196, 2, 0, 6, 5, 68, 69, + 67, 0, 71, 0, 0, 95, 46, 0, 0, 0, + 0, 0, 0, 78, 28, 0, 52, 165, 91, 73, + 0, 0, 44, 45, 31, 61, 60, 4, 0, 62, + 84, 63, 70, 66, 0, 84, 0, 64, 179, 162, + 163, 166, 167, 0, 98, 158, 159, 164, 160, 161, + 24, 23, 0, 0, 52, 0, 47, 0, 0, 0, + 154, 0, 0, 0, 0, 0, 156, 0, 0, 75, + 96, 183, 101, 108, 109, 110, 103, 105, 111, 104, + 122, 112, 113, 107, 102, 115, 116, 0, 78, 54, + 0, 95, 83, 85, 90, 95, 93, 26, 0, 35, + 0, 0, 0, 77, 0, 29, 198, 0, 0, 50, + 74, 0, 0, 0, 0, 0, 118, 0, 117, 0, + 0, 0, 78, 0, 181, 0, 0, 0, 182, 100, + 0, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 55, 21, 0, - 19, 61, 0, 91, 90, 89, 67, 0, 101, 0, - 0, 0, 37, 0, 0, 53, 0, 0, 151, 0, - 157, 159, 0, 0, 0, 0, 0, 116, 108, 0, - 78, 170, 172, 174, 185, 173, 82, 99, 135, 182, - 136, 0, 131, 0, 0, 0, 122, 0, 134, 133, - 145, 146, 147, 148, 149, 150, 126, 125, 128, 127, - 129, 130, 0, 58, 57, 0, 17, 0, 88, 96, - 0, 41, 42, 43, 40, 39, 33, 0, 34, 27, - 201, 0, 0, 143, 0, 0, 153, 0, 0, 195, - 189, 190, 194, 193, 0, 0, 178, 0, 74, 0, - 132, 0, 0, 0, 123, 154, 0, 20, 32, 38, - 51, 152, 0, 144, 185, 0, 192, 191, 176, 171, - 0, 0, 155, 0, 0, 139, 137, 22, 0, 141, - 175, 186, 0, 196, 84, 140, 138, 0, 177, 0, - 0, 0, 81, 142, 0, 197, 187, 83, 156, 0, - 188 + 0, 0, 0, 53, 21, 0, 19, 59, 0, 89, + 88, 87, 65, 0, 99, 0, 0, 0, 37, 0, + 0, 51, 0, 0, 149, 0, 155, 157, 0, 0, + 0, 0, 0, 114, 106, 0, 76, 168, 170, 172, + 183, 171, 80, 97, 133, 180, 134, 0, 129, 0, + 0, 0, 120, 0, 132, 131, 143, 144, 145, 146, + 147, 148, 124, 123, 126, 125, 127, 128, 0, 56, + 55, 0, 17, 0, 86, 94, 0, 41, 42, 43, + 40, 39, 33, 0, 34, 27, 199, 0, 0, 141, + 0, 0, 151, 0, 0, 193, 187, 188, 192, 191, + 0, 0, 176, 0, 72, 0, 130, 0, 0, 0, + 121, 152, 0, 20, 32, 38, 49, 150, 0, 142, + 183, 0, 190, 189, 174, 169, 0, 0, 153, 0, + 0, 137, 135, 22, 0, 139, 173, 184, 0, 194, + 82, 138, 136, 0, 175, 0, 0, 0, 79, 140, + 0, 195, 185, 81, 154, 0, 186 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -232, -232, -232, 338, -232, 374, -232, 107, -232, -232, - -232, -232, -232, 105, -232, -232, 359, -232, 102, -232, - -232, 351, -232, -232, -232, 285, -232, -232, 189, -64, - 13, 337, -13, 378, -232, -232, 182, 246, -232, -232, - -128, -232, -232, 91, -232, 200, -232, -232, -68, -175, - -220, 245, -94, -71, -232, -232, -232, -232, -232, -232, - -232, -232, -232, -232, -232, -232, 61, -66, -113, -232, - -38, -232, -232, -232, -162, 88, -232, -232, -232, 1, - -232, -231, -232, -232, -232, -232, -232 + -231, -231, -231, 307, -231, 354, -231, 90, -231, -231, + -231, -231, -231, 91, -231, -231, 340, -231, 87, -231, + -231, -231, -231, -231, 267, -231, -231, 170, -140, 52, + 321, -13, 353, -231, -231, 190, 216, -231, -231, -121, + -231, -231, 72, -231, 172, -231, -231, 41, -171, -203, + 204, -93, -68, -231, -231, -231, -231, -231, -231, -231, + -231, -231, -231, -231, -231, 28, -65, -112, -231, -38, + -231, -231, -231, -149, 62, -231, -231, -231, 0, -231, + -230, -231, -231, -231, -231, -231 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 14, 15, 16, 17, 56, 219, 220, 18, 112, - 19, 20, 75, 168, 21, 22, 71, 231, 232, 295, - 23, 83, 24, 25, 26, 120, 27, 149, 150, 28, - 29, 91, 30, 61, 62, 94, 31, 80, 129, 186, - 117, 318, 362, 65, 156, 157, 225, 43, 98, 130, - 104, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 106, 107, - 108, 109, 110, 250, 251, 252, 339, 253, 44, 254, - 192, 193, 255, 315, 366, 54, 171 + -1, 14, 15, 16, 17, 56, 215, 216, 18, 111, + 19, 20, 75, 164, 21, 22, 71, 227, 228, 291, + 23, 24, 25, 26, 119, 27, 148, 149, 28, 29, + 90, 30, 61, 62, 93, 31, 80, 128, 182, 116, + 314, 358, 65, 152, 153, 221, 43, 97, 129, 103, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 105, 106, 107, + 108, 109, 246, 247, 248, 335, 249, 44, 250, 188, + 189, 251, 311, 362, 54, 167 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -916,122 +912,126 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 51, 158, 105, 34, 78, 169, 246, 33, 240, 368, - 9, 45, 116, 188, 79, 361, 189, 301, 100, 101, - 77, 217, 167, 316, 189, 164, 50, 37, 266, 200, - 48, 223, 291, 9, 184, 191, 58, 58, 33, 172, - 73, 263, 76, 191, 292, 304, 213, 267, 214, 85, - 308, 39, 189, 180, 38, 182, 189, 224, 256, 160, - 248, 174, 49, 175, 302, 326, 59, 59, 188, 32, - 264, 191, 114, 115, 90, 191, 35, 90, 121, 100, - 101, 77, 309, 243, 152, 153, 310, 221, 216, 165, - 323, 226, 311, 312, 63, 258, 228, 260, 60, 60, - 46, 293, 161, 350, 102, 162, 13, 173, 180, 235, - -196, 313, 236, 36, 294, 183, 121, 100, 101, 77, - 40, 283, 187, 261, 190, 262, 41, 47, 158, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 241, 127, 42, 344, 52, 238, 249, - 123, 53, 338, 122, 121, 100, 101, 77, 121, 100, - 101, 77, 9, 242, 103, 102, 354, 189, 308, 298, - 306, 105, 66, 314, 200, 187, 282, 169, 353, 190, - 286, 55, 155, 287, 179, 307, 191, 159, 123, 289, - 358, 122, 320, 214, 296, 178, 67, 297, 125, 330, - 309, 68, 162, 102, 310, 331, 346, 69, 187, 187, - 311, 312, 126, 127, 359, 347, 70, 79, 162, 105, - 128, 74, 124, 200, 356, 103, 123, 187, 194, 313, - 123, 305, 77, 332, 81, 299, 125, 210, 211, 212, - 213, 102, 214, 92, 82, 102, 92, 86, 342, 87, - 126, 127, 322, 93, 89, 308, 195, 97, 128, 95, - 124, 99, 360, 103, 179, 111, 365, 367, 113, 116, - 118, 151, 119, 148, 125, 1, 154, 357, 125, 63, - 195, 163, 170, 2, 100, 176, 177, 309, 126, 127, - 3, 310, 126, 127, 185, 4, 128, 311, 312, 196, - 128, 103, 5, 6, 181, 103, 187, 215, 343, 218, - 227, 7, 8, 222, 229, -196, 313, 9, 230, 234, - 197, 233, 10, 195, 237, 9, 247, 259, 198, 199, - 244, 265, 285, 290, 300, 200, 201, 202, 303, 203, - 204, 205, 263, 317, 206, 207, 11, 208, 209, 210, - 211, 212, 213, 199, 214, 321, 324, 348, 189, 200, - 214, 12, 325, 335, -197, -197, 196, 195, -197, -197, - 333, 208, 209, 210, 211, 212, 213, 336, 214, 334, - 337, 340, 341, 349, 345, 352, 355, 245, 364, 175, - 370, 88, 57, 195, 327, 328, 199, 72, 84, 329, - 166, 96, 200, 201, 202, 284, 203, 204, 205, 64, - 196, 206, 207, 13, 208, 209, 210, 211, 212, 213, - 239, 214, 288, 351, 319, 369, 195, 0, 0, 0, - 0, 245, 257, 0, 0, 0, 196, 0, 0, 0, - 199, 0, 0, 0, 0, 0, 200, 201, 202, 0, - 203, 204, 205, 363, 195, 206, 207, 245, 208, 209, - 210, 211, 212, 213, 0, 214, 199, 0, 0, 196, - 0, 0, 200, 201, 202, 0, 203, 204, 205, 0, - 0, 206, 207, 0, 208, 209, 210, 211, 212, 213, - 245, 214, 0, 0, 0, 0, 0, -197, 0, 199, - 0, 0, 0, 0, 0, 200, 201, 202, 0, 203, - 204, 205, 0, 0, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 0, 214, 0, 0, 199, 0, 0, - 0, 0, 0, 200, -197, -197, 0, -197, 204, 205, - 0, 0, 206, 207, 0, 208, 209, 210, 211, 212, - 213, 0, 214 + 51, 154, 34, 104, 78, 165, 242, 236, 364, 184, + 45, 99, 100, 77, 79, 9, 33, 160, 219, 287, + 312, 58, 163, 115, 32, 259, 185, 213, 48, 58, + 297, 288, 9, 196, 180, 33, 35, 357, 168, 73, + 37, 76, 46, 185, 220, 187, 82, 83, 84, 185, + 209, 59, 210, 36, 260, 176, 300, 178, 156, 59, + 49, 252, 187, 185, 298, 50, 304, 38, 187, 47, + 244, 113, 114, 120, 99, 100, 77, 184, 322, 63, + 239, 161, 187, 60, 120, 99, 100, 77, 289, 294, + 319, 60, 254, 224, 256, 41, 39, 101, 305, 212, + 346, 290, 306, 40, 262, 303, 169, 176, 307, 308, + 121, 13, 302, 89, 179, 52, 89, 183, 279, 9, + 186, 121, 257, 263, 258, 154, -194, 309, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 237, 126, 183, 122, 340, 42, 234, 120, + 99, 100, 77, 170, 196, 171, 122, 102, 245, 238, + 101, 334, 151, 66, 53, 55, 350, 155, 104, 68, + 67, 101, 278, 210, 165, 157, 185, 69, 158, 123, + 120, 99, 100, 77, 70, 285, 174, 349, 186, 310, + 123, 316, 217, 124, 231, 187, 222, 232, 74, 354, + 282, 304, 292, 283, 124, 293, 326, 125, 126, 158, + 327, 342, 77, 183, 183, 127, 104, 79, 125, 126, + 102, 122, 343, 81, 85, 158, 127, 301, 190, 86, + 295, 102, 328, 305, 88, 92, 101, 306, 1, 352, + 94, 96, 183, 307, 308, 98, 2, 338, 318, 110, + 112, 91, 122, 3, 91, 175, 191, 115, 4, 117, + 147, -194, 309, 361, 363, 5, 6, 101, 118, 124, + 304, 150, 159, 196, 7, 8, 353, 63, 172, 99, + 9, 166, 177, 125, 126, 10, 175, 206, 207, 208, + 209, 127, 210, 173, 181, 211, 102, 183, 214, 192, + 124, 218, 305, 225, 339, 223, 306, 226, 229, 11, + 230, 233, 307, 308, 125, 126, 355, 9, 240, 191, + 193, 261, 127, 255, 12, 296, 243, 102, 194, 195, + 281, 309, 286, 299, 259, 196, 197, 198, 185, 199, + 200, 201, 313, 317, 202, 203, 320, 204, 205, 206, + 207, 208, 209, 344, 210, 210, 331, 332, 321, 333, + 87, 329, 192, 191, 356, 330, 336, 341, 337, 348, + 351, 360, 57, 323, 171, 366, 13, 324, 72, 345, + 325, 162, 280, 241, 64, 95, 235, 253, 365, 191, + 284, 0, 195, 347, 0, 0, 0, 0, 196, 197, + 198, 0, 199, 200, 201, 0, 192, 202, 203, 0, + 204, 205, 206, 207, 208, 209, 0, 210, 0, 0, + 315, 0, 191, 0, 0, 0, 0, 241, 0, 0, + 0, 0, 192, 0, 0, 0, 195, 0, 0, 0, + 0, 0, 196, 197, 198, 0, 199, 200, 201, 359, + 191, 202, 203, 241, 204, 205, 206, 207, 208, 209, + 0, 210, 195, 0, 0, 192, 0, 0, 196, 197, + 198, 0, 199, 200, 201, 0, 191, 202, 203, 0, + 204, 205, 206, 207, 208, 209, 241, 210, 0, 0, + 0, 0, 0, -195, 0, 195, 0, 0, 0, 0, + 0, 196, 197, 198, 0, 199, 200, 201, 0, 0, + 202, 203, 0, 204, 205, 206, 207, 208, 209, 0, + 210, 0, 0, 195, 0, 0, 0, 0, 0, 196, + -195, -195, 0, -195, 200, 201, 0, 0, 202, 203, + 0, 204, 205, 206, 207, 208, 209, 0, 210, 195, + 0, 0, 0, 0, 0, 196, 0, 0, 0, 0, + -195, -195, 0, 0, -195, -195, 0, 204, 205, 206, + 207, 208, 209, 0, 210 }; static const yytype_int16 yycheck[] = { - 13, 95, 68, 2, 42, 118, 181, 3, 3, 3, - 49, 10, 73, 3, 12, 42, 102, 237, 4, 5, - 6, 149, 116, 254, 102, 81, 13, 70, 90, 124, - 19, 77, 25, 49, 128, 121, 9, 9, 3, 55, - 39, 88, 41, 121, 37, 95, 141, 109, 143, 48, - 26, 81, 102, 124, 97, 126, 102, 103, 186, 97, - 146, 145, 51, 147, 239, 285, 39, 39, 3, 27, - 117, 121, 71, 72, 61, 121, 3, 64, 3, 4, - 5, 6, 58, 177, 83, 84, 62, 155, 149, 145, - 265, 159, 68, 69, 67, 189, 162, 191, 71, 71, - 70, 94, 146, 334, 90, 149, 145, 120, 179, 146, - 86, 87, 149, 3, 107, 128, 3, 4, 5, 6, - 81, 215, 149, 194, 114, 196, 85, 97, 222, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 138, 138, 113, 321, 0, 146, 145, - 75, 148, 314, 40, 3, 4, 5, 6, 3, 4, - 5, 6, 49, 176, 150, 90, 341, 102, 26, 233, - 144, 237, 3, 149, 124, 149, 214, 290, 340, 114, - 146, 99, 91, 149, 109, 249, 121, 96, 75, 227, - 352, 40, 263, 143, 146, 40, 147, 149, 123, 146, - 58, 145, 149, 90, 62, 146, 146, 81, 149, 149, - 68, 69, 137, 138, 72, 146, 116, 12, 149, 285, - 145, 104, 109, 124, 146, 150, 75, 149, 17, 87, - 75, 244, 6, 304, 111, 234, 123, 138, 139, 140, - 141, 90, 143, 61, 116, 90, 64, 146, 319, 146, - 137, 138, 265, 101, 84, 26, 45, 63, 145, 115, - 109, 3, 120, 150, 109, 4, 360, 361, 109, 73, - 80, 40, 145, 3, 123, 7, 145, 348, 123, 67, - 45, 40, 3, 15, 4, 145, 98, 58, 137, 138, - 22, 62, 137, 138, 81, 27, 145, 68, 69, 88, - 145, 150, 34, 35, 143, 150, 149, 126, 321, 3, - 46, 43, 44, 149, 112, 86, 87, 49, 3, 85, - 109, 114, 54, 45, 145, 49, 146, 3, 117, 118, - 145, 145, 145, 80, 3, 124, 125, 126, 146, 128, - 129, 130, 88, 60, 133, 134, 78, 136, 137, 138, - 139, 140, 141, 118, 143, 145, 90, 79, 102, 124, - 143, 93, 144, 86, 129, 130, 88, 45, 133, 134, - 146, 136, 137, 138, 139, 140, 141, 68, 143, 146, - 68, 86, 115, 105, 146, 149, 146, 109, 145, 147, - 146, 53, 18, 45, 287, 290, 118, 38, 47, 297, - 115, 64, 124, 125, 126, 216, 128, 129, 130, 31, - 88, 133, 134, 145, 136, 137, 138, 139, 140, 141, - 174, 143, 222, 335, 102, 364, 45, -1, -1, -1, - -1, 109, 187, -1, -1, -1, 88, -1, -1, -1, - 118, -1, -1, -1, -1, -1, 124, 125, 126, -1, - 128, 129, 130, 105, 45, 133, 134, 109, 136, 137, - 138, 139, 140, 141, -1, 143, 118, -1, -1, 88, - -1, -1, 124, 125, 126, -1, 128, 129, 130, -1, - -1, 133, 134, -1, 136, 137, 138, 139, 140, 141, - 109, 143, -1, -1, -1, -1, -1, 88, -1, 118, - -1, -1, -1, -1, -1, 124, 125, 126, -1, 128, + 13, 94, 2, 68, 42, 117, 177, 3, 3, 3, + 10, 4, 5, 6, 12, 49, 3, 81, 77, 25, + 250, 9, 115, 73, 27, 88, 102, 148, 19, 9, + 233, 37, 49, 124, 127, 3, 3, 42, 55, 39, + 70, 41, 70, 102, 103, 121, 46, 47, 48, 102, + 141, 39, 143, 3, 117, 123, 95, 125, 96, 39, + 51, 182, 121, 102, 235, 13, 26, 97, 121, 97, + 146, 71, 72, 3, 4, 5, 6, 3, 281, 67, + 173, 145, 121, 71, 3, 4, 5, 6, 94, 229, + 261, 71, 185, 158, 187, 85, 81, 90, 58, 149, + 330, 107, 62, 81, 90, 245, 119, 175, 68, 69, + 40, 145, 144, 61, 127, 0, 64, 149, 211, 49, + 114, 40, 190, 109, 192, 218, 86, 87, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 138, 138, 149, 75, 317, 113, 146, 3, + 4, 5, 6, 145, 124, 147, 75, 150, 145, 172, + 90, 310, 90, 3, 148, 99, 337, 95, 233, 145, + 147, 90, 210, 143, 286, 146, 102, 81, 149, 109, + 3, 4, 5, 6, 116, 223, 40, 336, 114, 149, + 109, 259, 151, 123, 146, 121, 155, 149, 104, 348, + 146, 26, 146, 149, 123, 149, 146, 137, 138, 149, + 146, 146, 6, 149, 149, 145, 281, 12, 137, 138, + 150, 75, 146, 111, 146, 149, 145, 240, 17, 146, + 230, 150, 300, 58, 84, 101, 90, 62, 7, 146, + 115, 63, 149, 68, 69, 3, 15, 315, 261, 4, + 109, 61, 75, 22, 64, 109, 45, 73, 27, 80, + 3, 86, 87, 356, 357, 34, 35, 90, 145, 123, + 26, 145, 40, 124, 43, 44, 344, 67, 145, 4, + 49, 3, 143, 137, 138, 54, 109, 138, 139, 140, + 141, 145, 143, 98, 81, 126, 150, 149, 3, 88, + 123, 149, 58, 112, 317, 46, 62, 3, 114, 78, + 85, 145, 68, 69, 137, 138, 72, 49, 145, 45, + 109, 145, 145, 3, 93, 3, 146, 150, 117, 118, + 145, 87, 80, 146, 88, 124, 125, 126, 102, 128, + 129, 130, 60, 145, 133, 134, 90, 136, 137, 138, + 139, 140, 141, 79, 143, 143, 86, 68, 144, 68, + 53, 146, 88, 45, 120, 146, 86, 146, 115, 149, + 146, 145, 18, 283, 147, 146, 145, 286, 38, 105, + 293, 114, 212, 109, 31, 64, 170, 183, 360, 45, + 218, -1, 118, 331, -1, -1, -1, -1, 124, 125, + 126, -1, 128, 129, 130, -1, 88, 133, 134, -1, + 136, 137, 138, 139, 140, 141, -1, 143, -1, -1, + 102, -1, 45, -1, -1, -1, -1, 109, -1, -1, + -1, -1, 88, -1, -1, -1, 118, -1, -1, -1, + -1, -1, 124, 125, 126, -1, 128, 129, 130, 105, + 45, 133, 134, 109, 136, 137, 138, 139, 140, 141, + -1, 143, 118, -1, -1, 88, -1, -1, 124, 125, + 126, -1, 128, 129, 130, -1, 45, 133, 134, -1, + 136, 137, 138, 139, 140, 141, 109, 143, -1, -1, + -1, -1, -1, 88, -1, 118, -1, -1, -1, -1, + -1, 124, 125, 126, -1, 128, 129, 130, -1, -1, + 133, 134, -1, 136, 137, 138, 139, 140, 141, -1, + 143, -1, -1, 118, -1, -1, -1, -1, -1, 124, + 125, 126, -1, 128, 129, 130, -1, -1, 133, 134, + -1, 136, 137, 138, 139, 140, 141, -1, 143, 118, + -1, -1, -1, -1, -1, 124, -1, -1, -1, -1, 129, 130, -1, -1, 133, 134, -1, 136, 137, 138, - 139, 140, 141, -1, 143, -1, -1, 118, -1, -1, - -1, -1, -1, 124, 125, 126, -1, 128, 129, 130, - -1, -1, 133, 134, -1, 136, 137, 138, 139, 140, - 141, -1, 143 + 139, 140, 141, -1, 143 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1040,42 +1040,41 @@ static const yytype_uint8 yystos[] = { 0, 7, 15, 22, 27, 34, 35, 43, 44, 49, 54, 78, 93, 145, 152, 153, 154, 155, 159, 161, - 162, 165, 166, 171, 173, 174, 175, 177, 180, 181, - 183, 187, 27, 3, 230, 3, 3, 70, 97, 81, - 81, 85, 113, 198, 229, 230, 70, 97, 19, 51, - 181, 183, 0, 148, 236, 99, 156, 156, 9, 39, - 71, 184, 185, 67, 184, 194, 3, 147, 145, 81, - 116, 167, 167, 230, 104, 163, 230, 6, 221, 12, - 188, 111, 116, 172, 172, 230, 146, 146, 154, 84, - 181, 182, 187, 101, 186, 115, 182, 63, 199, 3, - 4, 5, 90, 150, 201, 218, 219, 220, 221, 222, - 223, 4, 160, 109, 230, 230, 73, 191, 80, 145, - 176, 3, 40, 75, 109, 123, 137, 138, 145, 189, - 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 3, 178, - 179, 40, 230, 230, 145, 194, 195, 196, 203, 194, - 221, 146, 149, 40, 81, 145, 176, 203, 164, 219, - 3, 237, 55, 183, 145, 147, 145, 98, 40, 109, - 204, 143, 204, 183, 203, 81, 190, 149, 3, 102, - 114, 121, 231, 232, 17, 45, 88, 109, 117, 118, - 124, 125, 126, 128, 129, 130, 133, 134, 136, 137, - 138, 139, 140, 141, 143, 126, 149, 191, 3, 157, - 158, 199, 149, 77, 103, 197, 199, 46, 218, 112, - 3, 168, 169, 114, 85, 146, 149, 145, 146, 188, - 3, 138, 183, 203, 145, 109, 200, 146, 146, 145, - 224, 225, 226, 228, 230, 233, 191, 202, 203, 3, - 203, 204, 204, 88, 117, 145, 90, 109, 204, 204, - 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, - 204, 204, 221, 203, 179, 145, 146, 149, 196, 221, - 80, 25, 37, 94, 107, 170, 146, 149, 180, 230, - 3, 201, 200, 146, 95, 183, 144, 180, 26, 58, - 62, 68, 69, 87, 149, 234, 232, 60, 192, 102, - 204, 145, 183, 200, 90, 144, 201, 158, 164, 169, - 146, 146, 204, 146, 146, 86, 68, 68, 225, 227, - 86, 115, 204, 183, 200, 146, 146, 146, 79, 105, - 232, 226, 149, 225, 200, 146, 146, 204, 225, 72, - 120, 42, 193, 105, 145, 203, 235, 203, 3, 217, - 146 + 162, 165, 166, 171, 172, 173, 174, 176, 179, 180, + 182, 186, 27, 3, 229, 3, 3, 70, 97, 81, + 81, 85, 113, 197, 228, 229, 70, 97, 19, 51, + 180, 182, 0, 148, 235, 99, 156, 156, 9, 39, + 71, 183, 184, 67, 183, 193, 3, 147, 145, 81, + 116, 167, 167, 229, 104, 163, 229, 6, 220, 12, + 187, 111, 229, 229, 229, 146, 146, 154, 84, 180, + 181, 186, 101, 185, 115, 181, 63, 198, 3, 4, + 5, 90, 150, 200, 217, 218, 219, 220, 221, 222, + 4, 160, 109, 229, 229, 73, 190, 80, 145, 175, + 3, 40, 75, 109, 123, 137, 138, 145, 188, 199, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 3, 177, 178, + 145, 193, 194, 195, 202, 193, 220, 146, 149, 40, + 81, 145, 175, 202, 164, 218, 3, 236, 55, 182, + 145, 147, 145, 98, 40, 109, 203, 143, 203, 182, + 202, 81, 189, 149, 3, 102, 114, 121, 230, 231, + 17, 45, 88, 109, 117, 118, 124, 125, 126, 128, + 129, 130, 133, 134, 136, 137, 138, 139, 140, 141, + 143, 126, 149, 190, 3, 157, 158, 198, 149, 77, + 103, 196, 198, 46, 217, 112, 3, 168, 169, 114, + 85, 146, 149, 145, 146, 187, 3, 138, 182, 202, + 145, 109, 199, 146, 146, 145, 223, 224, 225, 227, + 229, 232, 190, 201, 202, 3, 202, 203, 203, 88, + 117, 145, 90, 109, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 220, 202, + 178, 145, 146, 149, 195, 220, 80, 25, 37, 94, + 107, 170, 146, 149, 179, 229, 3, 200, 199, 146, + 95, 182, 144, 179, 26, 58, 62, 68, 69, 87, + 149, 233, 231, 60, 191, 102, 203, 145, 182, 199, + 90, 144, 200, 158, 164, 169, 146, 146, 203, 146, + 146, 86, 68, 68, 224, 226, 86, 115, 203, 182, + 199, 146, 146, 146, 79, 105, 231, 225, 149, 224, + 199, 146, 146, 203, 224, 72, 120, 42, 192, 105, + 145, 202, 234, 202, 3, 216, 146 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1085,23 +1084,22 @@ static const yytype_uint8 yyr1[] = 155, 155, 155, 155, 155, 155, 155, 156, 156, 157, 157, 158, 158, 159, 160, 161, 161, 162, 163, 164, 165, 165, 166, 166, 166, 167, 167, 168, 168, 169, - 170, 170, 170, 170, 171, 171, 171, 172, 172, 173, - 174, 175, 175, 176, 176, 177, 178, 178, 179, 180, - 180, 180, 181, 181, 182, 182, 183, 183, 184, 185, - 185, 185, 186, 186, 187, 188, 188, 189, 190, 191, - 191, 192, 192, 193, 193, 194, 194, 195, 195, 196, - 197, 197, 197, 198, 198, 199, 199, 199, 200, 200, - 201, 201, 202, 203, 203, 203, 203, 203, 204, 204, - 204, 204, 204, 204, 204, 204, 204, 205, 205, 206, - 206, 206, 206, 206, 207, 207, 207, 207, 207, 207, - 207, 207, 207, 207, 207, 208, 208, 209, 209, 209, - 209, 210, 210, 211, 211, 212, 212, 212, 212, 212, - 212, 213, 213, 214, 215, 216, 217, 217, 217, 217, - 218, 218, 218, 218, 219, 220, 220, 221, 222, 223, - 224, 224, 225, 225, 226, 226, 227, 227, 228, 229, - 230, 230, 231, 231, 232, 232, 233, 233, 233, 234, - 234, 234, 234, 234, 234, 234, 234, 235, 236, 236, - 237, 237 + 170, 170, 170, 170, 171, 171, 171, 172, 173, 174, + 174, 175, 175, 176, 177, 177, 178, 179, 179, 179, + 180, 180, 181, 181, 182, 182, 183, 184, 184, 184, + 185, 185, 186, 187, 187, 188, 189, 190, 190, 191, + 191, 192, 192, 193, 193, 194, 194, 195, 196, 196, + 196, 197, 197, 198, 198, 198, 199, 199, 200, 200, + 201, 202, 202, 202, 202, 202, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 204, 204, 205, 205, 205, + 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 207, 207, 208, 208, 208, 208, 209, + 209, 210, 210, 211, 211, 211, 211, 211, 211, 212, + 212, 213, 214, 215, 216, 216, 216, 216, 217, 217, + 217, 217, 218, 219, 219, 220, 221, 222, 223, 223, + 224, 224, 225, 225, 226, 226, 227, 228, 229, 229, + 230, 230, 231, 231, 232, 232, 232, 233, 233, 233, + 233, 233, 233, 233, 233, 234, 235, 235, 236, 236 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1111,23 +1109,22 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 4, 1, 2, 5, 7, 1, 1, 2, 3, 8, 7, 7, 3, 0, 1, 3, 2, - 1, 1, 1, 1, 4, 4, 3, 2, 0, 4, - 2, 8, 5, 3, 0, 5, 1, 3, 3, 1, - 1, 5, 3, 3, 1, 1, 3, 5, 2, 1, - 1, 1, 1, 0, 7, 1, 0, 1, 2, 2, - 0, 4, 0, 2, 0, 3, 0, 1, 3, 2, - 1, 1, 0, 2, 0, 2, 4, 0, 1, 3, - 1, 3, 2, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, - 2, 2, 3, 4, 1, 3, 3, 3, 3, 3, - 3, 3, 4, 3, 3, 3, 3, 5, 6, 5, - 6, 6, 8, 4, 5, 3, 3, 3, 3, 3, - 3, 3, 5, 4, 4, 5, 1, 3, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 4, 1, 3, 2, 1, - 1, 3, 2, 1, 1, 0, 4, 6, 8, 1, - 1, 2, 2, 1, 1, 1, 0, 1, 1, 0, - 1, 3 + 1, 1, 1, 1, 3, 3, 3, 4, 2, 8, + 5, 3, 0, 5, 1, 3, 3, 1, 1, 5, + 3, 3, 1, 1, 3, 5, 2, 1, 1, 1, + 1, 0, 7, 1, 0, 1, 2, 2, 0, 4, + 0, 2, 0, 3, 0, 1, 3, 2, 1, 1, + 0, 2, 0, 2, 4, 0, 1, 3, 1, 3, + 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 2, 2, 2, + 3, 4, 1, 3, 3, 3, 3, 3, 3, 3, + 4, 3, 3, 3, 3, 5, 6, 5, 6, 6, + 8, 4, 5, 3, 3, 3, 3, 3, 3, 3, + 5, 4, 4, 5, 1, 3, 1, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 4, 1, 3, 2, 1, 1, 3, + 2, 1, 1, 0, 4, 6, 8, 1, 1, 2, + 2, 1, 1, 1, 0, 1, 1, 0, 1, 3 }; @@ -1624,31 +1621,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio switch (yytype) { case 3: /* IDENTIFIER */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1630 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1627 "bison_parser.cpp" /* yacc.c:1257 */ break; case 4: /* STRING */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1636 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1633 "bison_parser.cpp" /* yacc.c:1257 */ break; case 5: /* FLOATVAL */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1642 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1639 "bison_parser.cpp" /* yacc.c:1257 */ break; case 6: /* INTVAL */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1648 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1645 "bison_parser.cpp" /* yacc.c:1257 */ break; case 153: /* statement_list */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1657,23 +1654,23 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).stmt_vec)); } -#line 1661 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1658 "bison_parser.cpp" /* yacc.c:1257 */ break; case 154: /* statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1667 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1664 "bison_parser.cpp" /* yacc.c:1257 */ break; case 155: /* preparable_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1673 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1670 "bison_parser.cpp" /* yacc.c:1257 */ break; case 156: /* opt_hints */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1682,11 +1679,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1686 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1683 "bison_parser.cpp" /* yacc.c:1257 */ break; case 157: /* hint_list */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1695,71 +1692,71 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1699 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1696 "bison_parser.cpp" /* yacc.c:1257 */ break; case 158: /* hint */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1705 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1702 "bison_parser.cpp" /* yacc.c:1257 */ break; case 159: /* prepare_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).prep_stmt)); } -#line 1711 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1708 "bison_parser.cpp" /* yacc.c:1257 */ break; case 160: /* prepare_target_query */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1717 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1714 "bison_parser.cpp" /* yacc.c:1257 */ break; case 161: /* execute_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).exec_stmt)); } -#line 1723 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1720 "bison_parser.cpp" /* yacc.c:1257 */ break; case 162: /* import_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).import_stmt)); } -#line 1729 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1726 "bison_parser.cpp" /* yacc.c:1257 */ break; case 163: /* import_file_type */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1735 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1732 "bison_parser.cpp" /* yacc.c:1257 */ break; case 164: /* file_path */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1741 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1738 "bison_parser.cpp" /* yacc.c:1257 */ break; case 165: /* show_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).show_stmt)); } -#line 1747 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1744 "bison_parser.cpp" /* yacc.c:1257 */ break; case 166: /* create_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).create_stmt)); } -#line 1753 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1750 "bison_parser.cpp" /* yacc.c:1257 */ break; case 167: /* opt_not_exists */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1759 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1756 "bison_parser.cpp" /* yacc.c:1257 */ break; case 168: /* column_def_commalist */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -1768,53 +1765,47 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).column_vec)); } -#line 1772 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1769 "bison_parser.cpp" /* yacc.c:1257 */ break; case 169: /* column_def */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).column_t)); } -#line 1778 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1775 "bison_parser.cpp" /* yacc.c:1257 */ break; case 170: /* column_type */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1784 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1781 "bison_parser.cpp" /* yacc.c:1257 */ break; case 171: /* drop_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).drop_stmt)); } -#line 1790 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1787 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 172: /* opt_exists */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ - { } -#line 1796 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 173: /* delete_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 172: /* delete_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1802 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1793 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 174: /* truncate_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 173: /* truncate_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1808 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1799 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 175: /* insert_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 174: /* insert_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).insert_stmt)); } -#line 1814 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1805 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 176: /* opt_column_list */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ + case 175: /* opt_column_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -1823,17 +1814,17 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 1827 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1818 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 177: /* update_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 176: /* update_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_stmt)); } -#line 1833 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1824 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 178: /* update_clause_commalist */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ + case 177: /* update_clause_commalist */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -1842,53 +1833,53 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).update_vec)); } -#line 1846 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1837 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 179: /* update_clause */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 178: /* update_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_t)); } -#line 1852 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1843 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 180: /* select_statement */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 179: /* select_statement */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1858 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1849 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 181: /* select_with_paren */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 180: /* select_with_paren */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1864 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1855 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 182: /* select_paren_or_clause */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 181: /* select_paren_or_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1870 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1861 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 183: /* select_no_paren */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 182: /* select_no_paren */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1876 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1867 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 187: /* select_clause */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 186: /* select_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1882 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1873 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 188: /* opt_distinct */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 187: /* opt_distinct */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1888 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1879 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 189: /* select_list */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ + case 188: /* select_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1897,35 +1888,35 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1901 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1892 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 190: /* from_clause */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 189: /* from_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 1907 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1898 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 191: /* opt_where */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 190: /* opt_where */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1913 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1904 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 192: /* opt_group */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 191: /* opt_group */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).group_t)); } -#line 1919 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1910 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 193: /* opt_having */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 192: /* opt_having */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1925 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1916 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 194: /* opt_order */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ + case 193: /* opt_order */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1934,11 +1925,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1938 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1929 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 195: /* order_list */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ + case 194: /* order_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1947,35 +1938,35 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1951 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1942 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 196: /* order_desc */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 195: /* order_desc */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).order)); } -#line 1957 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1948 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 197: /* opt_order_type */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ + case 196: /* opt_order_type */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1963 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1954 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 198: /* opt_top */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 197: /* opt_top */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1969 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1960 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 199: /* opt_limit */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 198: /* opt_limit */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1975 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1966 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 200: /* expr_list */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ + case 199: /* expr_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1984,11 +1975,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1988 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1979 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 201: /* literal_list */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ + case 200: /* literal_list */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1997,161 +1988,161 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 2001 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1992 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 202: /* expr_alias */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 201: /* expr_alias */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2007 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1998 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 203: /* expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 202: /* expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2013 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2004 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 204: /* operand */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 203: /* operand */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2019 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2010 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 205: /* scalar_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 204: /* scalar_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2025 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2016 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 206: /* unary_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 205: /* unary_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2031 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2022 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 207: /* binary_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 206: /* binary_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2037 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2028 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 208: /* logic_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 207: /* logic_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2043 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2034 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 209: /* in_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 208: /* in_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2049 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2040 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 210: /* case_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 209: /* case_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2055 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2046 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 211: /* exists_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 210: /* exists_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2061 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2052 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 212: /* comp_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 211: /* comp_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2067 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2058 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 213: /* function_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 212: /* function_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2073 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2064 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 214: /* array_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 213: /* array_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2079 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2070 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 215: /* array_index */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 214: /* array_index */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2085 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2076 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 216: /* between_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 215: /* between_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2091 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2082 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 217: /* column_name */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 216: /* column_name */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2097 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2088 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 218: /* literal */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 217: /* literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2103 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2094 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 219: /* string_literal */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 218: /* string_literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2109 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2100 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 220: /* num_literal */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 219: /* num_literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2115 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2106 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 221: /* int_literal */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 220: /* int_literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2121 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2112 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 222: /* null_literal */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 221: /* null_literal */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2127 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2118 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 223: /* param_expr */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 222: /* param_expr */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2133 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2124 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 224: /* table_ref */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 223: /* table_ref */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2139 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2130 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 225: /* table_ref_atomic */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 224: /* table_ref_atomic */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2145 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2136 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 226: /* nonjoin_table_ref_atomic */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 225: /* nonjoin_table_ref_atomic */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2151 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2142 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 227: /* table_ref_commalist */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ + case 226: /* table_ref_commalist */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2160,59 +2151,59 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).table_vec)); } -#line 2164 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2155 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 228: /* table_ref_name */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 227: /* table_ref_name */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2170 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2161 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 229: /* table_ref_name_no_alias */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 228: /* table_ref_name_no_alias */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2176 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2167 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 230: /* table_name */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).table_n).name) ); free( (((*yyvaluep).table_n).schema) ); } -#line 2182 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 231: /* alias */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2188 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 232: /* opt_alias */ -#line 138 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2194 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 233: /* join_clause */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ - { delete (((*yyvaluep).table)); } -#line 2200 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 234: /* opt_join_type */ + case 229: /* table_name */ #line 136 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2173 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 230: /* alias */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2179 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 231: /* opt_alias */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2185 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 232: /* join_clause */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ + { delete (((*yyvaluep).table)); } +#line 2191 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 233: /* opt_join_type */ +#line 135 "bison_parser.y" /* yacc.c:1257 */ { } -#line 2206 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2197 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 235: /* join_condition */ -#line 147 "bison_parser.y" /* yacc.c:1257 */ + case 234: /* join_condition */ +#line 145 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2212 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2203 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 237: /* ident_commalist */ -#line 139 "bison_parser.y" /* yacc.c:1257 */ + case 236: /* ident_commalist */ +#line 137 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2221,7 +2212,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2225 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2216 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -2339,7 +2330,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.total_column = 0; } -#line 2343 "bison_parser.cpp" /* yacc.c:1429 */ +#line 2334 "bison_parser.cpp" /* yacc.c:1429 */ yylsp[0] = yylloc; goto yysetstate; @@ -2526,7 +2517,7 @@ yyreduce: switch (yyn) { case 2: -#line 245 "bison_parser.y" /* yacc.c:1646 */ +#line 242 "bison_parser.y" /* yacc.c:1646 */ { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -2544,443 +2535,417 @@ yyreduce: } delete (yyvsp[-1].stmt_vec); } -#line 2548 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2539 "bison_parser.cpp" /* yacc.c:1646 */ break; case 3: -#line 266 "bison_parser.y" /* yacc.c:1646 */ +#line 263 "bison_parser.y" /* yacc.c:1646 */ { (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 2554 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2545 "bison_parser.cpp" /* yacc.c:1646 */ break; case 4: -#line 267 "bison_parser.y" /* yacc.c:1646 */ +#line 264 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 2560 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2551 "bison_parser.cpp" /* yacc.c:1646 */ break; case 5: -#line 271 "bison_parser.y" /* yacc.c:1646 */ +#line 268 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } +#line 2560 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 6: +#line 272 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.statement) = (yyvsp[-1].statement); + (yyval.statement)->hints = (yyvsp[0].expr_vec); + } #line 2569 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 6: -#line 275 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.statement) = (yyvsp[-1].statement); - (yyval.statement)->hints = (yyvsp[0].expr_vec); - } -#line 2578 "bison_parser.cpp" /* yacc.c:1646 */ - break; - case 7: -#line 279 "bison_parser.y" /* yacc.c:1646 */ +#line 276 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 2586 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2577 "bison_parser.cpp" /* yacc.c:1646 */ break; case 8: -#line 286 "bison_parser.y" /* yacc.c:1646 */ +#line 283 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 2592 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2583 "bison_parser.cpp" /* yacc.c:1646 */ break; case 9: -#line 287 "bison_parser.y" /* yacc.c:1646 */ +#line 284 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 2598 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2589 "bison_parser.cpp" /* yacc.c:1646 */ break; case 10: -#line 288 "bison_parser.y" /* yacc.c:1646 */ +#line 285 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 2604 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2595 "bison_parser.cpp" /* yacc.c:1646 */ break; case 11: -#line 289 "bison_parser.y" /* yacc.c:1646 */ +#line 286 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 2610 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2601 "bison_parser.cpp" /* yacc.c:1646 */ break; case 12: -#line 290 "bison_parser.y" /* yacc.c:1646 */ +#line 287 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2616 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2607 "bison_parser.cpp" /* yacc.c:1646 */ break; case 13: -#line 291 "bison_parser.y" /* yacc.c:1646 */ +#line 288 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2622 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2613 "bison_parser.cpp" /* yacc.c:1646 */ break; case 14: -#line 292 "bison_parser.y" /* yacc.c:1646 */ +#line 289 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 2628 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2619 "bison_parser.cpp" /* yacc.c:1646 */ break; case 15: -#line 293 "bison_parser.y" /* yacc.c:1646 */ +#line 290 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 2634 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2625 "bison_parser.cpp" /* yacc.c:1646 */ break; case 16: -#line 294 "bison_parser.y" /* yacc.c:1646 */ +#line 291 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 2640 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2631 "bison_parser.cpp" /* yacc.c:1646 */ break; case 17: -#line 303 "bison_parser.y" /* yacc.c:1646 */ +#line 300 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 2646 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2637 "bison_parser.cpp" /* yacc.c:1646 */ break; case 18: -#line 304 "bison_parser.y" /* yacc.c:1646 */ +#line 301 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = nullptr; } -#line 2652 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2643 "bison_parser.cpp" /* yacc.c:1646 */ break; case 19: -#line 309 "bison_parser.y" /* yacc.c:1646 */ +#line 306 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 2658 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2649 "bison_parser.cpp" /* yacc.c:1646 */ break; case 20: -#line 310 "bison_parser.y" /* yacc.c:1646 */ +#line 307 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 2664 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2655 "bison_parser.cpp" /* yacc.c:1646 */ break; case 21: -#line 314 "bison_parser.y" /* yacc.c:1646 */ +#line 311 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 2673 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2664 "bison_parser.cpp" /* yacc.c:1646 */ break; case 22: -#line 318 "bison_parser.y" /* yacc.c:1646 */ +#line 315 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 2683 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2674 "bison_parser.cpp" /* yacc.c:1646 */ break; case 23: -#line 330 "bison_parser.y" /* yacc.c:1646 */ +#line 327 "bison_parser.y" /* yacc.c:1646 */ { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 2693 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2684 "bison_parser.cpp" /* yacc.c:1646 */ break; case 25: -#line 340 "bison_parser.y" /* yacc.c:1646 */ +#line 337 "bison_parser.y" /* yacc.c:1646 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 2702 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2693 "bison_parser.cpp" /* yacc.c:1646 */ break; case 26: -#line 344 "bison_parser.y" /* yacc.c:1646 */ +#line 341 "bison_parser.y" /* yacc.c:1646 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 2712 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2703 "bison_parser.cpp" /* yacc.c:1646 */ break; case 27: -#line 356 "bison_parser.y" /* yacc.c:1646 */ +#line 353 "bison_parser.y" /* yacc.c:1646 */ { (yyval.import_stmt) = new ImportStatement((ImportType) (yyvsp[-4].uval)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); - (yyval.import_stmt)->schema = (yyvsp[0].table_n).schema; - (yyval.import_stmt)->tableName = (yyvsp[0].table_n).name; + (yyval.import_stmt)->tableName = (yyvsp[0].sval); } -#line 2723 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2713 "bison_parser.cpp" /* yacc.c:1646 */ break; case 28: -#line 365 "bison_parser.y" /* yacc.c:1646 */ +#line 361 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kImportCSV; } -#line 2729 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2719 "bison_parser.cpp" /* yacc.c:1646 */ break; case 29: -#line 369 "bison_parser.y" /* yacc.c:1646 */ +#line 365 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 2735 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2725 "bison_parser.cpp" /* yacc.c:1646 */ break; case 30: -#line 379 "bison_parser.y" /* yacc.c:1646 */ +#line 375 "bison_parser.y" /* yacc.c:1646 */ { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 2743 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2733 "bison_parser.cpp" /* yacc.c:1646 */ break; case 31: -#line 382 "bison_parser.y" /* yacc.c:1646 */ +#line 378 "bison_parser.y" /* yacc.c:1646 */ { (yyval.show_stmt) = new ShowStatement(kShowColumns); - (yyval.show_stmt)->schema = (yyvsp[0].table_n).schema; - (yyval.show_stmt)->name = (yyvsp[0].table_n).name; + (yyval.show_stmt)->name = (yyvsp[0].sval); + } +#line 2742 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 32: +#line 391 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->tableName = (yyvsp[-4].sval); + (yyval.create_stmt)->filePath = (yyvsp[0].sval); } #line 2753 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 32: -#line 396 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); - (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); - (yyval.create_stmt)->schema = (yyvsp[-4].table_n).schema; - (yyval.create_stmt)->tableName = (yyvsp[-4].table_n).name; - (yyval.create_stmt)->filePath = (yyvsp[0].sval); - } -#line 2765 "bison_parser.cpp" /* yacc.c:1646 */ - break; - case 33: -#line 403 "bison_parser.y" /* yacc.c:1646 */ +#line 397 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_n).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_n).name; + (yyval.create_stmt)->tableName = (yyvsp[-3].sval); (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 2777 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2764 "bison_parser.cpp" /* yacc.c:1646 */ break; case 34: -#line 410 "bison_parser.y" /* yacc.c:1646 */ +#line 403 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->schema = (yyvsp[-3].table_n).schema; - (yyval.create_stmt)->tableName = (yyvsp[-3].table_n).name; + (yyval.create_stmt)->tableName = (yyvsp[-3].sval); (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 2790 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2776 "bison_parser.cpp" /* yacc.c:1646 */ break; case 35: -#line 421 "bison_parser.y" /* yacc.c:1646 */ +#line 413 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 2796 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2782 "bison_parser.cpp" /* yacc.c:1646 */ break; case 36: -#line 422 "bison_parser.y" /* yacc.c:1646 */ +#line 414 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } -#line 2802 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2788 "bison_parser.cpp" /* yacc.c:1646 */ break; case 37: -#line 426 "bison_parser.y" /* yacc.c:1646 */ +#line 418 "bison_parser.y" /* yacc.c:1646 */ { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 2808 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2794 "bison_parser.cpp" /* yacc.c:1646 */ break; case 38: -#line 427 "bison_parser.y" /* yacc.c:1646 */ +#line 419 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 2814 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2800 "bison_parser.cpp" /* yacc.c:1646 */ break; case 39: -#line 431 "bison_parser.y" /* yacc.c:1646 */ +#line 423 "bison_parser.y" /* yacc.c:1646 */ { (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); } -#line 2822 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2808 "bison_parser.cpp" /* yacc.c:1646 */ break; case 40: -#line 438 "bison_parser.y" /* yacc.c:1646 */ +#line 430 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2828 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2814 "bison_parser.cpp" /* yacc.c:1646 */ break; case 41: -#line 439 "bison_parser.y" /* yacc.c:1646 */ +#line 431 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2834 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2820 "bison_parser.cpp" /* yacc.c:1646 */ break; case 42: -#line 440 "bison_parser.y" /* yacc.c:1646 */ +#line 432 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::DOUBLE; } -#line 2840 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2826 "bison_parser.cpp" /* yacc.c:1646 */ break; case 43: -#line 441 "bison_parser.y" /* yacc.c:1646 */ +#line 433 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::TEXT; } -#line 2846 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2832 "bison_parser.cpp" /* yacc.c:1646 */ break; case 44: -#line 451 "bison_parser.y" /* yacc.c:1646 */ +#line 443 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropTable); - (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); - (yyval.drop_stmt)->schema = (yyvsp[0].table_n).schema; - (yyval.drop_stmt)->name = (yyvsp[0].table_n).name; + (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2857 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2841 "bison_parser.cpp" /* yacc.c:1646 */ break; case 45: -#line 457 "bison_parser.y" /* yacc.c:1646 */ +#line 447 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropView); - (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); - (yyval.drop_stmt)->schema = (yyvsp[0].table_n).schema; - (yyval.drop_stmt)->name = (yyvsp[0].table_n).name; + (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 2868 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2850 "bison_parser.cpp" /* yacc.c:1646 */ break; case 46: -#line 463 "bison_parser.y" /* yacc.c:1646 */ +#line 451 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); - (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } +#line 2859 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 47: +#line 463 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.delete_stmt) = new DeleteStatement(); + (yyval.delete_stmt)->tableName = (yyvsp[-1].sval); + (yyval.delete_stmt)->expr = (yyvsp[0].expr); + } +#line 2869 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 48: +#line 471 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.delete_stmt) = new DeleteStatement(); + (yyval.delete_stmt)->tableName = (yyvsp[0].sval); + } #line 2878 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 47: -#line 471 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = true; } -#line 2884 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 48: -#line 472 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 2890 "bison_parser.cpp" /* yacc.c:1646 */ - break; - case 49: -#line 481 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.delete_stmt) = new DeleteStatement(); - (yyval.delete_stmt)->schema = (yyvsp[-1].table_n).schema; - (yyval.delete_stmt)->tableName = (yyvsp[-1].table_n).name; - (yyval.delete_stmt)->expr = (yyvsp[0].expr); - } -#line 2901 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 50: -#line 490 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.delete_stmt) = new DeleteStatement(); - (yyval.delete_stmt)->schema = (yyvsp[0].table_n).schema; - (yyval.delete_stmt)->tableName = (yyvsp[0].table_n).name; - } -#line 2911 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 51: -#line 503 "bison_parser.y" /* yacc.c:1646 */ +#line 483 "bison_parser.y" /* yacc.c:1646 */ { (yyval.insert_stmt) = new InsertStatement(kInsertValues); - (yyval.insert_stmt)->schema = (yyvsp[-5].table_n).schema; - (yyval.insert_stmt)->tableName = (yyvsp[-5].table_n).name; + (yyval.insert_stmt)->tableName = (yyvsp[-5].sval); (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 2923 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2889 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 52: -#line 510 "bison_parser.y" /* yacc.c:1646 */ + case 50: +#line 489 "bison_parser.y" /* yacc.c:1646 */ { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); - (yyval.insert_stmt)->schema = (yyvsp[-2].table_n).schema; - (yyval.insert_stmt)->tableName = (yyvsp[-2].table_n).name; + (yyval.insert_stmt)->tableName = (yyvsp[-2].sval); (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 2935 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2900 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 51: +#line 499 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.str_vec) = (yyvsp[-1].str_vec); } +#line 2906 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 52: +#line 500 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.str_vec) = nullptr; } +#line 2912 "bison_parser.cpp" /* yacc.c:1646 */ break; case 53: -#line 521 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 2941 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 54: -#line 522 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = nullptr; } -#line 2947 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 55: -#line 532 "bison_parser.y" /* yacc.c:1646 */ +#line 510 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_stmt) = new UpdateStatement(); (yyval.update_stmt)->table = (yyvsp[-3].table); (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 2958 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2923 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 54: +#line 519 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } +#line 2929 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 55: +#line 520 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } +#line 2935 "bison_parser.cpp" /* yacc.c:1646 */ break; case 56: -#line 541 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 2964 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 57: -#line 542 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 2970 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 58: -#line 546 "bison_parser.y" /* yacc.c:1646 */ +#line 524 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 2980 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2945 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 61: -#line 560 "bison_parser.y" /* yacc.c:1646 */ + case 59: +#line 538 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -2995,23 +2960,23 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2999 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2964 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 62: -#line 577 "bison_parser.y" /* yacc.c:1646 */ + case 60: +#line 555 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3005 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2970 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 63: -#line 578 "bison_parser.y" /* yacc.c:1646 */ + case 61: +#line 556 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3011 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2976 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 66: -#line 587 "bison_parser.y" /* yacc.c:1646 */ + case 64: +#line 565 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3022,11 +2987,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3026 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2991 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 67: -#line 597 "bison_parser.y" /* yacc.c:1646 */ + case 65: +#line 575 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -3041,11 +3006,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3045 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3010 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 74: -#line 629 "bison_parser.y" /* yacc.c:1646 */ + case 72: +#line 607 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3055,546 +3020,538 @@ yyreduce: (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3059 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3024 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 75: -#line 641 "bison_parser.y" /* yacc.c:1646 */ + case 73: +#line 619 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 3065 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3030 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 74: +#line 620 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = false; } +#line 3036 "bison_parser.cpp" /* yacc.c:1646 */ break; case 76: -#line 642 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 3071 "bison_parser.cpp" /* yacc.c:1646 */ +#line 628 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table) = (yyvsp[0].table); } +#line 3042 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 77: +#line 633 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3048 "bison_parser.cpp" /* yacc.c:1646 */ break; case 78: -#line 650 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table) = (yyvsp[0].table); } -#line 3077 "bison_parser.cpp" /* yacc.c:1646 */ +#line 634 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = nullptr; } +#line 3054 "bison_parser.cpp" /* yacc.c:1646 */ break; case 79: -#line 655 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3083 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 80: -#line 656 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3089 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 81: -#line 660 "bison_parser.y" /* yacc.c:1646 */ +#line 638 "bison_parser.y" /* yacc.c:1646 */ { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3099 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3064 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 80: +#line 643 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.group_t) = nullptr; } +#line 3070 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 81: +#line 647 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3076 "bison_parser.cpp" /* yacc.c:1646 */ break; case 82: -#line 665 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.group_t) = nullptr; } -#line 3105 "bison_parser.cpp" /* yacc.c:1646 */ +#line 648 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = nullptr; } +#line 3082 "bison_parser.cpp" /* yacc.c:1646 */ break; case 83: -#line 669 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3111 "bison_parser.cpp" /* yacc.c:1646 */ +#line 651 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = (yyvsp[0].order_vec); } +#line 3088 "bison_parser.cpp" /* yacc.c:1646 */ break; case 84: -#line 670 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3117 "bison_parser.cpp" /* yacc.c:1646 */ +#line 652 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = nullptr; } +#line 3094 "bison_parser.cpp" /* yacc.c:1646 */ break; case 85: -#line 673 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3123 "bison_parser.cpp" /* yacc.c:1646 */ +#line 656 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } +#line 3100 "bison_parser.cpp" /* yacc.c:1646 */ break; case 86: -#line 674 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = nullptr; } -#line 3129 "bison_parser.cpp" /* yacc.c:1646 */ +#line 657 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } +#line 3106 "bison_parser.cpp" /* yacc.c:1646 */ break; case 87: -#line 678 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3135 "bison_parser.cpp" /* yacc.c:1646 */ +#line 661 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } +#line 3112 "bison_parser.cpp" /* yacc.c:1646 */ break; case 88: -#line 679 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3141 "bison_parser.cpp" /* yacc.c:1646 */ +#line 665 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderAsc; } +#line 3118 "bison_parser.cpp" /* yacc.c:1646 */ break; case 89: -#line 683 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3147 "bison_parser.cpp" /* yacc.c:1646 */ +#line 666 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderDesc; } +#line 3124 "bison_parser.cpp" /* yacc.c:1646 */ break; case 90: -#line 687 "bison_parser.y" /* yacc.c:1646 */ +#line 667 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderAsc; } -#line 3153 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3130 "bison_parser.cpp" /* yacc.c:1646 */ break; case 91: -#line 688 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderDesc; } -#line 3159 "bison_parser.cpp" /* yacc.c:1646 */ +#line 673 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } +#line 3136 "bison_parser.cpp" /* yacc.c:1646 */ break; case 92: -#line 689 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } -#line 3165 "bison_parser.cpp" /* yacc.c:1646 */ +#line 674 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = nullptr; } +#line 3142 "bison_parser.cpp" /* yacc.c:1646 */ break; case 93: -#line 695 "bison_parser.y" /* yacc.c:1646 */ +#line 678 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3171 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3148 "bison_parser.cpp" /* yacc.c:1646 */ break; case 94: -#line 696 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } -#line 3177 "bison_parser.cpp" /* yacc.c:1646 */ +#line 679 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } +#line 3154 "bison_parser.cpp" /* yacc.c:1646 */ break; case 95: -#line 700 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3183 "bison_parser.cpp" /* yacc.c:1646 */ +#line 680 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = nullptr; } +#line 3160 "bison_parser.cpp" /* yacc.c:1646 */ break; case 96: -#line 701 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } -#line 3189 "bison_parser.cpp" /* yacc.c:1646 */ +#line 687 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3166 "bison_parser.cpp" /* yacc.c:1646 */ break; case 97: -#line 702 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } -#line 3195 "bison_parser.cpp" /* yacc.c:1646 */ +#line 688 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3172 "bison_parser.cpp" /* yacc.c:1646 */ break; case 98: -#line 709 "bison_parser.y" /* yacc.c:1646 */ +#line 692 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3201 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3178 "bison_parser.cpp" /* yacc.c:1646 */ break; case 99: -#line 710 "bison_parser.y" /* yacc.c:1646 */ +#line 693 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3207 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3184 "bison_parser.cpp" /* yacc.c:1646 */ break; case 100: -#line 714 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3213 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 101: -#line 715 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3219 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 102: -#line 719 "bison_parser.y" /* yacc.c:1646 */ +#line 697 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); (yyval.expr)->alias = (yyvsp[0].sval); } -#line 3228 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3193 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 108: -#line 734 "bison_parser.y" /* yacc.c:1646 */ + case 106: +#line 712 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); } -#line 3234 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3199 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 116: -#line 742 "bison_parser.y" /* yacc.c:1646 */ + case 114: +#line 720 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3240 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3205 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 117: +#line 729 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } +#line 3211 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 118: +#line 730 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } +#line 3217 "bison_parser.cpp" /* yacc.c:1646 */ break; case 119: -#line 751 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3246 "bison_parser.cpp" /* yacc.c:1646 */ +#line 731 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } +#line 3223 "bison_parser.cpp" /* yacc.c:1646 */ break; case 120: -#line 752 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3252 "bison_parser.cpp" /* yacc.c:1646 */ +#line 732 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } +#line 3229 "bison_parser.cpp" /* yacc.c:1646 */ break; case 121: -#line 753 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 3258 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 122: -#line 754 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 3264 "bison_parser.cpp" /* yacc.c:1646 */ +#line 733 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } +#line 3235 "bison_parser.cpp" /* yacc.c:1646 */ break; case 123: -#line 755 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 3270 "bison_parser.cpp" /* yacc.c:1646 */ +#line 738 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } +#line 3241 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 124: +#line 739 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } +#line 3247 "bison_parser.cpp" /* yacc.c:1646 */ break; case 125: -#line 760 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 3276 "bison_parser.cpp" /* yacc.c:1646 */ +#line 740 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } +#line 3253 "bison_parser.cpp" /* yacc.c:1646 */ break; case 126: -#line 761 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 3282 "bison_parser.cpp" /* yacc.c:1646 */ +#line 741 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } +#line 3259 "bison_parser.cpp" /* yacc.c:1646 */ break; case 127: -#line 762 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 3288 "bison_parser.cpp" /* yacc.c:1646 */ +#line 742 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } +#line 3265 "bison_parser.cpp" /* yacc.c:1646 */ break; case 128: -#line 763 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 3294 "bison_parser.cpp" /* yacc.c:1646 */ +#line 743 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } +#line 3271 "bison_parser.cpp" /* yacc.c:1646 */ break; case 129: -#line 764 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 3300 "bison_parser.cpp" /* yacc.c:1646 */ +#line 744 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } +#line 3277 "bison_parser.cpp" /* yacc.c:1646 */ break; case 130: -#line 765 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 3306 "bison_parser.cpp" /* yacc.c:1646 */ +#line 745 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } +#line 3283 "bison_parser.cpp" /* yacc.c:1646 */ break; case 131: -#line 766 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 3312 "bison_parser.cpp" /* yacc.c:1646 */ +#line 746 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } +#line 3289 "bison_parser.cpp" /* yacc.c:1646 */ break; case 132: -#line 767 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 3318 "bison_parser.cpp" /* yacc.c:1646 */ +#line 747 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } +#line 3295 "bison_parser.cpp" /* yacc.c:1646 */ break; case 133: -#line 768 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 3324 "bison_parser.cpp" /* yacc.c:1646 */ +#line 751 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } +#line 3301 "bison_parser.cpp" /* yacc.c:1646 */ break; case 134: -#line 769 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 3330 "bison_parser.cpp" /* yacc.c:1646 */ +#line 752 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } +#line 3307 "bison_parser.cpp" /* yacc.c:1646 */ break; case 135: -#line 773 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 3336 "bison_parser.cpp" /* yacc.c:1646 */ +#line 756 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } +#line 3313 "bison_parser.cpp" /* yacc.c:1646 */ break; case 136: -#line 774 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 3342 "bison_parser.cpp" /* yacc.c:1646 */ +#line 757 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } +#line 3319 "bison_parser.cpp" /* yacc.c:1646 */ break; case 137: -#line 778 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 3348 "bison_parser.cpp" /* yacc.c:1646 */ +#line 758 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } +#line 3325 "bison_parser.cpp" /* yacc.c:1646 */ break; case 138: -#line 779 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 3354 "bison_parser.cpp" /* yacc.c:1646 */ +#line 759 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } +#line 3331 "bison_parser.cpp" /* yacc.c:1646 */ break; case 139: -#line 780 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 3360 "bison_parser.cpp" /* yacc.c:1646 */ +#line 764 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3337 "bison_parser.cpp" /* yacc.c:1646 */ break; case 140: -#line 781 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 3366 "bison_parser.cpp" /* yacc.c:1646 */ +#line 766 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3343 "bison_parser.cpp" /* yacc.c:1646 */ break; case 141: -#line 786 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3372 "bison_parser.cpp" /* yacc.c:1646 */ +#line 770 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } +#line 3349 "bison_parser.cpp" /* yacc.c:1646 */ break; case 142: -#line 788 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3378 "bison_parser.cpp" /* yacc.c:1646 */ +#line 771 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } +#line 3355 "bison_parser.cpp" /* yacc.c:1646 */ break; case 143: -#line 792 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 3384 "bison_parser.cpp" /* yacc.c:1646 */ +#line 775 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 3361 "bison_parser.cpp" /* yacc.c:1646 */ break; case 144: -#line 793 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 3390 "bison_parser.cpp" /* yacc.c:1646 */ +#line 776 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } +#line 3367 "bison_parser.cpp" /* yacc.c:1646 */ break; case 145: -#line 797 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 3396 "bison_parser.cpp" /* yacc.c:1646 */ +#line 777 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } +#line 3373 "bison_parser.cpp" /* yacc.c:1646 */ break; case 146: -#line 798 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 3402 "bison_parser.cpp" /* yacc.c:1646 */ +#line 778 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } +#line 3379 "bison_parser.cpp" /* yacc.c:1646 */ break; case 147: -#line 799 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 3408 "bison_parser.cpp" /* yacc.c:1646 */ +#line 779 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } +#line 3385 "bison_parser.cpp" /* yacc.c:1646 */ break; case 148: -#line 800 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 3414 "bison_parser.cpp" /* yacc.c:1646 */ +#line 780 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } +#line 3391 "bison_parser.cpp" /* yacc.c:1646 */ break; case 149: -#line 801 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 3420 "bison_parser.cpp" /* yacc.c:1646 */ +#line 784 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } +#line 3397 "bison_parser.cpp" /* yacc.c:1646 */ break; case 150: -#line 802 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 3426 "bison_parser.cpp" /* yacc.c:1646 */ +#line 785 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } +#line 3403 "bison_parser.cpp" /* yacc.c:1646 */ break; case 151: -#line 806 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 3432 "bison_parser.cpp" /* yacc.c:1646 */ +#line 789 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } +#line 3409 "bison_parser.cpp" /* yacc.c:1646 */ break; case 152: -#line 807 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 3438 "bison_parser.cpp" /* yacc.c:1646 */ +#line 793 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } +#line 3415 "bison_parser.cpp" /* yacc.c:1646 */ break; case 153: -#line 811 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 3444 "bison_parser.cpp" /* yacc.c:1646 */ +#line 797 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 3421 "bison_parser.cpp" /* yacc.c:1646 */ break; case 154: -#line 815 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 3450 "bison_parser.cpp" /* yacc.c:1646 */ +#line 801 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } +#line 3427 "bison_parser.cpp" /* yacc.c:1646 */ break; case 155: -#line 819 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3456 "bison_parser.cpp" /* yacc.c:1646 */ +#line 802 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } +#line 3433 "bison_parser.cpp" /* yacc.c:1646 */ break; case 156: -#line 823 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 3462 "bison_parser.cpp" /* yacc.c:1646 */ +#line 803 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeStar(); } +#line 3439 "bison_parser.cpp" /* yacc.c:1646 */ break; case 157: -#line 824 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 3468 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 158: -#line 825 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeStar(); } -#line 3474 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 159: -#line 826 "bison_parser.y" /* yacc.c:1646 */ +#line 804 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 3480 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3445 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 164: -#line 837 "bison_parser.y" /* yacc.c:1646 */ + case 162: +#line 815 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 3486 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3451 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 163: +#line 820 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } +#line 3457 "bison_parser.cpp" /* yacc.c:1646 */ break; case 165: -#line 842 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 3492 "bison_parser.cpp" /* yacc.c:1646 */ +#line 825 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } +#line 3463 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 166: +#line 829 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeNullLiteral(); } +#line 3469 "bison_parser.cpp" /* yacc.c:1646 */ break; case 167: -#line 847 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 3498 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 168: -#line 851 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeNullLiteral(); } -#line 3504 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 169: -#line 855 "bison_parser.y" /* yacc.c:1646 */ +#line 833 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 3514 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3479 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 171: -#line 868 "bison_parser.y" /* yacc.c:1646 */ + case 169: +#line 846 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[0].table_vec)->push_back((yyvsp[-2].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[0].table_vec); (yyval.table) = tbl; } -#line 3525 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3490 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 175: -#line 884 "bison_parser.y" /* yacc.c:1646 */ + case 173: +#line 862 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3536 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3501 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 174: +#line 871 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } +#line 3507 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 175: +#line 872 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } +#line 3513 "bison_parser.cpp" /* yacc.c:1646 */ break; case 176: -#line 893 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 3542 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 177: -#line 894 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 3548 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 178: -#line 899 "bison_parser.y" /* yacc.c:1646 */ +#line 877 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableName); - tbl->schema = (yyvsp[-1].table_n).schema; - tbl->name = (yyvsp[-1].table_n).name; + tbl->name = (yyvsp[-1].sval); tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3560 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3524 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 177: +#line 887 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.table) = new TableRef(kTableName); + (yyval.table)->name = (yyvsp[0].sval); + } +#line 3533 "bison_parser.cpp" /* yacc.c:1646 */ break; case 179: -#line 910 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.table) = new TableRef(kTableName); - (yyval.table)->schema = (yyvsp[0].table_n).schema; - (yyval.table)->name = (yyvsp[0].table_n).name; - } -#line 3570 "bison_parser.cpp" /* yacc.c:1646 */ +#line 896 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.sval) = (yyvsp[0].sval); } +#line 3539 "bison_parser.cpp" /* yacc.c:1646 */ break; case 180: -#line 919 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_n).schema = nullptr; (yyval.table_n).name = (yyvsp[0].sval);} -#line 3576 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 181: -#line 920 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_n).schema = (yyvsp[-2].sval); (yyval.table_n).name = (yyvsp[0].sval); } -#line 3582 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 182: -#line 925 "bison_parser.y" /* yacc.c:1646 */ +#line 901 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = (yyvsp[0].sval); } -#line 3588 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3545 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 185: -#line 931 "bison_parser.y" /* yacc.c:1646 */ + case 183: +#line 907 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = nullptr; } -#line 3594 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3551 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 186: -#line 940 "bison_parser.y" /* yacc.c:1646 */ + case 184: +#line 916 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3602,11 +3559,11 @@ yyreduce: (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 3606 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3563 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 187: -#line 948 "bison_parser.y" /* yacc.c:1646 */ + case 185: +#line 924 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3615,11 +3572,11 @@ yyreduce: (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 3619 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3576 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 188: -#line 958 "bison_parser.y" /* yacc.c:1646 */ + case 186: +#line 934 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3635,71 +3592,71 @@ yyreduce: (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 3639 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3596 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 187: +#line 952 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinInner; } +#line 3602 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 188: +#line 953 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinOuter; } +#line 3608 "bison_parser.cpp" /* yacc.c:1646 */ break; case 189: -#line 976 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } -#line 3645 "bison_parser.cpp" /* yacc.c:1646 */ +#line 954 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinLeftOuter; } +#line 3614 "bison_parser.cpp" /* yacc.c:1646 */ break; case 190: -#line 977 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinOuter; } -#line 3651 "bison_parser.cpp" /* yacc.c:1646 */ +#line 955 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinRightOuter; } +#line 3620 "bison_parser.cpp" /* yacc.c:1646 */ break; case 191: -#line 978 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeftOuter; } -#line 3657 "bison_parser.cpp" /* yacc.c:1646 */ +#line 956 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinLeft; } +#line 3626 "bison_parser.cpp" /* yacc.c:1646 */ break; case 192: -#line 979 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRightOuter; } -#line 3663 "bison_parser.cpp" /* yacc.c:1646 */ +#line 957 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinRight; } +#line 3632 "bison_parser.cpp" /* yacc.c:1646 */ break; case 193: -#line 980 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeft; } -#line 3669 "bison_parser.cpp" /* yacc.c:1646 */ +#line 958 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinCross; } +#line 3638 "bison_parser.cpp" /* yacc.c:1646 */ break; case 194: -#line 981 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRight; } -#line 3675 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 195: -#line 982 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinCross; } -#line 3681 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 196: -#line 983 "bison_parser.y" /* yacc.c:1646 */ +#line 959 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinInner; } -#line 3687 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3644 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 200: -#line 1003 "bison_parser.y" /* yacc.c:1646 */ + case 198: +#line 979 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 3693 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3650 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 201: -#line 1004 "bison_parser.y" /* yacc.c:1646 */ + case 199: +#line 980 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 3699 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3656 "bison_parser.cpp" /* yacc.c:1646 */ break; -#line 3703 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3660 "bison_parser.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3934,7 +3891,7 @@ yyreturn: #endif return yyresult; } -#line 1007 "bison_parser.y" /* yacc.c:1906 */ +#line 983 "bison_parser.y" /* yacc.c:1906 */ /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 4a7af71..c2a852d 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -236,8 +236,7 @@ union HSQL_STYPE hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; - - hsql::TableName table_n; + hsql::TableRef* table; hsql::Expr* expr; hsql::OrderDescription* order; @@ -256,7 +255,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; -#line 260 "bison_parser.h" /* yacc.c:1909 */ +#line 259 "bison_parser.h" /* yacc.c:1909 */ }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp index 029c86a..094f831 100644 --- a/src/parser/flex_lexer.cpp +++ b/src/parser/flex_lexer.cpp @@ -8,8 +8,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -88,25 +88,13 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ @@ -159,7 +147,15 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -181,6 +177,7 @@ typedef size_t yy_size_t; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -210,12 +207,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -238,7 +235,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -294,7 +291,7 @@ static void hsql__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner YY_BUFFER_STATE hsql__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE hsql__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *hsql_alloc (yy_size_t ,yyscan_t yyscanner ); void *hsql_realloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -326,7 +323,7 @@ void hsql_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define hsql_wrap(yyscanner) 1 +#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; @@ -338,14 +335,14 @@ typedef int yy_state_type; static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); +static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (int) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; @@ -466,7 +463,7 @@ static yyconst flex_int16_t yy_accept[938] = 2, 2, 5, 6, 2, 2, 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -498,7 +495,7 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[68] = +static yyconst YY_CHAR yy_meta[68] = { 0, 1, 1, 2, 1, 3, 1, 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, @@ -509,7 +506,7 @@ static yyconst flex_int32_t yy_meta[68] = 4, 4, 4, 4, 4, 4, 1 } ; -static yyconst flex_int16_t yy_base[945] = +static yyconst flex_uint16_t yy_base[945] = { 0, 0, 0, 67, 0, 433, 3713, 133, 135, 418, 0, 3713, 410, 131, 401, 133, 132, 384, 129, 129, 137, @@ -725,7 +722,7 @@ static yyconst flex_int16_t yy_def[945] = 937, 937, 937, 937 } ; -static yyconst flex_int16_t yy_nxt[3781] = +static yyconst flex_uint16_t yy_nxt[3781] = { 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 11, 17, 18, 19, 20, 21, 22, 23, 24, @@ -1599,7 +1596,7 @@ static yyconst flex_int16_t yy_chk[3781] = /*************************** ** Section 3: Rules ***************************/ -#line 1603 "flex_lexer.cpp" +#line 1600 "flex_lexer.cpp" #define INITIAL 0 #define COMMENT 1 @@ -1629,8 +1626,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; + int yy_n_chars; + int yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -1681,23 +1678,23 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *hsql_get_in (yyscan_t yyscanner ); -void hsql_set_in (FILE * in_str ,yyscan_t yyscanner ); +void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner ); FILE *hsql_get_out (yyscan_t yyscanner ); -void hsql_set_out (FILE * out_str ,yyscan_t yyscanner ); +void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner ); -yy_size_t hsql_get_leng (yyscan_t yyscanner ); + int hsql_get_leng (yyscan_t yyscanner ); char *hsql_get_text (yyscan_t yyscanner ); int hsql_get_lineno (yyscan_t yyscanner ); -void hsql_set_lineno (int line_number ,yyscan_t yyscanner ); +void hsql_set_lineno (int _line_number ,yyscan_t yyscanner ); int hsql_get_column (yyscan_t yyscanner ); -void hsql_set_column (int column_no ,yyscan_t yyscanner ); +void hsql_set_column (int _column_no ,yyscan_t yyscanner ); YYSTYPE * hsql_get_lval (yyscan_t yyscanner ); @@ -1719,6 +1716,10 @@ extern int hsql_wrap (yyscan_t yyscanner ); #endif #endif +#ifndef YY_NO_UNPUT + +#endif + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); #endif @@ -1739,7 +1740,12 @@ static int input (yyscan_t yyscanner ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1747,7 +1753,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1771,7 +1777,7 @@ static int input (yyscan_t yyscanner ); else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -1828,7 +1834,7 @@ extern int hsql_lex \ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -1838,16 +1844,11 @@ extern int hsql_lex \ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 51 "flex_lexer.l" - - -#line 1850 "flex_lexer.cpp" - yylval = yylval_param; yylloc = yylloc_param; @@ -1878,7 +1879,13 @@ YY_DECL hsql__load_buffer_state(yyscanner ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 51 "flex_lexer.l" + + +#line 1887 "flex_lexer.cpp" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = yyg->yy_c_buf_p; @@ -1894,7 +1901,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -1906,7 +1913,7 @@ yy_match: if ( yy_current_state >= 938 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; ++yy_cp; } while ( yy_current_state != 937 ); @@ -2625,7 +2632,7 @@ YY_RULE_SETUP #line 217 "flex_lexer.l" ECHO; YY_BREAK -#line 2629 "flex_lexer.cpp" +#line 2636 "flex_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): yyterminate(); @@ -2758,6 +2765,7 @@ case YY_STATE_EOF(COMMENT): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of hsql_lex */ /* yy_get_next_buffer - try to read in a new buffer @@ -2770,9 +2778,9 @@ case YY_STATE_EOF(COMMENT): static int yy_get_next_buffer (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = yyg->yytext_ptr; + int number_to_move, i; int ret_val; if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) @@ -2801,7 +2809,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -2814,7 +2822,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - yy_size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2828,7 +2836,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - yy_size_t new_size = b->yy_buf_size * 2; + int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2841,7 +2849,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -2883,9 +2891,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hsql_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); @@ -2904,15 +2912,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner) static yy_state_type yy_get_previous_state (yyscan_t yyscanner) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; yy_current_state = yyg->yy_start; for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -2924,7 +2932,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( yy_current_state >= 938 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; } return yy_current_state; @@ -2937,11 +2945,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { - register int yy_is_jam; + int yy_is_jam; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; + char *yy_cp = yyg->yy_c_buf_p; - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yyg->yy_last_accepting_state = yy_current_state; @@ -2953,13 +2961,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( yy_current_state >= 938 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; yy_is_jam = (yy_current_state == 937); (void)yyg; return yy_is_jam ? 0 : yy_current_state; } +#ifndef YY_NO_UNPUT + +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (yyscan_t yyscanner) @@ -2985,7 +2997,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -3009,7 +3021,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) case EOB_ACT_END_OF_FILE: { if ( hsql_wrap(yyscanner ) ) - return EOF; + return 0; if ( ! yyg->yy_did_buffer_switch_on_eof ) YY_NEW_FILE; @@ -3113,7 +3125,7 @@ static void hsql__load_buffer_state (yyscan_t yyscanner) if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in hsql__create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = (yy_size_t)size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. @@ -3265,7 +3277,7 @@ void hsql_pop_buffer_state (yyscan_t yyscanner) */ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) { - yy_size_t num_to_alloc; + int num_to_alloc; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; if (!yyg->yy_buffer_stack) { @@ -3274,15 +3286,15 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_alloc (num_to_alloc * sizeof(struct yy_buffer_state*) , yyscanner); if ( ! yyg->yy_buffer_stack ) YY_FATAL_ERROR( "out of dynamic memory in hsql_ensure_buffer_stack()" ); - + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + yyg->yy_buffer_stack_max = num_to_alloc; yyg->yy_buffer_stack_top = 0; return; @@ -3291,7 +3303,7 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = yyg->yy_buffer_stack_max + grow_size; yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_realloc @@ -3311,7 +3323,7 @@ static void hsql_ensure_buffer_stack (yyscan_t yyscanner) * @param base the character buffer * @param size the size in bytes of the character buffer * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) { @@ -3321,7 +3333,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return NULL; b = (YY_BUFFER_STATE) hsql_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); if ( ! b ) @@ -3330,7 +3342,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -3353,7 +3365,7 @@ YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yysc YY_BUFFER_STATE hsql__scan_string (yyconst char * yystr , yyscan_t yyscanner) { - return hsql__scan_bytes(yystr,strlen(yystr) ,yyscanner); + return hsql__scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to hsql_lex() will @@ -3363,7 +3375,7 @@ YY_BUFFER_STATE hsql__scan_string (yyconst char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; @@ -3371,7 +3383,7 @@ YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_l int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; + n = (yy_size_t) (_yybytes_len + 2); buf = (char *) hsql_alloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in hsql__scan_bytes()" ); @@ -3397,9 +3409,11 @@ YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_l #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) { - (void) fprintf( stderr, "%s\n", msg ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -3437,7 +3451,7 @@ YY_EXTRA_TYPE hsql_get_extra (yyscan_t yyscanner) int hsql_get_lineno (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -3450,7 +3464,7 @@ int hsql_get_lineno (yyscan_t yyscanner) int hsql_get_column (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - + if (! YY_CURRENT_BUFFER) return 0; @@ -3478,7 +3492,7 @@ FILE *hsql_get_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -yy_size_t hsql_get_leng (yyscan_t yyscanner) +int hsql_get_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; @@ -3505,10 +3519,10 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) } /** Set the current line number. - * @param line_number + * @param _line_number line number * @param yyscanner The scanner object. */ -void hsql_set_lineno (int line_number , yyscan_t yyscanner) +void hsql_set_lineno (int _line_number , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -3516,14 +3530,14 @@ void hsql_set_lineno (int line_number , yyscan_t yyscanner) if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "hsql_set_lineno called with no buffer" ); - yylineno = line_number; + yylineno = _line_number; } /** Set the current column. - * @param line_number + * @param _column_no column number * @param yyscanner The scanner object. */ -void hsql_set_column (int column_no , yyscan_t yyscanner) +void hsql_set_column (int _column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -3531,25 +3545,25 @@ void hsql_set_column (int column_no , yyscan_t yyscanner) if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "hsql_set_column called with no buffer" ); - yycolumn = column_no; + yycolumn = _column_no; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * @param yyscanner The scanner object. * @see hsql__switch_to_buffer */ -void hsql_set_in (FILE * in_str , yyscan_t yyscanner) +void hsql_set_in (FILE * _in_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; + yyin = _in_str ; } -void hsql_set_out (FILE * out_str , yyscan_t yyscanner) +void hsql_set_out (FILE * _out_str , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; + yyout = _out_str ; } int hsql_get_debug (yyscan_t yyscanner) @@ -3558,10 +3572,10 @@ int hsql_get_debug (yyscan_t yyscanner) return yy_flex_debug; } -void hsql_set_debug (int bdebug , yyscan_t yyscanner) +void hsql_set_debug (int _bdebug , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } /* Accessor methods for yylval and yylloc */ @@ -3637,20 +3651,20 @@ int hsql_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) errno = EINVAL; return 1; } - + *ptr_yy_globals = (yyscan_t) hsql_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - + if (*ptr_yy_globals == NULL){ errno = ENOMEM; return 1; } - + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - + hsql_set_extra (yy_user_defined, *ptr_yy_globals); - + return yy_init_globals ( *ptr_yy_globals ); } @@ -3661,10 +3675,10 @@ static int yy_init_globals (yyscan_t yyscanner) * This function is called from hsql_lex_destroy(), so don't allocate here. */ - yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack = NULL; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; + yyg->yy_c_buf_p = NULL; yyg->yy_init = 0; yyg->yy_start = 0; @@ -3677,8 +3691,8 @@ static int yy_init_globals (yyscan_t yyscanner) yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -3724,7 +3738,10 @@ int hsql_lex_destroy (yyscan_t yyscanner) #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { - register int i; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -3733,7 +3750,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -3743,11 +3760,16 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) void *hsql_alloc (yy_size_t size , yyscan_t yyscanner) { - return (void *) malloc( size ); + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + return malloc(size); } void *hsql_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -3755,11 +3777,13 @@ void *hsql_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void hsql_free (void * ptr , yyscan_t yyscanner) { + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + (void)yyg; free( (char *) ptr ); /* see hsql_realloc() for (char *) cast */ } diff --git a/src/parser/flex_lexer.h b/src/parser/flex_lexer.h index 3b6dfc2..cedea38 100644 --- a/src/parser/flex_lexer.h +++ b/src/parser/flex_lexer.h @@ -12,8 +12,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 37 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -92,25 +92,13 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST +/* TODO: this is always defined, so inline it */ #define yyconst const + +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* An opaque pointer. */ @@ -132,7 +120,15 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif #ifndef YY_TYPEDEF_YY_BUFFER_STATE @@ -157,12 +153,12 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -185,7 +181,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -206,7 +202,7 @@ void hsql_pop_buffer_state (yyscan_t yyscanner ); YY_BUFFER_STATE hsql__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); YY_BUFFER_STATE hsql__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); +YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); void *hsql_alloc (yy_size_t ,yyscan_t yyscanner ); void *hsql_realloc (void *,yy_size_t ,yyscan_t yyscanner ); @@ -214,7 +210,7 @@ void hsql_free (void * ,yyscan_t yyscanner ); /* Begin user sect3 */ -#define hsql_wrap(yyscanner) 1 +#define hsql_wrap(yyscanner) (/*CONSTCOND*/1) #define YY_SKIP_YYWRAP #define yytext_ptr yytext_r @@ -256,23 +252,23 @@ void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); FILE *hsql_get_in (yyscan_t yyscanner ); -void hsql_set_in (FILE * in_str ,yyscan_t yyscanner ); +void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner ); FILE *hsql_get_out (yyscan_t yyscanner ); -void hsql_set_out (FILE * out_str ,yyscan_t yyscanner ); +void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner ); -yy_size_t hsql_get_leng (yyscan_t yyscanner ); + int hsql_get_leng (yyscan_t yyscanner ); char *hsql_get_text (yyscan_t yyscanner ); int hsql_get_lineno (yyscan_t yyscanner ); -void hsql_set_lineno (int line_number ,yyscan_t yyscanner ); +void hsql_set_lineno (int _line_number ,yyscan_t yyscanner ); int hsql_get_column (yyscan_t yyscanner ); -void hsql_set_column (int column_no ,yyscan_t yyscanner ); +void hsql_set_column (int _column_no ,yyscan_t yyscanner ); YYSTYPE * hsql_get_lval (yyscan_t yyscanner ); @@ -308,7 +304,12 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Number of entries by which start-condition stack grows. */ @@ -346,6 +347,6 @@ extern int hsql_lex \ #line 217 "flex_lexer.l" -#line 350 "flex_lexer.h" +#line 351 "flex_lexer.h" #undef hsql_IN_HEADER #endif /* hsql_HEADER_H */ From d220ff47ab01c9172ec88aeca0ce39537dcbe841 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 29 Sep 2017 17:15:18 +0800 Subject: [PATCH 14/19] add drop test case in test/queries/queries-good.sql --- src/parser/bison_parser.y | 6 +++--- test/queries/queries-good.sql | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 test/queries/queries-good.sql diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 3cd7ed8..7d280a9 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -109,7 +109,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; - hsql::TableName table_n; + hsql::TableName table_name; hsql::TableRef* table; hsql::Expr* expr; hsql::OrderDescription* order; @@ -134,7 +134,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha ** Descrutor symbols *********************************/ %destructor { } -%destructor { free( ($$.name) ); free( ($$.schema) ); } +%destructor { free( ($$.name) ); free( ($$.schema) ); } %destructor { free( ($$) ); } %destructor { if (($$) != nullptr) { @@ -186,7 +186,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type update_statement %type drop_statement %type show_statement -%type table_name +%type table_name %type opt_alias alias file_path prepare_target_query %type opt_not_exists opt_exists opt_distinct %type import_file_type opt_join_type column_type diff --git a/test/queries/queries-good.sql b/test/queries/queries-good.sql old mode 100644 new mode 100755 index ec0d431..0c24d87 --- a/test/queries/queries-good.sql +++ b/test/queries/queries-good.sql @@ -39,6 +39,8 @@ UPDATE students SET grade = 1.3, name='Felix Fürstenberg' WHERE name = 'Max Mus UPDATE students SET grade = 1.0; # DROP DROP TABLE students; +DROP TABLE IF EXISTS students; +DROP VIEW IF EXISTS students; # PREPARE PREPARE prep_inst FROM 'INSERT INTO test VALUES (?, ?, ?)'; PREPARE prep2 FROM 'INSERT INTO test VALUES (?, 0, 0); INSERT INTO test VALUES (0, ?, 0); INSERT INTO test VALUES (0, 0, ?);'; From cf28f8fdaf59d6a40b4a78cffc5ec8ee9b8a51c8 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 29 Sep 2017 17:19:39 +0800 Subject: [PATCH 15/19] space format --- src/parser/bison_parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index 7d280a9..b18ac19 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -186,7 +186,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type update_statement %type drop_statement %type show_statement -%type table_name +%type table_name %type opt_alias alias file_path prepare_target_query %type opt_not_exists opt_exists opt_distinct %type import_file_type opt_join_type column_type From 0d0ba53546b48e79d877bd6e53b54a3837d101d7 Mon Sep 17 00:00:00 2001 From: Moritz Eyssen Date: Thu, 12 Oct 2017 19:18:38 +0200 Subject: [PATCH 16/19] Formatting and more tests --- src/parser/bison_parser.cpp | 2187 +++++++++++++++++---------------- src/parser/bison_parser.h | 5 +- src/parser/bison_parser.y | 2 +- test/queries/queries-good.sql | 3 + 4 files changed, 1122 insertions(+), 1075 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 6cbaf04..8aafc9b 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -325,7 +325,8 @@ union HSQL_STYPE hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; - + + hsql::TableName table_name; hsql::TableRef* table; hsql::Expr* expr; hsql::OrderDescription* order; @@ -344,7 +345,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; -#line 348 "bison_parser.cpp" /* yacc.c:355 */ +#line 349 "bison_parser.cpp" /* yacc.c:355 */ }; typedef union HSQL_STYPE HSQL_STYPE; @@ -374,7 +375,7 @@ int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); /* Copy the second part of user declarations. */ -#line 378 "bison_parser.cpp" /* yacc.c:358 */ +#line 379 "bison_parser.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -618,16 +619,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 52 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 574 +#define YYLAST 552 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 151 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 86 +#define YYNNTS 87 /* YYNRULES -- Number of rules. */ -#define YYNRULES 199 +#define YYNRULES 201 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 367 +#define YYNSTATES 371 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -686,26 +687,27 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 242, 242, 263, 264, 268, 272, 276, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 300, 301, 306, - 307, 311, 315, 327, 334, 337, 341, 353, 361, 365, - 375, 378, 391, 397, 403, 413, 414, 418, 419, 423, - 430, 431, 432, 433, 443, 447, 451, 463, 471, 483, - 489, 499, 500, 510, 519, 520, 524, 536, 537, 538, - 555, 556, 560, 561, 565, 575, 592, 596, 597, 598, - 602, 603, 607, 619, 620, 624, 628, 633, 634, 638, - 643, 647, 648, 651, 652, 656, 657, 661, 665, 666, - 667, 673, 674, 678, 679, 680, 687, 688, 692, 693, - 697, 704, 705, 706, 707, 708, 712, 713, 714, 715, - 716, 717, 718, 719, 720, 724, 725, 729, 730, 731, - 732, 733, 737, 738, 739, 740, 741, 742, 743, 744, - 745, 746, 747, 751, 752, 756, 757, 758, 759, 764, - 766, 770, 771, 775, 776, 777, 778, 779, 780, 784, - 785, 789, 793, 797, 801, 802, 803, 804, 808, 809, - 810, 811, 815, 820, 821, 825, 829, 833, 845, 846, - 856, 857, 861, 862, 871, 872, 877, 887, 895, 896, - 901, 902, 906, 907, 915, 923, 933, 952, 953, 954, - 955, 956, 957, 958, 959, 964, 973, 974, 979, 980 + 0, 245, 245, 266, 267, 271, 275, 279, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 303, 304, 309, + 310, 314, 318, 330, 337, 340, 344, 356, 365, 369, + 379, 382, 396, 403, 410, 421, 422, 426, 427, 431, + 438, 439, 440, 441, 451, 457, 463, 471, 472, 481, + 490, 503, 510, 521, 522, 532, 541, 542, 546, 558, + 559, 560, 577, 578, 582, 583, 587, 597, 614, 618, + 619, 620, 624, 625, 629, 641, 642, 646, 650, 655, + 656, 660, 665, 669, 670, 673, 674, 678, 679, 683, + 687, 688, 689, 695, 696, 700, 701, 702, 709, 710, + 714, 715, 719, 726, 727, 728, 729, 730, 734, 735, + 736, 737, 738, 739, 740, 741, 742, 746, 747, 751, + 752, 753, 754, 755, 759, 760, 761, 762, 763, 764, + 765, 766, 767, 768, 769, 773, 774, 778, 779, 780, + 781, 786, 788, 792, 793, 797, 798, 799, 800, 801, + 802, 806, 807, 811, 815, 819, 823, 824, 825, 826, + 830, 831, 832, 833, 837, 842, 843, 847, 851, 855, + 867, 868, 878, 879, 883, 884, 893, 894, 899, 910, + 919, 920, 925, 926, 930, 931, 939, 947, 957, 976, + 977, 978, 979, 980, 981, 982, 983, 988, 997, 998, + 1003, 1004 }; #endif @@ -738,12 +740,12 @@ static const char *const yytname[] = "prepare_statement", "prepare_target_query", "execute_statement", "import_statement", "import_file_type", "file_path", "show_statement", "create_statement", "opt_not_exists", "column_def_commalist", - "column_def", "column_type", "drop_statement", "delete_statement", - "truncate_statement", "insert_statement", "opt_column_list", - "update_statement", "update_clause_commalist", "update_clause", - "select_statement", "select_with_paren", "select_paren_or_clause", - "select_no_paren", "set_operator", "set_type", "opt_all", - "select_clause", "opt_distinct", "select_list", "from_clause", + "column_def", "column_type", "drop_statement", "opt_exists", + "delete_statement", "truncate_statement", "insert_statement", + "opt_column_list", "update_statement", "update_clause_commalist", + "update_clause", "select_statement", "select_with_paren", + "select_paren_or_clause", "select_no_paren", "set_operator", "set_type", + "opt_all", "select_clause", "opt_distinct", "select_list", "from_clause", "opt_where", "opt_group", "opt_having", "opt_order", "order_list", "order_desc", "opt_order_type", "opt_top", "opt_limit", "expr_list", "literal_list", "expr_alias", "expr", "operand", "scalar_expr", @@ -782,57 +784,58 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -231 +#define YYPACT_NINF -232 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-231))) + (!!((Yystate) == (-232))) -#define YYTABLE_NINF -195 +#define YYTABLE_NINF -197 #define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-195))) + (!!((Yytable_value) == (-197))) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { - 231, -3, 32, 33, 50, -30, 15, 22, 10, 34, - 32, -28, 9, -34, 115, 16, -231, 66, 66, -231, - -231, -231, -231, -231, -231, -231, -231, -231, -231, 20, - -231, 12, 160, 23, -231, 24, 96, 68, 68, 32, - 94, 32, 206, 205, 112, -231, 32, 32, 32, -231, - 78, 83, -231, 231, -231, 150, -231, -231, -231, -231, - -231, -34, 134, 125, -34, 178, -231, 242, 7, 245, - 141, 32, 32, 184, -231, 179, 123, -231, -231, -231, - 81, 257, -231, -231, -231, -231, -231, -231, 126, -231, - 210, -231, -231, -231, 81, 210, 206, -231, -231, -231, - -231, -231, -231, 29, -231, -231, -231, -231, -231, -231, - -231, -231, 232, -64, 123, 81, -231, 275, 278, -17, - 8, 133, 195, 146, 139, 177, -231, 70, 213, 148, - -231, 74, 211, -231, -231, -231, -231, -231, -231, -231, - -231, -231, -231, -231, -231, -231, -231, 169, -50, -231, - 295, 178, 152, -231, -59, 178, 259, -231, 7, -231, - 191, 304, 194, -53, 225, -231, -231, 48, 166, -231, - 2, 4, 268, 81, 173, 177, 377, 81, 149, 180, - -76, 13, 184, 81, -231, 81, 320, 81, -231, -231, - 177, -231, 177, -63, 176, 14, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 206, 81, 257, -231, 185, 54, -231, -231, 81, -231, - -231, -231, -231, 206, -231, 252, -6, 56, -231, -34, - 32, -231, 322, 7, -231, 81, -231, -231, 187, -39, - 268, 246, -32, -231, -231, -34, -231, 40, -231, -231, - 6, -231, 282, -231, -231, -231, 236, 318, 405, 177, - 198, 70, -231, 256, 212, 405, 405, 405, 431, 431, - 431, 431, 149, 149, -91, -91, -91, 30, 214, -53, - -231, 7, -231, 295, -231, -231, 275, -231, -231, -231, - -231, -231, -231, 304, -231, -231, -231, 60, 64, -231, - 177, 215, -231, 219, 270, -231, -231, -231, 289, 291, - 13, 280, -231, 253, -231, 177, 405, 70, 221, 65, - -231, -231, 76, -231, -231, -231, -231, -231, 274, -231, - 6, 13, -231, -231, 175, 220, 13, 81, 377, 224, - 93, -231, -231, -231, 177, -231, -231, -231, 13, 244, - -5, -231, -231, 344, 175, 226, 81, 81, -231, -231, - 5, -53, -231, -53, 227, 229, -231 + 268, 42, 35, 73, 110, -43, -30, 39, 41, 32, + 35, 30, 11, -39, 147, 3, -232, 82, 82, -232, + -232, -232, -232, -232, -232, -232, -232, -232, -232, 28, + -232, 27, 169, 49, -232, 56, 126, 100, 100, 35, + 117, 35, 226, 205, 123, -232, 128, 128, 35, -232, + 101, 103, -232, 268, -232, 170, -232, -232, -232, -232, + -232, -39, 152, 144, -39, 194, -232, 258, 14, 261, + 159, 35, 35, 196, -232, 190, 127, -232, -232, -232, + 151, 270, 231, 35, 35, -232, -232, -232, -232, 131, + -232, 212, -232, -232, -232, 151, 212, 226, -232, -232, + -232, -232, -232, -232, -44, -232, -232, -232, -232, -232, + -232, -232, -232, 241, -56, 127, 151, -232, 280, 279, + -16, -84, 140, 188, 155, 161, 75, -232, 113, 213, + 157, -232, 65, 211, -232, -232, -232, -232, -232, -232, + -232, -232, -232, -232, -232, -232, -232, -232, 181, -61, + -232, -232, -232, -232, 306, 194, 164, -232, -46, 194, + 264, -232, 14, -232, 202, 315, 207, -78, 234, -232, + -232, -37, 179, -232, 2, 5, 276, 151, 185, 75, + 381, 151, 99, 180, -86, 4, 196, 151, -232, 151, + 324, 151, -232, -232, 75, -232, 75, -47, 186, -62, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 226, 151, 270, -232, 187, 34, + -232, -232, 151, -232, -232, -232, -232, 226, -232, 253, + 7, 48, -232, -39, 35, -232, 331, 14, -232, 151, + -232, -232, 192, -50, 276, 254, 26, -232, -232, -39, + -232, 24, -232, -232, 10, -232, 283, -232, -232, -232, + 256, 322, 409, 75, 210, 113, -232, 266, 217, 409, + 409, 409, 235, 235, 235, 235, 99, 99, -95, -95, + -95, 50, 218, -78, -232, 14, -232, 306, -232, -232, + 280, -232, -232, -232, -232, -232, -232, 315, -232, -232, + -232, 53, 59, -232, 75, 224, -232, 233, 277, -232, + -232, -232, 309, 312, 4, 295, -232, 267, -232, 75, + 409, 113, 238, 60, -232, -232, 69, -232, -232, -232, + -232, -232, 278, -232, 10, 4, -232, -232, 229, 236, + 4, 151, 381, 240, 78, -232, -232, -232, 75, -232, + -232, -232, 4, 142, -27, -232, -232, 348, 229, 243, + 151, 151, -232, -232, 6, -78, -232, -78, 242, 244, + -232 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -840,71 +843,72 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, - 0, 0, 0, 0, 0, 197, 3, 18, 18, 16, - 9, 7, 10, 15, 12, 13, 11, 14, 8, 57, - 58, 84, 0, 178, 48, 25, 0, 36, 36, 0, - 0, 0, 0, 74, 0, 177, 0, 0, 0, 30, - 0, 0, 1, 196, 2, 0, 6, 5, 68, 69, - 67, 0, 71, 0, 0, 95, 46, 0, 0, 0, - 0, 0, 0, 78, 28, 0, 52, 165, 91, 73, - 0, 0, 44, 45, 31, 61, 60, 4, 0, 62, - 84, 63, 70, 66, 0, 84, 0, 64, 179, 162, - 163, 166, 167, 0, 98, 158, 159, 164, 160, 161, - 24, 23, 0, 0, 52, 0, 47, 0, 0, 0, - 154, 0, 0, 0, 0, 0, 156, 0, 0, 75, - 96, 183, 101, 108, 109, 110, 103, 105, 111, 104, - 122, 112, 113, 107, 102, 115, 116, 0, 78, 54, - 0, 95, 83, 85, 90, 95, 93, 26, 0, 35, - 0, 0, 0, 77, 0, 29, 198, 0, 0, 50, - 74, 0, 0, 0, 0, 0, 118, 0, 117, 0, - 0, 0, 78, 0, 181, 0, 0, 0, 182, 100, - 0, 119, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, + 0, 0, 0, 0, 0, 199, 3, 18, 18, 16, + 9, 7, 10, 15, 12, 13, 11, 14, 8, 59, + 60, 86, 0, 180, 50, 25, 0, 36, 36, 0, + 0, 0, 0, 76, 0, 179, 48, 48, 0, 30, + 0, 0, 1, 198, 2, 0, 6, 5, 70, 71, + 69, 0, 73, 0, 0, 97, 46, 0, 0, 0, + 0, 0, 0, 80, 28, 0, 54, 167, 93, 75, + 0, 0, 0, 0, 0, 31, 63, 62, 4, 0, + 64, 86, 65, 72, 68, 0, 86, 0, 66, 181, + 164, 165, 168, 169, 0, 100, 160, 161, 166, 162, + 163, 24, 23, 0, 0, 54, 0, 49, 0, 0, + 0, 156, 0, 0, 0, 0, 0, 158, 0, 0, + 77, 98, 185, 103, 110, 111, 112, 105, 107, 113, + 106, 124, 114, 115, 109, 104, 117, 118, 0, 80, + 56, 47, 44, 45, 0, 97, 85, 87, 92, 97, + 95, 26, 0, 35, 0, 0, 0, 79, 0, 29, + 200, 0, 0, 52, 76, 0, 0, 0, 0, 0, + 120, 0, 119, 0, 0, 0, 80, 0, 183, 0, + 0, 0, 184, 102, 0, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 53, 21, 0, 19, 59, 0, 89, - 88, 87, 65, 0, 99, 0, 0, 0, 37, 0, - 0, 51, 0, 0, 149, 0, 155, 157, 0, 0, - 0, 0, 0, 114, 106, 0, 76, 168, 170, 172, - 183, 171, 80, 97, 133, 180, 134, 0, 129, 0, - 0, 0, 120, 0, 132, 131, 143, 144, 145, 146, - 147, 148, 124, 123, 126, 125, 127, 128, 0, 56, - 55, 0, 17, 0, 86, 94, 0, 41, 42, 43, - 40, 39, 33, 0, 34, 27, 199, 0, 0, 141, - 0, 0, 151, 0, 0, 193, 187, 188, 192, 191, - 0, 0, 176, 0, 72, 0, 130, 0, 0, 0, - 121, 152, 0, 20, 32, 38, 49, 150, 0, 142, - 183, 0, 190, 189, 174, 169, 0, 0, 153, 0, - 0, 137, 135, 22, 0, 139, 173, 184, 0, 194, - 82, 138, 136, 0, 175, 0, 0, 0, 79, 140, - 0, 195, 185, 81, 154, 0, 186 + 0, 0, 0, 0, 0, 0, 0, 55, 21, 0, + 19, 61, 0, 91, 90, 89, 67, 0, 101, 0, + 0, 0, 37, 0, 0, 53, 0, 0, 151, 0, + 157, 159, 0, 0, 0, 0, 0, 116, 108, 0, + 78, 170, 172, 174, 185, 173, 82, 99, 135, 182, + 136, 0, 131, 0, 0, 0, 122, 0, 134, 133, + 145, 146, 147, 148, 149, 150, 126, 125, 128, 127, + 129, 130, 0, 58, 57, 0, 17, 0, 88, 96, + 0, 41, 42, 43, 40, 39, 33, 0, 34, 27, + 201, 0, 0, 143, 0, 0, 153, 0, 0, 195, + 189, 190, 194, 193, 0, 0, 178, 0, 74, 0, + 132, 0, 0, 0, 123, 154, 0, 20, 32, 38, + 51, 152, 0, 144, 185, 0, 192, 191, 176, 171, + 0, 0, 155, 0, 0, 139, 137, 22, 0, 141, + 175, 186, 0, 196, 84, 140, 138, 0, 177, 0, + 0, 0, 81, 142, 0, 197, 187, 83, 156, 0, + 188 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -231, -231, -231, 307, -231, 354, -231, 90, -231, -231, - -231, -231, -231, 91, -231, -231, 340, -231, 87, -231, - -231, -231, -231, -231, 267, -231, -231, 170, -140, 52, - 321, -13, 353, -231, -231, 190, 216, -231, -231, -121, - -231, -231, 72, -231, 172, -231, -231, 41, -171, -203, - 204, -93, -68, -231, -231, -231, -231, -231, -231, -231, - -231, -231, -231, -231, -231, 28, -65, -112, -231, -38, - -231, -231, -231, -149, 62, -231, -231, -231, 0, -231, - -230, -231, -231, -231, -231, -231 + -232, -232, -232, 338, -232, 374, -232, 107, -232, -232, + -232, -232, -232, 105, -232, -232, 359, -232, 102, -232, + -232, 351, -232, -232, -232, 285, -232, -232, 189, -64, + 13, 337, -13, 378, -232, -232, 182, 246, -232, -232, + -128, -232, -232, 91, -232, 200, -232, -232, -68, -175, + -220, 245, -94, -71, -232, -232, -232, -232, -232, -232, + -232, -232, -232, -232, -232, -232, 61, -66, -113, -232, + -38, -232, -232, -232, -162, 88, -232, -232, -232, 1, + -232, -231, -232, -232, -232, -232, -232 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 14, 15, 16, 17, 56, 215, 216, 18, 111, - 19, 20, 75, 164, 21, 22, 71, 227, 228, 291, - 23, 24, 25, 26, 119, 27, 148, 149, 28, 29, - 90, 30, 61, 62, 93, 31, 80, 128, 182, 116, - 314, 358, 65, 152, 153, 221, 43, 97, 129, 103, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 105, 106, 107, - 108, 109, 246, 247, 248, 335, 249, 44, 250, 188, - 189, 251, 311, 362, 54, 167 + -1, 14, 15, 16, 17, 56, 219, 220, 18, 112, + 19, 20, 75, 168, 21, 22, 71, 231, 232, 295, + 23, 83, 24, 25, 26, 120, 27, 149, 150, 28, + 29, 91, 30, 61, 62, 94, 31, 80, 129, 186, + 117, 318, 362, 65, 156, 157, 225, 43, 98, 130, + 104, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 106, 107, + 108, 109, 110, 250, 251, 252, 339, 253, 44, 254, + 192, 193, 255, 315, 366, 54, 171 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -912,126 +916,122 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 51, 154, 34, 104, 78, 165, 242, 236, 364, 184, - 45, 99, 100, 77, 79, 9, 33, 160, 219, 287, - 312, 58, 163, 115, 32, 259, 185, 213, 48, 58, - 297, 288, 9, 196, 180, 33, 35, 357, 168, 73, - 37, 76, 46, 185, 220, 187, 82, 83, 84, 185, - 209, 59, 210, 36, 260, 176, 300, 178, 156, 59, - 49, 252, 187, 185, 298, 50, 304, 38, 187, 47, - 244, 113, 114, 120, 99, 100, 77, 184, 322, 63, - 239, 161, 187, 60, 120, 99, 100, 77, 289, 294, - 319, 60, 254, 224, 256, 41, 39, 101, 305, 212, - 346, 290, 306, 40, 262, 303, 169, 176, 307, 308, - 121, 13, 302, 89, 179, 52, 89, 183, 279, 9, - 186, 121, 257, 263, 258, 154, -194, 309, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 237, 126, 183, 122, 340, 42, 234, 120, - 99, 100, 77, 170, 196, 171, 122, 102, 245, 238, - 101, 334, 151, 66, 53, 55, 350, 155, 104, 68, - 67, 101, 278, 210, 165, 157, 185, 69, 158, 123, - 120, 99, 100, 77, 70, 285, 174, 349, 186, 310, - 123, 316, 217, 124, 231, 187, 222, 232, 74, 354, - 282, 304, 292, 283, 124, 293, 326, 125, 126, 158, - 327, 342, 77, 183, 183, 127, 104, 79, 125, 126, - 102, 122, 343, 81, 85, 158, 127, 301, 190, 86, - 295, 102, 328, 305, 88, 92, 101, 306, 1, 352, - 94, 96, 183, 307, 308, 98, 2, 338, 318, 110, - 112, 91, 122, 3, 91, 175, 191, 115, 4, 117, - 147, -194, 309, 361, 363, 5, 6, 101, 118, 124, - 304, 150, 159, 196, 7, 8, 353, 63, 172, 99, - 9, 166, 177, 125, 126, 10, 175, 206, 207, 208, - 209, 127, 210, 173, 181, 211, 102, 183, 214, 192, - 124, 218, 305, 225, 339, 223, 306, 226, 229, 11, - 230, 233, 307, 308, 125, 126, 355, 9, 240, 191, - 193, 261, 127, 255, 12, 296, 243, 102, 194, 195, - 281, 309, 286, 299, 259, 196, 197, 198, 185, 199, - 200, 201, 313, 317, 202, 203, 320, 204, 205, 206, - 207, 208, 209, 344, 210, 210, 331, 332, 321, 333, - 87, 329, 192, 191, 356, 330, 336, 341, 337, 348, - 351, 360, 57, 323, 171, 366, 13, 324, 72, 345, - 325, 162, 280, 241, 64, 95, 235, 253, 365, 191, - 284, 0, 195, 347, 0, 0, 0, 0, 196, 197, - 198, 0, 199, 200, 201, 0, 192, 202, 203, 0, - 204, 205, 206, 207, 208, 209, 0, 210, 0, 0, - 315, 0, 191, 0, 0, 0, 0, 241, 0, 0, - 0, 0, 192, 0, 0, 0, 195, 0, 0, 0, - 0, 0, 196, 197, 198, 0, 199, 200, 201, 359, - 191, 202, 203, 241, 204, 205, 206, 207, 208, 209, - 0, 210, 195, 0, 0, 192, 0, 0, 196, 197, - 198, 0, 199, 200, 201, 0, 191, 202, 203, 0, - 204, 205, 206, 207, 208, 209, 241, 210, 0, 0, - 0, 0, 0, -195, 0, 195, 0, 0, 0, 0, - 0, 196, 197, 198, 0, 199, 200, 201, 0, 0, - 202, 203, 0, 204, 205, 206, 207, 208, 209, 0, - 210, 0, 0, 195, 0, 0, 0, 0, 0, 196, - -195, -195, 0, -195, 200, 201, 0, 0, 202, 203, - 0, 204, 205, 206, 207, 208, 209, 0, 210, 195, - 0, 0, 0, 0, 0, 196, 0, 0, 0, 0, - -195, -195, 0, 0, -195, -195, 0, 204, 205, 206, - 207, 208, 209, 0, 210 + 51, 158, 105, 34, 78, 169, 246, 33, 240, 368, + 9, 45, 116, 188, 79, 361, 189, 301, 100, 101, + 77, 217, 167, 316, 189, 164, 50, 37, 266, 200, + 48, 223, 291, 9, 184, 191, 58, 58, 33, 172, + 73, 263, 76, 191, 292, 304, 213, 267, 214, 85, + 308, 39, 189, 180, 38, 182, 189, 224, 256, 160, + 248, 174, 49, 175, 302, 326, 59, 59, 188, 32, + 264, 191, 114, 115, 90, 191, 35, 90, 121, 100, + 101, 77, 309, 243, 152, 153, 310, 221, 216, 165, + 323, 226, 311, 312, 63, 258, 228, 260, 60, 60, + 46, 293, 161, 350, 102, 162, 13, 173, 180, 235, + -196, 313, 236, 36, 294, 183, 121, 100, 101, 77, + 40, 283, 187, 261, 190, 262, 41, 47, 158, 268, + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, + 279, 280, 281, 241, 127, 42, 344, 52, 238, 249, + 123, 53, 338, 122, 121, 100, 101, 77, 121, 100, + 101, 77, 9, 242, 103, 102, 354, 189, 308, 298, + 306, 105, 66, 314, 200, 187, 282, 169, 353, 190, + 286, 55, 155, 287, 179, 307, 191, 159, 123, 289, + 358, 122, 320, 214, 296, 178, 67, 297, 125, 330, + 309, 68, 162, 102, 310, 331, 346, 69, 187, 187, + 311, 312, 126, 127, 359, 347, 70, 79, 162, 105, + 128, 74, 124, 200, 356, 103, 123, 187, 194, 313, + 123, 305, 77, 332, 81, 299, 125, 210, 211, 212, + 213, 102, 214, 92, 82, 102, 92, 86, 342, 87, + 126, 127, 322, 93, 89, 308, 195, 97, 128, 95, + 124, 99, 360, 103, 179, 111, 365, 367, 113, 116, + 118, 151, 119, 148, 125, 1, 154, 357, 125, 63, + 195, 163, 170, 2, 100, 176, 177, 309, 126, 127, + 3, 310, 126, 127, 185, 4, 128, 311, 312, 196, + 128, 103, 5, 6, 181, 103, 187, 215, 343, 218, + 227, 7, 8, 222, 229, -196, 313, 9, 230, 234, + 197, 233, 10, 195, 237, 9, 247, 259, 198, 199, + 244, 265, 285, 290, 300, 200, 201, 202, 303, 203, + 204, 205, 263, 317, 206, 207, 11, 208, 209, 210, + 211, 212, 213, 199, 214, 321, 324, 348, 189, 200, + 214, 12, 325, 335, -197, -197, 196, 195, -197, -197, + 333, 208, 209, 210, 211, 212, 213, 336, 214, 334, + 337, 340, 341, 349, 345, 352, 355, 245, 364, 175, + 370, 88, 57, 195, 327, 328, 199, 72, 84, 329, + 166, 96, 200, 201, 202, 284, 203, 204, 205, 64, + 196, 206, 207, 13, 208, 209, 210, 211, 212, 213, + 239, 214, 288, 351, 319, 369, 195, 0, 0, 0, + 0, 245, 257, 0, 0, 0, 196, 0, 0, 0, + 199, 0, 0, 0, 0, 0, 200, 201, 202, 0, + 203, 204, 205, 363, 195, 206, 207, 245, 208, 209, + 210, 211, 212, 213, 0, 214, 199, 0, 0, 196, + 0, 0, 200, 201, 202, 0, 203, 204, 205, 0, + 0, 206, 207, 0, 208, 209, 210, 211, 212, 213, + 245, 214, 0, 0, 0, 0, 0, -197, 0, 199, + 0, 0, 0, 0, 0, 200, 201, 202, 0, 203, + 204, 205, 0, 0, 206, 207, 0, 208, 209, 210, + 211, 212, 213, 0, 214, 0, 0, 199, 0, 0, + 0, 0, 0, 200, -197, -197, 0, -197, 204, 205, + 0, 0, 206, 207, 0, 208, 209, 210, 211, 212, + 213, 0, 214 }; static const yytype_int16 yycheck[] = { - 13, 94, 2, 68, 42, 117, 177, 3, 3, 3, - 10, 4, 5, 6, 12, 49, 3, 81, 77, 25, - 250, 9, 115, 73, 27, 88, 102, 148, 19, 9, - 233, 37, 49, 124, 127, 3, 3, 42, 55, 39, - 70, 41, 70, 102, 103, 121, 46, 47, 48, 102, - 141, 39, 143, 3, 117, 123, 95, 125, 96, 39, - 51, 182, 121, 102, 235, 13, 26, 97, 121, 97, - 146, 71, 72, 3, 4, 5, 6, 3, 281, 67, - 173, 145, 121, 71, 3, 4, 5, 6, 94, 229, - 261, 71, 185, 158, 187, 85, 81, 90, 58, 149, - 330, 107, 62, 81, 90, 245, 119, 175, 68, 69, - 40, 145, 144, 61, 127, 0, 64, 149, 211, 49, - 114, 40, 190, 109, 192, 218, 86, 87, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 138, 138, 149, 75, 317, 113, 146, 3, - 4, 5, 6, 145, 124, 147, 75, 150, 145, 172, - 90, 310, 90, 3, 148, 99, 337, 95, 233, 145, - 147, 90, 210, 143, 286, 146, 102, 81, 149, 109, - 3, 4, 5, 6, 116, 223, 40, 336, 114, 149, - 109, 259, 151, 123, 146, 121, 155, 149, 104, 348, - 146, 26, 146, 149, 123, 149, 146, 137, 138, 149, - 146, 146, 6, 149, 149, 145, 281, 12, 137, 138, - 150, 75, 146, 111, 146, 149, 145, 240, 17, 146, - 230, 150, 300, 58, 84, 101, 90, 62, 7, 146, - 115, 63, 149, 68, 69, 3, 15, 315, 261, 4, - 109, 61, 75, 22, 64, 109, 45, 73, 27, 80, - 3, 86, 87, 356, 357, 34, 35, 90, 145, 123, - 26, 145, 40, 124, 43, 44, 344, 67, 145, 4, - 49, 3, 143, 137, 138, 54, 109, 138, 139, 140, - 141, 145, 143, 98, 81, 126, 150, 149, 3, 88, - 123, 149, 58, 112, 317, 46, 62, 3, 114, 78, - 85, 145, 68, 69, 137, 138, 72, 49, 145, 45, - 109, 145, 145, 3, 93, 3, 146, 150, 117, 118, - 145, 87, 80, 146, 88, 124, 125, 126, 102, 128, - 129, 130, 60, 145, 133, 134, 90, 136, 137, 138, - 139, 140, 141, 79, 143, 143, 86, 68, 144, 68, - 53, 146, 88, 45, 120, 146, 86, 146, 115, 149, - 146, 145, 18, 283, 147, 146, 145, 286, 38, 105, - 293, 114, 212, 109, 31, 64, 170, 183, 360, 45, - 218, -1, 118, 331, -1, -1, -1, -1, 124, 125, - 126, -1, 128, 129, 130, -1, 88, 133, 134, -1, - 136, 137, 138, 139, 140, 141, -1, 143, -1, -1, - 102, -1, 45, -1, -1, -1, -1, 109, -1, -1, - -1, -1, 88, -1, -1, -1, 118, -1, -1, -1, - -1, -1, 124, 125, 126, -1, 128, 129, 130, 105, - 45, 133, 134, 109, 136, 137, 138, 139, 140, 141, - -1, 143, 118, -1, -1, 88, -1, -1, 124, 125, - 126, -1, 128, 129, 130, -1, 45, 133, 134, -1, - 136, 137, 138, 139, 140, 141, 109, 143, -1, -1, - -1, -1, -1, 88, -1, 118, -1, -1, -1, -1, - -1, 124, 125, 126, -1, 128, 129, 130, -1, -1, - 133, 134, -1, 136, 137, 138, 139, 140, 141, -1, - 143, -1, -1, 118, -1, -1, -1, -1, -1, 124, - 125, 126, -1, 128, 129, 130, -1, -1, 133, 134, - -1, 136, 137, 138, 139, 140, 141, -1, 143, 118, - -1, -1, -1, -1, -1, 124, -1, -1, -1, -1, + 13, 95, 68, 2, 42, 118, 181, 3, 3, 3, + 49, 10, 73, 3, 12, 42, 102, 237, 4, 5, + 6, 149, 116, 254, 102, 81, 13, 70, 90, 124, + 19, 77, 25, 49, 128, 121, 9, 9, 3, 55, + 39, 88, 41, 121, 37, 95, 141, 109, 143, 48, + 26, 81, 102, 124, 97, 126, 102, 103, 186, 97, + 146, 145, 51, 147, 239, 285, 39, 39, 3, 27, + 117, 121, 71, 72, 61, 121, 3, 64, 3, 4, + 5, 6, 58, 177, 83, 84, 62, 155, 149, 145, + 265, 159, 68, 69, 67, 189, 162, 191, 71, 71, + 70, 94, 146, 334, 90, 149, 145, 120, 179, 146, + 86, 87, 149, 3, 107, 128, 3, 4, 5, 6, + 81, 215, 149, 194, 114, 196, 85, 97, 222, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 138, 138, 113, 321, 0, 146, 145, + 75, 148, 314, 40, 3, 4, 5, 6, 3, 4, + 5, 6, 49, 176, 150, 90, 341, 102, 26, 233, + 144, 237, 3, 149, 124, 149, 214, 290, 340, 114, + 146, 99, 91, 149, 109, 249, 121, 96, 75, 227, + 352, 40, 263, 143, 146, 40, 147, 149, 123, 146, + 58, 145, 149, 90, 62, 146, 146, 81, 149, 149, + 68, 69, 137, 138, 72, 146, 116, 12, 149, 285, + 145, 104, 109, 124, 146, 150, 75, 149, 17, 87, + 75, 244, 6, 304, 111, 234, 123, 138, 139, 140, + 141, 90, 143, 61, 116, 90, 64, 146, 319, 146, + 137, 138, 265, 101, 84, 26, 45, 63, 145, 115, + 109, 3, 120, 150, 109, 4, 360, 361, 109, 73, + 80, 40, 145, 3, 123, 7, 145, 348, 123, 67, + 45, 40, 3, 15, 4, 145, 98, 58, 137, 138, + 22, 62, 137, 138, 81, 27, 145, 68, 69, 88, + 145, 150, 34, 35, 143, 150, 149, 126, 321, 3, + 46, 43, 44, 149, 112, 86, 87, 49, 3, 85, + 109, 114, 54, 45, 145, 49, 146, 3, 117, 118, + 145, 145, 145, 80, 3, 124, 125, 126, 146, 128, + 129, 130, 88, 60, 133, 134, 78, 136, 137, 138, + 139, 140, 141, 118, 143, 145, 90, 79, 102, 124, + 143, 93, 144, 86, 129, 130, 88, 45, 133, 134, + 146, 136, 137, 138, 139, 140, 141, 68, 143, 146, + 68, 86, 115, 105, 146, 149, 146, 109, 145, 147, + 146, 53, 18, 45, 287, 290, 118, 38, 47, 297, + 115, 64, 124, 125, 126, 216, 128, 129, 130, 31, + 88, 133, 134, 145, 136, 137, 138, 139, 140, 141, + 174, 143, 222, 335, 102, 364, 45, -1, -1, -1, + -1, 109, 187, -1, -1, -1, 88, -1, -1, -1, + 118, -1, -1, -1, -1, -1, 124, 125, 126, -1, + 128, 129, 130, 105, 45, 133, 134, 109, 136, 137, + 138, 139, 140, 141, -1, 143, 118, -1, -1, 88, + -1, -1, 124, 125, 126, -1, 128, 129, 130, -1, + -1, 133, 134, -1, 136, 137, 138, 139, 140, 141, + 109, 143, -1, -1, -1, -1, -1, 88, -1, 118, + -1, -1, -1, -1, -1, 124, 125, 126, -1, 128, 129, 130, -1, -1, 133, 134, -1, 136, 137, 138, - 139, 140, 141, -1, 143 + 139, 140, 141, -1, 143, -1, -1, 118, -1, -1, + -1, -1, -1, 124, 125, 126, -1, 128, 129, 130, + -1, -1, 133, 134, -1, 136, 137, 138, 139, 140, + 141, -1, 143 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1040,41 +1040,42 @@ static const yytype_uint8 yystos[] = { 0, 7, 15, 22, 27, 34, 35, 43, 44, 49, 54, 78, 93, 145, 152, 153, 154, 155, 159, 161, - 162, 165, 166, 171, 172, 173, 174, 176, 179, 180, - 182, 186, 27, 3, 229, 3, 3, 70, 97, 81, - 81, 85, 113, 197, 228, 229, 70, 97, 19, 51, - 180, 182, 0, 148, 235, 99, 156, 156, 9, 39, - 71, 183, 184, 67, 183, 193, 3, 147, 145, 81, - 116, 167, 167, 229, 104, 163, 229, 6, 220, 12, - 187, 111, 229, 229, 229, 146, 146, 154, 84, 180, - 181, 186, 101, 185, 115, 181, 63, 198, 3, 4, - 5, 90, 150, 200, 217, 218, 219, 220, 221, 222, - 4, 160, 109, 229, 229, 73, 190, 80, 145, 175, - 3, 40, 75, 109, 123, 137, 138, 145, 188, 199, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 3, 177, 178, - 145, 193, 194, 195, 202, 193, 220, 146, 149, 40, - 81, 145, 175, 202, 164, 218, 3, 236, 55, 182, - 145, 147, 145, 98, 40, 109, 203, 143, 203, 182, - 202, 81, 189, 149, 3, 102, 114, 121, 230, 231, - 17, 45, 88, 109, 117, 118, 124, 125, 126, 128, - 129, 130, 133, 134, 136, 137, 138, 139, 140, 141, - 143, 126, 149, 190, 3, 157, 158, 198, 149, 77, - 103, 196, 198, 46, 217, 112, 3, 168, 169, 114, - 85, 146, 149, 145, 146, 187, 3, 138, 182, 202, - 145, 109, 199, 146, 146, 145, 223, 224, 225, 227, - 229, 232, 190, 201, 202, 3, 202, 203, 203, 88, - 117, 145, 90, 109, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 220, 202, - 178, 145, 146, 149, 195, 220, 80, 25, 37, 94, - 107, 170, 146, 149, 179, 229, 3, 200, 199, 146, - 95, 182, 144, 179, 26, 58, 62, 68, 69, 87, - 149, 233, 231, 60, 191, 102, 203, 145, 182, 199, - 90, 144, 200, 158, 164, 169, 146, 146, 203, 146, - 146, 86, 68, 68, 224, 226, 86, 115, 203, 182, - 199, 146, 146, 146, 79, 105, 231, 225, 149, 224, - 199, 146, 146, 203, 224, 72, 120, 42, 192, 105, - 145, 202, 234, 202, 3, 216, 146 + 162, 165, 166, 171, 173, 174, 175, 177, 180, 181, + 183, 187, 27, 3, 230, 3, 3, 70, 97, 81, + 81, 85, 113, 198, 229, 230, 70, 97, 19, 51, + 181, 183, 0, 148, 236, 99, 156, 156, 9, 39, + 71, 184, 185, 67, 184, 194, 3, 147, 145, 81, + 116, 167, 167, 230, 104, 163, 230, 6, 221, 12, + 188, 111, 116, 172, 172, 230, 146, 146, 154, 84, + 181, 182, 187, 101, 186, 115, 182, 63, 199, 3, + 4, 5, 90, 150, 201, 218, 219, 220, 221, 222, + 223, 4, 160, 109, 230, 230, 73, 191, 80, 145, + 176, 3, 40, 75, 109, 123, 137, 138, 145, 189, + 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 3, 178, + 179, 40, 230, 230, 145, 194, 195, 196, 203, 194, + 221, 146, 149, 40, 81, 145, 176, 203, 164, 219, + 3, 237, 55, 183, 145, 147, 145, 98, 40, 109, + 204, 143, 204, 183, 203, 81, 190, 149, 3, 102, + 114, 121, 231, 232, 17, 45, 88, 109, 117, 118, + 124, 125, 126, 128, 129, 130, 133, 134, 136, 137, + 138, 139, 140, 141, 143, 126, 149, 191, 3, 157, + 158, 199, 149, 77, 103, 197, 199, 46, 218, 112, + 3, 168, 169, 114, 85, 146, 149, 145, 146, 188, + 3, 138, 183, 203, 145, 109, 200, 146, 146, 145, + 224, 225, 226, 228, 230, 233, 191, 202, 203, 3, + 203, 204, 204, 88, 117, 145, 90, 109, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, + 204, 204, 221, 203, 179, 145, 146, 149, 196, 221, + 80, 25, 37, 94, 107, 170, 146, 149, 180, 230, + 3, 201, 200, 146, 95, 183, 144, 180, 26, 58, + 62, 68, 69, 87, 149, 234, 232, 60, 192, 102, + 204, 145, 183, 200, 90, 144, 201, 158, 164, 169, + 146, 146, 204, 146, 146, 86, 68, 68, 225, 227, + 86, 115, 204, 183, 200, 146, 146, 146, 79, 105, + 232, 226, 149, 225, 200, 146, 146, 204, 225, 72, + 120, 42, 193, 105, 145, 203, 235, 203, 3, 217, + 146 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1084,22 +1085,23 @@ static const yytype_uint8 yyr1[] = 155, 155, 155, 155, 155, 155, 155, 156, 156, 157, 157, 158, 158, 159, 160, 161, 161, 162, 163, 164, 165, 165, 166, 166, 166, 167, 167, 168, 168, 169, - 170, 170, 170, 170, 171, 171, 171, 172, 173, 174, - 174, 175, 175, 176, 177, 177, 178, 179, 179, 179, - 180, 180, 181, 181, 182, 182, 183, 184, 184, 184, - 185, 185, 186, 187, 187, 188, 189, 190, 190, 191, - 191, 192, 192, 193, 193, 194, 194, 195, 196, 196, - 196, 197, 197, 198, 198, 198, 199, 199, 200, 200, - 201, 202, 202, 202, 202, 202, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 204, 204, 205, 205, 205, - 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 207, 207, 208, 208, 208, 208, 209, - 209, 210, 210, 211, 211, 211, 211, 211, 211, 212, - 212, 213, 214, 215, 216, 216, 216, 216, 217, 217, - 217, 217, 218, 219, 219, 220, 221, 222, 223, 223, - 224, 224, 225, 225, 226, 226, 227, 228, 229, 229, - 230, 230, 231, 231, 232, 232, 232, 233, 233, 233, - 233, 233, 233, 233, 233, 234, 235, 235, 236, 236 + 170, 170, 170, 170, 171, 171, 171, 172, 172, 173, + 174, 175, 175, 176, 176, 177, 178, 178, 179, 180, + 180, 180, 181, 181, 182, 182, 183, 183, 184, 185, + 185, 185, 186, 186, 187, 188, 188, 189, 190, 191, + 191, 192, 192, 193, 193, 194, 194, 195, 195, 196, + 197, 197, 197, 198, 198, 199, 199, 199, 200, 200, + 201, 201, 202, 203, 203, 203, 203, 203, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 205, 205, 206, + 206, 206, 206, 206, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 208, 208, 209, 209, 209, + 209, 210, 210, 211, 211, 212, 212, 212, 212, 212, + 212, 213, 213, 214, 215, 216, 217, 217, 217, 217, + 218, 218, 218, 218, 219, 220, 220, 221, 222, 223, + 224, 224, 225, 225, 226, 226, 227, 227, 228, 229, + 230, 230, 231, 231, 232, 232, 233, 233, 233, 234, + 234, 234, 234, 234, 234, 234, 234, 235, 236, 236, + 237, 237 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1109,22 +1111,23 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 4, 1, 2, 5, 7, 1, 1, 2, 3, 8, 7, 7, 3, 0, 1, 3, 2, - 1, 1, 1, 1, 3, 3, 3, 4, 2, 8, - 5, 3, 0, 5, 1, 3, 3, 1, 1, 5, - 3, 3, 1, 1, 3, 5, 2, 1, 1, 1, - 1, 0, 7, 1, 0, 1, 2, 2, 0, 4, - 0, 2, 0, 3, 0, 1, 3, 2, 1, 1, - 0, 2, 0, 2, 4, 0, 1, 3, 1, 3, - 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 2, 2, 2, - 3, 4, 1, 3, 3, 3, 3, 3, 3, 3, - 4, 3, 3, 3, 3, 5, 6, 5, 6, 6, - 8, 4, 5, 3, 3, 3, 3, 3, 3, 3, - 5, 4, 4, 5, 1, 3, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 4, 1, 3, 2, 1, 1, 3, - 2, 1, 1, 0, 4, 6, 8, 1, 1, 2, - 2, 1, 1, 1, 0, 1, 1, 0, 1, 3 + 1, 1, 1, 1, 4, 4, 3, 2, 0, 4, + 2, 8, 5, 3, 0, 5, 1, 3, 3, 1, + 1, 5, 3, 3, 1, 1, 3, 5, 2, 1, + 1, 1, 1, 0, 7, 1, 0, 1, 2, 2, + 0, 4, 0, 2, 0, 3, 0, 1, 3, 2, + 1, 1, 0, 2, 0, 2, 4, 0, 1, 3, + 1, 3, 2, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, + 2, 2, 3, 4, 1, 3, 3, 3, 3, 3, + 3, 3, 4, 3, 3, 3, 3, 5, 6, 5, + 6, 6, 8, 4, 5, 3, 3, 3, 3, 3, + 3, 3, 5, 4, 4, 5, 1, 3, 1, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 4, 1, 3, 2, 1, + 1, 3, 2, 1, 1, 0, 4, 6, 8, 1, + 1, 2, 2, 1, 1, 1, 0, 1, 1, 0, + 1, 3 }; @@ -1621,31 +1624,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio switch (yytype) { case 3: /* IDENTIFIER */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1627 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1630 "bison_parser.cpp" /* yacc.c:1257 */ break; case 4: /* STRING */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1633 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1636 "bison_parser.cpp" /* yacc.c:1257 */ break; case 5: /* FLOATVAL */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1639 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1642 "bison_parser.cpp" /* yacc.c:1257 */ break; case 6: /* INTVAL */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1645 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1648 "bison_parser.cpp" /* yacc.c:1257 */ break; case 153: /* statement_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).stmt_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).stmt_vec))) { @@ -1654,23 +1657,23 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).stmt_vec)); } -#line 1658 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1661 "bison_parser.cpp" /* yacc.c:1257 */ break; case 154: /* statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1664 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1667 "bison_parser.cpp" /* yacc.c:1257 */ break; case 155: /* preparable_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1670 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1673 "bison_parser.cpp" /* yacc.c:1257 */ break; case 156: /* opt_hints */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1679,11 +1682,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1683 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1686 "bison_parser.cpp" /* yacc.c:1257 */ break; case 157: /* hint_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1692,71 +1695,71 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1696 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1699 "bison_parser.cpp" /* yacc.c:1257 */ break; case 158: /* hint */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1702 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1705 "bison_parser.cpp" /* yacc.c:1257 */ break; case 159: /* prepare_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).prep_stmt)); } -#line 1708 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1711 "bison_parser.cpp" /* yacc.c:1257 */ break; case 160: /* prepare_target_query */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1714 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1717 "bison_parser.cpp" /* yacc.c:1257 */ break; case 161: /* execute_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).exec_stmt)); } -#line 1720 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1723 "bison_parser.cpp" /* yacc.c:1257 */ break; case 162: /* import_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).import_stmt)); } -#line 1726 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1729 "bison_parser.cpp" /* yacc.c:1257 */ break; case 163: /* import_file_type */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1732 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1735 "bison_parser.cpp" /* yacc.c:1257 */ break; case 164: /* file_path */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1738 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1741 "bison_parser.cpp" /* yacc.c:1257 */ break; case 165: /* show_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).show_stmt)); } -#line 1744 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1747 "bison_parser.cpp" /* yacc.c:1257 */ break; case 166: /* create_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).create_stmt)); } -#line 1750 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1753 "bison_parser.cpp" /* yacc.c:1257 */ break; case 167: /* opt_not_exists */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1756 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1759 "bison_parser.cpp" /* yacc.c:1257 */ break; case 168: /* column_def_commalist */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).column_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).column_vec))) { @@ -1765,47 +1768,53 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).column_vec)); } -#line 1769 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1772 "bison_parser.cpp" /* yacc.c:1257 */ break; case 169: /* column_def */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).column_t)); } -#line 1775 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1778 "bison_parser.cpp" /* yacc.c:1257 */ break; case 170: /* column_type */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1781 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1784 "bison_parser.cpp" /* yacc.c:1257 */ break; case 171: /* drop_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).drop_stmt)); } -#line 1787 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1790 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 172: /* delete_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 172: /* opt_exists */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ + { } +#line 1796 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 173: /* delete_statement */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1793 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1802 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 173: /* truncate_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 174: /* truncate_statement */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1799 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1808 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 174: /* insert_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 175: /* insert_statement */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).insert_stmt)); } -#line 1805 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1814 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 175: /* opt_column_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 176: /* opt_column_list */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -1814,17 +1823,17 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 1818 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1827 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 176: /* update_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 177: /* update_statement */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_stmt)); } -#line 1824 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1833 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 177: /* update_clause_commalist */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 178: /* update_clause_commalist */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).update_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).update_vec))) { @@ -1833,53 +1842,53 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).update_vec)); } -#line 1837 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1846 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 178: /* update_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 179: /* update_clause */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_t)); } -#line 1843 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1852 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 179: /* select_statement */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 180: /* select_statement */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1849 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1858 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 180: /* select_with_paren */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 181: /* select_with_paren */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1855 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1864 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 181: /* select_paren_or_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 182: /* select_paren_or_clause */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1861 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1870 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 182: /* select_no_paren */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 183: /* select_no_paren */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1867 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1876 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 186: /* select_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 187: /* select_clause */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1873 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1882 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 187: /* opt_distinct */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ + case 188: /* opt_distinct */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1879 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1888 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 188: /* select_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 189: /* select_list */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1888,35 +1897,35 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1892 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1901 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 189: /* from_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 190: /* from_clause */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 1898 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1907 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 190: /* opt_where */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 191: /* opt_where */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1904 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1913 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 191: /* opt_group */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 192: /* opt_group */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).group_t)); } -#line 1910 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1919 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 192: /* opt_having */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 193: /* opt_having */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1916 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1925 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 193: /* opt_order */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 194: /* opt_order */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1925,11 +1934,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1929 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1938 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 194: /* order_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 195: /* order_list */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).order_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).order_vec))) { @@ -1938,35 +1947,35 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 1942 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1951 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 195: /* order_desc */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 196: /* order_desc */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).order)); } -#line 1948 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1957 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 196: /* opt_order_type */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ + case 197: /* opt_order_type */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1954 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1963 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 197: /* opt_top */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 198: /* opt_top */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1960 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1969 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 198: /* opt_limit */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 199: /* opt_limit */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 1966 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1975 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 199: /* expr_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 200: /* expr_list */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1975,11 +1984,11 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1979 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1988 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 200: /* literal_list */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 201: /* literal_list */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).expr_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).expr_vec))) { @@ -1988,161 +1997,161 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1992 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2001 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 201: /* expr_alias */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 202: /* expr_alias */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1998 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2007 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 202: /* expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 203: /* expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2004 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2013 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 203: /* operand */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 204: /* operand */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2010 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2019 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 204: /* scalar_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 205: /* scalar_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2016 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2025 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 205: /* unary_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 206: /* unary_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2022 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2031 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 206: /* binary_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 207: /* binary_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2028 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2037 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 207: /* logic_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 208: /* logic_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2034 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2043 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 208: /* in_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 209: /* in_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2040 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2049 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 209: /* case_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 210: /* case_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2046 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2055 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 210: /* exists_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 211: /* exists_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2052 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2061 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 211: /* comp_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 212: /* comp_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2058 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2067 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 212: /* function_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 213: /* function_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2064 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2073 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 213: /* array_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 214: /* array_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2070 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2079 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 214: /* array_index */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 215: /* array_index */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2076 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2085 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 215: /* between_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 216: /* between_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2082 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2091 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 216: /* column_name */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 217: /* column_name */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2088 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2097 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 217: /* literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 218: /* literal */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2094 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2103 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 218: /* string_literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 219: /* string_literal */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2100 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2109 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 219: /* num_literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 220: /* num_literal */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2106 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2115 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 220: /* int_literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 221: /* int_literal */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2112 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2121 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 221: /* null_literal */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 222: /* null_literal */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2118 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2127 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 222: /* param_expr */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 223: /* param_expr */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2124 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2133 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 223: /* table_ref */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 224: /* table_ref */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2130 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2139 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 224: /* table_ref_atomic */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 225: /* table_ref_atomic */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2136 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2145 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 225: /* nonjoin_table_ref_atomic */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 226: /* nonjoin_table_ref_atomic */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2142 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2151 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 226: /* table_ref_commalist */ -#line 137 "bison_parser.y" /* yacc.c:1257 */ + case 227: /* table_ref_commalist */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).table_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).table_vec))) { @@ -2151,59 +2160,59 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).table_vec)); } -#line 2155 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2164 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 227: /* table_ref_name */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 228: /* table_ref_name */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2161 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2170 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 228: /* table_ref_name_no_alias */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ + case 229: /* table_ref_name_no_alias */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2167 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2176 "bison_parser.cpp" /* yacc.c:1257 */ break; - case 229: /* table_name */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2173 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 230: /* alias */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2179 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 231: /* opt_alias */ -#line 136 "bison_parser.y" /* yacc.c:1257 */ - { free( (((*yyvaluep).sval)) ); } -#line 2185 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 232: /* join_clause */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ - { delete (((*yyvaluep).table)); } -#line 2191 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 233: /* opt_join_type */ -#line 135 "bison_parser.y" /* yacc.c:1257 */ - { } -#line 2197 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 234: /* join_condition */ -#line 145 "bison_parser.y" /* yacc.c:1257 */ - { delete (((*yyvaluep).expr)); } -#line 2203 "bison_parser.cpp" /* yacc.c:1257 */ - break; - - case 236: /* ident_commalist */ + case 230: /* table_name */ #line 137 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } +#line 2182 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 231: /* alias */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2188 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 232: /* opt_alias */ +#line 138 "bison_parser.y" /* yacc.c:1257 */ + { free( (((*yyvaluep).sval)) ); } +#line 2194 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 233: /* join_clause */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ + { delete (((*yyvaluep).table)); } +#line 2200 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 234: /* opt_join_type */ +#line 136 "bison_parser.y" /* yacc.c:1257 */ + { } +#line 2206 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 235: /* join_condition */ +#line 147 "bison_parser.y" /* yacc.c:1257 */ + { delete (((*yyvaluep).expr)); } +#line 2212 "bison_parser.cpp" /* yacc.c:1257 */ + break; + + case 237: /* ident_commalist */ +#line 139 "bison_parser.y" /* yacc.c:1257 */ { if ((((*yyvaluep).str_vec)) != nullptr) { for (auto ptr : *(((*yyvaluep).str_vec))) { @@ -2212,7 +2221,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2216 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2225 "bison_parser.cpp" /* yacc.c:1257 */ break; @@ -2330,7 +2339,7 @@ YYLTYPE yylloc = yyloc_default; yylloc.total_column = 0; } -#line 2334 "bison_parser.cpp" /* yacc.c:1429 */ +#line 2343 "bison_parser.cpp" /* yacc.c:1429 */ yylsp[0] = yylloc; goto yysetstate; @@ -2517,7 +2526,7 @@ yyreduce: switch (yyn) { case 2: -#line 242 "bison_parser.y" /* yacc.c:1646 */ +#line 245 "bison_parser.y" /* yacc.c:1646 */ { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -2535,417 +2544,443 @@ yyreduce: } delete (yyvsp[-1].stmt_vec); } -#line 2539 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2548 "bison_parser.cpp" /* yacc.c:1646 */ break; case 3: -#line 263 "bison_parser.y" /* yacc.c:1646 */ +#line 266 "bison_parser.y" /* yacc.c:1646 */ { (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 2545 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2554 "bison_parser.cpp" /* yacc.c:1646 */ break; case 4: -#line 264 "bison_parser.y" /* yacc.c:1646 */ +#line 267 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 2551 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 5: -#line 268 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.statement) = (yyvsp[-1].prep_stmt); - (yyval.statement)->hints = (yyvsp[0].expr_vec); - } #line 2560 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 6: -#line 272 "bison_parser.y" /* yacc.c:1646 */ + case 5: +#line 271 "bison_parser.y" /* yacc.c:1646 */ { - (yyval.statement) = (yyvsp[-1].statement); + (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } #line 2569 "bison_parser.cpp" /* yacc.c:1646 */ break; + case 6: +#line 275 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.statement) = (yyvsp[-1].statement); + (yyval.statement)->hints = (yyvsp[0].expr_vec); + } +#line 2578 "bison_parser.cpp" /* yacc.c:1646 */ + break; + case 7: -#line 276 "bison_parser.y" /* yacc.c:1646 */ +#line 279 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 2577 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2586 "bison_parser.cpp" /* yacc.c:1646 */ break; case 8: -#line 283 "bison_parser.y" /* yacc.c:1646 */ +#line 286 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 2583 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2592 "bison_parser.cpp" /* yacc.c:1646 */ break; case 9: -#line 284 "bison_parser.y" /* yacc.c:1646 */ +#line 287 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 2589 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2598 "bison_parser.cpp" /* yacc.c:1646 */ break; case 10: -#line 285 "bison_parser.y" /* yacc.c:1646 */ +#line 288 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 2595 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2604 "bison_parser.cpp" /* yacc.c:1646 */ break; case 11: -#line 286 "bison_parser.y" /* yacc.c:1646 */ +#line 289 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 2601 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2610 "bison_parser.cpp" /* yacc.c:1646 */ break; case 12: -#line 287 "bison_parser.y" /* yacc.c:1646 */ +#line 290 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2607 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2616 "bison_parser.cpp" /* yacc.c:1646 */ break; case 13: -#line 288 "bison_parser.y" /* yacc.c:1646 */ +#line 291 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2613 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2622 "bison_parser.cpp" /* yacc.c:1646 */ break; case 14: -#line 289 "bison_parser.y" /* yacc.c:1646 */ +#line 292 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 2619 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2628 "bison_parser.cpp" /* yacc.c:1646 */ break; case 15: -#line 290 "bison_parser.y" /* yacc.c:1646 */ +#line 293 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 2625 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2634 "bison_parser.cpp" /* yacc.c:1646 */ break; case 16: -#line 291 "bison_parser.y" /* yacc.c:1646 */ +#line 294 "bison_parser.y" /* yacc.c:1646 */ { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 2631 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2640 "bison_parser.cpp" /* yacc.c:1646 */ break; case 17: -#line 300 "bison_parser.y" /* yacc.c:1646 */ +#line 303 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 2637 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2646 "bison_parser.cpp" /* yacc.c:1646 */ break; case 18: -#line 301 "bison_parser.y" /* yacc.c:1646 */ +#line 304 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = nullptr; } -#line 2643 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2652 "bison_parser.cpp" /* yacc.c:1646 */ break; case 19: -#line 306 "bison_parser.y" /* yacc.c:1646 */ +#line 309 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 2649 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2658 "bison_parser.cpp" /* yacc.c:1646 */ break; case 20: -#line 307 "bison_parser.y" /* yacc.c:1646 */ +#line 310 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 2655 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2664 "bison_parser.cpp" /* yacc.c:1646 */ break; case 21: -#line 311 "bison_parser.y" /* yacc.c:1646 */ +#line 314 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 2664 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2673 "bison_parser.cpp" /* yacc.c:1646 */ break; case 22: -#line 315 "bison_parser.y" /* yacc.c:1646 */ +#line 318 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 2674 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2683 "bison_parser.cpp" /* yacc.c:1646 */ break; case 23: -#line 327 "bison_parser.y" /* yacc.c:1646 */ +#line 330 "bison_parser.y" /* yacc.c:1646 */ { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 2684 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2693 "bison_parser.cpp" /* yacc.c:1646 */ break; case 25: -#line 337 "bison_parser.y" /* yacc.c:1646 */ +#line 340 "bison_parser.y" /* yacc.c:1646 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 2693 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2702 "bison_parser.cpp" /* yacc.c:1646 */ break; case 26: -#line 341 "bison_parser.y" /* yacc.c:1646 */ +#line 344 "bison_parser.y" /* yacc.c:1646 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 2703 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2712 "bison_parser.cpp" /* yacc.c:1646 */ break; case 27: -#line 353 "bison_parser.y" /* yacc.c:1646 */ +#line 356 "bison_parser.y" /* yacc.c:1646 */ { (yyval.import_stmt) = new ImportStatement((ImportType) (yyvsp[-4].uval)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); - (yyval.import_stmt)->tableName = (yyvsp[0].sval); + (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; + (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 2713 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2723 "bison_parser.cpp" /* yacc.c:1646 */ break; case 28: -#line 361 "bison_parser.y" /* yacc.c:1646 */ +#line 365 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kImportCSV; } -#line 2719 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2729 "bison_parser.cpp" /* yacc.c:1646 */ break; case 29: -#line 365 "bison_parser.y" /* yacc.c:1646 */ +#line 369 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 2725 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2735 "bison_parser.cpp" /* yacc.c:1646 */ break; case 30: -#line 375 "bison_parser.y" /* yacc.c:1646 */ +#line 379 "bison_parser.y" /* yacc.c:1646 */ { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 2733 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2743 "bison_parser.cpp" /* yacc.c:1646 */ break; case 31: -#line 378 "bison_parser.y" /* yacc.c:1646 */ +#line 382 "bison_parser.y" /* yacc.c:1646 */ { (yyval.show_stmt) = new ShowStatement(kShowColumns); - (yyval.show_stmt)->name = (yyvsp[0].sval); - } -#line 2742 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 32: -#line 391 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); - (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); - (yyval.create_stmt)->tableName = (yyvsp[-4].sval); - (yyval.create_stmt)->filePath = (yyvsp[0].sval); + (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; + (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } #line 2753 "bison_parser.cpp" /* yacc.c:1646 */ break; + case 32: +#line 396 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); + (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); + (yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; + (yyval.create_stmt)->filePath = (yyvsp[0].sval); + } +#line 2765 "bison_parser.cpp" /* yacc.c:1646 */ + break; + case 33: -#line 397 "bison_parser.y" /* yacc.c:1646 */ +#line 403 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->tableName = (yyvsp[-3].sval); + (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 2764 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2777 "bison_parser.cpp" /* yacc.c:1646 */ break; case 34: -#line 403 "bison_parser.y" /* yacc.c:1646 */ +#line 410 "bison_parser.y" /* yacc.c:1646 */ { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); - (yyval.create_stmt)->tableName = (yyvsp[-3].sval); + (yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 2776 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2790 "bison_parser.cpp" /* yacc.c:1646 */ break; case 35: -#line 413 "bison_parser.y" /* yacc.c:1646 */ +#line 421 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 2782 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2796 "bison_parser.cpp" /* yacc.c:1646 */ break; case 36: -#line 414 "bison_parser.y" /* yacc.c:1646 */ +#line 422 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = false; } -#line 2788 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2802 "bison_parser.cpp" /* yacc.c:1646 */ break; case 37: -#line 418 "bison_parser.y" /* yacc.c:1646 */ +#line 426 "bison_parser.y" /* yacc.c:1646 */ { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 2794 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 38: -#line 419 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 2800 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 39: -#line 423 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); - } #line 2808 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 40: -#line 430 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = ColumnDefinition::INT; } + case 38: +#line 427 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } #line 2814 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 41: + case 39: #line 431 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval)); + } +#line 2822 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 40: +#line 438 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::INT; } -#line 2820 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2828 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 41: +#line 439 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = ColumnDefinition::INT; } +#line 2834 "bison_parser.cpp" /* yacc.c:1646 */ break; case 42: -#line 432 "bison_parser.y" /* yacc.c:1646 */ +#line 440 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::DOUBLE; } -#line 2826 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2840 "bison_parser.cpp" /* yacc.c:1646 */ break; case 43: -#line 433 "bison_parser.y" /* yacc.c:1646 */ +#line 441 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = ColumnDefinition::TEXT; } -#line 2832 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2846 "bison_parser.cpp" /* yacc.c:1646 */ break; case 44: -#line 443 "bison_parser.y" /* yacc.c:1646 */ +#line 451 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropTable); - (yyval.drop_stmt)->name = (yyvsp[0].sval); + (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); + (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; + (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 2841 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2857 "bison_parser.cpp" /* yacc.c:1646 */ break; case 45: -#line 447 "bison_parser.y" /* yacc.c:1646 */ +#line 457 "bison_parser.y" /* yacc.c:1646 */ { (yyval.drop_stmt) = new DropStatement(kDropView); - (yyval.drop_stmt)->name = (yyvsp[0].sval); + (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); + (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; + (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 2850 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2868 "bison_parser.cpp" /* yacc.c:1646 */ break; case 46: -#line 451 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); - (yyval.drop_stmt)->name = (yyvsp[0].sval); - } -#line 2859 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 47: #line 463 "bison_parser.y" /* yacc.c:1646 */ { - (yyval.delete_stmt) = new DeleteStatement(); - (yyval.delete_stmt)->tableName = (yyvsp[-1].sval); - (yyval.delete_stmt)->expr = (yyvsp[0].expr); - } -#line 2869 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 48: -#line 471 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.delete_stmt) = new DeleteStatement(); - (yyval.delete_stmt)->tableName = (yyvsp[0].sval); + (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); + (yyval.drop_stmt)->ifExists = false; + (yyval.drop_stmt)->name = (yyvsp[0].sval); } #line 2878 "bison_parser.cpp" /* yacc.c:1646 */ break; + case 47: +#line 471 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = true; } +#line 2884 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 48: +#line 472 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = false; } +#line 2890 "bison_parser.cpp" /* yacc.c:1646 */ + break; + case 49: -#line 483 "bison_parser.y" /* yacc.c:1646 */ +#line 481 "bison_parser.y" /* yacc.c:1646 */ { - (yyval.insert_stmt) = new InsertStatement(kInsertValues); - (yyval.insert_stmt)->tableName = (yyvsp[-5].sval); - (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); - (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); + (yyval.delete_stmt) = new DeleteStatement(); + (yyval.delete_stmt)->schema = (yyvsp[-1].table_name).schema; + (yyval.delete_stmt)->tableName = (yyvsp[-1].table_name).name; + (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 2889 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2901 "bison_parser.cpp" /* yacc.c:1646 */ break; case 50: -#line 489 "bison_parser.y" /* yacc.c:1646 */ +#line 490 "bison_parser.y" /* yacc.c:1646 */ { - (yyval.insert_stmt) = new InsertStatement(kInsertSelect); - (yyval.insert_stmt)->tableName = (yyvsp[-2].sval); - (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); - (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); + (yyval.delete_stmt) = new DeleteStatement(); + (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; + (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 2900 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2911 "bison_parser.cpp" /* yacc.c:1646 */ break; case 51: -#line 499 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 2906 "bison_parser.cpp" /* yacc.c:1646 */ +#line 503 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.insert_stmt) = new InsertStatement(kInsertValues); + (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; + (yyval.insert_stmt)->tableName = (yyvsp[-5].table_name).name; + (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); + (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); + } +#line 2923 "bison_parser.cpp" /* yacc.c:1646 */ break; case 52: -#line 500 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = nullptr; } -#line 2912 "bison_parser.cpp" /* yacc.c:1646 */ +#line 510 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.insert_stmt) = new InsertStatement(kInsertSelect); + (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; + (yyval.insert_stmt)->tableName = (yyvsp[-2].table_name).name; + (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); + (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); + } +#line 2935 "bison_parser.cpp" /* yacc.c:1646 */ break; case 53: -#line 510 "bison_parser.y" /* yacc.c:1646 */ +#line 521 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.str_vec) = (yyvsp[-1].str_vec); } +#line 2941 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 54: +#line 522 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.str_vec) = nullptr; } +#line 2947 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 55: +#line 532 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_stmt) = new UpdateStatement(); (yyval.update_stmt)->table = (yyvsp[-3].table); (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 2923 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 54: -#line 519 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 2929 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 55: -#line 520 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 2935 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2958 "bison_parser.cpp" /* yacc.c:1646 */ break; case 56: -#line 524 "bison_parser.y" /* yacc.c:1646 */ +#line 541 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } +#line 2964 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 57: +#line 542 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } +#line 2970 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 58: +#line 546 "bison_parser.y" /* yacc.c:1646 */ { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 2945 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2980 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 59: -#line 538 "bison_parser.y" /* yacc.c:1646 */ + case 61: +#line 560 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -2960,23 +2995,23 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2964 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2999 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 60: -#line 555 "bison_parser.y" /* yacc.c:1646 */ + case 62: +#line 577 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2970 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3005 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 61: -#line 556 "bison_parser.y" /* yacc.c:1646 */ + case 63: +#line 578 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 2976 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3011 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 64: -#line 565 "bison_parser.y" /* yacc.c:1646 */ + case 66: +#line 587 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -2987,11 +3022,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 2991 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3026 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 65: -#line 575 "bison_parser.y" /* yacc.c:1646 */ + case 67: +#line 597 "bison_parser.y" /* yacc.c:1646 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -3006,11 +3041,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3010 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3045 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 72: -#line 607 "bison_parser.y" /* yacc.c:1646 */ + case 74: +#line 629 "bison_parser.y" /* yacc.c:1646 */ { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3020,538 +3055,546 @@ yyreduce: (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3024 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3059 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 73: -#line 619 "bison_parser.y" /* yacc.c:1646 */ + case 75: +#line 641 "bison_parser.y" /* yacc.c:1646 */ { (yyval.bval) = true; } -#line 3030 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 74: -#line 620 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 3036 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3065 "bison_parser.cpp" /* yacc.c:1646 */ break; case 76: -#line 628 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table) = (yyvsp[0].table); } -#line 3042 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 77: -#line 633 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3048 "bison_parser.cpp" /* yacc.c:1646 */ +#line 642 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.bval) = false; } +#line 3071 "bison_parser.cpp" /* yacc.c:1646 */ break; case 78: -#line 634 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3054 "bison_parser.cpp" /* yacc.c:1646 */ +#line 650 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table) = (yyvsp[0].table); } +#line 3077 "bison_parser.cpp" /* yacc.c:1646 */ break; case 79: -#line 638 "bison_parser.y" /* yacc.c:1646 */ +#line 655 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3083 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 80: +#line 656 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = nullptr; } +#line 3089 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 81: +#line 660 "bison_parser.y" /* yacc.c:1646 */ { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3064 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 80: -#line 643 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.group_t) = nullptr; } -#line 3070 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 81: -#line 647 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3076 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3099 "bison_parser.cpp" /* yacc.c:1646 */ break; case 82: -#line 648 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3082 "bison_parser.cpp" /* yacc.c:1646 */ +#line 665 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.group_t) = nullptr; } +#line 3105 "bison_parser.cpp" /* yacc.c:1646 */ break; case 83: -#line 651 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3088 "bison_parser.cpp" /* yacc.c:1646 */ +#line 669 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3111 "bison_parser.cpp" /* yacc.c:1646 */ break; case 84: -#line 652 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = nullptr; } -#line 3094 "bison_parser.cpp" /* yacc.c:1646 */ +#line 670 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = nullptr; } +#line 3117 "bison_parser.cpp" /* yacc.c:1646 */ break; case 85: -#line 656 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3100 "bison_parser.cpp" /* yacc.c:1646 */ +#line 673 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = (yyvsp[0].order_vec); } +#line 3123 "bison_parser.cpp" /* yacc.c:1646 */ break; case 86: -#line 657 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3106 "bison_parser.cpp" /* yacc.c:1646 */ +#line 674 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = nullptr; } +#line 3129 "bison_parser.cpp" /* yacc.c:1646 */ break; case 87: -#line 661 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3112 "bison_parser.cpp" /* yacc.c:1646 */ +#line 678 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } +#line 3135 "bison_parser.cpp" /* yacc.c:1646 */ break; case 88: -#line 665 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } -#line 3118 "bison_parser.cpp" /* yacc.c:1646 */ +#line 679 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } +#line 3141 "bison_parser.cpp" /* yacc.c:1646 */ break; case 89: -#line 666 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderDesc; } -#line 3124 "bison_parser.cpp" /* yacc.c:1646 */ +#line 683 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } +#line 3147 "bison_parser.cpp" /* yacc.c:1646 */ break; case 90: -#line 667 "bison_parser.y" /* yacc.c:1646 */ +#line 687 "bison_parser.y" /* yacc.c:1646 */ { (yyval.order_type) = kOrderAsc; } -#line 3130 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3153 "bison_parser.cpp" /* yacc.c:1646 */ break; case 91: -#line 673 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3136 "bison_parser.cpp" /* yacc.c:1646 */ +#line 688 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderDesc; } +#line 3159 "bison_parser.cpp" /* yacc.c:1646 */ break; case 92: -#line 674 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } -#line 3142 "bison_parser.cpp" /* yacc.c:1646 */ +#line 689 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.order_type) = kOrderAsc; } +#line 3165 "bison_parser.cpp" /* yacc.c:1646 */ break; case 93: -#line 678 "bison_parser.y" /* yacc.c:1646 */ +#line 695 "bison_parser.y" /* yacc.c:1646 */ { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } -#line 3148 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3171 "bison_parser.cpp" /* yacc.c:1646 */ break; case 94: -#line 679 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } -#line 3154 "bison_parser.cpp" /* yacc.c:1646 */ +#line 696 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = nullptr; } +#line 3177 "bison_parser.cpp" /* yacc.c:1646 */ break; case 95: -#line 680 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } -#line 3160 "bison_parser.cpp" /* yacc.c:1646 */ +#line 700 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); } +#line 3183 "bison_parser.cpp" /* yacc.c:1646 */ break; case 96: -#line 687 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3166 "bison_parser.cpp" /* yacc.c:1646 */ +#line 701 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); } +#line 3189 "bison_parser.cpp" /* yacc.c:1646 */ break; case 97: -#line 688 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3172 "bison_parser.cpp" /* yacc.c:1646 */ +#line 702 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.limit) = nullptr; } +#line 3195 "bison_parser.cpp" /* yacc.c:1646 */ break; case 98: -#line 692 "bison_parser.y" /* yacc.c:1646 */ +#line 709 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3178 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3201 "bison_parser.cpp" /* yacc.c:1646 */ break; case 99: -#line 693 "bison_parser.y" /* yacc.c:1646 */ +#line 710 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3184 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3207 "bison_parser.cpp" /* yacc.c:1646 */ break; case 100: -#line 697 "bison_parser.y" /* yacc.c:1646 */ +#line 714 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3213 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 101: +#line 715 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3219 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 102: +#line 719 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); (yyval.expr)->alias = (yyvsp[0].sval); } -#line 3193 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3228 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 106: -#line 712 "bison_parser.y" /* yacc.c:1646 */ + case 108: +#line 734 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = (yyvsp[-1].expr); } -#line 3199 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3234 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 114: -#line 720 "bison_parser.y" /* yacc.c:1646 */ + case 116: +#line 742 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3205 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 117: -#line 729 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3211 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 118: -#line 730 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3217 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3240 "bison_parser.cpp" /* yacc.c:1646 */ break; case 119: -#line 731 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 3223 "bison_parser.cpp" /* yacc.c:1646 */ +#line 751 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } +#line 3246 "bison_parser.cpp" /* yacc.c:1646 */ break; case 120: -#line 732 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 3229 "bison_parser.cpp" /* yacc.c:1646 */ +#line 752 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } +#line 3252 "bison_parser.cpp" /* yacc.c:1646 */ break; case 121: -#line 733 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 3235 "bison_parser.cpp" /* yacc.c:1646 */ +#line 753 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } +#line 3258 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 122: +#line 754 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } +#line 3264 "bison_parser.cpp" /* yacc.c:1646 */ break; case 123: -#line 738 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 3241 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 124: -#line 739 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 3247 "bison_parser.cpp" /* yacc.c:1646 */ +#line 755 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } +#line 3270 "bison_parser.cpp" /* yacc.c:1646 */ break; case 125: -#line 740 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 3253 "bison_parser.cpp" /* yacc.c:1646 */ +#line 760 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } +#line 3276 "bison_parser.cpp" /* yacc.c:1646 */ break; case 126: -#line 741 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 3259 "bison_parser.cpp" /* yacc.c:1646 */ +#line 761 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } +#line 3282 "bison_parser.cpp" /* yacc.c:1646 */ break; case 127: -#line 742 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 3265 "bison_parser.cpp" /* yacc.c:1646 */ +#line 762 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } +#line 3288 "bison_parser.cpp" /* yacc.c:1646 */ break; case 128: -#line 743 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 3271 "bison_parser.cpp" /* yacc.c:1646 */ +#line 763 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } +#line 3294 "bison_parser.cpp" /* yacc.c:1646 */ break; case 129: -#line 744 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 3277 "bison_parser.cpp" /* yacc.c:1646 */ +#line 764 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } +#line 3300 "bison_parser.cpp" /* yacc.c:1646 */ break; case 130: -#line 745 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 3283 "bison_parser.cpp" /* yacc.c:1646 */ +#line 765 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } +#line 3306 "bison_parser.cpp" /* yacc.c:1646 */ break; case 131: -#line 746 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 3289 "bison_parser.cpp" /* yacc.c:1646 */ +#line 766 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } +#line 3312 "bison_parser.cpp" /* yacc.c:1646 */ break; case 132: -#line 747 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 3295 "bison_parser.cpp" /* yacc.c:1646 */ +#line 767 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } +#line 3318 "bison_parser.cpp" /* yacc.c:1646 */ break; case 133: -#line 751 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 3301 "bison_parser.cpp" /* yacc.c:1646 */ +#line 768 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } +#line 3324 "bison_parser.cpp" /* yacc.c:1646 */ break; case 134: -#line 752 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 3307 "bison_parser.cpp" /* yacc.c:1646 */ +#line 769 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } +#line 3330 "bison_parser.cpp" /* yacc.c:1646 */ break; case 135: -#line 756 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 3313 "bison_parser.cpp" /* yacc.c:1646 */ +#line 773 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } +#line 3336 "bison_parser.cpp" /* yacc.c:1646 */ break; case 136: -#line 757 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 3319 "bison_parser.cpp" /* yacc.c:1646 */ +#line 774 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } +#line 3342 "bison_parser.cpp" /* yacc.c:1646 */ break; case 137: -#line 758 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 3325 "bison_parser.cpp" /* yacc.c:1646 */ +#line 778 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } +#line 3348 "bison_parser.cpp" /* yacc.c:1646 */ break; case 138: -#line 759 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 3331 "bison_parser.cpp" /* yacc.c:1646 */ +#line 779 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } +#line 3354 "bison_parser.cpp" /* yacc.c:1646 */ break; case 139: -#line 764 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3337 "bison_parser.cpp" /* yacc.c:1646 */ +#line 780 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } +#line 3360 "bison_parser.cpp" /* yacc.c:1646 */ break; case 140: -#line 766 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3343 "bison_parser.cpp" /* yacc.c:1646 */ +#line 781 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } +#line 3366 "bison_parser.cpp" /* yacc.c:1646 */ break; case 141: -#line 770 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 3349 "bison_parser.cpp" /* yacc.c:1646 */ +#line 786 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3372 "bison_parser.cpp" /* yacc.c:1646 */ break; case 142: -#line 771 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 3355 "bison_parser.cpp" /* yacc.c:1646 */ +#line 788 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3378 "bison_parser.cpp" /* yacc.c:1646 */ break; case 143: -#line 775 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 3361 "bison_parser.cpp" /* yacc.c:1646 */ +#line 792 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } +#line 3384 "bison_parser.cpp" /* yacc.c:1646 */ break; case 144: -#line 776 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 3367 "bison_parser.cpp" /* yacc.c:1646 */ +#line 793 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } +#line 3390 "bison_parser.cpp" /* yacc.c:1646 */ break; case 145: -#line 777 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 3373 "bison_parser.cpp" /* yacc.c:1646 */ +#line 797 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 3396 "bison_parser.cpp" /* yacc.c:1646 */ break; case 146: -#line 778 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 3379 "bison_parser.cpp" /* yacc.c:1646 */ +#line 798 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } +#line 3402 "bison_parser.cpp" /* yacc.c:1646 */ break; case 147: -#line 779 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 3385 "bison_parser.cpp" /* yacc.c:1646 */ +#line 799 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } +#line 3408 "bison_parser.cpp" /* yacc.c:1646 */ break; case 148: -#line 780 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 3391 "bison_parser.cpp" /* yacc.c:1646 */ +#line 800 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } +#line 3414 "bison_parser.cpp" /* yacc.c:1646 */ break; case 149: -#line 784 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 3397 "bison_parser.cpp" /* yacc.c:1646 */ +#line 801 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } +#line 3420 "bison_parser.cpp" /* yacc.c:1646 */ break; case 150: -#line 785 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 3403 "bison_parser.cpp" /* yacc.c:1646 */ +#line 802 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } +#line 3426 "bison_parser.cpp" /* yacc.c:1646 */ break; case 151: -#line 789 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 3409 "bison_parser.cpp" /* yacc.c:1646 */ +#line 806 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } +#line 3432 "bison_parser.cpp" /* yacc.c:1646 */ break; case 152: -#line 793 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 3415 "bison_parser.cpp" /* yacc.c:1646 */ +#line 807 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } +#line 3438 "bison_parser.cpp" /* yacc.c:1646 */ break; case 153: -#line 797 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3421 "bison_parser.cpp" /* yacc.c:1646 */ +#line 811 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } +#line 3444 "bison_parser.cpp" /* yacc.c:1646 */ break; case 154: -#line 801 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 3427 "bison_parser.cpp" /* yacc.c:1646 */ +#line 815 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } +#line 3450 "bison_parser.cpp" /* yacc.c:1646 */ break; case 155: -#line 802 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 3433 "bison_parser.cpp" /* yacc.c:1646 */ +#line 819 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 3456 "bison_parser.cpp" /* yacc.c:1646 */ break; case 156: -#line 803 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeStar(); } -#line 3439 "bison_parser.cpp" /* yacc.c:1646 */ +#line 823 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } +#line 3462 "bison_parser.cpp" /* yacc.c:1646 */ break; case 157: -#line 804 "bison_parser.y" /* yacc.c:1646 */ +#line 824 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } +#line 3468 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 158: +#line 825 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeStar(); } +#line 3474 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 159: +#line 826 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 3445 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3480 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 162: -#line 815 "bison_parser.y" /* yacc.c:1646 */ + case 164: +#line 837 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 3451 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 163: -#line 820 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 3457 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3486 "bison_parser.cpp" /* yacc.c:1646 */ break; case 165: -#line 825 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 3463 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 166: -#line 829 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeNullLiteral(); } -#line 3469 "bison_parser.cpp" /* yacc.c:1646 */ +#line 842 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } +#line 3492 "bison_parser.cpp" /* yacc.c:1646 */ break; case 167: -#line 833 "bison_parser.y" /* yacc.c:1646 */ +#line 847 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } +#line 3498 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 168: +#line 851 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.expr) = Expr::makeNullLiteral(); } +#line 3504 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 169: +#line 855 "bison_parser.y" /* yacc.c:1646 */ { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 3479 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3514 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 169: -#line 846 "bison_parser.y" /* yacc.c:1646 */ + case 171: +#line 868 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[0].table_vec)->push_back((yyvsp[-2].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[0].table_vec); (yyval.table) = tbl; } -#line 3490 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3525 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 173: -#line 862 "bison_parser.y" /* yacc.c:1646 */ + case 175: +#line 884 "bison_parser.y" /* yacc.c:1646 */ { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].sval); (yyval.table) = tbl; } -#line 3501 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 174: -#line 871 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 3507 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 175: -#line 872 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 3513 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3536 "bison_parser.cpp" /* yacc.c:1646 */ break; case 176: -#line 877 "bison_parser.y" /* yacc.c:1646 */ - { - auto tbl = new TableRef(kTableName); - tbl->name = (yyvsp[-1].sval); - tbl->alias = (yyvsp[0].sval); - (yyval.table) = tbl; - } -#line 3524 "bison_parser.cpp" /* yacc.c:1646 */ +#line 893 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } +#line 3542 "bison_parser.cpp" /* yacc.c:1646 */ break; case 177: -#line 887 "bison_parser.y" /* yacc.c:1646 */ +#line 894 "bison_parser.y" /* yacc.c:1646 */ + { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } +#line 3548 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 178: +#line 899 "bison_parser.y" /* yacc.c:1646 */ { - (yyval.table) = new TableRef(kTableName); - (yyval.table)->name = (yyvsp[0].sval); + auto tbl = new TableRef(kTableName); + tbl->schema = (yyvsp[-1].table_name).schema; + tbl->name = (yyvsp[-1].table_name).name; + tbl->alias = (yyvsp[0].sval); + (yyval.table) = tbl; } -#line 3533 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3560 "bison_parser.cpp" /* yacc.c:1646 */ break; case 179: -#line 896 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.sval) = (yyvsp[0].sval); } -#line 3539 "bison_parser.cpp" /* yacc.c:1646 */ +#line 910 "bison_parser.y" /* yacc.c:1646 */ + { + (yyval.table) = new TableRef(kTableName); + (yyval.table)->schema = (yyvsp[0].table_name).schema; + (yyval.table)->name = (yyvsp[0].table_name).name; + } +#line 3570 "bison_parser.cpp" /* yacc.c:1646 */ break; case 180: -#line 901 "bison_parser.y" /* yacc.c:1646 */ +#line 919 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} +#line 3576 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 181: +#line 920 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } +#line 3582 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 182: +#line 925 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = (yyvsp[0].sval); } -#line 3545 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3588 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 183: -#line 907 "bison_parser.y" /* yacc.c:1646 */ + case 185: +#line 931 "bison_parser.y" /* yacc.c:1646 */ { (yyval.sval) = nullptr; } -#line 3551 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3594 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 184: -#line 916 "bison_parser.y" /* yacc.c:1646 */ + case 186: +#line 940 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3559,11 +3602,11 @@ yyreduce: (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 3563 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3606 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 185: -#line 924 "bison_parser.y" /* yacc.c:1646 */ + case 187: +#line 948 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3572,11 +3615,11 @@ yyreduce: (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 3576 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3619 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 186: -#line 934 "bison_parser.y" /* yacc.c:1646 */ + case 188: +#line 958 "bison_parser.y" /* yacc.c:1646 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -3592,71 +3635,71 @@ yyreduce: (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 3596 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 187: -#line 952 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } -#line 3602 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 188: -#line 953 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinOuter; } -#line 3608 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3639 "bison_parser.cpp" /* yacc.c:1646 */ break; case 189: -#line 954 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeftOuter; } -#line 3614 "bison_parser.cpp" /* yacc.c:1646 */ +#line 976 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinInner; } +#line 3645 "bison_parser.cpp" /* yacc.c:1646 */ break; case 190: -#line 955 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRightOuter; } -#line 3620 "bison_parser.cpp" /* yacc.c:1646 */ +#line 977 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinOuter; } +#line 3651 "bison_parser.cpp" /* yacc.c:1646 */ break; case 191: -#line 956 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeft; } -#line 3626 "bison_parser.cpp" /* yacc.c:1646 */ +#line 978 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinLeftOuter; } +#line 3657 "bison_parser.cpp" /* yacc.c:1646 */ break; case 192: -#line 957 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRight; } -#line 3632 "bison_parser.cpp" /* yacc.c:1646 */ +#line 979 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinRightOuter; } +#line 3663 "bison_parser.cpp" /* yacc.c:1646 */ break; case 193: -#line 958 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinCross; } -#line 3638 "bison_parser.cpp" /* yacc.c:1646 */ +#line 980 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinLeft; } +#line 3669 "bison_parser.cpp" /* yacc.c:1646 */ break; case 194: -#line 959 "bison_parser.y" /* yacc.c:1646 */ +#line 981 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinRight; } +#line 3675 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 195: +#line 982 "bison_parser.y" /* yacc.c:1646 */ + { (yyval.uval) = kJoinCross; } +#line 3681 "bison_parser.cpp" /* yacc.c:1646 */ + break; + + case 196: +#line 983 "bison_parser.y" /* yacc.c:1646 */ { (yyval.uval) = kJoinInner; } -#line 3644 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3687 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 198: -#line 979 "bison_parser.y" /* yacc.c:1646 */ + case 200: +#line 1003 "bison_parser.y" /* yacc.c:1646 */ { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 3650 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3693 "bison_parser.cpp" /* yacc.c:1646 */ break; - case 199: -#line 980 "bison_parser.y" /* yacc.c:1646 */ + case 201: +#line 1004 "bison_parser.y" /* yacc.c:1646 */ { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 3656 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3699 "bison_parser.cpp" /* yacc.c:1646 */ break; -#line 3660 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3703 "bison_parser.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -3891,7 +3934,7 @@ yyreturn: #endif return yyresult; } -#line 983 "bison_parser.y" /* yacc.c:1906 */ +#line 1007 "bison_parser.y" /* yacc.c:1906 */ /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index c2a852d..314283e 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -236,7 +236,8 @@ union HSQL_STYPE hsql::PrepareStatement* prep_stmt; hsql::ExecuteStatement* exec_stmt; hsql::ShowStatement* show_stmt; - + + hsql::TableName table_name; hsql::TableRef* table; hsql::Expr* expr; hsql::OrderDescription* order; @@ -255,7 +256,7 @@ union HSQL_STYPE std::vector* expr_vec; std::vector* order_vec; -#line 259 "bison_parser.h" /* yacc.c:1909 */ +#line 260 "bison_parser.h" /* yacc.c:1909 */ }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index b18ac19..7d280a9 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -186,7 +186,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha %type update_statement %type drop_statement %type show_statement -%type table_name +%type table_name %type opt_alias alias file_path prepare_target_query %type opt_not_exists opt_exists opt_distinct %type import_file_type opt_join_type column_type diff --git a/test/queries/queries-good.sql b/test/queries/queries-good.sql index 0c24d87..d91715a 100755 --- a/test/queries/queries-good.sql +++ b/test/queries/queries-good.sql @@ -3,6 +3,7 @@ # SELECT statement SELECT * FROM orders; SELECT a FROM foo WHERE a > 12 OR b > 3 AND NOT c LIMIT 10 +SELECT a FROM some_schema.foo WHERE a > 12 OR b > 3 AND NOT c LIMIT 10 SELECT col1 AS myname, col2, 'test' FROM "table", foo AS t WHERE age > 12 AND zipcode = 12345 GROUP BY col1; SELECT * from "table" JOIN table2 ON a = b WHERE (b OR NOT a) AND a = 12.5 (SELECT a FROM foo WHERE a > 12 OR b > 3 AND c NOT LIKE 's%' LIMIT 10); @@ -29,6 +30,7 @@ CREATE TABLE "table" FROM TBL FILE 'students.tbl'; SELECT * FROM "table"; INSERT INTO test_table VALUES (1, 2, 'test'); INSERT INTO test_table (id, value, name) VALUES (1, 2, 'test'); INSERT INTO test_table SELECT * FROM students; +INSERT INTO some_schema.test_table SELECT * FROM another_schema.students; # DELETE DELETE FROM students WHERE grade > 3.0 DELETE FROM students @@ -37,6 +39,7 @@ TRUNCATE students UPDATE students SET grade = 1.3 WHERE name = 'Max Mustermann'; UPDATE students SET grade = 1.3, name='Felix Fürstenberg' WHERE name = 'Max Mustermann'; UPDATE students SET grade = 1.0; +UPDATE some_schema.students SET grade = 1.0; # DROP DROP TABLE students; DROP TABLE IF EXISTS students; From 09f821e383e74e3214e46ac03eca2b3f7e95f3c4 Mon Sep 17 00:00:00 2001 From: Moritz Eyssen Date: Thu, 12 Oct 2017 20:07:30 +0200 Subject: [PATCH 17/19] Add test for schema ref in FROM --- test/select_tests.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/select_tests.cpp b/test/select_tests.cpp index 594f212..2d25b92 100644 --- a/test/select_tests.cpp +++ b/test/select_tests.cpp @@ -88,6 +88,18 @@ TEST(SelectDistinctTest) { ASSERT_NULL(stmt->whereClause); } +TEST(SelectSchemaTest) { + TEST_PARSE_SINGLE_SQL( + "SELECT grade FROM some_schema.students;", + kStmtSelect, + SelectStatement, + result, + stmt); + + ASSERT(stmt->fromTable); + ASSERT_EQ(std::string(stmt->fromTable->schema), "some_schema"); +} + TEST(SelectGroupDistinctTest) { TEST_PARSE_SINGLE_SQL( "SELECT city, COUNT(name), COUNT(DISTINCT grade) FROM students GROUP BY city;", From aa4dc099a019fb6c11ce8959037ffd42b6b956e3 Mon Sep 17 00:00:00 2001 From: Moritz Eyssen Date: Thu, 12 Oct 2017 20:19:59 +0200 Subject: [PATCH 18/19] Add DropTableIfExistsStatementTest --- test/sql_tests.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/sql_tests.cpp b/test/sql_tests.cpp index 9c9cc82..fd07aa9 100644 --- a/test/sql_tests.cpp +++ b/test/sql_tests.cpp @@ -102,6 +102,21 @@ TEST(DropTableStatementTest) { result, stmt); + ASSERT_FALSE(stmt->ifExists); + ASSERT_EQ(stmt->type, kDropTable); + ASSERT_NOTNULL(stmt->name); + ASSERT_STREQ(stmt->name, "students"); +} + +TEST(DropTableIfExistsStatementTest) { + TEST_PARSE_SINGLE_SQL( + "DROP TABLE IF EXISTS students", + kStmtDrop, + DropStatement, + result, + stmt); + + ASSERT_TRUE(stmt->ifExists); ASSERT_EQ(stmt->type, kDropTable); ASSERT_NOTNULL(stmt->name); ASSERT_STREQ(stmt->name, "students"); From 0d59785ec840a40f07cb6d8d448e5029755c4b60 Mon Sep 17 00:00:00 2001 From: Moritz Eyssen Date: Fri, 13 Oct 2017 11:25:40 +0200 Subject: [PATCH 19/19] refactor makefile a bit --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ca23eeb..3553cd7 100644 --- a/Makefile +++ b/Makefile @@ -36,17 +36,17 @@ GMAKE = make mode=$(mode) NAME := sqlparser PARSER_CPP = $(SRCPARSER)/bison_parser.cpp $(SRCPARSER)/flex_lexer.cpp PARSER_H = $(SRCPARSER)/bison_parser.h $(SRCPARSER)/flex_lexer.h +LIB_CFLAGS = -std=c++11 -Wall -Werror $(OPT_FLAG) static ?= no ifeq ($(static), yes) LIB_BUILD = lib$(NAME).a LIBLINKER = $(AR) - LIB_CFLAGS = -std=c++11 -Wall -Werror $(OPT_FLAG) LIB_LFLAGS = rs else LIB_BUILD = lib$(NAME).so LIBLINKER = $(CXX) - LIB_CFLAGS = -std=c++11 -Wall -Werror -fPIC $(OPT_FLAG) + LIB_CFLAGS += -fPIC LIB_LFLAGS = -shared -o endif LIB_CPP = $(shell find $(SRC) -name '*.cpp' -not -path "$(SRCPARSER)/*") $(PARSER_CPP)