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

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

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.