X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matitaB%2Fcomponents%2Fcontent%2FnotationEnv.ml;h=6951760bf3a9fb18282db148041ee5c1fdd53262;hb=41b61472d2c475e0f69e3dfc85539da3ad2bac1e;hp=cca2e37998e197b2ca8416762524c918ade43746;hpb=6d4277977478ef9bcadaffbef3d4bb04ac0250a5;p=helm.git diff --git a/matitaB/components/content/notationEnv.ml b/matitaB/components/content/notationEnv.ml index cca2e3799..6951760bf 100644 --- a/matitaB/components/content/notationEnv.ml +++ b/matitaB/components/content/notationEnv.ml @@ -37,7 +37,10 @@ type value = | NumValue of string | OptValue of value option | ListValue of value list - | LocValue of Stdpp.location + (* optional name of Ast.Symbols that we want to contain the interpretation of this literal + * location of the literal we are parsing + * optional uri, optional desc *) + | DisambiguationValue of (string option * Stdpp.location * string option * string option) type value_type = | TermType of int (* the level of the expected term *) @@ -54,6 +57,21 @@ type declaration = string * value_type type binding = string * (value_type * value) type t = binding list +(* let rec pp_value = function + | TermValue t -> "T#" ^ NotationPp.pp_term (new NCicPp.status) t + | StringValue (Ident i) -> "I#" ^ i + | StringValue (Var v) -> "V#" ^ v + | NumValue n -> "N#" ^ n + | OptValue None -> "O#None" + | OptValue (Some v) -> "O#" ^ pp_value v + | ListValue vl -> "L#[" ^ (String.concat ";" (List.map pp_value vl)) ^ "]" + | DisambiguationValue _ -> "D#" + +let pp_binding = function + | s, (ty,v) -> Printf.sprintf "{ %s := %s : %s }" s (pp_value v) "..." + +let pp_env e = String.concat " " (List.map pp_binding e) *) + let lookup env name = try List.assoc name env