Skip to content

adamdempsey90/pips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pips

GCC Build Clang Build

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

Compiling

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/repl

Installing

As a header-only library, pipslib can be installed directly with CMake:

cmake -S . -B build
cmake --build build
cmake --install build --prefix /usr/local

That 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)

About

Header-only compiler for a simple language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors