srl_ruby 0.4.3 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +278 -22
- data/CHANGELOG.md +43 -1
- data/Gemfile +2 -0
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/Rakefile +3 -0
- data/appveyor.yml +15 -14
- data/bin/srl2ruby +17 -12
- data/bin/srl2ruby_cli_parser.rb +6 -6
- data/features/lib/step_definitions/srl_testing_steps.rb +2 -0
- data/features/lib/support/env..rb +2 -0
- data/lib/regex/abstract_method.rb +2 -0
- data/lib/regex/alternation.rb +3 -3
- data/lib/regex/anchor.rb +3 -0
- data/lib/regex/atomic_expression.rb +2 -0
- data/lib/regex/capturing_group.rb +8 -3
- data/lib/regex/char_class.rb +4 -2
- data/lib/regex/char_range.rb +4 -3
- data/lib/regex/char_shorthand.rb +3 -0
- data/lib/regex/character.rb +7 -2
- data/lib/regex/compound_expression.rb +2 -0
- data/lib/regex/concatenation.rb +3 -1
- data/lib/regex/expression.rb +6 -1
- data/lib/regex/lookaround.rb +3 -1
- data/lib/regex/match_option.rb +2 -0
- data/lib/regex/monadic_expression.rb +2 -0
- data/lib/regex/multiplicity.rb +9 -9
- data/lib/regex/non_capturing_group.rb +3 -1
- data/lib/regex/polyadic_expression.rb +4 -0
- data/lib/regex/quantifiable.rb +3 -1
- data/lib/regex/raw_expression.rb +2 -0
- data/lib/regex/repetition.rb +2 -0
- data/lib/regex/wildcard.rb +2 -5
- data/lib/srl_ruby/ast_builder.rb +12 -1
- data/lib/srl_ruby/grammar.rb +48 -46
- data/lib/srl_ruby/regex_repr.rb +2 -0
- data/lib/srl_ruby/tokenizer.rb +14 -8
- data/lib/srl_ruby/version.rb +3 -1
- data/lib/srl_ruby.rb +2 -0
- data/spec/acceptance/srl_test_suite_spec.rb +2 -0
- data/spec/acceptance/support/rule_file_ast_builder.rb +2 -0
- data/spec/acceptance/support/rule_file_grammar.rb +7 -5
- data/spec/acceptance/support/rule_file_nodes.rb +2 -0
- data/spec/acceptance/support/rule_file_parser.rb +2 -0
- data/spec/acceptance/support/rule_file_tokenizer.rb +14 -8
- data/spec/regex/atomic_expression_spec.rb +2 -0
- data/spec/regex/character_spec.rb +12 -6
- data/spec/regex/match_option_spec.rb +2 -0
- data/spec/regex/monadic_expression_spec.rb +2 -0
- data/spec/regex/multiplicity_spec.rb +4 -0
- data/spec/regex/repetition_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/srl_ruby/srl_ruby_spec.rb +2 -0
- data/spec/srl_ruby/tokenizer_spec.rb +3 -1
- data/spec/srl_ruby_spec.rb +8 -6
- data/srl_ruby.gemspec +7 -5
- metadata +16 -18
- data/lib/srl_ruby/srl_token.rb +0 -23
- data/spec/acceptance/support/rule_file_token.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c0ad4df7433bb3c5e88e03e5670c306d1a70b6ec43f831c3d6d376e1776856e5
|
4
|
+
data.tar.gz: 57d9791c96e46524e08d21606d17d4757bea2d9d9cd4e1322276733e5cf1642c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 151d3cdfd98bc907c2c4c3b63e317852fec743dc12b27f509b32285a8bd100242cc745c422a3c81641f4152453d3acc713246d8b907b532f635db5f99e83d2f2
|
7
|
+
data.tar.gz: 00b946261c11af9e9b64b460664a33498d1cd57685f3a6fc884c238c67c163b1c7a26efce508c3a9bd6e830bae82c1420697923e8889783b432c00333fffb2c7
|
data/.rubocop.yml
CHANGED
@@ -2,9 +2,22 @@ AllCops:
|
|
2
2
|
Exclude:
|
3
3
|
- 'exp/**/*'
|
4
4
|
|
5
|
+
Gemspec/DateAssignment:
|
6
|
+
Enabled: true
|
7
|
+
|
8
|
+
Layout/ArgumentAlignment:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Layout/ArrayAlignment:
|
12
|
+
Enabled: true
|
13
|
+
EnforcedStyle: with_fixed_indentation
|
14
|
+
|
5
15
|
Layout/CaseIndentation:
|
6
16
|
Enabled: false
|
7
17
|
|
18
|
+
Layout/ClosingHeredocIndentation:
|
19
|
+
Enabled: false
|
20
|
+
|
8
21
|
Layout/CommentIndentation:
|
9
22
|
Enabled: false
|
10
23
|
|
@@ -13,7 +26,7 @@ Layout/ElseAlignment:
|
|
13
26
|
|
14
27
|
Layout/EmptyLines:
|
15
28
|
Enabled: false
|
16
|
-
|
29
|
+
|
17
30
|
Layout/EndAlignment:
|
18
31
|
Enabled: false
|
19
32
|
|
@@ -21,39 +34,118 @@ Layout/EndOfLine:
|
|
21
34
|
Enabled: true
|
22
35
|
EnforcedStyle: lf
|
23
36
|
|
37
|
+
Layout/FirstArgumentIndentation:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
Layout/HashAlignment:
|
41
|
+
Enabled: false
|
42
|
+
|
24
43
|
Layout/IndentationWidth:
|
25
44
|
Enabled: false
|
26
45
|
|
27
46
|
Layout/IndentationConsistency:
|
28
47
|
Enabled: true
|
29
|
-
|
30
|
-
Layout/
|
48
|
+
|
49
|
+
Layout/HeredocIndentation:
|
31
50
|
Enabled: false
|
32
|
-
|
51
|
+
|
52
|
+
Layout/LineEndStringConcatenationIndentation:
|
53
|
+
Enabled: true
|
54
|
+
|
33
55
|
Layout/MultilineHashBraceLayout:
|
34
56
|
Enabled: true
|
35
57
|
|
58
|
+
Layout/MultilineMethodCallBraceLayout:
|
59
|
+
Enabled: true
|
60
|
+
EnforcedStyle: same_line
|
61
|
+
|
36
62
|
Layout/SpaceAroundOperators:
|
37
63
|
Enabled: true
|
38
64
|
|
65
|
+
Layout/SpaceBeforeBrackets:
|
66
|
+
Enabled: true
|
67
|
+
|
39
68
|
Layout/SpaceInsideParens:
|
40
69
|
Enabled: true
|
41
|
-
|
42
|
-
Layout/
|
70
|
+
|
71
|
+
Layout/IndentationStyle:
|
72
|
+
Enabled: true
|
73
|
+
|
74
|
+
Layout/SpaceAroundMethodCallOperator:
|
43
75
|
Enabled: true
|
44
|
-
|
45
|
-
Layout/
|
76
|
+
|
77
|
+
Layout/TrailingEmptyLines:
|
46
78
|
Enabled: true
|
47
79
|
|
48
80
|
Layout/TrailingWhitespace:
|
49
81
|
Enabled: true
|
50
82
|
|
83
|
+
Lint/AmbiguousAssignment:
|
84
|
+
Enabled: true
|
85
|
+
|
86
|
+
Lint/AmbiguousRange:
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
Lint/DeprecatedConstants:
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
Lint/DuplicateBranch:
|
93
|
+
Enabled: true
|
94
|
+
|
95
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
96
|
+
Enabled: true
|
97
|
+
|
98
|
+
Lint/EmptyBlock:
|
99
|
+
Enabled: true
|
100
|
+
|
101
|
+
Lint/EmptyClass:
|
102
|
+
Enabled: false
|
103
|
+
|
104
|
+
Lint/EmptyInPattern:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
Lint/LambdaWithoutLiteralBlock:
|
108
|
+
Enabled: true
|
109
|
+
|
51
110
|
Lint/Loop:
|
52
111
|
Enabled: true
|
53
112
|
|
113
|
+
Lint/NoReturnInBeginEndBlocks:
|
114
|
+
Enabled: true
|
115
|
+
|
116
|
+
Lint/NumberedParameterAssignment:
|
117
|
+
Enabled: true
|
118
|
+
|
119
|
+
Lint/OrAssignmentToConstant:
|
120
|
+
Enabled: true
|
121
|
+
|
122
|
+
Lint/RaiseException:
|
123
|
+
Enabled: true
|
124
|
+
|
125
|
+
Lint/RedundantDirGlobSort:
|
126
|
+
Enabled: true
|
127
|
+
|
54
128
|
Lint/RescueException:
|
55
129
|
Enabled: true
|
56
130
|
|
131
|
+
Lint/StructNewOverride:
|
132
|
+
Enabled: true
|
133
|
+
|
134
|
+
Lint/SymbolConversion:
|
135
|
+
Enabled: true
|
136
|
+
|
137
|
+
Lint/ToEnumArguments:
|
138
|
+
Enabled: true
|
139
|
+
|
140
|
+
Lint/TripleQuotes:
|
141
|
+
Enabled: true
|
142
|
+
|
143
|
+
Lint/UnexpectedBlockArity:
|
144
|
+
Enabled: true
|
145
|
+
|
146
|
+
Lint/UnmodifiedReduceAccumulator:
|
147
|
+
Enabled: true
|
148
|
+
|
57
149
|
Lint/UnusedMethodArgument:
|
58
150
|
Enabled: true
|
59
151
|
|
@@ -73,20 +165,24 @@ Metrics/BlockLength:
|
|
73
165
|
Enabled: true
|
74
166
|
Max: 350
|
75
167
|
|
168
|
+
Metrics/BlockNesting:
|
169
|
+
Enabled: true
|
170
|
+
Max: 5
|
171
|
+
|
76
172
|
Metrics/ClassLength:
|
77
173
|
Enabled: true
|
78
|
-
Max:
|
174
|
+
Max: 450
|
79
175
|
|
80
176
|
Metrics/CyclomaticComplexity:
|
81
177
|
Enabled: false
|
82
178
|
|
83
|
-
|
179
|
+
Layout/LineLength:
|
84
180
|
Enabled: false
|
85
181
|
Max: 90
|
86
182
|
|
87
183
|
Metrics/MethodLength:
|
88
184
|
Enabled: true
|
89
|
-
Max:
|
185
|
+
Max: 60
|
90
186
|
|
91
187
|
Metrics/ModuleLength:
|
92
188
|
Enabled: true
|
@@ -100,11 +196,17 @@ Naming/ConstantName:
|
|
100
196
|
|
101
197
|
Naming/ClassAndModuleCamelCase:
|
102
198
|
Enabled: false
|
103
|
-
|
104
|
-
Naming/
|
199
|
+
|
200
|
+
Naming/BlockParameterName:
|
105
201
|
Enabled: true
|
106
|
-
|
107
|
-
Naming/
|
202
|
+
|
203
|
+
Naming/InclusiveLanguage:
|
204
|
+
Enabled: true
|
205
|
+
|
206
|
+
Naming/MethodParameterName:
|
207
|
+
Enabled: false
|
208
|
+
|
209
|
+
Naming/MethodName:
|
108
210
|
Enabled: false
|
109
211
|
|
110
212
|
Naming/VariableName:
|
@@ -113,8 +215,8 @@ Naming/VariableName:
|
|
113
215
|
Style/Alias:
|
114
216
|
Enabled: true
|
115
217
|
|
116
|
-
|
117
|
-
Enabled:
|
218
|
+
Style/ArgumentsForwarding:
|
219
|
+
Enabled: true
|
118
220
|
|
119
221
|
Style/AsciiComments:
|
120
222
|
Enabled: false
|
@@ -134,6 +236,9 @@ Style/ClassCheck:
|
|
134
236
|
Style/ClassVars:
|
135
237
|
Enabled: false
|
136
238
|
|
239
|
+
Style/CollectionCompact:
|
240
|
+
Enabled: true
|
241
|
+
|
137
242
|
Style/ColonMethodCall:
|
138
243
|
Enabled: false
|
139
244
|
|
@@ -152,44 +257,195 @@ Style/DefWithParentheses:
|
|
152
257
|
Style/Documentation:
|
153
258
|
Enabled: false
|
154
259
|
|
260
|
+
Style/DocumentDynamicEvalDefinition:
|
261
|
+
Enabled: false
|
262
|
+
|
155
263
|
Style/ExpandPathArguments:
|
156
264
|
Enabled: false
|
157
265
|
|
266
|
+
Style/ExponentialNotation:
|
267
|
+
Enabled: true
|
268
|
+
|
158
269
|
Style/GuardClause:
|
159
270
|
Enabled: false
|
160
271
|
|
272
|
+
Style/HashEachMethods:
|
273
|
+
Enabled: true
|
274
|
+
|
275
|
+
Style/HashExcept:
|
276
|
+
Enabled: true
|
277
|
+
|
278
|
+
Style/HashTransformKeys:
|
279
|
+
Enabled: true
|
280
|
+
|
281
|
+
Style/HashTransformValues:
|
282
|
+
Enabled: true
|
283
|
+
|
161
284
|
Style/IfUnlessModifier:
|
162
285
|
Enabled: false
|
163
286
|
|
287
|
+
Style/InPatternThen:
|
288
|
+
Enabled: true
|
289
|
+
|
164
290
|
Style/InverseMethods:
|
291
|
+
Enabled: false
|
292
|
+
|
293
|
+
Style/MissingRespondToMissing:
|
294
|
+
Enabled: false
|
295
|
+
|
296
|
+
Style/MultilineInPatternThen:
|
297
|
+
Enabled: true
|
298
|
+
|
299
|
+
Style/NegatedIfElseCondition:
|
165
300
|
Enabled: true
|
166
301
|
|
167
302
|
Style/Next:
|
168
303
|
Enabled: false
|
169
304
|
|
305
|
+
Style/NilLambda:
|
306
|
+
Enabled: true
|
307
|
+
|
308
|
+
Style/NumericLiterals:
|
309
|
+
Enabled: false
|
310
|
+
|
311
|
+
Style/QuotedSymbols:
|
312
|
+
Enabled: true
|
313
|
+
|
170
314
|
Style/RaiseArgs:
|
171
315
|
Enabled: true
|
172
316
|
|
317
|
+
Style/RedundantArgument:
|
318
|
+
Enabled: true
|
319
|
+
|
173
320
|
Style/RedundantReturn:
|
174
321
|
Enabled: false
|
175
|
-
|
322
|
+
|
176
323
|
Style/RedundantSelf:
|
177
324
|
Enabled: true
|
178
325
|
|
326
|
+
Style/RedundantSelfAssignmentBranch:
|
327
|
+
Enabled: true
|
328
|
+
|
179
329
|
Style/RegexpLiteral:
|
180
330
|
Enabled: false
|
181
331
|
|
182
332
|
Style/PercentLiteralDelimiters:
|
183
333
|
Enabled: false
|
184
|
-
|
334
|
+
|
185
335
|
Style/StderrPuts:
|
186
|
-
Enabled: false
|
336
|
+
Enabled: false
|
187
337
|
|
188
338
|
Style/StringLiterals:
|
189
339
|
Enabled: true
|
190
340
|
|
341
|
+
Style/SwapValues:
|
342
|
+
Enabled: true
|
343
|
+
|
191
344
|
Style/TernaryParentheses:
|
192
345
|
Enabled: false
|
193
|
-
|
346
|
+
|
194
347
|
Style/UnlessElse:
|
195
|
-
Enabled: false
|
348
|
+
Enabled: false
|
349
|
+
|
350
|
+
# Rubocop complains when it doesn't find an explicit setting for the following cops:
|
351
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
352
|
+
Enabled: true
|
353
|
+
|
354
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
355
|
+
Enabled: true
|
356
|
+
|
357
|
+
Lint/DeprecatedOpenSSLConstant:
|
358
|
+
Enabled: true
|
359
|
+
|
360
|
+
Lint/DuplicateElsifCondition:
|
361
|
+
Enabled: true
|
362
|
+
|
363
|
+
Lint/DuplicateRescueException:
|
364
|
+
Enabled: true
|
365
|
+
|
366
|
+
Lint/EmptyConditionalBody:
|
367
|
+
Enabled: true
|
368
|
+
|
369
|
+
Lint/FloatComparison:
|
370
|
+
Enabled: true
|
371
|
+
|
372
|
+
Lint/MissingSuper:
|
373
|
+
Enabled: true
|
374
|
+
|
375
|
+
Lint/MixedRegexpCaptureTypes:
|
376
|
+
Enabled: true
|
377
|
+
|
378
|
+
Lint/OutOfRangeRegexpRef:
|
379
|
+
Enabled: true
|
380
|
+
|
381
|
+
Lint/SelfAssignment:
|
382
|
+
Enabled: true
|
383
|
+
|
384
|
+
Lint/TopLevelReturnWithArgument:
|
385
|
+
Enabled: true
|
386
|
+
|
387
|
+
Lint/UnreachableLoop:
|
388
|
+
Enabled: true
|
389
|
+
|
390
|
+
Style/AccessorGrouping:
|
391
|
+
Enabled: true
|
392
|
+
|
393
|
+
Style/ArrayCoercion:
|
394
|
+
Enabled: true
|
395
|
+
|
396
|
+
Style/BisectedAttrAccessor:
|
397
|
+
Enabled: true
|
398
|
+
|
399
|
+
Style/CaseLikeIf:
|
400
|
+
Enabled: true
|
401
|
+
|
402
|
+
Style/EndlessMethod:
|
403
|
+
Enabled: true
|
404
|
+
|
405
|
+
Style/ExplicitBlockArgument:
|
406
|
+
Enabled: true
|
407
|
+
|
408
|
+
Style/GlobalStdStream:
|
409
|
+
Enabled: true
|
410
|
+
|
411
|
+
Style/HashAsLastArrayItem:
|
412
|
+
Enabled: true
|
413
|
+
|
414
|
+
Style/HashConversion:
|
415
|
+
Enabled: true
|
416
|
+
|
417
|
+
Style/HashLikeCase:
|
418
|
+
Enabled: true
|
419
|
+
|
420
|
+
Style/IfWithBooleanLiteralBranches:
|
421
|
+
Enabled: true
|
422
|
+
|
423
|
+
Style/OptionalBooleanParameter:
|
424
|
+
Enabled: true
|
425
|
+
|
426
|
+
Style/RedundantAssignment:
|
427
|
+
Enabled: true
|
428
|
+
|
429
|
+
Style/RedundantFetchBlock:
|
430
|
+
Enabled: true
|
431
|
+
|
432
|
+
Style/RedundantFileExtensionInRequire:
|
433
|
+
Enabled: true
|
434
|
+
|
435
|
+
Style/RedundantRegexpCharacterClass:
|
436
|
+
Enabled: true
|
437
|
+
|
438
|
+
Style/RedundantRegexpEscape:
|
439
|
+
Enabled: true
|
440
|
+
|
441
|
+
Style/SingleArgumentDig:
|
442
|
+
Enabled: true
|
443
|
+
|
444
|
+
Style/SlicingWithRange:
|
445
|
+
Enabled: true
|
446
|
+
|
447
|
+
Style/StringChars:
|
448
|
+
Enabled: true
|
449
|
+
|
450
|
+
Style/StringConcatenation:
|
451
|
+
Enabled: true
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,46 @@
|
|
1
|
-
## [0.4.
|
1
|
+
## [0.4.7] - 2021-08-24
|
2
|
+
- Updated dependencies (Ruby >= 2.5), (Rley >= 0.8.02)
|
3
|
+
- Code restyling to please rubocop 1.19.1.
|
4
|
+
### Changed
|
5
|
+
- File `srl_ruby.gemspec` Updated the dependencies
|
6
|
+
- File `.rubocop.yml` Added configuration for newest cops
|
7
|
+
|
8
|
+
## [0.4.6] - 2019-08-17
|
9
|
+
- Code refactoring to use string frozen magic comments (as a consequence, skeem runs only on Rubies 2.3 or newer).
|
10
|
+
- Code restyling to please rubocop 0.7.40.
|
11
|
+
### Changed
|
12
|
+
- File `README.md` updated note on compatibility with Rubies
|
13
|
+
|
14
|
+
|
15
|
+
## [0.4.5] - 2019-01-13
|
16
|
+
- Removed Ruby versions older than 2.3 in CI testing because of breaking changes by Bundler 2.0
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
* Files `.travis.yml`, `appveyor.yml` updated.
|
20
|
+
|
21
|
+
## [0.4.5] - 2019-01-02
|
22
|
+
### Changed
|
23
|
+
- Minor code re-styling to please Rubocop 0.62.0.
|
24
|
+
- File `.travis.yml` Updated Ruby versions for CI builds
|
25
|
+
- File `.appveyor.yml` Sequence of Ruby versions refactored
|
26
|
+
- File `LICENSE.txt`: updated years in copyright text.
|
27
|
+
|
28
|
+
### Fixed
|
29
|
+
- Method `ASTBuilder#reduce_pattern_sequence` was broken for lookbehind assertions.
|
30
|
+
|
31
|
+
## [0.4.4] - 2018-11-24
|
32
|
+
### Changed
|
33
|
+
- File `srl_ruby.gemspec` Updated Rley dependency.
|
34
|
+
|
35
|
+
### Removed
|
36
|
+
- Class `SrlRuby::SrlToken` since it became completely redundant with `Token` class from Rley.
|
37
|
+
- Class `Acceptance::RuleFileToken` since it became completely redundant with `Token` class from Rley.
|
38
|
+
|
39
|
+
### Fixed
|
40
|
+
- Method `SrlRuby::Tokenizer#build_token` now instantiates a `Rley::Lexical::Token`
|
41
|
+
- Method `Acceptance::RuleFileTokenizer#build_token` now instantiates a `Rley::Lexical::Token`
|
42
|
+
|
43
|
+
## [0.4.3] - 2018-06-24
|
2
44
|
### Changed
|
3
45
|
- File `srl_ruby.gemspec` Updated Rley dependency.
|
4
46
|
|