From 1fdc150116cad39aae5c5da407c3312b47a59e3a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 17 Dec 2021 07:06:30 -0500 Subject: New upstream version 3.3.3+dfsg1. --- SQLiteStudio3/coreSQLiteStudio/parser/parser.h | 34 +++++--------------------- 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'SQLiteStudio3/coreSQLiteStudio/parser/parser.h') diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/parser.h b/SQLiteStudio3/coreSQLiteStudio/parser/parser.h index 8fe25f2..04e9ccb 100644 --- a/SQLiteStudio3/coreSQLiteStudio/parser/parser.h +++ b/SQLiteStudio3/coreSQLiteStudio/parser/parser.h @@ -2,7 +2,7 @@ #define PARSER_H #include "token.h" -#include "../dialect.h" +#undef NDEBUG #include "ast/sqlitequery.h" #include "ast/sqliteexpr.h" @@ -18,7 +18,7 @@ class ParserError; * * Typical use case would be: * @code - * Parser parser(db->getDialect()); + * Parser parser(); * if (parser.parse(queryString)) * { * QList queries = parser.getQueries(); @@ -47,9 +47,7 @@ class ParserError; * Finally, there is a parseExpr() to parse just a SQLite expression * (http://sqlite.org/lang_expr.html). * - * Parser works basing on SQLite grammar defined in sqlite2.y and sqlite3.y files. - * Since there are 2 completly separate grammar definitions, there are 2 dialects - * that the parser works with. + * Parser works basing on SQLite grammar defined in sqlite3.y file. * * This is a high-level API to the Lemon Parser, the original SQLite parser. */ @@ -57,10 +55,9 @@ class API_EXPORT Parser { public: /** - * @brief Creates parser for given SQLite dialect. - * @param dialect SQLite dialect to use. Can be changed later with setDialect(). + * @brief Creates parser for SQLite dialect. */ - Parser(Dialect dialect); + Parser(); /** * @brief Releases internal resources. @@ -77,12 +74,6 @@ class API_EXPORT Parser */ void setLemonDebug(bool enabled); - /** - * @brief Changes dialect used by parser. - * @param dialect Dialect to use. - */ - void setDialect(Dialect dialect); - /** * @brief Parses given query string. * @param sql SQL query string to parse. Can be multiple queries separated with semicolon. @@ -125,7 +116,7 @@ class API_EXPORT Parser * * Example: * @code - * Parser parser(db->getDialect()); + * Parser parser; * SqliteSelectPtr select = parser.parse(queryString); * if (!select) * { @@ -256,14 +247,6 @@ class API_EXPORT Parser */ void cleanUp(); - /** - * @brief Propagates dialect to all AST objects. - * - * This is called after successful parsing to set the adequate SQLite dialect - * in all AST objects. - */ - void fillSqliteDialect(); - /** * @brief Creates Lemon parser. * @return Pointer to Lemon parser. @@ -325,11 +308,6 @@ class API_EXPORT Parser */ void parseAddToken(void* other, TokenPtr token); - /** - * @brief Parser's dialect. - */ - Dialect dialect; - /** * @brief Flag indicating if the Lemon low-level debug messages are enabled. */ -- cgit v1.2.3