This is a simple compiler for the FOOL(Functional Object-Oriented Language) programming language, implemented in Java using ANTLR for parsing. The compiler performs lexical analysis, parsing, semantic analysis, and code generation. The java code was provided by the course "Linguaggi, Compilatori e Modelli Computazionali" held at the University of Bologna.
From the project root you can build using the Gradle wrapper:
./gradlew buildYou can directly run the application and pass the file to compile as a command-line argument (optional).
Example without argument (will use default file foolExamples/prova.fool):
./gradlew runExample with argument:
./gradlew run --args="path/to/source.fool"- replace
path/to/source.foolwith the actual file you want to compile. - the file must be in the project directory.
- if your shell interprets backslashes or special characters, quote or escape the path as appropriate.