Examples' Makefiles are completed and tested.
[Faustine.git] / interpretor / lexer.mll
1 {
2 open Parser
3 open Types
4 }
5
6 rule token = parse
7 [' ' '\t' '\n' ] { token lexbuf }
8
9 | "+" { IDENT Add}
10 | "-" { IDENT Sub}
11 | "*" { IDENT Mul}
12 | "/" { IDENT Div}
13 | "_" { IDENT Pass}
14 | "!" { IDENT Stop}
15 | "&" { IDENT And}
16 | "|" { IDENT Or}
17 | "^" { IDENT Xor}
18 | "mem" { IDENT Mem}
19 | "@" { IDENT Delay}
20 | "floor" { IDENT Floor}
21 | "ceil" { IDENT Ceil}
22 | "rint" { IDENT Rint}
23 | "int" { IDENT Int}
24 | "float" { IDENT Float}
25 | "sin" { IDENT Sin}
26 | "asin" { IDENT Asin}
27 | "cos" { IDENT Cos}
28 | "acos" { IDENT Acos}
29 | "tan" { IDENT Tan}
30 | "atan" { IDENT Atan}
31 | "atantwo" { IDENT Atan2}
32 | "exp" { IDENT Exp}
33 | "sqrt" { IDENT Sqrt}
34 | "log" { IDENT Ln}
35 | "logten" { IDENT Lg}
36 | "powf" { IDENT Power}
37 | "abs" { IDENT Abs}
38 | "fmodf" { IDENT Fmod}
39 | "%" { IDENT Mod}
40 | "remainder" { IDENT Remainder}
41 | "vectorize" { IDENT Vectorize}
42 | "#" { IDENT Vconcat}
43 | "[]" { IDENT Vpick }
44 | "serialize" { IDENT Serialize}
45 | '>' { IDENT Gt}
46 | '<' { IDENT Lt}
47 | ">=" { IDENT Geq}
48 | "<=" { IDENT Leq}
49 | "==" { IDENT Eq}
50 | "!=" { IDENT Neq}
51 | "<<" { IDENT Shl}
52 | ">>" { IDENT Shr}
53 | "max" { IDENT Max}
54 | "min" { IDENT Min}
55 | "prefix" { IDENT Prefix}
56 | "selecttwo" { IDENT Select2}
57 | "selectthree" { IDENT Select3}
58 | "rdtable" { IDENT Rdtable}
59 | "rwtable" { IDENT Rwtable}
60
61 | ['0'-'9']+ as a { CONST a }
62 | '.' { POINT }
63
64 | '(' { LPAR }
65 | ')' { RPAR }
66 | ',' { PAR }
67 | ':' { SEQ }
68 | "<:" { SPLIT }
69 | ":>" { MERGE }
70 | "~" { REC }
71 | eof { EOF }