GithubHelp home page GithubHelp logo

isabella232 / leg-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keplerproject/leg

0.0 0.0 0.0 100 KB

Leg is a Lua library which offers a complete Lua 5.1 grammar, along with some functions to use and modify it.

Home Page: http://leg.luaforge.net/

License: Other

Lua 97.53% Makefile 2.47%

leg-1's Introduction

Leg 0.1.2
=========

This is a release of Leg, a Lua library exporting a complete Lua 5.1 grammar 
and a small API for user manipulation.


Dependencies
------------

* You need, understandably, to have Lua 5.1 up and running to be able to use
this library :)

* Also, Leg uses LPeg 0.7 extensively for pattern matching, so LPeg is 
expected be installed. You can get LPeg at 

http://www.inf.puc-rio.br/~roberto/lpeg.html


Basic Installation
------------------

There are three ways to install Leg:

* `make install`

  Run `make install`, and a directory called `leg` with the source files inside
  will be put in a specific path. Tweak Makefile's LUA_LIB variable to 
  indicate the appropriate path for your system; Makefile ships with it set 
  to /usr/local/share/lua/5.1 . Make sure you have the proper permissions to
  access the path you want; if not or in doubt, use the `make` option below.
  
* `make` or `make leg`
  
  A directory `leg` will be created in your working directory, with the 
  source files inside. Just put it in a LUA_PATH-visible place and you're 
  ready to go.
  
* by hand

  If you don't have, don't want to or can't use `make`, you can just put all 
  the files in `src` inside a directory called `leg`, and put that directory 
  in your LUA_PATH.


Read the Lua Reference Manual for the LUA_PATH and the LUA_CPATH syntax
(http://www.lua.org/manual/5.1/manual.html#pdf-package.path).


Copyright
---------

See the file "COPYRIGHT".


Bug Fixes and New Stuff
-----------------------

See the file "release".


Testing
-------

You can either:

* run `make test`; or

* go to the directory `tests` and run `test.lua`.

Both do the same thing.


Work to do
----------

* Improve error checking: currently it is bolted on and not extensible, and 
  different patterns react differently to mismatching: scanner.STRING throws 
  an error when a mismatch happens, but some errors simply return false and an
  error message. I don't know a good way to handle this.

* A better API for grammar extensions. The current one is very ad hoc, and
  requires some fine tuning to make sure it works correctly. Metalua's API 
  seems interesting, and was originally based on Parsec. Investigation is 
  under way.

* The binary operators' precedences isn't enforced in the grammar; one must 
  enforce it by hand when capturing expressions. This can be very annoying.

* More thorough testing.

leg-1's People

Contributors

hishamhm avatar tst2005 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.