expressir 0.2.24 → 1.1.0

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