From f4affce812cdc1762ac2617682f813f1f34ab6b4 Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Wed, 21 Nov 2018 11:29:33 +0000 Subject: Escape strings literals in lem pretty printer. --- src/pretty_print_lem.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pretty_print_lem.ml b/src/pretty_print_lem.ml index 1afc0e50..779d81f8 100644 --- a/src/pretty_print_lem.ml +++ b/src/pretty_print_lem.ml @@ -391,7 +391,7 @@ let doc_lit_lem (L_aux(lit,l)) = | L_bin n -> failwith "Shouldn't happen" (*"(num_to_vec " ^ ("0b" ^ n) ^ ")" (*shouldn't happen*)*) | L_undef -> utf8string "(return (failwith \"undefined value of unsupported type\"))" - | L_string s -> utf8string ("\"" ^ s ^ "\"") + | L_string s -> utf8string ("\"" ^ (String.escaped s) ^ "\"") | L_real s -> (* Lem does not support decimal syntax, so we translate a string of the form "x.y" into the ratio (x * 10^len(y) + y) / 10^len(y). -- cgit v1.2.3