let id =
CicNotationParser.extend ~precedence:50 ~associativity:Gramext.LeftA
(P.Layout (P.Box (P.H,
- [ P.Literal (`Symbol "+");
- P.Magic (P.Opt (P.Variable (P.TermVar "ugo"))) ]
-(* [ P.Variable (P.TermVar "a");
+ [
+ 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.Literal (`Symbol "+");
+ P.Variable (P.TermVar "pino")
+ ])))); *)
+(* 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
- [(x, (_, P.OptValue v))] ->
- begin
- match v with
- Some _ -> Printf.printf "Ugo c'e'? %s\n" x; flush stdout
- | None -> prerr_endline "nooooo"
- end
- | _ -> assert false *)
- end ;
P.Sort `Prop)
in
CicNotationParser.print_l2_pattern ()