Frama-C API - Plib
Pretty Printing Utilities.
Message Formatters
val kprintf : (string -> 'b) -> ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'aval sprintf : ('a, Stdlib.Format.formatter, unit, string) Stdlib.format4 -> 'aval failure : ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'aval to_string : (Stdlib.Format.formatter -> 'a -> unit) -> 'a -> stringPretty printers
type 'a printer = Stdlib.Format.formatter -> 'a -> unittype 'a printer2 = Stdlib.Format.formatter -> 'a -> 'a -> unitFunction calls
Operators
val pp_assoc : ?e:string -> op:string -> 'a printer -> 'a list printerval pp_fold_binop : ?e:string -> op:string -> 'a printer -> 'a list printerval pp_fold_call : ?e:string -> f:string -> 'a printer -> 'a list printerval pp_fold_apply : ?e:string -> f:string -> 'a printer -> 'a list printerval pp_fold_call_rev : ?e:string -> f:string -> 'a printer -> 'a list printerval pp_fold_apply_rev : ?e:string -> f:string -> 'a printer -> 'a list printerIterations
type index = | Isingle| Ifirst| Ilast| Imiddle
val iteri : (index -> 'a -> unit) -> 'a list -> unitval iterk : (int -> 'a -> unit) -> 'a list -> unitval mapk : (int -> 'a -> 'b) -> 'a list -> 'b listval global_substitute_fmt : Str.regexp -> string printer -> Stdlib.Format.formatter -> string -> unitstring substitution
substitute the result of the given printer for each non-overlapping part of the given string that match the regexp
val iter_group : Str.regexp -> (string -> unit) -> string -> unitcall the given function for each non-overlapping part of the given string that match the regexp
substitute_list templ print_arg fmt l prints in the formatter fmt the list l using the template templ and the printer print_arg. The template use %[0-9]+ hole.
val is_template : string -> boolCheck whether the string contains %[0-9]+ holes to be used with substitute_list.