Skip to content

Simple language toy compiler made at Compilers II Subject at UFMT

Notifications You must be signed in to change notification settings

SousaPedroso/compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiler of simple arithmetic operations

This repository contains the final project of Compilers II subject at UFMT proposed by the professor Raphael.

The valid tokens of the language can be seen according to the following automata.

Automata of the language

Using the ascendent syntatic, the automata which describes the rules for the language is demonstrated below, using a dictionary in python:

Automata of the rules

None external package was used for this project, but for execute it you must install this repository as a package due to the directories organization, running the following command on the root of this repository:

python -m pip install .

You can execute the programs through the HipoMaq which compiles and interprets text files like the examples on tests directory passing two arguments: source_code with the relative or absolute path to compile the file and dest_code with the target absolute or relative path to save the object code. The commands below shows a example:

cd hm
python HipoMaq.py ..\tests\ex01 ..\compiled

About

Simple language toy compiler made at Compilers II Subject at UFMT

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages