X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fgrafite_parser%2FgrafiteParser.mli;h=dc39ab3166773c107124bd9fbfb13e94409ab283;hb=cd664aefb80554952ed9b010f0c5199ce3a6f8f2;hp=d657e49752e2e23ac0e64dfcc2448cf6a12625a7;hpb=2c01ff6094173915e7023076ea48b5804dca7778;p=helm.git diff --git a/matita/components/grafite_parser/grafiteParser.mli b/matita/components/grafite_parser/grafiteParser.mli index d657e4975..dc39ab316 100644 --- a/matita/components/grafite_parser/grafiteParser.mli +++ b/matita/components/grafite_parser/grafiteParser.mli @@ -27,32 +27,28 @@ type 'a localized_option = LSome of 'a | LNone of GrafiteAst.loc -type ast_statement = - (CicNotationPt.term, CicNotationPt.term, - CicNotationPt.term GrafiteAst.reduction, - CicNotationPt.term CicNotationPt.obj, string) - 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 ast_statement = GrafiteAst.statement + +type db + +class type g_status = + object + inherit LexiconTypes.g_status + method parser_db: db + end + +class status : + object('self) + inherit LexiconTypes.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