let build ?(print_comments=false) ~writer ~output_funs () =
let t = create ~writer output_funs in
{
Signatures.
print_comment =
if print_comments then
(handle_comment_line t)
else
(fun a b -> ());
print_text = handle_text t;
enter_cmd = start_command t;
leave_cmd = stop_command t;
terminate = terminate t;
is_raw = Commands.Raw.is_raw_cmd;
default_raw_end = Commands.Raw.default_raw_end;
enter_raw = start_raw_mode t;
print_raw = handle_raw_text t;
leave_raw = stop_raw_mode t;
error = writer.Signatures.w_error; }