ANTLR-v4-based-based C++17 parser for SPARQL 1.1 with visitors and listeners. During CMake configuration, the ANTLR v4 code generator is called.
It is available via the artifactory of the DICE Research Group.
You need the package manager Conan installed and set up. You can add the DICE artifactory with:
conan remote add dice-group https://conan.dice-research.org/artifactory/api/conan/tentris
To use sparql-parser-base, add it to your conanfile.txt
:
[requires]
sparql-parser-base/0.3.7
Use
include(FetchContent)
FetchContent_Declare(
sparql-parser-base
GIT_REPOSITORY "${CMAKE_CURRENT_SOURCE_DIR}/../"
GIT_TAG 0.3.7
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(sparql-parser-base)
to make the library target sparql-parser-base::sparql-parser-base
available.
Beware: Conan will not be used for dependency retrieval if you include sparql-parser-base via FetchContent. It is your responsibility that all dependencies are available before.
#get it
git clone https://github.com/dice-group/sparql-parser-base.git
cd sparql-base-parser
#build it
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. # uses conan by default if installed
make -j sparql-parser-base
-DBUILD_EXAMPLES=ON/OFF [default: OFF]
: Build the examples.
-DANTLR4_TAG=... [default: "4.13.1"]
: ANTLR4 version to be used.
-DCONAN_CMAKE=ON/OFF [default: ON]
: If available, use Conan to retrieve dependencies.