From 5d227bcd0055d02e1d49a3dcd27e80a756923d5b Mon Sep 17 00:00:00 2001 From: Malte Voos Date: Sun, 23 Jun 2024 23:31:59 +0200 Subject: split code into smaller libraries and make a better repl --- lib/Lexer.mll | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 lib/Lexer.mll (limited to 'lib/Lexer.mll') diff --git a/lib/Lexer.mll b/lib/Lexer.mll deleted file mode 100644 index 98d1d6b..0000000 --- a/lib/Lexer.mll +++ /dev/null @@ -1,34 +0,0 @@ -{ -open Parser -} - -let whitespace = [' ' '\t' '\r' '\n']+ -let letter = ['a'-'z' 'A'-'Z'] -let ident = letter+ - -rule lex = - parse - | whitespace { lex lexbuf } - | "(" { LPR } - | ")" { RPR } - | "[" { LBR } - | "]" { RBR } - | "->" { ARROW } - | "*" { ASTERISK } - | "\\" { BACKSLASH } - | "::" { DOUBLE_COLON } - | ":" { COLON } - | "," { COMMA } - | "." { DOT } - | "=>" { FATARROW } - | "_" { UNDERSCORE } - | "at" { AT } - | "fst" { FST } - | "snd" { SND } - | "type" { TYPE } - | "bool" { BOOL } - | "true" { TRUE } - | "false" { FALSE } - | "bool-elim" { BOOL_ELIM } - | ident { IDENT (Lexing.lexeme lexbuf) } - | eof { EOF } -- cgit 1.4.1