An open API service indexing awesome lists of open source software.

https://github.com/mattlianje/yavanna

Compiler for my synthetic language
https://github.com/mattlianje/yavanna

Last synced: 3 months ago
JSON representation

Compiler for my synthetic language

Awesome Lists containing this project

README

        

# yavanna

- A small, unoptimizing compiler for my synthetic language - `yavanna`.
It targets ARMv6-ish, features LL(2) grammar and is described in EBNF.

- This library crate is mainly for self-study of the
[Green Dragon Book](https://en.wikipedia.org/wiki/Principles_of_Compiler_Design),
and is named after [Yavanna](https://lotr.fandom.com/wiki/Yavanna) the Valar of fruits, as
a tip of the hat to Dr. Richard Hipp's [lemon C parser](https://sqlite.org/src/doc/trunk/doc/lemon.html).


Yavanna

- Sample of Yavanna and her corresponding ARM6 asm:
```rust
func add(x: int, y: int) -> int {
return (x + y);
}
```
```asm
.global add
add:
PUSH {lr}
ADD r0, r0, r1
POP {pc}
```