X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite_parser%2FgrafiteParser.mli;h=d657e49752e2e23ac0e64dfcc2448cf6a12625a7;hb=a18562238677261e3d0b590e046290a14fe62e74;hp=f38f0e5dc3e4dde8a76ee9e95c5b5a141c94ad03;hpb=4db221ee87ba30f63db0ea32c98858041e8e6213;p=helm.git diff --git a/helm/software/components/grafite_parser/grafiteParser.mli b/helm/software/components/grafite_parser/grafiteParser.mli index f38f0e5dc..d657e4975 100644 --- a/helm/software/components/grafite_parser/grafiteParser.mli +++ b/helm/software/components/grafite_parser/grafiteParser.mli @@ -33,15 +33,26 @@ type ast_statement = CicNotationPt.term CicNotationPt.obj, string) GrafiteAst.statement -type statement = +exception NoInclusionPerformed of string (* full path *) + +type 'status 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 + (#LexiconEngine.status as 'status) -> + 'status * ast_statement localized_option + +val parse_statement: Ulexing.lexbuf -> #LexiconEngine.status statement (** @raise End_of_file *) -(* this callback is called on every lexicon command *) -val set_callback: (LexiconAst.command -> unit) -> unit +val statement: unit -> #LexiconEngine.status statement Grammar.Entry.e -val parse_statement: Ulexing.lexbuf -> statement (** @raise End_of_file *) +(* this callback is called before every grafite statement *) +val set_grafite_callback: + (ast_statement -> unit) -> unit -val statement: statement Grammar.Entry.e +(* this callback is called before every lexicon command *) +val set_lexicon_callback: + (LexiconAst.command -> unit) -> unit +val push : unit -> unit +val pop : unit -> unit