glua2019.pdf
Transpiler is a widely-used tool that translates a programming language to others.
It's desirable for reusing code and further optimizing.
In this paper, we introduce an approach to implement Lua programming language in Scheme language.
The purpose of gLua is to provide a Lua language front-end above Scheme programming language so that their modules
are reusable between each other.
We'll show how the Scheme helps write the transpiler. This work proved that the Scheme is flexible and powerful enough for a
modern Lua transpiler. We choose Lua-5.2 because it's functional and mature enough for our purpose.
Furthermore, as an experiment, we extend Lua to add some interesting features, and we'll show how we do it with Scheme.
In the first section, we will review the current status of transpiler development in the industry, and introduce several existing
compiler infrastructures.
We compare two common transpiler architectures: TTIR and SLTL. In this paper, we choose TTIR to implement gLua, and we
explain the reasons.
In the rest of the paper, we'll show how we implement a complete Lua-5.2 compiler built on GNU Guile.
History
Usage metrics
Categories
Licence
Exports
RefWorksRefWorks
BibTeXBibTeX
Ref. managerRef. manager
EndnoteEndnote
DataCiteDataCite
NLMNLM
DCDC