summaryrefslogtreecommitdiffstats
path: root/agate.ml
diff options
context:
space:
mode:
Diffstat (limited to 'agate.ml')
-rwxr-xr-xagate.ml19
1 files changed, 19 insertions, 0 deletions
diff --git a/agate.ml b/agate.ml
new file mode 100755
index 0000000..0e44939
--- /dev/null
+++ b/agate.ml
@@ -0,0 +1,19 @@
+#!/usr/bin/env ocaml
+
+type interpreter = {
+ mutable stack : int list
+}
+
+type token = Word of string
+
+let tokenize line : token list =
+ String.split_on_char ' ' line |> List.map (fun s -> Word s)
+
+let parse line =
+ let _tokens = tokenize line in
+ ()
+
+let () =
+ let line = input_line stdin |> parse in
+ print_string "HI" |> print_newline
+