X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fcontent_pres%2FcicNotationParser.mli;h=ba9003e90619594f5edcf108edb85cd6a4542e7c;hb=2b837ca9e298eb44eee95d9ca0e331c577785dcb;hp=978daf9ff99c1ce6f304663e86cb1c202f7c191a;hpb=8d55798c22b29c00febc623234db5f57483c0401;p=helm.git diff --git a/helm/software/components/content_pres/cicNotationParser.mli b/helm/software/components/content_pres/cicNotationParser.mli index 978daf9ff..ba9003e90 100644 --- a/helm/software/components/content_pres/cicNotationParser.mli +++ b/helm/software/components/content_pres/cicNotationParser.mli @@ -26,10 +26,13 @@ exception Parse_error of string exception Level_not_found of int +type checked_l1_pattern = private CL1P of CicNotationPt.term * int + (** {2 Parsing functions} *) - (** concrete syntax pattern: notation level 1 *) -val parse_level1_pattern: Ulexing.lexbuf -> CicNotationPt.term + (** concrete syntax pattern: notation level 1, the + * integer is the precedence *) +val parse_level1_pattern: int -> Ulexing.lexbuf -> CicNotationPt.term (** AST pattern: notation level 2 *) val parse_level2_ast: Ulexing.lexbuf -> CicNotationPt.term @@ -39,10 +42,13 @@ val parse_level2_meta: Ulexing.lexbuf -> CicNotationPt.term 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 + val extend: - CicNotationPt.term -> (* level 1 pattern *) - precedence:int -> - associativity:Gramext.g_assoc -> + checked_l1_pattern -> (CicNotationEnv.t -> CicNotationPt.location -> CicNotationPt.term) -> rule_id @@ -51,14 +57,17 @@ val delete: rule_id -> unit (** {2 Grammar entries} * needed by grafite parser *) -val level2_ast_grammar: Grammar.g +val level2_ast_grammar: unit -> Grammar.g -val term : CicNotationPt.term Grammar.Entry.e +val term : unit -> CicNotationPt.term Grammar.Entry.e -val let_defs : - (CicNotationPt.capture_variable * CicNotationPt.term * int) list +val let_defs : unit -> + (CicNotationPt.term CicNotationPt.capture_variable list * CicNotationPt.term CicNotationPt.capture_variable * CicNotationPt.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 (** {2 Debugging} *) @@ -66,3 +75,5 @@ val parse_term: Ulexing.lexbuf -> CicNotationPt.term (** print "level2_pattern" entry on stdout, flushing afterwards *) val print_l2_pattern: unit -> unit +val push: unit -> unit +val pop: unit -> unit