summaryrefslogtreecommitdiff
path: root/Shenanigans/src/org/archphantom/shenanigans/Shenanigans.java
diff options
context:
space:
mode:
authorGeonoTRON2000 <geono@thegt.org>2014-05-28 07:31:49 -0700
committerGeonoTRON2000 <geono@thegt.org>2014-05-28 07:31:49 -0700
commit89c95ff2796f831408178dc8d7da3c7f0029ba88 (patch)
treef77e2f2d0c4fe9eb52ff25ef3fc2b32c36a19a60 /Shenanigans/src/org/archphantom/shenanigans/Shenanigans.java
parent84b8a0f77dbc920d51d611db22fcdf91266a2514 (diff)
downloadshenanigans-89c95ff2796f831408178dc8d7da3c7f0029ba88.tar.gz
Added parser stub in order to correct interaction with the command-line
interface.
Diffstat (limited to 'Shenanigans/src/org/archphantom/shenanigans/Shenanigans.java')
-rw-r--r--Shenanigans/src/org/archphantom/shenanigans/Shenanigans.java13
1 files changed, 5 insertions, 8 deletions
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();
}
}