Skip to content

Commit ce66c1d

Browse files
committed
Remove the Antlr parser and the Antlr runtime library
Both are fully replaced by our new parser and are no longer needed. See issue sqlitebrowser#1990.
1 parent ec0ebed commit ce66c1d

File tree

103 files changed

+10
-16431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+10
-16431
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ matrix:
3333

3434
before_install:
3535
- sudo apt-get update -qq
36-
- sudo apt-get --force-yes install build-essential git-core cmake libsqlite3-dev qt5-default qttools5-dev-tools libsqlcipher-dev qtbase5-dev libantlr-dev libqt5scintilla2-dev libqcustomplot-dev qttools5-dev
36+
- sudo apt-get --force-yes install build-essential git-core cmake libsqlite3-dev qt5-default qttools5-dev-tools libsqlcipher-dev qtbase5-dev libqt5scintilla2-dev libqcustomplot-dev qttools5-dev
3737

3838

3939
install:

BUILDING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The same process works for building the code in any platform supported by Qt
5555

5656
```bash
5757
$ sudo apt install build-essential git-core cmake libsqlite3-dev qt5-default qttools5-dev-tools \
58-
libsqlcipher-dev qtbase5-dev libantlr-dev libqt5scintilla2-dev libqcustomplot-dev qttools5-dev
58+
libsqlcipher-dev qtbase5-dev libqt5scintilla2-dev libqcustomplot-dev qttools5-dev
5959
$ git clone https://github.com/sqlitebrowser/sqlitebrowser
6060
$ cd sqlitebrowser
6161
$ mkdir build
@@ -77,7 +77,7 @@ Done. :)
7777
`qt5-qtbase-devel` in the `dnf install` line below.
7878

7979
```
80-
$ sudo dnf install ant-antlr antlr-C++ cmake gcc-c++ git qt-devel qt5-linguist qwt-qt5-devel \
80+
$ sudo dnf install cmake gcc-c++ git qt-devel qt5-linguist qwt-qt5-devel \
8181
sqlite-devel
8282
$ git clone https://github.com/sqlitebrowser/sqlitebrowser
8383
$ cd sqlitebrowser
@@ -93,7 +93,7 @@ This should complete without errors, and `sqlitebrowser` should now be launch-ab
9393
```bash
9494

9595

96-
$ zypper in -y build git-core, libQt5Core5, libQt5Core5-32bit, libqt5-qtbase, libqt5-qtbase-devel, libqt5-qttools, libqt5-qttools-devel, build, gcc-c++, gcc, sqlite3-devel, libsqlite3-0, cmake, antlr-devel, sqlcipher-devel
96+
$ zypper in -y build git-core, libQt5Core5, libQt5Core5-32bit, libqt5-qtbase, libqt5-qtbase-devel, libqt5-qttools, libqt5-qttools-devel, build, gcc-c++, gcc, sqlite3-devel, libsqlite3-0, cmake, sqlcipher-devel
9797
$ git clone https://github.com/sqlitebrowser/sqlitebrowser
9898
$ cd sqlitebrowser
9999
$ mkdir build

CMakeLists.txt

+2-30
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ endif()
1515
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
1616

1717
OPTION(ENABLE_TESTING "Enable the unit tests" OFF)
18-
OPTION(FORCE_INTERNAL_ANTLR "Don't use the distribution's Antlr library even if there is one" OFF)
1918
OPTION(FORCE_INTERNAL_QSCINTILLA "Don't use the distribution's QScintilla library even if there is one" OFF)
2019
OPTION(FORCE_INTERNAL_QCUSTOMPLOT "Don't use distribution's QCustomPlot even if available" ON)
2120
OPTION(FORCE_INTERNAL_QHEXEDIT "Don't use distribution's QHexEdit even if available" ON)
@@ -72,9 +71,6 @@ endif()
7271

7372
find_package(Qt5 REQUIRED COMPONENTS Concurrent Gui LinguistTools Network PrintSupport Test Widgets Xml)
7473

75-
if(NOT FORCE_INTERNAL_ANTLR)
76-
find_package(Antlr2 QUIET)
77-
endif()
7874
if(NOT FORCE_INTERNAL_QSCINTILLA)
7975
find_package(QScintilla 2.8.10 QUIET)
8076
endif()
@@ -90,10 +86,6 @@ else()
9086
endif()
9187
set(JSON_DIR libs/json)
9288

93-
if(NOT ANTLR2_FOUND)
94-
set(ANTLR_DIR libs/antlr-2.7.7)
95-
add_subdirectory(${ANTLR_DIR})
96-
endif()
9789
if(NOT QSCINTILLA_FOUND)
9890
set(QSCINTILLA_DIR libs/qscintilla/Qt4Qt5)
9991
add_subdirectory(${QSCINTILLA_DIR})
@@ -123,9 +115,6 @@ set(SQLB_HDR
123115
src/sql/ObjectIdentifier.h
124116
src/csvparser.h
125117
src/sqlite.h
126-
src/grammar/sqlite3TokenTypes.hpp
127-
src/grammar/Sqlite3Lexer.hpp
128-
src/grammar/Sqlite3Parser.hpp
129118
src/Data.h
130119
src/IconCache.h
131120
src/sql/parser/ParserDriver.h
@@ -208,8 +197,6 @@ set(SQLB_SRC
208197
src/docktextedit.cpp
209198
src/csvparser.cpp
210199
src/DbStructureModel.cpp
211-
src/grammar/Sqlite3Lexer.cpp
212-
src/grammar/Sqlite3Parser.cpp
213200
src/main.cpp
214201
src/Application.cpp
215202
src/CipherDialog.cpp
@@ -278,7 +265,8 @@ set(SQLB_RESOURCES
278265
)
279266

280267
set(SQLB_MISC
281-
src/grammar/sqlite3.g
268+
src/sql/parser/sqlite3_parser.yy
269+
src/sql/parser/sqlite3_lexer.ll
282270
)
283271

284272
# Translation files
@@ -407,11 +395,6 @@ if(QCUSTOMPLOT_FOUND)
407395
else()
408396
include_directories(${QCUSTOMPLOT_DIR})
409397
endif()
410-
if(ANTLR2_FOUND)
411-
include_directories(${ANTLR2_INCLUDE_DIRS})
412-
else()
413-
include_directories(${ANTLR_DIR})
414-
endif()
415398
if(QSCINTILLA_FOUND)
416399
include_directories(${QSCINTILLA_INCLUDE_DIR})
417400
else()
@@ -442,9 +425,6 @@ endif()
442425
if(NOT QCUSTOMPLOT_FOUND)
443426
add_dependencies(${PROJECT_NAME} qcustomplot)
444427
endif()
445-
if(NOT ANTLR2_FOUND)
446-
add_dependencies(${PROJECT_NAME} antlr)
447-
endif()
448428
if(NOT QSCINTILLA_FOUND)
449429
add_dependencies(${PROJECT_NAME} qscintilla2)
450430
endif()
@@ -455,9 +435,6 @@ endif()
455435
if(NOT QCUSTOMPLOT_FOUND)
456436
link_directories("${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}")
457437
endif()
458-
if(NOT ANTLR2_FOUND)
459-
link_directories("${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}")
460-
endif()
461438
if(NOT QSCINTILLA_FOUND)
462439
link_directories("${CMAKE_CURRENT_BINARY_DIR}/${QSCINTILLA_DIR}")
463440
endif()
@@ -480,11 +457,6 @@ if(QCUSTOMPLOT_FOUND)
480457
else()
481458
target_link_libraries(${PROJECT_NAME} qcustomplot)
482459
endif()
483-
if(ANTLR2_FOUND)
484-
target_link_libraries(${PROJECT_NAME} ${ANTLR2_LIBRARIES})
485-
else()
486-
target_link_libraries(${PROJECT_NAME} antlr)
487-
endif()
488460
if(QSCINTILLA_FOUND)
489461
target_link_libraries(${PROJECT_NAME} ${QSCINTILLA_LIBRARIES})
490462
else()

cmake/FindAntlr2.cmake

-50
This file was deleted.

libs/antlr-2.7.7/AUTHORS

-2
This file was deleted.

libs/antlr-2.7.7/CMakeLists.txt

-91
This file was deleted.

libs/antlr-2.7.7/LICENSE.txt

-31
This file was deleted.

0 commit comments

Comments
 (0)