X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fgrafite_parser%2FgrafiteParser.mli;h=4e4b035abdca243abfd2d2f9baf5305ca4e0b1f6;hb=f3f6b451707a3feb8245717e3fa7ca25df0ce8ef;hp=2dc83319497c54e904e91b3fddf1667afe624743;hpb=8a660ee06d72cfee52c707bb1d8d8be3bab0d682;p=helm.git diff --git a/matita/components/grafite_parser/grafiteParser.mli b/matita/components/grafite_parser/grafiteParser.mli index 2dc833194..4e4b035ab 100644 --- a/matita/components/grafite_parser/grafiteParser.mli +++ b/matita/components/grafite_parser/grafiteParser.mli @@ -27,32 +27,30 @@ type 'a localized_option = LSome of 'a | LNone of GrafiteAst.loc -type ast_statement = - (NotationPt.term, NotationPt.term, - NotationPt.term GrafiteAst.reduction, - NotationPt.term NotationPt.obj, string) - GrafiteAst.statement +type ast_statement = GrafiteAst.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 as 'status) -> - 'status * ast_statement localized_option - -val parse_statement: Ulexing.lexbuf -> #LexiconEngine.status statement (** @raise End_of_file *) - -val statement: unit -> #LexiconEngine.status statement Grammar.Entry.e - -(* this callback is called before every grafite statement *) -val set_grafite_callback: - (ast_statement -> unit) -> unit - -(* this callback is called before every lexicon command *) -val set_lexicon_callback: - (LexiconAst.command -> unit) -> unit - -val push : unit -> unit -val pop : unit -> unit +type db + +class type g_status = + object + inherit LexiconEngine.g_status + method parser_db: db + end + +class status : + object('self) + inherit LexiconEngine.status + method parser_db : db + method set_parser_db : db -> 'self + method set_parser_status : 'status. #g_status as 'status -> 'self + end + + (* never_include: do not call LexiconEngine to do includes, + * always raise NoInclusionPerformed *) +(** @raise End_of_file *) +val parse_statement: + #status -> + Ulexing.lexbuf -> + ast_statement localized_option