Résolution stellaire en OCaml
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
377 B

{
open Parser
exception Eof
}
let var_id = ['a'-'z' 'A'-'Z' '0'-'9']+
let space = [' ' '\t']+
let newline = '\r' | '\n' | "\r\n"
rule read = parse
| var_id { VAR (Lexing.lexeme lexbuf) }
| '(' { LEFT_PAR }
| ')' { RIGHT_PAR }
| '.' { DOT }
| '\\' { LAMBDA }
| space { read lexbuf }
| newline { read lexbuf }
| eof { exit 0 }