aboutsummaryrefslogtreecommitdiff
path: root/lib/Lexer.mll
diff options
context:
space:
mode:
authorMalte Voos <git@mal.tc>2024-06-23 23:31:59 +0200
committerMalte Voos <git@mal.tc>2024-06-24 00:16:55 +0200
commit5d227bcd0055d02e1d49a3dcd27e80a756923d5b (patch)
treeda468ad3a8f3caf709b731ca2678c86a5a015990 /lib/Lexer.mll
parent8d40541003736d5319ec981278338e8c8c66daf6 (diff)
downloadtoytt-5d227bcd0055d02e1d49a3dcd27e80a756923d5b.tar.gz
toytt-5d227bcd0055d02e1d49a3dcd27e80a756923d5b.zip
split code into smaller libraries and make a better repl
Diffstat (limited to 'lib/Lexer.mll')
-rw-r--r--lib/Lexer.mll34
1 files changed, 0 insertions, 34 deletions
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 }