X-Git-Url: https://scm.cri.mines-paristech.fr/git/Faustine.git/blobdiff_plain/8c48d01c4b78dba6159c13438b06cb7e07a1f338..8e216a8d5f6b094308594009342e53ef122b8062:/interpretor/lexer.mll diff --git a/interpretor/lexer.mll b/interpretor/lexer.mll index 1c427a9..353712a 100644 --- a/interpretor/lexer.mll +++ b/interpretor/lexer.mll @@ -12,32 +12,55 @@ rule token = parse | "/" { IDENT Div} | "_" { IDENT Pass} | "!" { IDENT Stop} +| "&" { IDENT And} +| "|" { IDENT Or} +| "^" { IDENT Xor} | "mem" { IDENT Mem} | "@" { IDENT Delay} | "floor" { IDENT Floor} +| "ceil" { IDENT Ceil} +| "rint" { IDENT Rint} | "int" { IDENT Int} +| "float" { IDENT Float} | "sin" { IDENT Sin} +| "asin" { IDENT Asin} | "cos" { IDENT Cos} +| "acos" { IDENT Acos} +| "tan" { IDENT Tan} | "atan" { IDENT Atan} -| "atantwo" { IDENT Atan2} +| "atantwo" { IDENT Atan2} +| "exp" { IDENT Exp} | "sqrt" { IDENT Sqrt} -| "rdtable" { IDENT Rdtable} +| "log" { IDENT Ln} +| "logten" { IDENT Lg} +| "powf" { IDENT Power} +| "abs" { IDENT Abs} +| "fmodf" { IDENT Fmod} | "%" { IDENT Mod} +| "remainder" { IDENT Remainder} | "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} - +| "rdtable" { IDENT Rdtable} +| "rwtable" { IDENT Rwtable} | ['0'-'9']+ as a { CONST a } | '.' { POINT } - | '(' { LPAR } | ')' { RPAR } | ',' { PAR }