X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_disambiguation%2Ftest_lexer.ml;fp=helm%2Focaml%2Fcic_disambiguation%2Ftest_lexer.ml;h=8667953c3181ba27cca2b27544c2d76ceca5bea7;hb=0148419c577eab74538b8e2564a64e399d8bdd65;hp=0000000000000000000000000000000000000000;hpb=d70fefb399d883f07fd8be6e2f2c749df149f7fd;p=helm.git diff --git a/helm/ocaml/cic_disambiguation/test_lexer.ml b/helm/ocaml/cic_disambiguation/test_lexer.ml new file mode 100644 index 000000000..8667953c3 --- /dev/null +++ b/helm/ocaml/cic_disambiguation/test_lexer.ml @@ -0,0 +1,11 @@ +let ic = open_in Sys.argv.(1) 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 + if a = "EOI" then raise Stream.Failure; + print_endline (Printf.sprintf "%s '%s'" a b); + dump () +in +try + dump () +with Stream.Failure -> ()