Module Pprint_modelica

module Pprint_modelica: sig .. end
Modelica pretty-printers. Implementation is based on Format pretty-printing, but the Format-based API is not (yet) exposed to keep the documentation workload small. Patches welcome.

All pretty printers return correct (i.e. parseable) Modelica Syntax.


val eq2str : ?max:int -> Syntax.equation -> string
Equation pretty printer.
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)
val import2str : ?max:int -> Syntax.import -> string
import-clause pretty printer.
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)
val extend2str : ?max:int -> Syntax.extend -> string
extends-clause pretty printer.
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)
val texpr2str : ?max:int -> Syntax.texp -> string
Equation pretty printer.
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)
val td2str : ?max:int -> Syntax.typedef -> string
Type-Definition pretty printer
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)
val defs2str : ?max:int -> Syntax.definition list -> string
Definition pretty printer. Since modelica.ml factors definitions (i.e. parameter Real x,y; becomes parameter Real x; parameter Real y), it works on a list instead of singletons.
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)
val stmt2str : ?max:int -> Syntax.statement -> string
Statement pretty printer.
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)
val texpr2str : ?max:int -> Syntax.texp -> string
Type-expresssion pretty printer
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)
val unit2str : ?max:int -> Syntax.unit_ -> string
Compilation unit (aka 'Stored_Definition') pretty printer
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)
val expr2str : ?max:int -> Syntax.exp -> string
Expresssion pretty printer
max : The maximum number of boxes opened (as defined by Format.set_max_boxes)