X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_notation%2FcicNotationParser.mli;h=d614c68bca4b1dedd997677480fefe15ccf748bd;hb=97c2d258a5c524eb5c4b85208899d80751a2c82f;hp=84ce24b1432584ed29ef77d1d0bb466bf552d9b0;hpb=879797d6505bc39489009d9ae1e2506022bde9e2;p=helm.git diff --git a/helm/ocaml/cic_notation/cicNotationParser.mli b/helm/ocaml/cic_notation/cicNotationParser.mli index 84ce24b14..d614c68bc 100644 --- a/helm/ocaml/cic_notation/cicNotationParser.mli +++ b/helm/ocaml/cic_notation/cicNotationParser.mli @@ -24,19 +24,43 @@ *) exception Parse_error of Token.flocation * string +exception Level_not_found of int (** {2 Parsing functions} *) -val parse_level1_pattern: char Stream.t -> unit -(*val parse_level2_pattern: char Stream.t -> unit*) + (** concrete syntax pattern: notation level 1 *) +val parse_level1_pattern: Ulexing.lexbuf -> CicNotationPt.term -(** {2 Grammar extensions} *) + (** AST pattern: notation level 2 *) +val parse_level2_ast: Ulexing.lexbuf -> CicNotationPt.term +val parse_level2_meta: Ulexing.lexbuf -> CicNotationPt.term -(*val term: CicAst.term Grammar.Entry.e |+* recursive rule +|*) -(*val term0: CicAst.term Grammar.Entry.e |+* top level rule +|*) +(** {2 Grammar extension} *) -(*val return_term: CicAst.location -> CicAst.term -> CicAst.term*) +type rule_id - (** raise a parse error *) -(*val fail: CicAst.location -> string -> 'a*) +val extend: + CicNotationPt.term -> (* level 1 pattern *) + precedence:int -> + associativity:Gramext.g_assoc -> + (CicNotationEnv.t -> CicNotationPt.location -> CicNotationPt.term) -> + rule_id + +val delete: rule_id -> unit + +(** {2 Grammar entries} + * needed by grafite parser *) + +val level2_ast_grammar: Grammar.g + +val term : CicNotationPt.term Grammar.Entry.e + +val let_defs : + (CicNotationPt.capture_variable * CicNotationPt.term * int) list + Grammar.Entry.e + +(** {2 Debugging} *) + + (** print "level2_pattern" entry on stdout, flushing afterwards *) +val print_l2_pattern: unit -> unit