Skip to content

jasonlazar/compilers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compilers NTUA 2019-20 8th semester

A complete compiler for the Tony language for the course of Compilers in ECE, NTUA.

Authors

Ιάσων Λαζαρίδης Θανάσης Κουτρούμπας

Technologies Used

  • flex → For Lexical Analysis
  • bison → For Syntax/Semantic Analysis
  • LLVM → For IR Code/Code Generation/Optimizations
  • edsger-lib → A x86 assembly runtime libraby for Linux
  • bdwgc → Boehm's Garbage Collector

Dependecies

  • flex (v2.6.4)
  • bison (v3.0.4)
  • llmv-9
  • libgc-dev

LLVM-9

  • For a Ubuntu/Debian system download the Automatic Installation Script and install with version 9:
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 9

libgc-dev

  • For a Ubuntu/Debian system install header files for Boehm's Garbage Collector from apt package:
sudo apt install libgc-dev

Building

To build everything do:

make

Usage

To run the compiler:

./tony [flags] [FILE]

The supported flags are:

  • -O: Enable optimizations
  • -i: The input must be given on stdin and the intermediate code will be printed on stdout
  • -f: The input must be given on stdin and the final code will be printed on stdout

If no -i or -f flags are given the input file must be given as a command line parameter.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published