Header-only compiler for a simple programming language.
Much of this code is based on the clox language from the book "Crafting Interpreters" by Robert Nystrom https://craftinginterpreters.com/contents.html. The code for the book is available at https://github.com/munificent/craftinginterpreters under the MIT License.
Compared to the book, pips is simplified in several ways (e.g., string handling) and was translated to C++.
This project is very much a work in progress.
- Documentation index
- Language guide
- Embedding from C++
- Calling functions on device
- Running code
- Examples
pips is a CMake project and is mostly meant to be included in other projects as a library.
This repository contains a standalone executable that provides a REPL interface.
To compile, execute:
mkdir build && cd build
cmake .. && make
./repl/replAs a header-only library, pipslib can be installed directly with CMake:
cmake -S . -B build
cmake --build build
cmake --install build --prefix /usr/localThat installs the public headers under include/pips/ and the package config files under lib/cmake/pipslib/ or the platform-equivalent GNU install directories.
Downstream CMake projects can then use:
find_package(pipslib CONFIG REQUIRED)
target_link_libraries(your_target PRIVATE pipslib::pipslib)