https://github.com/oznakn/vc
A small compiler for METU CENG444's programming language v, written in Rust.
https://github.com/oznakn/vc
compiler lalr1 lalrpop language metu-ceng programming-language rust
Last synced: about 2 months ago
JSON representation
A small compiler for METU CENG444's programming language v, written in Rust.
- Host: GitHub
- URL: https://github.com/oznakn/vc
- Owner: oznakn
- Created: 2020-01-08T14:38:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-30T09:03:50.000Z (almost 4 years ago)
- Last Synced: 2024-05-01T17:26:33.121Z (over 1 year ago)
- Topics: compiler, lalr1, lalrpop, language, metu-ceng, programming-language, rust
- Language: Rust
- Homepage:
- Size: 194 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vc, A Compiler for V
[](https://github.com/oznakn/vc)
[](https://travis-ci.com/oznakn/vc)A compiler for METU CENG444's programming langauge v, for semester 20191. To see the reference of the language,
click [here](https://github.com/bozsahin/ceng444/blob/a72670446051e0b206cd76a8a2ea169301c6bfce/project-material/vspecs-2019.pdf).`vc` is built with [Rust](https://www.rust-lang.org/), using the [lalrpop](https://github.com/lalrpop/lalrpop) parser generator, with LALR(1) mode enabled.
For now, `vc` only generates RISC-V 64 bit target code.
## Requirements
* `Rust`
* [riscv-gnu-toolchain](https://github.com/riscv/riscv-gnu-toolchain)
* [rv8](https://rv8.io/)## Getting Started
In order to run the code, type `cargo run -- compile examples/simple.v`. This will generate `simple.s` file in the `examples` directory.
Then, type `run.sh simple`. This will automatically runs assembler and linker for the assembly file, and runs the target code using the `rv8` simulator.
## Authors
* Ozan Akın