Allow use of lua2java from command line

This commit is contained in:
James Roseborough
2010-08-13 20:28:11 +00:00
parent a62350b06a
commit d344f08a54

View File

@@ -33,6 +33,7 @@ import org.luaj.vm2.LuaFunction;
import org.luaj.vm2.LuaTable; import org.luaj.vm2.LuaTable;
import org.luaj.vm2.LuaValue; import org.luaj.vm2.LuaValue;
import org.luaj.vm2.lib.jse.JsePlatform; import org.luaj.vm2.lib.jse.JsePlatform;
import org.luaj.vm2.lua2java.Lua2Java;
import org.luaj.vm2.luajc.LuaJC; import org.luaj.vm2.luajc.LuaJC;
@@ -49,7 +50,8 @@ public class lua {
" -l name require library 'name'\n" + " -l name require library 'name'\n" +
" -i enter interactive mode after executing 'script'\n" + " -i enter interactive mode after executing 'script'\n" +
" -v show version information\n" + " -v show version information\n" +
" -j compile into java bytecode\n" + " -j use lua2java source-to-source compiler\n" +
" -b use luajc bytecode-to-bytecode compiler (requires bcel on class path)\n" +
" -- stop handling options\n" + " -- stop handling options\n" +
" - execute stdin and stop handling options"; " - execute stdin and stop handling options";
@@ -85,6 +87,9 @@ public class lua {
usageExit(); usageExit();
// input script - defer to last stage // input script - defer to last stage
break; break;
case 'b':
Lua2Java.install();
break;
case 'j': case 'j':
LuaJC.install(); LuaJC.install();
break; break;