rayniel95 / COOL-Interpreter

COOL interpreter with type inference functionality. I used a mixture of top-bottom and bottom-up approach.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

The idea of this project is to create a COOL interpreter with type inference functionality. COOL is a strong, statically typed programming language, in this project I extend the built in types adding an AUTO_TYPE, this type inform to the interpreter that it is necessary to make a type inference for this. This mean that the AUTO_TYPE is turned into other type before code execution.

See more

See:

  • orden.pdf.

How to execute

The test cases ending with - copia.cl use AUTO_TYPE. The test cases without - copia.cl do not use AUTO_TYPE.

Build image: docker build ./ -t rayniel95/cool-interpreter:v1.0

Execute: docker run --rm --mount type=bind,source="absolute/path/to/repository",destination="/usr/src/app" -it rayniel95/cool-interpreter:v1.0 python main.py "./test_cases/<test-case-name>.cl"

Requirements

Docker

Note: this interpreter can be improved, example --> take a look to if/else block.

About

COOL interpreter with type inference functionality. I used a mixture of top-bottom and bottom-up approach.


Languages

Language:Python 57.1%Language:Cool 40.2%Language:C 2.7%Language:Dockerfile 0.1%