]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_disambiguation/test_lexer.ml
snapshot, almost working
[helm.git] / helm / ocaml / cic_disambiguation / test_lexer.ml
index bff5cde9967039b126d92eec980f1dcbefad6f90..2c43357499569f1a6d8fabe6e749a02c8f66be1e 100644 (file)
  * http://helm.cs.unibo.it/
  *)
 
-let ic = open_in Sys.argv.(1) in
+let ic =
+  try
+    open_in Sys.argv.(1)
+  with Invalid_argument _ -> stdin
+in
 let token_stream = fst (Lexer.lex.Token.tok_func (Stream.of_channel ic)) in
 let rec dump () =
   let (a,b) = Stream.next token_stream in