diff compile.rhope @ 2:73e978d590c7

Adding WIP compiler code
author Mike Pavone <pavone@retrodev.com>
date Wed, 29 Apr 2009 02:58:03 -0400
parents
children 0a4682be2db2
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile.rhope	Wed Apr 29 02:58:03 2009 -0400
@@ -0,0 +1,17 @@
+Import lex.rhope
+Import countstring.rhope
+Import parse.rhope
+
+Main[args]
+{
+	[args]Index[1]
+	{
+		Print[["Parsing "]Append[~]]
+		file <- <String@File[~]
+		,data <- [file]Get FString[[file]Length]
+		tokens <- Lex[Count String[data]]
+		Pretty Print[Parse[tokens], ""]
+	}{
+		Print["Usage: rhope compile.rhope <filename>"]
+	}
+}