jubitaneja / calc-compiler

tiny language compiler for class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Skeleton for "calc" language compiler.

build the compiler like this:

mkdir build
cd build
cmake .. -DLLVM_DIR=$LLVM -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Debug
make

run the compiler like this:

./calcc < input_file 2> out.ll

run the generated code like this:

clang ../driver.c out.ll -Wall -o calc

About

tiny language compiler for class

License:Apache License 2.0


Languages

Language:LLVM 99.9%Language:Perl 0.0%Language:CMake 0.0%Language:C++ 0.0%Language:C 0.0%