Mini-Java compiler front-end development
The project includes parse tree and intermediate code generation (in form of C three addresses (TAC) code) for the MiniJava or eMiniJava programming languages with ANTLR.
Project Title
Three-Address Code Generation for MiniJava Language Using ANTLR
Introduction
The goal of this project is to design and implement a compiler that translates a subset of the Java programming language, referred to as MiniJava or eMiniJava, into Three-Address Code (TAC) in C programming language. The project will involve constructing a parse tree, performing semantic analysis, and generating intermediate code that can be used for further compilation or execution.
Objectives
- Define the MiniJava or eMiniJava Language: Establish the syntax and semantics of the MiniJava language, including data types, control structures, and function definitions.
- Build a Parser Using ANTLR: Utilize ANTLR to create a parser that can read Mini-Java source code and produce a parse tree.
- Create a Semantic Analyzer: Implement a semantic analysis phase to check for type correctness and scope resolution.
- Generate Three-Address Code: Develop an intermediate code generation module that translates the parse tree into TAC in C language.
- Testing and Validation: Test the compiler with various MiniJava programs to validate the correctness and efficiency of the generated TAC.