]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/test_parser.ml
snapshot
[helm.git] / helm / ocaml / cic_notation / test_parser.ml
index a8e2c45b0c6231901e2ce4fe131146609ad7cfd8..6cbb0ef2d5d8fd0b7f449331bd3faeed52c1c1d8 100644 (file)
@@ -40,33 +40,32 @@ let _ =
     let id =
       CicNotationParser.extend ~precedence:50 ~associativity:Gramext.LeftA
         (P.Layout (P.Box (P.H,
-          [ P.Literal (`Symbol "+");
+          [
+            P.Magic
+              (P.List0
+                (P.Layout (P.Box (P.H,
+                  [ P.Literal (`Symbol "|");
+                    P.Variable (P.TermVar "ugo");
+                    P.Magic (P.Opt (P.Layout (P.Box (P.H,
+                      [ P.Literal (`Symbol ",");
+                        P.Variable (P.TermVar "pino")]))));
+                    P.Literal (`Symbol "|");
+                  ])),
+                  Some (`Symbol ";")));
+(*             P.Literal (`Symbol "+");
             P.Magic (P.Opt (P.Layout (P.Box (P.H,
-              [ P.Variable (P.TermVar "ugo");
+              [
+                P.Variable (P.TermVar "ugo");
                 P.Literal (`Symbol "+");
                 P.Variable (P.TermVar "pino")
-              ]))));
-          ]
-(*           [ P.Variable (P.TermVar "a");
+              ])))); *)
+(*           P.Variable (P.TermVar "a");
             P.Literal (`Symbol "+");
-            P.Variable (P.TermVar "b");
-          ] *)
-            )))
+            P.Variable (P.TermVar "b"); *)
+          ])))
         (fun env _ ->
-          begin
           prerr_endline "reducing rule" ;
           prerr_endline (sprintf "env = [ %s ]" (CicNotationParser.pp_env env));
-(*           match env with
-          [(_, (_, P.OptValue v))] ->
-              begin
-                match v with
-                | Some x ->
-                    printf "Ugo c'e'? %s\n" (CicNotationParser.pp_value x);
-                    flush stdout
-                | None  -> prerr_endline "nooooo"
-              end
-           | _ -> assert false *)
-          end ;
           P.Sort `Prop)
     in
     CicNotationParser.print_l2_pattern ()