Commit ee13504e authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2002-10-20 19:55:49 by cvscast] Empty log message

Original author: cvscast
Date: 2002-10-20 19:56:58+00:00
parent 61469d50
DEBUG = -g
OCAMLC = ocamlcp -p a
PARSER = parser/location.cmo parser/ast.cmo parser/parser.cmo
TYPING = typing/typed.cmo typing/typer.cmo
......@@ -24,14 +27,14 @@ INCLUDES = -I +camlp4 -I parser -I types -I typing
SYNTAX_PARSER = -pp 'camlp4o pa_extend.cmo'
all.cma: $(OBJECTS)
ocamlc -g -o all.cma -I +camlp4 gramlib.cma nums.cma -a $(OBJECTS)
$(OCAMLC) $(DEBUG) -o all.cma -I +camlp4 gramlib.cma nums.cma -a $(OBJECTS)
all.cmxa: $(XOBJECTS)
ocamlopt -o all.cmxa -I +camlp4 -a $(XOBJECTS)
ocamlopt -a -o all.cmxa $(XOBJECTS)
cduce: all.cma $(DRIVER)
ocamlc -g -o cduce all.cma $(DRIVER)
$(OCAMLC) $(DEBUG) -o cduce all.cma $(DRIVER)
cduce.opt: all.cmxa $(XDRIVER)
ocamlopt -o cduce.opt -I +camlp4 gramlib.cmxa nums.cmxa all.cmxa $(XDRIVER)
......@@ -54,12 +57,12 @@ clean:
.SUFFIXES: .ml .mli .cmo .cmi .cmx
.ml.cmo:
ocamlc -g -c $(SYNTAX_PARSER) $(INCLUDES) $<
$(OCAMLC) $(DEBUG) -c $(SYNTAX_PARSER) $(INCLUDES) $<
.ml.cmx:
ocamlopt -c $(SYNTAX_PARSER) $(INCLUDES) $<
.mli.cmi:
ocamlc -g -c $(INCLUDES) $<
$(OCAMLC) $(DEBUG) -c $(INCLUDES) $<
# FORTPATH = /users/formel8/frisch/solaris/fort/fort
FORTPATH = /home/frisch/fort
......
......@@ -8,9 +8,9 @@ let () =
Builtin.types
let input = if (Array.length argv > 2) or
let input = if Array.length argv = 1 then (Stream.of_channel stdin)
else if (Array.length argv > 2) or
not (file_exists (Array.get argv 1)) then raise(Usage () )
else if Array.length argv = 1 then (Stream.of_channel stdin)
else (Stream.of_channel (open_in (Array.get argv 1)))
let ppf = Format.std_formatter
......@@ -49,7 +49,7 @@ let phrase ph =
| Ast.EvalStatement e ->
let (fv,e) = Typer.expr e in
let t = Typer.type_check Typer.Env.empty e Types.any true in
Format.fprintf ppf "%a@\n" Types.Print.print_descr t;
Format.fprintf ppf "%a@\n" Types.Print.print_descr t
| Ast.TypeDecl _ -> ()
| _ -> assert false
......
......@@ -13,6 +13,36 @@ type Tel = <tel>[String];;
<name>["Peter Buneman"]
<addr>["Scotland"]
];;
<addrbook>[
<name>["Haruo Hosoya"]
<addr>["Tokyo"]
<name>["Benjamin Pierce"]
<addr>["Philadelphia"]
<tel>["123-456-789"]
<name>["Peter Buneman"]
<addr>["Scotland"]
];;
<addrbook>[
<name>["Haruo Hosoya"]
<addr>["Tokyo"]
<name>["Benjamin Pierce"]
<addr>["Philadelphia"]
<tel>["123-456-789"]
<name>["Peter Buneman"]
<addr>["Scotland"]
];;
<addrbook>[
<name>["Haruo Hosoya"]
<addr>["Tokyo"]
<name>["Benjamin Pierce"]
<addr>["Philadelphia"]
<tel>["123-456-789"]
<name>["Peter Buneman"]
<addr>["Scotland"]
];;
(*
(* converting an address book into a telephone list *)
......@@ -53,3 +83,5 @@ match <addrbook>[
(* the pattern extract the full sequence of subelements *)
match ex with addrbook:[;a] -> mkTelList a;;
*)
*)
......@@ -281,7 +281,7 @@ let is_empty d =
let old = !memo in
let r = empty_rec d in
if not r then memo := old;
(* cache_false := Assumptions.empty; *)
(* cache_false := Assumptions.empty; *)
r
let non_empty d =
......
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