X-Git-Url: https://scm.cri.mines-paristech.fr/git/Faustine.git/blobdiff_plain/440ca0ba93966e89b68dc54207c461afc0d56264..42d607127a467ca737dd903ad007d50a54533cf0:/interpretor/lexer.mll diff --git a/interpretor/lexer.mll b/interpretor/lexer.mll index c6a7cb5..46ce90d 100644 --- a/interpretor/lexer.mll +++ b/interpretor/lexer.mll @@ -7,37 +7,61 @@ rule token = parse [' ' '\t' '\n' ] { token lexbuf } | "+" { IDENT Add} -| "-" { IDENT Sup} +| "-" { IDENT Sub} | "*" { IDENT Mul} | "/" { IDENT Div} +| "^" { IDENT Power} | "_" { IDENT Pass} | "!" { IDENT Stop} +| "&" { IDENT And} +| "|" { IDENT Or} +| "xor" { 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 Atantwo} +| "atantwo" { IDENT Atan2} +| "exp" { IDENT Exp} | "sqrt" { IDENT Sqrt} -| "rdtable" { IDENT Rdtable} +| "log" { IDENT Ln} +| "logten" { IDENT Lg} +| "pow" { IDENT Power} +| "abs" { IDENT Abs} +| "fmod" { 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 Selecttwo} -| "selectthree" { IDENT Selectthree} - +| "selecttwo" { IDENT Select2} +| "selectthree" { IDENT Select3} +| "rdtable" { IDENT Rdtable} +| "rwtable" { IDENT Rwtable} | ['0'-'9']+ as a { CONST a } | '.' { POINT } - | '(' { LPAR } | ')' { RPAR } | ',' { PAR }