let lexbuf = Lexing.from_channel stdin in try let html = Parser.html Lexer.token lexbuf in (* parse input *) let () = Weeding.weed_html html in (* check nested anchors *) let html' = Transform.transform_html html in (* eliminate nested b tags *) let () = Outline.outline_html html' in (* print an outline *) () with | Failure msg -> print_endline ("Failure --- " ^ msg) | Parsing.Parse_error -> print_endline ("Parse error") | End_of_file -> print_endline "Parse error: unexpected end of string"