C++17 runtime (cpplpg2) for LPG2.
| Field | Value |
|---|---|
| Package | CMake library cpplpg2 (source) |
| Version | 1.0.0 |
| Compatible generator | LPG2 ≥ 2.3.0 — see ecosystem/compat.json |
add_subdirectory(path/to/LPG-cpp-runtime)
target_link_libraries(your_parser PRIVATE cpplpg2)C++17, CMake ≥ 3.8, ICU (for some stream APIs).
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j- Generate with
-programming_language=rt_cpp(orcpp/c++) anddtParserTemplateF.gi - Compile generated
*.cpp/ headers with this library - Sample: https://github.com/A-LPG/LPG2/tree/main/examples/calculator/cpp
| Feature | Status |
|---|---|
| Deterministic parser | yes |
| Backtracking | yes |
| Nested automatic AST | yes |
%Recover prosthetic AST |
yes |
- Channel: source / CMake (Conan/vcpkg planned)
- Automation: CI build only
- Generator: https://github.com/A-LPG/LPG2
- Ecosystem: https://github.com/A-LPG/LPG2/blob/main/docs/ECOSYSTEM.md