let rec prf_raw_of_prf_seq ?(print_tokens = false) (prf_seq : PRF_sequencer.t_prf_seq) : t_prf_raw =
match prf_seq with
|Prf_seq s ->
let lexbuf = Lexing.from_string s in
try PRF_parser.main (lexer print_tokens) lexbuf with
|_ ->
match print_tokens with
|false ->
let _ = IO.print_to_stderr_red "PRF_parser failed; read the following tokens:" in
prf_raw_of_prf_seq ~print_tokens:true prf_seq
|true -> raise (Parse_error s)