Commit 2be608b8 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-11-20 11:30:02 by szach] added some Int subtypes corresponding to some XML Schema types

Original author: szach
Date: 2003-11-20 11:30:02+00:00
parent 0d53b175
......@@ -3,6 +3,13 @@ let non_neg_int = Types.interval (Intervals.right (Intervals.V.mk "0"))
let neg_int = Types.interval (Intervals.left (Intervals.V.mk "-1"))
let non_pos_int = Types.interval (Intervals.left (Intervals.V.mk "0"))
let mk_interval_type l r =
Types.interval (Intervals.bounded (Intervals.V.mk l) (Intervals.V.mk r))
let long_int = mk_interval_type "-9223372036854775808" "9223372036854775807"
let int_int = mk_interval_type "-2147483648" "2147483647"
let short_int = mk_interval_type "-32768" "32767"
let byte_int = mk_interval_type "-128" "127"
let pos_intstr =
Sequence.plus (Types.char (Chars.char_class
(Chars.V.mk_char '0')
......
(** 1 .. Inf *)
val pos_int : Types.t
(** 0 .. Inf *)
val non_neg_int : Types.t
(** -Inf .. -1 *)
val neg_int : Types.t
(** -Inf .. 0 *)
val non_pos_int : Types.t
(** Some CDuce predefined types *)
val pos_int : Types.t (** 1 .. Inf *)
val non_neg_int : Types.t (** 0 .. Inf *)
val neg_int : Types.t (** -Inf .. -1 *)
val non_pos_int : Types.t (** -Inf .. 0 *)
val long_int : Types.t (** -9223372036854775808 .. 9223372036854775807 *)
val int_int : Types.t (** -2147483648 .. 2147483647 *)
val short_int : Types.t (** -32768 .. 32767 *)
val byte_int : Types.t (** -128 .. 127 *)
val intstr : Types.t
val pos_intstr : Types.t
......
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