A Java-- compiler targeting Jasmin/JVM bytecode, developed for the Compilers course at FEUP. The compiler implements the major stages of language processing:
- ANTLR grammar (lexer & parser)
- AST construction & translation
- Symbol table management
- Semantic analysis
- Optimizations (register allocation, constant folding & propagation)
- Code generation to Jasmin
The project demonstrates compiler design principles by translating Java-- (a simplified Java-like language) into executable JVM bytecode through Jasmin.
⚠️ This project does not run as a standalone compiler. To explore its functionality, you should run the test suite using IntelliJ.
-
Open the project in IntelliJ IDEA.
-
Set JDK versions:
- Go to
File > Project Structure > Project
- Set Project SDK to Java 21
- Under
Gradle Settings
, also set the Gradle JVM to Java 21
- Go to
-
Run the tests:
- Open the
test
folder in IntelliJ - Right-click and select Run 'All Tests'
- Alternatively, run individual tests for specific compiler components
- Open the
- Afonso Machado Neves (up202108884@up.pt)
- Francisco Lopes Mendonça (up202006728@up.pt)
- João Francisco Costa Cordeiro (up202205682@up.pt)
This project is distributed under the terms of the MIT License.