Skip to content

blackgeorge-boom/compilers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiler for the Dana Programming Language

Main features of Dana

  • Simple Python-like structure

  • Supports integers and bytes, as well as arrays

  • Pass by value or by reference

  • Low level programming

  • Pascal-like scope of variables and nested functions

  • Static type safety

  • Library of functions

Technology used

  • Flex/Bison for the AST (in C)
  • LLVM for the IR code

Dependencies (on Ubuntu 18.04.4 64-bit)

  • flex
  • bison
  • cmake 3.12 (at least)
  • llvm-3.9
  • clang-3.9
  • lib32z1-dev

Build

cd llvm
mkdir cmake-build-debug
cd cmake-build-debug
cmake ..
make

Run

cd llvm
./dana [-indent] [-Olevel] [-i] [-f] inputfile

-indent   Offside rule trigger
-Olevel   O[0-3] optimisation flag
-i        Output LLVM code
-f        Output assembly code

For the compiler class of NTUA

Authors

Makaris Nikolaos - 03113108

Mavrogeorgis Nikolaos - 03113087