Clone
3
GettingStarted
erick-alcachofa edited this page 2025-12-30 03:08:14 +00:00
Getting Started
Build and run the artichoke parser frontend to experiment with the language
features described in this documentation.
Prerequisites
- C++23 compiler (tested with Clang 17/GCC 13).
- CMake 3.26+.
- Ninja or Make.
- Optional:
ctestfor tokenizer tests.
Build the Toolchain
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
The executable build/frontend/artichoke-c reads a source file, parses it, and
prints a Markdown AST or diagnostics.
Run the Parser
./build/frontend/artichoke-c path/to/program.arti
The CLI prints either a Markdown AST or descriptive diagnostics.
Run Tests
Tokenizer tests live under tests/Tokenizer/.
cmake --build build --target tests
ctest --test-dir build/tests --output-on-failure
Enable testing during configuration with -DENABLE_TESTING=ON.
Repository Layout
frontend/CLI entry point.lib/Tokenizer, parser, AST, and utilities.tests/Tokenizer/Tokenization coverage.docs/Reference programs and supporting materials.
Next Steps
- Review the Sample Programs and overview guides to understand the language.
- Dive into Language Overview and Control Flow for targeted explanations.
- Use Architecture if you plan to extend the compiler.