]> matita.cs.unibo.it Git - helm.git/blobdiff - components/grafite_parser/grafiteParser.ml
libraryclean fixed to eradicate files generated from .ma files that do not
[helm.git] / components / grafite_parser / grafiteParser.ml
index f99573b30ccf3840f3444f8c509e1b98a751efc0..fadecd61e9e76825b355cfb2acdb541a436fd129 100644 (file)
@@ -231,6 +231,17 @@ EXTEND
         GrafiteAst.Symmetry loc
     | IDENT "transitivity"; t = tactic_term ->
         GrafiteAst.Transitivity (loc, t)
+     (* Produzioni Aggiunte *)
+    | IDENT "assume" ; id = IDENT ; SYMBOL ":" ; t = tactic_term ->
+        GrafiteAst.Assume (loc, id, t)
+    | IDENT "suppose" ; t = tactic_term ; LPAREN ; id = IDENT ; RPAREN ->
+        GrafiteAst.Suppose (loc, t, id)
+    | IDENT "by" ; t = tactic_term ; IDENT "we" ; IDENT "proved" ; ty = tactic_term ; LPAREN ; id = IDENT ; RPAREN ->
+        GrafiteAst.By_term_we_proved (loc, t, ty, id)
+    | IDENT "we" ; IDENT "need" ; "to" ; IDENT "prove" ; t = tactic_term ; LPAREN ; id = IDENT ; RPAREN ->
+        GrafiteAst.We_need_to_prove (loc, t, id)
+    | IDENT "by" ; t = tactic_term ; IDENT "done" ->
+        GrafiteAst.Bydone (loc, t)
     ]
   ];
   atomic_tactical:
@@ -332,13 +343,7 @@ EXTEND
   ] ];
   
   macro: [
-    [ [ IDENT "quit"  ] -> GrafiteAst.Quit loc
-(*     | [ IDENT "abort" ] -> GrafiteAst.Abort loc *)
-(*     | [ IDENT "undo"   ]; steps = OPT NUMBER ->
-        GrafiteAst.Undo (loc, int_opt steps)
-    | [ IDENT "redo"   ]; steps = OPT NUMBER ->
-        GrafiteAst.Redo (loc, int_opt steps) *)
-    | [ IDENT "check"   ]; t = term ->
+    [ [ IDENT "check"   ]; t = term ->
         GrafiteAst.Check (loc, t)
     | [ IDENT "hint" ] -> GrafiteAst.Hint loc
     | [ IDENT "whelp"; "match" ] ; t = term -> 
@@ -351,7 +356,6 @@ EXTEND
         GrafiteAst.WElim (loc, t)
     | [ IDENT "whelp"; IDENT "hint" ] ; t = term -> 
         GrafiteAst.WHint (loc,t)
-    | [ IDENT "print" ]; name = QSTRING -> GrafiteAst.Print (loc, name)
     ]
   ];
   alias_spec: [
@@ -539,15 +543,18 @@ EXTEND
        fun ~include_paths status -> status,LSome (GrafiteAst.Comment (loc, com))
     | (iloc,fname,mode) = include_command ; SYMBOL "."  ->
        fun ~include_paths status ->
-        let path = DependenciesParser.baseuri_of_script ~include_paths fname in
+        let buri, fullpath = 
+          DependenciesParser.baseuri_of_script ~include_paths fname 
+        in
         let status =
-         LexiconEngine.eval_command status (LexiconAst.Include (iloc,path,mode))
+         LexiconEngine.eval_command status 
+           (LexiconAst.Include (iloc,buri,mode,fullpath))
         in
          status,
           LSome
           (GrafiteAst.Executable
            (loc,GrafiteAst.Command
-            (loc,GrafiteAst.Include (iloc,path))))
+            (loc,GrafiteAst.Include (iloc,buri))))
     | scom = lexicon_command ; SYMBOL "." ->
        fun ~include_paths status ->
         let status = LexiconEngine.eval_command status scom in