From bcde99fbe99174a094f38fdda70ad69d65a423f4 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Wed, 30 Apr 2014 17:19:08 +0200 Subject: Fist commit (WIP) --- frontend/abstract_syntax_printer.mli | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 frontend/abstract_syntax_printer.mli (limited to 'frontend/abstract_syntax_printer.mli') diff --git a/frontend/abstract_syntax_printer.mli b/frontend/abstract_syntax_printer.mli new file mode 100644 index 0000000..cbdc872 --- /dev/null +++ b/frontend/abstract_syntax_printer.mli @@ -0,0 +1,31 @@ +(* + Cours "Sémantique et Application à la Vérification de programmes" + + Antoine Miné 2014 + Ecole normale supérieure, Paris, France / CNRS / INRIA +*) + +(* + Pretty-printer for abstract syntax trees. +*) + +open Format +open Abstract_syntax_tree + +(* locations *) +val string_of_position: position -> string +val string_of_extent: extent -> string + + +(* printers *) + +val string_of_typ: typ -> string + +val print_id: formatter -> id -> unit +val print_lvalue: formatter -> lvalue -> unit +val print_expr: formatter -> expr -> unit +val print_stat: string -> formatter -> stat -> unit +val print_block: string -> formatter -> stat ext list -> unit +val print_var_decl: formatter -> var_decl -> unit +val print_fun_decl: formatter -> fun_decl -> unit +val print_prog: formatter -> prog -> unit -- cgit v1.2.3