Allow functions "returning strings" (etc), redefine sort function.
[goals.git] / src / lexer.mll
index 4a316a0..ae4a030 100644 (file)
@@ -43,6 +43,7 @@ rule read =
     | newline { new_line lexbuf; read lexbuf }
     | ","     { COMMA }
     | ":"     { COLON }
+    | ";"     { SEMICOLON }
     | "="     { EQUALS }
     | "("     { LEFT_PAREN }
     | ")"     { RIGHT_PAREN }
@@ -51,10 +52,23 @@ rule read =
     | '"'     { read_string (Ast.Substs.create ()) lexbuf }
     | "{"     { read_code (Ast.Substs.create ()) (ref 1) lexbuf }
     | "goal"  { GOAL }
-    | "tactic" { TACTIC_KEYWORD }
+    | "tactic"
+              { TACTIC_KEYWORD }
+    | "function"
+              { FUNCTION }
     | "let"   { LET }
-    | "include" { INCLUDE }
-    | "-include" { OPTINCLUDE }
+    | "include"
+              { INCLUDE }
+    | "-include"
+              { OPTINCLUDE }
+    | "returning"
+              { RETURNING }
+    | "expression"
+              { EXPRESSION }
+    | "string"
+              { STRING_KEYWORD }
+    | "strings"
+              { STRINGS }
     | "*" id  { (* NB: The initial '*' is part of the name. *)
                 TACTIC (Lexing.lexeme lexbuf) }
     | id      { ID (Lexing.lexeme lexbuf) }