This is a preliminary release of LuaParse, including as a demonstration LVL, the Lua Visual Linter.

LuaParse includes Blex, a general purpose pure-Lua lexer, and lparse, a pure-Lua Lua parser, as well as a variety of utility functions and a prototype package management system.

Inadequate documentation is included in each file. I'd like to find a better format but I haven't gotten around to it yet.

The intent of the packaging system is to provide the ability to sandbox, but there are still a couple of missing pieces. It might be obvious where they would go ;) Meanwhile, the intention is that you set LUA_PATH (either the global or the environment variable) and then execute import.lua prior to the main program. However, that is not always convenient, particularly for CGIs, so the package includes the "combine" utility which creates a single file out of a main file and a bunch of libraries.

The illustrative executable, tnt.lua, is both a command-line tool and a CGI tool; it will execute as a CGI in the unlikely case that the environment variable GATEWAY_PROTOCOL is defined. Really, it should be separated into two executables but, like many things, I haven't gotten around to it.

To create a single-file executable, run the following command:

./combine -o tnt tnt.lua lib/*.lua
chmod a+x tnt

(You might want to use Luiz Henrique de Figueireido's excellent srlua tool to make a single-file precompiled executable.) You could then put tnt into your cgi-bin folder and see if it works.

To use tnt to highlight itself (my usual test), try this (or just look at the results below):

mkdir html
./tnt -o html/?.html -v combine *.lua lib/*.lua
cd lib
../tnt -o ../html/?.html -v *.lua

The -v should give you an indication of how long it takes. It seems to run at about 1000 lines per second on one of my machines, which is not awful given that it is pure Lua.

Suggestions, bug reports, bug fixes, and new stylesheets are all welcome.


[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -
[TXT]HEADER.html26-Aug-2004 23:58 2.4K
[   ]README26-Aug-2004 06:11 1.7K
[TXT]blex.lua.html26-Aug-2004 06:04 60K
[TXT]combine.html26-Aug-2004 06:05 25K
[TXT]defaultStyle.lua.html26-Aug-2004 06:05 4.5K
[IMG]favicon.ico27-Sep-2011 02:37 1.1K
[TXT]import.lua.html26-Aug-2004 06:05 42K
[TXT]libquery.lua.html26-Aug-2004 06:05 61K
[TXT]libutil.lua.html26-Aug-2004 06:05 17K
[TXT]lparse.lua.html26-Aug-2004 06:05 171K
[TXT]lua2html.lua.html26-Aug-2004 06:05 39K
[TXT]robots.txt27-Sep-2011 02:30 0
[TXT]tnt.lua.html26-Aug-2004 06:06 61K
[TXT]xstring.lua.html26-Aug-2004 06:06 11K

Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch Server at Port 80