]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite_parser/grafiteParser.mli
One-shot aliases were no longer generated because of a bug (i.e. all aliases
[helm.git] / helm / software / components / grafite_parser / grafiteParser.mli
index 6a1980011409c790625df02005b9cb17d70c26ae..d657e49752e2e23ac0e64dfcc2448cf6a12625a7 100644 (file)
 
 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
 
-val parse_statement: Ulexing.lexbuf -> statement  (** @raise End_of_file *)
+exception NoInclusionPerformed of string (* full path *)
 
-val statement: statement Grammar.Entry.e
+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