Skip to content

matcom-school/cool-compiler-2021

 
 

Repository files navigation

⚙️ Compiler for COOL language

Tests

🤔 What's it?

Compiler for the COOL language, you can see its official documentation here. The COOL language is a static and strongly typed tool, with imperative syntax and influenced by the object-oriented design pattern. In this project a compiler is developed that transforms plain text code into executable MIPS code. To perform this transformation, the system is composed of 4 main modules that represent the 4 main phases of language theory (lexer, parser, semantic checking and code generation).
Principal Skills: Python Metaprogramming AST Visitor Pattern Sly MIPS

🤓 Motivation

This project was developed as part of a compilation course at the University of Havana. With the educational foundation of knowing the main aspects of a compiler or interpreter, tools that developers use on a daily basis.

🧐 How to use it?

First download the project

$ git clone https://github.com/matcom-school/cool-compiler-2021.git
$ pip install -r requirements.txt

Check that all tests are working properly

$ cd src
$ make test

Then type your COOL code and save the changes in .cl and execute the following commands

$ make <name_file>.cl

Releases

No releases published

Packages

No packages published

Languages

  • Python 56.6%
  • Cool 38.7%
  • Jupyter Notebook 3.2%
  • C 1.2%
  • Common Lisp 0.1%
  • Shell 0.1%
  • Other 0.1%