A SysY compiler for PKU's Compiler Principle course, implemented in Rust.
- SysY source code -> AST: lalrpop
- AST -> Koopa Text (an intermediate representation)
- Koopa Text -> Koopa Program: koopa
- Koopa Program -> RISC-V
For more information, see the report (written in Chinese 🫡).
- Offline Judgement:
- all the tests (except performance tests) have been passed!
- Online Judgement:
- SysY to Koopa: 99.09 / 100
- SysY to RISC-V: 98.64 / 100
- Performance: 100 / 100 (598.74 sec 😋👉🤡)
- Disclaimer: for your own benefit, please avoid directly copying and pasting the code 🙏.
- If you find my code or idea helpful, please consider citing this repository in your lab report or code 😘.
- ...... and star ⭐️ the repo if you like!