iLang is a simple imperative language for which this compiler is created.
- LLVM 4.0.1 - install from source is preferable, check llvm installation guide for instructions
- C++14 compatible compiler (gcc or clang)
- CMake 3.6+
CMake is used as a build system. Here is the installation process:
-
Create directory where all build files will be placed.
mkdir build && cd build
-
Generate build files, if you are missing some dependencies, cmake will fail.
cmake ../src
-
Build executable
make
-
Check that everything works by running
./voc
Right now compiler generates object code file for given input. You can provide it a source file
./voc -o dest source
Result will be object file, which can be linked with C/C++ program to obtain executable. In the future, we will provide working driver to generate executable, but at the moment you have to do following steps:
- Compile voc source file
- Create C file, which declares and calls necessary function
- Build it using C compiler, and provide it generated object
- You now have working executable.
Folder test contains examples of programs, including some simple algorithms such as greatest common divisor and sort.