]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/acic_content/cicNotationPp.ml
notation with mstyle attributes, like colors and size
[helm.git] / helm / software / components / acic_content / cicNotationPp.ml
index 4f94fa742464fa6bd3787c3cd693de347c231587..29898eb13ace83196d7340d8f10ff653dc170cc6 100644 (file)
@@ -211,6 +211,7 @@ and pp_layout = function
   | Ast.Over (t1, t2) -> sprintf "[%s \\OVER %s]" (pp_term t1) (pp_term t2)
   | Ast.Atop (t1, t2) -> sprintf "[%s \\ATOP %s]" (pp_term t1) (pp_term t2)
   | Ast.Frac (t1, t2) -> sprintf "\\FRAC %s %s" (pp_term t1) (pp_term t2)
+  | Ast.InfRule (t1, t2, t3) -> sprintf "\\INFRULE %s %s %s" (pp_term t1) (pp_term t2) (pp_term t3)
   | Ast.Sqrt t -> sprintf "\\SQRT %s" (pp_term t)
   | Ast.Root (arg, index) ->
       sprintf "\\ROOT %s \\OF %s" (pp_term index) (pp_term arg)
@@ -221,6 +222,10 @@ and pp_layout = function
         (String.concat " " (List.map pp_term terms))
   | Ast.Group terms ->
       sprintf "\\GROUP [%s]" (String.concat " " (List.map pp_term terms))
+  | Ast.Mstyle (l,terms) -> 
+      sprintf "\\MSTYLE %s [%s]" 
+        (String.concat " " (List.map (fun (k,v) -> k^"="^v) l))
+        (String.concat " " (List.map pp_term terms))
 
 and pp_magic = function
   | Ast.List0 (t, sep_opt) ->
@@ -250,8 +255,8 @@ and pp_sep_opt = function
 and pp_variable = function
   | Ast.NumVar s -> "number " ^ s
   | Ast.IdentVar s -> "ident " ^ s
-  | Ast.TermVar (s,None) -> s
-  | Ast.TermVar (s,Some l) -> "term " ^string_of_int l 
+  | Ast.TermVar (s,Ast.Self _) -> s
+  | Ast.TermVar (s,Ast.Level l) -> "term " ^string_of_int l 
   | Ast.Ascription (t, n) -> assert false
   | Ast.FreshVar n -> "fresh " ^ n
 
@@ -328,8 +333,7 @@ let rec pp_value = function
 
 let rec pp_value_type =
   function
-  | Env.TermType None -> "Term"
-  | Env.TermType (Some l) -> "Term "^string_of_int l
+  | Env.TermType l -> "Term "^string_of_int l
   | Env.StringType -> "String"
   | Env.NumType -> "Number"
   | Env.OptType t -> "Maybe " ^ pp_value_type t