| 1 |
open Location |
open Location |
| 2 |
open Sys |
exception Usage |
|
exception Usage of unit |
|
| 3 |
|
|
| 4 |
let () = |
let () = |
| 5 |
List.iter |
List.iter |
| 7 |
Builtin.types |
Builtin.types |
| 8 |
|
|
| 9 |
|
|
| 10 |
let input = if Array.length argv = 1 then (Stream.of_channel stdin) |
let input_channel = |
| 11 |
else if (Array.length argv > 2) or |
match Array.length Sys.argv with |
| 12 |
not (file_exists (Array.get argv 1)) then raise(Usage () ) |
| 1 -> stdin |
| 13 |
else (Stream.of_channel (open_in (Array.get argv 1))) |
| 2 -> open_in Sys.argv.(1) |
| 14 |
|
| _ -> raise Usage |
| 15 |
|
|
| 16 |
|
let input = Stream.of_channel input_channel |
| 17 |
|
|
| 18 |
let ppf = Format.std_formatter |
let ppf = Format.std_formatter |
| 19 |
let prog () = |
let prog () = |