Git Product home page Git Product logo

prolua's Introduction

PROLUA

Prolua is a simple Lua 5.1 interpreter written in Prolog. Check out the documentation [PDF] for more details.

Requirements

Prolua requires SWI-Prolog. Additionally, Prolua requires a Lua interpreter (lua) and compiler (luac) that implement the 5.1 specification, a current version of which can be found here. The interpreter is used to run the lua2prolog.lua script which generates an abstract syntax, while the compiler is used solely to check for any syntax errors in a Lua script.

Prolua has not been tested with Lua programs that adhere to the 5.0 specification or less and as such, I cannot guarantee they will work in Prolua. Since Prolua currently implements the 5.1 specification, Lua scripts using features introduced in 5.2 and later will not work.

Execution

To run the interpreter, simply execute the prolua.sh script from a terminal. The script takes one or more arguments with the first being the name of the Lua program to interpret, and the rest being command line arguments passed to said program. An example of execution would be

./prolua.sh samples/assignment.lua

Prolua is developed under Debian GNU/Linux and the prolua.sh script is written to work with bash. This means that it won't work under Windows but should, theoretically, work under any Unix-like operating system (e.g. Mac OS), provided the stated requirements are met.

Hierarchy

The folders provided with this software are structured in the following manner:

  • samples contains sample Lua source code files used to test Prolua.
  • src contains the source code tree.

prolua's People

Contributors

othieno avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.