Skip to content

lucios-ufm/Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpu
🚀 OIKOS COMPILER


El proyecto para el curso Compiladores consiste en escribir un compilador para un lenguaje llamado Decaf. Decaf es un lenguaje similar a C o Pascal.

Requeriments

  • Python 3

Installing and Running

python Compiler.py <file_name> -flag

Ejemplo:
python Compiler.py ejemplo -target hola

python Compiler.py simple -target parse -debug parse:scan -o out

python Compiler.py semantic -target semantic -debug ast:semantic
python Compiler.py eje -target semantic -debug semantic
python Compiler.py irt2 -target irt
python Compiler.py final -target codegen -debug irt

💡 IMPORTANTE

  • El archivo debe de estar en la carpeta decafs y debe de tener la extensión .decaf

Flags

-o <outname>     Escribir el output a <outname>
-target <stage>  <stage> es uno de los siguientes elementos: scan, parse, ast, semantic, irt, codegen
-opt <opt_stage> <opt_stage> es uno de: constant, algebrai
-debug <stage>   Debugging <stage>

Fase del proyecto

  • Scanner
  • Parser
  • Semantic Check
  • IRT
  • Code Gen
  • Python && ASM

About

yet another compiler, built with python rip

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •