Start of new ANTLR4 based parser.

Very simple tests pass.
This commit is contained in:
eelke 2022-04-03 12:27:35 +02:00
parent 03b4194193
commit fbbe832a05
44 changed files with 860 additions and 8 deletions

View file

@ -4,11 +4,11 @@
#
#-------------------------------------------------
QT += widgets core
QT += widgets core concurrent
TARGET = pglablib
TEMPLATE = lib
CONFIG += staticlib
CONFIG += staticlib no_keywords
! include( ../common.pri ) {
error( "Couldn't find the common.pri file!" )
@ -45,6 +45,23 @@ SOURCES += \
catalog/PgConstraintContainer.cpp \
ParamListJson.cpp \
ParamListModel.cpp \
sqlast/ColumnDefinition.cpp \
sqlast/CreateTable.cpp \
sqlast/Expression.cpp \
sqlast/Literal.cpp \
sqlast/Node.cpp \
sqlast/SelectItem.cpp \
sqlast/SelectList.cpp \
sqlast/SelectStatement.cpp \
sqlast/Statement.cpp \
sqlast/StatementList.cpp \
sqlast/StringLiteral.cpp \
sqlast/TypeSpecification.cpp \
sqlast/Visitor.cpp \
sqlparser/.generated/PgsqlLexer.cpp \
sqlparser/.generated/PgsqlParser.cpp \
sqlparser/ErrorListener.cpp \
sqlparser/Parser.cpp \
util.cpp \
SqlFormattingUtils.cpp \
catalog/PgKeywordList.cpp \
@ -87,6 +104,7 @@ SOURCES += \
catalog/PgSequenceContainer.cpp
HEADERS += \
CaseChangingCharStream.h \
Pglablib.h \
ASyncDBConnection.h \
ConnectionConfig.h \
@ -113,6 +131,24 @@ HEADERS += \
catalog/PgConstraintContainer.h \
ParamListJson.h \
ParamListModel.h \
sqlast/ColumnDefinition.h \
sqlast/CreateTable.h \
sqlast/Expression.h \
sqlast/Literal.h \
sqlast/Node.h \
sqlast/SelectItem.h \
sqlast/SelectList.h \
sqlast/SelectStatement.h \
sqlast/Statement.h \
sqlast/StatementList.h \
sqlast/StringLiteral.h \
sqlast/TypeSpecification.h \
sqlast/Visitor.h \
sqlast/sqlast.h \
sqlparser/.generated/PgsqlLexer.h \
sqlparser/.generated/PgsqlParser.h \
sqlparser/ErrorListener.h \
sqlparser/Parser.h \
util.h \
SqlFormattingUtils.h \
catalog/PgCatalogTypes.h \
@ -170,6 +206,10 @@ else:unix:!macx: LIBS += -L$$OUT_PWD/../core/ -lcore
INCLUDEPATH += $$PWD/../core
DEPENDPATH += $$PWD/../core
INCLUDEPATH += C:\Prog\include\antlr
win32:CONFIG(debug, debug|release): LIBS += -lantlr4-runtimed
else:win32:CONFIG(release, debug|release): LIBS += -lantlr4-runtime
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../core/release/libcore.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../core/debug/libcore.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../core/release/core.lib