expressir 1.2.8-x86_64-darwin → 1.2.9-x86_64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79585762364cc82c2c9764c681418766961f7ef4aa02336de3f0f3f3978f4dfa
4
- data.tar.gz: a32c03ee6f221e5ee06ba6a9bfb7d080069800e662684422d5f5e9ff664acec1
3
+ metadata.gz: 5cb83cbad52aaa9ac9bfc628f06d15a5d29a3e73ad73d4ef926b2278cc0c164c
4
+ data.tar.gz: 247f7ece048630c52f07724defa6aae0a326755e4b4ef259b855e9afb5e91179
5
5
  SHA512:
6
- metadata.gz: ff88493866361e1c792585ccbe5dcc7b042537cf6a21467c11b249cd753a780a7abacb7cfe33ce986b88c28d8745876959d906097d0efd38b2137eee63c10fac
7
- data.tar.gz: b632c1bfbb3d7256e50d45acf174cecad888a99ddabb854e891d41c4167f861ef0815ec03487fbed69f90c9745208259685d3164d2d1bec63686cbf21598507f
6
+ metadata.gz: 313c7fe5228d35b9f228d237cfafbcd6415b986101f7681c3d45632af7a5c07bcb675876643ed9d0eb16559c3d888491199db940e5ce1279fe7d325048f046e8
7
+ data.tar.gz: 3dc47ca6c0fd9e6dfe4e6bdf7a281b1f57c932ab68ba499a46c1b342ff60171f8bccb3625819a6f17017e559810809310161c64f775fa172cd870821b22db2ed
@@ -83,8 +83,6 @@ jobs:
83
83
  # test release workflow
84
84
  pack-ruby:
85
85
  runs-on: ubuntu-latest
86
- strategy:
87
- fail-fast: false
88
86
  steps:
89
87
  - name: Checkout
90
88
  uses: actions/checkout@v3
@@ -15,24 +15,17 @@ concurrency:
15
15
  group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
16
16
  cancel-in-progress: true
17
17
 
18
- env:
19
- BUNDLER_VER: 2.3.24
20
- # Forcing bundler version to ensure that it is consistent everywhere and
21
- # does not cause bundler gem reinstalls
22
- # bundler/rubygems 2.3.22 is a minimal requirement to support gnu/musl differentiation
23
- # https://github.com/rubygems/rubygems/pull/4488
24
-
25
18
  jobs:
26
19
  bump:
27
20
  runs-on: ubuntu-latest
28
21
  steps:
29
- - uses: actions/checkout@v2
22
+ - uses: actions/checkout@v4
30
23
  with:
31
24
  submodules: recursive
32
25
 
33
26
  - uses: ruby/setup-ruby@master
34
27
  with:
35
- ruby-version: '3.0'
28
+ ruby-version: '3.1'
36
29
  bundler: ${{ env.BUNDLER_VER }}
37
30
 
38
31
  - if: ${{ github.event_name == 'workflow_dispatch' }} # unfortunatelly cannot keep this condition on job level
@@ -50,17 +43,16 @@ jobs:
50
43
  matrix:
51
44
  host: [ linux, windows, darwin ]
52
45
  steps:
53
- - uses: actions/checkout@v2
46
+ - uses: actions/checkout@v4
54
47
  with:
55
48
  submodules: recursive
56
49
  ref: main # https://github.com/actions/checkout/issues/439#issuecomment-830862188
57
50
 
58
51
  - uses: ruby/setup-ruby@master
59
52
  with:
60
- ruby-version: '3.0'
53
+ ruby-version: '3.1'
61
54
  # bundler-cache: true important to not use cache because it leads to "cannot find -lrice"
62
55
  # more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
63
- bundler: ${{ env.BUNDLER_VER }}
64
56
 
65
57
  - run: bundle install --jobs 4 --retry 3
66
58
 
@@ -90,7 +82,7 @@ jobs:
90
82
  path: pkg/*.gem
91
83
 
92
84
  publish:
93
- runs-on: ubuntu-18.04
85
+ runs-on: ubuntu-latest
94
86
  needs: pack
95
87
  steps:
96
88
  - uses: actions/download-artifact@v3
@@ -115,8 +107,7 @@ jobs:
115
107
 
116
108
  - uses: ruby/setup-ruby@master
117
109
  with:
118
- ruby-version: '3.0'
119
- bundler: ${{ env.BUNDLER_VER }}
110
+ ruby-version: '3.1'
120
111
 
121
112
  - run: ls -l pkg/
122
113
 
data/.rubocop.yml CHANGED
@@ -3,6 +3,7 @@ inherit_from:
3
3
 
4
4
  AllCops:
5
5
  TargetRubyVersion: 2.7
6
+ NewCops: enable
6
7
  SuggestExtensions: false
7
8
  Exclude:
8
9
  - 'vendor/**/*'
data/bin/rspec CHANGED
@@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
15
15
  bundle_binstub = File.expand_path("bundle", __dir__)
16
16
 
17
17
  if File.file?(bundle_binstub)
18
- if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
18
+ if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
19
19
  load(bundle_binstub)
20
20
  else
21
21
  abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
data/expressir.gemspec CHANGED
@@ -41,8 +41,8 @@ Gem::Specification.new do |spec|
41
41
  spec.add_development_dependency "rake-compiler", "~> 1.2"
42
42
  spec.add_development_dependency "rake-compiler-dock", "~> 1.2.1"
43
43
  spec.add_development_dependency "rspec", "~> 3.11"
44
- spec.add_development_dependency "rubocop", "1.5.2"
45
- spec.add_development_dependency "rubocop-performance", "~> 1.0"
44
+ spec.add_development_dependency "rubocop", "1.58"
45
+ spec.add_development_dependency "rubocop-performance", "~> 1.19"
46
46
  spec.add_development_dependency "webrick", "~> 1.7.0"
47
47
  spec.add_development_dependency "yard", "~> 0.9.26"
48
48
  end
@@ -17,7 +17,7 @@ require "set"
17
17
  # - such multi-pass parsing is not implemented yet
18
18
  # - xxxRef - merged to SimpleReference
19
19
  # - entityConstructor, functionCall - merged to FunctionCall
20
- #
20
+ #
21
21
  # difference between generalized and instantiable types is not recognized
22
22
  # see note in 8.6.2 Parameter data types
23
23
  # > A syntactic construct such as ARRAY[1:3] OF REAL satisfies two syntactic productions —
@@ -69,7 +69,7 @@ module Expressir
69
69
  default
70
70
  end
71
71
  end
72
-
72
+
73
73
  def visit_if_map(ctx)
74
74
  if ctx
75
75
  ctx.map{|ctx2| visit(ctx2)}
@@ -77,7 +77,7 @@ module Expressir
77
77
  []
78
78
  end
79
79
  end
80
-
80
+
81
81
  def visit_if_map_flatten(ctx)
82
82
  if ctx
83
83
  ctx.map{|ctx2| visit(ctx2)}.flatten
@@ -111,15 +111,25 @@ module Expressir
111
111
  end
112
112
  end
113
113
 
114
+ def node_find(node, path)
115
+ if node.is_a?(Enumerable)
116
+ target_node = node.find { |item| item.find(path) }
117
+ else
118
+ target_node = node.find(path)
119
+ end
120
+ target_node
121
+ end
122
+
114
123
  def find_remark_target(node, path)
115
- target_node = node.find(path)
124
+ target_node = node_find(node, path)
125
+
116
126
  return target_node if target_node
117
127
 
118
128
  # check if path can create implicit remark item
119
129
  # see https://github.com/lutaml/expressir/issues/78
120
130
  rest, _, current_path = path.rpartition(".") # get last path part
121
131
  _, _, current_path = current_path.rpartition(":") # ignore prefix
122
- parent_node = node.find(rest)
132
+ parent_node = node_find(node, rest)
123
133
  if parent_node and parent_node.class.method_defined? :remark_items
124
134
  remark_item = Model::Declarations::RemarkItem.new(
125
135
  id: current_path
@@ -134,7 +144,7 @@ module Expressir
134
144
  parent_node.remark_items << remark_item
135
145
  end
136
146
  parent_node.reset_children_by_id
137
-
147
+
138
148
  remark_item
139
149
  end
140
150
  end
@@ -427,7 +437,7 @@ module Expressir
427
437
  optional = ctx__OPTIONAL && true
428
438
  unique = ctx__UNIQUE && true
429
439
  base_type = visit_if(ctx__instantiable_type)
430
-
440
+
431
441
  Model::DataTypes::Array.new(
432
442
  bound1: bound1,
433
443
  bound2: bound2,
@@ -495,7 +505,7 @@ module Expressir
495
505
  bound1 = visit_if(ctx__bound_spec__bound1)
496
506
  bound2 = visit_if(ctx__bound_spec__bound2)
497
507
  base_type = visit_if(ctx__instantiable_type)
498
-
508
+
499
509
  Model::DataTypes::Bag.new(
500
510
  bound1: bound1,
501
511
  bound2: bound2,
@@ -830,7 +840,7 @@ module Expressir
830
840
  if ctx__type_ref
831
841
  ref = visit_if(ctx__type_ref)
832
842
  attribute = visit_if(ctx__enumeration_ref)
833
-
843
+
834
844
  Model::References::AttributeReference.new(
835
845
  ref: ref,
836
846
  attribute: attribute
@@ -1030,7 +1040,7 @@ module Expressir
1030
1040
  optional = ctx__OPTIONAL && true
1031
1041
  unique = ctx__UNIQUE && true
1032
1042
  base_type = visit_if(ctx__parameter_type)
1033
-
1043
+
1034
1044
  Model::DataTypes::Array.new(
1035
1045
  bound1: bound1,
1036
1046
  bound2: bound2,
@@ -1049,7 +1059,7 @@ module Expressir
1049
1059
  bound1 = visit_if(ctx__bound_spec__bound1)
1050
1060
  bound2 = visit_if(ctx__bound_spec__bound2)
1051
1061
  base_type = visit_if(ctx__parameter_type)
1052
-
1062
+
1053
1063
  Model::DataTypes::Bag.new(
1054
1064
  bound1: bound1,
1055
1065
  bound2: bound2,
@@ -1068,7 +1078,7 @@ module Expressir
1068
1078
  bound2 = visit_if(ctx__bound_spec__bound2)
1069
1079
  unique = ctx__UNIQUE && true
1070
1080
  base_type = visit_if(ctx__parameter_type)
1071
-
1081
+
1072
1082
  Model::DataTypes::List.new(
1073
1083
  bound1: bound1,
1074
1084
  bound2: bound2,
@@ -1093,7 +1103,7 @@ module Expressir
1093
1103
  bound1 = visit_if(ctx__bound_spec__bound1)
1094
1104
  bound2 = visit_if(ctx__bound_spec__bound2)
1095
1105
  base_type = visit_if(ctx__parameter_type)
1096
-
1106
+
1097
1107
  Model::DataTypes::Set.new(
1098
1108
  bound1: bound1,
1099
1109
  bound2: bound2,
@@ -1358,7 +1368,7 @@ module Expressir
1358
1368
  bound2 = visit_if(ctx__bound_spec__bound2)
1359
1369
  unique = ctx__UNIQUE && true
1360
1370
  base_type = visit_if(ctx__instantiable_type)
1361
-
1371
+
1362
1372
  Model::DataTypes::List.new(
1363
1373
  bound1: bound1,
1364
1374
  bound2: bound2,
@@ -1989,7 +1999,7 @@ module Expressir
1989
1999
  end
1990
2000
  end
1991
2001
  end
1992
-
2002
+
1993
2003
  Model::Declarations::SchemaVersion.new(
1994
2004
  value: value,
1995
2005
  items: items
@@ -2042,7 +2052,7 @@ module Expressir
2042
2052
  bound1 = visit_if(ctx__bound_spec__bound1)
2043
2053
  bound2 = visit_if(ctx__bound_spec__bound2)
2044
2054
  base_type = visit_if(ctx__instantiable_type)
2045
-
2055
+
2046
2056
  Model::DataTypes::Set.new(
2047
2057
  bound1: bound1,
2048
2058
  bound2: bound2,
@@ -2087,7 +2097,7 @@ module Expressir
2087
2097
  def visit_simple_factor_expression(ctx)
2088
2098
  ctx__expression = ctx.expression
2089
2099
  ctx__primary = ctx.primary
2090
-
2100
+
2091
2101
  visit_if(ctx__expression || ctx__primary)
2092
2102
  end
2093
2103
 
@@ -2575,4 +2585,4 @@ module Expressir
2575
2585
  end
2576
2586
  end
2577
2587
  end
2578
- end
2588
+ end
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "1.2.8".freeze
2
+ VERSION = "1.2.9".freeze
3
3
  end
@@ -126,7 +126,7 @@ CrossRuby = Struct.new(:version, :host) do
126
126
 
127
127
  def verify_entry_linux(dll)
128
128
  nm = `#{["env", "LANG=C", tool("nm"), "-D", dll].shelljoin}`
129
- unless / T Init_express_parser/.match?(nm)
129
+ unless nm.include?(" T Init_express_parser")
130
130
  raise "Export function Init_express_parser not in dll #{dll}"
131
131
  end
132
132
  end
@@ -223,7 +223,7 @@ CrossRuby = Struct.new(:version, :host) do
223
223
  end
224
224
 
225
225
  def actual_dlls_windows(dump)
226
- dump.scan(/DLL Name: (.*)$/).map(&:first).map(&:downcase).uniq
226
+ dump.scan(/DLL Name: (.*)$/).map { |x| x.first.downcase }.uniq
227
227
  end
228
228
 
229
229
  def actual_dlls_darwin(dll)
@@ -272,12 +272,12 @@ CrossRuby = Struct.new(:version, :host) do
272
272
  end
273
273
  end
274
274
 
275
- CROSS_RUBIES = File.read(".cross_rubies").split("\n").map do |line|
275
+ CROSS_RUBIES = File.read(".cross_rubies").split("\n").filter_map do |line|
276
276
  case line
277
277
  when /\A([^#]+):([^#]+)/
278
278
  CrossRuby.new($1, $2)
279
279
  end
280
- end.compact
280
+ end
281
281
 
282
282
  ENV["RUBY_CC_VERSION"] = CROSS_RUBIES.map(&:ver).uniq.join(":")
283
283
 
@@ -329,7 +329,7 @@ namespace "gem" do
329
329
  #{pre_req(plat)} &&
330
330
  gem install bundler --no-document &&
331
331
  bundle &&
332
- bundle exec rake gem:#{plat}:builder MAKE='nice make -j`nproc`'
332
+ bundle exec rake gem:#{plat}:builder MAKE="nice make -j`nproc`"
333
333
  RCD
334
334
  end
335
335
 
@@ -23,7 +23,9 @@ ENTITY remark_entity;
23
23
  DERIVE remark_derived_attribute : STRING := 'xxx';
24
24
  INVERSE remark_inverse_attribute : remark_entity FOR remark_attribute;
25
25
  UNIQUE UR1: remark_attribute;
26
- WHERE WR1: TRUE;
26
+ WHERE WR1:
27
+ --"unusual_placement" placed inside WHERE clauses (or other enumerable context)
28
+ TRUE;
27
29
  --"remark_attribute" entity scope - entity attribute
28
30
  --"remark_derived_attribute" entity scope - entity derived attribute
29
31
  --"remark_inverse_attribute" entity scope - entity inverse attribute
@@ -188,4 +190,4 @@ END_SCHEMA;
188
190
  --"remark_schema.remark_procedure.remark_enumeration_item" universal scope - procedure enumeration item, on the same level as the type
189
191
  --"remark_schema.remark_procedure.remark_constant" universal scope - procedure constant
190
192
  --"remark_schema.remark_procedure.remark_variable" universal scope - procedure variable
191
- --"remark_schema.remark_item" universal scope - schema remark item
193
+ --"remark_schema.remark_item" universal scope - schema remark item
@@ -133,6 +133,11 @@ schemas:
133
133
  - schema scope - entity where, with prefix
134
134
  - universal scope - entity where
135
135
  - universal scope - entity where, with prefix
136
+ remark_items:
137
+ - _class: Expressir::Model::Declarations::RemarkItem
138
+ id: unusual_placement
139
+ remarks:
140
+ - placed inside WHERE clauses (or other enumerable context)
136
141
  expression:
137
142
  _class: Expressir::Model::Literals::Logical
138
143
  value: :TRUE
@@ -146,6 +146,7 @@ several physical lines.
146
146
  --"remark_schema.remark_entity.WR1" schema scope - entity where, with prefix
147
147
  --"remark_schema.remark_entity.WR1" universal scope - entity where
148
148
  --"remark_schema.remark_entity.WR1" universal scope - entity where, with prefix
149
+ --"remark_schema.remark_entity.WR1.unusual_placement" placed inside WHERE clauses (or other enumerable context)
149
150
  --"remark_schema.remark_entity.IP1" entity scope - entity informal proposition
150
151
  --"remark_schema.remark_entity.IP1" entity scope - entity informal proposition, with prefix
151
152
  --"remark_schema.remark_entity.IP1" schema scope - entity informal proposition
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.8
4
+ version: 1.2.9
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-26 00:00:00.000000000 Z
11
+ date: 2023-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -156,28 +156,28 @@ dependencies:
156
156
  requirements:
157
157
  - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: 1.5.2
159
+ version: '1.58'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: 1.5.2
166
+ version: '1.58'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rubocop-performance
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: '1.0'
173
+ version: '1.19'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: '1.0'
180
+ version: '1.19'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: webrick
183
183
  requirement: !ruby/object:Gem::Requirement