Skip to content

Commit 9e8cb6e

Browse files
committed
grammar: Replace the Antlr parser for CREATE INDEX statements
Replace the Antlr lexer and parser for CREATE INDEX statements a new lexer and parser generated with flex and bison. This commit is a first step towards replacing all Antlr-realted parts of the parser. Until then the new bison-generated parser is only used for CREATE INDEX statements and the old Antlr-generated parser is used for CREATE TABLE statements. These are the main reasons for replacing all of the Antlr parser: - Getting rid of the Antlr runtime library as a dependency. - Not depending on an old piece of sotware (we are depending on Antlr2 while Antlr4 is available at the moment. However, migrating to Antlr4 is as bad as migrating to bison). - Better handling of expressions in statements. This proved to be a consistent source of problems over the last couple of years. - Somewhat better Unicode support. - Reentrant code / multithreading support. - I can finally uninstall Java from my computer. See #1990.
1 parent 3237e9d commit 9e8cb6e

22 files changed

Lines changed: 13440 additions & 1761 deletions

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ set(SQLB_HDR
128128
src/grammar/Sqlite3Parser.hpp
129129
src/Data.h
130130
src/IconCache.h
131+
src/sql/parser/ParserDriver.h
132+
src/sql/parser/sqlite3_lexer.h
133+
src/sql/parser/sqlite3_location.h
134+
src/sql/parser/sqlite3_parser.hpp
131135
)
132136

133137
set(SQLB_MOC_HDR
@@ -234,6 +238,9 @@ set(SQLB_SRC
234238
src/IconCache.cpp
235239
src/SelectItemsPopup.cpp
236240
src/TableBrowser.cpp
241+
src/sql/parser/ParserDriver.cpp
242+
src/sql/parser/sqlite3_lexer.cpp
243+
src/sql/parser/sqlite3_parser.cpp
237244
)
238245

239246
set(SQLB_FORMS

src/grammar/Sqlite3Lexer.cpp

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)