Commit 1fe030ba authored by Pietro Abate's avatar Pietro Abate
Browse files

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

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