X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite_parser%2FgrafiteParser.mli;h=1413e93fd97409b96518496a0fcf993d61007fe7;hb=8ae1653eb75d2b57c50e077c49cb9d078313ea9d;hp=f8754df0c4715f14c098e9072310e7d53be25a86;hpb=a9cf292e7e406a8a2cd88b8f5f84ff2d59bea5e4;p=helm.git diff --git a/helm/software/components/grafite_parser/grafiteParser.mli b/helm/software/components/grafite_parser/grafiteParser.mli index f8754df0c..1413e93fd 100644 --- a/helm/software/components/grafite_parser/grafiteParser.mli +++ b/helm/software/components/grafite_parser/grafiteParser.mli @@ -33,14 +33,26 @@ type ast_statement = 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 before every grafite statement *) +val set_grafite_callback: + (LexiconEngine.status -> ast_statement -> unit) -> unit + +(* this callback is called before every lexicon command *) +val set_lexicon_callback: + (LexiconEngine.status -> LexiconAst.command -> unit) -> unit -(* this callback is called on every include command *) -val set_callback: (string -> unit) -> unit +val push : unit -> unit +val pop : unit -> unit