pnv1 31aaf1efac Add antlr4-c3 to ydb sync to github 2 months ago
..
.yandex_meta 31aaf1efac Add antlr4-c3 to ydb sync to github 2 months ago
src 31aaf1efac Add antlr4-c3 to ydb sync to github 2 months ago
License.txt 31aaf1efac Add antlr4-c3 to ydb sync to github 2 months ago
README-cpp.md 31aaf1efac Add antlr4-c3 to ydb sync to github 2 months ago
readme.md 31aaf1efac Add antlr4-c3 to ydb sync to github 2 months ago
ya.make 31aaf1efac Add antlr4-c3 to ydb sync to github 2 months ago

README-cpp.md

ANTLRv4 C3 C++ Port

About

This is a port of the antlr4-c3 library to C++.

Please see the parent README.md for an explanation of the library and for examples.

Port features

  1. Only CodeCompletionCore was ported.

  2. Supports cancellation for collectCandidates method via timeout or flag.

Requirements

Usage

Currently, there are no other ways to adding C++ port as a dependency other than by copying and pasting the directory with project's source code into your own project.

Build & Run

Actual build steps are available at CMake GitHub Workflow.

ANTLRv4 Runtime and Tool as well as other dependecnies will be downloaded during CMake configiration stage.

# Clone antlr4-c3 repository and enter C++ port directory
git clone git@github.com:mike-lischke/antlr4-c3.git
cd antlr4-c3/ports/cpp # Also a workspace directory for VSCode

# Create and enter the build directory
mkdir build && cd build

# Configure CMake build
# - ANTLR4C3_DEVELOPER should be enabled if you are going to run tests
# - CMAKE_BUILD_TYPE Asan and Tsan are supported too
cmake -DANTLR4C3_DEVELOPER=ON -DCMAKE_BUILD_TYPE=Release ..

# Build everything
make

# Running tests being at build directory
(make && cd test && ctest)

Contributing

We recommend using VSCode with clangd extension as an IDE. There are some configuration files for launching tests in debug mode, clangd configuration and more.