Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: My pl/0 compiler implemented in Rust (for college curruculum design) (github.com/dreden33773)
5 points by edenwang233 9 months ago | hide | past | favorite | 1 comment
I've implemented a `pl/0 compiler` in `rust-lang` to fulfill the curriculum design for `Principles of Compiler Design` in my college (NUAA, China).

Here's the GitHub repository url: https://github.com/DrEden33773/pl_0

As far as I know, `Rust` is not well adpated (even known) by college students around the world. So, this project is to prove that it's totally possible to design a complete & usable project in Rust for a beginner.

This implementation has a complete error handling strategy, which means it could find as many errors as possible in one run, instead of being halted by the first error.

What's more, comparing to most of others' implementation for curriculum design, my pl/0 compiler added `Abstracted Syntax Tree` as a middle representation between `Parser` and `Codegen`. It could separate `semantic analysis` from `syntax analysis`, which makes it easier for synchronous error handling. And, it leaves enough space for implementing a `pass-optimizer`.

Enjoy the project, and sincerely wish you could give a `Star` in the GitHub repository if it's helpful to you! :)




Great!

Here is mine(Javascript), https://github.com/janus/PL0.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: