/[svn]/cduce/trunk/types/builtin_defs.ml
ViewVC logotype

Contents of /cduce/trunk/types/builtin_defs.ml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 501 - (show annotations)
Tue Jul 10 17:39:47 2007 UTC (5 years, 10 months ago) by abate
Original Path: types/builtin_defs.ml
File size: 1068 byte(s)
[r2003-06-12 13:15:56 by cvscast] Merging schema branch

Original author: cvscast
Date: 2003-06-12 13:16:00+00:00
1 let pos_int = Types.interval (Intervals.right (Intervals.mk "1"))
2 let non_neg_int = Types.interval (Intervals.right (Intervals.mk "0"))
3 let neg_int = Types.interval (Intervals.left (Intervals.mk "-1"))
4 let non_pos_int = Types.interval (Intervals.left (Intervals.mk "0"))
5
6 let pos_intstr =
7 Sequence.plus (Types.char (Chars.char_class
8 (Chars.mk_char '0')
9 (Chars.mk_char '9')
10 )
11 )
12
13 let neg_intstr =
14 Types.times
15 (Types.cons (Types.char (Chars.atom (Chars.mk_char '-'))))
16 (Types.cons pos_intstr)
17
18 let intstr = Types.cup pos_intstr neg_intstr (* [ '-'? '0'--'9'+ ] *)
19
20 let true_atom = Atoms.mk_ascii "true"
21 let false_atom = Atoms.mk_ascii "false"
22 let true_type = Types.atom (Atoms.atom true_atom)
23 let false_type = Types.atom (Atoms.atom false_atom)
24
25 let bool = Types.cup true_type false_type
26 let nil = Sequence.nil_type
27 let string = Sequence.string
28 let any = Types.any
29 let int = Types.Int.any
30 let atom = Types.atom Atoms.any
31
32 let char_latin1 = Types.char (Chars.mk_classes [ (0,255) ])
33 let string_latin1 = Sequence.star char_latin1

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5