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
- Host: GitHub
- URL: https://github.com/mattlianje/yavanna
- Owner: mattlianje
- License: gpl-3.0
- Created: 2023-07-11T03:17:11.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-02T08:07:08.000Z (over 1 year ago)
- Last Synced: 2025-02-02T11:32:56.039Z (5 months ago)
- Language: Rust
- Homepage:
- Size: 3.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).
![]()
- 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}
```