* 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