aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/coreSQLiteStudio/parser/parser.h
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-12-17 07:06:30 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-12-17 07:06:30 -0500
commit1fdc150116cad39aae5c5da407c3312b47a59e3a (patch)
tree123c79a4d7ad2d45781ba03ce939f7539fb428d8 /SQLiteStudio3/coreSQLiteStudio/parser/parser.h
parentfeda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 (diff)
New upstream version 3.3.3+dfsg1.upstream/3.3.3+dfsg1
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/parser/parser.h')
-rw-r--r--SQLiteStudio3/coreSQLiteStudio/parser/parser.h34
1 files changed, 6 insertions, 28 deletions
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<SqliteQueryPtr> 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.
@@ -78,12 +75,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.
* @param ignoreMinorErrors If true, then parser will ignore minor errors. Detailed descritpion below.
@@ -125,7 +116,7 @@ class API_EXPORT Parser
*
* Example:
* @code
- * Parser parser(db->getDialect());
+ * Parser parser;
* SqliteSelectPtr select = parser.parse<SelectPtr>(queryString);
* if (!select)
* {
@@ -257,14 +248,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.
*/
@@ -326,11 +309,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.
*/
bool debugLemon = false;