diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..5900294b0363d5549235a4b3cb34e39617e78150
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+# By Phil! 2022-05-03
+
+all: absyn lex yac rest
+
+absyn:
+	mosmlc -c Absyn.sml
+
+lex:
+	mosmllex l.lex
+
+yac:
+	mosmlyac -v p.grm
+	
+rest:
+	mosmlc -c liberal p.sig p.sml
+	mosmlc -c l.sml
+
+clean:
+	rm *.ui *.uo *.output p.s* l.sml
diff --git a/ast.sml b/ast.sml
new file mode 100644
index 0000000000000000000000000000000000000000..13d699207442fbe1cdf4c9a18d2c2f7910a21651
--- /dev/null
+++ b/ast.sml
@@ -0,0 +1,12 @@
+(* AST for a K-like language *)
+
+app load ["Word8"];
+
+datatype atom = Num of Word8.word
+              | Fun of (arr -> arr)
+and      arr  = Scalar of atom
+              | Array of arr list;
+
+datatype ast = Nothing
+             | Leaf of arr
+             | Node of (arr -> arr) * ast * ast;
diff --git a/l.lex b/l.lex
new file mode 100644
index 0000000000000000000000000000000000000000..e572918c94b895c60452fa1b5d807d88ed5d5254
--- /dev/null
+++ b/l.lex
@@ -0,0 +1,23 @@
+{
+
+ open Lexing p;
+
+ exception LexicalError of string
+
+ fun lexerError lexbuf s = 
+     raise LexicalError (s);
+
+    (* [` ` `\t` `\n` `\r`]  { Token lexbuf } *)
+
+}
+
+rule Token = 
+  parse
+    [`0`-`9`'a'-'f''A'-'F']+            { case Int.fromString "0x" ^ (getLexeme lexbuf) of
+                               NONE   => lexerError lexbuf "internal error"
+                             | SOME i => BYTE i
+                          }  
+  | ['+'                  { PLUS  }
+  | eof                   { EOF   }
+  | _                     { lexerError lexbuf "Illegal symbol in input" }
+;
diff --git a/p.grm b/p.grm
new file mode 100644
index 0000000000000000000000000000000000000000..bcb6c64dbee2c64ca279720fad51bffbafe6b4cc
--- /dev/null
+++ b/p.grm
@@ -0,0 +1,18 @@
+%{
+  (* WHILEpar.grm: parser specification for a simple WHILE language *)
+  (* TODO: implement expression type for PLUS *)
+
+%}
+
+%token <int> INT
+%token PLUS
+%token EOF
+
+%start Main
+%type <int> Main
+
+%%
+
+Main:
+    INT EOF                            { $1 }
+;
