type rule_id = Grammar.token Gramext.g_symbol list
+let compare_rule_id x y =
+ let rec aux = function
+ | [],[] -> 0
+ | [],_ -> ~-1
+ | _,[] -> 1
+ | s1::tl1, s2::tl2 ->
+ if Gramext.eq_symbol s1 s2 then aux (tl1,tl2)
+ else
+ let d = List.length tl1 - List.length tl2 in
+ if d <> 0 then d else 1 (* bad and broken *)
+ in
+ aux (x,y)
+
(* mapping: rule_id -> owned keywords. (rule_id, string list) Hashtbl.t *)
let owned_keywords = Hashtbl.create 23
type rule_id
+val compare_rule_id : rule_id -> rule_id -> int
+
val check_l1_pattern: (* level1_pattern *)
CicNotationPt.term -> int -> Gramext.g_assoc -> checked_l1_pattern
and subst_magic pos env = function
| Ast.List0 (p, sep_opt)
| Ast.List1 (p, sep_opt) ->
+ prerr_endline "1";
let rec_decls = CicNotationEnv.declarations_of_term p in
+ prerr_endline "2";
let rec_values =
List.map (fun (n, _) -> CicNotationEnv.lookup_list env n) rec_decls
in
+ prerr_endline "3";
let values = CicNotationUtil.ncombine rec_values in
+ prerr_endline "4";
let sep =
match sep_opt with
| None -> []
| Some l -> [ Ast.Literal l; break; space ]
in
+ prerr_endline "5";
let rec instantiate_list acc = function
| [] -> List.rev acc
| value_set :: [] ->
| InterpretationId of TermAcicContent.interpretation_id
| PrettyPrinterId of TermContentPres.pretty_printer_id
+let compare_notation_id x y =
+ match x,y with
+ | RuleId i1, RuleId i2 -> CicNotationParser.compare_rule_id i1 i2
+ | RuleId _, _ -> ~-1
+ | _, RuleId _ -> 1
+ | x,y -> Pervasives.compare x y
+
let parser_ref_counter = RefCounter.create ()
let rule_ids_to_items = Hashtbl.create 113
type notation_id
+val compare_notation_id : notation_id -> notation_id -> int
+
val process_notation: LexiconAst.command -> notation_id list
val remove_notation: notation_id -> unit
module OrderedId =
struct
type t = CicNotation.notation_id
- let compare = Pervasives.compare
+ let compare = CicNotation.compare_notation_id
end
module IdSet = Set.Make (OrderedId)
--- /dev/null
+include ../Makefile.defs
+
+DIR=$(shell basename $$PWD)
+
+$(DIR) all:
+ $(BIN)matitac
+$(DIR).opt opt all.opt:
+ $(BIN)matitac.opt
+clean:
+ $(BIN)matitaclean
+clean.opt:
+ $(BIN)matitaclean.opt
+depend:
+ $(BIN)matitadep
+depend.opt:
+ $(BIN)matitadep.opt
(cic:/matita/PREDICATIVE-TOPOLOGY/class_defs/call.ind#xpointer(1/1) _ x).
notation > "hvbox(\xforall ident i opt (: ty) break . p)"
- right associative with precedence 20
+ with precedence 20
for @{ 'xforall ${default
@{\lambda ${ident i} : $ty. $p}
@{\lambda ${ident i} . $p}}}.
(cic:/matita/PREDICATIVE-TOPOLOGY/class_defs/call2.ind#xpointer(1/1) _ _ x y).
notation > "hvbox(\xforall ident i1 opt (: ty1) ident i2 opt (: ty2) break . p)"
- right associative with precedence 20
+ with precedence 20
for @{ 'xforall2 ${default
@{\lambda ${ident i1} : $ty1. \lambda ${ident i2} : $ty2. $p}
@{\lambda ${ident i1}, ${ident i2}. $p}}}.
--- /dev/null
+class_eq.ma class_defs.ma
+domain_defs.ma class_defs.ma
+coa_props.ma coa_defs.ma
+class_defs.ma logic/connectives.ma
+domain_data.ma datatypes/bool.ma datatypes/constructors.ma domain_defs.ma
+subset_defs.ma domain_defs.ma
+coa_defs.ma domain_data.ma iff.ma
+iff.ma ../../library/logic/connectives.ma
+../../library/logic/connectives.ma
+datatypes/bool.ma
+datatypes/constructors.ma
+logic/connectives.ma
+++ /dev/null
-H=@
-
-RT_BASEDIR=../../
-OPTIONS=-bench
-MMAKE=$(RT_BASEDIR)matitamake $(OPTIONS)
-CLEAN=$(RT_BASEDIR)matitaclean $(OPTIONS)
-MMAKEO=$(RT_BASEDIR)matitamake.opt $(OPTIONS)
-CLEANO=$(RT_BASEDIR)matitaclean.opt $(OPTIONS)
-
-devel:=$(shell basename `pwd`)
-
-all: preall
- $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) build $(devel)
-clean: preall
- $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) clean $(devel)
-cleanall: preall
- $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEAN) all
-
-all.opt opt: preall
- $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) build $(devel)
-clean.opt: preall
- $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) clean $(devel)
-cleanall.opt: preall
- $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MCLEANO) all
-
-%.mo: preall
- $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) $@
-%.mo.opt: preall
- $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKEO) $(@:.opt=)
-
-preall:
- $(H)MATITA_FLAGS=$(MATITA_FLAGS) $(MMAKE) init $(devel)
-
--- /dev/null
+baseuri=cic:/matita/PREDICATIVE-TOPOLOGY