]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/grafite_parser/grafiteParser.ml
let and let rec used wrong tokens
[helm.git] / matita / components / grafite_parser / grafiteParser.ml
index 6da952c7d2ada70e80cc973925c747d7d07a25fd..bdd65f34dd2ac2e8c8f56994e1246c526d776ac2 100644 (file)
@@ -28,8 +28,6 @@
 module N  = NotationPt
 module G  = GrafiteAst
 
-type ast_statement = G.statement
-
 let exc_located_wrapper f =
   try
     f ()
@@ -220,8 +218,9 @@ EXTEND
         G.NTactic(loc,[G.NCases (loc, what, where)])
     | IDENT "change"; what = pattern_spec; "with"; with_what = tactic_term -> 
         G.NTactic(loc,[G.NChange (loc, what, with_what)])
-    | SYMBOL "@"; num = OPT NUMBER; l = LIST0 tactic_term -> 
-        G.NTactic(loc,[G.NConstructor (loc, (match num with None -> None | Some x -> Some (int_of_string x)),l)])
+    | (*SYMBOL "^"*)PLACEHOLDER; num = OPT NUMBER; 
+       l = OPT [ SYMBOL "{"; l = LIST1 tactic_term; SYMBOL "}" -> l ] -> 
+        G.NTactic(loc,[G.NConstructor (loc, (match num with None -> None | Some x -> Some (int_of_string x)),match l with None -> [] | Some l -> l)])
     | IDENT "cut"; t = tactic_term -> G.NTactic(loc,[G.NCut (loc, t)])
 (*  | IDENT "discriminate"; t = tactic_term -> G.NDiscriminate (loc, t)
     | IDENT "subst"; t = tactic_term -> G.NSubst (loc, t) *)
@@ -536,9 +535,9 @@ EXTEND
       paramspec = OPT inverter_param_list ; 
       outsort = OPT [ SYMBOL ":" ; outsort = term -> outsort ] -> 
         G.NInverter (loc,name,indty,paramspec,outsort)
-    | NLETCOREC ; defs = let_defs -> 
+    | LETCOREC ; defs = let_defs -> 
         nmk_rec_corec `CoInductive defs loc
-    | NLETREC ; defs = let_defs -> 
+    | LETREC ; defs = let_defs -> 
         nmk_rec_corec `Inductive defs loc
     | IDENT "inductive"; spec = inductive_spec ->
         let (params, ind_types) = spec in
@@ -619,7 +618,7 @@ EXTEND
   statement
 ;;
 
-type db = ast_statement Grammar.Entry.e ;;
+type db = GrafiteAst.statement Grammar.Entry.e ;;
 
 class type g_status =
  object