Hi! In this repository we’ll develop the final assignment for the INF01147
course: a bison and flex based compiler for a C-like language.
The project will span the following steps:
| Stage | Description |
|---|---|
| E1 | Lexical Analysis |
| E2 | Syntax Analysis |
| E3 | Abstract Syntax Tree |
| E4 | Semantic Analysis |
| E5 | Code Generation |
| E6 | Execution Support |
| E7 | Optimization |
The project is structured in the following fashion:
. |-- include |-- script |-- src | |-- driver | |-- parser | `-- utils `-- subprojects 7 directories
As previously noted, there are several dependencies in order to build this project:
mesonbisonflex
If not found, the project will pull the dependencies using the spack tool,
pulled using git from its repository.
There is a helper Makefile in order to facilitate the build, but it is
recommended you instead use meson in order to build the executables.
Start by setting up the build
meson setup buildwhere build is the chosen build directory (meson only does out-of-source builds,
much like cmake). Then, you can build the project using the following command:
meson compile -C buildThere aren’t any, but eventually there will be!
You can contact me through my e-mail:
hcpsilva@inf.ufrgs.br (Henrique’s e-mail)