a3a4746856e42609a704e6a587484928d657fcd5
[Faustine.git] / interpretor / lexer.mll
1 {open Parser}
2
3 rule token = parse
4 [' ' '\t' '\n' ] { token lexbuf }
5 | ['a'-'z' 'A'-'Z']+ as x { IDENT x }
6 | ['+' '*' '-' '/' '!' '_' '#'
7 '@' '<' '>' '%'] as x { IDENT (String.make 1 x) }
8 | "[]" { IDENT "[]" }
9 | ['0'-'9']+ as a { CONST a }
10 | '.' { POINT }
11 | '(' { LPAR }
12 | ')' { RPAR }
13 | ',' { PAR }
14 | ':' { SEQ }
15 | "<:" { SPLIT }
16 | ":>" { MERGE }
17 | "~" { REC }
18 | eof { EOF }