This project aims to create a compiler for an object-oriented programming (OOP) language named SimpleLOOP
.
The first step involves defining the language's grammar, laying the foundation for syntax analysis and subsequent phases.
In this phase, we construct the Abstract Syntax Tree (AST) and meticulously handle potential errors, ensuring a robust and error-resilient language. This includes managing class redefinitions, variable conflicts, and inheritance cycle detection.
The third phase involves identifying and managing errors related to variable and class declarations, type mismatches, assignment validations, and ensuring the appropriateness of operands for operators. This contributes to building a reliable and type-safe language.
The final phase involves translating the program into bytecode and generating .class
files, leveraging the jasmin assembler to facilitate efficient execution of SimpleLOOP programs.