edtf 3.0.8 → 3.1.1
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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +41 -0
- data/.simplecov +15 -0
- data/Gemfile +5 -19
- data/LICENSE +1 -1
- data/README.md +12 -7
- data/Rakefile +0 -4
- data/cucumber.yml +1 -1
- data/edtf.gemspec +1 -2
- data/features/parser/unspecified.feature +17 -6
- data/features/print/level_1_edtf.feature +47 -16
- data/features/print/level_2_edtf.feature +11 -3
- data/features/support/env.rb +1 -10
- data/lib/edtf/date.rb +2 -2
- data/lib/edtf/interval.rb +4 -4
- data/lib/edtf/parser.rb +98 -94
- data/lib/edtf/parser.y +7 -5
- data/lib/edtf/season.rb +2 -2
- data/lib/edtf/uncertainty.rb +13 -13
- data/lib/edtf/version.rb +1 -1
- data/spec/edtf/interval_spec.rb +3 -3
- data/spec/edtf/parser_spec.rb +135 -70
- data/spec/edtf/uncertainty_spec.rb +73 -79
- data/spec/spec_helper.rb +1 -10
- metadata +5 -6
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -17
data/lib/edtf/parser.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# DO NOT MODIFY!!!!
|
3
|
-
# This file is automatically generated by Racc 1.
|
3
|
+
# This file is automatically generated by Racc 1.6.0
|
4
4
|
# from Racc grammar file "".
|
5
5
|
#
|
6
6
|
|
@@ -11,7 +11,7 @@ require 'strscan'
|
|
11
11
|
module EDTF
|
12
12
|
class Parser < Racc::Parser
|
13
13
|
|
14
|
-
module_eval(<<'...end parser.y/module_eval...', 'parser.y',
|
14
|
+
module_eval(<<'...end parser.y/module_eval...', 'parser.y', 451)
|
15
15
|
|
16
16
|
@defaults = {
|
17
17
|
:level => 2,
|
@@ -87,6 +87,8 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 453)
|
|
87
87
|
[:Z, @src.matched]
|
88
88
|
when @src.scan(/\?~/)
|
89
89
|
[:UA, [:uncertain!, :approximate!]]
|
90
|
+
when @src.scan(/%/)
|
91
|
+
[:UA, [:uncertain!, :approximate!]]
|
90
92
|
when @src.scan(/\?/)
|
91
93
|
[:UA, [:uncertain!]]
|
92
94
|
when @src.scan(/~/)
|
@@ -97,11 +99,13 @@ module_eval(<<'...end parser.y/module_eval...', 'parser.y', 453)
|
|
97
99
|
[:UNKNOWN, :unknown]
|
98
100
|
when @src.scan(/u/)
|
99
101
|
[:U, @src.matched]
|
100
|
-
when @src.scan(/
|
102
|
+
when @src.scan(/X/)
|
103
|
+
[:U, @src.matched]
|
104
|
+
when @src.scan(/x/)
|
101
105
|
[:X, @src.matched]
|
102
|
-
when @src.scan(/y/)
|
106
|
+
when @src.scan(/y/i)
|
103
107
|
[:LONGYEAR, @src.matched]
|
104
|
-
when @src.scan(/e/)
|
108
|
+
when @src.scan(/e/i)
|
105
109
|
[:E, @src.matched]
|
106
110
|
when @src.scan(/\+/)
|
107
111
|
['+', @src.matched]
|
@@ -1073,7 +1077,7 @@ module_eval(<<'.,.,', 'parser.y', 134)
|
|
1073
1077
|
end
|
1074
1078
|
.,.,
|
1075
1079
|
|
1076
|
-
module_eval(<<'.,.,', 'parser.y',
|
1080
|
+
module_eval(<<'.,.,', 'parser.y', 138)
|
1077
1081
|
def _reduce_50(val, _values, result)
|
1078
1082
|
result = Interval.new(val[0], val[2])
|
1079
1083
|
|
@@ -1095,7 +1099,7 @@ module_eval(<<'.,.,', 'parser.y', 139)
|
|
1095
1099
|
|
1096
1100
|
# reduce 57 omitted
|
1097
1101
|
|
1098
|
-
module_eval(<<'.,.,', 'parser.y',
|
1102
|
+
module_eval(<<'.,.,', 'parser.y', 149)
|
1099
1103
|
def _reduce_58(val, _values, result)
|
1100
1104
|
result = Date.new(val[1])
|
1101
1105
|
result.precision = :year
|
@@ -1104,7 +1108,7 @@ module_eval(<<'.,.,', 'parser.y', 150)
|
|
1104
1108
|
end
|
1105
1109
|
.,.,
|
1106
1110
|
|
1107
|
-
module_eval(<<'.,.,', 'parser.y',
|
1111
|
+
module_eval(<<'.,.,', 'parser.y', 154)
|
1108
1112
|
def _reduce_59(val, _values, result)
|
1109
1113
|
result = Date.new(-1 * val[2])
|
1110
1114
|
result.precision = :year
|
@@ -1113,7 +1117,7 @@ module_eval(<<'.,.,', 'parser.y', 155)
|
|
1113
1117
|
end
|
1114
1118
|
.,.,
|
1115
1119
|
|
1116
|
-
module_eval(<<'.,.,', 'parser.y',
|
1120
|
+
module_eval(<<'.,.,', 'parser.y', 161)
|
1117
1121
|
def _reduce_60(val, _values, result)
|
1118
1122
|
result = val.zip([10000,1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b }
|
1119
1123
|
|
@@ -1121,14 +1125,14 @@ module_eval(<<'.,.,', 'parser.y', 162)
|
|
1121
1125
|
end
|
1122
1126
|
.,.,
|
1123
1127
|
|
1124
|
-
module_eval(<<'.,.,', 'parser.y',
|
1128
|
+
module_eval(<<'.,.,', 'parser.y', 163)
|
1125
1129
|
def _reduce_61(val, _values, result)
|
1126
1130
|
result = 10 * val[0] + val[1]
|
1127
1131
|
result
|
1128
1132
|
end
|
1129
1133
|
.,.,
|
1130
1134
|
|
1131
|
-
module_eval(<<'.,.,', 'parser.y',
|
1135
|
+
module_eval(<<'.,.,', 'parser.y', 168)
|
1132
1136
|
def _reduce_62(val, _values, result)
|
1133
1137
|
result = Season.new(val[0], val[2])
|
1134
1138
|
val[3].each { |ua| result.send(ua) }
|
@@ -1137,28 +1141,28 @@ module_eval(<<'.,.,', 'parser.y', 169)
|
|
1137
1141
|
end
|
1138
1142
|
.,.,
|
1139
1143
|
|
1140
|
-
module_eval(<<'.,.,', 'parser.y',
|
1144
|
+
module_eval(<<'.,.,', 'parser.y', 172)
|
1141
1145
|
def _reduce_63(val, _values, result)
|
1142
1146
|
result = 21
|
1143
1147
|
result
|
1144
1148
|
end
|
1145
1149
|
.,.,
|
1146
1150
|
|
1147
|
-
module_eval(<<'.,.,', 'parser.y',
|
1151
|
+
module_eval(<<'.,.,', 'parser.y', 173)
|
1148
1152
|
def _reduce_64(val, _values, result)
|
1149
1153
|
result = 22
|
1150
1154
|
result
|
1151
1155
|
end
|
1152
1156
|
.,.,
|
1153
1157
|
|
1154
|
-
module_eval(<<'.,.,', 'parser.y',
|
1158
|
+
module_eval(<<'.,.,', 'parser.y', 174)
|
1155
1159
|
def _reduce_65(val, _values, result)
|
1156
1160
|
result = 23
|
1157
1161
|
result
|
1158
1162
|
end
|
1159
1163
|
.,.,
|
1160
1164
|
|
1161
|
-
module_eval(<<'.,.,', 'parser.y',
|
1165
|
+
module_eval(<<'.,.,', 'parser.y', 175)
|
1162
1166
|
def _reduce_66(val, _values, result)
|
1163
1167
|
result = 24
|
1164
1168
|
result
|
@@ -1181,14 +1185,14 @@ module_eval(<<'.,.,', 'parser.y', 176)
|
|
1181
1185
|
|
1182
1186
|
# reduce 74 omitted
|
1183
1187
|
|
1184
|
-
module_eval(<<'.,.,', 'parser.y',
|
1188
|
+
module_eval(<<'.,.,', 'parser.y', 193)
|
1185
1189
|
def _reduce_75(val, _values, result)
|
1186
1190
|
result = val[0]; result.qualifier = val[1]
|
1187
1191
|
result
|
1188
1192
|
end
|
1189
1193
|
.,.,
|
1190
1194
|
|
1191
|
-
module_eval(<<'.,.,', 'parser.y',
|
1195
|
+
module_eval(<<'.,.,', 'parser.y', 199)
|
1192
1196
|
def _reduce_76(val, _values, result)
|
1193
1197
|
result = Date.new(val[0].year * 10 ** val[2]).year_precision!
|
1194
1198
|
|
@@ -1196,7 +1200,7 @@ module_eval(<<'.,.,', 'parser.y', 200)
|
|
1196
1200
|
end
|
1197
1201
|
.,.,
|
1198
1202
|
|
1199
|
-
module_eval(<<'.,.,', 'parser.y',
|
1203
|
+
module_eval(<<'.,.,', 'parser.y', 203)
|
1200
1204
|
def _reduce_77(val, _values, result)
|
1201
1205
|
result = Date.new(val[1] * 10 ** val[3]).year_precision!
|
1202
1206
|
|
@@ -1204,7 +1208,7 @@ module_eval(<<'.,.,', 'parser.y', 204)
|
|
1204
1208
|
end
|
1205
1209
|
.,.,
|
1206
1210
|
|
1207
|
-
module_eval(<<'.,.,', 'parser.y',
|
1211
|
+
module_eval(<<'.,.,', 'parser.y', 207)
|
1208
1212
|
def _reduce_78(val, _values, result)
|
1209
1213
|
result = Date.new(-1 * val[2] * 10 ** val[4]).year_precision!
|
1210
1214
|
|
@@ -1212,14 +1216,14 @@ module_eval(<<'.,.,', 'parser.y', 208)
|
|
1212
1216
|
end
|
1213
1217
|
.,.,
|
1214
1218
|
|
1215
|
-
module_eval(<<'.,.,', 'parser.y',
|
1219
|
+
module_eval(<<'.,.,', 'parser.y', 212)
|
1216
1220
|
def _reduce_79(val, _values, result)
|
1217
1221
|
result = val[0]; result.calendar = val[1]
|
1218
1222
|
result
|
1219
1223
|
end
|
1220
1224
|
.,.,
|
1221
1225
|
|
1222
|
-
module_eval(<<'.,.,', 'parser.y',
|
1226
|
+
module_eval(<<'.,.,', 'parser.y', 218)
|
1223
1227
|
def _reduce_80(val, _values, result)
|
1224
1228
|
d = val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b }
|
1225
1229
|
result = EDTF::Decade.new(d)
|
@@ -1228,7 +1232,7 @@ module_eval(<<'.,.,', 'parser.y', 219)
|
|
1228
1232
|
end
|
1229
1233
|
.,.,
|
1230
1234
|
|
1231
|
-
module_eval(<<'.,.,', 'parser.y',
|
1235
|
+
module_eval(<<'.,.,', 'parser.y', 223)
|
1232
1236
|
def _reduce_81(val, _values, result)
|
1233
1237
|
d = val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b }
|
1234
1238
|
result = EDTF::Century.new(d)
|
@@ -1237,77 +1241,77 @@ module_eval(<<'.,.,', 'parser.y', 224)
|
|
1237
1241
|
end
|
1238
1242
|
.,.,
|
1239
1243
|
|
1240
|
-
module_eval(<<'.,.,', 'parser.y',
|
1244
|
+
module_eval(<<'.,.,', 'parser.y', 229)
|
1241
1245
|
def _reduce_82(val, _values, result)
|
1242
1246
|
result = val[1].choice!
|
1243
1247
|
result
|
1244
1248
|
end
|
1245
1249
|
.,.,
|
1246
1250
|
|
1247
|
-
module_eval(<<'.,.,', 'parser.y',
|
1251
|
+
module_eval(<<'.,.,', 'parser.y', 231)
|
1248
1252
|
def _reduce_83(val, _values, result)
|
1249
1253
|
result = val[1]
|
1250
1254
|
result
|
1251
1255
|
end
|
1252
1256
|
.,.,
|
1253
1257
|
|
1254
|
-
module_eval(<<'.,.,', 'parser.y',
|
1258
|
+
module_eval(<<'.,.,', 'parser.y', 233)
|
1255
1259
|
def _reduce_84(val, _values, result)
|
1256
1260
|
result = EDTF::Set.new(val[0]).earlier!
|
1257
1261
|
result
|
1258
1262
|
end
|
1259
1263
|
.,.,
|
1260
1264
|
|
1261
|
-
module_eval(<<'.,.,', 'parser.y',
|
1265
|
+
module_eval(<<'.,.,', 'parser.y', 234)
|
1262
1266
|
def _reduce_85(val, _values, result)
|
1263
1267
|
result = EDTF::Set.new([val[0]] + val[2] + [val[4]]).earlier!.later!
|
1264
1268
|
result
|
1265
1269
|
end
|
1266
1270
|
.,.,
|
1267
1271
|
|
1268
|
-
module_eval(<<'.,.,', 'parser.y',
|
1272
|
+
module_eval(<<'.,.,', 'parser.y', 235)
|
1269
1273
|
def _reduce_86(val, _values, result)
|
1270
1274
|
result = EDTF::Set.new([val[0]] + val[2]).earlier!
|
1271
1275
|
result
|
1272
1276
|
end
|
1273
1277
|
.,.,
|
1274
1278
|
|
1275
|
-
module_eval(<<'.,.,', 'parser.y',
|
1279
|
+
module_eval(<<'.,.,', 'parser.y', 236)
|
1276
1280
|
def _reduce_87(val, _values, result)
|
1277
1281
|
result = EDTF::Set.new([val[0]] + [val[2]]).earlier!.later!
|
1278
1282
|
result
|
1279
1283
|
end
|
1280
1284
|
.,.,
|
1281
1285
|
|
1282
|
-
module_eval(<<'.,.,', 'parser.y',
|
1286
|
+
module_eval(<<'.,.,', 'parser.y', 237)
|
1283
1287
|
def _reduce_88(val, _values, result)
|
1284
1288
|
result = EDTF::Set.new(val[0] + [val[2]]).later!
|
1285
1289
|
result
|
1286
1290
|
end
|
1287
1291
|
.,.,
|
1288
1292
|
|
1289
|
-
module_eval(<<'.,.,', 'parser.y',
|
1293
|
+
module_eval(<<'.,.,', 'parser.y', 238)
|
1290
1294
|
def _reduce_89(val, _values, result)
|
1291
1295
|
result = EDTF::Set.new(*val[0])
|
1292
1296
|
result
|
1293
1297
|
end
|
1294
1298
|
.,.,
|
1295
1299
|
|
1296
|
-
module_eval(<<'.,.,', 'parser.y',
|
1300
|
+
module_eval(<<'.,.,', 'parser.y', 239)
|
1297
1301
|
def _reduce_90(val, _values, result)
|
1298
1302
|
result = EDTF::Set.new(val[0]).later!
|
1299
1303
|
result
|
1300
1304
|
end
|
1301
1305
|
.,.,
|
1302
1306
|
|
1303
|
-
module_eval(<<'.,.,', 'parser.y',
|
1307
|
+
module_eval(<<'.,.,', 'parser.y', 242)
|
1304
1308
|
def _reduce_91(val, _values, result)
|
1305
1309
|
result = [val[0]].flatten
|
1306
1310
|
result
|
1307
1311
|
end
|
1308
1312
|
.,.,
|
1309
1313
|
|
1310
|
-
module_eval(<<'.,.,', 'parser.y',
|
1314
|
+
module_eval(<<'.,.,', 'parser.y', 243)
|
1311
1315
|
def _reduce_92(val, _values, result)
|
1312
1316
|
result = val[0] + [val[2]].flatten
|
1313
1317
|
result
|
@@ -1324,56 +1328,56 @@ module_eval(<<'.,.,', 'parser.y', 244)
|
|
1324
1328
|
|
1325
1329
|
# reduce 97 omitted
|
1326
1330
|
|
1327
|
-
module_eval(<<'.,.,', 'parser.y',
|
1331
|
+
module_eval(<<'.,.,', 'parser.y', 255)
|
1328
1332
|
def _reduce_98(val, _values, result)
|
1329
1333
|
result = val[1]
|
1330
1334
|
result
|
1331
1335
|
end
|
1332
1336
|
.,.,
|
1333
1337
|
|
1334
|
-
module_eval(<<'.,.,', 'parser.y',
|
1338
|
+
module_eval(<<'.,.,', 'parser.y', 257)
|
1335
1339
|
def _reduce_99(val, _values, result)
|
1336
1340
|
result = Date.new(*val[0]).day_precision!
|
1337
1341
|
result
|
1338
1342
|
end
|
1339
1343
|
.,.,
|
1340
1344
|
|
1341
|
-
module_eval(<<'.,.,', 'parser.y',
|
1345
|
+
module_eval(<<'.,.,', 'parser.y', 258)
|
1342
1346
|
def _reduce_100(val, _values, result)
|
1343
1347
|
result = Date.new(*val[0]).month_precision!
|
1344
1348
|
result
|
1345
1349
|
end
|
1346
1350
|
.,.,
|
1347
1351
|
|
1348
|
-
module_eval(<<'.,.,', 'parser.y',
|
1352
|
+
module_eval(<<'.,.,', 'parser.y', 259)
|
1349
1353
|
def _reduce_101(val, _values, result)
|
1350
1354
|
result = Date.new(val[0]).year_precision!
|
1351
1355
|
result
|
1352
1356
|
end
|
1353
1357
|
.,.,
|
1354
1358
|
|
1355
|
-
module_eval(<<'.,.,', 'parser.y',
|
1359
|
+
module_eval(<<'.,.,', 'parser.y', 262)
|
1356
1360
|
def _reduce_102(val, _values, result)
|
1357
1361
|
result = (Date.new(val[0]).day_precision! .. Date.new(val[2]).day_precision!)
|
1358
1362
|
result
|
1359
1363
|
end
|
1360
1364
|
.,.,
|
1361
1365
|
|
1362
|
-
module_eval(<<'.,.,', 'parser.y',
|
1366
|
+
module_eval(<<'.,.,', 'parser.y', 263)
|
1363
1367
|
def _reduce_103(val, _values, result)
|
1364
1368
|
result = (Date.new(val[0]).month_precision! .. Date.new(val[2]).month_precision!)
|
1365
1369
|
result
|
1366
1370
|
end
|
1367
1371
|
.,.,
|
1368
1372
|
|
1369
|
-
module_eval(<<'.,.,', 'parser.y',
|
1373
|
+
module_eval(<<'.,.,', 'parser.y', 264)
|
1370
1374
|
def _reduce_104(val, _values, result)
|
1371
1375
|
result = (Date.new(val[0]).year_precision! .. Date.new(val[2]).year_precision!)
|
1372
1376
|
result
|
1373
1377
|
end
|
1374
1378
|
.,.,
|
1375
1379
|
|
1376
|
-
module_eval(<<'.,.,', 'parser.y',
|
1380
|
+
module_eval(<<'.,.,', 'parser.y', 270)
|
1377
1381
|
def _reduce_105(val, _values, result)
|
1378
1382
|
result = Date.new(val[0][0], val[2], val[4])
|
1379
1383
|
result.unspecified.year[2,2] = val[0][1]
|
@@ -1382,7 +1386,7 @@ module_eval(<<'.,.,', 'parser.y', 271)
|
|
1382
1386
|
end
|
1383
1387
|
.,.,
|
1384
1388
|
|
1385
|
-
module_eval(<<'.,.,', 'parser.y',
|
1389
|
+
module_eval(<<'.,.,', 'parser.y', 275)
|
1386
1390
|
def _reduce_106(val, _values, result)
|
1387
1391
|
result = Date.new(val[0][0], val[2], 1)
|
1388
1392
|
result.month_precision!
|
@@ -1392,7 +1396,7 @@ module_eval(<<'.,.,', 'parser.y', 276)
|
|
1392
1396
|
end
|
1393
1397
|
.,.,
|
1394
1398
|
|
1395
|
-
module_eval(<<'.,.,', 'parser.y',
|
1399
|
+
module_eval(<<'.,.,', 'parser.y', 281)
|
1396
1400
|
def _reduce_107(val, _values, result)
|
1397
1401
|
result = Date.new(val[0][0], 1, val[5])
|
1398
1402
|
result.unspecified.year[2,2] = val[0][1]
|
@@ -1402,7 +1406,7 @@ module_eval(<<'.,.,', 'parser.y', 282)
|
|
1402
1406
|
end
|
1403
1407
|
.,.,
|
1404
1408
|
|
1405
|
-
module_eval(<<'.,.,', 'parser.y',
|
1409
|
+
module_eval(<<'.,.,', 'parser.y', 287)
|
1406
1410
|
def _reduce_108(val, _values, result)
|
1407
1411
|
result = Date.new(val[0][0], 1, 1)
|
1408
1412
|
result.unspecified.year[2,2] = val[0][1]
|
@@ -1412,7 +1416,7 @@ module_eval(<<'.,.,', 'parser.y', 288)
|
|
1412
1416
|
end
|
1413
1417
|
.,.,
|
1414
1418
|
|
1415
|
-
module_eval(<<'.,.,', 'parser.y',
|
1419
|
+
module_eval(<<'.,.,', 'parser.y', 293)
|
1416
1420
|
def _reduce_109(val, _values, result)
|
1417
1421
|
result = Date.new(val[0][0], val[2], 1)
|
1418
1422
|
result.unspecified.year[2,2] = val[0][1]
|
@@ -1422,7 +1426,7 @@ module_eval(<<'.,.,', 'parser.y', 294)
|
|
1422
1426
|
end
|
1423
1427
|
.,.,
|
1424
1428
|
|
1425
|
-
module_eval(<<'.,.,', 'parser.y',
|
1429
|
+
module_eval(<<'.,.,', 'parser.y', 299)
|
1426
1430
|
def _reduce_110(val, _values, result)
|
1427
1431
|
result = Date.new(val[0], 1, val[5])
|
1428
1432
|
result.unspecified!(:month)
|
@@ -1433,42 +1437,42 @@ module_eval(<<'.,.,', 'parser.y', 300)
|
|
1433
1437
|
|
1434
1438
|
# reduce 111 omitted
|
1435
1439
|
|
1436
|
-
module_eval(<<'.,.,', 'parser.y',
|
1440
|
+
module_eval(<<'.,.,', 'parser.y', 305)
|
1437
1441
|
def _reduce_112(val, _values, result)
|
1438
1442
|
result = uoa(val[1], val[3])
|
1439
1443
|
result
|
1440
1444
|
end
|
1441
1445
|
.,.,
|
1442
1446
|
|
1443
|
-
module_eval(<<'.,.,', 'parser.y',
|
1447
|
+
module_eval(<<'.,.,', 'parser.y', 308)
|
1444
1448
|
def _reduce_113(val, _values, result)
|
1445
1449
|
result = val[0].year_precision!
|
1446
1450
|
result
|
1447
1451
|
end
|
1448
1452
|
.,.,
|
1449
1453
|
|
1450
|
-
module_eval(<<'.,.,', 'parser.y',
|
1454
|
+
module_eval(<<'.,.,', 'parser.y', 309)
|
1451
1455
|
def _reduce_114(val, _values, result)
|
1452
1456
|
result = val[0][0].month_precision!
|
1453
1457
|
result
|
1454
1458
|
end
|
1455
1459
|
.,.,
|
1456
1460
|
|
1457
|
-
module_eval(<<'.,.,', 'parser.y',
|
1461
|
+
module_eval(<<'.,.,', 'parser.y', 310)
|
1458
1462
|
def _reduce_115(val, _values, result)
|
1459
1463
|
result = val[0].day_precision!
|
1460
1464
|
result
|
1461
1465
|
end
|
1462
1466
|
.,.,
|
1463
1467
|
|
1464
|
-
module_eval(<<'.,.,', 'parser.y',
|
1468
|
+
module_eval(<<'.,.,', 'parser.y', 312)
|
1465
1469
|
def _reduce_116(val, _values, result)
|
1466
1470
|
result = uoa(Date.new(val[0]), val[1], :year)
|
1467
1471
|
result
|
1468
1472
|
end
|
1469
1473
|
.,.,
|
1470
1474
|
|
1471
|
-
module_eval(<<'.,.,', 'parser.y',
|
1475
|
+
module_eval(<<'.,.,', 'parser.y', 316)
|
1472
1476
|
def _reduce_117(val, _values, result)
|
1473
1477
|
result = [uoa(val[0].change(:month => val[2]), val[3], [:month, :year])]
|
1474
1478
|
|
@@ -1476,7 +1480,7 @@ module_eval(<<'.,.,', 'parser.y', 318)
|
|
1476
1480
|
end
|
1477
1481
|
.,.,
|
1478
1482
|
|
1479
|
-
module_eval(<<'.,.,', 'parser.y',
|
1483
|
+
module_eval(<<'.,.,', 'parser.y', 319)
|
1480
1484
|
def _reduce_118(val, _values, result)
|
1481
1485
|
result = [uoa(Date.new(val[0], val[2]), val[3], [:year, :month])]
|
1482
1486
|
|
@@ -1484,7 +1488,7 @@ module_eval(<<'.,.,', 'parser.y', 321)
|
|
1484
1488
|
end
|
1485
1489
|
.,.,
|
1486
1490
|
|
1487
|
-
module_eval(<<'.,.,', 'parser.y',
|
1491
|
+
module_eval(<<'.,.,', 'parser.y', 322)
|
1488
1492
|
def _reduce_119(val, _values, result)
|
1489
1493
|
result = [uoa(Date.new(val[0], val[2]), val[4], [:month]), true]
|
1490
1494
|
|
@@ -1492,7 +1496,7 @@ module_eval(<<'.,.,', 'parser.y', 324)
|
|
1492
1496
|
end
|
1493
1497
|
.,.,
|
1494
1498
|
|
1495
|
-
module_eval(<<'.,.,', 'parser.y',
|
1499
|
+
module_eval(<<'.,.,', 'parser.y', 325)
|
1496
1500
|
def _reduce_120(val, _values, result)
|
1497
1501
|
result = [uoa(val[0].change(:month => val[2]), val[4], [:month]), true]
|
1498
1502
|
|
@@ -1500,7 +1504,7 @@ module_eval(<<'.,.,', 'parser.y', 327)
|
|
1500
1504
|
end
|
1501
1505
|
.,.,
|
1502
1506
|
|
1503
|
-
module_eval(<<'.,.,', 'parser.y',
|
1507
|
+
module_eval(<<'.,.,', 'parser.y', 331)
|
1504
1508
|
def _reduce_121(val, _values, result)
|
1505
1509
|
result = uoa(val[0][0].change(:day => val[2]), val[3], val[0][1] ? [:day] : nil)
|
1506
1510
|
|
@@ -1508,7 +1512,7 @@ module_eval(<<'.,.,', 'parser.y', 333)
|
|
1508
1512
|
end
|
1509
1513
|
.,.,
|
1510
1514
|
|
1511
|
-
module_eval(<<'.,.,', 'parser.y',
|
1515
|
+
module_eval(<<'.,.,', 'parser.y', 334)
|
1512
1516
|
def _reduce_122(val, _values, result)
|
1513
1517
|
result = uoa(val[0][0].change(:day => val[2]), val[4], [:day])
|
1514
1518
|
|
@@ -1516,7 +1520,7 @@ module_eval(<<'.,.,', 'parser.y', 336)
|
|
1516
1520
|
end
|
1517
1521
|
.,.,
|
1518
1522
|
|
1519
|
-
module_eval(<<'.,.,', 'parser.y',
|
1523
|
+
module_eval(<<'.,.,', 'parser.y', 337)
|
1520
1524
|
def _reduce_123(val, _values, result)
|
1521
1525
|
result = uoa(uoa(Date.new(val[0], val[2], val[5]), val[4], :month), val[6], :day)
|
1522
1526
|
|
@@ -1524,7 +1528,7 @@ module_eval(<<'.,.,', 'parser.y', 339)
|
|
1524
1528
|
end
|
1525
1529
|
.,.,
|
1526
1530
|
|
1527
|
-
module_eval(<<'.,.,', 'parser.y',
|
1531
|
+
module_eval(<<'.,.,', 'parser.y', 340)
|
1528
1532
|
def _reduce_124(val, _values, result)
|
1529
1533
|
result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[3])
|
1530
1534
|
|
@@ -1532,7 +1536,7 @@ module_eval(<<'.,.,', 'parser.y', 342)
|
|
1532
1536
|
end
|
1533
1537
|
.,.,
|
1534
1538
|
|
1535
|
-
module_eval(<<'.,.,', 'parser.y',
|
1539
|
+
module_eval(<<'.,.,', 'parser.y', 343)
|
1536
1540
|
def _reduce_125(val, _values, result)
|
1537
1541
|
result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[4], [:day])
|
1538
1542
|
|
@@ -1540,7 +1544,7 @@ module_eval(<<'.,.,', 'parser.y', 345)
|
|
1540
1544
|
end
|
1541
1545
|
.,.,
|
1542
1546
|
|
1543
|
-
module_eval(<<'.,.,', 'parser.y',
|
1547
|
+
module_eval(<<'.,.,', 'parser.y', 346)
|
1544
1548
|
def _reduce_126(val, _values, result)
|
1545
1549
|
result = uoa(Date.new(val[0], val[2], val[4]), val[6], [:month, :day])
|
1546
1550
|
|
@@ -1548,7 +1552,7 @@ module_eval(<<'.,.,', 'parser.y', 348)
|
|
1548
1552
|
end
|
1549
1553
|
.,.,
|
1550
1554
|
|
1551
|
-
module_eval(<<'.,.,', 'parser.y',
|
1555
|
+
module_eval(<<'.,.,', 'parser.y', 349)
|
1552
1556
|
def _reduce_127(val, _values, result)
|
1553
1557
|
result = Date.new(val[0], val[2], val[4])
|
1554
1558
|
result = uoa(result, val[6], [:day])
|
@@ -1558,7 +1562,7 @@ module_eval(<<'.,.,', 'parser.y', 351)
|
|
1558
1562
|
end
|
1559
1563
|
.,.,
|
1560
1564
|
|
1561
|
-
module_eval(<<'.,.,', 'parser.y',
|
1565
|
+
module_eval(<<'.,.,', 'parser.y', 354)
|
1562
1566
|
def _reduce_128(val, _values, result)
|
1563
1567
|
result = val[0].change(:month => val[2], :day => val[4])
|
1564
1568
|
result = uoa(result, val[6], [:month, :day])
|
@@ -1567,7 +1571,7 @@ module_eval(<<'.,.,', 'parser.y', 356)
|
|
1567
1571
|
end
|
1568
1572
|
.,.,
|
1569
1573
|
|
1570
|
-
module_eval(<<'.,.,', 'parser.y',
|
1574
|
+
module_eval(<<'.,.,', 'parser.y', 358)
|
1571
1575
|
def _reduce_129(val, _values, result)
|
1572
1576
|
result = val[0].change(:month => val[2], :day => val[4])
|
1573
1577
|
result = uoa(result, val[6], [:day])
|
@@ -1577,7 +1581,7 @@ module_eval(<<'.,.,', 'parser.y', 360)
|
|
1577
1581
|
end
|
1578
1582
|
.,.,
|
1579
1583
|
|
1580
|
-
module_eval(<<'.,.,', 'parser.y',
|
1584
|
+
module_eval(<<'.,.,', 'parser.y', 369)
|
1581
1585
|
def _reduce_130(val, _values, result)
|
1582
1586
|
result = []
|
1583
1587
|
result
|
@@ -1586,7 +1590,7 @@ module_eval(<<'.,.,', 'parser.y', 371)
|
|
1586
1590
|
|
1587
1591
|
# reduce 131 omitted
|
1588
1592
|
|
1589
|
-
module_eval(<<'.,.,', 'parser.y',
|
1593
|
+
module_eval(<<'.,.,', 'parser.y', 373)
|
1590
1594
|
def _reduce_132(val, _values, result)
|
1591
1595
|
result = 0
|
1592
1596
|
result
|
@@ -1613,28 +1617,28 @@ module_eval(<<'.,.,', 'parser.y', 375)
|
|
1613
1617
|
|
1614
1618
|
# reduce 142 omitted
|
1615
1619
|
|
1616
|
-
module_eval(<<'.,.,', 'parser.y',
|
1620
|
+
module_eval(<<'.,.,', 'parser.y', 379)
|
1617
1621
|
def _reduce_143(val, _values, result)
|
1618
1622
|
result = val[1]
|
1619
1623
|
result
|
1620
1624
|
end
|
1621
1625
|
.,.,
|
1622
1626
|
|
1623
|
-
module_eval(<<'.,.,', 'parser.y',
|
1627
|
+
module_eval(<<'.,.,', 'parser.y', 380)
|
1624
1628
|
def _reduce_144(val, _values, result)
|
1625
1629
|
result = 10
|
1626
1630
|
result
|
1627
1631
|
end
|
1628
1632
|
.,.,
|
1629
1633
|
|
1630
|
-
module_eval(<<'.,.,', 'parser.y',
|
1634
|
+
module_eval(<<'.,.,', 'parser.y', 381)
|
1631
1635
|
def _reduce_145(val, _values, result)
|
1632
1636
|
result = 11
|
1633
1637
|
result
|
1634
1638
|
end
|
1635
1639
|
.,.,
|
1636
1640
|
|
1637
|
-
module_eval(<<'.,.,', 'parser.y',
|
1641
|
+
module_eval(<<'.,.,', 'parser.y', 382)
|
1638
1642
|
def _reduce_146(val, _values, result)
|
1639
1643
|
result = 12
|
1640
1644
|
result
|
@@ -1643,49 +1647,49 @@ module_eval(<<'.,.,', 'parser.y', 384)
|
|
1643
1647
|
|
1644
1648
|
# reduce 147 omitted
|
1645
1649
|
|
1646
|
-
module_eval(<<'.,.,', 'parser.y',
|
1650
|
+
module_eval(<<'.,.,', 'parser.y', 386)
|
1647
1651
|
def _reduce_148(val, _values, result)
|
1648
1652
|
result = 13
|
1649
1653
|
result
|
1650
1654
|
end
|
1651
1655
|
.,.,
|
1652
1656
|
|
1653
|
-
module_eval(<<'.,.,', 'parser.y',
|
1657
|
+
module_eval(<<'.,.,', 'parser.y', 389)
|
1654
1658
|
def _reduce_149(val, _values, result)
|
1655
1659
|
result = val[1]
|
1656
1660
|
result
|
1657
1661
|
end
|
1658
1662
|
.,.,
|
1659
1663
|
|
1660
|
-
module_eval(<<'.,.,', 'parser.y',
|
1664
|
+
module_eval(<<'.,.,', 'parser.y', 390)
|
1661
1665
|
def _reduce_150(val, _values, result)
|
1662
1666
|
result = 10 + val[1]
|
1663
1667
|
result
|
1664
1668
|
end
|
1665
1669
|
.,.,
|
1666
1670
|
|
1667
|
-
module_eval(<<'.,.,', 'parser.y',
|
1671
|
+
module_eval(<<'.,.,', 'parser.y', 391)
|
1668
1672
|
def _reduce_151(val, _values, result)
|
1669
1673
|
result = 20
|
1670
1674
|
result
|
1671
1675
|
end
|
1672
1676
|
.,.,
|
1673
1677
|
|
1674
|
-
module_eval(<<'.,.,', 'parser.y',
|
1678
|
+
module_eval(<<'.,.,', 'parser.y', 392)
|
1675
1679
|
def _reduce_152(val, _values, result)
|
1676
1680
|
result = 21
|
1677
1681
|
result
|
1678
1682
|
end
|
1679
1683
|
.,.,
|
1680
1684
|
|
1681
|
-
module_eval(<<'.,.,', 'parser.y',
|
1685
|
+
module_eval(<<'.,.,', 'parser.y', 393)
|
1682
1686
|
def _reduce_153(val, _values, result)
|
1683
1687
|
result = 22
|
1684
1688
|
result
|
1685
1689
|
end
|
1686
1690
|
.,.,
|
1687
1691
|
|
1688
|
-
module_eval(<<'.,.,', 'parser.y',
|
1692
|
+
module_eval(<<'.,.,', 'parser.y', 394)
|
1689
1693
|
def _reduce_154(val, _values, result)
|
1690
1694
|
result = 23
|
1691
1695
|
result
|
@@ -1698,42 +1702,42 @@ module_eval(<<'.,.,', 'parser.y', 396)
|
|
1698
1702
|
|
1699
1703
|
# reduce 157 omitted
|
1700
1704
|
|
1701
|
-
module_eval(<<'.,.,', 'parser.y',
|
1705
|
+
module_eval(<<'.,.,', 'parser.y', 402)
|
1702
1706
|
def _reduce_158(val, _values, result)
|
1703
1707
|
result = 24
|
1704
1708
|
result
|
1705
1709
|
end
|
1706
1710
|
.,.,
|
1707
1711
|
|
1708
|
-
module_eval(<<'.,.,', 'parser.y',
|
1712
|
+
module_eval(<<'.,.,', 'parser.y', 403)
|
1709
1713
|
def _reduce_159(val, _values, result)
|
1710
1714
|
result = 25
|
1711
1715
|
result
|
1712
1716
|
end
|
1713
1717
|
.,.,
|
1714
1718
|
|
1715
|
-
module_eval(<<'.,.,', 'parser.y',
|
1719
|
+
module_eval(<<'.,.,', 'parser.y', 404)
|
1716
1720
|
def _reduce_160(val, _values, result)
|
1717
1721
|
result = 26
|
1718
1722
|
result
|
1719
1723
|
end
|
1720
1724
|
.,.,
|
1721
1725
|
|
1722
|
-
module_eval(<<'.,.,', 'parser.y',
|
1726
|
+
module_eval(<<'.,.,', 'parser.y', 405)
|
1723
1727
|
def _reduce_161(val, _values, result)
|
1724
1728
|
result = 27
|
1725
1729
|
result
|
1726
1730
|
end
|
1727
1731
|
.,.,
|
1728
1732
|
|
1729
|
-
module_eval(<<'.,.,', 'parser.y',
|
1733
|
+
module_eval(<<'.,.,', 'parser.y', 406)
|
1730
1734
|
def _reduce_162(val, _values, result)
|
1731
1735
|
result = 28
|
1732
1736
|
result
|
1733
1737
|
end
|
1734
1738
|
.,.,
|
1735
1739
|
|
1736
|
-
module_eval(<<'.,.,', 'parser.y',
|
1740
|
+
module_eval(<<'.,.,', 'parser.y', 407)
|
1737
1741
|
def _reduce_163(val, _values, result)
|
1738
1742
|
result = 29
|
1739
1743
|
result
|
@@ -1742,7 +1746,7 @@ module_eval(<<'.,.,', 'parser.y', 409)
|
|
1742
1746
|
|
1743
1747
|
# reduce 164 omitted
|
1744
1748
|
|
1745
|
-
module_eval(<<'.,.,', 'parser.y',
|
1749
|
+
module_eval(<<'.,.,', 'parser.y', 411)
|
1746
1750
|
def _reduce_165(val, _values, result)
|
1747
1751
|
result = 30
|
1748
1752
|
result
|
@@ -1751,7 +1755,7 @@ module_eval(<<'.,.,', 'parser.y', 413)
|
|
1751
1755
|
|
1752
1756
|
# reduce 166 omitted
|
1753
1757
|
|
1754
|
-
module_eval(<<'.,.,', 'parser.y',
|
1758
|
+
module_eval(<<'.,.,', 'parser.y', 415)
|
1755
1759
|
def _reduce_167(val, _values, result)
|
1756
1760
|
result = 31
|
1757
1761
|
result
|
@@ -1760,21 +1764,21 @@ module_eval(<<'.,.,', 'parser.y', 417)
|
|
1760
1764
|
|
1761
1765
|
# reduce 168 omitted
|
1762
1766
|
|
1763
|
-
module_eval(<<'.,.,', 'parser.y',
|
1767
|
+
module_eval(<<'.,.,', 'parser.y', 419)
|
1764
1768
|
def _reduce_169(val, _values, result)
|
1765
1769
|
result = 30 + val[1]
|
1766
1770
|
result
|
1767
1771
|
end
|
1768
1772
|
.,.,
|
1769
1773
|
|
1770
|
-
module_eval(<<'.,.,', 'parser.y',
|
1774
|
+
module_eval(<<'.,.,', 'parser.y', 420)
|
1771
1775
|
def _reduce_170(val, _values, result)
|
1772
1776
|
result = 40 + val[1]
|
1773
1777
|
result
|
1774
1778
|
end
|
1775
1779
|
.,.,
|
1776
1780
|
|
1777
|
-
module_eval(<<'.,.,', 'parser.y',
|
1781
|
+
module_eval(<<'.,.,', 'parser.y', 421)
|
1778
1782
|
def _reduce_171(val, _values, result)
|
1779
1783
|
result = 50 + val[1]
|
1780
1784
|
result
|
@@ -1785,21 +1789,21 @@ module_eval(<<'.,.,', 'parser.y', 423)
|
|
1785
1789
|
|
1786
1790
|
# reduce 173 omitted
|
1787
1791
|
|
1788
|
-
module_eval(<<'.,.,', 'parser.y',
|
1792
|
+
module_eval(<<'.,.,', 'parser.y', 428)
|
1789
1793
|
def _reduce_174(val, _values, result)
|
1790
1794
|
result = val[0]
|
1791
1795
|
result
|
1792
1796
|
end
|
1793
1797
|
.,.,
|
1794
1798
|
|
1795
|
-
module_eval(<<'.,.,', 'parser.y',
|
1799
|
+
module_eval(<<'.,.,', 'parser.y', 429)
|
1796
1800
|
def _reduce_175(val, _values, result)
|
1797
1801
|
result = 10 * val[0] + val[1]
|
1798
1802
|
result
|
1799
1803
|
end
|
1800
1804
|
.,.,
|
1801
1805
|
|
1802
|
-
module_eval(<<'.,.,', 'parser.y',
|
1806
|
+
module_eval(<<'.,.,', 'parser.y', 432)
|
1803
1807
|
def _reduce_176(val, _values, result)
|
1804
1808
|
result = val.zip([100,10,1]).reduce(0) { |s,(a,b)| s += a * b }
|
1805
1809
|
|
@@ -1807,7 +1811,7 @@ module_eval(<<'.,.,', 'parser.y', 434)
|
|
1807
1811
|
end
|
1808
1812
|
.,.,
|
1809
1813
|
|
1810
|
-
module_eval(<<'.,.,', 'parser.y',
|
1814
|
+
module_eval(<<'.,.,', 'parser.y', 436)
|
1811
1815
|
def _reduce_177(val, _values, result)
|
1812
1816
|
result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b }
|
1813
1817
|
|
@@ -1815,14 +1819,14 @@ module_eval(<<'.,.,', 'parser.y', 438)
|
|
1815
1819
|
end
|
1816
1820
|
.,.,
|
1817
1821
|
|
1818
|
-
module_eval(<<'.,.,', 'parser.y',
|
1822
|
+
module_eval(<<'.,.,', 'parser.y', 440)
|
1819
1823
|
def _reduce_178(val, _values, result)
|
1820
1824
|
result = val[0]
|
1821
1825
|
result
|
1822
1826
|
end
|
1823
1827
|
.,.,
|
1824
1828
|
|
1825
|
-
module_eval(<<'.,.,', 'parser.y',
|
1829
|
+
module_eval(<<'.,.,', 'parser.y', 441)
|
1826
1830
|
def _reduce_179(val, _values, result)
|
1827
1831
|
result = 10 * val[0] + val[1]
|
1828
1832
|
result
|