expressir 1.2.4-arm64-darwin → 1.2.7-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.cross_rubies +0 -6
  3. data/.github/workflows/rake.yml +200 -21
  4. data/.gitignore +7 -2
  5. data/.gitmodules +3 -0
  6. data/.rubocop.yml +13 -4
  7. data/README.adoc +8 -0
  8. data/Rakefile +4 -1
  9. data/bin/console +0 -1
  10. data/bin/rspec +3 -3
  11. data/exe/expressir +4 -2
  12. data/exe/format +1 -1
  13. data/exe/format-test +25 -25
  14. data/exe/generate-parser +16 -13
  15. data/expressir.gemspec +12 -10
  16. data/lib/expressir/config.rb +1 -1
  17. data/lib/expressir/express/2.7/express_parser.bundle +0 -0
  18. data/lib/expressir/express/3.0/express_parser.bundle +0 -0
  19. data/lib/expressir/express/3.1/express_parser.bundle +0 -0
  20. data/lib/expressir/express/parser.rb +3 -4
  21. data/lib/expressir/express/visitor.rb +7 -5
  22. data/lib/expressir/model.rb +78 -78
  23. data/lib/expressir/version.rb +1 -1
  24. data/rakelib/antlr4-native.rake +161 -0
  25. data/rakelib/cross-ruby.rake +213 -162
  26. data/spec/acceptance/version_spec.rb +17 -2
  27. data/spec/expressir/express/cache_spec.rb +23 -5
  28. data/spec/expressir/express/formatter_spec.rb +54 -8
  29. data/spec/expressir/express/parser_spec.rb +47 -11
  30. data/spec/expressir/model/model_element_spec.rb +198 -146
  31. data/spec/spec_helper.rb +7 -0
  32. metadata +54 -63
  33. data/demo.rb +0 -18
  34. data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.exp +0 -9589
  35. data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.owl +0 -36619
  36. data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.xml +0 -13294
  37. data/original/examples/employment/eclipse/.project +0 -17
  38. data/original/examples/employment/eclipse/Export/Employment.png +0 -0
  39. data/original/examples/employment/eclipse/Express/employment_schema.exp +0 -33
  40. data/original/examples/employment/eclipse/Express/employment_schema.xmi +0 -77
  41. data/original/examples/employment/eclipse/Express/employment_schema.xml +0 -93
  42. data/original/examples/employment/eclipse/Models/Employment.uml +0 -4
  43. data/original/examples/employment/eclipse/Models/Employment.umldi +0 -240
  44. data/original/examples/employment/eclipse/readme.txt +0 -7
  45. data/original/examples/employment/employment_schema.exp +0 -33
  46. data/original/examples/employment/employment_schema.rb +0 -232
  47. data/original/examples/employment/employment_schema.xml +0 -93
  48. data/original/examples/employment/employment_schema___module.rb +0 -46
  49. data/original/examples/employment/employment_schema___p28attr.rb +0 -126
  50. data/original/examples/employment/employment_schema___p28inst.rb +0 -26
  51. data/original/examples/employment/example_employment_data.xml +0 -1
  52. data/original/examples/employment/example_employment_data_copy.xml +0 -1
  53. data/original/examples/employment/example_employment_reader.rb +0 -30
  54. data/original/examples/employment/example_employment_writer.rb +0 -51
  55. data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.exp +0 -3710
  56. data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.owl +0 -35880
  57. data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xmi +0 -15357
  58. data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xml +0 -9468
  59. data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.exp +0 -8404
  60. data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.owl +0 -43147
  61. data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xmi +0 -18341
  62. data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xml +0 -11632
  63. data/original/exp2ruby.rb +0 -525
  64. data/original/expsm.rb +0 -34
  65. data/original/mapping_owl.rb +0 -1018
  66. data/original/mapping_sysml.rb +0 -2281
  67. data/original/mapping_uml2.rb +0 -599
  68. data/original/mapping_uml2_eclipse.rb +0 -433
  69. data/original/reeper.rb +0 -134
  70. data/spec/expressr_spec.rb +0 -5
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: 1.2.4
4
+ version: 1.2.7
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-04 00:00:00.000000000 Z
11
+ date: 2022-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -25,75 +25,75 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: asciidoctor
28
+ name: antlr4-native
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.13
33
+ version: 2.1.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.0.13
40
+ version: 2.1.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: antlr4-native
42
+ name: asciidoctor
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.1.0
47
+ version: 2.0.13
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.1.0
54
+ version: 2.0.13
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.0'
61
+ version: '2.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '2.0'
68
+ version: '2.3'
69
69
  - !ruby/object:Gem::Dependency
70
- name: pry
70
+ name: byebug
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.12.2
75
+ version: '11.1'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.12.2
82
+ version: '11.1'
83
83
  - !ruby/object:Gem::Dependency
84
- name: byebug
84
+ name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '11.1'
89
+ version: 0.12.2
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '11.1'
96
+ version: 0.12.2
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -114,56 +114,70 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '1.1'
117
+ version: '1.2'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '1.1'
124
+ version: '1.2'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake-compiler-dock
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.1'
131
+ version: 1.2.1
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.1'
138
+ version: 1.2.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '3.0'
145
+ version: '3.11'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '3.0'
152
+ version: '3.11'
153
153
  - !ruby/object:Gem::Dependency
154
- name: yard
154
+ name: rubocop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '='
158
+ - !ruby/object:Gem::Version
159
+ version: 1.5.2
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '='
165
+ - !ruby/object:Gem::Version
166
+ version: 1.5.2
167
+ - !ruby/object:Gem::Dependency
168
+ name: rubocop-performance
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
171
  - - "~>"
158
172
  - !ruby/object:Gem::Version
159
- version: 0.9.26
173
+ version: '1.0'
160
174
  type: :development
161
175
  prerelease: false
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
178
  - - "~>"
165
179
  - !ruby/object:Gem::Version
166
- version: 0.9.26
180
+ version: '1.0'
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: webrick
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +192,20 @@ dependencies:
178
192
  - - "~>"
179
193
  - !ruby/object:Gem::Version
180
194
  version: 1.7.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: yard
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: 0.9.26
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: 0.9.26
181
209
  description: Expressir (“EXPRESS in Ruby”) is a Ruby parser for EXPRESS and a set
182
210
  of Ruby tools for accessing ISO EXPRESS data models.
183
211
  email:
@@ -202,7 +230,6 @@ files:
202
230
  - bin/console
203
231
  - bin/rspec
204
232
  - bin/setup
205
- - demo.rb
206
233
  - docs/development.md
207
234
  - exe/expressir
208
235
  - exe/format
@@ -304,49 +331,13 @@ files:
304
331
  - lib/expressir/model/supertype_expressions/binary_supertype_expression.rb
305
332
  - lib/expressir/model/supertype_expressions/oneof_supertype_expression.rb
306
333
  - lib/expressir/version.rb
307
- - original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.exp
308
- - original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.owl
309
- - original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.xml
310
- - original/examples/employment/eclipse/.project
311
- - original/examples/employment/eclipse/Export/Employment.png
312
- - original/examples/employment/eclipse/Express/employment_schema.exp
313
- - original/examples/employment/eclipse/Express/employment_schema.xmi
314
- - original/examples/employment/eclipse/Express/employment_schema.xml
315
- - original/examples/employment/eclipse/Models/Employment.uml
316
- - original/examples/employment/eclipse/Models/Employment.umldi
317
- - original/examples/employment/eclipse/readme.txt
318
- - original/examples/employment/employment_schema.exp
319
- - original/examples/employment/employment_schema.rb
320
- - original/examples/employment/employment_schema.xml
321
- - original/examples/employment/employment_schema___module.rb
322
- - original/examples/employment/employment_schema___p28attr.rb
323
- - original/examples/employment/employment_schema___p28inst.rb
324
- - original/examples/employment/example_employment_data.xml
325
- - original/examples/employment/example_employment_data_copy.xml
326
- - original/examples/employment/example_employment_reader.rb
327
- - original/examples/employment/example_employment_writer.rb
328
- - original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.exp
329
- - original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.owl
330
- - original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xmi
331
- - original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xml
332
- - original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.exp
333
- - original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.owl
334
- - original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xmi
335
- - original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xml
336
- - original/exp2ruby.rb
337
- - original/expsm.rb
338
- - original/mapping_owl.rb
339
- - original/mapping_sysml.rb
340
- - original/mapping_uml2.rb
341
- - original/mapping_uml2_eclipse.rb
342
- - original/reeper.rb
334
+ - rakelib/antlr4-native.rake
343
335
  - rakelib/cross-ruby.rake
344
336
  - spec/acceptance/version_spec.rb
345
337
  - spec/expressir/express/cache_spec.rb
346
338
  - spec/expressir/express/formatter_spec.rb
347
339
  - spec/expressir/express/parser_spec.rb
348
340
  - spec/expressir/model/model_element_spec.rb
349
- - spec/expressr_spec.rb
350
341
  - spec/spec_helper.rb
351
342
  - spec/support/console_helper.rb
352
343
  - spec/syntax/multiple.exp
data/demo.rb DELETED
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'expressir'
4
- require 'expressir/express/parser'
5
-
6
- # This file is from:
7
- # https://github.com/metanorma/annotated-express/blob/master/data/resources/action_schema/action_schema.exp
8
- file = 'action_schema.exp'
9
-
10
- # repo = Expressir::Express::Parser.from_exp(file)
11
- # schema = repo.schemas.find{|schema| schema.id == "support_resource_schema"}
12
-
13
- repo = Expressir::Express::Parser.from_exp(file)
14
- schema = repo.schemas.find{|schema| schema.id == "action_schema"}
15
- entity = schema.entities.find{|entity| entity.id == "action_directive_relationship"}
16
- where_rule = entity.where_rules.find{|where_rule| where_rule.id == "WR1"}
17
-
18
- puts where_rule.inspect