diff options
Diffstat (limited to 'src/parser/Lexer.mll')
-rw-r--r-- | src/parser/Lexer.mll | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/parser/Lexer.mll b/src/parser/Lexer.mll index 708bb64..22ae387 100644 --- a/src/parser/Lexer.mll +++ b/src/parser/Lexer.mll @@ -11,11 +11,13 @@ let ident = letter+ rule token = parse | whitespace { token lexbuf } + | "(" { LPR } | ")" { RPR } | "[" { LBR } | "]" { RBR } | "->" { ARROW } + | ":=" { ASSIGN } | "*" { ASTERISK } | "\\" { BACKSLASH } | "::" { DOUBLE_COLON } @@ -24,14 +26,21 @@ rule token = | "." { DOT } | "=>" { FATARROW } | "_" { UNDERSCORE } - | "at" { AT } + + | "def" { DEF } + | "fst" { FST } | "snd" { SND } + | "type" { TYPE } + | "bool" { BOOL } | "true" { TRUE } | "false" { FALSE } | "bool-elim" { BOOL_ELIM } + | "at" { AT } + | ident { IDENT (Lexing.lexeme lexbuf) } + | eof { EOF } | (_ as illegal_char) { raise (IllegalCharacter illegal_char) } |