Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec parse args =
- match args with
- | "--help" :: xs
- | "-?" :: xs
- | "-h" :: xs ->
- printfn "Usage: ayane [options] files"
- printfn ""
- printfn "-h Show help"
- printfn "-V Show version"
- printfn "-v Verbose output"
- printfn "-x lang Input language"
- printfn " clr"
- printfn " dimacs"
- printfn " tptp"
- parse xs
- | "--lang" :: xs
- | "--language" :: xs
- | "-x" :: xs ->
- match xs with
- | "clr" :: xs'
- | "dimacs" :: xs'
- | "tptp" :: xs' ->
- lang <- xs.Head
- parse xs'
- | x :: xs' ->
- failwithf "%s: unknown language" xs.Head
- | _ ->
- failwithf "%s: expected language" args.Head
- // etc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement