Add logical shift left (<<) and logical shift right (>>) to faustine.
[Faustine.git] / interpretor / lexer.mll
index 1c427a9..46ce90d 100644 (file)
@@ -10,34 +10,58 @@ rule token = parse
 | "-"                                   { IDENT Sub}
 | "*"                                   { IDENT Mul}
 | "/"                                   { IDENT Div}
 | "-"                                   { IDENT Sub}
 | "*"                                   { IDENT Mul}
 | "/"                                   { IDENT Div}
+| "^"                                  { IDENT Power}
 | "_"                                   { IDENT Pass}
 | "!"                                   { IDENT Stop}
 | "_"                                   { IDENT Pass}
 | "!"                                   { IDENT Stop}
+| "&"                                  { IDENT And}
+| "|"                                  { IDENT Or}
+| "xor"                                        { IDENT Xor}
 | "mem"                                 { IDENT Mem}
 | "@"                                   { IDENT Delay}
 | "floor"                               { IDENT Floor}
 | "mem"                                 { IDENT Mem}
 | "@"                                   { IDENT Delay}
 | "floor"                               { IDENT Floor}
+| "ceil"                               { IDENT Ceil}
+| "rint"                               { IDENT Rint}
 | "int"                                 { IDENT Int}
 | "int"                                 { IDENT Int}
+| "float"                              { IDENT Float}
 | "sin"                                 { IDENT Sin}
 | "sin"                                 { IDENT Sin}
+| "asin"                               { IDENT Asin}
 | "cos"                                 { IDENT Cos}
 | "cos"                                 { IDENT Cos}
+| "acos"                               { IDENT Acos}
+| "tan"                                        { IDENT Tan}
 | "atan"                                { IDENT Atan}
 | "atan"                                { IDENT Atan}
-| "atantwo"                             { IDENT Atan2}
+| "atantwo"                                    { IDENT Atan2}
+| "exp"                                        { IDENT Exp}
 | "sqrt"                                { IDENT Sqrt}
 | "sqrt"                                { IDENT Sqrt}
-| "rdtable"                             { IDENT Rdtable}
+| "log"                                        { IDENT Ln}
+| "logten"                             { IDENT Lg}
+| "pow"                                        { IDENT Power}
+| "abs"                                        { IDENT Abs}
+| "fmod"                               { IDENT Fmod}
 | "%"                                   { IDENT Mod}
 | "%"                                   { IDENT Mod}
+| "remainder"                          { IDENT Remainder}
 | "vectorize"                           { IDENT Vectorize}
 | "#"                                   { IDENT Vconcat}
 | "[]"                                  { IDENT Vpick }
 | "serialize"                           { IDENT Serialize}
 | "vectorize"                           { IDENT Vectorize}
 | "#"                                   { IDENT Vconcat}
 | "[]"                                  { IDENT Vpick }
 | "serialize"                           { IDENT Serialize}
-| ">"                                   { IDENT Larger}
-| "<"                                   { IDENT Smaller}
+| '>'                                   { IDENT Gt}
+| '<'                                   { IDENT Lt}
+| ">="                                 { IDENT Geq}
+| "<="                                 { IDENT Leq}
+| "=="                                 { IDENT Eq}
+| "!="                                 { IDENT Neq}
+| "<<"                                 { IDENT Shl}
+| ">>"                                 { IDENT Shr}
+| "max"                                        { IDENT Max}
+| "min"                                        { IDENT Min}
 | "prefix"                              { IDENT Prefix}
 | "selecttwo"                           { IDENT Select2}
 | "selectthree"                         { IDENT Select3}  
 | "prefix"                              { IDENT Prefix}
 | "selecttwo"                           { IDENT Select2}
 | "selectthree"                         { IDENT Select3}  
-
+| "rdtable"                             { IDENT Rdtable}
+| "rwtable"                            { IDENT Rwtable}
 
 | ['0'-'9']+ as a                      { CONST a }
 | '.'                                   { POINT }
 
 
 | ['0'-'9']+ as a                      { CONST a }
 | '.'                                   { POINT }
 
-
 | '('                                  { LPAR }
 | ')'                                  { RPAR }
 | ','                                  { PAR }
 | '('                                  { LPAR }
 | ')'                                  { RPAR }
 | ','                                  { PAR }