X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite%2FgrafiteAstPp.ml;h=fea47d15ba12df4e956c2ce291b778c0e2393ca7;hb=2c4dd8bdb55dff0c590ee6abd94aab0e7417c626;hp=f51cd0bcaf81ba03f5d57d7f51e732d36a78d757;hpb=36014ac060f150e7d93f607c914a0b06239715c0;p=helm.git diff --git a/helm/software/components/grafite/grafiteAstPp.ml b/helm/software/components/grafite/grafiteAstPp.ml index f51cd0bca..fea47d15b 100644 --- a/helm/software/components/grafite/grafiteAstPp.ml +++ b/helm/software/components/grafite/grafiteAstPp.ml @@ -33,7 +33,7 @@ let tactical_terminator = "" let tactic_terminator = tactical_terminator let command_terminator = tactical_terminator -let pp_idents idents = "[" ^ String.concat "; " idents ^ "]" +let pp_idents idents = "(" ^ String.concat " " idents ^ ")" let pp_reduction_kind ~term_pp = function | `Normalize -> "normalize" @@ -193,6 +193,13 @@ let pp_arg ~term_pp arg = let pp_macro ~term_pp = let term_pp = pp_arg ~term_pp in + let style_pp = function + | Declarative -> "" + | Procedural -> "procedural " + in + let prefix_pp prefix = + if prefix = "" then "" else sprintf " \"%s\"" prefix + in function (* Whelp *) | WInstance (_, term) -> "whelp instance " ^ term_pp term @@ -203,8 +210,8 @@ let pp_macro ~term_pp = (* real macros *) | Check (_, term) -> sprintf "check %s" (term_pp term) | Hint _ -> "hint" - | Inline (_, suri, "") -> sprintf "inline \"%s\"" suri - | Inline (_, suri, prefix) -> sprintf "inline \"%s\" \"%s\"" suri prefix + | Inline (_, style, suri, prefix) -> + sprintf "inline %s\"%s\"%s" (style_pp style) suri (prefix_pp prefix) let pp_associativity = function | Gramext.LeftA -> "left associative" @@ -291,9 +298,10 @@ let pp_executable ~term_pp ~lazy_term_pp ~obj_pp = let pp_comment ~term_pp ~lazy_term_pp ~obj_pp = function - | Note (_,str) -> sprintf "(* %s *)" str + | Note (_,"") -> sprintf "\n" + | Note (_,str) -> sprintf "(* %s *)\n" str | Code (_,code) -> - sprintf "(** %s. **)" (pp_executable ~term_pp ~lazy_term_pp ~obj_pp code) + sprintf "(** %s. **)\n" (pp_executable ~term_pp ~lazy_term_pp ~obj_pp code) let pp_statement ~term_pp ~lazy_term_pp ~obj_pp = function