expressir 0.2.19-x86-mingw32 → 0.2.27-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +7 -6
  3. data/.github/workflows/release.yml +31 -3
  4. data/README.adoc +3 -3
  5. data/exe/format +2 -49
  6. data/exe/format-test +81 -0
  7. data/lib/expressir/express_exp/2.4/express_parser.so +0 -0
  8. data/lib/expressir/express_exp/2.5/express_parser.so +0 -0
  9. data/lib/expressir/express_exp/2.6/express_parser.so +0 -0
  10. data/lib/expressir/express_exp/2.7/express_parser.so +0 -0
  11. data/lib/expressir/express_exp/3.0/express_parser.so +0 -0
  12. data/lib/expressir/express_exp/cache.rb +48 -0
  13. data/lib/expressir/express_exp/formatter.rb +12 -2
  14. data/lib/expressir/express_exp/hyperlink_formatter.rb +10 -15
  15. data/lib/expressir/express_exp/model_visitor.rb +23 -0
  16. data/lib/expressir/express_exp/parser.rb +14 -3
  17. data/lib/expressir/express_exp/resolve_references_model_visitor.rb +29 -0
  18. data/lib/expressir/express_exp/visitor.rb +46 -19
  19. data/lib/expressir/model.rb +5 -1
  20. data/lib/expressir/model/attribute.rb +13 -6
  21. data/lib/expressir/model/cache.rb +13 -0
  22. data/lib/expressir/model/constant.rb +10 -3
  23. data/lib/expressir/model/entity.rb +16 -14
  24. data/lib/expressir/model/enumeration_item.rb +8 -1
  25. data/lib/expressir/model/expressions/aggregate_initializer.rb +2 -2
  26. data/lib/expressir/model/expressions/aggregate_item.rb +2 -2
  27. data/lib/expressir/model/expressions/attribute_reference.rb +2 -2
  28. data/lib/expressir/model/expressions/binary_expression.rb +3 -3
  29. data/lib/expressir/model/expressions/call.rb +3 -3
  30. data/lib/expressir/model/expressions/entity_constructor.rb +3 -3
  31. data/lib/expressir/model/expressions/group_reference.rb +2 -2
  32. data/lib/expressir/model/expressions/index_reference.rb +3 -3
  33. data/lib/expressir/model/expressions/interval.rb +5 -5
  34. data/lib/expressir/model/expressions/query_expression.rb +6 -4
  35. data/lib/expressir/model/expressions/simple_reference.rb +5 -1
  36. data/lib/expressir/model/expressions/unary_expression.rb +2 -2
  37. data/lib/expressir/model/function.rb +23 -21
  38. data/lib/expressir/model/identifier.rb +6 -3
  39. data/lib/expressir/model/interface.rb +4 -4
  40. data/lib/expressir/model/interface_item.rb +2 -2
  41. data/lib/expressir/model/interfaced_item.rb +10 -9
  42. data/lib/expressir/model/literals/binary.rb +1 -1
  43. data/lib/expressir/model/literals/integer.rb +1 -1
  44. data/lib/expressir/model/literals/logical.rb +1 -1
  45. data/lib/expressir/model/literals/real.rb +1 -1
  46. data/lib/expressir/model/literals/string.rb +2 -2
  47. data/lib/expressir/model/model_element.rb +38 -26
  48. data/lib/expressir/model/parameter.rb +10 -3
  49. data/lib/expressir/model/procedure.rb +22 -20
  50. data/lib/expressir/model/remark_item.rb +15 -0
  51. data/lib/expressir/model/repository.rb +2 -2
  52. data/lib/expressir/model/rule.rb +26 -24
  53. data/lib/expressir/model/schema.rb +24 -20
  54. data/lib/expressir/model/schema_version.rb +15 -0
  55. data/lib/expressir/model/schema_version_item.rb +15 -0
  56. data/lib/expressir/model/statements/alias.rb +7 -5
  57. data/lib/expressir/model/statements/assignment.rb +2 -2
  58. data/lib/expressir/model/statements/call.rb +3 -3
  59. data/lib/expressir/model/statements/case.rb +4 -4
  60. data/lib/expressir/model/statements/case_action.rb +3 -3
  61. data/lib/expressir/model/statements/compound.rb +2 -2
  62. data/lib/expressir/model/statements/if.rb +5 -5
  63. data/lib/expressir/model/statements/repeat.rb +11 -9
  64. data/lib/expressir/model/statements/return.rb +1 -1
  65. data/lib/expressir/model/subtype_constraint.rb +13 -6
  66. data/lib/expressir/model/type.rb +9 -7
  67. data/lib/expressir/model/types/aggregate.rb +9 -2
  68. data/lib/expressir/model/types/array.rb +5 -5
  69. data/lib/expressir/model/types/bag.rb +3 -3
  70. data/lib/expressir/model/types/binary.rb +2 -2
  71. data/lib/expressir/model/types/enumeration.rb +6 -6
  72. data/lib/expressir/model/types/generic.rb +8 -1
  73. data/lib/expressir/model/types/generic_entity.rb +8 -1
  74. data/lib/expressir/model/types/list.rb +4 -4
  75. data/lib/expressir/model/types/real.rb +1 -1
  76. data/lib/expressir/model/types/select.rb +7 -7
  77. data/lib/expressir/model/types/set.rb +3 -3
  78. data/lib/expressir/model/types/string.rb +2 -2
  79. data/lib/expressir/model/unique.rb +10 -3
  80. data/lib/expressir/model/variable.rb +10 -3
  81. data/lib/expressir/model/where.rb +9 -2
  82. data/lib/expressir/version.rb +1 -1
  83. data/original/examples/syntax/multiple.exp +1 -1
  84. data/original/examples/syntax/multiple.yaml +15 -1
  85. data/original/examples/syntax/multiple_formatted.exp +1 -1
  86. data/original/examples/syntax/multiple_hyperlink_formatted.exp +4 -4
  87. data/original/examples/syntax/multiple_schema_head_hyperlink_formatted.exp +1 -1
  88. data/original/examples/syntax/remark.exp +12 -10
  89. data/original/examples/syntax/remark.yaml +23 -3
  90. data/original/examples/syntax/remark_formatted.exp +3 -1
  91. data/original/examples/syntax/single.exp +2 -1
  92. data/original/examples/syntax/single.yaml +9 -0
  93. data/original/examples/syntax/single_formatted.exp +5 -1
  94. data/original/examples/syntax/single_formatted.yaml +18 -1
  95. data/original/examples/syntax/syntax.exp +1 -1
  96. data/original/examples/syntax/syntax.yaml +99 -2
  97. data/original/examples/syntax/syntax_formatted.exp +1 -1
  98. data/original/examples/syntax/syntax_hyperlink_formatted.exp +902 -0
  99. data/original/examples/syntax/syntax_schema_head_formatted.exp +1 -1
  100. data/spec/expressir/express_exp/cache_spec.rb +64 -0
  101. data/spec/expressir/express_exp/formatter_spec.rb +16 -0
  102. data/spec/expressir/express_exp/parser_spec.rb +1 -1
  103. data/spec/expressir/model/model_element_spec.rb +73 -21
  104. metadata +12 -3
  105. data/lib/expressir/model/informal_proposition.rb +0 -18
@@ -1,4 +1,4 @@
1
- SCHEMA syntax_schema 'version';
1
+ SCHEMA syntax_schema '{ISO standard 10303 part(41) object(1) version(8)}';
2
2
 
3
3
  USE FROM contract_schema;
4
4
  USE FROM contract_schema
@@ -0,0 +1,64 @@
1
+ require "yaml"
2
+ require "tempfile"
3
+ require "spec_helper"
4
+ require "expressir/express_exp/parser"
5
+ require "expressir/express_exp/cache"
6
+
7
+ RSpec.describe Expressir::ExpressExp::Cache do
8
+ TEST_VERSION = "0.0.0"
9
+
10
+ describe ".to_file" do
11
+ it "exports an object" do
12
+ temp_file = Tempfile.new
13
+
14
+ repository = Expressir::Model::Repository.new
15
+
16
+ begin
17
+ Expressir::ExpressExp::Cache.to_file(temp_file, repository, test_overwrite_version: TEST_VERSION)
18
+
19
+ size = File.size(temp_file)
20
+
21
+ expect(size).to be > 0
22
+ ensure
23
+ temp_file.close
24
+ temp_file.unlink
25
+ end
26
+ end
27
+ end
28
+
29
+ describe ".from_file" do
30
+ it "parses a file" do
31
+ temp_file = Tempfile.new
32
+
33
+ repository = Expressir::Model::Repository.new
34
+
35
+ begin
36
+ Expressir::ExpressExp::Cache.to_file(temp_file, repository, test_overwrite_version: TEST_VERSION)
37
+
38
+ result = Expressir::ExpressExp::Cache.from_file(temp_file, test_overwrite_version: TEST_VERSION)
39
+
40
+ expect(result).to be_instance_of(Expressir::Model::Repository)
41
+ ensure
42
+ temp_file.close
43
+ temp_file.unlink
44
+ end
45
+ end
46
+
47
+ it "fails parsing a file from a different Expressir version" do
48
+ temp_file = Tempfile.new
49
+
50
+ repository = Expressir::Model::Repository.new
51
+
52
+ begin
53
+ Expressir::ExpressExp::Cache.to_file(temp_file, repository, test_overwrite_version: TEST_VERSION)
54
+
55
+ expect do
56
+ Expressir::ExpressExp::Cache.from_file(temp_file)
57
+ end.to raise_error(Expressir::ExpressExp::CacheLoadError)
58
+ ensure
59
+ temp_file.close
60
+ temp_file.unlink
61
+ end
62
+ end
63
+ end
64
+ end
@@ -75,6 +75,22 @@ RSpec.describe Expressir::ExpressExp::Formatter do
75
75
  expect(result).to eq(expected_result)
76
76
  end
77
77
 
78
+ it "exports an object with hyperlink formatter (syntax.exp)" do
79
+ exp_file = Expressir.root_path.join("original", "examples", "syntax", "syntax.exp")
80
+ formatted_exp_file = Expressir.root_path.join("original", "examples", "syntax", "syntax_hyperlink_formatted.exp")
81
+
82
+ repo = Expressir::ExpressExp::Parser.from_file(exp_file)
83
+
84
+ formatter = Class.new(Expressir::ExpressExp::Formatter) do
85
+ include Expressir::ExpressExp::HyperlinkFormatter
86
+ end
87
+ result = formatter.format(repo)
88
+ # File.write(formatted_exp_file, result)
89
+ expected_result = File.read(formatted_exp_file)
90
+
91
+ expect(result).to eq(expected_result)
92
+ end
93
+
78
94
  it "exports an object with hyperlink formatter (multiple.exp)" do
79
95
  exp_file = Expressir.root_path.join("original", "examples", "syntax", "multiple.exp")
80
96
  formatted_exp_file = Expressir.root_path.join("original", "examples", "syntax", "multiple_hyperlink_formatted.exp")
@@ -86,7 +86,7 @@ RSpec.describe Expressir::ExpressExp::Parser do
86
86
  expect(schemas[0].file).to eq(exp_files[0].to_s)
87
87
  expect(schemas[0].id).to eq("single_schema")
88
88
  expect(schemas[1].file).to eq(exp_files[1].to_s)
89
- expect(schemas[1].id).to eq("multiple_schema1")
89
+ expect(schemas[1].id).to eq("multiple_schema")
90
90
  expect(schemas[2].file).to eq(exp_files[1].to_s)
91
91
  expect(schemas[2].id).to eq("multiple_schema2")
92
92
  expect(schemas[3].file).to eq(exp_files[1].to_s)
@@ -71,7 +71,57 @@ RSpec.describe Expressir::Model::ModelElement do
71
71
  end
72
72
 
73
73
  describe ".find" do
74
- it "finds an object" do
74
+ it "finds an object (single.exp)" do
75
+ exp_file = Expressir.root_path.join("original", "examples", "syntax", "single.exp")
76
+
77
+ repo = Expressir::ExpressExp::Parser.from_file(exp_file)
78
+
79
+ # universal scope
80
+ expect(repo.find('single_schema')).to be_instance_of(Expressir::Model::Schema)
81
+ expect(repo.find('single_schema.empty_entity')).to be_instance_of(Expressir::Model::Entity)
82
+
83
+ # schema scope
84
+ schema = repo.schemas.first
85
+ expect(schema.find('empty_entity')).to be_instance_of(Expressir::Model::Entity)
86
+ end
87
+
88
+ it "finds an object (multiple.exp)" do
89
+ exp_file = Expressir.root_path.join("original", "examples", "syntax", "multiple.exp")
90
+
91
+ repo = Expressir::ExpressExp::Parser.from_file(exp_file)
92
+
93
+ # universal scope
94
+ expect(repo.find('multiple_schema')).to be_instance_of(Expressir::Model::Schema)
95
+ expect(repo.find('multiple_schema.empty_entity')).to be_instance_of(Expressir::Model::Entity)
96
+ expect(repo.find('multiple_schema.attribute_entity')).to be_instance_of(Expressir::Model::Entity)
97
+ expect(repo.find('multiple_schema.attribute_entity2')).to be_instance_of(Expressir::Model::Entity)
98
+ expect(repo.find('multiple_schema.attribute_entity3')).to be_instance_of(Expressir::Model::Entity)
99
+ expect(repo.find('multiple_schema.attribute_entity4')).to be_instance_of(Expressir::Model::Entity)
100
+
101
+ # schema scope
102
+ schema = repo.schemas.first
103
+ expect(schema.find('empty_entity')).to be_instance_of(Expressir::Model::Entity)
104
+ expect(schema.find('attribute_entity')).to be_instance_of(Expressir::Model::Entity)
105
+ expect(schema.find('attribute_entity2')).to be_instance_of(Expressir::Model::Entity)
106
+ expect(schema.find('attribute_entity3')).to be_instance_of(Expressir::Model::Entity)
107
+ expect(schema.find('attribute_entity4')).to be_instance_of(Expressir::Model::Entity)
108
+ end
109
+
110
+ it "finds an object (syntax.exp)" do
111
+ exp_file = Expressir.root_path.join("original", "examples", "syntax", "syntax.exp")
112
+
113
+ repo = Expressir::ExpressExp::Parser.from_file(exp_file)
114
+
115
+ # universal scope
116
+ expect(repo.find('syntax_schema')).to be_instance_of(Expressir::Model::Schema)
117
+ expect(repo.find('syntax_schema.empty_entity')).to be_instance_of(Expressir::Model::Entity)
118
+
119
+ # schema scope
120
+ schema = repo.schemas.first
121
+ expect(schema.find('empty_entity')).to be_instance_of(Expressir::Model::Entity)
122
+ end
123
+
124
+ it "finds an object (remark.exp)" do
75
125
  exp_file = Expressir.root_path.join("original", "examples", "syntax", "remark.exp")
76
126
 
77
127
  repo = Expressir::ExpressExp::Parser.from_file(exp_file)
@@ -82,8 +132,8 @@ RSpec.describe Expressir::Model::ModelElement do
82
132
  expect(repo.find('remark_schema.remark_type')).to be_instance_of(Expressir::Model::Type)
83
133
  expect(repo.find('remark_schema.remark_type.WR1')).to be_instance_of(Expressir::Model::Where)
84
134
  expect(repo.find('remark_schema.remark_type.wr:WR1')).to be_instance_of(Expressir::Model::Where)
85
- expect(repo.find('remark_schema.remark_type.IP1')).to be_instance_of(Expressir::Model::InformalProposition)
86
- expect(repo.find('remark_schema.remark_type.ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
135
+ expect(repo.find('remark_schema.remark_type.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
136
+ expect(repo.find('remark_schema.remark_type.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
87
137
  expect(repo.find('remark_schema.remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
88
138
  expect(repo.find('remark_schema.remark_entity')).to be_instance_of(Expressir::Model::Entity)
89
139
  expect(repo.find('remark_schema.remark_entity.remark_attribute')).to be_instance_of(Expressir::Model::Attribute)
@@ -92,8 +142,8 @@ RSpec.describe Expressir::Model::ModelElement do
92
142
  expect(repo.find('remark_schema.remark_entity.UR1')).to be_instance_of(Expressir::Model::Unique)
93
143
  expect(repo.find('remark_schema.remark_entity.WR1')).to be_instance_of(Expressir::Model::Where)
94
144
  expect(repo.find('remark_schema.remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::Where)
95
- expect(repo.find('remark_schema.remark_entity.IP1')).to be_instance_of(Expressir::Model::InformalProposition)
96
- expect(repo.find('remark_schema.remark_entity.ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
145
+ expect(repo.find('remark_schema.remark_entity.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
146
+ expect(repo.find('remark_schema.remark_entity.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
97
147
  expect(repo.find('remark_schema.remark_subtype_constraint')).to be_instance_of(Expressir::Model::SubtypeConstraint)
98
148
  expect(repo.find('remark_schema.remark_function')).to be_instance_of(Expressir::Model::Function)
99
149
  expect(repo.find('remark_schema.remark_function.remark_parameter')).to be_instance_of(Expressir::Model::Parameter)
@@ -114,8 +164,9 @@ RSpec.describe Expressir::Model::ModelElement do
114
164
  expect(repo.find('remark_schema.remark_rule.remark_variable')).to be_instance_of(Expressir::Model::Variable)
115
165
  expect(repo.find('remark_schema.remark_rule.WR1')).to be_instance_of(Expressir::Model::Where)
116
166
  expect(repo.find('remark_schema.remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::Where)
117
- expect(repo.find('remark_schema.remark_rule.IP1')).to be_instance_of(Expressir::Model::InformalProposition)
118
- expect(repo.find('remark_schema.remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
167
+ expect(repo.find('remark_schema.remark_rule.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
168
+ expect(repo.find('remark_schema.remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
169
+ expect(repo.find('remark_schema.remark_item')).to be_instance_of(Expressir::Model::RemarkItem)
119
170
 
120
171
  # schema scope
121
172
  schema = repo.schemas.first
@@ -123,8 +174,8 @@ RSpec.describe Expressir::Model::ModelElement do
123
174
  expect(schema.find('remark_type')).to be_instance_of(Expressir::Model::Type)
124
175
  expect(schema.find('remark_type.WR1')).to be_instance_of(Expressir::Model::Where)
125
176
  expect(schema.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::Where)
126
- expect(schema.find('remark_type.IP1')).to be_instance_of(Expressir::Model::InformalProposition)
127
- expect(schema.find('remark_type.ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
177
+ expect(schema.find('remark_type.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
178
+ expect(schema.find('remark_type.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
128
179
  expect(schema.find('remark_enumeration_item')).to be_instance_of(Expressir::Model::EnumerationItem)
129
180
  expect(schema.find('remark_entity')).to be_instance_of(Expressir::Model::Entity)
130
181
  expect(schema.find('remark_entity.remark_attribute')).to be_instance_of(Expressir::Model::Attribute)
@@ -133,8 +184,8 @@ RSpec.describe Expressir::Model::ModelElement do
133
184
  expect(schema.find('remark_entity.UR1')).to be_instance_of(Expressir::Model::Unique)
134
185
  expect(schema.find('remark_entity.WR1')).to be_instance_of(Expressir::Model::Where)
135
186
  expect(schema.find('remark_entity.wr:WR1')).to be_instance_of(Expressir::Model::Where)
136
- expect(schema.find('remark_entity.IP1')).to be_instance_of(Expressir::Model::InformalProposition)
137
- expect(schema.find('remark_entity.ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
187
+ expect(schema.find('remark_entity.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
188
+ expect(schema.find('remark_entity.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
138
189
  expect(schema.find('remark_subtype_constraint')).to be_instance_of(Expressir::Model::SubtypeConstraint)
139
190
  expect(schema.find('remark_function')).to be_instance_of(Expressir::Model::Function)
140
191
  expect(schema.find('remark_function.remark_parameter')).to be_instance_of(Expressir::Model::Parameter)
@@ -155,15 +206,16 @@ RSpec.describe Expressir::Model::ModelElement do
155
206
  expect(schema.find('remark_rule.remark_variable')).to be_instance_of(Expressir::Model::Variable)
156
207
  expect(schema.find('remark_rule.WR1')).to be_instance_of(Expressir::Model::Where)
157
208
  expect(schema.find('remark_rule.wr:WR1')).to be_instance_of(Expressir::Model::Where)
158
- expect(schema.find('remark_rule.IP1')).to be_instance_of(Expressir::Model::InformalProposition)
159
- expect(schema.find('remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
209
+ expect(schema.find('remark_rule.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
210
+ expect(schema.find('remark_rule.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
211
+ expect(schema.find('remark_item')).to be_instance_of(Expressir::Model::RemarkItem)
160
212
 
161
213
  # type scope
162
214
  type = schema.types.first
163
215
  expect(type.find('WR1')).to be_instance_of(Expressir::Model::Where)
164
216
  expect(type.find('wr:WR1')).to be_instance_of(Expressir::Model::Where)
165
- expect(type.find('IP1')).to be_instance_of(Expressir::Model::InformalProposition)
166
- expect(type.find('ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
217
+ expect(type.find('IP1')).to be_instance_of(Expressir::Model::RemarkItem)
218
+ expect(type.find('ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
167
219
 
168
220
  # entity scope
169
221
  entity = schema.entities.first
@@ -173,8 +225,8 @@ RSpec.describe Expressir::Model::ModelElement do
173
225
  expect(entity.find('UR1')).to be_instance_of(Expressir::Model::Unique)
174
226
  expect(entity.find('WR1')).to be_instance_of(Expressir::Model::Where)
175
227
  expect(entity.find('wr:WR1')).to be_instance_of(Expressir::Model::Where)
176
- expect(entity.find('IP1')).to be_instance_of(Expressir::Model::InformalProposition)
177
- expect(entity.find('ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
228
+ expect(entity.find('IP1')).to be_instance_of(Expressir::Model::RemarkItem)
229
+ expect(entity.find('ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
178
230
 
179
231
  # function scope
180
232
  function = schema.functions.first
@@ -200,15 +252,15 @@ RSpec.describe Expressir::Model::ModelElement do
200
252
  expect(rule.find('remark_variable')).to be_instance_of(Expressir::Model::Variable)
201
253
  expect(rule.find('WR1')).to be_instance_of(Expressir::Model::Where)
202
254
  expect(rule.find('wr:WR1')).to be_instance_of(Expressir::Model::Where)
203
- expect(rule.find('IP1')).to be_instance_of(Expressir::Model::InformalProposition)
204
- expect(rule.find('ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
255
+ expect(rule.find('IP1')).to be_instance_of(Expressir::Model::RemarkItem)
256
+ expect(rule.find('ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
205
257
 
206
258
  # retry search in parent scope
207
259
  expect(entity.find('remark_type')).to be_instance_of(Expressir::Model::Type)
208
260
  expect(entity.find('remark_type.WR1')).to be_instance_of(Expressir::Model::Where)
209
261
  expect(entity.find('remark_type.wr:WR1')).to be_instance_of(Expressir::Model::Where)
210
- expect(entity.find('remark_type.IP1')).to be_instance_of(Expressir::Model::InformalProposition)
211
- expect(entity.find('remark_type.ip:IP1')).to be_instance_of(Expressir::Model::InformalProposition)
262
+ expect(entity.find('remark_type.IP1')).to be_instance_of(Expressir::Model::RemarkItem)
263
+ expect(entity.find('remark_type.ip:IP1')).to be_instance_of(Expressir::Model::RemarkItem)
212
264
  end
213
265
  end
214
266
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.19
4
+ version: 0.2.27
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-10 00:00:00.000000000 Z
11
+ date: 2021-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -175,6 +175,7 @@ files:
175
175
  - docs/development.md
176
176
  - exe/expressir
177
177
  - exe/format
178
+ - exe/format-test
178
179
  - exe/generate-parser
179
180
  - expressir.gemspec
180
181
  - lib/expressir.rb
@@ -215,14 +216,18 @@ files:
215
216
  - lib/expressir/express_exp/2.6/express_parser.so
216
217
  - lib/expressir/express_exp/2.7/express_parser.so
217
218
  - lib/expressir/express_exp/3.0/express_parser.so
219
+ - lib/expressir/express_exp/cache.rb
218
220
  - lib/expressir/express_exp/formatter.rb
219
221
  - lib/expressir/express_exp/hyperlink_formatter.rb
222
+ - lib/expressir/express_exp/model_visitor.rb
220
223
  - lib/expressir/express_exp/parser.rb
224
+ - lib/expressir/express_exp/resolve_references_model_visitor.rb
221
225
  - lib/expressir/express_exp/schema_head_formatter.rb
222
226
  - lib/expressir/express_exp/visitor.rb
223
227
  - lib/expressir/express_parser.rb
224
228
  - lib/expressir/model.rb
225
229
  - lib/expressir/model/attribute.rb
230
+ - lib/expressir/model/cache.rb
226
231
  - lib/expressir/model/constant.rb
227
232
  - lib/expressir/model/entity.rb
228
233
  - lib/expressir/model/enumeration_item.rb
@@ -240,7 +245,6 @@ files:
240
245
  - lib/expressir/model/expressions/unary_expression.rb
241
246
  - lib/expressir/model/function.rb
242
247
  - lib/expressir/model/identifier.rb
243
- - lib/expressir/model/informal_proposition.rb
244
248
  - lib/expressir/model/interface.rb
245
249
  - lib/expressir/model/interface_item.rb
246
250
  - lib/expressir/model/interfaced_item.rb
@@ -252,9 +256,12 @@ files:
252
256
  - lib/expressir/model/model_element.rb
253
257
  - lib/expressir/model/parameter.rb
254
258
  - lib/expressir/model/procedure.rb
259
+ - lib/expressir/model/remark_item.rb
255
260
  - lib/expressir/model/repository.rb
256
261
  - lib/expressir/model/rule.rb
257
262
  - lib/expressir/model/schema.rb
263
+ - lib/expressir/model/schema_version.rb
264
+ - lib/expressir/model/schema_version_item.rb
258
265
  - lib/expressir/model/statements/alias.rb
259
266
  - lib/expressir/model/statements/assignment.rb
260
267
  - lib/expressir/model/statements/call.rb
@@ -335,6 +342,7 @@ files:
335
342
  - original/examples/syntax/syntax.exp
336
343
  - original/examples/syntax/syntax.yaml
337
344
  - original/examples/syntax/syntax_formatted.exp
345
+ - original/examples/syntax/syntax_hyperlink_formatted.exp
338
346
  - original/examples/syntax/syntax_schema_head_formatted.exp
339
347
  - original/exp2ruby.rb
340
348
  - original/expsm.rb
@@ -347,6 +355,7 @@ files:
347
355
  - spec/acceptance/express_to_owl_spec.rb
348
356
  - spec/acceptance/version_spec.rb
349
357
  - spec/expressir/express/repository_spec.rb
358
+ - spec/expressir/express_exp/cache_spec.rb
350
359
  - spec/expressir/express_exp/formatter_spec.rb
351
360
  - spec/expressir/express_exp/parser_spec.rb
352
361
  - spec/expressir/model/model_element_spec.rb
@@ -1,18 +0,0 @@
1
- module Expressir
2
- module Model
3
- class InformalProposition < ModelElement
4
- include Identifier
5
-
6
- undef :source
7
- undef :source=
8
-
9
- def initialize(options = {})
10
- @id = options[:id]
11
- @remarks = options.fetch(:remarks, [])
12
- # @source = options[:source]
13
-
14
- super
15
- end
16
- end
17
- end
18
- end