https://github.com/yjhmelody/lua-rs
A toy Lua5.3 Compiler
https://github.com/yjhmelody/lua-rs
bytecode compiler lua parser rust
Last synced: 12 months ago
JSON representation
A toy Lua5.3 Compiler
- Host: GitHub
- URL: https://github.com/yjhmelody/lua-rs
- Owner: yjhmelody
- Created: 2019-04-01T09:48:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-14T10:03:53.000Z (almost 4 years ago)
- Last Synced: 2023-02-27T02:23:17.126Z (about 3 years ago)
- Topics: bytecode, compiler, lua, parser, rust
- Language: Rust
- Homepage:
- Size: 161 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A Toy Lua Compiler Just For Study (And Just For Fun)
---
## Note
Basic lexer, parser, codegen and Lua bytecode serialization/deserialization have been completed.
Some uncommon syntax have been ignored by me. The `AST` designed by me is somewhat unreasonable.
It was difficult for me to implement some codegen for the first time. Also, the Lua Bytecode is a little fizzy for me.
There are still some hidden bugs in codegen.
Generally, it's a naive project for learning compiler work principle. I did not do rigorous testing for so many functions.