Add logical shift left (<<) and logical shift right (>>) to faustine.
[Faustine.git] / interpretor / lexer.mll
index 4f2f525..46ce90d 100644 (file)
@@ -33,7 +33,7 @@ rule token = parse
 | "exp"                                        { IDENT Exp}
 | "sqrt"                                { IDENT Sqrt}
 | "log"                                        { IDENT Ln}
 | "exp"                                        { IDENT Exp}
 | "sqrt"                                { IDENT Sqrt}
 | "log"                                        { IDENT Ln}
-| "logten"                             { IDENT Log10}
+| "logten"                             { IDENT Lg}
 | "pow"                                        { IDENT Power}
 | "abs"                                        { IDENT Abs}
 | "fmod"                               { IDENT Fmod}
 | "pow"                                        { IDENT Power}
 | "abs"                                        { IDENT Abs}
 | "fmod"                               { IDENT Fmod}
@@ -43,12 +43,14 @@ rule token = parse
 | "#"                                   { IDENT Vconcat}
 | "[]"                                  { IDENT Vpick }
 | "serialize"                           { IDENT Serialize}
 | "#"                                   { IDENT Vconcat}
 | "[]"                                  { IDENT Vpick }
 | "serialize"                           { IDENT Serialize}
-| '>'                                   { IDENT Greater}
-| '<'                                   { IDENT Less}
-| ">="                                 { IDENT Gore}
-| "<="                                 { IDENT Lore}
-| "=="                                 { IDENT Equal}
-| "!="                                 { IDENT Different}
+| '>'                                   { 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}
 | "max"                                        { IDENT Max}
 | "min"                                        { IDENT Min}
 | "prefix"                              { IDENT Prefix}
@@ -57,11 +59,9 @@ rule token = parse
 | "rdtable"                             { IDENT Rdtable}
 | "rwtable"                            { IDENT Rwtable}
 
 | "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 }