Fix outstanding bugs
[pkg-ocaml-ocsigen.git] / http / test_parser.ml
blob8a4c561021cd667db8d54ecc5dfcc17524eee055
1 let parse_file f =
2 let input = open_in f in
3 let lexbuf = Lexing.from_channel input in
4 try
5 Http_parser.header Http_lexer.token lexbuf
6 with
7 Parsing.Parse_error -> failwith ("erreur vers "^ (Lexing.lexeme lexbuf))
8 |e -> Ocsigen_http_frame.Http_error.display_http_exception e;failwith "erreur"
10 let _ =
11 parse_file Sys.argv.(1)