]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/grafite_parser/grafiteParser.mli
notation kind of works
[helm.git] / matita / components / grafite_parser / grafiteParser.mli
index 98942e6850bc6e39020f14b07a2f35673125a68c..11fbccaed53b286e4c5363375be058a8c2c330b8 100644 (file)
@@ -29,26 +29,31 @@ type 'a localized_option =
 
 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 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
+
+val extend : #status as 'status ->
+           CicNotationParser.checked_l1_pattern ->
+           (NotationEnv.t -> NotationPt.location -> NotationPt.term) -> 'status
+
+
+ (* 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