expressir 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/.rubocop_todo.yml +253 -81
  4. data/Gemfile +4 -1
  5. data/README.adoc +63 -26
  6. data/benchmark/srl_benchmark.rb +386 -0
  7. data/benchmark/srl_native_benchmark.rb +142 -0
  8. data/benchmark/srl_ruby_benchmark.rb +130 -0
  9. data/expressir.gemspec +3 -2
  10. data/lib/expressir/benchmark.rb +1 -1
  11. data/lib/expressir/changes/item_change.rb +0 -1
  12. data/lib/expressir/changes/mapping_change.rb +0 -1
  13. data/lib/expressir/changes/schema_change.rb +0 -2
  14. data/lib/expressir/changes/version_change.rb +0 -3
  15. data/lib/expressir/changes.rb +5 -6
  16. data/lib/expressir/cli.rb +10 -24
  17. data/lib/expressir/commands/changes.rb +0 -2
  18. data/lib/expressir/commands/changes_import_eengine.rb +0 -3
  19. data/lib/expressir/commands/changes_validate.rb +0 -2
  20. data/lib/expressir/commands/format.rb +1 -1
  21. data/lib/expressir/commands/manifest.rb +0 -7
  22. data/lib/expressir/commands/package.rb +16 -29
  23. data/lib/expressir/commands/validate.rb +0 -2
  24. data/lib/expressir/commands/validate_load.rb +1 -1
  25. data/lib/expressir/commands.rb +20 -0
  26. data/lib/expressir/config.rb +0 -2
  27. data/lib/expressir/coverage.rb +11 -4
  28. data/lib/expressir/eengine/arm_compare_report.rb +1 -4
  29. data/lib/expressir/eengine/changes_section.rb +1 -3
  30. data/lib/expressir/eengine/compare_report.rb +1 -13
  31. data/lib/expressir/eengine/mim_compare_report.rb +1 -4
  32. data/lib/expressir/eengine/modified_object.rb +1 -2
  33. data/lib/expressir/eengine.rb +9 -0
  34. data/lib/expressir/errors.rb +3 -5
  35. data/lib/expressir/express/builder.rb +22 -7
  36. data/lib/expressir/express/builder_registry.rb +411 -0
  37. data/lib/expressir/express/builders/attribute_decl_builder.rb +0 -6
  38. data/lib/expressir/express/builders/built_in_builder.rb +1 -16
  39. data/lib/expressir/express/builders/constant_builder.rb +4 -19
  40. data/lib/expressir/express/builders/declaration_builder.rb +0 -4
  41. data/lib/expressir/express/builders/derive_clause_builder.rb +0 -2
  42. data/lib/expressir/express/builders/derived_attr_builder.rb +0 -2
  43. data/lib/expressir/express/builders/domain_rule_builder.rb +0 -2
  44. data/lib/expressir/express/builders/entity_decl_builder.rb +7 -13
  45. data/lib/expressir/express/builders/explicit_attr_builder.rb +5 -8
  46. data/lib/expressir/express/builders/expression_builder.rb +31 -67
  47. data/lib/expressir/express/builders/function_decl_builder.rb +20 -18
  48. data/lib/expressir/express/builders/interface_builder.rb +0 -20
  49. data/lib/expressir/express/builders/inverse_attr_builder.rb +0 -2
  50. data/lib/expressir/express/builders/inverse_attr_type_builder.rb +0 -6
  51. data/lib/expressir/express/builders/inverse_clause_builder.rb +0 -2
  52. data/lib/expressir/express/builders/literal_builder.rb +1 -15
  53. data/lib/expressir/express/builders/procedure_decl_builder.rb +20 -19
  54. data/lib/expressir/express/builders/qualifier_builder.rb +0 -27
  55. data/lib/expressir/express/builders/reference_builder.rb +1 -10
  56. data/lib/expressir/express/builders/rule_decl_builder.rb +21 -19
  57. data/lib/expressir/express/builders/schema_body_decl_builder.rb +0 -4
  58. data/lib/expressir/express/builders/schema_decl_builder.rb +7 -13
  59. data/lib/expressir/express/builders/schema_version_builder.rb +0 -6
  60. data/lib/expressir/express/builders/simple_id_builder.rb +1 -10
  61. data/lib/expressir/express/builders/statement_builder.rb +4 -32
  62. data/lib/expressir/express/builders/subtype_constraint_builder.rb +6 -30
  63. data/lib/expressir/express/builders/syntax_builder.rb +60 -7
  64. data/lib/expressir/express/builders/type_builder.rb +3 -45
  65. data/lib/expressir/express/builders/type_decl_builder.rb +1 -7
  66. data/lib/expressir/express/builders/unique_clause_builder.rb +1 -3
  67. data/lib/expressir/express/builders/unique_rule_builder.rb +0 -2
  68. data/lib/expressir/express/builders/where_clause_builder.rb +1 -3
  69. data/lib/expressir/express/builders.rb +47 -35
  70. data/lib/expressir/express/error.rb +0 -3
  71. data/lib/expressir/express/formatter.rb +17 -19
  72. data/lib/expressir/express/formatters/data_types_formatter.rb +295 -293
  73. data/lib/expressir/express/formatters/declarations_formatter.rb +617 -615
  74. data/lib/expressir/express/formatters/expressions_formatter.rb +146 -144
  75. data/lib/expressir/express/formatters/literals_formatter.rb +35 -33
  76. data/lib/expressir/express/formatters/references_formatter.rb +34 -32
  77. data/lib/expressir/express/formatters/remark_formatter.rb +176 -209
  78. data/lib/expressir/express/formatters/remark_item_formatter.rb +18 -16
  79. data/lib/expressir/express/formatters/statements_formatter.rb +190 -188
  80. data/lib/expressir/express/formatters/supertype_expressions_formatter.rb +41 -39
  81. data/lib/expressir/express/formatters.rb +22 -0
  82. data/lib/expressir/express/parser.rb +40 -41
  83. data/lib/expressir/express/pretty_formatter.rb +68 -47
  84. data/lib/expressir/express/remark_attacher.rb +210 -147
  85. data/lib/expressir/express/streaming_builder.rb +0 -3
  86. data/lib/expressir/express/transformer/remark_handling.rb +1 -2
  87. data/lib/expressir/express.rb +29 -0
  88. data/lib/expressir/manifest/resolver.rb +0 -3
  89. data/lib/expressir/manifest/validator.rb +0 -3
  90. data/lib/expressir/manifest.rb +6 -0
  91. data/lib/expressir/model/cache.rb +1 -1
  92. data/lib/expressir/model/concerns.rb +19 -0
  93. data/lib/expressir/model/data_types/aggregate.rb +1 -1
  94. data/lib/expressir/model/data_types/array.rb +1 -1
  95. data/lib/expressir/model/data_types/bag.rb +1 -1
  96. data/lib/expressir/model/data_types/binary.rb +1 -1
  97. data/lib/expressir/model/data_types/boolean.rb +1 -1
  98. data/lib/expressir/model/data_types/enumeration.rb +1 -1
  99. data/lib/expressir/model/data_types/enumeration_item.rb +1 -1
  100. data/lib/expressir/model/data_types/generic.rb +1 -1
  101. data/lib/expressir/model/data_types/generic_entity.rb +1 -1
  102. data/lib/expressir/model/data_types/integer.rb +1 -1
  103. data/lib/expressir/model/data_types/list.rb +1 -1
  104. data/lib/expressir/model/data_types/logical.rb +1 -1
  105. data/lib/expressir/model/data_types/number.rb +1 -1
  106. data/lib/expressir/model/data_types/real.rb +1 -1
  107. data/lib/expressir/model/data_types/select.rb +1 -1
  108. data/lib/expressir/model/data_types/set.rb +1 -1
  109. data/lib/expressir/model/data_types/string.rb +1 -1
  110. data/lib/expressir/model/data_types.rb +25 -0
  111. data/lib/expressir/model/declarations/attribute.rb +1 -1
  112. data/lib/expressir/model/declarations/constant.rb +1 -1
  113. data/lib/expressir/model/declarations/derived_attribute.rb +1 -1
  114. data/lib/expressir/model/declarations/entity.rb +4 -1
  115. data/lib/expressir/model/declarations/function.rb +3 -1
  116. data/lib/expressir/model/declarations/informal_proposition_rule.rb +2 -1
  117. data/lib/expressir/model/declarations/interface.rb +1 -1
  118. data/lib/expressir/model/declarations/interface_item.rb +1 -1
  119. data/lib/expressir/model/declarations/interfaced_item.rb +1 -1
  120. data/lib/expressir/model/declarations/inverse_attribute.rb +1 -1
  121. data/lib/expressir/model/declarations/parameter.rb +1 -1
  122. data/lib/expressir/model/declarations/procedure.rb +3 -1
  123. data/lib/expressir/model/declarations/remark_item.rb +1 -1
  124. data/lib/expressir/model/declarations/rule.rb +4 -1
  125. data/lib/expressir/model/declarations/schema.rb +2 -1
  126. data/lib/expressir/model/declarations/schema_version.rb +1 -1
  127. data/lib/expressir/model/declarations/schema_version_item.rb +1 -1
  128. data/lib/expressir/model/declarations/subtype_constraint.rb +1 -1
  129. data/lib/expressir/model/declarations/type.rb +4 -1
  130. data/lib/expressir/model/declarations/unique_rule.rb +1 -1
  131. data/lib/expressir/model/declarations/variable.rb +1 -1
  132. data/lib/expressir/model/declarations/where_rule.rb +1 -1
  133. data/lib/expressir/model/declarations.rb +31 -0
  134. data/lib/expressir/model/dependency_resolver.rb +0 -2
  135. data/lib/expressir/model/exp_file.rb +38 -0
  136. data/lib/expressir/model/expressions/aggregate_initializer.rb +1 -1
  137. data/lib/expressir/model/expressions/aggregate_initializer_item.rb +1 -1
  138. data/lib/expressir/model/expressions/binary_expression.rb +1 -1
  139. data/lib/expressir/model/expressions/entity_constructor.rb +1 -1
  140. data/lib/expressir/model/expressions/function_call.rb +1 -1
  141. data/lib/expressir/model/expressions/interval.rb +1 -1
  142. data/lib/expressir/model/expressions/query_expression.rb +1 -1
  143. data/lib/expressir/model/expressions/unary_expression.rb +1 -1
  144. data/lib/expressir/model/expressions.rb +18 -0
  145. data/lib/expressir/model/identifier.rb +5 -1
  146. data/lib/expressir/model/indexes.rb +11 -0
  147. data/lib/expressir/model/literals/binary.rb +1 -1
  148. data/lib/expressir/model/literals/integer.rb +1 -1
  149. data/lib/expressir/model/literals/logical.rb +1 -1
  150. data/lib/expressir/model/literals/real.rb +1 -1
  151. data/lib/expressir/model/literals/string.rb +1 -1
  152. data/lib/expressir/model/literals.rb +13 -0
  153. data/lib/expressir/model/model_element.rb +7 -15
  154. data/lib/expressir/model/references/attribute_reference.rb +1 -1
  155. data/lib/expressir/model/references/group_reference.rb +1 -1
  156. data/lib/expressir/model/references/index_reference.rb +1 -1
  157. data/lib/expressir/model/references/simple_reference.rb +1 -1
  158. data/lib/expressir/model/references.rb +12 -0
  159. data/lib/expressir/model/remark_info.rb +1 -7
  160. data/lib/expressir/model/repository.rb +72 -36
  161. data/lib/expressir/model/repository_validator.rb +0 -2
  162. data/lib/expressir/model/search_engine.rb +6 -30
  163. data/lib/expressir/model/statements/alias.rb +1 -1
  164. data/lib/expressir/model/statements/assignment.rb +1 -1
  165. data/lib/expressir/model/statements/case.rb +1 -1
  166. data/lib/expressir/model/statements/case_action.rb +1 -1
  167. data/lib/expressir/model/statements/compound.rb +1 -1
  168. data/lib/expressir/model/statements/escape.rb +1 -1
  169. data/lib/expressir/model/statements/if.rb +1 -1
  170. data/lib/expressir/model/statements/null.rb +1 -1
  171. data/lib/expressir/model/statements/procedure_call.rb +1 -1
  172. data/lib/expressir/model/statements/repeat.rb +1 -1
  173. data/lib/expressir/model/statements/return.rb +1 -1
  174. data/lib/expressir/model/statements/skip.rb +1 -1
  175. data/lib/expressir/model/statements.rb +20 -0
  176. data/lib/expressir/model/supertype_expressions/binary_supertype_expression.rb +1 -1
  177. data/lib/expressir/model/supertype_expressions/oneof_supertype_expression.rb +1 -1
  178. data/lib/expressir/model/supertype_expressions.rb +12 -0
  179. data/lib/expressir/model.rb +28 -4
  180. data/lib/expressir/package/builder.rb +33 -4
  181. data/lib/expressir/package/metadata.rb +0 -1
  182. data/lib/expressir/package/reader.rb +0 -1
  183. data/lib/expressir/package.rb +8 -0
  184. data/lib/expressir/schema_manifest.rb +5 -6
  185. data/lib/expressir/schema_manifest_entry.rb +3 -4
  186. data/lib/expressir/transformer.rb +7 -0
  187. data/lib/expressir/version.rb +1 -1
  188. data/lib/expressir.rb +23 -171
  189. metadata +49 -9
  190. data/lib/expressir/express/builders/token_builder.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cf66e8d02967b85a1d4514eabaf543948bb3631c651b27dcbd74794f65eb56a
4
- data.tar.gz: 6d04084c3f3498d716a4e81bff5bb5098dd233756c3c8decac9887214a25e394
3
+ metadata.gz: 4b32c44114e4573e68289d6b2a06e77fdc366cecf318842875c235183c605b4d
4
+ data.tar.gz: f95594cf05cca193baaf3977f5b3e1c87b5f23b35d4e2617eeaab6977c945322
5
5
  SHA512:
6
- metadata.gz: 995539b97506ccd8547382efd281922b00ae60855e22f433e8568f9149bd14fc444a7890c373c8f984610b2e0d06694a8bc3fc89f7c864c24136bfe629496784
7
- data.tar.gz: 2634792ad654c03c71992dc976c3dc44b96d344961c1256f7e5f4a55f30b8345b4ba8b2587d7af058bf0068693637cc7eaec5975ee9aa61344889f22dc7bd00a
6
+ metadata.gz: 06b27d3e6ba1f132a07d67f48a23846caeb6625ed50135a4fd46ba29812d70bdfff5458d8e62e74ea87fb39aed1ba8a14592710d3e124129178710cc70924778
7
+ data.tar.gz: d5c15a2505e5fe8c0caff2e22f9080926775d28a16fad62861a372a3f61997773429fe8ed7e6e9dc3b8c6c0ed29bc5b9e5b4afdd46785fdd2fdaa30da4e20d71
data/.rubocop.yml CHANGED
@@ -8,7 +8,7 @@ plugins:
8
8
  - rubocop-rspec
9
9
 
10
10
  AllCops:
11
- TargetRubyVersion: 3.0
11
+ TargetRubyVersion: 3.2
12
12
  NewCops: enable
13
13
  Exclude:
14
14
  - 'vendor/**/*'
data/.rubocop_todo.yml CHANGED
@@ -1,31 +1,126 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-03-12 10:28:38 UTC using RuboCop version 1.85.1.
3
+ # on 2026-03-24 12:59:48 UTC using RuboCop version 1.86.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
9
  # Offense count: 1
10
- Gemspec/RequiredRubyVersion:
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
12
+ Gemspec/OrderedDependencies:
11
13
  Exclude:
12
14
  - 'expressir.gemspec'
13
15
 
16
+ # Offense count: 2
17
+ # This cop supports safe autocorrection (--autocorrect).
18
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
19
+ # SupportedStyles: with_first_argument, with_fixed_indentation
20
+ Layout/ArgumentAlignment:
21
+ Exclude:
22
+ - 'lib/expressir/express/parser.rb'
23
+
24
+ # Offense count: 1
25
+ # This cop supports safe autocorrection (--autocorrect).
26
+ # Configuration parameters: AllowForAlignment.
27
+ Layout/CommentIndentation:
28
+ Exclude:
29
+ - 'spec/expressir/model/indexes/reference_index_spec.rb'
30
+
31
+ # Offense count: 6
32
+ # This cop supports safe autocorrection (--autocorrect).
33
+ Layout/ElseAlignment:
34
+ Exclude:
35
+ - 'lib/expressir/express/builders/function_decl_builder.rb'
36
+ - 'lib/expressir/express/builders/procedure_decl_builder.rb'
37
+ - 'lib/expressir/express/builders/rule_decl_builder.rb'
38
+
39
+ # Offense count: 3
40
+ # This cop supports safe autocorrection (--autocorrect).
41
+ Layout/EmptyLineAfterGuardClause:
42
+ Exclude:
43
+ - 'lib/expressir/express/builder.rb'
44
+ - 'lib/expressir/model/repository.rb'
45
+ - 'lib/expressir/model/search_engine.rb'
46
+
47
+ # Offense count: 1
48
+ # This cop supports safe autocorrection (--autocorrect).
49
+ # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
50
+ Layout/EmptyLineBetweenDefs:
51
+ Exclude:
52
+ - 'lib/expressir/express/remark_attacher.rb'
53
+
54
+ # Offense count: 11
55
+ # This cop supports safe autocorrection (--autocorrect).
56
+ Layout/EmptyLines:
57
+ Exclude:
58
+ - 'lib/expressir/changes/item_change.rb'
59
+ - 'lib/expressir/changes/mapping_change.rb'
60
+ - 'lib/expressir/changes/schema_change.rb'
61
+ - 'lib/expressir/changes/version_change.rb'
62
+ - 'lib/expressir/eengine/arm_compare_report.rb'
63
+ - 'lib/expressir/eengine/changes_section.rb'
64
+ - 'lib/expressir/eengine/mim_compare_report.rb'
65
+ - 'lib/expressir/eengine/modified_object.rb'
66
+ - 'lib/expressir/package/metadata.rb'
67
+ - 'lib/expressir/schema_manifest.rb'
68
+ - 'lib/expressir/schema_manifest_entry.rb'
69
+
70
+ # Offense count: 6
71
+ # This cop supports safe autocorrection (--autocorrect).
72
+ # Configuration parameters: EnforcedStyleAlignWith.
73
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
74
+ Layout/EndAlignment:
75
+ Exclude:
76
+ - 'lib/expressir/express/builders/function_decl_builder.rb'
77
+ - 'lib/expressir/express/builders/procedure_decl_builder.rb'
78
+ - 'lib/expressir/express/builders/rule_decl_builder.rb'
79
+
14
80
  # Offense count: 1
15
81
  # This cop supports safe autocorrection (--autocorrect).
16
82
  # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
17
83
  Layout/ExtraSpacing:
18
84
  Exclude:
19
- - 'lib/expressir/benchmark.rb'
85
+ - 'benchmark/srl_benchmark.rb'
20
86
 
21
- # Offense count: 990
87
+ # Offense count: 3
88
+ # This cop supports safe autocorrection (--autocorrect).
89
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
90
+ # SupportedHashRocketStyles: key, separator, table
91
+ # SupportedColonStyles: key, separator, table
92
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
93
+ Layout/HashAlignment:
94
+ Exclude:
95
+ - 'lib/expressir/express/parser.rb'
96
+
97
+ # Offense count: 6
98
+ # This cop supports safe autocorrection (--autocorrect).
99
+ # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
100
+ # SupportedStylesAlignWith: start_of_line, relative_to_receiver
101
+ Layout/IndentationWidth:
102
+ Exclude:
103
+ - 'lib/expressir/express/builders/function_decl_builder.rb'
104
+ - 'lib/expressir/express/builders/procedure_decl_builder.rb'
105
+ - 'lib/expressir/express/builders/rule_decl_builder.rb'
106
+
107
+ # Offense count: 1056
22
108
  # This cop supports safe autocorrection (--autocorrect).
23
109
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
24
110
  # URISchemes: http, https
25
111
  Layout/LineLength:
26
112
  Enabled: false
27
113
 
28
- # Offense count: 8
114
+ # Offense count: 1
115
+ # This cop supports safe autocorrection (--autocorrect).
116
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
117
+ # SupportedStylesForExponentOperator: space, no_space
118
+ # SupportedStylesForRationalLiterals: space, no_space
119
+ Layout/SpaceAroundOperators:
120
+ Exclude:
121
+ - 'benchmark/srl_benchmark.rb'
122
+
123
+ # Offense count: 9
29
124
  # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
30
125
  Lint/DuplicateBranch:
31
126
  Exclude:
@@ -47,6 +142,30 @@ Lint/DuplicateMethods:
47
142
  Exclude:
48
143
  - 'lib/expressir/commands/validate_ascii.rb'
49
144
 
145
+ # Offense count: 3
146
+ # This cop supports unsafe autocorrection (--autocorrect-all).
147
+ Lint/RedundantDirGlobSort:
148
+ Exclude:
149
+ - 'benchmark/srl_benchmark.rb'
150
+ - 'benchmark/srl_native_benchmark.rb'
151
+ - 'benchmark/srl_ruby_benchmark.rb'
152
+
153
+ # Offense count: 3
154
+ # This cop supports safe autocorrection (--autocorrect).
155
+ Lint/RedundantRequireStatement:
156
+ Exclude:
157
+ - 'lib/expressir/commands/validate_ascii.rb'
158
+ - 'lib/expressir/express/remark_attacher.rb'
159
+ - 'lib/expressir/express/transformer/remark_handling.rb'
160
+
161
+ # Offense count: 3
162
+ # This cop supports safe autocorrection (--autocorrect).
163
+ Lint/ScriptPermission:
164
+ Exclude:
165
+ - 'benchmark/srl_benchmark.rb'
166
+ - 'benchmark/srl_native_benchmark.rb'
167
+ - 'benchmark/srl_ruby_benchmark.rb'
168
+
50
169
  # Offense count: 2
51
170
  # Configuration parameters: AllowedPatterns.
52
171
  # AllowedPatterns: (?-mix:(exactly|at_least|at_most)\(\d+\)\.times)
@@ -54,51 +173,68 @@ Lint/UnreachableLoop:
54
173
  Exclude:
55
174
  - 'lib/expressir/model/dependency_resolver.rb'
56
175
 
57
- # Offense count: 2
176
+ # Offense count: 3
58
177
  # This cop supports safe autocorrection (--autocorrect).
59
178
  # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
60
179
  # NotImplementedExceptions: NotImplementedError
61
180
  Lint/UnusedMethodArgument:
62
181
  Exclude:
182
+ - 'benchmark/srl_benchmark.rb'
63
183
  - 'lib/expressir/express/cache.rb'
64
184
  - 'lib/expressir/express/parser.rb'
65
185
 
66
- # Offense count: 227
186
+ # Offense count: 3
187
+ # This cop supports safe autocorrection (--autocorrect).
188
+ Lint/UselessAssignment:
189
+ Exclude:
190
+ - 'benchmark/srl_benchmark.rb'
191
+ - 'spec/expressir/express/pretty_formatter_spec.rb'
192
+ - 'spec/expressir/model/indexes/type_index_spec.rb'
193
+
194
+ # Offense count: 235
67
195
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
68
196
  Metrics/AbcSize:
69
197
  Enabled: false
70
198
 
71
- # Offense count: 8
199
+ # Offense count: 10
72
200
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
73
201
  # AllowedMethods: refine
74
202
  Metrics/BlockLength:
75
- Max: 98
203
+ Max: 105
76
204
 
77
- # Offense count: 14
205
+ # Offense count: 15
78
206
  # Configuration parameters: CountBlocks, CountModifierForms.
79
207
  Metrics/BlockNesting:
80
208
  Max: 6
81
209
 
82
- # Offense count: 189
210
+ # Offense count: 194
83
211
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
84
212
  Metrics/CyclomaticComplexity:
85
213
  Enabled: false
86
214
 
87
- # Offense count: 276
215
+ # Offense count: 281
88
216
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
89
217
  Metrics/MethodLength:
90
- Max: 170
218
+ Max: 167
91
219
 
92
220
  # Offense count: 6
93
221
  # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
94
222
  Metrics/ParameterLists:
95
223
  Max: 8
96
224
 
97
- # Offense count: 162
225
+ # Offense count: 167
98
226
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
99
227
  Metrics/PerceivedComplexity:
100
228
  Enabled: false
101
229
 
230
+ # Offense count: 4
231
+ # This cop supports safe autocorrection (--autocorrect).
232
+ # Configuration parameters: EnforcedStyle, BlockForwardingName.
233
+ # SupportedStyles: anonymous, explicit
234
+ Naming/BlockForwarding:
235
+ Exclude:
236
+ - 'lib/expressir/model/repository.rb'
237
+
102
238
  # Offense count: 4
103
239
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
104
240
  # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
@@ -125,10 +261,11 @@ Naming/VariableNumber:
125
261
  - 'spec/expressir/commands/validate_ascii_spec.rb'
126
262
  - 'spec/expressir/express/pretty_formatter_spec.rb'
127
263
 
128
- # Offense count: 2
264
+ # Offense count: 3
129
265
  # Configuration parameters: MinSize.
130
266
  Performance/CollectionLiteralInLoop:
131
267
  Exclude:
268
+ - 'lib/expressir/express/remark_attacher.rb'
132
269
  - 'lib/expressir/express/streaming_builder.rb'
133
270
 
134
271
  # Offense count: 5
@@ -180,12 +317,21 @@ RSpec/DescribeMethod:
180
317
  - 'spec/expressir/model/repository_statistics_spec.rb'
181
318
  - 'spec/expressir/model/search_engine_advanced_spec.rb'
182
319
 
183
- # Offense count: 465
320
+ # Offense count: 2
321
+ # This cop supports unsafe autocorrection (--autocorrect-all).
322
+ # Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
323
+ # SupportedStyles: described_class, explicit
324
+ RSpec/DescribedClass:
325
+ Exclude:
326
+ - 'spec/expressir/model/model_element_spec.rb'
327
+ - 'spec/expressir/model/repository_spec.rb'
328
+
329
+ # Offense count: 451
184
330
  # Configuration parameters: CountAsOne.
185
331
  RSpec/ExampleLength:
186
- Max: 123
332
+ Max: 122
187
333
 
188
- # Offense count: 51
334
+ # Offense count: 44
189
335
  # Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
190
336
  RSpec/IndexedLet:
191
337
  Exclude:
@@ -215,57 +361,36 @@ RSpec/IteratedExpectation:
215
361
  Exclude:
216
362
  - 'spec/expressir/model/search_engine_advanced_spec.rb'
217
363
 
218
- # Offense count: 2
219
- # Configuration parameters: EnforcedStyle.
364
+ # Offense count: 1
365
+ # Configuration parameters: .
220
366
  # SupportedStyles: have_received, receive
221
367
  RSpec/MessageSpies:
222
- Exclude:
223
- - 'spec/expressir/model/repository_validator_spec.rb'
224
- - 'spec/expressir/model/search_engine_spec.rb'
368
+ EnforcedStyle: receive
225
369
 
226
- # Offense count: 580
370
+ # Offense count: 582
227
371
  RSpec/MultipleExpectations:
228
372
  Max: 114
229
373
 
230
- # Offense count: 117
374
+ # Offense count: 111
231
375
  # Configuration parameters: AllowSubject.
232
376
  RSpec/MultipleMemoizedHelpers:
233
- Max: 19
377
+ Max: 18
234
378
 
235
379
  # Offense count: 5
236
380
  # Configuration parameters: AllowedGroups.
237
381
  RSpec/NestedGroups:
238
382
  Max: 4
239
383
 
240
- # Offense count: 35
241
- # This cop supports unsafe autocorrection (--autocorrect-all).
242
- RSpec/Output:
243
- Exclude:
244
- - 'spec/acceptance/version_spec.rb'
245
- - 'spec/expressir/express/cache_spec.rb'
246
- - 'spec/expressir/express/formatter_spec.rb'
247
- - 'spec/expressir/express/parser_spec.rb'
248
- - 'spec/expressir/model/model_element_spec.rb'
249
- - 'spec/spec_helper.rb'
250
-
251
- # Offense count: 28
252
- # This cop supports unsafe autocorrection (--autocorrect-all).
253
- RSpec/ReceiveMessages:
254
- Exclude:
255
- - 'spec/expressir/model/search_engine_advanced_spec.rb'
256
-
257
384
  # Offense count: 1
258
385
  RSpec/RemoveConst:
259
386
  Exclude:
260
387
  - 'spec/expressir/commands/package_nil_scenarios_spec.rb'
261
388
 
262
- # Offense count: 20
389
+ # Offense count: 12
263
390
  RSpec/RepeatedExample:
264
391
  Exclude:
265
392
  - 'spec/expressir/commands/package_fixtures_spec.rb'
266
393
  - 'spec/expressir/model/data_types/logical_spec.rb'
267
- - 'spec/expressir/model/indexes/entity_index_spec.rb'
268
- - 'spec/expressir/model/indexes/type_index_spec.rb'
269
394
  - 'spec/expressir/model/interface_validator_spec.rb'
270
395
 
271
396
  # Offense count: 7
@@ -282,20 +407,29 @@ RSpec/SpecFilePathFormat:
282
407
  - 'spec/expressir/model/repository_statistics_spec.rb'
283
408
  - 'spec/expressir/model/search_engine_advanced_spec.rb'
284
409
 
285
- # Offense count: 48
286
- # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
287
- RSpec/VerifiedDoubles:
288
- Exclude:
289
- - 'spec/expressir/commands/package_nil_guards_spec.rb'
290
- - 'spec/expressir/commands/package_nil_scenarios_spec.rb'
291
- - 'spec/expressir/express/pretty_formatter_spec.rb'
292
- - 'spec/expressir/model/search_engine_advanced_spec.rb'
293
-
294
410
  # Offense count: 4
295
411
  Security/MarshalLoad:
296
412
  Exclude:
297
413
  - 'lib/expressir/package/reader.rb'
298
414
 
415
+ # Offense count: 16
416
+ # This cop supports safe autocorrection (--autocorrect).
417
+ # Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
418
+ # RedundantRestArgumentNames: args, arguments
419
+ # RedundantKeywordRestArgumentNames: kwargs, options, opts
420
+ # RedundantBlockArgumentNames: blk, block, proc
421
+ Style/ArgumentsForwarding:
422
+ Exclude:
423
+ - 'lib/expressir/commands/changes_import_eengine.rb'
424
+ - 'lib/expressir/model/repository.rb'
425
+ - 'lib/expressir/model/search_engine.rb'
426
+
427
+ # Offense count: 2
428
+ # This cop supports unsafe autocorrection (--autocorrect-all).
429
+ Style/ConcatArrayLiterals:
430
+ Exclude:
431
+ - 'lib/expressir/express/builders/entity_decl_builder.rb'
432
+
299
433
  # Offense count: 1
300
434
  # This cop supports safe autocorrection (--autocorrect).
301
435
  # Configuration parameters: EnforcedStyle, AllowComments.
@@ -311,56 +445,94 @@ Style/EmptyElse:
311
445
  Style/FormatStringToken:
312
446
  EnforcedStyle: unannotated
313
447
 
448
+ # Offense count: 1
449
+ # This cop supports unsafe autocorrection (--autocorrect-all).
450
+ # Configuration parameters: AllowedReceivers.
451
+ # AllowedReceivers: Thread.current
452
+ Style/HashEachMethods:
453
+ Exclude:
454
+ - 'lib/expressir/express/builders/syntax_builder.rb'
455
+
314
456
  # Offense count: 1
315
457
  # Configuration parameters: MinBranchesCount.
316
458
  Style/HashLikeCase:
317
459
  Exclude:
318
460
  - 'lib/expressir/express/remark_attacher.rb'
319
461
 
320
- # Offense count: 2
462
+ # Offense count: 1
463
+ Style/MixinUsage:
464
+ Exclude:
465
+ - 'benchmark/srl_benchmark.rb'
466
+
467
+ # Offense count: 7
321
468
  # This cop supports unsafe autocorrection (--autocorrect-all).
322
- Style/PartitionInsteadOfDoubleSelect:
469
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
470
+ # SupportedStyles: predicate, comparison
471
+ Style/NumericPredicate:
323
472
  Exclude:
324
- - 'lib/expressir/express/transformer/remark_handling.rb'
325
- - 'spec/expressir/model/search_engine_advanced_spec.rb'
473
+ - 'spec/**/*'
474
+ - 'benchmark/srl_benchmark.rb'
475
+ - 'benchmark/srl_native_benchmark.rb'
476
+ - 'benchmark/srl_ruby_benchmark.rb'
477
+
478
+ # Offense count: 3
479
+ # Configuration parameters: AllowedClasses.
480
+ Style/OneClassPerFile:
481
+ Exclude:
482
+ - 'benchmark/srl_benchmark.rb'
326
483
 
327
484
  # Offense count: 2
328
485
  # This cop supports safe autocorrection (--autocorrect).
329
- Style/RedundantParentheses:
486
+ Style/RedundantStringEscape:
330
487
  Exclude:
331
- - 'lib/expressir/express/parser.rb'
488
+ - 'benchmark/srl_benchmark.rb'
332
489
 
333
- # Offense count: 33
334
- # This cop supports unsafe autocorrection (--autocorrect-all).
335
- Style/SelectByKind:
490
+ # Offense count: 1
491
+ # This cop supports safe autocorrection (--autocorrect).
492
+ Style/RescueModifier:
336
493
  Exclude:
337
- - 'lib/expressir/express/builders/function_decl_builder.rb'
338
- - 'lib/expressir/express/builders/procedure_decl_builder.rb'
339
- - 'lib/expressir/express/builders/rule_decl_builder.rb'
340
- - 'lib/expressir/express/builders/schema_decl_builder.rb'
341
- - 'lib/expressir/model/search_engine.rb'
342
- - 'spec/expressir/coverage_spec.rb'
343
- - 'spec/expressir/model/declarations/schema_spec.rb'
494
+ - 'benchmark/srl_benchmark.rb'
344
495
 
345
- # Offense count: 1
496
+ # Offense count: 7
346
497
  # This cop supports safe autocorrection (--autocorrect).
347
- # Configuration parameters: AllowModifier.
348
- Style/SoleNestedConditional:
498
+ # Configuration parameters: EnforcedStyle.
499
+ # SupportedStyles: implicit, explicit
500
+ Style/RescueStandardError:
349
501
  Exclude:
350
- - 'lib/expressir/model/search_engine.rb'
502
+ - 'benchmark/srl_benchmark.rb'
503
+ - 'benchmark/srl_native_benchmark.rb'
504
+ - 'benchmark/srl_ruby_benchmark.rb'
351
505
 
352
506
  # Offense count: 1
507
+ # This cop supports unsafe autocorrection (--autocorrect-all).
508
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
509
+ # AllowedMethods: present?, blank?, presence, try, try!
510
+ Style/SafeNavigation:
511
+ Exclude:
512
+ - 'lib/expressir/model/repository.rb'
513
+
514
+ # Offense count: 2
515
+ # This cop supports unsafe autocorrection (--autocorrect-all).
516
+ Style/SelectByKind:
517
+ Exclude:
518
+ - 'lib/expressir/express/formatters/remark_formatter.rb'
519
+ - 'lib/expressir/model/model_element.rb'
520
+
521
+ # Offense count: 25
353
522
  # This cop supports safe autocorrection (--autocorrect).
354
- Style/SuperArguments:
523
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
524
+ # SupportedStyles: single_quotes, double_quotes
525
+ Style/StringLiterals:
355
526
  Exclude:
356
- - 'lib/expressir/errors.rb'
527
+ - 'benchmark/srl_benchmark.rb'
528
+ - 'benchmark/srl_native_benchmark.rb'
529
+ - 'benchmark/srl_ruby_benchmark.rb'
357
530
 
358
- # Offense count: 18
531
+ # Offense count: 3
359
532
  # This cop supports safe autocorrection (--autocorrect).
360
533
  # Configuration parameters: EnforcedStyleForMultiline.
361
534
  # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
362
535
  Style/TrailingCommaInArguments:
363
536
  Exclude:
364
- - 'lib/expressir/commands/format.rb'
365
- - 'lib/expressir/commands/package.rb'
366
- - 'lib/expressir/commands/validate_load.rb'
537
+ - 'benchmark/srl_benchmark.rb'
538
+ - 'spec/expressir/express/pretty_formatter_spec.rb'
data/Gemfile CHANGED
@@ -2,10 +2,13 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- # Specify your gem's dependencies in reeper.gemspec
6
5
  gemspec
7
6
 
7
+ # Use released parsanol for native extension
8
+ gem "parsanol", "~> 1.3.5"
9
+
8
10
  gem "canon"
11
+ gem "irb"
9
12
  gem "lutaml-model", github: "lutaml/lutaml-model", branch: "main"
10
13
  gem "openssl", "~> 3.0"
11
14
  gem "rake"