-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathexample.exp
More file actions
75 lines (45 loc) · 1022 Bytes
/
example.exp
File metadata and controls
75 lines (45 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
SCHEMA example_schema;
TYPE label = STRING;
END_TYPE;
TYPE color = ENUMERATION OF (red, green, blue, yellow, orange, white, black, brown);
END_TYPE;
TYPE length_measure = REAL;
END_TYPE;
TYPE point = REAL;
END_TYPE;
ENTITY shape
SUPERTYPE OF (ONEOF (circle, triangle, rectangle));
item_name : label;
item_color : OPTIONAL color;
number_of_sides : INTEGER;
END_ENTITY;
ENTITY circle
SUBTYPE OF (shape);
radius : real;
END_ENTITY;
ENTITY triangle
SUBTYPE OF (shape);
side1_length, side2_length, side3_length : length_measure;
END_ENTITY;
ENTITY rectangle
SUPERTYPE OF (square)
SUBTYPE OF (shape);
height : length_measure;
width : length_measure;
END_ENTITY;
ENTITY square
SUBTYPE OF (rectangle);
END_ENTITY;
ENTITY cartesian_point;
x : point;
y : point;
z : OPTIONAL point;
END_ENTITY;
ENTITY line;
end_point_one : cartesian_point;
end_point_two : cartesian_point;
END_ENTITY;
ENTITY poly_line;
points : LIST OF line;
END_ENTITY;
END_SCHEMA;