Typechecking for basic language done
[hcoop/domtool2.git] / src / domtool.lex
index 91af342..5130ad9 100644 (file)
@@ -103,17 +103,23 @@ lineComment = #[^\n]*\n;
 
 <INITIAL> "->"        => (Tokens.ARROW (yypos, yypos + size yytext));
 <INITIAL> "=>"        => (Tokens.DARROW (yypos, yypos + size yytext));
+<INITIAL> "<-"        => (Tokens.LARROW (yypos, yypos + size yytext));
 
 <INITIAL> "="         => (Tokens.EQ (yypos, yypos + size yytext));
 <INITIAL> ","         => (Tokens.COMMA (yypos, yypos + size yytext));
 <INITIAL> "\\"        => (Tokens.BSLASH (yypos, yypos + size yytext));
 <INITIAL> ":"         => (Tokens.COLON (yypos, yypos + size yytext));
 <INITIAL> ";"         => (Tokens.SEMI (yypos, yypos + size yytext));
+<INITIAL> "^"         => (Tokens.CARET (yypos, yypos + size yytext));
+<INITIAL> "!"         => (Tokens.BANG (yypos, yypos + size yytext));
+<INITIAL> "&"         => (Tokens.AND (yypos, yypos + size yytext));
 
 <INITIAL> "let"       => (Tokens.LET (yypos, yypos + size yytext));
 <INITIAL> "in"        => (Tokens.IN (yypos, yypos + size yytext));
 <INITIAL> "end"       => (Tokens.END (yypos, yypos + size yytext));
 
+<INITIAL> "Root"      => (Tokens.ROOT (yypos, yypos + size yytext));
+
 <INITIAL> {id}        => (Tokens.SYMBOL (yytext, yypos, yypos + size yytext));
 <INITIAL> {cid}       => (Tokens.CSYMBOL (yytext, yypos, yypos + size yytext));
 <INITIAL> {intconst}  => (case Int.fromString yytext of