<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>src/lexer.ml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -11,6 +11,8 @@ modern programming languages (think Python, Ruby, or Haskell). It's not
 intended to appeal to anyone other than myself; it's more like a sandbox
 for my experiments.
 
+The current implementation is written in OCaml.
+
                          ---
 
 Somersault is syntactically similar to the ML family of languages.</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -0,0 +1,40 @@
+{
+  open Parser
+  open Printf
+} 
+
+
+let digit = ['0'-'9']
+let identifier = ['a'-'z'] ['a'-'z' 'A'-'Z' '_']*
+
+rule tokenize = parse
+    [' ' '\t' '\r' '\n'] { tokenize lexbuf }
+  | digit+ as number 
+      { printf &quot;(NUMBER, %i)\n&quot; (int_of_string number);
+        tokenize lexbuf
+      }
+  | identifier as id 
+      { printf &quot;(IDENTIFIER, %s)\n&quot; id;
+        tokenize lexbuf
+      }
+  | _ as c
+      { printf &quot;Unrecognized token: %c\n&quot; c;
+        tokenize lexbuf
+      } 
+
+  | eof { }
+
+
+{
+    let main () = 
+      let cin = 
+        if Array.length Sys.argv &gt; 1 then
+          open_in Sys.argv.(1)
+        else
+          stdin
+      in
+      let lexbuf = Lexing.from_channel cin in
+      tokenize lexbuf
+
+let _ = Printexc.print main ()
+} </diff>
      <filename>src/lexer.mll</filename>
    </modified>
    <modified>
      <diff>@@ -0,0 +1,40 @@
+%token EOF
+
+%token T_BOOL
+%token T_DUMMY
+%token T_INT
+%token T_NIL
+%token T_STRING
+
+%token IDENTIFIER
+
+%token LPAREN
+%token RPAREN
+
+/* reserved */
+%token ARROW
+%token DUMMY
+%token FALSE
+%token FUN
+%token LET
+%token NIL
+%token REC
+%token TRUE
+%token WHERE
+%token WITHIN
+
+
+/* operators */
+%token NEG
+%token PLUS MINUS TIMES DIV
+%token EQUAL LESS GREAT LESS_E GREAT_E
+%token AT
+
+%start expr
+%type unit
+%%
+
+expr:
+   EOF                { () }
+
+%%</diff>
      <filename>src/parser.mly</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ba99f5d1554264776763a740cf443c559bd613fb</id>
    </parent>
  </parents>
  <author>
    <name>Kenny Sanders</name>
    <email>sandersk@gmail.com</email>
  </author>
  <url>http://github.com/kobs/somersault/commit/837c63e11ba9d6739cee505ffd2f68bdb0c7b957</url>
  <id>837c63e11ba9d6739cee505ffd2f68bdb0c7b957</id>
  <committed-date>2009-05-25T21:25:40-07:00</committed-date>
  <authored-date>2009-05-25T21:25:40-07:00</authored-date>
  <message>basic lexer</message>
  <tree>4e04d9b2e45b6d8f6121987eedc51f73023e60ec</tree>
  <committer>
    <name>Kenny Sanders</name>
    <email>sandersk@gmail.com</email>
  </committer>
</commit>
