expressir 0.2.26 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +50 -5
  3. data/.github/workflows/release.yml +8 -0
  4. data/.gitignore +2 -2
  5. data/.hound.yml +3 -0
  6. data/.rubocop.yml +6 -506
  7. data/.yardopts +11 -0
  8. data/Rakefile +3 -0
  9. data/demo.rb +5 -5
  10. data/exe/format +8 -8
  11. data/exe/format-test +11 -11
  12. data/expressir.gemspec +4 -2
  13. data/ext/express-parser/express_parser.cpp +4358 -2954
  14. data/ext/express-parser/extconf.rb +6 -4
  15. data/lib/expressir/cli.rb +0 -6
  16. data/lib/expressir/express/cache.rb +51 -0
  17. data/lib/expressir/{express_exp → express}/formatter.rb +304 -237
  18. data/lib/expressir/{express_exp → express}/hyperlink_formatter.rb +16 -2
  19. data/lib/expressir/{express_exp → express}/model_visitor.rb +2 -1
  20. data/lib/expressir/{express_exp → express}/parser.rb +19 -13
  21. data/lib/expressir/{express_exp → express}/resolve_references_model_visitor.rb +9 -7
  22. data/lib/expressir/express/schema_head_formatter.rb +23 -0
  23. data/lib/expressir/{express_exp → express}/visitor.rb +318 -270
  24. data/lib/expressir/model/cache.rb +6 -2
  25. data/lib/expressir/model/data_type.rb +9 -0
  26. data/lib/expressir/model/data_types/aggregate.rb +31 -0
  27. data/lib/expressir/model/data_types/array.rb +31 -0
  28. data/lib/expressir/model/data_types/bag.rb +25 -0
  29. data/lib/expressir/model/data_types/binary.rb +22 -0
  30. data/lib/expressir/model/data_types/boolean.rb +10 -0
  31. data/lib/expressir/model/data_types/enumeration.rb +25 -0
  32. data/lib/expressir/model/data_types/enumeration_item.rb +26 -0
  33. data/lib/expressir/model/data_types/generic.rb +26 -0
  34. data/lib/expressir/model/data_types/generic_entity.rb +26 -0
  35. data/lib/expressir/model/data_types/integer.rb +10 -0
  36. data/lib/expressir/model/data_types/list.rb +28 -0
  37. data/lib/expressir/model/data_types/logical.rb +10 -0
  38. data/lib/expressir/model/data_types/number.rb +10 -0
  39. data/lib/expressir/model/data_types/real.rb +19 -0
  40. data/lib/expressir/model/data_types/select.rb +28 -0
  41. data/lib/expressir/model/data_types/set.rb +25 -0
  42. data/lib/expressir/model/data_types/string.rb +22 -0
  43. data/lib/expressir/model/declaration.rb +9 -0
  44. data/lib/expressir/model/declarations/attribute.rb +47 -0
  45. data/lib/expressir/model/declarations/constant.rb +34 -0
  46. data/lib/expressir/model/declarations/entity.rb +53 -0
  47. data/lib/expressir/model/declarations/function.rb +67 -0
  48. data/lib/expressir/model/declarations/interface.rb +28 -0
  49. data/lib/expressir/model/declarations/interface_item.rb +23 -0
  50. data/lib/expressir/model/declarations/interfaced_item.rb +37 -0
  51. data/lib/expressir/model/declarations/parameter.rb +34 -0
  52. data/lib/expressir/model/declarations/procedure.rb +64 -0
  53. data/lib/expressir/model/declarations/remark_item.rb +21 -0
  54. data/lib/expressir/model/declarations/rule.rb +71 -0
  55. data/lib/expressir/model/declarations/schema.rb +117 -0
  56. data/lib/expressir/model/declarations/schema_version.rb +22 -0
  57. data/lib/expressir/model/declarations/schema_version_item.rb +22 -0
  58. data/lib/expressir/model/declarations/subtype_constraint.rb +40 -0
  59. data/lib/expressir/model/declarations/type.rb +45 -0
  60. data/lib/expressir/model/declarations/unique_rule.rb +31 -0
  61. data/lib/expressir/model/declarations/variable.rb +34 -0
  62. data/lib/expressir/model/declarations/where_rule.rb +31 -0
  63. data/lib/expressir/model/expression.rb +9 -0
  64. data/lib/expressir/model/expressions/aggregate_initializer.rb +7 -3
  65. data/lib/expressir/model/expressions/aggregate_initializer_item.rb +22 -0
  66. data/lib/expressir/model/expressions/binary_expression.rb +16 -5
  67. data/lib/expressir/model/expressions/entity_constructor.rb +9 -4
  68. data/lib/expressir/model/expressions/function_call.rb +22 -0
  69. data/lib/expressir/model/expressions/interval.rb +17 -6
  70. data/lib/expressir/model/expressions/query_expression.rb +11 -7
  71. data/lib/expressir/model/expressions/unary_expression.rb +9 -3
  72. data/lib/expressir/model/identifier.rb +26 -4
  73. data/lib/expressir/model/literal.rb +9 -0
  74. data/lib/expressir/model/literals/binary.rb +6 -2
  75. data/lib/expressir/model/literals/integer.rb +6 -2
  76. data/lib/expressir/model/literals/logical.rb +6 -2
  77. data/lib/expressir/model/literals/real.rb +6 -2
  78. data/lib/expressir/model/literals/string.rb +8 -3
  79. data/lib/expressir/model/model_element.rb +63 -37
  80. data/lib/expressir/model/reference.rb +9 -0
  81. data/lib/expressir/model/references/attribute_reference.rb +22 -0
  82. data/lib/expressir/model/references/group_reference.rb +22 -0
  83. data/lib/expressir/model/references/index_reference.rb +27 -0
  84. data/lib/expressir/model/references/simple_reference.rb +24 -0
  85. data/lib/expressir/model/repository.rb +6 -2
  86. data/lib/expressir/model/statement.rb +9 -0
  87. data/lib/expressir/model/statements/alias.rb +12 -8
  88. data/lib/expressir/model/statements/assignment.rb +8 -3
  89. data/lib/expressir/model/statements/case.rb +11 -5
  90. data/lib/expressir/model/statements/case_action.rb +8 -3
  91. data/lib/expressir/model/statements/compound.rb +7 -3
  92. data/lib/expressir/model/statements/escape.rb +3 -1
  93. data/lib/expressir/model/statements/if.rb +12 -6
  94. data/lib/expressir/model/statements/null.rb +3 -1
  95. data/lib/expressir/model/statements/procedure_call.rb +22 -0
  96. data/lib/expressir/model/statements/repeat.rb +20 -12
  97. data/lib/expressir/model/statements/return.rb +6 -2
  98. data/lib/expressir/model/statements/skip.rb +3 -1
  99. data/lib/expressir/model/supertype_expression.rb +9 -0
  100. data/lib/expressir/model/supertype_expressions/binary_supertype_expression.rb +29 -0
  101. data/lib/expressir/model/supertype_expressions/oneof_supertype_expression.rb +19 -0
  102. data/lib/expressir/model.rb +52 -43
  103. data/lib/expressir/version.rb +1 -1
  104. data/lib/expressir.rb +0 -1
  105. data/rakelib/cross-ruby.rake +1 -1
  106. data/spec/expressir/{express_exp → express}/cache_spec.rb +9 -9
  107. data/spec/expressir/express/formatter_spec.rb +127 -0
  108. data/spec/expressir/{express_exp → express}/parser_spec.rb +23 -23
  109. data/spec/expressir/model/model_element_spec.rb +153 -153
  110. data/{original/examples → spec}/syntax/multiple.exp +0 -0
  111. data/spec/syntax/multiple.yaml +198 -0
  112. data/{original/examples → spec}/syntax/multiple_formatted.exp +0 -0
  113. data/{original/examples → spec}/syntax/multiple_hyperlink_formatted.exp +0 -0
  114. data/{original/examples → spec}/syntax/multiple_schema_head_hyperlink_formatted.exp +0 -0
  115. data/{original/examples → spec}/syntax/remark.exp +0 -0
  116. data/{original/examples → spec}/syntax/remark.yaml +73 -73
  117. data/{original/examples → spec}/syntax/remark_formatted.exp +0 -0
  118. data/{original/examples → spec}/syntax/single.exp +1 -1
  119. data/spec/syntax/single.yaml +18 -0
  120. data/{original/examples → spec}/syntax/single_formatted.exp +1 -1
  121. data/{original/examples → spec}/syntax/single_formatted.yaml +9 -6
  122. data/{original/examples → spec}/syntax/syntax.exp +11 -11
  123. data/{original/examples → spec}/syntax/syntax.yaml +1100 -1111
  124. data/{original/examples → spec}/syntax/syntax_formatted.exp +11 -11
  125. data/{original/examples → spec}/syntax/syntax_hyperlink_formatted.exp +11 -11
  126. data/{original/examples → spec}/syntax/syntax_schema_head_formatted.exp +1 -1
  127. metadata +123 -116
  128. data/lib/expressir/express/aggregate_dimension.rb +0 -38
  129. data/lib/expressir/express/attribute.rb +0 -15
  130. data/lib/expressir/express/comment.rb +0 -7
  131. data/lib/expressir/express/defined_type.rb +0 -36
  132. data/lib/expressir/express/derived.rb +0 -65
  133. data/lib/expressir/express/derived_aggregate.rb +0 -43
  134. data/lib/expressir/express/entity.rb +0 -137
  135. data/lib/expressir/express/explicit.rb +0 -70
  136. data/lib/expressir/express/explicit_aggregate.rb +0 -46
  137. data/lib/expressir/express/explicit_or_derived.rb +0 -16
  138. data/lib/expressir/express/global_rule.rb +0 -44
  139. data/lib/expressir/express/interface_specification.rb +0 -51
  140. data/lib/expressir/express/interfaced_item.rb +0 -38
  141. data/lib/expressir/express/inverse.rb +0 -46
  142. data/lib/expressir/express/inverse_aggregate.rb +0 -37
  143. data/lib/expressir/express/model_element.rb +0 -7
  144. data/lib/expressir/express/named_type.rb +0 -19
  145. data/lib/expressir/express/remark.rb +0 -8
  146. data/lib/expressir/express/repository.rb +0 -306
  147. data/lib/expressir/express/schema_definition.rb +0 -96
  148. data/lib/expressir/express/subtype_constraint.rb +0 -14
  149. data/lib/expressir/express/type.rb +0 -26
  150. data/lib/expressir/express/type_aggregate.rb +0 -42
  151. data/lib/expressir/express/type_enum.rb +0 -29
  152. data/lib/expressir/express/type_parser.rb +0 -45
  153. data/lib/expressir/express/type_select.rb +0 -82
  154. data/lib/expressir/express/unique_rule.rb +0 -35
  155. data/lib/expressir/express/where_rule.rb +0 -32
  156. data/lib/expressir/express.rb +0 -11
  157. data/lib/expressir/express_exp/cache.rb +0 -48
  158. data/lib/expressir/express_exp/schema_head_formatter.rb +0 -9
  159. data/lib/expressir/express_parser.rb +0 -30
  160. data/lib/expressir/model/attribute.rb +0 -38
  161. data/lib/expressir/model/constant.rb +0 -28
  162. data/lib/expressir/model/entity.rb +0 -42
  163. data/lib/expressir/model/enumeration_item.rb +0 -22
  164. data/lib/expressir/model/expressions/aggregate_item.rb +0 -17
  165. data/lib/expressir/model/expressions/attribute_reference.rb +0 -17
  166. data/lib/expressir/model/expressions/call.rb +0 -17
  167. data/lib/expressir/model/expressions/group_reference.rb +0 -17
  168. data/lib/expressir/model/expressions/index_reference.rb +0 -19
  169. data/lib/expressir/model/expressions/simple_reference.rb +0 -19
  170. data/lib/expressir/model/function.rb +0 -57
  171. data/lib/expressir/model/interface.rb +0 -20
  172. data/lib/expressir/model/interface_item.rb +0 -15
  173. data/lib/expressir/model/interfaced_item.rb +0 -27
  174. data/lib/expressir/model/parameter.rb +0 -28
  175. data/lib/expressir/model/procedure.rb +0 -55
  176. data/lib/expressir/model/remark_item.rb +0 -15
  177. data/lib/expressir/model/rule.rb +0 -60
  178. data/lib/expressir/model/schema.rb +0 -100
  179. data/lib/expressir/model/statements/call.rb +0 -17
  180. data/lib/expressir/model/subtype_constraint.rb +0 -32
  181. data/lib/expressir/model/type.rb +0 -37
  182. data/lib/expressir/model/types/aggregate.rb +0 -28
  183. data/lib/expressir/model/types/array.rb +0 -23
  184. data/lib/expressir/model/types/bag.rb +0 -19
  185. data/lib/expressir/model/types/binary.rb +0 -17
  186. data/lib/expressir/model/types/boolean.rb +0 -8
  187. data/lib/expressir/model/types/enumeration.rb +0 -21
  188. data/lib/expressir/model/types/generic.rb +0 -24
  189. data/lib/expressir/model/types/generic_entity.rb +0 -24
  190. data/lib/expressir/model/types/integer.rb +0 -8
  191. data/lib/expressir/model/types/list.rb +0 -21
  192. data/lib/expressir/model/types/logical.rb +0 -8
  193. data/lib/expressir/model/types/number.rb +0 -8
  194. data/lib/expressir/model/types/real.rb +0 -15
  195. data/lib/expressir/model/types/select.rb +0 -23
  196. data/lib/expressir/model/types/set.rb +0 -19
  197. data/lib/expressir/model/types/string.rb +0 -17
  198. data/lib/expressir/model/unique.rb +0 -26
  199. data/lib/expressir/model/variable.rb +0 -28
  200. data/lib/expressir/model/where.rb +0 -26
  201. data/lib/expressir/parser/owl_parser.rb +0 -8
  202. data/lib/expressir/parser.rb +0 -6
  203. data/original/examples/syntax/multiple.yaml +0 -198
  204. data/original/examples/syntax/single.yaml +0 -15
  205. data/spec/acceptance/express_to_owl_spec.rb +0 -18
  206. data/spec/expressir/express/repository_spec.rb +0 -25
  207. data/spec/expressir/express_exp/formatter_spec.rb +0 -127
File without changes
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  _class: Expressir::Model::Repository
3
3
  schemas:
4
- - _class: Expressir::Model::Schema
5
- file: original/examples/syntax/remark.exp
4
+ - _class: Expressir::Model::Declarations::Schema
5
+ file: spec/syntax/remark.exp
6
6
  id: remark_schema
7
7
  remarks:
8
8
  - |-
@@ -14,40 +14,40 @@ schemas:
14
14
  - universal scope - schema before
15
15
  - universal scope - schema
16
16
  remark_items:
17
- - _class: Expressir::Model::RemarkItem
17
+ - _class: Expressir::Model::Declarations::RemarkItem
18
18
  id: remark_item
19
19
  remarks:
20
20
  - schema scope - schema remark item
21
21
  - universal scope - schema remark item
22
22
  constants:
23
- - _class: Expressir::Model::Constant
23
+ - _class: Expressir::Model::Declarations::Constant
24
24
  id: remark_constant
25
25
  remarks:
26
26
  - schema scope - constant
27
27
  - universal scope - constant
28
28
  type:
29
- _class: Expressir::Model::Types::String
29
+ _class: Expressir::Model::DataTypes::String
30
30
  expression:
31
31
  _class: Expressir::Model::Literals::String
32
32
  value: xxx
33
33
  types:
34
- - _class: Expressir::Model::Type
34
+ - _class: Expressir::Model::Declarations::Type
35
35
  id: remark_type
36
36
  remarks:
37
37
  - schema scope - type
38
38
  - universal scope - type
39
- type:
40
- _class: Expressir::Model::Types::Enumeration
39
+ underlying_type:
40
+ _class: Expressir::Model::DataTypes::Enumeration
41
41
  items:
42
- - _class: Expressir::Model::EnumerationItem
42
+ - _class: Expressir::Model::DataTypes::EnumerationItem
43
43
  id: remark_enumeration_item
44
44
  remarks:
45
45
  - schema scope - enumeration item
46
46
  - schema scope - enumeration item, on the same level as the type
47
47
  - universal scope - enumeration item
48
48
  - universal scope - enumeration item, on the same level as the type
49
- where:
50
- - _class: Expressir::Model::Where
49
+ where_rules:
50
+ - _class: Expressir::Model::Declarations::WhereRule
51
51
  id: WR1
52
52
  remarks:
53
53
  - type scope - type where
@@ -60,7 +60,7 @@ schemas:
60
60
  _class: Expressir::Model::Literals::Logical
61
61
  value: :TRUE
62
62
  informal_propositions:
63
- - _class: Expressir::Model::RemarkItem
63
+ - _class: Expressir::Model::Declarations::RemarkItem
64
64
  id: IP1
65
65
  remarks:
66
66
  - type scope - type informal proposition
@@ -70,13 +70,13 @@ schemas:
70
70
  - universal scope - type informal proposition
71
71
  - universal scope - type informal proposition, with prefix
72
72
  entities:
73
- - _class: Expressir::Model::Entity
73
+ - _class: Expressir::Model::Declarations::Entity
74
74
  id: remark_entity
75
75
  remarks:
76
76
  - schema scope - entity
77
77
  - universal scope - entity
78
78
  attributes:
79
- - _class: Expressir::Model::Attribute
79
+ - _class: Expressir::Model::Declarations::Attribute
80
80
  id: remark_attribute
81
81
  remarks:
82
82
  - entity scope - entity attribute
@@ -84,8 +84,8 @@ schemas:
84
84
  - universal scope - entity attribute
85
85
  kind: :EXPLICIT
86
86
  type:
87
- _class: Expressir::Model::Types::String
88
- - _class: Expressir::Model::Attribute
87
+ _class: Expressir::Model::DataTypes::String
88
+ - _class: Expressir::Model::Declarations::Attribute
89
89
  id: remark_derived_attribute
90
90
  remarks:
91
91
  - entity scope - entity derived attribute
@@ -93,11 +93,11 @@ schemas:
93
93
  - universal scope - entity derived attribute
94
94
  kind: :DERIVED
95
95
  type:
96
- _class: Expressir::Model::Types::String
96
+ _class: Expressir::Model::DataTypes::String
97
97
  expression:
98
98
  _class: Expressir::Model::Literals::String
99
99
  value: xxx
100
- - _class: Expressir::Model::Attribute
100
+ - _class: Expressir::Model::Declarations::Attribute
101
101
  id: remark_inverse_attribute
102
102
  remarks:
103
103
  - entity scope - entity inverse attribute
@@ -105,26 +105,26 @@ schemas:
105
105
  - universal scope - entity inverse attribute
106
106
  kind: :INVERSE
107
107
  type:
108
- _class: Expressir::Model::Expressions::SimpleReference
108
+ _class: Expressir::Model::References::SimpleReference
109
109
  id: remark_entity
110
110
  base_path: remark_schema.remark_entity
111
111
  expression:
112
- _class: Expressir::Model::Expressions::SimpleReference
112
+ _class: Expressir::Model::References::SimpleReference
113
113
  id: remark_attribute
114
114
  base_path: remark_schema.remark_entity.remark_attribute
115
- unique:
116
- - _class: Expressir::Model::Unique
115
+ unique_rules:
116
+ - _class: Expressir::Model::Declarations::UniqueRule
117
117
  id: UR1
118
118
  remarks:
119
119
  - entity scope - entity unique
120
120
  - schema scope - entity unique
121
121
  - universal scope - entity unique
122
122
  attributes:
123
- - _class: Expressir::Model::Expressions::SimpleReference
123
+ - _class: Expressir::Model::References::SimpleReference
124
124
  id: remark_attribute
125
125
  base_path: remark_schema.remark_entity.remark_attribute
126
- where:
127
- - _class: Expressir::Model::Where
126
+ where_rules:
127
+ - _class: Expressir::Model::Declarations::WhereRule
128
128
  id: WR1
129
129
  remarks:
130
130
  - entity scope - entity where
@@ -137,7 +137,7 @@ schemas:
137
137
  _class: Expressir::Model::Literals::Logical
138
138
  value: :TRUE
139
139
  informal_propositions:
140
- - _class: Expressir::Model::RemarkItem
140
+ - _class: Expressir::Model::Declarations::RemarkItem
141
141
  id: IP1
142
142
  remarks:
143
143
  - entity scope - entity informal proposition
@@ -147,43 +147,43 @@ schemas:
147
147
  - universal scope - entity informal proposition
148
148
  - universal scope - entity informal proposition, with prefix
149
149
  subtype_constraints:
150
- - _class: Expressir::Model::SubtypeConstraint
150
+ - _class: Expressir::Model::Declarations::SubtypeConstraint
151
151
  id: remark_subtype_constraint
152
152
  remarks:
153
153
  - schema scope - subtype constraint
154
154
  - universal scope - subtype constraint
155
155
  applies_to:
156
- _class: Expressir::Model::Expressions::SimpleReference
156
+ _class: Expressir::Model::References::SimpleReference
157
157
  id: remark_entity
158
158
  base_path: remark_schema.remark_entity
159
159
  functions:
160
- - _class: Expressir::Model::Function
160
+ - _class: Expressir::Model::Declarations::Function
161
161
  id: remark_function
162
162
  remarks:
163
163
  - schema scope - function
164
164
  - universal scope - function
165
165
  parameters:
166
- - _class: Expressir::Model::Parameter
166
+ - _class: Expressir::Model::Declarations::Parameter
167
167
  id: remark_parameter
168
168
  remarks:
169
169
  - function scope - function parameter
170
170
  - schema scope - function parameter
171
171
  - universal scope - function parameter
172
172
  type:
173
- _class: Expressir::Model::Types::String
173
+ _class: Expressir::Model::DataTypes::String
174
174
  return_type:
175
- _class: Expressir::Model::Types::Boolean
175
+ _class: Expressir::Model::DataTypes::Boolean
176
176
  types:
177
- - _class: Expressir::Model::Type
177
+ - _class: Expressir::Model::Declarations::Type
178
178
  id: remark_type
179
179
  remarks:
180
180
  - function scope - function type
181
181
  - schema scope - function type
182
182
  - universal scope - function type
183
- type:
184
- _class: Expressir::Model::Types::Enumeration
183
+ underlying_type:
184
+ _class: Expressir::Model::DataTypes::Enumeration
185
185
  items:
186
- - _class: Expressir::Model::EnumerationItem
186
+ - _class: Expressir::Model::DataTypes::EnumerationItem
187
187
  id: remark_enumeration_item
188
188
  remarks:
189
189
  - function scope - function enumeration item
@@ -194,33 +194,33 @@ schemas:
194
194
  - universal scope - function enumeration item, on the same level as the
195
195
  type
196
196
  constants:
197
- - _class: Expressir::Model::Constant
197
+ - _class: Expressir::Model::Declarations::Constant
198
198
  id: remark_constant
199
199
  remarks:
200
200
  - function scope - function constant
201
201
  - schema scope - function constant
202
202
  - universal scope - function constant
203
203
  type:
204
- _class: Expressir::Model::Types::String
204
+ _class: Expressir::Model::DataTypes::String
205
205
  expression:
206
206
  _class: Expressir::Model::Literals::String
207
207
  value: xxx
208
208
  variables:
209
- - _class: Expressir::Model::Variable
209
+ - _class: Expressir::Model::Declarations::Variable
210
210
  id: remark_variable
211
211
  remarks:
212
212
  - function scope - function variable
213
213
  - schema scope - function variable
214
214
  - universal scope - function variable
215
215
  type:
216
- _class: Expressir::Model::Types::String
216
+ _class: Expressir::Model::DataTypes::String
217
217
  statements:
218
218
  - _class: Expressir::Model::Statements::Alias
219
219
  id: remark_alias
220
220
  remarks:
221
221
  - function alias scope - function alias
222
222
  expression:
223
- _class: Expressir::Model::Expressions::SimpleReference
223
+ _class: Expressir::Model::References::SimpleReference
224
224
  id: remark_variable
225
225
  base_path: remark_schema.remark_function.remark_variable
226
226
  statements:
@@ -239,7 +239,7 @@ schemas:
239
239
  - _class: Expressir::Model::Statements::Null
240
240
  - _class: Expressir::Model::Statements::Assignment
241
241
  ref:
242
- _class: Expressir::Model::Expressions::SimpleReference
242
+ _class: Expressir::Model::References::SimpleReference
243
243
  id: remark_variable
244
244
  base_path: remark_schema.remark_function.remark_variable
245
245
  expression:
@@ -248,33 +248,33 @@ schemas:
248
248
  remarks:
249
249
  - function query scope - function query
250
250
  aggregate_source:
251
- _class: Expressir::Model::Expressions::SimpleReference
251
+ _class: Expressir::Model::References::SimpleReference
252
252
  id: remark_variable
253
253
  base_path: remark_schema.remark_function.remark_variable
254
254
  expression:
255
255
  _class: Expressir::Model::Literals::Logical
256
256
  value: :TRUE
257
257
  rules:
258
- - _class: Expressir::Model::Rule
258
+ - _class: Expressir::Model::Declarations::Rule
259
259
  id: remark_rule
260
260
  remarks:
261
261
  - schema scope - rule
262
262
  - universal scope - rule
263
263
  applies_to:
264
- - _class: Expressir::Model::Expressions::SimpleReference
264
+ - _class: Expressir::Model::References::SimpleReference
265
265
  id: remark_entity
266
266
  base_path: remark_schema.remark_entity
267
267
  types:
268
- - _class: Expressir::Model::Type
268
+ - _class: Expressir::Model::Declarations::Type
269
269
  id: remark_type
270
270
  remarks:
271
271
  - rule scope - rule type
272
272
  - schema scope - rule type
273
273
  - universal scope - rule type
274
- type:
275
- _class: Expressir::Model::Types::Enumeration
274
+ underlying_type:
275
+ _class: Expressir::Model::DataTypes::Enumeration
276
276
  items:
277
- - _class: Expressir::Model::EnumerationItem
277
+ - _class: Expressir::Model::DataTypes::EnumerationItem
278
278
  id: remark_enumeration_item
279
279
  remarks:
280
280
  - rule scope - rule enumeration item
@@ -284,33 +284,33 @@ schemas:
284
284
  - universal scope - rule enumeration item
285
285
  - universal scope - rule enumeration item, on the same level as the type
286
286
  constants:
287
- - _class: Expressir::Model::Constant
287
+ - _class: Expressir::Model::Declarations::Constant
288
288
  id: remark_constant
289
289
  remarks:
290
290
  - rule scope - rule constant
291
291
  - schema scope - rule constant
292
292
  - universal scope - rule constant
293
293
  type:
294
- _class: Expressir::Model::Types::String
294
+ _class: Expressir::Model::DataTypes::String
295
295
  expression:
296
296
  _class: Expressir::Model::Literals::String
297
297
  value: xxx
298
298
  variables:
299
- - _class: Expressir::Model::Variable
299
+ - _class: Expressir::Model::Declarations::Variable
300
300
  id: remark_variable
301
301
  remarks:
302
302
  - rule scope - rule variable
303
303
  - schema scope - rule variable
304
304
  - universal scope - rule variable
305
305
  type:
306
- _class: Expressir::Model::Types::String
306
+ _class: Expressir::Model::DataTypes::String
307
307
  statements:
308
308
  - _class: Expressir::Model::Statements::Alias
309
309
  id: remark_alias
310
310
  remarks:
311
311
  - rule alias scope - rule alias
312
312
  expression:
313
- _class: Expressir::Model::Expressions::SimpleReference
313
+ _class: Expressir::Model::References::SimpleReference
314
314
  id: remark_variable
315
315
  base_path: remark_schema.remark_rule.remark_variable
316
316
  statements:
@@ -329,7 +329,7 @@ schemas:
329
329
  - _class: Expressir::Model::Statements::Null
330
330
  - _class: Expressir::Model::Statements::Assignment
331
331
  ref:
332
- _class: Expressir::Model::Expressions::SimpleReference
332
+ _class: Expressir::Model::References::SimpleReference
333
333
  id: remark_variable
334
334
  base_path: remark_schema.remark_rule.remark_variable
335
335
  expression:
@@ -338,14 +338,14 @@ schemas:
338
338
  remarks:
339
339
  - rule query scope - rule query
340
340
  aggregate_source:
341
- _class: Expressir::Model::Expressions::SimpleReference
341
+ _class: Expressir::Model::References::SimpleReference
342
342
  id: remark_variable
343
343
  base_path: remark_schema.remark_rule.remark_variable
344
344
  expression:
345
345
  _class: Expressir::Model::Literals::Logical
346
346
  value: :TRUE
347
- where:
348
- - _class: Expressir::Model::Where
347
+ where_rules:
348
+ - _class: Expressir::Model::Declarations::WhereRule
349
349
  id: WR1
350
350
  remarks:
351
351
  - rule scope - rule where
@@ -358,7 +358,7 @@ schemas:
358
358
  _class: Expressir::Model::Literals::Logical
359
359
  value: :TRUE
360
360
  informal_propositions:
361
- - _class: Expressir::Model::RemarkItem
361
+ - _class: Expressir::Model::Declarations::RemarkItem
362
362
  id: IP1
363
363
  remarks:
364
364
  - rule scope - rule informal proposition
@@ -368,31 +368,31 @@ schemas:
368
368
  - universal scope - rule informal proposition
369
369
  - universal scope - rule informal proposition, with prefix
370
370
  procedures:
371
- - _class: Expressir::Model::Procedure
371
+ - _class: Expressir::Model::Declarations::Procedure
372
372
  id: remark_procedure
373
373
  remarks:
374
374
  - schema scope - procedure
375
375
  - universal scope - procedure
376
376
  parameters:
377
- - _class: Expressir::Model::Parameter
377
+ - _class: Expressir::Model::Declarations::Parameter
378
378
  id: remark_parameter
379
379
  remarks:
380
380
  - procedure scope - procedure parameter
381
381
  - schema scope - procedure parameter
382
382
  - universal scope - procedure parameter
383
383
  type:
384
- _class: Expressir::Model::Types::String
384
+ _class: Expressir::Model::DataTypes::String
385
385
  types:
386
- - _class: Expressir::Model::Type
386
+ - _class: Expressir::Model::Declarations::Type
387
387
  id: remark_type
388
388
  remarks:
389
389
  - procedure scope - procedure type
390
390
  - schema scope - procedure type
391
391
  - universal scope - procedure type
392
- type:
393
- _class: Expressir::Model::Types::Enumeration
392
+ underlying_type:
393
+ _class: Expressir::Model::DataTypes::Enumeration
394
394
  items:
395
- - _class: Expressir::Model::EnumerationItem
395
+ - _class: Expressir::Model::DataTypes::EnumerationItem
396
396
  id: remark_enumeration_item
397
397
  remarks:
398
398
  - procedure scope - procedure enumeration item
@@ -404,33 +404,33 @@ schemas:
404
404
  - universal scope - procedure enumeration item, on the same level as the
405
405
  type
406
406
  constants:
407
- - _class: Expressir::Model::Constant
407
+ - _class: Expressir::Model::Declarations::Constant
408
408
  id: remark_constant
409
409
  remarks:
410
410
  - procedure scope - procedure constant
411
411
  - schema scope - procedure constant
412
412
  - universal scope - procedure constant
413
413
  type:
414
- _class: Expressir::Model::Types::String
414
+ _class: Expressir::Model::DataTypes::String
415
415
  expression:
416
416
  _class: Expressir::Model::Literals::String
417
417
  value: xxx
418
418
  variables:
419
- - _class: Expressir::Model::Variable
419
+ - _class: Expressir::Model::Declarations::Variable
420
420
  id: remark_variable
421
421
  remarks:
422
422
  - procedure scope - procedure variable
423
423
  - schema scope - procedure variable
424
424
  - universal scope - procedure variable
425
425
  type:
426
- _class: Expressir::Model::Types::String
426
+ _class: Expressir::Model::DataTypes::String
427
427
  statements:
428
428
  - _class: Expressir::Model::Statements::Alias
429
429
  id: remark_alias
430
430
  remarks:
431
431
  - procedure alias scope - procedure alias
432
432
  expression:
433
- _class: Expressir::Model::Expressions::SimpleReference
433
+ _class: Expressir::Model::References::SimpleReference
434
434
  id: remark_variable
435
435
  base_path: remark_schema.remark_procedure.remark_variable
436
436
  statements:
@@ -449,7 +449,7 @@ schemas:
449
449
  - _class: Expressir::Model::Statements::Null
450
450
  - _class: Expressir::Model::Statements::Assignment
451
451
  ref:
452
- _class: Expressir::Model::Expressions::SimpleReference
452
+ _class: Expressir::Model::References::SimpleReference
453
453
  id: remark_variable
454
454
  base_path: remark_schema.remark_procedure.remark_variable
455
455
  expression:
@@ -458,7 +458,7 @@ schemas:
458
458
  remarks:
459
459
  - procedure query scope - procedure query
460
460
  aggregate_source:
461
- _class: Expressir::Model::Expressions::SimpleReference
461
+ _class: Expressir::Model::References::SimpleReference
462
462
  id: remark_variable
463
463
  base_path: remark_schema.remark_procedure.remark_variable
464
464
  expression:
@@ -1,4 +1,4 @@
1
- SCHEMA single_schema;
1
+ SCHEMA single_schema 'version';
2
2
  ENTITY empty_entity; END_ENTITY;
3
3
  ENTITY subtype_empty_entity SUBTYPE OF (empty_entity); END_ENTITY;
4
4
  END_SCHEMA;
@@ -0,0 +1,18 @@
1
+ ---
2
+ _class: Expressir::Model::Repository
3
+ schemas:
4
+ - _class: Expressir::Model::Declarations::Schema
5
+ file: spec/syntax/single.exp
6
+ id: single_schema
7
+ version:
8
+ _class: Expressir::Model::Declarations::SchemaVersion
9
+ value: version
10
+ entities:
11
+ - _class: Expressir::Model::Declarations::Entity
12
+ id: empty_entity
13
+ - _class: Expressir::Model::Declarations::Entity
14
+ id: subtype_empty_entity
15
+ subtype_of:
16
+ - _class: Expressir::Model::References::SimpleReference
17
+ id: empty_entity
18
+ base_path: single_schema.empty_entity
@@ -1,4 +1,4 @@
1
- SCHEMA single_schema;
1
+ SCHEMA single_schema 'version';
2
2
 
3
3
  ENTITY empty_entity;
4
4
  END_ENTITY;
@@ -1,19 +1,22 @@
1
1
  ---
2
2
  _class: Expressir::Model::Repository
3
3
  schemas:
4
- - _class: Expressir::Model::Schema
5
- file: original/examples/syntax/single.exp
4
+ - _class: Expressir::Model::Declarations::Schema
5
+ file: spec/syntax/single.exp
6
6
  id: single_schema
7
+ version:
8
+ _class: Expressir::Model::Declarations::SchemaVersion
9
+ value: version
7
10
  entities:
8
- - _class: Expressir::Model::Entity
11
+ - _class: Expressir::Model::Declarations::Entity
9
12
  id: empty_entity
10
13
  source: |-
11
14
  ENTITY empty_entity;
12
15
  END_ENTITY;
13
- - _class: Expressir::Model::Entity
16
+ - _class: Expressir::Model::Declarations::Entity
14
17
  id: subtype_empty_entity
15
18
  subtype_of:
16
- - _class: Expressir::Model::Expressions::SimpleReference
19
+ - _class: Expressir::Model::References::SimpleReference
17
20
  id: empty_entity
18
21
  base_path: single_schema.empty_entity
19
22
  source: |-
@@ -21,7 +24,7 @@ schemas:
21
24
  SUBTYPE OF (empty_entity);
22
25
  END_ENTITY;
23
26
  source: |-
24
- SCHEMA single_schema;
27
+ SCHEMA single_schema 'version';
25
28
 
26
29
  ENTITY empty_entity;
27
30
  END_ENTITY;
@@ -1,5 +1,5 @@
1
1
  -- schema
2
- SCHEMA syntax_schema 'version';
2
+ SCHEMA syntax_schema '{ISO standard 10303 part(41) object(1) version(8)}';
3
3
 
4
4
  -- interfaces
5
5
  USE FROM contract_schema;
@@ -192,18 +192,18 @@ PROCEDURE types;
192
192
  TYPE select_type = SELECT; END_TYPE;
193
193
  TYPE select_extensible_type = EXTENSIBLE SELECT; END_TYPE;
194
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_list_multiple_type = SELECT (empty_type, empty_type); END_TYPE;
197
- TYPE select_extension_type_ref_type = SELECT BASED_ON select_type; END_TYPE;
198
- TYPE select_extension_type_ref_list_type = SELECT BASED_ON select_type WITH (empty_type); END_TYPE;
199
- TYPE select_extension_type_ref_list_multiple_type = SELECT BASED_ON select_type WITH (empty_type, empty_type); END_TYPE;
195
+ TYPE select_item_type = SELECT (empty_type); END_TYPE;
196
+ TYPE select_multiple_item_type = SELECT (empty_type, empty_type); END_TYPE;
197
+ TYPE select_based_on_type = SELECT BASED_ON select_type; END_TYPE;
198
+ TYPE select_based_on_item_type = SELECT BASED_ON select_type WITH (empty_type); END_TYPE;
199
+ TYPE select_based_on_multiple_item_type = SELECT BASED_ON select_type WITH (empty_type, empty_type); END_TYPE;
200
200
  TYPE enumeration_type = ENUMERATION; END_TYPE;
201
201
  TYPE enumeration_extensible_type = EXTENSIBLE ENUMERATION; END_TYPE;
202
- TYPE enumeration_list_type = ENUMERATION OF (test); END_TYPE;
203
- TYPE enumeration_list_multiple_type = ENUMERATION OF (test, test2); END_TYPE;
204
- TYPE enumeration_extension_type_ref_type = ENUMERATION BASED_ON enumeration_type; END_TYPE;
205
- TYPE enumeration_extension_type_ref_list_type = ENUMERATION BASED_ON enumeration_type WITH (test); END_TYPE;
206
- TYPE enumeration_extension_type_ref_list_multiple_type = ENUMERATION BASED_ON enumeration_type WITH (test, test2); END_TYPE;
202
+ TYPE enumeration_item_type = ENUMERATION OF (test); END_TYPE;
203
+ TYPE enumeration_multiple_item_type = ENUMERATION OF (test, test2); END_TYPE;
204
+ TYPE enumeration_based_on_type = ENUMERATION BASED_ON enumeration_type; END_TYPE;
205
+ TYPE enumeration_based_on_item_type = ENUMERATION BASED_ON enumeration_type WITH (test); END_TYPE;
206
+ TYPE enumeration_based_on_multiple_item_type = ENUMERATION BASED_ON enumeration_type WITH (test, test2); END_TYPE;
207
207
 
208
208
  -- generic types
209
209
  FUNCTION generic_type : GENERIC; ; END_FUNCTION;