skeem 0.2.19 → 0.2.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +473 -451
- data/CHANGELOG.md +9 -1
- data/README.md +1 -1
- data/lib/skeem/grammar.rb +3 -3
- data/lib/skeem/interpreter.rb +4 -0
- data/lib/skeem/primitive/primitive_builder.rb +1 -4
- data/lib/skeem/primitive/primitive_procedure.rb +5 -0
- data/lib/skeem/s_expr_builder.rb +15 -4
- data/lib/skeem/s_expr_nodes.rb +17 -5
- data/lib/skeem/tokenizer.rb +4 -0
- data/lib/skeem/version.rb +1 -1
- data/skeem.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f17c469661c1ebfa3ad17ae7685ac52a90b30fcd4b31d1d01b5af1c54ccfb765
|
4
|
+
data.tar.gz: ccb061b50470a01a740c99f3e01c89a5e962216fa80d3147fa5d7bbc759b6a1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf7120cc110af075a3c5c3294492e5246e2857fe86d6090fba57fd8b8425f47871249710af82b1acf4471dc2ab2bf34770977acee3e98cee1cc7631382953930
|
7
|
+
data.tar.gz: af3025b621249db56813fa5c91fee6b33a47943d025a18cf50e5490f92d99b6750225b2af47d66c57bd72947faafb6e96f84cf4ab3038bf437e306308c09fa89
|
data/.rubocop.yml
CHANGED
@@ -1,451 +1,473 @@
|
|
1
|
-
AllCops:
|
2
|
-
Exclude:
|
3
|
-
- 'exp/**/*'
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
Enabled: true
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
Enabled:
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
Enabled: true
|
356
|
-
|
357
|
-
|
358
|
-
Enabled:
|
359
|
-
|
360
|
-
|
361
|
-
Enabled: true
|
362
|
-
|
363
|
-
|
364
|
-
Enabled: true
|
365
|
-
|
366
|
-
|
367
|
-
Enabled:
|
368
|
-
|
369
|
-
|
370
|
-
Enabled:
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'exp/**/*'
|
4
|
+
- 'demo/**/*'
|
5
|
+
|
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/AmbiguousOperatorPrecedence: # new in 1.21
|
88
|
+
Enabled: true
|
89
|
+
|
90
|
+
Lint/AmbiguousRange:
|
91
|
+
Enabled: true
|
92
|
+
|
93
|
+
Lint/DeprecatedConstants:
|
94
|
+
Enabled: true
|
95
|
+
|
96
|
+
Lint/DuplicateBranch:
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
100
|
+
Enabled: true
|
101
|
+
|
102
|
+
Lint/EmptyBlock:
|
103
|
+
Enabled: true
|
104
|
+
|
105
|
+
Lint/EmptyClass:
|
106
|
+
Enabled: false
|
107
|
+
|
108
|
+
Lint/EmptyInPattern:
|
109
|
+
Enabled: true
|
110
|
+
|
111
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
112
|
+
Enabled: true
|
113
|
+
|
114
|
+
Lint/LambdaWithoutLiteralBlock:
|
115
|
+
Enabled: true
|
116
|
+
|
117
|
+
Lint/Loop:
|
118
|
+
Enabled: true
|
119
|
+
|
120
|
+
Lint/NoReturnInBeginEndBlocks:
|
121
|
+
Enabled: true
|
122
|
+
|
123
|
+
Lint/NumberedParameterAssignment:
|
124
|
+
Enabled: true
|
125
|
+
|
126
|
+
Lint/OrAssignmentToConstant:
|
127
|
+
Enabled: true
|
128
|
+
|
129
|
+
Lint/RaiseException:
|
130
|
+
Enabled: true
|
131
|
+
|
132
|
+
Lint/RedundantDirGlobSort:
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
136
|
+
Enabled: true
|
137
|
+
|
138
|
+
Lint/RescueException:
|
139
|
+
Enabled: true
|
140
|
+
|
141
|
+
Lint/StructNewOverride:
|
142
|
+
Enabled: true
|
143
|
+
|
144
|
+
Lint/SymbolConversion:
|
145
|
+
Enabled: true
|
146
|
+
|
147
|
+
Lint/ToEnumArguments:
|
148
|
+
Enabled: true
|
149
|
+
|
150
|
+
Lint/TripleQuotes:
|
151
|
+
Enabled: true
|
152
|
+
|
153
|
+
Lint/UnexpectedBlockArity:
|
154
|
+
Enabled: true
|
155
|
+
|
156
|
+
Lint/UnmodifiedReduceAccumulator:
|
157
|
+
Enabled: true
|
158
|
+
|
159
|
+
Lint/UnusedMethodArgument:
|
160
|
+
Enabled: true
|
161
|
+
|
162
|
+
Lint/UselessAccessModifier:
|
163
|
+
Enabled: true
|
164
|
+
|
165
|
+
Lint/Void:
|
166
|
+
Enabled: false
|
167
|
+
|
168
|
+
Lint/UselessAssignment:
|
169
|
+
Enabled: true
|
170
|
+
|
171
|
+
Metrics/AbcSize:
|
172
|
+
Enabled: false
|
173
|
+
|
174
|
+
Metrics/BlockLength:
|
175
|
+
Enabled: true
|
176
|
+
Max: 350
|
177
|
+
|
178
|
+
Metrics/BlockNesting:
|
179
|
+
Enabled: true
|
180
|
+
Max: 5
|
181
|
+
|
182
|
+
Metrics/ClassLength:
|
183
|
+
Enabled: true
|
184
|
+
Max: 450
|
185
|
+
|
186
|
+
Metrics/CyclomaticComplexity:
|
187
|
+
Enabled: false
|
188
|
+
|
189
|
+
Layout/LineLength:
|
190
|
+
Enabled: false
|
191
|
+
Max: 90
|
192
|
+
|
193
|
+
Metrics/MethodLength:
|
194
|
+
Enabled: true
|
195
|
+
Max: 60
|
196
|
+
|
197
|
+
Metrics/ModuleLength:
|
198
|
+
Enabled: true
|
199
|
+
Max: 500
|
200
|
+
|
201
|
+
Metrics/PerceivedComplexity:
|
202
|
+
Enabled: false
|
203
|
+
|
204
|
+
Naming/ConstantName:
|
205
|
+
Enabled: false
|
206
|
+
|
207
|
+
Naming/ClassAndModuleCamelCase:
|
208
|
+
Enabled: false
|
209
|
+
|
210
|
+
Naming/BlockParameterName:
|
211
|
+
Enabled: true
|
212
|
+
|
213
|
+
Naming/InclusiveLanguage:
|
214
|
+
Enabled: true
|
215
|
+
|
216
|
+
Naming/MethodParameterName:
|
217
|
+
Enabled: false
|
218
|
+
|
219
|
+
Naming/MethodName:
|
220
|
+
Enabled: false
|
221
|
+
|
222
|
+
Naming/VariableName:
|
223
|
+
Enabled: false
|
224
|
+
|
225
|
+
Security/IoMethods: # new in 1.22
|
226
|
+
Enabled: true
|
227
|
+
|
228
|
+
Style/Alias:
|
229
|
+
Enabled: true
|
230
|
+
|
231
|
+
Style/ArgumentsForwarding:
|
232
|
+
Enabled: true
|
233
|
+
|
234
|
+
Style/AsciiComments:
|
235
|
+
Enabled: false
|
236
|
+
|
237
|
+
Style/BarePercentLiterals:
|
238
|
+
Enabled: false
|
239
|
+
|
240
|
+
Style/BlockComments:
|
241
|
+
Enabled: false
|
242
|
+
|
243
|
+
Style/CharacterLiteral:
|
244
|
+
Enabled: false
|
245
|
+
|
246
|
+
Style/ClassCheck:
|
247
|
+
Enabled: false
|
248
|
+
|
249
|
+
Style/ClassVars:
|
250
|
+
Enabled: false
|
251
|
+
|
252
|
+
Style/CollectionCompact:
|
253
|
+
Enabled: true
|
254
|
+
|
255
|
+
Style/ColonMethodCall:
|
256
|
+
Enabled: false
|
257
|
+
|
258
|
+
Style/CommentAnnotation:
|
259
|
+
Enabled: false
|
260
|
+
|
261
|
+
Style/CommentedKeyword:
|
262
|
+
Enabled: false
|
263
|
+
|
264
|
+
Style/ConditionalAssignment:
|
265
|
+
Enabled: false
|
266
|
+
|
267
|
+
Style/DefWithParentheses:
|
268
|
+
Enabled: true
|
269
|
+
|
270
|
+
Style/Documentation:
|
271
|
+
Enabled: false
|
272
|
+
|
273
|
+
Style/DocumentDynamicEvalDefinition:
|
274
|
+
Enabled: true
|
275
|
+
|
276
|
+
Style/ExpandPathArguments:
|
277
|
+
Enabled: false
|
278
|
+
|
279
|
+
Style/ExponentialNotation:
|
280
|
+
Enabled: true
|
281
|
+
|
282
|
+
Style/GuardClause:
|
283
|
+
Enabled: false
|
284
|
+
|
285
|
+
Style/HashEachMethods:
|
286
|
+
Enabled: true
|
287
|
+
|
288
|
+
Style/HashExcept:
|
289
|
+
Enabled: true
|
290
|
+
|
291
|
+
Style/HashTransformKeys:
|
292
|
+
Enabled: true
|
293
|
+
|
294
|
+
Style/HashTransformValues:
|
295
|
+
Enabled: true
|
296
|
+
|
297
|
+
Style/IfUnlessModifier:
|
298
|
+
Enabled: false
|
299
|
+
|
300
|
+
Style/InPatternThen:
|
301
|
+
Enabled: true
|
302
|
+
|
303
|
+
Style/InverseMethods:
|
304
|
+
Enabled: false
|
305
|
+
|
306
|
+
Style/MissingRespondToMissing:
|
307
|
+
Enabled: false
|
308
|
+
|
309
|
+
Style/MultilineInPatternThen:
|
310
|
+
Enabled: true
|
311
|
+
|
312
|
+
Style/NegatedIfElseCondition:
|
313
|
+
Enabled: true
|
314
|
+
|
315
|
+
Style/Next:
|
316
|
+
Enabled: false
|
317
|
+
|
318
|
+
Style/NilLambda:
|
319
|
+
Enabled: true
|
320
|
+
|
321
|
+
Style/NumberedParameters: # new in 1.22
|
322
|
+
Enabled: true
|
323
|
+
|
324
|
+
Style/NumberedParametersLimit: # new in 1.22
|
325
|
+
Enabled: true
|
326
|
+
|
327
|
+
Style/NumericLiterals:
|
328
|
+
Enabled: false
|
329
|
+
|
330
|
+
Style/QuotedSymbols:
|
331
|
+
Enabled: true
|
332
|
+
|
333
|
+
Style/RaiseArgs:
|
334
|
+
Enabled: true
|
335
|
+
|
336
|
+
Style/RedundantArgument:
|
337
|
+
Enabled: true
|
338
|
+
|
339
|
+
Style/RedundantReturn:
|
340
|
+
Enabled: false
|
341
|
+
|
342
|
+
Style/RedundantSelf:
|
343
|
+
Enabled: true
|
344
|
+
|
345
|
+
Style/RedundantSelfAssignmentBranch:
|
346
|
+
Enabled: true
|
347
|
+
|
348
|
+
Style/RegexpLiteral:
|
349
|
+
Enabled: false
|
350
|
+
|
351
|
+
Style/PercentLiteralDelimiters:
|
352
|
+
Enabled: false
|
353
|
+
|
354
|
+
Style/SelectByRegexp: # new in 1.22
|
355
|
+
Enabled: true
|
356
|
+
|
357
|
+
Style/StderrPuts:
|
358
|
+
Enabled: false
|
359
|
+
|
360
|
+
Style/StringLiterals:
|
361
|
+
Enabled: true
|
362
|
+
|
363
|
+
Style/SwapValues:
|
364
|
+
Enabled: true
|
365
|
+
|
366
|
+
Style/TernaryParentheses:
|
367
|
+
Enabled: false
|
368
|
+
|
369
|
+
Style/UnlessElse:
|
370
|
+
Enabled: false
|
371
|
+
|
372
|
+
# Rubocop complains when it doesn't find an explicit setting for the following cops:
|
373
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
374
|
+
Enabled: true
|
375
|
+
|
376
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
377
|
+
Enabled: true
|
378
|
+
|
379
|
+
Lint/DeprecatedOpenSSLConstant:
|
380
|
+
Enabled: true
|
381
|
+
|
382
|
+
Lint/DuplicateElsifCondition:
|
383
|
+
Enabled: true
|
384
|
+
|
385
|
+
Lint/DuplicateRescueException:
|
386
|
+
Enabled: true
|
387
|
+
|
388
|
+
Lint/EmptyConditionalBody:
|
389
|
+
Enabled: true
|
390
|
+
|
391
|
+
Lint/FloatComparison:
|
392
|
+
Enabled: true
|
393
|
+
|
394
|
+
Lint/MissingSuper:
|
395
|
+
Enabled: true
|
396
|
+
|
397
|
+
Lint/MixedRegexpCaptureTypes:
|
398
|
+
Enabled: true
|
399
|
+
|
400
|
+
Lint/OutOfRangeRegexpRef:
|
401
|
+
Enabled: true
|
402
|
+
|
403
|
+
Lint/SelfAssignment:
|
404
|
+
Enabled: true
|
405
|
+
|
406
|
+
Lint/TopLevelReturnWithArgument:
|
407
|
+
Enabled: true
|
408
|
+
|
409
|
+
Lint/UnreachableLoop:
|
410
|
+
Enabled: true
|
411
|
+
|
412
|
+
Style/AccessorGrouping:
|
413
|
+
Enabled: true
|
414
|
+
|
415
|
+
Style/ArrayCoercion:
|
416
|
+
Enabled: true
|
417
|
+
|
418
|
+
Style/BisectedAttrAccessor:
|
419
|
+
Enabled: true
|
420
|
+
|
421
|
+
Style/CaseLikeIf:
|
422
|
+
Enabled: true
|
423
|
+
|
424
|
+
Style/EndlessMethod:
|
425
|
+
Enabled: true
|
426
|
+
|
427
|
+
Style/ExplicitBlockArgument:
|
428
|
+
Enabled: true
|
429
|
+
|
430
|
+
Style/GlobalStdStream:
|
431
|
+
Enabled: true
|
432
|
+
|
433
|
+
Style/HashAsLastArrayItem:
|
434
|
+
Enabled: true
|
435
|
+
|
436
|
+
Style/HashConversion:
|
437
|
+
Enabled: true
|
438
|
+
|
439
|
+
Style/HashLikeCase:
|
440
|
+
Enabled: true
|
441
|
+
|
442
|
+
Style/IfWithBooleanLiteralBranches:
|
443
|
+
Enabled: true
|
444
|
+
|
445
|
+
Style/OptionalBooleanParameter:
|
446
|
+
Enabled: true
|
447
|
+
|
448
|
+
Style/RedundantAssignment:
|
449
|
+
Enabled: true
|
450
|
+
|
451
|
+
Style/RedundantFetchBlock:
|
452
|
+
Enabled: true
|
453
|
+
|
454
|
+
Style/RedundantFileExtensionInRequire:
|
455
|
+
Enabled: true
|
456
|
+
|
457
|
+
Style/RedundantRegexpCharacterClass:
|
458
|
+
Enabled: true
|
459
|
+
|
460
|
+
Style/RedundantRegexpEscape:
|
461
|
+
Enabled: true
|
462
|
+
|
463
|
+
Style/SingleArgumentDig:
|
464
|
+
Enabled: true
|
465
|
+
|
466
|
+
Style/SlicingWithRange:
|
467
|
+
Enabled: true
|
468
|
+
|
469
|
+
Style/StringChars:
|
470
|
+
Enabled: true
|
471
|
+
|
472
|
+
Style/StringConcatenation:
|
473
|
+
Enabled: true
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,16 @@
|
|
1
|
+
## [0.2.20] - 2021-11-01
|
2
|
+
- Code update to cope with changes in `Rley` v. 0.8.08
|
3
|
+
|
4
|
+
### Changed
|
5
|
+
- File `grammar.rb`: Refactoring to cope with ? quantifier changes
|
6
|
+
- File `s_expr_builder.rb`: Refactoring to cope with ? quantifier changes
|
7
|
+
- File `skeem.gemspec` dependency updated for `Rley` v. 0.8.08
|
8
|
+
|
1
9
|
## [0.2.19] - 2021-08-30
|
2
10
|
- Grammar refactoring: use ?, * and + modifiers in Rley 0.8.03 rules
|
3
11
|
|
4
12
|
### Changed
|
5
|
-
- File `grammar.rb`: Remove redundant rules after introduction
|
13
|
+
- File `grammar.rb`: Remove redundant rules after introduction of ?, * and + modifiers
|
6
14
|
- Class `SkmBuilder`: Removal of useless methods after removal of their rule counterpart
|
7
15
|
|
8
16
|
|
data/README.md
CHANGED
@@ -392,7 +392,7 @@ This project is intended to be a safe, welcoming space for collaboration, and co
|
|
392
392
|
|
393
393
|
Copyright
|
394
394
|
---------
|
395
|
-
Copyright (c) 2018-
|
395
|
+
Copyright (c) 2018-2021, Dimitri Geshef.
|
396
396
|
__Skeem__ is released under the MIT License see [LICENSE.txt](https://github.com/famished-tiger/Skeem/blob/master/LICENSE.txt) for details.
|
397
397
|
|
398
398
|
## Code of Conduct
|
data/lib/skeem/grammar.rb
CHANGED
@@ -6,7 +6,7 @@ require 'rley' # Load the gem
|
|
6
6
|
module Skeem
|
7
7
|
########################################
|
8
8
|
# Define a grammar for Skeem
|
9
|
-
#
|
9
|
+
# The official Small Scheme language grammar is available at:
|
10
10
|
# https://bitbucket.org/cowan/r7rs/src/draft-10/rnrs/r7rs.pdf
|
11
11
|
# Names of grammar elements are based on the R7RS documentation
|
12
12
|
builder = Rley::grammar_builder do
|
@@ -102,7 +102,7 @@ module Skeem
|
|
102
102
|
do_syntax = <<-END_SYNTAX
|
103
103
|
LPAREN DO LPAREN iteration_spec* RPAREN
|
104
104
|
LPAREN test do_result RPAREN
|
105
|
-
|
105
|
+
rep_command_star RPAREN
|
106
106
|
END_SYNTAX
|
107
107
|
rule('derived_expression' => do_syntax).as 'do_expression'
|
108
108
|
rule 'derived_expression' => 'quasiquotation'
|
@@ -117,7 +117,7 @@ END_SYNTAX
|
|
117
117
|
rule('iteration_spec' => 'LPAREN IDENTIFIER init RPAREN').as 'iteration_spec_short'
|
118
118
|
rule('init' => 'expression')
|
119
119
|
rule('step' => 'expression')
|
120
|
-
rule
|
120
|
+
rule('do_result' => 'sequence?').tag 'do_result'
|
121
121
|
rule('keyword' => 'IDENTIFIER')
|
122
122
|
rule('includer' => 'LPAREN INCLUDE STRING_LIT+ RPAREN').as 'include'
|
123
123
|
rule 'qq_template' => 'simple_datum'
|
data/lib/skeem/interpreter.rb
CHANGED
@@ -8,7 +8,11 @@ require_relative './primitive/primitive_builder'
|
|
8
8
|
module Skeem
|
9
9
|
class Interpreter
|
10
10
|
include Primitive::PrimitiveBuilder
|
11
|
+
|
12
|
+
# @return [Skeem::Parser] Link to Skeem parser
|
11
13
|
attr_reader(:parser)
|
14
|
+
|
15
|
+
# @return [Skeem::Runtime] Link to runtime object (holds call stack & frames)
|
12
16
|
attr_reader(:runtime)
|
13
17
|
|
14
18
|
def initialize
|
@@ -244,10 +244,7 @@ module Skeem
|
|
244
244
|
raw_result = Rational(raw_result, elem_value)
|
245
245
|
end
|
246
246
|
|
247
|
-
when [Integer, Rational]
|
248
|
-
raw_result *= reciprocal(elem_value)
|
249
|
-
|
250
|
-
when [Rational, Rational]
|
247
|
+
when [Integer, Rational], [Rational, Rational]
|
251
248
|
raw_result *= reciprocal(elem_value)
|
252
249
|
else
|
253
250
|
raw_result = raw_result.to_f
|
@@ -5,8 +5,13 @@ require_relative '../s_expr_nodes'
|
|
5
5
|
module Skeem
|
6
6
|
module Primitive
|
7
7
|
class PrimitiveProcedure
|
8
|
+
# @return [Skeem::SkmIdentifier] 'name' of the procedure
|
8
9
|
attr_reader(:identifier)
|
10
|
+
|
11
|
+
# @return [Skeem::Arity] number of arguments of the procedure
|
9
12
|
attr_reader(:arity)
|
13
|
+
|
14
|
+
# @return [Proc] A Ruby lambda that implements the primitive procedure
|
10
15
|
attr_reader(:code)
|
11
16
|
|
12
17
|
# param [anArity] Arity of the lambda code (ignoring the runtime object)
|
data/lib/skeem/s_expr_builder.rb
CHANGED
@@ -205,7 +205,8 @@ module Skeem
|
|
205
205
|
|
206
206
|
# rule('conditional' => 'LPAREN IF test consequent alternate RPAREN').as 'conditional'
|
207
207
|
def reduce_conditional(_production, aRange, _tokens, theChildren)
|
208
|
-
|
208
|
+
children = theChildren.flatten
|
209
|
+
SkmCondition.new(aRange, children[2], children[3], children[4])
|
209
210
|
end
|
210
211
|
|
211
212
|
# rule('assignment' => 'LPAREN SET! IDENTIFIER expression RPAREN').as 'assignment'
|
@@ -288,11 +289,21 @@ module Skeem
|
|
288
289
|
SkmIterationSpec.new(theChildren[1], theChildren[2], nil)
|
289
290
|
end
|
290
291
|
|
291
|
-
# rule('do_result' =>
|
292
|
-
def
|
293
|
-
|
292
|
+
# rule('do_result' => 'sequence?')
|
293
|
+
def reduce_do_result(_production, _range, _tokens, theChildren)
|
294
|
+
children = theChildren.flatten
|
295
|
+
if children.empty?
|
296
|
+
SkmEmptyList.instance
|
297
|
+
else
|
298
|
+
children[0]
|
299
|
+
end
|
294
300
|
end
|
295
301
|
|
302
|
+
# rule('do_result' => []).as 'empty_do_result'
|
303
|
+
# def reduce_empty_do_result(_production, _range, _tokens, _children)
|
304
|
+
# SkmEmptyList.instance
|
305
|
+
# end
|
306
|
+
|
296
307
|
# rule('includer' => 'LPAREN INCLUDE string_plus RPAREN').as 'include'
|
297
308
|
def reduce_include(_production, _range, _tokens, theChildren)
|
298
309
|
includer = SkmIncluder.new(theChildren[2])
|
data/lib/skeem/s_expr_nodes.rb
CHANGED
@@ -9,6 +9,8 @@ require_relative 'datum_dsl'
|
|
9
9
|
require_relative 'skm_unary_expression'
|
10
10
|
require_relative 'skm_procedure_exec'
|
11
11
|
|
12
|
+
# rubocop: disable Style/AccessorGrouping
|
13
|
+
|
12
14
|
module Skeem
|
13
15
|
class SkmUndefined
|
14
16
|
include Singleton
|
@@ -143,6 +145,8 @@ module Skeem
|
|
143
145
|
[:callee, callee]
|
144
146
|
end
|
145
147
|
|
148
|
+
# rubocop: disable Style/RedundantAssignment
|
149
|
+
|
146
150
|
def fetch_callee(aRuntime, var_key)
|
147
151
|
begin
|
148
152
|
aRuntime.include?(var_key.value)
|
@@ -172,6 +176,8 @@ module Skeem
|
|
172
176
|
callee
|
173
177
|
end
|
174
178
|
|
179
|
+
# rubocop: enable Style/RedundantAssignment
|
180
|
+
|
175
181
|
def transform_operands(aRuntime)
|
176
182
|
return [] if operands == SkmEmptyList.instance
|
177
183
|
|
@@ -817,11 +823,11 @@ module Skeem
|
|
817
823
|
else
|
818
824
|
result = cmd.evaluate(aRuntime)
|
819
825
|
end
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
826
|
+
rescue NoMethodError => e
|
827
|
+
$stderr.puts inspect
|
828
|
+
$stderr.puts sequence.inspect
|
829
|
+
$stderr.puts cmd.inspect
|
830
|
+
raise e
|
825
831
|
end
|
826
832
|
|
827
833
|
result
|
@@ -843,6 +849,8 @@ module Skeem
|
|
843
849
|
twin
|
844
850
|
end
|
845
851
|
|
852
|
+
# rubocop: disable Naming/AccessorMethodName
|
853
|
+
|
846
854
|
def set_cond_environment(theFrame)
|
847
855
|
# $stderr.puts "Lambda #{object_id.to_s(16)}, env [#{environment.object_id.to_s(16)}]"
|
848
856
|
# $stderr.puts " Runtime environment: #{theFrame.object_id.to_s(16)}"
|
@@ -856,6 +864,8 @@ module Skeem
|
|
856
864
|
end
|
857
865
|
end
|
858
866
|
|
867
|
+
# rubocop: enable Naming/AccessorMethodName
|
868
|
+
|
859
869
|
private
|
860
870
|
|
861
871
|
# Purpose: bind each formal from lambda to an actual value from the call
|
@@ -915,4 +925,6 @@ module Skeem
|
|
915
925
|
end
|
916
926
|
end # class
|
917
927
|
end # module
|
928
|
+
|
929
|
+
# rubocop: enable Style/AccessorGrouping
|
918
930
|
# End of file
|
data/lib/skeem/tokenizer.rb
CHANGED
@@ -89,6 +89,8 @@ module Skeem
|
|
89
89
|
|
90
90
|
private
|
91
91
|
|
92
|
+
# rubocop: disable Lint/DuplicateBranch
|
93
|
+
|
92
94
|
def _next_token
|
93
95
|
skip_intertoken_spaces
|
94
96
|
curr_ch = scanner.peek(1)
|
@@ -143,6 +145,8 @@ module Skeem
|
|
143
145
|
return token
|
144
146
|
end
|
145
147
|
|
148
|
+
# rubocop: enable Lint/DuplicateBranch
|
149
|
+
|
146
150
|
=begin
|
147
151
|
#u8( This introduces a bytevector constant (section 6.9).
|
148
152
|
Bytevector constants are terminated by ) .
|
data/lib/skeem/version.rb
CHANGED
data/skeem.gemspec
CHANGED
@@ -62,7 +62,7 @@ SUMMARY
|
|
62
62
|
PkgExtending.pkg_files(spec)
|
63
63
|
PkgExtending.pkg_documentation(spec)
|
64
64
|
# Runtime dependencies
|
65
|
-
spec.add_dependency 'rley', '~> 0.8.
|
65
|
+
spec.add_dependency 'rley', '~> 0.8.08'
|
66
66
|
|
67
67
|
# Development dependencies
|
68
68
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skeem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitri Geshef
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rley
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.8.
|
19
|
+
version: 0.8.08
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.8.
|
26
|
+
version: 0.8.08
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|