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