Commit dc9512b3 authored by Pietro Abate's avatar Pietro Abate

[r2005-02-14 20:28:23 by afrisch] Empty log message

Original author: afrisch
Date: 2005-02-14 20:28:24+00:00
parent c5f22069
......@@ -81,13 +81,14 @@ cduce_lib.cma:
$(HIDE)$(MAKE) NATIVE=false $@
endif
install: all install_lib install_doc
$(HIDE)mkdir -p $(BINDIR)
$(HIDE)mkdir -p $(MANDIR)/man1
install: all install_bin install_lib install_doc
install_bin:
@echo "Install binaries"
$(HIDE)mkdir -p $(BINDIR)
$(HIDE)$(INSTALL) -m755 cduce$(EXE) dtd2cduce$(EXE) \
validate$(EXE) cdo2ml$(EXE) $(BINDIR)/
$(HIDE)(cd doc; $(MAKE) install INSTALL=$(INSTALL) MANDIR=$(MANDIR) HIDE=$(HIDE))
install_lib:
@echo "Build META"
......@@ -322,6 +323,8 @@ web/xhtml.cdo: cduce web/xhtml.cd
./cduce -I web/ --compile web/xhtml.cd
install_doc: doc
$(HIDE)mkdir -p $(MANDIR)/man1
$(HIDE)(cd doc; $(MAKE) install INSTALL=$(INSTALL) MANDIR=$(MANDIR) HIDE=$(HIDE))
mkdir -p $(DOCDIR)/img
cp web/doc/*.html $(DOCDIR)/
cp CHANGES INSTALL INSTALL.WIN32 README AUTHORS LICENSE $(DOCDIR)/
......
......@@ -258,11 +258,11 @@ runtime/system.cmo: types/atoms.cmi types/builtin.cmi types/builtin_defs.cmi \
runtime/system.cmx: types/atoms.cmx types/builtin.cmx types/builtin_defs.cmx \
types/ident.cmx parser/location.cmx compile/operators.cmx \
types/sequence.cmx types/types.cmx runtime/value.cmx
ocamliface/mltypes.cmo: driver/config.cmi types/ident.cmo \
driver/librarian.cmi parser/location.cmi types/types.cmi \
ocamliface/mltypes.cmo: ocamliface/asttypes.cmo driver/config.cmi \
types/ident.cmo driver/librarian.cmi parser/location.cmi types/types.cmi \
ocamliface/mltypes.cmi
ocamliface/mltypes.cmx: driver/config.cmx types/ident.cmx \
driver/librarian.cmx parser/location.cmx types/types.cmx \
ocamliface/mltypes.cmx: ocamliface/asttypes.cmx driver/config.cmx \
types/ident.cmx driver/librarian.cmx parser/location.cmx types/types.cmx \
ocamliface/mltypes.cmi
ocamliface/mlstub.cmo: types/atoms.cmi types/builtin_defs.cmi \
compile/compile.cmi driver/config.cmi types/externals.cmi types/ident.cmo \
......@@ -275,9 +275,9 @@ ocamliface/mlstub.cmx: types/atoms.cmx types/builtin_defs.cmx \
misc/ns.cmx types/sequence.cmx typing/typer.cmx types/types.cmx \
ocamliface/mlstub.cmi
runtime/cduce_pxp.cmo: driver/config.cmi runtime/load_xml.cmi \
parser/location.cmi parser/url.cmi
parser/location.cmi parser/url.cmi runtime/cduce_pxp.cmi
runtime/cduce_pxp.cmx: driver/config.cmx runtime/load_xml.cmx \
parser/location.cmx parser/url.cmx
parser/location.cmx parser/url.cmx runtime/cduce_pxp.cmi
query/query_aggregates.cmo: types/builtin_defs.cmi types/intervals.cmi \
compile/operators.cmi types/sequence.cmi runtime/value.cmi
query/query_aggregates.cmx: types/builtin_defs.cmx types/intervals.cmx \
......@@ -320,11 +320,11 @@ tools/validate.cmo: schema/schema_common.cmi schema/schema_parser.cmi \
schema/schema_types.cmi
tools/validate.cmx: schema/schema_common.cmx schema/schema_parser.cmx \
schema/schema_types.cmx
ocamliface/mltypes.cmo: driver/config.cmi types/ident.cmo \
driver/librarian.cmi parser/location.cmi types/types.cmi \
ocamliface/mltypes.cmo: ocamliface/asttypes.cmo driver/config.cmi \
types/ident.cmo driver/librarian.cmi parser/location.cmi types/types.cmi \
ocamliface/mltypes.cmi
ocamliface/mltypes.cmx: driver/config.cmx types/ident.cmx \
driver/librarian.cmx parser/location.cmx types/types.cmx \
ocamliface/mltypes.cmx: ocamliface/asttypes.cmx driver/config.cmx \
types/ident.cmx driver/librarian.cmx parser/location.cmx types/types.cmx \
ocamliface/mltypes.cmi
ocamliface/mlstub.cmo: types/atoms.cmi types/builtin_defs.cmi \
compile/compile.cmi driver/config.cmi types/externals.cmi types/ident.cmo \
......@@ -343,9 +343,9 @@ parser/cduce_netclient.cmo: driver/config.cmi parser/location.cmi \
parser/cduce_netclient.cmx: driver/config.cmx parser/location.cmx \
parser/url.cmx
runtime/cduce_expat.cmo: driver/config.cmi runtime/load_xml.cmi \
parser/location.cmi parser/url.cmi
parser/location.cmi parser/url.cmi runtime/cduce_expat.cmi
runtime/cduce_expat.cmx: driver/config.cmx runtime/load_xml.cmx \
parser/location.cmx parser/url.cmx
parser/location.cmx parser/url.cmx runtime/cduce_expat.cmi
query/query_run.cmo: driver/cduce.cmi query/query.cmi
query/query_run.cmx: driver/cduce.cmx query/query.cmx
misc/pool.cmi: misc/custom.cmo
......@@ -399,8 +399,8 @@ types/builtin.cmi: typing/typer.cmi runtime/value.cmi
driver/librarian.cmi: compile/compile.cmi types/ident.cmo typing/typer.cmi \
types/types.cmi runtime/value.cmi
driver/cduce.cmi: misc/encodings.cmi runtime/value.cmi
ocamliface/mltypes.cmi: types/types.cmi
ocamliface/mltypes.cmi: ocamliface/asttypes.cmo types/types.cmi
query/query.cmi: parser/ast.cmo
ocamliface/mltypes.cmi: types/types.cmi
ocamliface/mltypes.cmi: ocamliface/asttypes.cmo types/types.cmi
schema/schema_types.cmi: misc/encodings.cmi types/intervals.cmi misc/ns.cmi \
runtime/value.cmi
......@@ -34,11 +34,9 @@ let raise_loc_generic loc s = raise (Location (loc, `Full, Generic s))
let noloc = (`None,-1,-1)
let nopos = (-1,-1)
let viewport = ref None
let set_viewport v = viewport := Some v
let get_viewport () = match !viewport with
| None -> assert false
| Some x -> x
let viewport = ref (Html.create false)
let set_viewport v = viewport := v
let get_viewport () = !viewport
(* Note: this is incorrect. Directives #utf8,... should
not be recognized inside comments and strings !
......
......@@ -45,8 +45,11 @@ let load_expat s =
in
raise (Location.Generic msg)
let use () = Load_xml.xml_parser := load_expat
let () =
Config.register
"expat"
"Expat XML parser"
(fun () -> Load_xml.xml_parser := load_expat)
use
val use: unit -> unit
(* Call this function from a stand-alone OCaml program
to activate expat *)
......@@ -29,8 +29,11 @@ let load_pxp s =
with exn ->
raise (Location.Generic (Pxp_types.string_of_exn exn))
let use () = Load_xml.xml_parser := load_pxp
let () =
Config.register
"pxp"
"PXP XML parser"
(fun () -> Load_xml.xml_parser := load_pxp)
use
val use: unit -> unit
(* Call this function from a stand-alone OCaml program
to activate PXP *)
......@@ -36,6 +36,20 @@ let concat t1 t2 = solve (aux_concat t1 (V.ty t2))
let flatten t = solve (aux_flatten t)
let map f t = solve (aux_map f t)
let map_mono t =
let ts = ref [] in
let vs = ref [] in
let r =
mapping (fun t v ->
let v' = V.forward () in
ts := t :: !ts; vs := v' :: !vs;
V.times v' v) t (V.ty nil_type) in
!ts, (fun fts ->
List.iter2 (fun t v -> V.define v (V.ty t)) fts !vs;
solve r)
let recurs f =
let n = Types.make () in
Types.define n (f n);
......
......@@ -10,6 +10,8 @@ val concat: Types.t -> Types.t -> Types.t
val flatten: Types.t -> Types.t
val map: (Types.t -> Types.t) -> Types.t -> Types.t
val map_mono: Types.t -> Types.t list * (Types.t list -> Types.t)
val map_tree:
(Types.t -> Types.t * Types.t) -> Types.t -> Types.t
(* input type -> (result, residual) *) (* sequence type *)
......
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