expressir 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/demo.rb +16 -0
  4. data/expressir.gemspec +1 -0
  5. data/generate-parser.sh +29 -0
  6. data/lib/expressir/express_exp/generated/ExpressBaseVisitor.rb +779 -0
  7. data/lib/expressir/express_exp/generated/ExpressLexer.rb +841 -0
  8. data/lib/expressir/express_exp/generated/ExpressParser.rb +12136 -0
  9. data/lib/expressir/express_exp/generated/ExpressVisitor.rb +394 -0
  10. data/lib/expressir/express_exp/parser.rb +25 -0
  11. data/lib/expressir/express_exp/visitor.rb +2103 -0
  12. data/lib/expressir/model/constant.rb +15 -0
  13. data/lib/expressir/model/derived.rb +15 -0
  14. data/lib/expressir/model/entity.rb +29 -0
  15. data/lib/expressir/model/explicit.rb +15 -0
  16. data/lib/expressir/model/expressions/aggregate_element.rb +15 -0
  17. data/lib/expressir/model/expressions/attribute_qualifier.rb +13 -0
  18. data/lib/expressir/model/expressions/entity_constructor.rb +15 -0
  19. data/lib/expressir/model/expressions/expression.rb +15 -0
  20. data/lib/expressir/model/expressions/function_call.rb +15 -0
  21. data/lib/expressir/model/expressions/group_qualifier.rb +13 -0
  22. data/lib/expressir/model/expressions/index_qualifier.rb +15 -0
  23. data/lib/expressir/model/expressions/interval.rb +21 -0
  24. data/lib/expressir/model/expressions/qualified_ref.rb +15 -0
  25. data/lib/expressir/model/expressions/query.rb +17 -0
  26. data/lib/expressir/model/expressions/unknown.rb +8 -0
  27. data/lib/expressir/model/function.rb +23 -0
  28. data/lib/expressir/model/inverse.rb +15 -0
  29. data/lib/expressir/model/local.rb +15 -0
  30. data/lib/expressir/model/operators/addition.rb +8 -0
  31. data/lib/expressir/model/operators/and.rb +8 -0
  32. data/lib/expressir/model/operators/andor.rb +8 -0
  33. data/lib/expressir/model/operators/combine.rb +8 -0
  34. data/lib/expressir/model/operators/equal.rb +8 -0
  35. data/lib/expressir/model/operators/exponentiation.rb +8 -0
  36. data/lib/expressir/model/operators/greater_than.rb +8 -0
  37. data/lib/expressir/model/operators/greater_than_or_equal.rb +8 -0
  38. data/lib/expressir/model/operators/in.rb +8 -0
  39. data/lib/expressir/model/operators/instance_equal.rb +8 -0
  40. data/lib/expressir/model/operators/instance_not_equal.rb +8 -0
  41. data/lib/expressir/model/operators/integer_division.rb +8 -0
  42. data/lib/expressir/model/operators/less_than.rb +8 -0
  43. data/lib/expressir/model/operators/less_than_or_equal.rb +8 -0
  44. data/lib/expressir/model/operators/like.rb +8 -0
  45. data/lib/expressir/model/operators/modulo.rb +8 -0
  46. data/lib/expressir/model/operators/multiplication.rb +8 -0
  47. data/lib/expressir/model/operators/not.rb +8 -0
  48. data/lib/expressir/model/operators/not_equal.rb +8 -0
  49. data/lib/expressir/model/operators/oneof.rb +8 -0
  50. data/lib/expressir/model/operators/or.rb +8 -0
  51. data/lib/expressir/model/operators/real_division.rb +8 -0
  52. data/lib/expressir/model/operators/subtraction.rb +8 -0
  53. data/lib/expressir/model/operators/unary_minus.rb +8 -0
  54. data/lib/expressir/model/operators/unary_plus.rb +8 -0
  55. data/lib/expressir/model/operators/xor.rb +8 -0
  56. data/lib/expressir/model/parameter.rb +15 -0
  57. data/lib/expressir/model/procedure.rb +21 -0
  58. data/lib/expressir/model/ref.rb +11 -0
  59. data/lib/expressir/model/reference.rb +13 -0
  60. data/lib/expressir/model/renamed_ref.rb +13 -0
  61. data/lib/expressir/model/repository.rb +11 -0
  62. data/lib/expressir/model/rule.rb +23 -0
  63. data/lib/expressir/model/schema.rb +41 -0
  64. data/lib/expressir/model/statements/alias.rb +17 -0
  65. data/lib/expressir/model/statements/assignment.rb +15 -0
  66. data/lib/expressir/model/statements/case.rb +17 -0
  67. data/lib/expressir/model/statements/case_action.rb +15 -0
  68. data/lib/expressir/model/statements/compound.rb +13 -0
  69. data/lib/expressir/model/statements/escape.rb +8 -0
  70. data/lib/expressir/model/statements/if.rb +17 -0
  71. data/lib/expressir/model/statements/null.rb +8 -0
  72. data/lib/expressir/model/statements/procedure_call.rb +15 -0
  73. data/lib/expressir/model/statements/repeat.rb +25 -0
  74. data/lib/expressir/model/statements/return.rb +13 -0
  75. data/lib/expressir/model/statements/skip.rb +8 -0
  76. data/lib/expressir/model/subtype_constraint.rb +19 -0
  77. data/lib/expressir/model/type.rb +15 -0
  78. data/lib/expressir/model/types/aggregate.rb +15 -0
  79. data/lib/expressir/model/types/array.rb +21 -0
  80. data/lib/expressir/model/types/bag.rb +17 -0
  81. data/lib/expressir/model/types/binary.rb +15 -0
  82. data/lib/expressir/model/types/boolean.rb +8 -0
  83. data/lib/expressir/model/types/enumeration.rb +19 -0
  84. data/lib/expressir/model/types/generic.rb +13 -0
  85. data/lib/expressir/model/types/generic_entity.rb +13 -0
  86. data/lib/expressir/model/types/integer.rb +8 -0
  87. data/lib/expressir/model/types/list.rb +19 -0
  88. data/lib/expressir/model/types/logical.rb +8 -0
  89. data/lib/expressir/model/types/number.rb +8 -0
  90. data/lib/expressir/model/types/real.rb +13 -0
  91. data/lib/expressir/model/types/select.rb +21 -0
  92. data/lib/expressir/model/types/set.rb +17 -0
  93. data/lib/expressir/model/types/string.rb +15 -0
  94. data/lib/expressir/model/unique.rb +13 -0
  95. data/lib/expressir/model/use.rb +13 -0
  96. data/lib/expressir/model/where.rb +13 -0
  97. data/lib/expressir/version.rb +1 -1
  98. data/original/examples/syntax/syntax.exp +295 -0
  99. data/spec/expressir/express_exp/ap233_spec.rb +22 -0
  100. data/spec/expressir/express_exp/syntax_spec.rb +2640 -0
  101. metadata +115 -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: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-16 00:00:00.000000000 Z
11
+ date: 2020-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: antlr4-runtime
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.2.11
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.2.11
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: nokogiri
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -128,9 +142,11 @@ files:
128
142
  - bin/console
129
143
  - bin/rspec
130
144
  - bin/setup
145
+ - demo.rb
131
146
  - docs/development.md
132
147
  - exe/expressir
133
148
  - expressir.gemspec
149
+ - generate-parser.sh
134
150
  - lib/expressir.rb
135
151
  - lib/expressir/cli.rb
136
152
  - lib/expressir/cli/ui.rb
@@ -164,7 +180,98 @@ files:
164
180
  - lib/expressir/express/type_select.rb
165
181
  - lib/expressir/express/unique_rule.rb
166
182
  - lib/expressir/express/where_rule.rb
183
+ - lib/expressir/express_exp/generated/ExpressBaseVisitor.rb
184
+ - lib/expressir/express_exp/generated/ExpressLexer.rb
185
+ - lib/expressir/express_exp/generated/ExpressParser.rb
186
+ - lib/expressir/express_exp/generated/ExpressVisitor.rb
187
+ - lib/expressir/express_exp/parser.rb
188
+ - lib/expressir/express_exp/visitor.rb
167
189
  - lib/expressir/express_parser.rb
190
+ - lib/expressir/model/constant.rb
191
+ - lib/expressir/model/derived.rb
192
+ - lib/expressir/model/entity.rb
193
+ - lib/expressir/model/explicit.rb
194
+ - lib/expressir/model/expressions/aggregate_element.rb
195
+ - lib/expressir/model/expressions/attribute_qualifier.rb
196
+ - lib/expressir/model/expressions/entity_constructor.rb
197
+ - lib/expressir/model/expressions/expression.rb
198
+ - lib/expressir/model/expressions/function_call.rb
199
+ - lib/expressir/model/expressions/group_qualifier.rb
200
+ - lib/expressir/model/expressions/index_qualifier.rb
201
+ - lib/expressir/model/expressions/interval.rb
202
+ - lib/expressir/model/expressions/qualified_ref.rb
203
+ - lib/expressir/model/expressions/query.rb
204
+ - lib/expressir/model/expressions/unknown.rb
205
+ - lib/expressir/model/function.rb
206
+ - lib/expressir/model/inverse.rb
207
+ - lib/expressir/model/local.rb
208
+ - lib/expressir/model/operators/addition.rb
209
+ - lib/expressir/model/operators/and.rb
210
+ - lib/expressir/model/operators/andor.rb
211
+ - lib/expressir/model/operators/combine.rb
212
+ - lib/expressir/model/operators/equal.rb
213
+ - lib/expressir/model/operators/exponentiation.rb
214
+ - lib/expressir/model/operators/greater_than.rb
215
+ - lib/expressir/model/operators/greater_than_or_equal.rb
216
+ - lib/expressir/model/operators/in.rb
217
+ - lib/expressir/model/operators/instance_equal.rb
218
+ - lib/expressir/model/operators/instance_not_equal.rb
219
+ - lib/expressir/model/operators/integer_division.rb
220
+ - lib/expressir/model/operators/less_than.rb
221
+ - lib/expressir/model/operators/less_than_or_equal.rb
222
+ - lib/expressir/model/operators/like.rb
223
+ - lib/expressir/model/operators/modulo.rb
224
+ - lib/expressir/model/operators/multiplication.rb
225
+ - lib/expressir/model/operators/not.rb
226
+ - lib/expressir/model/operators/not_equal.rb
227
+ - lib/expressir/model/operators/oneof.rb
228
+ - lib/expressir/model/operators/or.rb
229
+ - lib/expressir/model/operators/real_division.rb
230
+ - lib/expressir/model/operators/subtraction.rb
231
+ - lib/expressir/model/operators/unary_minus.rb
232
+ - lib/expressir/model/operators/unary_plus.rb
233
+ - lib/expressir/model/operators/xor.rb
234
+ - lib/expressir/model/parameter.rb
235
+ - lib/expressir/model/procedure.rb
236
+ - lib/expressir/model/ref.rb
237
+ - lib/expressir/model/reference.rb
238
+ - lib/expressir/model/renamed_ref.rb
239
+ - lib/expressir/model/repository.rb
240
+ - lib/expressir/model/rule.rb
241
+ - lib/expressir/model/schema.rb
242
+ - lib/expressir/model/statements/alias.rb
243
+ - lib/expressir/model/statements/assignment.rb
244
+ - lib/expressir/model/statements/case.rb
245
+ - lib/expressir/model/statements/case_action.rb
246
+ - lib/expressir/model/statements/compound.rb
247
+ - lib/expressir/model/statements/escape.rb
248
+ - lib/expressir/model/statements/if.rb
249
+ - lib/expressir/model/statements/null.rb
250
+ - lib/expressir/model/statements/procedure_call.rb
251
+ - lib/expressir/model/statements/repeat.rb
252
+ - lib/expressir/model/statements/return.rb
253
+ - lib/expressir/model/statements/skip.rb
254
+ - lib/expressir/model/subtype_constraint.rb
255
+ - lib/expressir/model/type.rb
256
+ - lib/expressir/model/types/aggregate.rb
257
+ - lib/expressir/model/types/array.rb
258
+ - lib/expressir/model/types/bag.rb
259
+ - lib/expressir/model/types/binary.rb
260
+ - lib/expressir/model/types/boolean.rb
261
+ - lib/expressir/model/types/enumeration.rb
262
+ - lib/expressir/model/types/generic.rb
263
+ - lib/expressir/model/types/generic_entity.rb
264
+ - lib/expressir/model/types/integer.rb
265
+ - lib/expressir/model/types/list.rb
266
+ - lib/expressir/model/types/logical.rb
267
+ - lib/expressir/model/types/number.rb
268
+ - lib/expressir/model/types/real.rb
269
+ - lib/expressir/model/types/select.rb
270
+ - lib/expressir/model/types/set.rb
271
+ - lib/expressir/model/types/string.rb
272
+ - lib/expressir/model/unique.rb
273
+ - lib/expressir/model/use.rb
274
+ - lib/expressir/model/where.rb
168
275
  - lib/expressir/parser.rb
169
276
  - lib/expressir/parser/owl_parser.rb
170
277
  - lib/expressir/version.rb
@@ -197,6 +304,7 @@ files:
197
304
  - original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.owl
198
305
  - original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xmi
199
306
  - original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xml
307
+ - original/examples/syntax/syntax.exp
200
308
  - original/exp2ruby.rb
201
309
  - original/expsm.rb
202
310
  - original/mapping_owl.rb
@@ -207,6 +315,8 @@ files:
207
315
  - spec/acceptance/express_to_owl_spec.rb
208
316
  - spec/acceptance/version_spec.rb
209
317
  - spec/expressir/express/repository_spec.rb
318
+ - spec/expressir/express_exp/ap233_spec.rb
319
+ - spec/expressir/express_exp/syntax_spec.rb
210
320
  - spec/expressr_spec.rb
211
321
  - spec/spec_helper.rb
212
322
  - spec/support/console_helper.rb
@@ -217,7 +327,7 @@ metadata:
217
327
  homepage_uri: https://github.com/lutaml/expressir
218
328
  source_code_uri: https://github.com/lutaml/expressir
219
329
  changelog_uri: https://github.com/lutaml/expressir/releases
220
- post_install_message:
330
+ post_install_message:
221
331
  rdoc_options: []
222
332
  require_paths:
223
333
  - lib
@@ -233,7 +343,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
343
  version: '0'
234
344
  requirements: []
235
345
  rubygems_version: 3.0.3
236
- signing_key:
346
+ signing_key:
237
347
  specification_version: 4
238
348
  summary: ISO EXPRESS parser in Ruby, tools for accessing EXPRESS data models.
239
349
  test_files: []