X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_disambiguation%2Ftest_lexer.ml;h=3e61e702c0f33bc046931f76320b1fa93477d0fa;hb=12cc5b2b8e7f7bb0b5e315094b008a293a4df6b1;hp=bff5cde9967039b126d92eec980f1dcbefad6f90;hpb=aba014724c9ad08f80944ec3021c9fa3826dca4a;p=helm.git diff --git a/helm/ocaml/cic_disambiguation/test_lexer.ml b/helm/ocaml/cic_disambiguation/test_lexer.ml index bff5cde99..3e61e702c 100644 --- a/helm/ocaml/cic_disambiguation/test_lexer.ml +++ b/helm/ocaml/cic_disambiguation/test_lexer.ml @@ -23,8 +23,14 @@ * http://helm.cs.unibo.it/ *) -let ic = open_in Sys.argv.(1) in -let token_stream = fst (Lexer.lex.Token.tok_func (Stream.of_channel ic)) in +let ic = + try + open_in Sys.argv.(1) + with Invalid_argument _ -> stdin +in +let token_stream = + fst ((CicTextualLexer2.cic_lexer ()).Token.tok_func (Stream.of_channel ic)) +in let rec dump () = let (a,b) = Stream.next token_stream in if a = "EOI" then raise Stream.Failure;