lambda/lexer.mll
Michael Zhang bbd73d5f4a
initial
2018-02-13 17:43:40 -06:00

12 lines
210 B
OCaml

{
open Parser
exception Eof
}
rule token = parse
| ' ' | '\t' { token lexbuf }
| '\n' { EOL }
| '\\' { Lambda }
| '.' { Dot }
| ['a'-'z'] as c | ['A'-'Z'] as c { Ident(c) }
| eof { raise Eof }