X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fcontent_pres%2FcicNotationParser.mli;h=8f2311cf0da1af1879a16fc57d5f1e60fa8b1201;hb=0bcf2dc1a27e38cb6cd3d44eb838d652926841e0;hp=c25ba1864f3b352a55ef979560556ad0a20290b0;hpb=8a660ee06d72cfee52c707bb1d8d8be3bab0d682;p=helm.git diff --git a/matita/components/content_pres/cicNotationParser.mli b/matita/components/content_pres/cicNotationParser.mli index c25ba1864..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 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 -> NotationPt.term +val parse_level1_pattern: #status -> int -> Ulexing.lexbuf -> NotationPt.term (** AST pattern: notation level 2 *) -val parse_level2_ast: Ulexing.lexbuf -> NotationPt.term -val parse_level2_meta: Ulexing.lexbuf -> NotationPt.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 *) NotationPt.term -> bool -> int -> Gramext.g_assoc -> checked_l1_pattern val extend: + #status as 'status -> checked_l1_pattern -> (NotationEnv.t -> NotationPt.location -> NotationPt.term) -> - rule_id - -val delete: rule_id -> unit + '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 -> NotationPt.term Grammar.Entry.e +val term : #status -> NotationPt.term Grammar.Entry.e -val let_defs : unit -> +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 -> +val protected_binder_vars : #status -> (NotationPt.term list * NotationPt.term option) Grammar.Entry.e -val parse_term: Ulexing.lexbuf -> NotationPt.term - (** {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