OOP initial commit with new traces.
[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 Sup}
11 | "*" { IDENT Mul}
12 | "/" { IDENT Div}
13 | "_" { IDENT Pass}
14 | "!" { IDENT Stop}
15 | "mem" { IDENT Mem}
16 | "@" { IDENT Delay}
17 | "floor" { IDENT Floor}
18 | "int" { IDENT Int}
19 | "sin" { IDENT Sin}
20 | "cos" { IDENT Cos}
21 | "atan" { IDENT Atan}
22 | "atantwo" { IDENT Atantwo}
23 | "sqrt" { IDENT Sqrt}
24 | "rdtable" { IDENT Rdtable}
25 | "%" { IDENT Mod}
26 | "vectorize" { IDENT Vectorize}
27 | "#" { IDENT Vconcat}
28 | "[]" { IDENT Vpick }
29 | "serialize" { IDENT Serialize}
30 | ">" { IDENT Larger}
31 | "<" { IDENT Smaller}
32 | "prefix" { IDENT Prefix}
33 | "selecttwo" { IDENT Selecttwo}
34 | "selectthree" { IDENT Selectthree}
35
36
37 | ['0'-'9']+ as a { CONST a }
38 | '.' { POINT }
39
40
41 | '(' { LPAR }
42 | ')' { RPAR }
43 | ',' { PAR }
44 | ':' { SEQ }
45 | "<:" { SPLIT }
46 | ":>" { MERGE }
47 | "~" { REC }
48 | eof { EOF }