This project was created in January 2024 for the Formal Languages and Translation Techniques course, which is a part of Algorithmic Computer Science study programme at Wrocław University of Science and Technology.
This project took part in the competition for the best compiler (i.e., the one creating the fastest and shortest programs), which was held among all 91 students attending the course. It was ranked the 4th best solution and was therefore graded with the highest possible mark of 5.5.
Specification for the project can be found in the file specification.pdf (in polish).
The project is stored in the compiler folder. It can be run by using the following command:
python3 compiler.py <input file> <output file>
- python 3.8.10
- sly (
pip install sly)
The files outputted by the compiler can be tested on the virtual machine provided for the task by the professor. It is stored in the virtual_machine folder.
To build the virtual machine, use make vm. Then run it with the following command:
./run-vm <input-file-path>
You can also run the version of the machine that uses the libcln-dev 1.3.6 library. For that, run the machine with the following command:
./cln-run-vm <input-file-path>
- bison (GNU Bison) 3.8.2
- flex 2.6.4
- GNU Make 4.3
- g++ 11.4.0
- libcln-dev 1.3.6
Files for testing the compiler are provided in the subfolders of the examples folder.