sequitur 0.1.18 → 0.1.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +430 -56
- data/.travis.yml +19 -13
- data/CHANGELOG.md +33 -0
- data/Gemfile +4 -3
- data/LICENSE.txt +1 -1
- data/README.md +1 -2
- data/Rakefile +2 -0
- data/appveyor.yml +20 -12
- data/examples/integer_sample.rb +8 -7
- data/examples/porridge.rb +6 -6
- data/examples/simple_case.rb +7 -6
- data/examples/symbol_sample.rb +8 -9
- data/examples/word_sample.rb +4 -3
- data/lib/sequitur/constants.rb +5 -3
- data/lib/sequitur/digram.rb +45 -43
- data/lib/sequitur/dynamic_grammar.rb +93 -95
- data/lib/sequitur/formatter/base_formatter.rb +3 -1
- data/lib/sequitur/formatter/base_text.rb +3 -1
- data/lib/sequitur/formatter/debug.rb +5 -3
- data/lib/sequitur/grammar_visitor.rb +99 -98
- data/lib/sequitur/production.rb +14 -19
- data/lib/sequitur/production_ref.rb +107 -106
- data/lib/sequitur/sequitur_grammar.rb +9 -6
- data/lib/sequitur/symbol_sequence.rb +10 -11
- data/lib/sequitur.rb +2 -0
- data/spec/sequitur/digram_spec.rb +10 -8
- data/spec/sequitur/dynamic_grammar_spec.rb +2 -0
- data/spec/sequitur/formatter/base_text_spec.rb +4 -2
- data/spec/sequitur/formatter/debug_spec.rb +4 -2
- data/spec/sequitur/grammar_visitor_spec.rb +2 -0
- data/spec/sequitur/production_ref_spec.rb +2 -0
- data/spec/sequitur/production_spec.rb +10 -8
- data/spec/sequitur/sequitur_grammar_spec.rb +13 -13
- data/spec/sequitur/symbol_sequence_spec.rb +6 -4
- data/spec/spec_helper.rb +2 -12
- metadata +18 -46
- data/.ruby-version +0 -1
- data/.simplecov +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 281bd27d3f94acef7567bebbf56099c56a1dbc3c7df02d763ffd7793ff463b84
|
4
|
+
data.tar.gz: ea7881682da31b7de732d4160951bf1591cb26ecc8008f14603a55e8c8620bbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 553904778b8d61a96486e6f32ae0719d3a8b9f6ef99fb3b962f088f55097e6e23a5d75ca65c0ba916027a46d221deb5d7c9aed5a2927754d456c6f9e54658398
|
7
|
+
data.tar.gz: 2c67d893f9ec2d1ffc2523261f170a76de8e15dcf75f6069efe716ff3f48a8314c39a10ee53edd2938db71933a931a356258c694acd1c4b516fb1ec6fabcecce
|
data/.rubocop.yml
CHANGED
@@ -1,82 +1,456 @@
|
|
1
1
|
AllCops:
|
2
2
|
Exclude:
|
3
|
-
- '
|
4
|
-
- 'features/**/*'
|
5
|
-
- 'gems/**/*'
|
3
|
+
- 'exp/**/*'
|
6
4
|
- 'lab/**/*'
|
7
5
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
Gemspec/DateAssignment:
|
7
|
+
Enabled: true
|
8
|
+
|
9
|
+
Layout/ArgumentAlignment:
|
10
|
+
Enabled: false
|
11
|
+
|
12
|
+
Layout/ArrayAlignment:
|
13
|
+
Enabled: true
|
14
|
+
EnforcedStyle: with_fixed_indentation
|
15
|
+
|
16
|
+
Layout/CaseIndentation:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Layout/ClosingHeredocIndentation:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Layout/CommentIndentation:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Layout/ElseAlignment:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Layout/EmptyLines:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Layout/EndAlignment:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Layout/EndOfLine:
|
35
|
+
Enabled: true
|
36
|
+
EnforcedStyle: lf
|
37
|
+
|
38
|
+
Layout/FirstArgumentIndentation:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
Layout/HashAlignment:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Layout/IndentationWidth:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
Layout/IndentationConsistency:
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
Layout/HeredocIndentation:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Layout/LineEndStringConcatenationIndentation:
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Layout/MultilineHashBraceLayout:
|
57
|
+
Enabled: true
|
58
|
+
|
59
|
+
Layout/MultilineMethodCallBraceLayout:
|
60
|
+
Enabled: true
|
61
|
+
EnforcedStyle: same_line
|
62
|
+
|
63
|
+
Layout/SpaceAroundOperators:
|
64
|
+
Enabled: true
|
65
|
+
|
66
|
+
Layout/SpaceBeforeBrackets:
|
67
|
+
Enabled: true
|
68
|
+
|
69
|
+
Layout/SpaceInsideParens:
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
Layout/IndentationStyle:
|
73
|
+
Enabled: true
|
74
|
+
|
75
|
+
Layout/SpaceAroundMethodCallOperator:
|
76
|
+
Enabled: true
|
77
|
+
|
78
|
+
Layout/TrailingEmptyLines:
|
79
|
+
Enabled: true
|
80
|
+
|
81
|
+
Layout/TrailingWhitespace:
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
Lint/AmbiguousAssignment:
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
Lint/AmbiguousRange:
|
88
|
+
Enabled: true
|
89
|
+
|
90
|
+
Lint/DeprecatedConstants:
|
91
|
+
Enabled: true
|
92
|
+
|
93
|
+
Lint/DuplicateBranch:
|
94
|
+
Enabled: true
|
95
|
+
|
96
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
Lint/EmptyBlock:
|
100
|
+
Enabled: true
|
101
|
+
|
102
|
+
Lint/EmptyClass:
|
103
|
+
Enabled: false
|
104
|
+
|
105
|
+
Lint/EmptyInPattern:
|
106
|
+
Enabled: true
|
107
|
+
|
108
|
+
Lint/LambdaWithoutLiteralBlock:
|
109
|
+
Enabled: true
|
110
|
+
|
111
|
+
Lint/Loop:
|
112
|
+
Enabled: true
|
113
|
+
|
114
|
+
Lint/NoReturnInBeginEndBlocks:
|
115
|
+
Enabled: true
|
116
|
+
|
117
|
+
Lint/NumberedParameterAssignment:
|
118
|
+
Enabled: true
|
119
|
+
|
120
|
+
Lint/OrAssignmentToConstant:
|
121
|
+
Enabled: true
|
122
|
+
|
123
|
+
Lint/RaiseException:
|
124
|
+
Enabled: true
|
125
|
+
|
126
|
+
Lint/RedundantDirGlobSort:
|
127
|
+
Enabled: true
|
128
|
+
|
129
|
+
Lint/RescueException:
|
130
|
+
Enabled: true
|
131
|
+
|
132
|
+
Lint/StructNewOverride:
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
Lint/SymbolConversion:
|
136
|
+
Enabled: true
|
137
|
+
|
138
|
+
Lint/ToEnumArguments:
|
139
|
+
Enabled: true
|
140
|
+
|
141
|
+
Lint/TripleQuotes:
|
142
|
+
Enabled: true
|
143
|
+
|
144
|
+
Lint/UnexpectedBlockArity:
|
145
|
+
Enabled: true
|
146
|
+
|
147
|
+
Lint/UnmodifiedReduceAccumulator:
|
148
|
+
Enabled: true
|
149
|
+
|
150
|
+
Lint/UnusedMethodArgument:
|
151
|
+
Enabled: true
|
152
|
+
|
153
|
+
Lint/UselessAccessModifier:
|
154
|
+
Enabled: true
|
155
|
+
|
156
|
+
Lint/Void:
|
157
|
+
Enabled: false
|
158
|
+
|
159
|
+
Lint/UselessAssignment:
|
160
|
+
Enabled: true
|
161
|
+
|
162
|
+
Metrics/AbcSize:
|
163
|
+
Enabled: false
|
164
|
+
|
165
|
+
Metrics/BlockLength:
|
166
|
+
Enabled: true
|
167
|
+
Max: 350
|
168
|
+
|
169
|
+
Metrics/BlockNesting:
|
170
|
+
Enabled: true
|
171
|
+
Max: 5
|
172
|
+
|
173
|
+
Metrics/ClassLength:
|
174
|
+
Enabled: true
|
175
|
+
Max: 450
|
176
|
+
|
177
|
+
Metrics/CyclomaticComplexity:
|
178
|
+
Enabled: false
|
179
|
+
|
180
|
+
Layout/LineLength:
|
181
|
+
Enabled: false
|
182
|
+
Max: 90
|
183
|
+
|
184
|
+
Metrics/MethodLength:
|
185
|
+
Enabled: true
|
186
|
+
Max: 60
|
187
|
+
|
188
|
+
Metrics/ModuleLength:
|
189
|
+
Enabled: true
|
190
|
+
Max: 500
|
191
|
+
|
192
|
+
Metrics/PerceivedComplexity:
|
193
|
+
Enabled: false
|
194
|
+
|
195
|
+
Naming/ConstantName:
|
196
|
+
Enabled: false
|
197
|
+
|
198
|
+
Naming/ClassAndModuleCamelCase:
|
199
|
+
Enabled: false
|
200
|
+
|
201
|
+
Naming/BlockParameterName:
|
202
|
+
Enabled: true
|
203
|
+
|
204
|
+
Naming/InclusiveLanguage:
|
205
|
+
Enabled: true
|
206
|
+
|
207
|
+
Naming/MethodParameterName:
|
208
|
+
Enabled: false
|
209
|
+
|
210
|
+
Naming/MethodName:
|
211
|
+
Enabled: false
|
212
|
+
|
213
|
+
Naming/VariableName:
|
214
|
+
Enabled: false
|
215
|
+
|
216
|
+
Style/AccessorGrouping:
|
217
|
+
Enabled: false
|
218
|
+
|
219
|
+
Style/Alias:
|
220
|
+
Enabled: true
|
221
|
+
|
222
|
+
Style/ArgumentsForwarding:
|
223
|
+
Enabled: true
|
224
|
+
|
225
|
+
Style/AsciiComments:
|
226
|
+
Enabled: false
|
227
|
+
|
228
|
+
Style/BarePercentLiterals:
|
229
|
+
Enabled: false
|
230
|
+
|
231
|
+
Style/BlockComments:
|
13
232
|
Enabled: false
|
14
|
-
|
15
|
-
|
233
|
+
|
234
|
+
Style/CharacterLiteral:
|
16
235
|
Enabled: false
|
17
|
-
|
18
|
-
CaseIndentation:
|
19
|
-
IndentWhenRelativeTo: end
|
20
|
-
IndentOneStep: true
|
21
236
|
|
22
|
-
|
23
|
-
# Which is contrary to modelling practice.
|
24
|
-
ClassCheck:
|
237
|
+
Style/ClassCheck:
|
25
238
|
Enabled: false
|
26
|
-
|
27
|
-
ClassLength:
|
28
|
-
Max: 250
|
29
|
-
CountComments: false
|
30
239
|
|
31
|
-
|
240
|
+
Style/ClassVars:
|
32
241
|
Enabled: false
|
33
|
-
|
34
|
-
|
242
|
+
|
243
|
+
Style/CollectionCompact:
|
244
|
+
Enabled: true
|
245
|
+
|
246
|
+
Style/ColonMethodCall:
|
35
247
|
Enabled: false
|
36
|
-
|
37
|
-
|
248
|
+
|
249
|
+
Style/CommentAnnotation:
|
38
250
|
Enabled: false
|
39
|
-
|
40
|
-
|
251
|
+
|
252
|
+
Style/CommentedKeyword:
|
41
253
|
Enabled: false
|
42
|
-
|
43
|
-
EmptyLines:
|
44
|
-
Enabled: false
|
45
254
|
|
46
|
-
|
255
|
+
Style/ConditionalAssignment:
|
47
256
|
Enabled: false
|
48
|
-
|
49
|
-
|
257
|
+
|
258
|
+
Style/DefWithParentheses:
|
259
|
+
Enabled: true
|
260
|
+
|
261
|
+
Style/Documentation:
|
262
|
+
Enabled: false
|
263
|
+
|
264
|
+
Style/DocumentDynamicEvalDefinition:
|
50
265
|
Enabled: false
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
266
|
+
|
267
|
+
Style/EmptyElse:
|
268
|
+
Enabled: true
|
269
|
+
EnforcedStyle: empty
|
270
|
+
|
271
|
+
Style/ExpandPathArguments:
|
272
|
+
Enabled: false
|
273
|
+
|
274
|
+
Style/ExponentialNotation:
|
275
|
+
Enabled: true
|
276
|
+
|
277
|
+
Style/GuardClause:
|
278
|
+
Enabled: false
|
279
|
+
|
280
|
+
Style/HashEachMethods:
|
281
|
+
Enabled: true
|
282
|
+
|
283
|
+
Style/HashExcept:
|
284
|
+
Enabled: true
|
285
|
+
|
286
|
+
Style/HashTransformKeys:
|
287
|
+
Enabled: true
|
288
|
+
|
289
|
+
Style/HashTransformValues:
|
290
|
+
Enabled: true
|
291
|
+
|
292
|
+
Style/IfUnlessModifier:
|
293
|
+
Enabled: false
|
294
|
+
|
295
|
+
Style/InPatternThen:
|
296
|
+
Enabled: true
|
297
|
+
|
298
|
+
Style/InverseMethods:
|
299
|
+
Enabled: false
|
300
|
+
|
301
|
+
Style/MissingRespondToMissing:
|
302
|
+
Enabled: false
|
303
|
+
|
304
|
+
Style/MultilineInPatternThen:
|
305
|
+
Enabled: true
|
306
|
+
|
307
|
+
Style/NegatedIfElseCondition:
|
308
|
+
Enabled: true
|
309
|
+
|
310
|
+
Style/Next:
|
311
|
+
Enabled: false
|
312
|
+
|
313
|
+
Style/NilLambda:
|
314
|
+
Enabled: true
|
315
|
+
|
316
|
+
Style/NumericLiterals:
|
63
317
|
Enabled: false
|
64
318
|
|
65
|
-
|
319
|
+
Style/QuotedSymbols:
|
320
|
+
Enabled: true
|
321
|
+
|
322
|
+
Style/RaiseArgs:
|
323
|
+
Enabled: true
|
324
|
+
|
325
|
+
Style/RedundantArgument:
|
326
|
+
Enabled: true
|
327
|
+
|
328
|
+
Style/RedundantReturn:
|
66
329
|
Enabled: false
|
67
|
-
|
68
|
-
|
330
|
+
|
331
|
+
Style/RedundantSelf:
|
332
|
+
Enabled: true
|
333
|
+
|
334
|
+
Style/RedundantSelfAssignmentBranch:
|
335
|
+
Enabled: true
|
336
|
+
|
337
|
+
Style/RegexpLiteral:
|
69
338
|
Enabled: false
|
70
|
-
|
71
|
-
|
339
|
+
|
340
|
+
Style/PercentLiteralDelimiters:
|
72
341
|
Enabled: false
|
73
342
|
|
74
|
-
|
343
|
+
Style/StderrPuts:
|
75
344
|
Enabled: false
|
76
345
|
|
77
|
-
|
346
|
+
Style/StringLiterals:
|
347
|
+
Enabled: true
|
348
|
+
|
349
|
+
Style/SwapValues:
|
350
|
+
Enabled: true
|
351
|
+
|
352
|
+
Style/TernaryParentheses:
|
78
353
|
Enabled: false
|
79
|
-
|
80
|
-
|
354
|
+
|
355
|
+
Style/UnlessElse:
|
81
356
|
Enabled: false
|
82
|
-
|
357
|
+
|
358
|
+
# Rubocop complains when it doesn't find an explicit setting for the following cops:
|
359
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
360
|
+
Enabled: true
|
361
|
+
|
362
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
363
|
+
Enabled: true
|
364
|
+
|
365
|
+
Lint/DeprecatedOpenSSLConstant:
|
366
|
+
Enabled: true
|
367
|
+
|
368
|
+
Lint/DuplicateElsifCondition:
|
369
|
+
Enabled: true
|
370
|
+
|
371
|
+
Lint/DuplicateRescueException:
|
372
|
+
Enabled: true
|
373
|
+
|
374
|
+
Lint/EmptyConditionalBody:
|
375
|
+
Enabled: true
|
376
|
+
|
377
|
+
Lint/FloatComparison:
|
378
|
+
Enabled: true
|
379
|
+
|
380
|
+
Lint/MissingSuper:
|
381
|
+
Enabled: true
|
382
|
+
|
383
|
+
Lint/MixedRegexpCaptureTypes:
|
384
|
+
Enabled: true
|
385
|
+
|
386
|
+
Lint/OutOfRangeRegexpRef:
|
387
|
+
Enabled: true
|
388
|
+
|
389
|
+
Lint/SelfAssignment:
|
390
|
+
Enabled: true
|
391
|
+
|
392
|
+
Lint/TopLevelReturnWithArgument:
|
393
|
+
Enabled: true
|
394
|
+
|
395
|
+
Lint/UnreachableLoop:
|
396
|
+
Enabled: true
|
397
|
+
|
398
|
+
Style/ArrayCoercion:
|
399
|
+
Enabled: true
|
400
|
+
|
401
|
+
Style/BisectedAttrAccessor:
|
402
|
+
Enabled: true
|
403
|
+
|
404
|
+
Style/CaseLikeIf:
|
405
|
+
Enabled: true
|
406
|
+
|
407
|
+
Style/EndlessMethod:
|
408
|
+
Enabled: true
|
409
|
+
|
410
|
+
Style/ExplicitBlockArgument:
|
411
|
+
Enabled: true
|
412
|
+
|
413
|
+
Style/GlobalStdStream:
|
414
|
+
Enabled: true
|
415
|
+
|
416
|
+
Style/HashAsLastArrayItem:
|
417
|
+
Enabled: true
|
418
|
+
|
419
|
+
Style/HashConversion:
|
420
|
+
Enabled: true
|
421
|
+
|
422
|
+
Style/HashLikeCase:
|
423
|
+
Enabled: true
|
424
|
+
|
425
|
+
Style/IfWithBooleanLiteralBranches:
|
426
|
+
Enabled: true
|
427
|
+
|
428
|
+
Style/OptionalBooleanParameter:
|
429
|
+
Enabled: true
|
430
|
+
|
431
|
+
Style/RedundantAssignment:
|
432
|
+
Enabled: true
|
433
|
+
|
434
|
+
Style/RedundantFetchBlock:
|
435
|
+
Enabled: true
|
436
|
+
|
437
|
+
Style/RedundantFileExtensionInRequire:
|
438
|
+
Enabled: true
|
439
|
+
|
440
|
+
Style/RedundantRegexpCharacterClass:
|
441
|
+
Enabled: true
|
442
|
+
|
443
|
+
Style/RedundantRegexpEscape:
|
444
|
+
Enabled: true
|
445
|
+
|
446
|
+
Style/SingleArgumentDig:
|
447
|
+
Enabled: true
|
448
|
+
|
449
|
+
Style/SlicingWithRange:
|
450
|
+
Enabled: true
|
451
|
+
|
452
|
+
Style/StringChars:
|
453
|
+
Enabled: true
|
454
|
+
|
455
|
+
Style/StringConcatenation:
|
456
|
+
Enabled: true
|