]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite_parser/grafiteParser.ml
generalized is half-implemented (still broken)
[helm.git] / helm / software / components / grafite_parser / grafiteParser.ml
index 821d2909a65697d365ddfa7369b34dc6ec5b79e3..5fc3a7fad5148d03c5aee0328d9b3fd98ddbd234 100644 (file)
@@ -182,11 +182,21 @@ EXTEND
   using: [ [ using = OPT [ IDENT "using"; t = tactic_term -> t ] -> using ] ];
   ntactic: [
     [ IDENT "napply"; t = tactic_term -> GrafiteAst.NApply (loc, t)
+    | IDENT "ncases"; what = tactic_term ; where = pattern_spec ->
+        GrafiteAst.NCases (loc, what, where)
     | IDENT "nchange"; what = pattern_spec; "with"; with_what = tactic_term -> 
         GrafiteAst.NChange (loc, what, with_what)
     | IDENT "nelim"; what = tactic_term ; where = pattern_spec ->
         GrafiteAst.NElim (loc, what, where)
+    | IDENT "ngeneralize"; p=pattern_spec ->
+        GrafiteAst.NGeneralize (loc, p)
+    | IDENT "nrewrite"; dir = direction; what = tactic_term ; where = pattern_spec ->
+        GrafiteAst.NRewrite (loc, dir, what, where)
     | SYMBOL "#"; n=IDENT -> GrafiteAst.NIntro (loc,n)
+    | SYMBOL "#"; SYMBOL "_" -> GrafiteAst.NIntro (loc,"_")
+    | SYMBOL "*" -> GrafiteAst.NCase1 (loc,"_")
+    | SYMBOL "*"; n=IDENT ->
+        GrafiteAst.NCase1 (loc,n)
     ]
   ];
   tactic: [
@@ -749,6 +759,8 @@ EXTEND
     | punct = punctuation_tactical -> GrafiteAst.Tactic (loc, None, punct)
     | tac = ntactic; punct = punctuation_tactical ->
         GrafiteAst.NTactic (loc, tac, punct)
+    | SYMBOL "#" ; SYMBOL "#" ; punct = punctuation_tactical ->
+        GrafiteAst.NTactic (loc, GrafiteAst.NId loc, punct)
     | tac = non_punctuation_tactical; punct = punctuation_tactical ->
         GrafiteAst.NonPunctuationTactical (loc, tac, punct)
     | mac = macro; SYMBOL "." -> GrafiteAst.Macro (loc, mac)