Commit a014f905 authored by Pietro Abate's avatar Pietro Abate

[r2003-06-07 17:17:13 by cvscast] Benchmarks

Original author: cvscast
Date: 2003-06-07 17:17:13+00:00
parent 10e9d0d4
type Person = FPerson | MPerson type Person = FPerson | MPerson
type FPerson = <person gender = "F" >[ Name Children ] type FPerson = <person gender="F" >[ Name Children ]
type MPerson = <person gender="M">[ Name Children ] type MPerson = <person gender="M">[ Name Children ]
type Children = <children>[Person*] type Children = <children>[Person*]
type Name = <name>[ PCDATA ] type Name = <name>[ PCDATA ]
......
type Person = FPerson | MPerson type Person = FPerson | MPerson
type FPerson = <person gender = "F" >[ Name Children ] type FPerson = <person gender="F" >[ Name Children ]
type MPerson = <person gender="M">[ Name Children ] type MPerson = <person gender="M">[ Name Children ]
type Children = <children>[Person*] type Children = <children>[Person*]
type Name = <name>[ PCDATA ] type Name = <name>[ PCDATA ]
......
type Person = FPerson | MPerson type Person = FPerson | MPerson
type FPerson = <person gender = "F" >[ Name Children ] type FPerson = <person gender="F" >[ Name Children ]
type MPerson = <person gender="M">[ Name Children ] type MPerson = <person gender="M">[ Name Children ]
type Children = <children>[Person*] type Children = <children>[Person*]
type Name = <name>[ PCDATA ] type Name = <name>[ PCDATA ]
...@@ -24,7 +24,7 @@ let split_f (FPerson -> Woman) ...@@ -24,7 +24,7 @@ let split_f (FPerson -> Woman)
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 & MPerson -> split_m x | | <doc>(l & [Person*]) ->
x & FPerson -> split_f x) <doc>(map l with x & MPerson -> split_m x | x & FPerson -> split_f x)
| _ -> raise "Invalid document") | _ -> raise "Invalid document")
| _ -> raise "Invalid command line" | _ -> raise "Invalid command line"
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