Skip to content

A Dana Compiler developed for Compiler's Course at NTUA

Notifications You must be signed in to change notification settings

CodePeters/Dana_Compiler

Repository files navigation

Dana Compiler 2017

Authors:

Alexander Moschos
Giorgos Petrou

Implementation of a compiler for the Dana programming language for the 2017 Compilers Course in NTUA.

Dependencies:

1. LLVM 3.8(llc,opt)
2. flex
3. bison
4. clang and clang++
5. edsger-lib( https://github.com/abenetopoulos/edsger_lib )

Building:

To build everything do

make

Execution

To run the compiler with layout do with a sample file sample.dna:

./do.sh -l sample.dna

To run the compiler with begin/end blocks with input in stdin do:

./do.sh -b -O3

The executable supports a number of flags

-l     Language with Layout(by default enabled).
-b     Language with begin/end blocks(by default disabled).
-f     Program in stdin x86_64 Assembly in stdout.
-i     Program in stdin LLVM IR in stdout.
-O<n>  Optimization flag where n = {0,1,2,3}(Applied to the IR and the Assembly code)

The compiled executable will be called a.out

About

A Dana Compiler developed for Compiler's Course at NTUA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published