let rec fml_of_string ?(print_tokens = false) (s:string): t_fml = let b : Lexing.lexbuf = Lexing.from_string s in try FML_parser.main (lexer print_tokens) b with |_ -> match print_tokens with |false -> let _ : unit = IO.print_to_stderr_red ("FML_parser failed; read the the following tokens:") in fml_of_string ~print_tokens:true s |true -> raise (Parse_error s)