Parsing has never been this much fun
[hcoop/domtool2.git] / src / domtool.lex
index 91af342..765a6ab 100644 (file)
@@ -109,11 +109,16 @@ lineComment = #[^\n]*\n;
 <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