View on GitHub

JUNA

A JAVA based Lua Interpreter

Download this project as a .zip file Download this project as a tar.gz file

About JUNA

A team effort of students for two weeks. Juna is free software, published under the terms of the GNU General Public License V3. Packages used in Juna are

Getting Started

Build Instructions

Interactive/Batch Mode

Usage in Batch Mode: java -jar juna.jar [-options] [Lua-File] with following options:

Usage in Interactive Mode:

Architecture

The interpreter is divided into two modules:

Scanner and Parser

The Scanner (JFLEX) takes an Lua Code, either the current line in the interactive mode or from a file, and produce a Token-Stream. The Parser (Cup) generates out of the Token-Stream together with the different block types provided by Classgen an Abstract Syntax Tree matching the Lua grammar.

Interpreter

The Interpreter simply step through the abstract syntax tree and handle each block. The tree visitor differ a block by operator (like '+', '-'), by block element (like loops or conditions) or by functions (standard library functions as well as user defined functions). Currently, all operations and block elements are implemented but some standard library functions are still missing yet.

Important annotation

Thus Juna is based on Java there won't be exactly the same behavior like it is given by the Lua implementation in C. Especially the possibility to communicate with the underlying environment is missing in Java. Therefore Juna is more secure than the official Lua interpreter.

Contact Us

For contact, send an e-mail to (cc-labcourse (at) t-online.de)