]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/cic_disambiguation/test_lexer.ml
new experimental cic textual parser: checkin
[helm.git] / helm / ocaml / cic_disambiguation / test_lexer.ml
1 let ic = open_in Sys.argv.(1) in
2 let token_stream = fst (Lexer.lex.Token.tok_func (Stream.of_channel ic)) in
3 let rec dump () =
4   let (a,b) = Stream.next token_stream in
5   if a = "EOI" then raise Stream.Failure;
6   print_endline (Printf.sprintf "%s '%s'" a b);
7   dump ()
8 in
9 try
10   dump ()
11 with Stream.Failure -> ()