X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fcontent_pres%2FcicNotationParser.mli;h=8f2311cf0da1af1879a16fc57d5f1e60fa8b1201;hb=56fb3c39cc9186ad2700b0ee8ca37f8d759c2376;hp=ba9003e90619594f5edcf108edb85cd6a4542e7c;hpb=2c01ff6094173915e7023076ea48b5804dca7778;p=helm.git diff --git a/matita/components/content_pres/cicNotationParser.mli b/matita/components/content_pres/cicNotationParser.mli index ba9003e90..8f2311cf0 100644 --- a/matita/components/content_pres/cicNotationParser.mli +++ b/matita/components/content_pres/cicNotationParser.mli @@ -26,54 +26,67 @@ exception Parse_error of string exception Level_not_found of int -type checked_l1_pattern = private CL1P of CicNotationPt.term * int +type db + +class type g_status = + object + method notation_parser_db: db + end + +class virtual status: keywords:string list -> + object('self) + inherit NCic.status + inherit g_status + method set_notation_parser_db: db -> 'self + method set_notation_parser_status: 'status. #g_status as 'status -> 'self + end + +type checked_l1_pattern = private CL1P of NotationPt.term * int + +val refresh_uri_in_checked_l1_pattern: + refresh_uri_in_term:(NCic.term -> NCic.term) -> + refresh_uri_in_reference:(NReference.reference -> NReference.reference) -> + checked_l1_pattern -> checked_l1_pattern (** {2 Parsing functions} *) (** concrete syntax pattern: notation level 1, the * integer is the precedence *) -val parse_level1_pattern: int -> Ulexing.lexbuf -> CicNotationPt.term +val parse_level1_pattern: #status -> int -> Ulexing.lexbuf -> NotationPt.term (** AST pattern: notation level 2 *) -val parse_level2_ast: Ulexing.lexbuf -> CicNotationPt.term -val parse_level2_meta: Ulexing.lexbuf -> CicNotationPt.term +val parse_level2_ast: #status -> Ulexing.lexbuf -> NotationPt.term +val parse_level2_meta: #status -> Ulexing.lexbuf -> NotationPt.term (** {2 Grammar extension} *) -type rule_id - -val compare_rule_id : rule_id -> rule_id -> int - val check_l1_pattern: (* level1_pattern, pponly, precedence, assoc *) - CicNotationPt.term -> bool -> int -> Gramext.g_assoc -> checked_l1_pattern + NotationPt.term -> bool -> int -> Gramext.g_assoc -> checked_l1_pattern val extend: + #status as 'status -> checked_l1_pattern -> - (CicNotationEnv.t -> CicNotationPt.location -> CicNotationPt.term) -> - rule_id - -val delete: rule_id -> unit + (NotationEnv.t -> NotationPt.location -> NotationPt.term) -> + 'status (** {2 Grammar entries} * needed by grafite parser *) -val level2_ast_grammar: unit -> Grammar.g +val level2_ast_grammar: #status -> Grammar.g -val term : unit -> CicNotationPt.term Grammar.Entry.e +val term : #status -> NotationPt.term Grammar.Entry.e -val let_defs : unit -> - (CicNotationPt.term CicNotationPt.capture_variable list * CicNotationPt.term CicNotationPt.capture_variable * CicNotationPt.term * int) list +val let_defs : #status -> + (NotationPt.term NotationPt.capture_variable list * NotationPt.term NotationPt.capture_variable * NotationPt.term * int) list + Grammar.Entry.e +val let_codefs : #status -> + (NotationPt.term NotationPt.capture_variable list * NotationPt.term NotationPt.capture_variable * NotationPt.term * int) list Grammar.Entry.e -val protected_binder_vars : unit -> - (CicNotationPt.term list * CicNotationPt.term option) Grammar.Entry.e - -val parse_term: Ulexing.lexbuf -> CicNotationPt.term +val protected_binder_vars : #status -> + (NotationPt.term list * NotationPt.term option) Grammar.Entry.e (** {2 Debugging} *) (** print "level2_pattern" entry on stdout, flushing afterwards *) -val print_l2_pattern: unit -> unit - -val push: unit -> unit -val pop: unit -> unit +val print_l2_pattern: #status -> unit