expressir 0.2.5 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.cross_rubies +30 -0
- data/.github/workflows/rake.yml +14 -15
- data/.github/workflows/release.yml +24 -16
- data/.gitignore +3 -1
- data/Gemfile +0 -2
- data/Rakefile +2 -8
- data/expressir.gemspec +7 -4
- data/ext/express-parser/express_parser.cpp +12 -10
- data/ext/express-parser/extconf.rb +48 -25
- data/lib/expressir/express_exp/formatter.rb +74 -23
- data/lib/expressir/express_exp/parser.rb +20 -2
- data/lib/expressir/express_exp/visitor.rb +201 -96
- data/lib/expressir/model.rb +3 -0
- data/lib/expressir/model/attribute.rb +3 -1
- data/lib/expressir/model/constant.rb +3 -1
- data/lib/expressir/model/entity.rb +12 -19
- data/lib/expressir/model/enumeration_item.rb +3 -1
- data/lib/expressir/model/expressions/aggregate_initializer.rb +2 -2
- data/lib/expressir/model/expressions/aggregate_item.rb +1 -1
- data/lib/expressir/model/expressions/attribute_reference.rb +1 -1
- data/lib/expressir/model/expressions/binary_expression.rb +1 -1
- data/lib/expressir/model/expressions/call.rb +2 -2
- data/lib/expressir/model/expressions/entity_constructor.rb +2 -2
- data/lib/expressir/model/expressions/group_reference.rb +1 -1
- data/lib/expressir/model/expressions/index_reference.rb +1 -1
- data/lib/expressir/model/expressions/interval.rb +1 -1
- data/lib/expressir/model/expressions/query_expression.rb +5 -3
- data/lib/expressir/model/expressions/simple_reference.rb +1 -1
- data/lib/expressir/model/expressions/unary_expression.rb +1 -1
- data/lib/expressir/model/function.rb +32 -38
- data/lib/expressir/model/identifier.rb +1 -0
- data/lib/expressir/model/informal_proposition.rb +13 -0
- data/lib/expressir/model/interface.rb +2 -2
- data/lib/expressir/model/literals/binary.rb +1 -1
- data/lib/expressir/model/literals/integer.rb +1 -1
- data/lib/expressir/model/literals/logical.rb +1 -1
- data/lib/expressir/model/literals/real.rb +1 -1
- data/lib/expressir/model/literals/string.rb +1 -1
- data/lib/expressir/model/model_element.rb +67 -0
- data/lib/expressir/model/parameter.rb +3 -1
- data/lib/expressir/model/procedure.rb +33 -39
- data/lib/expressir/model/renamed_ref.rb +1 -1
- data/lib/expressir/model/repository.rb +3 -3
- data/lib/expressir/model/rule.rb +35 -38
- data/lib/expressir/model/schema.rb +35 -46
- data/lib/expressir/model/scope.rb +49 -3
- data/lib/expressir/model/statements/alias.rb +4 -2
- data/lib/expressir/model/statements/assignment.rb +1 -1
- data/lib/expressir/model/statements/call.rb +2 -2
- data/lib/expressir/model/statements/case.rb +2 -2
- data/lib/expressir/model/statements/case_action.rb +2 -2
- data/lib/expressir/model/statements/compound.rb +2 -2
- data/lib/expressir/model/statements/escape.rb +1 -1
- data/lib/expressir/model/statements/if.rb +3 -3
- data/lib/expressir/model/statements/null.rb +1 -1
- data/lib/expressir/model/statements/repeat.rb +4 -2
- data/lib/expressir/model/statements/return.rb +1 -1
- data/lib/expressir/model/statements/skip.rb +1 -1
- data/lib/expressir/model/subtype_constraint.rb +3 -1
- data/lib/expressir/model/type.rb +13 -3
- data/lib/expressir/model/types/aggregate.rb +3 -1
- data/lib/expressir/model/types/array.rb +1 -1
- data/lib/expressir/model/types/bag.rb +1 -1
- data/lib/expressir/model/types/binary.rb +1 -1
- data/lib/expressir/model/types/boolean.rb +1 -1
- data/lib/expressir/model/types/enumeration.rb +3 -3
- data/lib/expressir/model/types/generic.rb +3 -1
- data/lib/expressir/model/types/generic_entity.rb +3 -1
- data/lib/expressir/model/types/integer.rb +1 -1
- data/lib/expressir/model/types/list.rb +1 -1
- data/lib/expressir/model/types/logical.rb +1 -1
- data/lib/expressir/model/types/number.rb +1 -1
- data/lib/expressir/model/types/real.rb +1 -1
- data/lib/expressir/model/types/select.rb +3 -3
- data/lib/expressir/model/types/set.rb +1 -1
- data/lib/expressir/model/types/string.rb +1 -1
- data/lib/expressir/model/unique.rb +4 -2
- data/lib/expressir/model/variable.rb +3 -1
- data/lib/expressir/model/where.rb +3 -1
- data/lib/expressir/version.rb +1 -1
- data/original/examples/syntax/remark.exp +64 -20
- data/original/examples/syntax/remark_formatted.exp +63 -24
- data/original/examples/syntax/simple.exp +3 -0
- data/original/examples/syntax/source.exp +16 -0
- data/original/examples/syntax/syntax.exp +194 -181
- data/original/examples/syntax/syntax_formatted.exp +354 -787
- data/rakelib/cross-ruby.rake +308 -0
- data/spec/expressir/express_exp/head_source_spec.rb +38 -0
- data/spec/expressir/express_exp/parse_multiple_spec.rb +32 -0
- data/spec/expressir/express_exp/parse_remark_spec.rb +122 -56
- data/spec/expressir/express_exp/parse_syntax_spec.rb +1619 -1569
- data/spec/expressir/express_exp/source_spec.rb +29 -0
- data/spec/expressir/model/model_element_spec.rb +59 -0
- data/spec/expressir/model/{find_spec.rb → scope_spec.rb} +20 -7
- metadata +45 -21
@@ -1,14 +1,16 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
|
-
class Unique
|
3
|
+
class Unique < ModelElement
|
4
4
|
include Identifier
|
5
5
|
|
6
6
|
attr_accessor :attributes
|
7
7
|
|
8
8
|
def initialize(options = {})
|
9
9
|
@id = options[:id]
|
10
|
+
@remarks = options.fetch(:remarks, [])
|
11
|
+
@source = options[:source]
|
10
12
|
|
11
|
-
@attributes = options
|
13
|
+
@attributes = options.fetch(:attributes, [])
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
|
-
class Variable
|
3
|
+
class Variable < ModelElement
|
4
4
|
include Identifier
|
5
5
|
|
6
6
|
attr_accessor :type
|
@@ -8,6 +8,8 @@ module Expressir
|
|
8
8
|
|
9
9
|
def initialize(options = {})
|
10
10
|
@id = options[:id]
|
11
|
+
@remarks = options.fetch(:remarks, [])
|
12
|
+
@source = options[:source]
|
11
13
|
|
12
14
|
@type = options[:type]
|
13
15
|
@expression = options[:expression]
|
@@ -1,12 +1,14 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
|
-
class Where
|
3
|
+
class Where < ModelElement
|
4
4
|
include Identifier
|
5
5
|
|
6
6
|
attr_accessor :expression
|
7
7
|
|
8
8
|
def initialize(options = {})
|
9
9
|
@id = options[:id]
|
10
|
+
@remarks = options.fetch(:remarks, [])
|
11
|
+
@source = options[:source]
|
10
12
|
|
11
13
|
@expression = options[:expression]
|
12
14
|
end
|
data/lib/expressir/version.rb
CHANGED
@@ -4,24 +4,34 @@ an embedded remark including the newline character; therefore, embedded remarks
|
|
4
4
|
several physical lines.
|
5
5
|
*)
|
6
6
|
--"remark_schema" The tail remark is written at the end of a physical line.
|
7
|
+
--"remark_schema" UTF8 test: Příliš žluťoučký kůň úpěl ďábelské ódy.
|
7
8
|
|
8
9
|
--"remark_schema" universal scope - schema before
|
9
10
|
|
10
11
|
SCHEMA remark_schema;
|
11
12
|
|
12
13
|
CONSTANT remark_constant : STRING := 'xxx'; END_CONSTANT;
|
13
|
-
TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
|
14
|
+
TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
|
15
|
+
WHERE WR1 : TRUE;
|
16
|
+
--"WR1" type scope - type where
|
17
|
+
--"IP1" type scope - type informal proposition
|
18
|
+
--"wr:WR1" type scope - type where, with prefix
|
19
|
+
--"ip:IP1" type scope - type informal proposition, with prefix
|
20
|
+
END_TYPE;
|
14
21
|
ENTITY remark_entity;
|
15
22
|
remark_attribute : STRING;
|
16
23
|
DERIVE remark_derived_attribute : STRING := 'xxx';
|
17
24
|
INVERSE remark_inverse_attribute : remark_entity FOR remark_attribute;
|
18
25
|
UNIQUE remark_unique : remark_attribute;
|
19
|
-
WHERE
|
26
|
+
WHERE WR1 : TRUE;
|
20
27
|
--"remark_attribute" entity scope - entity attribute
|
21
28
|
--"remark_derived_attribute" entity scope - entity derived attribute
|
22
29
|
--"remark_inverse_attribute" entity scope - entity inverse attribute
|
23
30
|
--"remark_unique" entity scope - entity unique
|
24
|
-
--"
|
31
|
+
--"WR1" entity scope - entity where
|
32
|
+
--"IP1" entity scope - entity informal proposition
|
33
|
+
--"wr:WR1" entity scope - entity where, with prefix
|
34
|
+
--"ip:IP1" entity scope - entity informal proposition, with prefix
|
25
35
|
END_ENTITY;
|
26
36
|
SUBTYPE_CONSTRAINT remark_subtype_constraint FOR remark_entity; END_SUBTYPE_CONSTRAINT;
|
27
37
|
FUNCTION remark_function(remark_parameter : STRING) : BOOLEAN;
|
@@ -39,7 +49,8 @@ FUNCTION remark_function(remark_parameter : STRING) : BOOLEAN;
|
|
39
49
|
);
|
40
50
|
--"remark_parameter" function scope - function parameter
|
41
51
|
--"remark_type" function scope - function type
|
42
|
-
--"remark_enumeration_item" function scope - function enumeration item
|
52
|
+
--"remark_type.remark_enumeration_item" function scope - function enumeration item
|
53
|
+
--"remark_enumeration_item" function scope - function enumeration item, on the same level as the type
|
43
54
|
--"remark_constant" function scope - function constant
|
44
55
|
--"remark_variable" function scope - function variable
|
45
56
|
END_FUNCTION;
|
@@ -58,7 +69,8 @@ PROCEDURE remark_procedure(remark_parameter : STRING);
|
|
58
69
|
);
|
59
70
|
--"remark_parameter" procedure scope - procedure parameter
|
60
71
|
--"remark_type" procedure scope - procedure type
|
61
|
-
--"remark_enumeration_item" procedure scope - procedure enumeration item
|
72
|
+
--"remark_type.remark_enumeration_item" procedure scope - procedure enumeration item
|
73
|
+
--"remark_enumeration_item" procedure scope - procedure enumeration item, on the same level as the type
|
62
74
|
--"remark_constant" procedure scope - procedure constant
|
63
75
|
--"remark_variable" procedure scope - procedure variable
|
64
76
|
END_PROCEDURE;
|
@@ -75,71 +87,103 @@ RULE remark_rule FOR (remark_entity);
|
|
75
87
|
remark_variable := QUERY(remark_query <* remark_variable | TRUE
|
76
88
|
--"remark_query" rule query scope - rule query
|
77
89
|
);
|
78
|
-
WHERE
|
90
|
+
WHERE WR1 : TRUE;
|
79
91
|
--"remark_type" rule scope - rule type
|
80
|
-
--"remark_enumeration_item" rule scope - rule enumeration item
|
92
|
+
--"remark_type.remark_enumeration_item" rule scope - rule enumeration item
|
93
|
+
--"remark_enumeration_item" rule scope - rule enumeration item, on the same level as the type
|
81
94
|
--"remark_constant" rule scope - rule constant
|
82
95
|
--"remark_variable" rule scope - rule variable
|
83
|
-
--"
|
96
|
+
--"WR1" rule scope - rule where
|
97
|
+
--"IP1" rule scope - rule informal proposition
|
98
|
+
--"wr:WR1" rule scope - rule where, with prefix
|
99
|
+
--"ip:IP1" rule scope - rule informal proposition, with prefix
|
84
100
|
END_RULE;
|
85
101
|
|
86
102
|
--"remark_constant" schema scope - constant
|
87
103
|
--"remark_type" schema scope - type
|
88
|
-
--"
|
104
|
+
--"remark_type.WR1" schema scope - type where
|
105
|
+
--"remark_type.IP1" schema scope - type informal proposition
|
106
|
+
--"remark_type.wr:WR1" schema scope - type where, with prefix
|
107
|
+
--"remark_type.ip:IP1" schema scope - type informal proposition, with prefix
|
108
|
+
--"remark_type.remark_enumeration_item" schema scope - enumeration item
|
109
|
+
--"remark_enumeration_item" schema scope - enumeration item, on the same level as the type
|
89
110
|
--"remark_entity" schema scope - entity
|
90
111
|
--"remark_entity.remark_attribute" schema scope - entity attribute
|
91
112
|
--"remark_entity.remark_derived_attribute" schema scope - entity derived attribute
|
92
113
|
--"remark_entity.remark_inverse_attribute" schema scope - entity inverse attribute
|
93
114
|
--"remark_entity.remark_unique" schema scope - entity unique
|
94
|
-
--"remark_entity.
|
115
|
+
--"remark_entity.WR1" schema scope - entity where
|
116
|
+
--"remark_entity.IP1" schema scope - entity informal proposition
|
117
|
+
--"remark_entity.wr:WR1" schema scope - entity where, with prefix
|
118
|
+
--"remark_entity.ip:IP1" schema scope - entity informal proposition, with prefix
|
95
119
|
--"remark_subtype_constraint" schema scope - subtype constraint
|
96
120
|
--"remark_function" schema scope - function
|
97
121
|
--"remark_function.remark_parameter" schema scope - function parameter
|
98
122
|
--"remark_function.remark_type" schema scope - function type
|
99
|
-
--"remark_function.remark_enumeration_item" schema scope - function enumeration item
|
123
|
+
--"remark_function.remark_type.remark_enumeration_item" schema scope - function enumeration item
|
124
|
+
--"remark_function.remark_enumeration_item" schema scope - function enumeration item, on the same level as the type
|
100
125
|
--"remark_function.remark_constant" schema scope - function constant
|
101
126
|
--"remark_function.remark_variable" schema scope - function variable
|
102
127
|
--"remark_procedure" schema scope - procedure
|
103
128
|
--"remark_procedure.remark_parameter" schema scope - procedure parameter
|
104
129
|
--"remark_procedure.remark_type" schema scope - procedure type
|
105
|
-
--"remark_procedure.remark_enumeration_item" schema scope - procedure enumeration item
|
130
|
+
--"remark_procedure.remark_type.remark_enumeration_item" schema scope - procedure enumeration item
|
131
|
+
--"remark_procedure.remark_enumeration_item" schema scope - procedure enumeration item, on the same level as the type
|
106
132
|
--"remark_procedure.remark_constant" schema scope - procedure constant
|
107
133
|
--"remark_procedure.remark_variable" schema scope - procedure variable
|
108
134
|
--"remark_rule" schema scope - rule
|
109
135
|
--"remark_rule.remark_type" schema scope - rule type
|
110
|
-
--"remark_rule.remark_enumeration_item" schema scope - rule enumeration item
|
136
|
+
--"remark_rule.remark_type.remark_enumeration_item" schema scope - rule enumeration item
|
137
|
+
--"remark_rule.remark_enumeration_item" schema scope - rule enumeration item, on the same level as the type
|
111
138
|
--"remark_rule.remark_constant" schema scope - rule constant
|
112
139
|
--"remark_rule.remark_variable" schema scope - rule variable
|
113
|
-
--"remark_rule.
|
140
|
+
--"remark_rule.WR1" schema scope - rule where
|
141
|
+
--"remark_rule.IP1" schema scope - rule informal proposition
|
142
|
+
--"remark_rule.wr:WR1" schema scope - rule where, with prefix
|
143
|
+
--"remark_rule.ip:IP1" schema scope - rule informal proposition, with prefix
|
114
144
|
|
115
145
|
END_SCHEMA;
|
116
146
|
|
117
147
|
--"remark_schema" universal scope - schema
|
118
148
|
--"remark_schema.remark_constant" universal scope - constant
|
119
149
|
--"remark_schema.remark_type" universal scope - type
|
120
|
-
--"remark_schema.
|
150
|
+
--"remark_schema.remark_type.WR1" universal scope - type where
|
151
|
+
--"remark_schema.remark_type.IP1" universal scope - type informal proposition
|
152
|
+
--"remark_schema.remark_type.wr:WR1" universal scope - type where, with prefix
|
153
|
+
--"remark_schema.remark_type.ip:IP1" universal scope - type informal proposition, with prefix
|
154
|
+
--"remark_schema.remark_type.remark_enumeration_item" universal scope - enumeration item
|
155
|
+
--"remark_schema.remark_enumeration_item" universal scope - enumeration item, on the same level as the type
|
121
156
|
--"remark_schema.remark_entity" universal scope - entity
|
122
157
|
--"remark_schema.remark_entity.remark_attribute" universal scope - entity attribute
|
123
158
|
--"remark_schema.remark_entity.remark_derived_attribute" universal scope - entity derived attribute
|
124
159
|
--"remark_schema.remark_entity.remark_inverse_attribute" universal scope - entity inverse attribute
|
125
160
|
--"remark_schema.remark_entity.remark_unique" universal scope - entity unique
|
126
|
-
--"remark_schema.remark_entity.
|
161
|
+
--"remark_schema.remark_entity.WR1" universal scope - entity where
|
162
|
+
--"remark_schema.remark_entity.IP1" universal scope - entity informal proposition
|
163
|
+
--"remark_schema.remark_entity.wr:WR1" universal scope - entity where, with prefix
|
164
|
+
--"remark_schema.remark_entity.ip:IP1" universal scope - entity informal proposition, with prefix
|
127
165
|
--"remark_schema.remark_subtype_constraint" universal scope - subtype constraint
|
128
166
|
--"remark_schema.remark_function" universal scope - function
|
129
167
|
--"remark_schema.remark_function.remark_parameter" universal scope - function parameter
|
130
168
|
--"remark_schema.remark_function.remark_type" universal scope - function type
|
131
|
-
--"remark_schema.remark_function.remark_enumeration_item" universal scope - function enumeration item
|
169
|
+
--"remark_schema.remark_function.remark_type.remark_enumeration_item" universal scope - function enumeration item
|
170
|
+
--"remark_schema.remark_function.remark_enumeration_item" universal scope - function enumeration item, on the same level as the type
|
132
171
|
--"remark_schema.remark_function.remark_constant" universal scope - function constant
|
133
172
|
--"remark_schema.remark_function.remark_variable" universal scope - function variable
|
134
173
|
--"remark_schema.remark_procedure" universal scope - procedure
|
135
174
|
--"remark_schema.remark_procedure.remark_parameter" universal scope - procedure parameter
|
136
175
|
--"remark_schema.remark_procedure.remark_type" universal scope - procedure type
|
137
|
-
--"remark_schema.remark_procedure.remark_enumeration_item" universal scope - procedure enumeration item
|
176
|
+
--"remark_schema.remark_procedure.remark_type.remark_enumeration_item" universal scope - procedure enumeration item
|
177
|
+
--"remark_schema.remark_procedure.remark_enumeration_item" universal scope - procedure enumeration item, on the same level as the type
|
138
178
|
--"remark_schema.remark_procedure.remark_constant" universal scope - procedure constant
|
139
179
|
--"remark_schema.remark_procedure.remark_variable" universal scope - procedure variable
|
140
180
|
--"remark_schema.remark_rule" universal scope - rule
|
141
181
|
--"remark_schema.remark_rule.remark_type" universal scope - rule type
|
142
|
-
--"remark_schema.remark_rule.remark_enumeration_item" universal scope - rule enumeration item
|
182
|
+
--"remark_schema.remark_rule.remark_type.remark_enumeration_item" universal scope - rule enumeration item
|
183
|
+
--"remark_schema.remark_rule.remark_enumeration_item" universal scope - rule enumeration item, on the same level as the type
|
143
184
|
--"remark_schema.remark_rule.remark_constant" universal scope - rule constant
|
144
185
|
--"remark_schema.remark_rule.remark_variable" universal scope - rule variable
|
145
|
-
--"remark_schema.remark_rule.
|
186
|
+
--"remark_schema.remark_rule.WR1" universal scope - rule where
|
187
|
+
--"remark_schema.remark_rule.IP1" universal scope - rule informal proposition
|
188
|
+
--"remark_schema.remark_rule.wr:WR1" universal scope - rule where, with prefix
|
189
|
+
--"remark_schema.remark_rule.ip:IP1" universal scope - rule informal proposition, with prefix
|
@@ -3,8 +3,9 @@ CONSTANT
|
|
3
3
|
remark_constant : STRING := 'xxx';
|
4
4
|
END_CONSTANT;
|
5
5
|
TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
|
6
|
+
WHERE
|
7
|
+
WR1 : TRUE;
|
6
8
|
END_TYPE;
|
7
|
-
|
8
9
|
ENTITY remark_entity;
|
9
10
|
remark_attribute : STRING;
|
10
11
|
DERIVE
|
@@ -14,12 +15,10 @@ ENTITY remark_entity;
|
|
14
15
|
UNIQUE
|
15
16
|
remark_unique : remark_attribute;
|
16
17
|
WHERE
|
17
|
-
|
18
|
+
WR1 : TRUE;
|
18
19
|
END_ENTITY;
|
19
|
-
|
20
20
|
SUBTYPE_CONSTRAINT remark_subtype_constraint FOR remark_entity;
|
21
21
|
END_SUBTYPE_CONSTRAINT;
|
22
|
-
|
23
22
|
FUNCTION remark_function(remark_parameter : STRING) : BOOLEAN;
|
24
23
|
TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
|
25
24
|
END_TYPE;
|
@@ -41,7 +40,6 @@ FUNCTION remark_function(remark_parameter : STRING) : BOOLEAN;
|
|
41
40
|
--"remark_query" function query scope - function query
|
42
41
|
);
|
43
42
|
END_FUNCTION;
|
44
|
-
|
45
43
|
PROCEDURE remark_procedure(remark_parameter : STRING);
|
46
44
|
TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
|
47
45
|
END_TYPE;
|
@@ -63,7 +61,6 @@ PROCEDURE remark_procedure(remark_parameter : STRING);
|
|
63
61
|
--"remark_query" procedure query scope - procedure query
|
64
62
|
);
|
65
63
|
END_PROCEDURE;
|
66
|
-
|
67
64
|
RULE remark_rule FOR (remark_entity);
|
68
65
|
TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
|
69
66
|
END_TYPE;
|
@@ -85,7 +82,7 @@ RULE remark_rule FOR (remark_entity);
|
|
85
82
|
--"remark_query" rule query scope - rule query
|
86
83
|
);
|
87
84
|
WHERE
|
88
|
-
|
85
|
+
WR1 : TRUE;
|
89
86
|
END_RULE;
|
90
87
|
END_SCHEMA;
|
91
88
|
(*"remark_schema"
|
@@ -94,14 +91,29 @@ an embedded remark including the newline character; therefore, embedded remarks
|
|
94
91
|
several physical lines.
|
95
92
|
*)
|
96
93
|
--"remark_schema" The tail remark is written at the end of a physical line.
|
94
|
+
--"remark_schema" UTF8 test: Příliš žluťoučký kůň úpěl ďábelské ódy.
|
97
95
|
--"remark_schema" universal scope - schema before
|
98
96
|
--"remark_schema" universal scope - schema
|
99
97
|
--"remark_schema.remark_constant" schema scope - constant
|
100
98
|
--"remark_schema.remark_constant" universal scope - constant
|
101
99
|
--"remark_schema.remark_type" schema scope - type
|
102
100
|
--"remark_schema.remark_type" universal scope - type
|
103
|
-
--"remark_schema.remark_enumeration_item" schema scope - enumeration item
|
104
|
-
--"remark_schema.remark_enumeration_item"
|
101
|
+
--"remark_schema.remark_type.remark_enumeration_item" schema scope - enumeration item
|
102
|
+
--"remark_schema.remark_type.remark_enumeration_item" schema scope - enumeration item, on the same level as the type
|
103
|
+
--"remark_schema.remark_type.remark_enumeration_item" universal scope - enumeration item
|
104
|
+
--"remark_schema.remark_type.remark_enumeration_item" universal scope - enumeration item, on the same level as the type
|
105
|
+
--"remark_schema.remark_type.WR1" type scope - type where
|
106
|
+
--"remark_schema.remark_type.WR1" type scope - type where, with prefix
|
107
|
+
--"remark_schema.remark_type.WR1" schema scope - type where
|
108
|
+
--"remark_schema.remark_type.WR1" schema scope - type where, with prefix
|
109
|
+
--"remark_schema.remark_type.WR1" universal scope - type where
|
110
|
+
--"remark_schema.remark_type.WR1" universal scope - type where, with prefix
|
111
|
+
--"remark_schema.remark_type.IP1" type scope - type informal proposition
|
112
|
+
--"remark_schema.remark_type.IP1" type scope - type informal proposition, with prefix
|
113
|
+
--"remark_schema.remark_type.IP1" schema scope - type informal proposition
|
114
|
+
--"remark_schema.remark_type.IP1" schema scope - type informal proposition, with prefix
|
115
|
+
--"remark_schema.remark_type.IP1" universal scope - type informal proposition
|
116
|
+
--"remark_schema.remark_type.IP1" universal scope - type informal proposition, with prefix
|
105
117
|
--"remark_schema.remark_entity" schema scope - entity
|
106
118
|
--"remark_schema.remark_entity" universal scope - entity
|
107
119
|
--"remark_schema.remark_entity.remark_attribute" entity scope - entity attribute
|
@@ -116,9 +128,18 @@ several physical lines.
|
|
116
128
|
--"remark_schema.remark_entity.remark_unique" entity scope - entity unique
|
117
129
|
--"remark_schema.remark_entity.remark_unique" schema scope - entity unique
|
118
130
|
--"remark_schema.remark_entity.remark_unique" universal scope - entity unique
|
119
|
-
--"remark_schema.remark_entity.
|
120
|
-
--"remark_schema.remark_entity.
|
121
|
-
--"remark_schema.remark_entity.
|
131
|
+
--"remark_schema.remark_entity.WR1" entity scope - entity where
|
132
|
+
--"remark_schema.remark_entity.WR1" entity scope - entity where, with prefix
|
133
|
+
--"remark_schema.remark_entity.WR1" schema scope - entity where
|
134
|
+
--"remark_schema.remark_entity.WR1" schema scope - entity where, with prefix
|
135
|
+
--"remark_schema.remark_entity.WR1" universal scope - entity where
|
136
|
+
--"remark_schema.remark_entity.WR1" universal scope - entity where, with prefix
|
137
|
+
--"remark_schema.remark_entity.IP1" entity scope - entity informal proposition
|
138
|
+
--"remark_schema.remark_entity.IP1" entity scope - entity informal proposition, with prefix
|
139
|
+
--"remark_schema.remark_entity.IP1" schema scope - entity informal proposition
|
140
|
+
--"remark_schema.remark_entity.IP1" schema scope - entity informal proposition, with prefix
|
141
|
+
--"remark_schema.remark_entity.IP1" universal scope - entity informal proposition
|
142
|
+
--"remark_schema.remark_entity.IP1" universal scope - entity informal proposition, with prefix
|
122
143
|
--"remark_schema.remark_subtype_constraint" schema scope - subtype constraint
|
123
144
|
--"remark_schema.remark_subtype_constraint" universal scope - subtype constraint
|
124
145
|
--"remark_schema.remark_function" schema scope - function
|
@@ -129,9 +150,12 @@ several physical lines.
|
|
129
150
|
--"remark_schema.remark_function.remark_type" function scope - function type
|
130
151
|
--"remark_schema.remark_function.remark_type" schema scope - function type
|
131
152
|
--"remark_schema.remark_function.remark_type" universal scope - function type
|
132
|
-
--"remark_schema.remark_function.remark_enumeration_item" function scope - function enumeration item
|
133
|
-
--"remark_schema.remark_function.remark_enumeration_item"
|
134
|
-
--"remark_schema.remark_function.remark_enumeration_item"
|
153
|
+
--"remark_schema.remark_function.remark_type.remark_enumeration_item" function scope - function enumeration item
|
154
|
+
--"remark_schema.remark_function.remark_type.remark_enumeration_item" function scope - function enumeration item, on the same level as the type
|
155
|
+
--"remark_schema.remark_function.remark_type.remark_enumeration_item" schema scope - function enumeration item
|
156
|
+
--"remark_schema.remark_function.remark_type.remark_enumeration_item" schema scope - function enumeration item, on the same level as the type
|
157
|
+
--"remark_schema.remark_function.remark_type.remark_enumeration_item" universal scope - function enumeration item
|
158
|
+
--"remark_schema.remark_function.remark_type.remark_enumeration_item" universal scope - function enumeration item, on the same level as the type
|
135
159
|
--"remark_schema.remark_function.remark_constant" function scope - function constant
|
136
160
|
--"remark_schema.remark_function.remark_constant" schema scope - function constant
|
137
161
|
--"remark_schema.remark_function.remark_constant" universal scope - function constant
|
@@ -146,9 +170,12 @@ several physical lines.
|
|
146
170
|
--"remark_schema.remark_procedure.remark_type" procedure scope - procedure type
|
147
171
|
--"remark_schema.remark_procedure.remark_type" schema scope - procedure type
|
148
172
|
--"remark_schema.remark_procedure.remark_type" universal scope - procedure type
|
149
|
-
--"remark_schema.remark_procedure.remark_enumeration_item" procedure scope - procedure enumeration item
|
150
|
-
--"remark_schema.remark_procedure.remark_enumeration_item"
|
151
|
-
--"remark_schema.remark_procedure.remark_enumeration_item"
|
173
|
+
--"remark_schema.remark_procedure.remark_type.remark_enumeration_item" procedure scope - procedure enumeration item
|
174
|
+
--"remark_schema.remark_procedure.remark_type.remark_enumeration_item" procedure scope - procedure enumeration item, on the same level as the type
|
175
|
+
--"remark_schema.remark_procedure.remark_type.remark_enumeration_item" schema scope - procedure enumeration item
|
176
|
+
--"remark_schema.remark_procedure.remark_type.remark_enumeration_item" schema scope - procedure enumeration item, on the same level as the type
|
177
|
+
--"remark_schema.remark_procedure.remark_type.remark_enumeration_item" universal scope - procedure enumeration item
|
178
|
+
--"remark_schema.remark_procedure.remark_type.remark_enumeration_item" universal scope - procedure enumeration item, on the same level as the type
|
152
179
|
--"remark_schema.remark_procedure.remark_constant" procedure scope - procedure constant
|
153
180
|
--"remark_schema.remark_procedure.remark_constant" schema scope - procedure constant
|
154
181
|
--"remark_schema.remark_procedure.remark_constant" universal scope - procedure constant
|
@@ -160,15 +187,27 @@ several physical lines.
|
|
160
187
|
--"remark_schema.remark_rule.remark_type" rule scope - rule type
|
161
188
|
--"remark_schema.remark_rule.remark_type" schema scope - rule type
|
162
189
|
--"remark_schema.remark_rule.remark_type" universal scope - rule type
|
163
|
-
--"remark_schema.remark_rule.remark_enumeration_item" rule scope - rule enumeration item
|
164
|
-
--"remark_schema.remark_rule.remark_enumeration_item"
|
165
|
-
--"remark_schema.remark_rule.remark_enumeration_item"
|
190
|
+
--"remark_schema.remark_rule.remark_type.remark_enumeration_item" rule scope - rule enumeration item
|
191
|
+
--"remark_schema.remark_rule.remark_type.remark_enumeration_item" rule scope - rule enumeration item, on the same level as the type
|
192
|
+
--"remark_schema.remark_rule.remark_type.remark_enumeration_item" schema scope - rule enumeration item
|
193
|
+
--"remark_schema.remark_rule.remark_type.remark_enumeration_item" schema scope - rule enumeration item, on the same level as the type
|
194
|
+
--"remark_schema.remark_rule.remark_type.remark_enumeration_item" universal scope - rule enumeration item
|
195
|
+
--"remark_schema.remark_rule.remark_type.remark_enumeration_item" universal scope - rule enumeration item, on the same level as the type
|
166
196
|
--"remark_schema.remark_rule.remark_constant" rule scope - rule constant
|
167
197
|
--"remark_schema.remark_rule.remark_constant" schema scope - rule constant
|
168
198
|
--"remark_schema.remark_rule.remark_constant" universal scope - rule constant
|
169
199
|
--"remark_schema.remark_rule.remark_variable" rule scope - rule variable
|
170
200
|
--"remark_schema.remark_rule.remark_variable" schema scope - rule variable
|
171
201
|
--"remark_schema.remark_rule.remark_variable" universal scope - rule variable
|
172
|
-
--"remark_schema.remark_rule.
|
173
|
-
--"remark_schema.remark_rule.
|
174
|
-
--"remark_schema.remark_rule.
|
202
|
+
--"remark_schema.remark_rule.WR1" rule scope - rule where
|
203
|
+
--"remark_schema.remark_rule.WR1" rule scope - rule where, with prefix
|
204
|
+
--"remark_schema.remark_rule.WR1" schema scope - rule where
|
205
|
+
--"remark_schema.remark_rule.WR1" schema scope - rule where, with prefix
|
206
|
+
--"remark_schema.remark_rule.WR1" universal scope - rule where
|
207
|
+
--"remark_schema.remark_rule.WR1" universal scope - rule where, with prefix
|
208
|
+
--"remark_schema.remark_rule.IP1" rule scope - rule informal proposition
|
209
|
+
--"remark_schema.remark_rule.IP1" rule scope - rule informal proposition, with prefix
|
210
|
+
--"remark_schema.remark_rule.IP1" schema scope - rule informal proposition
|
211
|
+
--"remark_schema.remark_rule.IP1" schema scope - rule informal proposition, with prefix
|
212
|
+
--"remark_schema.remark_rule.IP1" universal scope - rule informal proposition
|
213
|
+
--"remark_schema.remark_rule.IP1" universal scope - rule informal proposition, with prefix
|
@@ -0,0 +1,16 @@
|
|
1
|
+
SCHEMA entity_schema;
|
2
|
+
-- body
|
3
|
+
ENTITY empty_entity; END_ENTITY;
|
4
|
+
END_SCHEMA;
|
5
|
+
|
6
|
+
SCHEMA version_entity_schema 'version';
|
7
|
+
-- body
|
8
|
+
ENTITY empty_entity; END_ENTITY;
|
9
|
+
END_SCHEMA;
|
10
|
+
|
11
|
+
SCHEMA version_interface_entity_schema 'version';
|
12
|
+
USE FROM contract_schema;
|
13
|
+
REFERENCE FROM contract_schema;
|
14
|
+
-- body
|
15
|
+
ENTITY empty_entity; END_ENTITY;
|
16
|
+
END_SCHEMA;
|
@@ -1,11 +1,14 @@
|
|
1
|
+
-- schema
|
1
2
|
SCHEMA syntax_schema 'version';
|
2
3
|
|
3
4
|
-- interfaces
|
4
5
|
USE FROM contract_schema;
|
5
6
|
USE FROM contract_schema (contract);
|
7
|
+
USE FROM contract_schema (contract, contract2);
|
6
8
|
USE FROM contract_schema (contract AS contract2);
|
7
9
|
REFERENCE FROM contract_schema;
|
8
10
|
REFERENCE FROM contract_schema (contract);
|
11
|
+
REFERENCE FROM contract_schema (contract, contract2);
|
9
12
|
REFERENCE FROM contract_schema (contract AS contract2);
|
10
13
|
|
11
14
|
-- constants
|
@@ -14,7 +17,7 @@ CONSTANT empty_constant : BOOLEAN := TRUE; END_CONSTANT;
|
|
14
17
|
-- types
|
15
18
|
TYPE empty_type = BOOLEAN; END_TYPE;
|
16
19
|
TYPE where_type = BOOLEAN; WHERE TRUE; END_TYPE;
|
17
|
-
TYPE where_label_type = BOOLEAN; WHERE WR1 : TRUE; END_TYPE;
|
20
|
+
TYPE where_label_type = BOOLEAN; WHERE WR1 : TRUE; END_TYPE;
|
18
21
|
|
19
22
|
-- entities
|
20
23
|
ENTITY empty_entity; END_ENTITY;
|
@@ -114,197 +117,207 @@ RULE variable_expression_rule FOR (empty_entity); LOCAL test : BOOLEAN := TRUE;
|
|
114
117
|
RULE multiple_variable_expression_rule FOR (empty_entity); LOCAL test : BOOLEAN := TRUE; test2 : BOOLEAN := TRUE; END_LOCAL; WHERE TRUE; END_RULE;
|
115
118
|
RULE multiple_shorthand_variable_expression_rule FOR (empty_entity); LOCAL test, test2 : BOOLEAN := TRUE; END_LOCAL; WHERE TRUE; END_RULE;
|
116
119
|
RULE statement_rule FOR (empty_entity); ; WHERE TRUE; END_RULE;
|
120
|
+
RULE where_label_rule FOR (empty_entity); WHERE WR1 : TRUE; END_RULE;
|
117
121
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
122
|
+
PROCEDURE statements;
|
123
|
+
-- statements
|
124
|
+
PROCEDURE alias_simple_reference_statement; ALIAS test FOR test; ; END_ALIAS; END_PROCEDURE;
|
125
|
+
PROCEDURE alias_attribute_reference_statement; ALIAS test FOR test.test; ; END_ALIAS; END_PROCEDURE;
|
126
|
+
PROCEDURE alias_group_reference_statement; ALIAS test FOR test\test; ; END_ALIAS; END_PROCEDURE;
|
127
|
+
PROCEDURE alias_index_reference_statement; ALIAS test FOR test[1]; ; END_ALIAS; END_PROCEDURE;
|
128
|
+
PROCEDURE alias_index2_reference_statement; ALIAS test FOR test[1:9]; ; END_ALIAS; END_PROCEDURE;
|
129
|
+
PROCEDURE assignment_simple_reference_statement; test := TRUE; END_PROCEDURE;
|
130
|
+
PROCEDURE assignment_attribute_reference_statement; test.test := TRUE; END_PROCEDURE;
|
131
|
+
PROCEDURE assignment_group_reference_statement; test\test := TRUE; END_PROCEDURE;
|
132
|
+
PROCEDURE assignment_index_reference_statement; test[1] := TRUE; END_PROCEDURE;
|
133
|
+
PROCEDURE assignment_index2_reference_statement; test[1:9] := TRUE; END_PROCEDURE;
|
134
|
+
PROCEDURE case_statement; CASE test OF TRUE : ; END_CASE; END_PROCEDURE;
|
135
|
+
PROCEDURE case_multiple_statement; CASE test OF TRUE : ; TRUE : ; END_CASE; END_PROCEDURE;
|
136
|
+
PROCEDURE case_multiple_shorthand_statement; CASE test OF TRUE, TRUE : ; END_CASE; END_PROCEDURE;
|
137
|
+
PROCEDURE case_otherwise_statement; CASE test OF TRUE : ; OTHERWISE : ; END_CASE; END_PROCEDURE;
|
138
|
+
PROCEDURE compound_statement; BEGIN ; END; END_PROCEDURE;
|
139
|
+
PROCEDURE escape_statement; ESCAPE; END_PROCEDURE;
|
140
|
+
PROCEDURE if_statement; IF TRUE THEN ; END_IF; END_PROCEDURE;
|
141
|
+
PROCEDURE if2_statement; IF TRUE THEN ; ; END_IF; END_PROCEDURE;
|
142
|
+
PROCEDURE if_else_statement; IF TRUE THEN ; ELSE ; END_IF; END_PROCEDURE;
|
143
|
+
PROCEDURE if2_else_statement; IF TRUE THEN ; ; ELSE ; END_IF; END_PROCEDURE;
|
144
|
+
PROCEDURE if_else2_statement; IF TRUE THEN ; ELSE ; ; END_IF; END_PROCEDURE;
|
145
|
+
PROCEDURE if2_else2_statement; IF TRUE THEN ; ; ELSE ; ; END_IF; END_PROCEDURE;
|
146
|
+
PROCEDURE null_statement; ; END_PROCEDURE;
|
147
|
+
PROCEDURE call_statement; empty_procedure; END_PROCEDURE;
|
148
|
+
PROCEDURE call_parameter_statement; empty_procedure(TRUE); END_PROCEDURE;
|
149
|
+
PROCEDURE call_parameter2_statement; empty_procedure(TRUE, TRUE); END_PROCEDURE;
|
150
|
+
PROCEDURE call_insert_statement; INSERT(TRUE); END_PROCEDURE;
|
151
|
+
PROCEDURE call_remove_statement; REMOVE(TRUE); END_PROCEDURE;
|
152
|
+
PROCEDURE repeat_statement; REPEAT; ; END_REPEAT; END_PROCEDURE;
|
153
|
+
PROCEDURE repeat_variable_statement; REPEAT test := 1 TO 9; ; END_REPEAT; END_PROCEDURE;
|
154
|
+
PROCEDURE repeat_variable_increment_statement; REPEAT test := 1 TO 9 BY 2; ; END_REPEAT; END_PROCEDURE;
|
155
|
+
PROCEDURE repeat_while_statement; REPEAT WHILE TRUE; ; END_REPEAT; END_PROCEDURE;
|
156
|
+
PROCEDURE repeat_until_statement; REPEAT UNTIL TRUE; ; END_REPEAT; END_PROCEDURE;
|
157
|
+
PROCEDURE return_statement; RETURN; END_PROCEDURE;
|
158
|
+
PROCEDURE return_expression_statement; RETURN (TRUE); END_PROCEDURE;
|
159
|
+
PROCEDURE skip_statement; SKIP; END_PROCEDURE;
|
160
|
+
END_PROCEDURE;
|
131
161
|
|
132
|
-
|
133
|
-
|
134
|
-
TYPE
|
135
|
-
TYPE
|
136
|
-
TYPE
|
137
|
-
TYPE
|
138
|
-
TYPE
|
139
|
-
TYPE
|
140
|
-
TYPE
|
141
|
-
TYPE
|
142
|
-
TYPE
|
143
|
-
TYPE
|
144
|
-
TYPE
|
162
|
+
PROCEDURE types;
|
163
|
+
-- simple types
|
164
|
+
TYPE binary_type = BINARY; END_TYPE;
|
165
|
+
TYPE binary_width_type = BINARY (3); END_TYPE;
|
166
|
+
TYPE binary_width_fixed_type = BINARY (3) FIXED; END_TYPE;
|
167
|
+
TYPE boolean_type = BOOLEAN; END_TYPE;
|
168
|
+
TYPE integer_type = INTEGER; END_TYPE;
|
169
|
+
TYPE logical_type = LOGICAL; END_TYPE;
|
170
|
+
TYPE number_type = NUMBER; END_TYPE;
|
171
|
+
TYPE real_type = REAL; END_TYPE;
|
172
|
+
TYPE real_precision_type = REAL (3); END_TYPE;
|
173
|
+
TYPE string_type = STRING; END_TYPE;
|
174
|
+
TYPE string_width_type = STRING (3); END_TYPE;
|
175
|
+
TYPE string_width_fixed_type = STRING (3) FIXED; END_TYPE;
|
145
176
|
|
146
|
-
--
|
147
|
-
TYPE
|
148
|
-
TYPE
|
149
|
-
TYPE
|
150
|
-
TYPE
|
151
|
-
TYPE
|
152
|
-
TYPE
|
153
|
-
TYPE
|
154
|
-
TYPE
|
155
|
-
TYPE
|
156
|
-
TYPE
|
157
|
-
TYPE
|
177
|
+
-- aggregation types
|
178
|
+
TYPE array_type = ARRAY [1:9] OF STRING; END_TYPE;
|
179
|
+
TYPE array_optional_type = ARRAY [1:9] OF OPTIONAL STRING; END_TYPE;
|
180
|
+
TYPE array_unique_type = ARRAY [1:9] OF UNIQUE STRING; END_TYPE;
|
181
|
+
TYPE array_optional_unique_type = ARRAY [1:9] OF OPTIONAL UNIQUE STRING; END_TYPE;
|
182
|
+
TYPE bag_type = BAG OF STRING; END_TYPE;
|
183
|
+
TYPE bag_bound_type = BAG [1:9] OF STRING; END_TYPE;
|
184
|
+
TYPE list_type = LIST OF STRING; END_TYPE;
|
185
|
+
TYPE list_bound_type = LIST [1:9] OF STRING; END_TYPE;
|
186
|
+
TYPE list_unique_type = LIST OF UNIQUE STRING; END_TYPE;
|
187
|
+
TYPE list_bound_unique_type = LIST [1:9] OF UNIQUE STRING; END_TYPE;
|
188
|
+
TYPE set_type = SET OF STRING; END_TYPE;
|
189
|
+
TYPE set_bound_type = SET [1:9] OF STRING; END_TYPE;
|
158
190
|
|
159
|
-
--
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
FUNCTION case_multiple_shorthand_statement : BOOLEAN; CASE test OF TRUE, TRUE : ; END_CASE; END_FUNCTION;
|
173
|
-
FUNCTION case_otherwise_statement : BOOLEAN; CASE test OF TRUE : ; OTHERWISE : ; END_CASE; END_FUNCTION;
|
174
|
-
FUNCTION compound_statement : BOOLEAN; BEGIN ; END; END_FUNCTION;
|
175
|
-
FUNCTION escape_statement : BOOLEAN; ESCAPE; END_FUNCTION;
|
176
|
-
FUNCTION if_statement : BOOLEAN; IF TRUE THEN ; END_IF; END_FUNCTION;
|
177
|
-
FUNCTION if2_statement : BOOLEAN; IF TRUE THEN ; ; END_IF; END_FUNCTION;
|
178
|
-
FUNCTION if_else_statement : BOOLEAN; IF TRUE THEN ; ELSE ; END_IF; END_FUNCTION;
|
179
|
-
FUNCTION if2_else_statement : BOOLEAN; IF TRUE THEN ; ; ELSE ; END_IF; END_FUNCTION;
|
180
|
-
FUNCTION if_else2_statement : BOOLEAN; IF TRUE THEN ; ELSE ; ; END_IF; END_FUNCTION;
|
181
|
-
FUNCTION if2_else2_statement : BOOLEAN; IF TRUE THEN ; ; ELSE ; ; END_IF; END_FUNCTION;
|
182
|
-
FUNCTION null_statement : BOOLEAN; ; END_FUNCTION;
|
183
|
-
FUNCTION call_statement : BOOLEAN; empty_procedure; END_FUNCTION;
|
184
|
-
FUNCTION call_parameter_statement : BOOLEAN; empty_procedure(TRUE); END_FUNCTION;
|
185
|
-
FUNCTION call_parameter2_statement : BOOLEAN; empty_procedure(TRUE, TRUE); END_FUNCTION;
|
186
|
-
FUNCTION call_insert_statement : BOOLEAN; INSERT(TRUE); END_FUNCTION;
|
187
|
-
FUNCTION call_remove_statement : BOOLEAN; REMOVE(TRUE); END_FUNCTION;
|
188
|
-
FUNCTION repeat_statement : BOOLEAN; REPEAT; ; END_REPEAT; END_FUNCTION;
|
189
|
-
FUNCTION repeat_variable_statement : BOOLEAN; REPEAT test := 1 TO 9; ; END_REPEAT; END_FUNCTION;
|
190
|
-
FUNCTION repeat_variable_increment_statement : BOOLEAN; REPEAT test := 1 TO 9 BY 2; ; END_REPEAT; END_FUNCTION;
|
191
|
-
FUNCTION repeat_while_statement : BOOLEAN; REPEAT WHILE TRUE; ; END_REPEAT; END_FUNCTION;
|
192
|
-
FUNCTION repeat_until_statement : BOOLEAN; REPEAT UNTIL TRUE; ; END_REPEAT; END_FUNCTION;
|
193
|
-
FUNCTION return_statement : BOOLEAN; RETURN; END_FUNCTION;
|
194
|
-
FUNCTION return_expression_statement : BOOLEAN; RETURN (TRUE); END_FUNCTION;
|
195
|
-
FUNCTION skip_statement : BOOLEAN; SKIP; END_FUNCTION;
|
191
|
+
-- constructed types
|
192
|
+
TYPE select_type = SELECT; END_TYPE;
|
193
|
+
TYPE select_extensible_type = EXTENSIBLE SELECT; END_TYPE;
|
194
|
+
TYPE select_extensible_generic_entity_type = EXTENSIBLE GENERIC_ENTITY SELECT; END_TYPE;
|
195
|
+
TYPE select_list_type = SELECT (empty_type); END_TYPE;
|
196
|
+
TYPE select_extension_type_ref_type = SELECT BASED_ON select_type; END_TYPE;
|
197
|
+
TYPE select_extension_type_ref_list_type = SELECT BASED_ON select_type WITH (empty_type); END_TYPE;
|
198
|
+
TYPE enumeration_type = ENUMERATION; END_TYPE;
|
199
|
+
TYPE enumeration_extensible_type = EXTENSIBLE ENUMERATION; END_TYPE;
|
200
|
+
TYPE enumeration_list_type = ENUMERATION OF (test); END_TYPE;
|
201
|
+
TYPE enumeration_extension_type_ref_type = ENUMERATION BASED_ON enumeration_type; END_TYPE;
|
202
|
+
TYPE enumeration_extension_type_ref_list_type = ENUMERATION BASED_ON enumeration_type WITH (test); END_TYPE;
|
203
|
+
END_PROCEDURE;
|
196
204
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
205
|
+
PROCEDURE expressions;
|
206
|
+
LOCAL
|
207
|
+
-- literal expressions
|
208
|
+
binary_expression : BOOLEAN := %011110000111100001111000;
|
209
|
+
integer_expression : BOOLEAN := 999;
|
210
|
+
true_logical_expression : BOOLEAN := TRUE;
|
211
|
+
false_logical_expression : BOOLEAN := FALSE;
|
212
|
+
unknown_logical_expression : BOOLEAN := UNKNOWN;
|
213
|
+
real_expression : BOOLEAN := 999.999;
|
214
|
+
simple_string_expression : BOOLEAN := 'xxx';
|
215
|
+
utf8_simple_string_expression : BOOLEAN := 'UTF8 test: Příliš žluťoučký kůň úpěl ďábelské ódy.';
|
216
|
+
encoded_string_expression : BOOLEAN := "000000780000007800000078";
|
206
217
|
|
207
|
-
-- constant expressions
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
218
|
+
-- constant expressions
|
219
|
+
const_e_expression : BOOLEAN := CONST_E;
|
220
|
+
indeterminate_expression : BOOLEAN := ?;
|
221
|
+
pi_expression : BOOLEAN := PI;
|
222
|
+
self_expression : BOOLEAN := SELF;
|
212
223
|
|
213
|
-
-- function expressions
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
224
|
+
-- function expressions
|
225
|
+
abs_expression : BOOLEAN := ABS(TRUE);
|
226
|
+
acos_expression : BOOLEAN := ACOS(TRUE);
|
227
|
+
asin_expression : BOOLEAN := ASIN(TRUE);
|
228
|
+
atan_expression : BOOLEAN := ATAN(TRUE);
|
229
|
+
blength_expression : BOOLEAN := BLENGTH(TRUE);
|
230
|
+
cos_expression : BOOLEAN := COS(TRUE);
|
231
|
+
exists_expression : BOOLEAN := EXISTS(TRUE);
|
232
|
+
exp_expression : BOOLEAN := EXP(TRUE);
|
233
|
+
format_expression : BOOLEAN := FORMAT(TRUE);
|
234
|
+
hibound_expression : BOOLEAN := HIBOUND(TRUE);
|
235
|
+
hiindex_expression : BOOLEAN := HIINDEX(TRUE);
|
236
|
+
length_expression : BOOLEAN := LENGTH(TRUE);
|
237
|
+
lobound_expression : BOOLEAN := LOBOUND(TRUE);
|
238
|
+
loindex_expression : BOOLEAN := LOINDEX(TRUE);
|
239
|
+
log_expression : BOOLEAN := LOG(TRUE);
|
240
|
+
log2_expression : BOOLEAN := LOG2(TRUE);
|
241
|
+
log10_expression : BOOLEAN := LOG10(TRUE);
|
242
|
+
nvl_expression : BOOLEAN := NVL(TRUE);
|
243
|
+
odd_expression : BOOLEAN := ODD(TRUE);
|
244
|
+
rolesof_expression : BOOLEAN := ROLESOF(TRUE);
|
245
|
+
sin_expression : BOOLEAN := SIN(TRUE);
|
246
|
+
sizeof_expression : BOOLEAN := SIZEOF(TRUE);
|
247
|
+
sqrt_expression : BOOLEAN := SQRT(TRUE);
|
248
|
+
tan_expression : BOOLEAN := TAN(TRUE);
|
249
|
+
typeof_expression : BOOLEAN := TYPEOF(TRUE);
|
250
|
+
usedin_expression : BOOLEAN := USEDIN(TRUE);
|
251
|
+
value_expression : BOOLEAN := VALUE(TRUE);
|
252
|
+
value_in_expression : BOOLEAN := VALUE_IN(TRUE);
|
253
|
+
value_unique_expression : BOOLEAN := VALUE_UNIQUE(TRUE);
|
243
254
|
|
244
|
-
-- operator expressions
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
255
|
+
-- operator expressions
|
256
|
+
plus_expression : BOOLEAN := +4;
|
257
|
+
plus_addition_expression : BOOLEAN := +(4 + 2);
|
258
|
+
minus_expression : BOOLEAN := -4;
|
259
|
+
minus_addition_expression : BOOLEAN := -(4 + 2);
|
260
|
+
addition_expression : BOOLEAN := 4 + 2;
|
261
|
+
subtraction_expression : BOOLEAN := 4 - 2;
|
262
|
+
multiplication_expression : BOOLEAN := 4 * 2;
|
263
|
+
real_division_expression : BOOLEAN := 4 / 2;
|
264
|
+
integer_division_expression : BOOLEAN := 4 DIV 2;
|
265
|
+
modulo_expression : BOOLEAN := 4 MOD 2;
|
266
|
+
exponentiation_expression : BOOLEAN := 4 ** 2;
|
267
|
+
addition_addition_expression : BOOLEAN := 4 + 2 + 1;
|
268
|
+
subtraction_subtraction_expression : BOOLEAN := 4 - 2 - 1;
|
269
|
+
addition_subtraction_expression : BOOLEAN := 4 + 2 - 1;
|
270
|
+
subtraction_addition_expression : BOOLEAN := 4 - 2 + 1;
|
271
|
+
addition_multiplication_expression : BOOLEAN := 8 + 4 * 2;
|
272
|
+
multiplication_addition_expression : BOOLEAN := 8 * 4 + 2;
|
273
|
+
parenthesis_addition_multiplication_expression : BOOLEAN := (8 + 4) * 2;
|
274
|
+
multiplication_parenthesis_addition_expression : BOOLEAN := 8 * (4 + 2);
|
275
|
+
equal_expression : BOOLEAN := 4 = 2;
|
276
|
+
not_equal_expression : BOOLEAN := 4 <> 2;
|
277
|
+
instance_equal_expression : BOOLEAN := 4 :=: 2;
|
278
|
+
instance_not_equal_expression : BOOLEAN := 4 :<>: 2;
|
279
|
+
lt_expression : BOOLEAN := 4 < 2;
|
280
|
+
gt_expression : BOOLEAN := 4 > 2;
|
281
|
+
lte_expression : BOOLEAN := 4 <= 2;
|
282
|
+
gte_expression : BOOLEAN := 4 >= 2;
|
283
|
+
not_expression : BOOLEAN := NOT TRUE;
|
284
|
+
not_or_expression : BOOLEAN := NOT (TRUE OR FALSE);
|
285
|
+
or_expression : BOOLEAN := TRUE OR FALSE;
|
286
|
+
and_expression : BOOLEAN := TRUE AND FALSE;
|
287
|
+
or_or_expression : BOOLEAN := TRUE OR FALSE OR TRUE;
|
288
|
+
and_and_expression : BOOLEAN := TRUE AND FALSE AND TRUE;
|
289
|
+
or_and_expression : BOOLEAN := TRUE OR FALSE AND TRUE;
|
290
|
+
and_or_expression : BOOLEAN := TRUE AND FALSE OR TRUE;
|
291
|
+
parenthesis_or_and_expression : BOOLEAN := (TRUE OR FALSE) AND TRUE;
|
292
|
+
and_parenthesis_or_expression : BOOLEAN := TRUE AND (FALSE OR TRUE);
|
293
|
+
combine_expression : BOOLEAN := test || test;
|
294
|
+
in_expression : BOOLEAN := TRUE IN [TRUE];
|
295
|
+
like_expression : BOOLEAN := 'xxx' LIKE 'xxx';
|
285
296
|
|
286
|
-
-- aggregate initializer expressions
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
297
|
+
-- aggregate initializer expressions
|
298
|
+
aggregate_initializer_expression : BOOLEAN := [4];
|
299
|
+
repeated_aggregate_initializer_expression : BOOLEAN := [4:2];
|
300
|
+
complex_aggregate_initializer_expression : BOOLEAN := [4 + 2];
|
301
|
+
complex_repeated_aggregate_initializer_expression : BOOLEAN := [4 + 2:4 + 2];
|
291
302
|
|
292
|
-
-- function call or entity constructor expressions
|
293
|
-
|
303
|
+
-- function call or entity constructor expressions
|
304
|
+
call_expression : BOOLEAN := parameter_function(TRUE);
|
294
305
|
|
295
|
-
-- reference expressions
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
306
|
+
-- reference expressions
|
307
|
+
simple_reference_expression : BOOLEAN := simple_string_expression;
|
308
|
+
attribute_reference_expression : BOOLEAN := simple_string_expression.test;
|
309
|
+
group_reference_expression : BOOLEAN := simple_string_expression\test;
|
310
|
+
index_reference_expression : BOOLEAN := simple_string_expression[1];
|
311
|
+
index2_reference_expression : BOOLEAN := simple_string_expression[1:9];
|
301
312
|
|
302
|
-
-- interval expressions
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
313
|
+
-- interval expressions
|
314
|
+
lt_lt_interval_expression : BOOLEAN := {1 < 5 < 9};
|
315
|
+
lte_lt_interval_expression : BOOLEAN := {1 <= 5 < 9};
|
316
|
+
lt_lte_interval_expression : BOOLEAN := {1 < 5 <= 9};
|
317
|
+
lte_lte_interval_expression : BOOLEAN := {1 <= 5 <= 9};
|
307
318
|
|
308
|
-
-- query expressions
|
309
|
-
|
319
|
+
-- query expressions
|
320
|
+
query_expression : BOOLEAN := QUERY(test <* test2 | TRUE);
|
321
|
+
END_LOCAL;
|
322
|
+
END_PROCEDURE;
|
310
323
|
END_SCHEMA;
|