Commit 65e4d166 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-05-03 15:55:32 by afrisch] cduce_packed

Original author: afrisch
Date: 2004-05-03 15:55:33+00:00
parent 014a1eef
......@@ -136,8 +136,10 @@ OBJECTS = \
types/types.cmo types/patterns.cmo types/sequence.cmo \
types/sample.cmo types/builtin_defs.cmo \
\
compile/lambda.cmo \
runtime/value.cmo \
\
schema/schema_types.cmo \
schema/schema_xml.cmo \
schema/schema_common.cmo \
schema/schema_builtin.cmo \
......@@ -148,8 +150,6 @@ OBJECTS = \
\
typing/typed.cmo typing/typer.cmo \
\
compile/lambda.cmo \
\
runtime/load_xml.cmo runtime/run_dispatch.cmo \
runtime/explain.cmo \
runtime/print_xml.cmo runtime/eval.cmo \
......@@ -183,6 +183,14 @@ INCLUDES = $(DIRS:%=-I %)
cduce: $(CDUCE:.cmo=.$(EXTENSION))
$(LINK) $(INCLUDES) -o $@ $(ML_LIB) $^ $(EXTRA_LINK_OPTS)
cduce_packed.ml: $(CDUCE:.cmo=.ml)
rm -f cduce_packed.ml
ocaml tools/pack.ml $^ > cduce_packed.ml
cduce_packed: cduce_packed.$(EXTENSION)
$(LINK) $(INCLUDES) -o $@ $(ML_LIB) $^ $(EXTRA_LINK_OPTS)
cDuce_all.$(EXTENSION_LIB): $(OBJECTS:.cmo=.$(EXTENSION))
$(COMPILE) -o cDuce_all.$(EXTENSION) -pack $^
$(LINK) -a -o $@ cDuce_all.$(EXTENSION)
......
......@@ -68,19 +68,27 @@ types/builtin_defs.cmo: types/atoms.cmi types/chars.cmi misc/encodings.cmi \
types/builtin_defs.cmx: types/atoms.cmx types/chars.cmx misc/encodings.cmx \
types/ident.cmx types/intervals.cmx misc/ns.cmx types/sequence.cmx \
types/types.cmx types/builtin_defs.cmi
compile/lambda.cmo: types/ident.cmo types/patterns.cmi misc/serialize.cmi \
types/types.cmi
compile/lambda.cmx: types/ident.cmx types/patterns.cmx misc/serialize.cmx \
types/types.cmx
runtime/value.cmo: types/atoms.cmi types/chars.cmi misc/encodings.cmi \
types/ident.cmo types/intervals.cmi compile/lambda.cmo types/sequence.cmi \
types/types.cmi runtime/value.cmi
runtime/value.cmx: types/atoms.cmx types/chars.cmx misc/encodings.cmx \
types/ident.cmx types/intervals.cmx compile/lambda.cmx types/sequence.cmx \
types/types.cmx runtime/value.cmi
schema/schema_types.cmo: misc/encodings.cmi types/intervals.cmi misc/ns.cmi \
runtime/value.cmi schema/schema_types.cmi
schema/schema_types.cmx: misc/encodings.cmx types/intervals.cmx misc/ns.cmx \
runtime/value.cmx schema/schema_types.cmi
schema/schema_xml.cmo: misc/encodings.cmi misc/ns.cmi schema/schema_xml.cmi
schema/schema_xml.cmx: misc/encodings.cmx misc/ns.cmx schema/schema_xml.cmi
schema/schema_common.cmo: types/atoms.cmi misc/encodings.cmi \
types/intervals.cmi misc/ns.cmi schema/schema_types.cmi \
schema/schema_xml.cmi runtime/value.cmi schema/schema_common.cmi
schema/schema_common.cmx: types/atoms.cmx misc/encodings.cmx \
types/intervals.cmx misc/ns.cmx schema/schema_types.cmi \
types/intervals.cmx misc/ns.cmx schema/schema_types.cmx \
schema/schema_xml.cmx runtime/value.cmx schema/schema_common.cmi
schema/schema_builtin.cmo: types/atoms.cmi types/builtin_defs.cmi \
misc/encodings.cmi types/intervals.cmi misc/ns.cmi \
......@@ -89,7 +97,7 @@ schema/schema_builtin.cmo: types/atoms.cmi types/builtin_defs.cmi \
schema/schema_builtin.cmi
schema/schema_builtin.cmx: types/atoms.cmx types/builtin_defs.cmx \
misc/encodings.cmx types/intervals.cmx misc/ns.cmx \
schema/schema_common.cmx schema/schema_types.cmi schema/schema_xml.cmx \
schema/schema_common.cmx schema/schema_types.cmx schema/schema_xml.cmx \
types/sequence.cmx types/types.cmx runtime/value.cmx \
schema/schema_builtin.cmi
schema/schema_validator.cmo: types/atoms.cmi misc/encodings.cmi \
......@@ -98,7 +106,7 @@ schema/schema_validator.cmo: types/atoms.cmi misc/encodings.cmi \
schema/schema_validator.cmi
schema/schema_validator.cmx: types/atoms.cmx misc/encodings.cmx \
types/intervals.cmx misc/ns.cmx schema/schema_builtin.cmx \
schema/schema_common.cmx schema/schema_types.cmi runtime/value.cmx \
schema/schema_common.cmx schema/schema_types.cmx runtime/value.cmx \
schema/schema_validator.cmi
schema/schema_parser.cmo: misc/encodings.cmi types/intervals.cmi misc/ns.cmi \
schema/schema_builtin.cmi schema/schema_common.cmi \
......@@ -106,7 +114,7 @@ schema/schema_parser.cmo: misc/encodings.cmi types/intervals.cmi misc/ns.cmi \
runtime/value.cmi schema/schema_parser.cmi
schema/schema_parser.cmx: misc/encodings.cmx types/intervals.cmx misc/ns.cmx \
schema/schema_builtin.cmx schema/schema_common.cmx \
schema/schema_types.cmi schema/schema_validator.cmx schema/schema_xml.cmx \
schema/schema_types.cmx schema/schema_validator.cmx schema/schema_xml.cmx \
runtime/value.cmx schema/schema_parser.cmi
parser/location.cmo: parser/location.cmi
parser/location.cmx: parser/location.cmi
......@@ -119,7 +127,7 @@ parser/ast.cmo: types/builtin_defs.cmi types/chars.cmi types/ident.cmo \
schema/schema_types.cmi types/sequence.cmi types/types.cmi
parser/ast.cmx: types/builtin_defs.cmx types/chars.cmx types/ident.cmx \
types/intervals.cmx parser/location.cmx misc/ns.cmx \
schema/schema_types.cmi types/sequence.cmx types/types.cmx
schema/schema_types.cmx types/sequence.cmx types/types.cmx
parser/parser.cmo: parser/ast.cmo types/atoms.cmi types/chars.cmi \
misc/encodings.cmi types/ident.cmo types/intervals.cmi \
parser/location.cmi misc/ns.cmi schema/schema_parser.cmi \
......@@ -133,7 +141,7 @@ parser/parser.cmx: parser/ast.cmx types/atoms.cmx types/chars.cmx \
typing/typed.cmo: types/ident.cmo parser/location.cmi types/patterns.cmi \
schema/schema_types.cmi types/types.cmi
typing/typed.cmx: types/ident.cmx parser/location.cmx types/patterns.cmx \
schema/schema_types.cmi types/types.cmx
schema/schema_types.cmx types/types.cmx
typing/typer.cmo: parser/ast.cmo types/atoms.cmi types/builtin_defs.cmi \
types/chars.cmi types/ident.cmo types/intervals.cmi parser/location.cmi \
misc/ns.cmi types/patterns.cmi schema/schema_builtin.cmi \
......@@ -143,13 +151,9 @@ typing/typer.cmo: parser/ast.cmo types/atoms.cmi types/builtin_defs.cmi \
typing/typer.cmx: parser/ast.cmx types/atoms.cmx types/builtin_defs.cmx \
types/chars.cmx types/ident.cmx types/intervals.cmx parser/location.cmx \
misc/ns.cmx types/patterns.cmx schema/schema_builtin.cmx \
schema/schema_common.cmx schema/schema_types.cmi types/sequence.cmx \
schema/schema_common.cmx schema/schema_types.cmx types/sequence.cmx \
misc/serialize.cmx misc/state.cmx misc/stats.cmx typing/typed.cmx \
types/types.cmx runtime/value.cmx typing/typer.cmi
compile/lambda.cmo: types/ident.cmo types/patterns.cmi misc/serialize.cmi \
types/types.cmi
compile/lambda.cmx: types/ident.cmx types/patterns.cmx misc/serialize.cmx \
types/types.cmx
runtime/load_xml.cmo: types/atoms.cmi misc/encodings.cmi types/ident.cmo \
parser/location.cmi misc/ns.cmi parser/url.cmi runtime/value.cmi \
runtime/load_xml.cmi
......@@ -182,7 +186,7 @@ runtime/eval.cmo: types/builtin_defs.cmi types/ident.cmo compile/lambda.cmo \
typing/typer.cmi types/types.cmi runtime/value.cmi runtime/eval.cmi
runtime/eval.cmx: types/builtin_defs.cmx types/ident.cmx compile/lambda.cmx \
types/patterns.cmx runtime/run_dispatch.cmx schema/schema_common.cmx \
schema/schema_types.cmi schema/schema_validator.cmx types/sequence.cmx \
schema/schema_types.cmx schema/schema_validator.cmx types/sequence.cmx \
typing/typer.cmx types/types.cmx runtime/value.cmx runtime/eval.cmi
compile/compile.cmo: parser/ast.cmo runtime/eval.cmi types/ident.cmo \
compile/lambda.cmo parser/location.cmi types/patterns.cmi \
......@@ -257,7 +261,7 @@ driver/webiface.cmx: driver/cduce.cmx driver/examples.cmx parser/location.cmx \
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.cmi
schema/schema_types.cmx
query/query_run.cmo: query/query.cmi driver/run.cmo
query/query_run.cmx: query/query.cmx driver/run.cmx
misc/pool.cmi: misc/custom.cmo
......@@ -279,6 +283,8 @@ types/builtin_defs.cmi: types/atoms.cmi types/ident.cmo types/types.cmi
runtime/value.cmi: types/atoms.cmi types/chars.cmi misc/encodings.cmi \
types/ident.cmo types/intervals.cmi compile/lambda.cmo misc/ns.cmi \
types/types.cmi
schema/schema_types.cmi: misc/encodings.cmi types/intervals.cmi misc/ns.cmi \
runtime/value.cmi
schema/schema_xml.cmi: misc/encodings.cmi misc/ns.cmi
schema/schema_common.cmi: misc/encodings.cmi types/intervals.cmi \
schema/schema_types.cmi runtime/value.cmi
......
(** Types used by all the Schema modules.
This module comes in .mli part only, hence no value and/or exceptions are
available here. See Schema_common.
*)
(**
Glossary:
XSD XML Schema Document
PSV Post Schema Validation
PSVI Post Schema Validation Infoset
*)
open Encodings
(** {2 XSD representation} *)
type xs_nonNegativeInteger = Intervals.V.t (* = Big_int.big_int *)
(* type xs_positiveInteger = Intervals.V.t *)
type derivation_type = [ `Extension | `Restriction ]
type value_constraint = [ `Fixed of Value.t | `Default of Value.t ]
type white_space_handling = [ `Preserve | `Replace | `Collapse ]
type facets = {
length: (xs_nonNegativeInteger * bool) option; (* length, fixed *)
minLength: (xs_nonNegativeInteger * bool) option; (* length, fixed *)
maxLength: (xs_nonNegativeInteger * bool) option; (* length, fixed *)
(* pattern: Schema_regexp.regexp list; (* list of ANDed patterns *) *)
enumeration: Value.ValueSet.t option;
whiteSpace: white_space_handling * bool; (* handling, fixed *)
maxInclusive: (Value.t * bool) option; (* max, fixed *)
maxExclusive: (Value.t * bool) option; (* max, fixed *)
minInclusive: (Value.t * bool) option; (* min, fixed *)
minExclusive: (Value.t * bool) option; (* min, fixed *)
(*
totalDigits: (xs_positiveInteger * bool) option; (* digits, fixed *)
fractionDigits: (xs_nonNegativeInteger * bool) option; (* digits, fixed *)
*)
}
type simple_type_definition =
| Primitive of Utf8.t
| Derived of
Utf8.t option * (* name *)
variety *
facets *
simple_type_definition (* base *)
and variety =
| Atomic of simple_type_definition (* a Primitive _ *)
| List of simple_type_definition (* Variety (simple_type_definition) =
Atomic || Union (of atomic) *)
| Union of simple_type_definition list
type attribute_declaration =
Utf8.t * (* name *)
simple_type_definition * (* type *)
value_constraint option
type attribute_use =
bool * (* required *)
attribute_declaration *
value_constraint option
(* first construction as per predictive parsing. None stands for epsilon, Some
* Utf8.t stands for a start tag of identical name *)
type first = Utf8.t option list
type term =
| Elt of element_declaration ref
| Model of model_group
and model_group =
| All of particle list
| Choice of particle list
| Sequence of particle list
and content_type =
| CT_empty
| CT_simple of simple_type_definition
| CT_model of
particle *
bool (* mixed *)
and particle =
xs_nonNegativeInteger * (* minOccurs *)
xs_nonNegativeInteger option * (* maxOccurs (None = "unbounded") *)
term *
first
and element_declaration =
int * (* unique id *)
Utf8.t * (* name *)
type_definition ref * (* type *)
value_constraint option
and complex_type_definition =
int * (* unique id *)
Utf8.t option * (* name *)
type_definition * (* base *)
derivation_type *
attribute_use list *
content_type
and type_definition =
| AnyType
| Simple of simple_type_definition
| Complex of complex_type_definition
type model_group_definition =
Utf8.t * (* name *)
model_group
type attribute_group_definition =
Utf8.t * (* name *)
attribute_use list
type schema = {
targetNamespace: Ns.t;
types: type_definition list;
attributes: attribute_declaration list;
elements: element_declaration list;
attribute_groups: attribute_group_definition list;
model_groups: model_group_definition list;
}
(** {2 Events} see Schema_events module *)
type event =
| E_start_tag of Ns.qname
| E_end_tag of Ns.qname
| E_attribute of Ns.qname * Encodings.Utf8.t (* qualified name, value *)
| E_char_data of Encodings.Utf8.t
(** {2 Misc} *)
(* kind of a schema component *)
type component_kind =
[ `Type | `Element | `Attribute | `Attribute_group | `Model_group ] option
type component =
| Type of type_definition
| Element of element_declaration
| Attribute of attribute_declaration
| Attribute_group of attribute_group_definition
| Model_group of model_group_definition
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