2019-05-12 21:31:22 +04:00
|
|
|
(* Driver for the lexer of Mini-ML *)
|
|
|
|
|
|
|
|
(* Error printing and exception tracing *)
|
|
|
|
|
|
|
|
Printexc.record_backtrace true;;
|
|
|
|
|
|
|
|
(* Running the lexer on the source *)
|
|
|
|
|
2019-05-15 17:03:15 +04:00
|
|
|
let options = EvalOpt.read ();;
|
|
|
|
|
|
|
|
open EvalOpt;;
|
|
|
|
|
|
|
|
if Utils.String.Set.mem "lexer" options.verbose then
|
|
|
|
Lexer.trace options.input
|
|
|
|
else Lexer.iter (fun _lexbuf _out _token -> ()) options.input
|
2019-05-12 21:31:22 +04:00
|
|
|
;;
|