b = binder_low; (vars, typ) = binder_vars; SYMBOL "."; body = term ->
let binder = mk_binder_ast b typ vars body in
return_term loc binder
- | t1 = term; SYMBOL <:unicode<to>> (* → *); t2 = term ->
- return_term loc (CicAst.Binder (`Pi, (Cic.Anonymous, Some t1), t2))
]
| "logic_add" LEFTA [ (* nothing here by default *) ]
| "logic_mult" LEFTA [ (* nothing here by default *) ]
b = binder_high; (vars, typ) = binder_vars; SYMBOL "."; body = term ->
let binder = mk_binder_ast b typ vars body in
return_term loc binder
+ | t1 = term; SYMBOL <:unicode<to>> (* → *); t2 = term ->
+ return_term loc (CicAst.Binder (`Pi, (Cic.Anonymous, Some t1), t2))
]
| "simple" NONA
[ sort = sort -> CicAst.Sort sort
let pp_tactical = TacticAst2Box.tacticalPp
+let modes = ("term",`Term) :: ("statement",`Statement) :: []
+
let mode =
try
- match Sys.argv.(1) with
- | "term" -> prerr_endline "Term"; `Term
- | "statement" -> prerr_endline "Statement"; `Statement
-(* | "script" -> prerr_endline "Script"; `Script *)
- | _ ->
- prerr_endline "What???????";
- exit 1
- with Invalid_argument _ -> prerr_endline "Term"; `Term
+ List.assoc (Sys.argv.(1)) modes
+ with
+ | _ ->
+ prerr_endline
+ (sprintf "What? Supported modes are: %s\n"
+ (String.concat " " (List.map fst modes)));
+ exit 1
let _ =
(*
print_endline (BoxPp.pp_term term)
| `Statement ->
(match CicTextualParser2.parse_statement istream with
- | TacticAst.Command (_, cmd) ->
- print_endline (TacticAstPp.pp_command cmd)
- | TacticAst.Tactical (_, tac) ->
- print_endline (TacticAstPp.pp_tactical tac))
+ | TacticAst.Executable (_, exe)
+ | TacticAst.Comment (_,TacticAst.Code (_, exe)) ->
+ print_endline (TacticAstPp.pp_executable exe)
+ | TacticAst.Comment (_,TacticAst.Note (_, note)) ->
+ print_endline note)
(*
| `Tactical ->
let tac = CicTextualParser2.parse_tactical istream in