Skip to content

RichardGrac/Compiler

Repository files navigation

Compiler

Compiler guided in the Tiny Compiler by Louden from the Book: UNED Construccion de compiladores principios y practica - Kenneth C Louden -International _Thomson Editores - 2004.

If you want to run the Compiler, there are two ways. With GUI or without GUI.

With GUI:

Download the 'Compiler GUI' of my partner: https://github.com/Joshua195/IDE_Compilador

Then you have to change the 'PATH' var whose is related by the Folder with files in Python corresponding to the compiler.

It is in Controller.java:

43: public static final String PATH = "C:\Users\Richa\PycharmProjects\Compiler\";

And Run the Compiler since the 'IDE'.

Without GUI:

You have to comment and discomment some lines in some files corresponding to the use of the IDE:

[D]iscomment [C]omment

Lexico.py [D] 76 [C] 79, 80

Sintactico.py [D] 42 [C] 38, 39

Gramatical.py [D] 562, 563 [C] 567, 568

GenCodigo.py [D] 425, 426, 433, 434 [C] 429, 430, 437, 438

And Run the files one by one since your Python IDE or Console: [Lexico.py, Sintactico.py, Gramatical.py] or [Main.py], GenCodigo.py and TM.py.