Skip to content

Latest commit

 

History

61 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple imperative language with indentation-specific syntax, functions, control-flow and jit-based compilation using C++, LLVM, Bison and CMake.

Building LLVM for this project requires RTTI for the cl::opt library and -j1 during install to prevent memory running out on WSL. Zlib is for lldb usage.

cmake -S llvm -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_PROJECTS="clang;lldb;lld" -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_ZLIB=ON
ninja -C build -j1 install

Built using LLVM 19

mkdir build
cd build
cmake ..
make && ./jitCalc

Eg.

> fn fib(n)
>   if n < 2
>     return 1
>   return fib(n - 2) + fib(n - 1)
> ;
>
> fib(10)
> ;
> 55
> q

About

A jit-based calculator using C++, Bison, LLVM, CMake.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages