type 'a localized_option =
LSome of 'a
- | LNone of Token.flocation
+ | LNone of GrafiteAst.loc
-type statement =
- include_paths:string list ->
- LexiconEngine.status ->
- LexiconEngine.status *
+type ast_statement =
(CicNotationPt.term, CicNotationPt.term,
- CicNotationPt.term GrafiteAst.reduction, CicNotationPt.obj, string)
- GrafiteAst.statement localized_option
+ CicNotationPt.term GrafiteAst.reduction,
+ CicNotationPt.term CicNotationPt.obj, string)
+ GrafiteAst.statement
+
+exception NoInclusionPerformed of string (* full path *)
+
+type statement =
+ ?never_include:bool ->
+ (* do not call LexiconEngine to do includes, always raise NoInclusionPerformed *)
+ include_paths:string list ->
+ LexiconEngine.status ->
+ LexiconEngine.status * ast_statement localized_option
val parse_statement: Ulexing.lexbuf -> statement (** @raise End_of_file *)
-val statement: statement Grammar.Entry.e
+val statement: unit -> statement Grammar.Entry.e
+
+(* this callback is called on every include command *)
+val set_callback: (string -> unit) -> unit
+val push : unit -> unit
+val pop : unit -> unit