https://github.com/blaumeise20/optimizing-mini-compiler
A simple compiler for a hypothetical language called Mini
https://github.com/blaumeise20/optimizing-mini-compiler
Last synced: 3 months ago
JSON representation
A simple compiler for a hypothetical language called Mini
- Host: GitHub
- URL: https://github.com/blaumeise20/optimizing-mini-compiler
- Owner: blaumeise20
- Created: 2023-09-08T12:28:02.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-08T12:28:05.000Z (over 1 year ago)
- Last Synced: 2025-01-09T15:21:19.387Z (5 months ago)
- Language: Rust
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Optimizing Mini compiler
This compiler has been written as the project for the [Advanced Compiler Construction](https://ssw.jku.at/Teaching/Lectures/ACC/) course at the Johannes Kepler University Linz.
I chose to do the [second](https://ssw.jku.at/Teaching/Lectures/ACC/Project_2.pdf) available project, because I am more interested in optimizing topics than code generation.
I also did some cleanup work afterwards, you should be able to pretty easily understand what is going on.
To run the compiler, you have to pass it the input file like `cargo run --release myprogram.mini`. It will **not** execute your code, but compile it into a control flow graph. The graph will be outputted as a Graphviz graph. You can optinally pass a `--output ` parameter to save the graph into a file. Examples can be found in `examples.mini`.