-{open Parser}
+{
+open Parser
+open Types
+}
rule token = parse
- [' ' '\t' '\n' ] { token lexbuf }
-| ['a'-'z' 'A'-'Z']+ as x { IDENT x }
-| ['+' '*' '-' '/' '!' '_' '#'
- '@' '<' '>' '%'] as x { IDENT (String.make 1 x) }
-| "[]" { IDENT "[]" }
-| ['0'-'9']+ as a { CONST a }
-| '.' { POINT }
-| '(' { LPAR }
-| ')' { RPAR }
-| ',' { PAR }
-| ':' { SEQ }
-| "<:" { SPLIT }
-| ":>" { MERGE }
-| "~" { REC }
-| eof { EOF }
+ [' ' '\t' '\n' ] { token lexbuf }
+
+| "+" { IDENT Add}
+| "-" { IDENT Sub}
+| "*" { IDENT Mul}
+| "/" { IDENT Div}
+| "_" { IDENT Pass}
+| "!" { IDENT Stop}
+| "mem" { IDENT Mem}
+| "@" { IDENT Delay}
+| "floor" { IDENT Floor}
+| "int" { IDENT Int}
+| "sin" { IDENT Sin}
+| "cos" { IDENT Cos}
+| "atan" { IDENT Atan}
+| "atantwo" { IDENT Atan2}
+| "sqrt" { IDENT Sqrt}
+| "rdtable" { IDENT Rdtable}
+| "%" { IDENT Mod}
+| "vectorize" { IDENT Vectorize}
+| "#" { IDENT Vconcat}
+| "[]" { IDENT Vpick }
+| "serialize" { IDENT Serialize}
+| ">" { IDENT Larger}
+| "<" { IDENT Smaller}
+| "max" { IDENT Max}
+| "min" { IDENT Min}
+| "prefix" { IDENT Prefix}
+| "selecttwo" { IDENT Select2}
+| "selectthree" { IDENT Select3}
+
+
+| ['0'-'9']+ as a { CONST a }
+| '.' { POINT }
+
+
+| '(' { LPAR }
+| ')' { RPAR }
+| ',' { PAR }
+| ':' { SEQ }
+| "<:" { SPLIT }
+| ":>" { MERGE }
+| "~" { REC }
+| eof { EOF }