*)
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_syntax_pattern: char Stream.t -> CicNotationPt.term
-(** {2 Grammar extensions} *)
+ (** AST pattern: notation level 2 *)
+val parse_ast_pattern: char Stream.t -> CicNotationPt.term
-(*val term: CicAst.term Grammar.Entry.e |+* recursive rule +|*)
-(*val term0: CicAst.term Grammar.Entry.e |+* top level rule +|*)
+ (** interpretation: notation level 3 *)
+val parse_interpretation: char Stream.t -> CicNotationPt.cic_appl_pattern
-(*val return_term: CicAst.location -> CicAst.term -> CicAst.term*)
+ (** top level phrases *)
+val parse_phrase: char Stream.t -> CicNotationPt.phrase
- (** raise a parse error *)
-(*val fail: CicAst.location -> string -> 'a*)
+(** {2 Grammar extension} *)
+
+type rule_id
+
+val extend:
+ CicNotationPt.term ->
+ ?precedence:int ->
+ ?associativity:Gramext.g_assoc ->
+ (CicNotationEnv.t -> CicNotationPt.location -> CicNotationPt.term) ->
+ rule_id
+
+val delete: rule_id -> unit
+
+(** {2 Standard precedences} *)
+
+val let_in_prec: int
+val binder_prec: int
+val apply_prec: int
+val simple_prec: int
+
+val let_in_assoc: Gramext.g_assoc
+val binder_assoc: Gramext.g_assoc
+val apply_assoc: Gramext.g_assoc
+val simple_assoc: Gramext.g_assoc
+
+(** {2 Debugging} *)
+
+ (** print "level2_pattern" entry on stdout, flushing afterwards *)
+val print_l2_pattern: unit -> unit