mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
grammar: Simplify grammar parser
Remove the stub for parsing CREATE TABLE ... AS SELECT statements. This provides no extra value because we never come across these statements in our context and this is not remotely implemented in a useful way. Also remove the statement and statement list structures as they are not used either.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -41,17 +41,13 @@ public:
|
||||
public: void identifier();
|
||||
public: void collationname();
|
||||
public: void signednumber();
|
||||
public: void statementlist();
|
||||
public: void statement();
|
||||
public: void createtable();
|
||||
public: void createindex();
|
||||
public: void create_statements();
|
||||
public: void keywordastablename();
|
||||
public: void createtable();
|
||||
public: void columndef();
|
||||
public: void tableconstraint();
|
||||
public: void selectstmt();
|
||||
public: void name();
|
||||
public: void expr();
|
||||
public: void createindex();
|
||||
public: void indexedcolumn();
|
||||
public: void keywordascolumnname();
|
||||
public: void columnname();
|
||||
@@ -60,6 +56,7 @@ public:
|
||||
public: void conflictclause();
|
||||
public: void literalvalue();
|
||||
public: void foreignkeyclause();
|
||||
public: void selectstmt();
|
||||
public: void functionname();
|
||||
public: void subexpr();
|
||||
public: void binaryoperator();
|
||||
@@ -133,8 +130,6 @@ private:
|
||||
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_21;
|
||||
static const unsigned long _tokenSet_22_data_[];
|
||||
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_22;
|
||||
static const unsigned long _tokenSet_23_data_[];
|
||||
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_23;
|
||||
};
|
||||
|
||||
#endif /*INC_Sqlite3Parser_hpp_*/
|
||||
|
||||
@@ -222,23 +222,6 @@ signednumber
|
||||
;
|
||||
|
||||
// parser part
|
||||
statementlist
|
||||
:
|
||||
(statement)?
|
||||
(SEMI statement)*
|
||||
;
|
||||
|
||||
statement
|
||||
:
|
||||
createtable
|
||||
| createindex
|
||||
;
|
||||
|
||||
create_statements
|
||||
:
|
||||
createtable
|
||||
| createindex
|
||||
;
|
||||
|
||||
keywordastablename
|
||||
:
|
||||
@@ -289,9 +272,7 @@ keywordastablename
|
||||
createtable
|
||||
:
|
||||
(CREATE (TEMP|TEMPORARY)? TABLE (IF_T NOT EXISTS)? (tablename | keywordastablename)
|
||||
( (LPAREN columndef (COMMA columndef)* (COMMA tableconstraint)* RPAREN (WITHOUT ROWID)?)
|
||||
| (AS selectstmt)
|
||||
)
|
||||
(LPAREN columndef (COMMA columndef)* (COMMA tableconstraint)* RPAREN (WITHOUT ROWID)?)
|
||||
{#createtable = #([CREATETABLE, "CREATETABLE"], #createtable);}
|
||||
)
|
||||
|(CREATE VIRTUAL TABLE (IF_T NOT EXISTS)? (tablename | keywordastablename)
|
||||
|
||||
Reference in New Issue
Block a user