Triangle is a compiler in Java created by Watt & Brown. This project is an extension of the Triangle compiler.
We added new functionalities, implementing good compiler design techniques learned in the Compilers and Interpreters course at Instituto Tecnológico de Costa Rica.
Those are the main syntaxis added:
- if Expression then Command (elsif Expression then Command)* "else" Command "end")*
- loop while Expression do Command end
- loop until Expression do Command end
- loop do Expression while Command end
- loop do Expression until Command end
- loop for Identifier from Expression to Expression do Command end
- loop for Identifier from Expression to Expression while Expresssion do Command end
- loop for Identifier from Expression to Expression until Expresssion do Command end
- private Declaration in Declaration end
- recursive Proc-Funcs end