diff src/luan/interp/LuaParser.java @ 31:5cf15507d77e

separate interpreter from interface git-svn-id: https://luan-java.googlecode.com/svn/trunk@32 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 13 Dec 2012 02:50:04 +0000
parents 8d8f4f5caef4
children c3eab5a3ce3c
line wrap: on
line diff
--- a/src/luan/interp/LuaParser.java	Fri Dec 07 20:22:19 2012 +0000
+++ b/src/luan/interp/LuaParser.java	Thu Dec 13 02:50:04 2012 +0000
@@ -978,20 +978,4 @@
 		return true;
 	}
 
-	// for testing
-	public static void main(String[] args) throws Exception {
-		LuaParser parser = Parboiled.createParser(LuaParser.class);
-		while( true ) {
-			String input = new Scanner(System.in).nextLine();
-			ParsingResult<?> result = new ReportingParseRunner(parser.Target()).run(input);
-			if( result.hasErrors() ) {
-				System.out.println("Parse Errors:\n" + ErrorUtils.printParseErrors(result));
-			} else {
-				Expr expr = expr(result.resultValue);
-				LuaState lua = new LuaState();
-				Object val = expr.eval(lua);
-				System.out.println("Result: "+Lua.toString(val));
-			}
-		}
-	}
 }