From 89c95ff2796f831408178dc8d7da3c7f0029ba88 Mon Sep 17 00:00:00 2001 From: GeonoTRON2000 Date: Wed, 28 May 2014 07:31:49 -0700 Subject: Added parser stub in order to correct interaction with the command-line interface. --- .../src/org/archphantom/shenanigans/Shenanigans.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Shenanigans/src/org/archphantom/shenanigans/Shenanigans.java') diff --git a/Shenanigans/src/org/archphantom/shenanigans/Shenanigans.java b/Shenanigans/src/org/archphantom/shenanigans/Shenanigans.java index fa4edc0..7408a51 100644 --- a/Shenanigans/src/org/archphantom/shenanigans/Shenanigans.java +++ b/Shenanigans/src/org/archphantom/shenanigans/Shenanigans.java @@ -5,6 +5,8 @@ import java.io.InputStream; import java.io.ObjectInputStream; import java.util.ArrayList; import org.archphantom.shenanigans.elements.Program; +import org.archphantom.shenanigans.parser.Parser; +import org.archphantom.shenanigans.parser.Tokenizer; public class Shenanigans { private static final String HELP_STRING = "############################### Shenanigans Help ###############################\r\n" @@ -75,14 +77,9 @@ public class Shenanigans { } public static void parse (InputStream stream) throws IOException { - /* - String data = ""; - int b; - while ((b = stream.read()) != -1) { - data += (char) b; - } - // Interact with parser - */ + Parser parser = new Parser(new Tokenizer(stream)); + Program program = parser.program(); + program.run(); } } -- cgit v1.2.3