lambda/lexer.mll
Michael Zhang 97971a1d0c
test
2018-02-16 05:22:07 -06:00

15 lines
288 B
OCaml

{
open Parser
exception Eof
}
rule token = parse
| ' ' | '\t' { token lexbuf }
| '\n' { EOL }
| '=' { Equal }
| '\\' { Lambda }
| '(' { LParen }
| ')' { RParen }
| '.' { Dot }
| ['a'-'z' 'A'-'Z'] ['a'-'z' 'A'-'Z' '0'-'9' '_']* as s { Ident(s) }
| eof { raise Eof }