7 let help = "Usage: mac [ -LX ]* [ <file> ]*"
8 let help_L = " Activate lexer debugging"
9 let help_Q = " Read data from standard input"
10 let help_V = " Show version information"
11 let help_X = " Reset options and counters"
13 let active = ref false
15 let process_channel ich =
16 let lexbuf = Lexing.from_channel ich in
17 L.token lexbuf; active := true
19 let output_version () =
20 P.printf "mac 0.1.0 M - November 2012\n"
22 let process_stdin () =
25 let process_file fname =
26 let ich = open_in fname in
27 process_channel ich; close_in ich
30 if !active then P.printf "%u\n" !O.count
34 "-L", A.Set O.debug_lexer, help_L;
35 "-Q", Arg.Unit process_stdin, help_Q;
36 "-V", Arg.Unit output_version, help_V;
37 "-X", A.Unit O.clear, help_X;