lambda/lexer.mll

13 lines
210 B
OCaml
Raw Normal View History

2018-02-13 23:43:40 +00:00
{
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 }