Commit 711a1c12 authored by Pietro Abate's avatar Pietro Abate

[r2004-07-16 09:16:50 by afrisch] Empty log message

Original author: afrisch
Date: 2004-07-16 09:16:51+00:00
parent c696f7ae
......@@ -11,7 +11,7 @@ let mkTelbook ([Person*] -> [<entry>[Name Tel] *])
| [] -> []
match argv with
match argv [] with
| [ f ] ->
(match load_xml f with
| <addrbook>(x & [Person*]) -> mkTelbook x
......
......@@ -10,7 +10,7 @@ let mkTelbook ([Person*] -> [<entry>[Name Tel] *])
| [] -> []
match argv with
match argv [] with
| [ f ] ->
(match load_xml f with
| <addrbook>(x & [Person*]) -> mkTelbook x
......
......@@ -11,8 +11,6 @@ let mkTelbook (l : [Person*]) : [<entry>[Name Tel] *] =
match argv [] with
| [ f ] ->
(match load_xml f with
| <addrbook>(x & [Person*]) ->
let x = <addrbook>(mkTelbook x) in
print (print_xml x)
| <addrbook>(x & [Person*]) -> <addrbook>(mkTelbook x)
| _ -> raise "Invalid document")
| _ -> raise "Invalid command line"
......@@ -7,7 +7,7 @@ type Email = <email>String
let mkTelbook (l : [Person*]) : [<entry>[Name Tel] *] =
transform l with <_>[ n (t & <tel>_) ; _ ] -> [ <entry>[n t] ]
match argv with
match argv [] with
| [ f ] ->
(match load_xml f with
| <addrbook>(x & [Person*]) -> mkTelbook x
......
......@@ -53,10 +53,10 @@ let langs =
"CDuce", ".cd",
(fun script xml ->
sp "%s --quiet %s --arg %s" cduce_cmd script xml);
"CDuce.old", ".cd",
sp "%s %s --no ocaml --arg %s" cduce_cmd script xml);
(* "CDuce.old", ".cd",
(fun script xml ->
sp "%s --quiet %s --arg %s" (cduce_cmd^".old") script xml);
sp "%s --quiet %s --arg %s" (cduce_cmd^".old") script xml);*)
"XDuce 0.4.0", ".q",
(fun script xml ->
......@@ -81,7 +81,7 @@ let rep = 3
let time s =
let s = sp "%s -p %s 2>&1" time_cmd s in
(* pr "Running: %s\n" s; *)
(* pr "Running: %s\n" s; *)
flush stdout;
for i = 1 to rep do
let ic = Unix.open_process_in s in
......@@ -112,7 +112,7 @@ let () =
let ic = open_in fn in
let size = in_channel_length ic in
close_in ic;
pr "XML size = %i\n" size;
pr "XML size = %i; records = %i\n" size s;
List.iter
(fun (lang, ext, cmd) ->
List.iter
......
......@@ -16,6 +16,6 @@ let split (MPerson -> Man ; FPerson -> Woman)
let d = map fc with x -> split x in
<(tag) name=n>[ <sons>s <daughters>d ]
match argv with
match argv [] with
| [ f ] -> load_xml f
| _ -> raise "Invalid command line"
......@@ -16,7 +16,7 @@ let split (MPerson -> Man ; FPerson -> Woman)
let d = map fc with x -> split x in
<(tag) name=n>[ <sons>s <daughters>d ]
match argv with
match argv [] with
| [ f ] ->
(match load_xml f with
| <doc>(l & [Person*]) -> <doc>(map l with x -> split x)
......
......@@ -16,7 +16,7 @@ let split (MPerson -> Man ; FPerson -> Woman)
let d = map fc with x -> split x in
<(tag) name=n>[ <sons>s <daughters>d ]
match argv with
match argv [] with
| [ f ] ->
(match load_xml f with
| <doc>(l & [Person*]) -> <doc>(map l with x -> split x)
......
......@@ -21,7 +21,7 @@ let split_f (FPerson -> Woman)
let d = map fc with x -> split_f x in
<woman name=n>[ <sons>s <daughters>d ]
match argv with
match argv [] with
| [ f ] ->
(match load_xml f with
| <doc>(l & [Person*]) ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment