Commit 847b5f6a authored by Pietro Abate's avatar Pietro Abate

[r2002-11-15 22:40:12 by cvscast] Empty log message

Original author: cvscast
Date: 2002-11-15 22:40:12+00:00
parent 76ab1ffc
...@@ -27,7 +27,7 @@ let do_file s = ...@@ -27,7 +27,7 @@ let do_file s =
let input = Stream.of_channel chan in let input = Stream.of_channel chan in
let ok = Cduce.run ppf ppf_err input in let ok = Cduce.run ppf ppf_err input in
if s <> "" then close_in chan; if s <> "" then close_in chan;
if not ok then exit 1 if not ok then (Format.fprintf ppf_err "@."; exit 1)
...@@ -60,5 +60,4 @@ let main () = ...@@ -60,5 +60,4 @@ let main () =
let () = main () let () = main ()
<doc> <doc>
CDuce <note>Frisch, Castagna, Benzaken</note> is CDuce <note>Frisch, Castagna, Benzaken</note> is
an XML <note>a W3C standard</note>-friendly programming language. an XML <note>a W3C standard</note>-friendly programming language.
</doc> </doc>
\ No newline at end of file
type T = [ `A? `B? `C? `D? `E? `F? `G? `H? `I? `J? type T = [ `A? `B? `C? `D? `E? `F? `G? `H? `I? `J?
`K? `L? `M? `N? `O? `P? `Q? `R? ];; `K? `L? `M? `N? `O? `P? `Q? `R? ];;
let fun f (Any -> T) T & x -> x | x -> f x;;
(* (*
debug compile Any T;; debug compile Any T;;
*) *)
(*
debug compile T debug compile T
P1 where P1 where
P1 = (`A & (a := 1), P2) | (a := 2) & P2 and P1 = (`A & (a := 1), P2) | (a := 2) & P2 and
...@@ -12,6 +15,7 @@ P1 where ...@@ -12,6 +15,7 @@ P1 where
P3 = (`C & (c := 1), P4) | (c := 2) & P4 and P3 = (`C & (c := 1), P4) | (c := 2) & P4 and
P4 = (`D & (d := 1), P5) | (d := 2) & P5 and P4 = (`D & (d := 1), P5) | (d := 2) & P5 and
P5 = `nil;; P5 = `nil;;
*)
(* (*
match [ `A `B `C ] with (P1 where match [ `A `B `C ] with (P1 where
...@@ -20,4 +24,4 @@ match [ `A `B `C ] with (P1 where ...@@ -20,4 +24,4 @@ match [ `A `B `C ] with (P1 where
P3 = (`C & (c := 1), P4) | (c := 2) & P4 and P3 = (`C & (c := 1), P4) | (c := 2) & P4 and
P4 = (`D & (d := 1), P5) | (d := 2) & P5 and P4 = (`D & (d := 1), P5) | (d := 2) & P5 and
P5 = `nil) -> (a,b,c,d);; P5 = `nil) -> (a,b,c,d);;
*) *)
\ No newline at end of file
...@@ -376,7 +376,7 @@ This version explodes when dealing with ...@@ -376,7 +376,7 @@ This version explodes when dealing with
(t & t1, s - s1) | ... | (t & tn, s - sn) | (t - (t1|...|tn), s) (t & t1, s - s1) | ... | (t & tn, s - sn) | (t - (t1|...|tn), s)
*) *)
(*
let get_aux d = let get_aux d =
let accu = ref [] in let accu = ref [] in
let line (left,right) = let line (left,right) =
...@@ -398,7 +398,7 @@ This version explodes when dealing with ...@@ -398,7 +398,7 @@ This version explodes when dealing with
in in
List.iter line d; List.iter line d;
!accu !accu
*)
let get ?(kind=`Normal) d = let get ?(kind=`Normal) d =
match kind with match kind with
| `Normal -> get_aux d.times | `Normal -> get_aux d.times
......
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