regexp_parser 2.1.1 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -1
- data/LICENSE +1 -1
- data/README.md +17 -23
- data/Rakefile +10 -19
- data/lib/regexp_parser/expression/base.rb +123 -0
- data/lib/regexp_parser/expression/classes/anchor.rb +0 -2
- data/lib/regexp_parser/expression/classes/{backref.rb → backreference.rb} +0 -0
- data/lib/regexp_parser/expression/classes/{set → character_set}/intersection.rb +0 -0
- data/lib/regexp_parser/expression/classes/{set → character_set}/range.rb +0 -0
- data/lib/regexp_parser/expression/classes/{set.rb → character_set.rb} +0 -0
- data/lib/regexp_parser/expression/classes/{escape.rb → escape_sequence.rb} +13 -7
- data/lib/regexp_parser/expression/classes/free_space.rb +0 -2
- data/lib/regexp_parser/expression/classes/literal.rb +1 -5
- data/lib/regexp_parser/expression/classes/property.rb +0 -2
- data/lib/regexp_parser/expression/classes/root.rb +0 -1
- data/lib/regexp_parser/expression/classes/type.rb +0 -2
- data/lib/regexp_parser/expression/methods/strfregexp.rb +1 -1
- data/lib/regexp_parser/expression/quantifier.rb +1 -1
- data/lib/regexp_parser/expression/sequence.rb +0 -1
- data/lib/regexp_parser/expression/subexpression.rb +0 -1
- data/lib/regexp_parser/expression.rb +6 -130
- data/lib/regexp_parser/lexer.rb +7 -5
- data/lib/regexp_parser/scanner/properties/long.csv +604 -0
- data/lib/regexp_parser/scanner/properties/short.csv +242 -0
- data/lib/regexp_parser/scanner/scanner.rl +6 -4
- data/lib/regexp_parser/scanner.rb +126 -124
- data/lib/regexp_parser/syntax/any.rb +1 -3
- data/lib/regexp_parser/syntax/base.rb +12 -14
- data/lib/regexp_parser/syntax/token/anchor.rb +15 -0
- data/lib/regexp_parser/syntax/{tokens → token}/assertion.rb +2 -2
- data/lib/regexp_parser/syntax/token/backreference.rb +30 -0
- data/lib/regexp_parser/syntax/{tokens → token}/character_set.rb +2 -2
- data/lib/regexp_parser/syntax/{tokens → token}/character_type.rb +3 -3
- data/lib/regexp_parser/syntax/{tokens → token}/conditional.rb +3 -3
- data/lib/regexp_parser/syntax/token/escape.rb +31 -0
- data/lib/regexp_parser/syntax/{tokens → token}/group.rb +7 -7
- data/lib/regexp_parser/syntax/{tokens → token}/keep.rb +1 -1
- data/lib/regexp_parser/syntax/{tokens → token}/meta.rb +2 -2
- data/lib/regexp_parser/syntax/{tokens → token}/posix_class.rb +3 -3
- data/lib/regexp_parser/syntax/token/quantifier.rb +35 -0
- data/lib/regexp_parser/syntax/token/unicode_property.rb +696 -0
- data/lib/regexp_parser/syntax/token.rb +45 -0
- data/lib/regexp_parser/syntax/versions/1.8.6.rb +2 -2
- data/lib/regexp_parser/syntax/versions/1.9.1.rb +1 -1
- data/lib/regexp_parser/syntax/versions/3.1.0.rb +10 -0
- data/lib/regexp_parser/syntax.rb +1 -1
- data/lib/regexp_parser/token.rb +9 -20
- data/lib/regexp_parser/version.rb +1 -1
- data/lib/regexp_parser.rb +0 -2
- data/regexp_parser.gemspec +20 -22
- metadata +32 -164
- data/lib/regexp_parser/scanner/properties/long.yml +0 -594
- data/lib/regexp_parser/scanner/properties/short.yml +0 -237
- data/lib/regexp_parser/syntax/tokens/anchor.rb +0 -15
- data/lib/regexp_parser/syntax/tokens/backref.rb +0 -24
- data/lib/regexp_parser/syntax/tokens/escape.rb +0 -30
- data/lib/regexp_parser/syntax/tokens/quantifier.rb +0 -35
- data/lib/regexp_parser/syntax/tokens/unicode_property.rb +0 -675
- data/lib/regexp_parser/syntax/tokens.rb +0 -45
- data/spec/expression/base_spec.rb +0 -104
- data/spec/expression/clone_spec.rb +0 -152
- data/spec/expression/conditional_spec.rb +0 -89
- data/spec/expression/free_space_spec.rb +0 -27
- data/spec/expression/methods/match_length_spec.rb +0 -161
- data/spec/expression/methods/match_spec.rb +0 -25
- data/spec/expression/methods/strfregexp_spec.rb +0 -224
- data/spec/expression/methods/tests_spec.rb +0 -99
- data/spec/expression/methods/traverse_spec.rb +0 -161
- data/spec/expression/options_spec.rb +0 -128
- data/spec/expression/subexpression_spec.rb +0 -50
- data/spec/expression/to_h_spec.rb +0 -26
- data/spec/expression/to_s_spec.rb +0 -108
- data/spec/lexer/all_spec.rb +0 -22
- data/spec/lexer/conditionals_spec.rb +0 -53
- data/spec/lexer/delimiters_spec.rb +0 -68
- data/spec/lexer/escapes_spec.rb +0 -14
- data/spec/lexer/keep_spec.rb +0 -10
- data/spec/lexer/literals_spec.rb +0 -64
- data/spec/lexer/nesting_spec.rb +0 -99
- data/spec/lexer/refcalls_spec.rb +0 -60
- data/spec/parser/all_spec.rb +0 -43
- data/spec/parser/alternation_spec.rb +0 -88
- data/spec/parser/anchors_spec.rb +0 -17
- data/spec/parser/conditionals_spec.rb +0 -179
- data/spec/parser/errors_spec.rb +0 -30
- data/spec/parser/escapes_spec.rb +0 -121
- data/spec/parser/free_space_spec.rb +0 -130
- data/spec/parser/groups_spec.rb +0 -108
- data/spec/parser/keep_spec.rb +0 -6
- data/spec/parser/options_spec.rb +0 -28
- data/spec/parser/posix_classes_spec.rb +0 -8
- data/spec/parser/properties_spec.rb +0 -115
- data/spec/parser/quantifiers_spec.rb +0 -68
- data/spec/parser/refcalls_spec.rb +0 -117
- data/spec/parser/set/intersections_spec.rb +0 -127
- data/spec/parser/set/ranges_spec.rb +0 -111
- data/spec/parser/sets_spec.rb +0 -178
- data/spec/parser/types_spec.rb +0 -18
- data/spec/scanner/all_spec.rb +0 -18
- data/spec/scanner/anchors_spec.rb +0 -21
- data/spec/scanner/conditionals_spec.rb +0 -128
- data/spec/scanner/delimiters_spec.rb +0 -52
- data/spec/scanner/errors_spec.rb +0 -67
- data/spec/scanner/escapes_spec.rb +0 -64
- data/spec/scanner/free_space_spec.rb +0 -165
- data/spec/scanner/groups_spec.rb +0 -61
- data/spec/scanner/keep_spec.rb +0 -10
- data/spec/scanner/literals_spec.rb +0 -39
- data/spec/scanner/meta_spec.rb +0 -18
- data/spec/scanner/options_spec.rb +0 -36
- data/spec/scanner/properties_spec.rb +0 -64
- data/spec/scanner/quantifiers_spec.rb +0 -25
- data/spec/scanner/refcalls_spec.rb +0 -55
- data/spec/scanner/sets_spec.rb +0 -151
- data/spec/scanner/types_spec.rb +0 -14
- data/spec/spec_helper.rb +0 -16
- data/spec/support/runner.rb +0 -42
- data/spec/support/shared_examples.rb +0 -77
- data/spec/support/warning_extractor.rb +0 -60
- data/spec/syntax/syntax_spec.rb +0 -48
- data/spec/syntax/syntax_token_map_spec.rb +0 -23
- data/spec/syntax/versions/1.8.6_spec.rb +0 -17
- data/spec/syntax/versions/1.9.1_spec.rb +0 -10
- data/spec/syntax/versions/1.9.3_spec.rb +0 -9
- data/spec/syntax/versions/2.0.0_spec.rb +0 -13
- data/spec/syntax/versions/2.2.0_spec.rb +0 -9
- data/spec/syntax/versions/aliases_spec.rb +0 -37
- data/spec/token/token_spec.rb +0 -85
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- warn-indent:false; -*-
|
2
2
|
|
3
|
-
# line 1 "/Users/
|
3
|
+
# line 1 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
4
4
|
|
5
|
-
# line 649 "/Users/
|
5
|
+
# line 649 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
6
6
|
|
7
7
|
|
8
8
|
# THIS IS A GENERATED FILE, DO NOT EDIT DIRECTLY
|
@@ -93,7 +93,7 @@ class Regexp::Scanner
|
|
93
93
|
self.char_pos = 0
|
94
94
|
|
95
95
|
|
96
|
-
# line 96 "/Users/
|
96
|
+
# line 96 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
97
97
|
class << self
|
98
98
|
attr_accessor :_re_scanner_trans_keys
|
99
99
|
private :_re_scanner_trans_keys, :_re_scanner_trans_keys=
|
@@ -1072,9 +1072,9 @@ end
|
|
1072
1072
|
self.re_scanner_en_main = 119;
|
1073
1073
|
|
1074
1074
|
|
1075
|
-
# line 739 "/Users/
|
1075
|
+
# line 739 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1076
1076
|
|
1077
|
-
# line 1077 "/Users/
|
1077
|
+
# line 1077 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
1078
1078
|
begin
|
1079
1079
|
p ||= 0
|
1080
1080
|
pe ||= data.length
|
@@ -1085,9 +1085,9 @@ begin
|
|
1085
1085
|
act = 0
|
1086
1086
|
end
|
1087
1087
|
|
1088
|
-
# line 740 "/Users/
|
1088
|
+
# line 740 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1089
1089
|
|
1090
|
-
# line 1090 "/Users/
|
1090
|
+
# line 1090 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
1091
1091
|
begin
|
1092
1092
|
testEof = false
|
1093
1093
|
_slen, _trans, _keys, _inds, _acts, _nacts = nil
|
@@ -1115,7 +1115,7 @@ begin
|
|
1115
1115
|
begin
|
1116
1116
|
ts = p
|
1117
1117
|
end
|
1118
|
-
# line 1118 "/Users/
|
1118
|
+
# line 1118 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
1119
1119
|
end
|
1120
1120
|
_keys = cs << 1
|
1121
1121
|
_inds = _re_scanner_index_offsets[cs]
|
@@ -1135,11 +1135,11 @@ ts = p
|
|
1135
1135
|
if _re_scanner_trans_actions[_trans] != 0
|
1136
1136
|
case _re_scanner_trans_actions[_trans]
|
1137
1137
|
when 35 then
|
1138
|
-
# line 159 "/Users/
|
1138
|
+
# line 159 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1139
1139
|
begin
|
1140
1140
|
self.group_depth = group_depth + 1 end
|
1141
1141
|
when 4 then
|
1142
|
-
# line 160 "/Users/
|
1142
|
+
# line 160 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1143
1143
|
begin
|
1144
1144
|
self.group_depth = group_depth - 1 end
|
1145
1145
|
when 39 then
|
@@ -1148,7 +1148,7 @@ ts = p
|
|
1148
1148
|
te = p+1
|
1149
1149
|
end
|
1150
1150
|
when 67 then
|
1151
|
-
# line 12 "/Users/
|
1151
|
+
# line 12 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/char_type.rl"
|
1152
1152
|
begin
|
1153
1153
|
te = p+1
|
1154
1154
|
begin
|
@@ -1174,7 +1174,7 @@ te = p+1
|
|
1174
1174
|
end
|
1175
1175
|
end
|
1176
1176
|
when 13 then
|
1177
|
-
# line 16 "/Users/
|
1177
|
+
# line 16 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/property.rl"
|
1178
1178
|
begin
|
1179
1179
|
te = p+1
|
1180
1180
|
begin
|
@@ -1198,7 +1198,7 @@ te = p+1
|
|
1198
1198
|
end
|
1199
1199
|
end
|
1200
1200
|
when 17 then
|
1201
|
-
# line 187 "/Users/
|
1201
|
+
# line 187 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1202
1202
|
begin
|
1203
1203
|
te = p+1
|
1204
1204
|
begin # special case, emits two tokens
|
@@ -1207,7 +1207,7 @@ te = p+1
|
|
1207
1207
|
end
|
1208
1208
|
end
|
1209
1209
|
when 72 then
|
1210
|
-
# line 192 "/Users/
|
1210
|
+
# line 192 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1211
1211
|
begin
|
1212
1212
|
te = p+1
|
1213
1213
|
begin
|
@@ -1220,7 +1220,7 @@ te = p+1
|
|
1220
1220
|
end
|
1221
1221
|
end
|
1222
1222
|
when 74 then
|
1223
|
-
# line 213 "/Users/
|
1223
|
+
# line 213 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1224
1224
|
begin
|
1225
1225
|
te = p+1
|
1226
1226
|
begin
|
@@ -1228,7 +1228,7 @@ te = p+1
|
|
1228
1228
|
end
|
1229
1229
|
end
|
1230
1230
|
when 70 then
|
1231
|
-
# line 217 "/Users/
|
1231
|
+
# line 217 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1232
1232
|
begin
|
1233
1233
|
te = p+1
|
1234
1234
|
begin
|
@@ -1243,7 +1243,7 @@ te = p+1
|
|
1243
1243
|
end
|
1244
1244
|
end
|
1245
1245
|
when 68 then
|
1246
|
-
# line 247 "/Users/
|
1246
|
+
# line 247 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1247
1247
|
begin
|
1248
1248
|
te = p+1
|
1249
1249
|
begin
|
@@ -1251,7 +1251,7 @@ te = p+1
|
|
1251
1251
|
end
|
1252
1252
|
end
|
1253
1253
|
when 15 then
|
1254
|
-
# line 251 "/Users/
|
1254
|
+
# line 251 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1255
1255
|
begin
|
1256
1256
|
te = p+1
|
1257
1257
|
begin
|
@@ -1260,7 +1260,7 @@ te = p+1
|
|
1260
1260
|
end
|
1261
1261
|
end
|
1262
1262
|
when 75 then
|
1263
|
-
# line 201 "/Users/
|
1263
|
+
# line 201 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1264
1264
|
begin
|
1265
1265
|
te = p
|
1266
1266
|
p = p - 1; begin
|
@@ -1274,7 +1274,7 @@ p = p - 1; begin
|
|
1274
1274
|
end
|
1275
1275
|
end
|
1276
1276
|
when 78 then
|
1277
|
-
# line 221 "/Users/
|
1277
|
+
# line 221 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1278
1278
|
begin
|
1279
1279
|
te = p
|
1280
1280
|
p = p - 1; begin
|
@@ -1290,7 +1290,7 @@ p = p - 1; begin
|
|
1290
1290
|
end
|
1291
1291
|
end
|
1292
1292
|
when 73 then
|
1293
|
-
# line 251 "/Users/
|
1293
|
+
# line 251 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1294
1294
|
begin
|
1295
1295
|
te = p
|
1296
1296
|
p = p - 1; begin
|
@@ -1299,7 +1299,7 @@ p = p - 1; begin
|
|
1299
1299
|
end
|
1300
1300
|
end
|
1301
1301
|
when 16 then
|
1302
|
-
# line 201 "/Users/
|
1302
|
+
# line 201 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1303
1303
|
begin
|
1304
1304
|
begin p = ((te))-1; end
|
1305
1305
|
begin
|
@@ -1313,7 +1313,7 @@ p = p - 1; begin
|
|
1313
1313
|
end
|
1314
1314
|
end
|
1315
1315
|
when 19 then
|
1316
|
-
# line 221 "/Users/
|
1316
|
+
# line 221 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1317
1317
|
begin
|
1318
1318
|
begin p = ((te))-1; end
|
1319
1319
|
begin
|
@@ -1329,7 +1329,7 @@ p = p - 1; begin
|
|
1329
1329
|
end
|
1330
1330
|
end
|
1331
1331
|
when 14 then
|
1332
|
-
# line 251 "/Users/
|
1332
|
+
# line 251 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1333
1333
|
begin
|
1334
1334
|
begin p = ((te))-1; end
|
1335
1335
|
begin
|
@@ -1338,7 +1338,7 @@ p = p - 1; begin
|
|
1338
1338
|
end
|
1339
1339
|
end
|
1340
1340
|
when 80 then
|
1341
|
-
# line 260 "/Users/
|
1341
|
+
# line 260 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1342
1342
|
begin
|
1343
1343
|
te = p+1
|
1344
1344
|
begin
|
@@ -1355,7 +1355,7 @@ te = p+1
|
|
1355
1355
|
end
|
1356
1356
|
end
|
1357
1357
|
when 79 then
|
1358
|
-
# line 266 "/Users/
|
1358
|
+
# line 266 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1359
1359
|
begin
|
1360
1360
|
te = p+1
|
1361
1361
|
begin
|
@@ -1370,7 +1370,7 @@ te = p+1
|
|
1370
1370
|
end
|
1371
1371
|
end
|
1372
1372
|
when 84 then
|
1373
|
-
# line 276 "/Users/
|
1373
|
+
# line 276 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1374
1374
|
begin
|
1375
1375
|
te = p+1
|
1376
1376
|
begin
|
@@ -1386,7 +1386,7 @@ te = p+1
|
|
1386
1386
|
end
|
1387
1387
|
end
|
1388
1388
|
when 91 then
|
1389
|
-
# line 282 "/Users/
|
1389
|
+
# line 282 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1390
1390
|
begin
|
1391
1391
|
te = p+1
|
1392
1392
|
begin
|
@@ -1401,7 +1401,7 @@ te = p+1
|
|
1401
1401
|
end
|
1402
1402
|
end
|
1403
1403
|
when 81 then
|
1404
|
-
# line 287 "/Users/
|
1404
|
+
# line 287 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1405
1405
|
begin
|
1406
1406
|
te = p+1
|
1407
1407
|
begin
|
@@ -1432,7 +1432,7 @@ te = p+1
|
|
1432
1432
|
end
|
1433
1433
|
end
|
1434
1434
|
when 87 then
|
1435
|
-
# line 308 "/Users/
|
1435
|
+
# line 308 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1436
1436
|
begin
|
1437
1437
|
te = p+1
|
1438
1438
|
begin
|
@@ -1458,7 +1458,7 @@ te = p+1
|
|
1458
1458
|
end
|
1459
1459
|
end
|
1460
1460
|
when 28 then
|
1461
|
-
# line 324 "/Users/
|
1461
|
+
# line 324 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1462
1462
|
begin
|
1463
1463
|
te = p+1
|
1464
1464
|
begin
|
@@ -1478,7 +1478,7 @@ te = p+1
|
|
1478
1478
|
end
|
1479
1479
|
end
|
1480
1480
|
when 97 then
|
1481
|
-
# line 334 "/Users/
|
1481
|
+
# line 334 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1482
1482
|
begin
|
1483
1483
|
te = p+1
|
1484
1484
|
begin
|
@@ -1493,7 +1493,7 @@ te = p+1
|
|
1493
1493
|
end
|
1494
1494
|
end
|
1495
1495
|
when 24 then
|
1496
|
-
# line 343 "/Users/
|
1496
|
+
# line 343 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1497
1497
|
begin
|
1498
1498
|
te = p+1
|
1499
1499
|
begin
|
@@ -1508,7 +1508,7 @@ te = p+1
|
|
1508
1508
|
end
|
1509
1509
|
end
|
1510
1510
|
when 26 then
|
1511
|
-
# line 348 "/Users/
|
1511
|
+
# line 348 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1512
1512
|
begin
|
1513
1513
|
te = p+1
|
1514
1514
|
begin
|
@@ -1523,7 +1523,7 @@ te = p+1
|
|
1523
1523
|
end
|
1524
1524
|
end
|
1525
1525
|
when 85 then
|
1526
|
-
# line 353 "/Users/
|
1526
|
+
# line 353 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1527
1527
|
begin
|
1528
1528
|
te = p+1
|
1529
1529
|
begin
|
@@ -1540,7 +1540,7 @@ te = p+1
|
|
1540
1540
|
end
|
1541
1541
|
end
|
1542
1542
|
when 86 then
|
1543
|
-
# line 359 "/Users/
|
1543
|
+
# line 359 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1544
1544
|
begin
|
1545
1545
|
te = p+1
|
1546
1546
|
begin
|
@@ -1557,7 +1557,7 @@ te = p+1
|
|
1557
1557
|
end
|
1558
1558
|
end
|
1559
1559
|
when 22 then
|
1560
|
-
# line 365 "/Users/
|
1560
|
+
# line 365 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1561
1561
|
begin
|
1562
1562
|
te = p+1
|
1563
1563
|
begin
|
@@ -1572,7 +1572,7 @@ te = p+1
|
|
1572
1572
|
end
|
1573
1573
|
end
|
1574
1574
|
when 90 then
|
1575
|
-
# line 282 "/Users/
|
1575
|
+
# line 282 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1576
1576
|
begin
|
1577
1577
|
te = p
|
1578
1578
|
p = p - 1; begin
|
@@ -1587,7 +1587,7 @@ p = p - 1; begin
|
|
1587
1587
|
end
|
1588
1588
|
end
|
1589
1589
|
when 96 then
|
1590
|
-
# line 334 "/Users/
|
1590
|
+
# line 334 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1591
1591
|
begin
|
1592
1592
|
te = p
|
1593
1593
|
p = p - 1; begin
|
@@ -1602,7 +1602,7 @@ p = p - 1; begin
|
|
1602
1602
|
end
|
1603
1603
|
end
|
1604
1604
|
when 93 then
|
1605
|
-
# line 343 "/Users/
|
1605
|
+
# line 343 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1606
1606
|
begin
|
1607
1607
|
te = p
|
1608
1608
|
p = p - 1; begin
|
@@ -1617,7 +1617,7 @@ p = p - 1; begin
|
|
1617
1617
|
end
|
1618
1618
|
end
|
1619
1619
|
when 95 then
|
1620
|
-
# line 348 "/Users/
|
1620
|
+
# line 348 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1621
1621
|
begin
|
1622
1622
|
te = p
|
1623
1623
|
p = p - 1; begin
|
@@ -1632,7 +1632,7 @@ p = p - 1; begin
|
|
1632
1632
|
end
|
1633
1633
|
end
|
1634
1634
|
when 88 then
|
1635
|
-
# line 365 "/Users/
|
1635
|
+
# line 365 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1636
1636
|
begin
|
1637
1637
|
te = p
|
1638
1638
|
p = p - 1; begin
|
@@ -1647,7 +1647,7 @@ p = p - 1; begin
|
|
1647
1647
|
end
|
1648
1648
|
end
|
1649
1649
|
when 21 then
|
1650
|
-
# line 365 "/Users/
|
1650
|
+
# line 365 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1651
1651
|
begin
|
1652
1652
|
begin p = ((te))-1; end
|
1653
1653
|
begin
|
@@ -1693,7 +1693,7 @@ p = p - 1; begin
|
|
1693
1693
|
end
|
1694
1694
|
end
|
1695
1695
|
when 31 then
|
1696
|
-
# line 375 "/Users/
|
1696
|
+
# line 375 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1697
1697
|
begin
|
1698
1698
|
te = p+1
|
1699
1699
|
begin
|
@@ -1703,7 +1703,7 @@ te = p+1
|
|
1703
1703
|
end
|
1704
1704
|
end
|
1705
1705
|
when 98 then
|
1706
|
-
# line 381 "/Users/
|
1706
|
+
# line 381 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1707
1707
|
begin
|
1708
1708
|
te = p+1
|
1709
1709
|
begin
|
@@ -1719,7 +1719,7 @@ te = p+1
|
|
1719
1719
|
end
|
1720
1720
|
end
|
1721
1721
|
when 99 then
|
1722
|
-
# line 381 "/Users/
|
1722
|
+
# line 381 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1723
1723
|
begin
|
1724
1724
|
te = p
|
1725
1725
|
p = p - 1; begin
|
@@ -1735,7 +1735,7 @@ p = p - 1; begin
|
|
1735
1735
|
end
|
1736
1736
|
end
|
1737
1737
|
when 30 then
|
1738
|
-
# line 381 "/Users/
|
1738
|
+
# line 381 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1739
1739
|
begin
|
1740
1740
|
begin p = ((te))-1; end
|
1741
1741
|
begin
|
@@ -1751,7 +1751,7 @@ p = p - 1; begin
|
|
1751
1751
|
end
|
1752
1752
|
end
|
1753
1753
|
when 37 then
|
1754
|
-
# line 394 "/Users/
|
1754
|
+
# line 394 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1755
1755
|
begin
|
1756
1756
|
te = p+1
|
1757
1757
|
begin
|
@@ -1759,7 +1759,7 @@ te = p+1
|
|
1759
1759
|
end
|
1760
1760
|
end
|
1761
1761
|
when 42 then
|
1762
|
-
# line 398 "/Users/
|
1762
|
+
# line 398 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1763
1763
|
begin
|
1764
1764
|
te = p+1
|
1765
1765
|
begin
|
@@ -1771,7 +1771,7 @@ te = p+1
|
|
1771
1771
|
end
|
1772
1772
|
end
|
1773
1773
|
when 41 then
|
1774
|
-
# line 408 "/Users/
|
1774
|
+
# line 408 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1775
1775
|
begin
|
1776
1776
|
te = p+1
|
1777
1777
|
begin
|
@@ -1779,7 +1779,7 @@ te = p+1
|
|
1779
1779
|
end
|
1780
1780
|
end
|
1781
1781
|
when 34 then
|
1782
|
-
# line 412 "/Users/
|
1782
|
+
# line 412 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1783
1783
|
begin
|
1784
1784
|
te = p+1
|
1785
1785
|
begin
|
@@ -1787,7 +1787,7 @@ te = p+1
|
|
1787
1787
|
end
|
1788
1788
|
end
|
1789
1789
|
when 62 then
|
1790
|
-
# line 416 "/Users/
|
1790
|
+
# line 416 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1791
1791
|
begin
|
1792
1792
|
te = p+1
|
1793
1793
|
begin
|
@@ -1795,7 +1795,7 @@ te = p+1
|
|
1795
1795
|
end
|
1796
1796
|
end
|
1797
1797
|
when 61 then
|
1798
|
-
# line 420 "/Users/
|
1798
|
+
# line 420 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1799
1799
|
begin
|
1800
1800
|
te = p+1
|
1801
1801
|
begin
|
@@ -1810,7 +1810,7 @@ te = p+1
|
|
1810
1810
|
end
|
1811
1811
|
end
|
1812
1812
|
when 40 then
|
1813
|
-
# line 431 "/Users/
|
1813
|
+
# line 431 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1814
1814
|
begin
|
1815
1815
|
te = p+1
|
1816
1816
|
begin
|
@@ -1818,7 +1818,7 @@ te = p+1
|
|
1818
1818
|
end
|
1819
1819
|
end
|
1820
1820
|
when 51 then
|
1821
|
-
# line 446 "/Users/
|
1821
|
+
# line 446 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1822
1822
|
begin
|
1823
1823
|
te = p+1
|
1824
1824
|
begin
|
@@ -1839,7 +1839,7 @@ te = p+1
|
|
1839
1839
|
end
|
1840
1840
|
end
|
1841
1841
|
when 52 then
|
1842
|
-
# line 477 "/Users/
|
1842
|
+
# line 477 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1843
1843
|
begin
|
1844
1844
|
te = p+1
|
1845
1845
|
begin
|
@@ -1851,7 +1851,7 @@ te = p+1
|
|
1851
1851
|
end
|
1852
1852
|
end
|
1853
1853
|
when 50 then
|
1854
|
-
# line 491 "/Users/
|
1854
|
+
# line 491 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1855
1855
|
begin
|
1856
1856
|
te = p+1
|
1857
1857
|
begin
|
@@ -1864,7 +1864,7 @@ te = p+1
|
|
1864
1864
|
end
|
1865
1865
|
end
|
1866
1866
|
when 6 then
|
1867
|
-
# line 508 "/Users/
|
1867
|
+
# line 508 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1868
1868
|
begin
|
1869
1869
|
te = p+1
|
1870
1870
|
begin
|
@@ -1886,7 +1886,7 @@ te = p+1
|
|
1886
1886
|
end
|
1887
1887
|
end
|
1888
1888
|
when 10 then
|
1889
|
-
# line 549 "/Users/
|
1889
|
+
# line 549 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1890
1890
|
begin
|
1891
1891
|
te = p+1
|
1892
1892
|
begin
|
@@ -1907,7 +1907,7 @@ te = p+1
|
|
1907
1907
|
end
|
1908
1908
|
end
|
1909
1909
|
when 9 then
|
1910
|
-
# line 568 "/Users/
|
1910
|
+
# line 568 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1911
1911
|
begin
|
1912
1912
|
te = p+1
|
1913
1913
|
begin
|
@@ -1924,7 +1924,7 @@ te = p+1
|
|
1924
1924
|
end
|
1925
1925
|
end
|
1926
1926
|
when 59 then
|
1927
|
-
# line 584 "/Users/
|
1927
|
+
# line 584 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1928
1928
|
begin
|
1929
1929
|
te = p+1
|
1930
1930
|
begin
|
@@ -1936,7 +1936,7 @@ te = p+1
|
|
1936
1936
|
end
|
1937
1937
|
end
|
1938
1938
|
when 55 then
|
1939
|
-
# line 592 "/Users/
|
1939
|
+
# line 592 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1940
1940
|
begin
|
1941
1941
|
te = p+1
|
1942
1942
|
begin
|
@@ -1948,7 +1948,7 @@ te = p+1
|
|
1948
1948
|
end
|
1949
1949
|
end
|
1950
1950
|
when 57 then
|
1951
|
-
# line 600 "/Users/
|
1951
|
+
# line 600 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1952
1952
|
begin
|
1953
1953
|
te = p+1
|
1954
1954
|
begin
|
@@ -1960,7 +1960,7 @@ te = p+1
|
|
1960
1960
|
end
|
1961
1961
|
end
|
1962
1962
|
when 65 then
|
1963
|
-
# line 608 "/Users/
|
1963
|
+
# line 608 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1964
1964
|
begin
|
1965
1965
|
te = p+1
|
1966
1966
|
begin
|
@@ -1968,7 +1968,7 @@ te = p+1
|
|
1968
1968
|
end
|
1969
1969
|
end
|
1970
1970
|
when 46 then
|
1971
|
-
# line 623 "/Users/
|
1971
|
+
# line 623 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1972
1972
|
begin
|
1973
1973
|
te = p+1
|
1974
1974
|
begin
|
@@ -1983,7 +1983,7 @@ te = p+1
|
|
1983
1983
|
end
|
1984
1984
|
end
|
1985
1985
|
when 49 then
|
1986
|
-
# line 477 "/Users/
|
1986
|
+
# line 477 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1987
1987
|
begin
|
1988
1988
|
te = p
|
1989
1989
|
p = p - 1; begin
|
@@ -1995,7 +1995,7 @@ p = p - 1; begin
|
|
1995
1995
|
end
|
1996
1996
|
end
|
1997
1997
|
when 53 then
|
1998
|
-
# line 491 "/Users/
|
1998
|
+
# line 491 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1999
1999
|
begin
|
2000
2000
|
te = p
|
2001
2001
|
p = p - 1; begin
|
@@ -2008,7 +2008,7 @@ p = p - 1; begin
|
|
2008
2008
|
end
|
2009
2009
|
end
|
2010
2010
|
when 47 then
|
2011
|
-
# line 526 "/Users/
|
2011
|
+
# line 526 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2012
2012
|
begin
|
2013
2013
|
te = p
|
2014
2014
|
p = p - 1; begin
|
@@ -2017,7 +2017,7 @@ p = p - 1; begin
|
|
2017
2017
|
end
|
2018
2018
|
end
|
2019
2019
|
when 58 then
|
2020
|
-
# line 584 "/Users/
|
2020
|
+
# line 584 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2021
2021
|
begin
|
2022
2022
|
te = p
|
2023
2023
|
p = p - 1; begin
|
@@ -2029,7 +2029,7 @@ p = p - 1; begin
|
|
2029
2029
|
end
|
2030
2030
|
end
|
2031
2031
|
when 54 then
|
2032
|
-
# line 592 "/Users/
|
2032
|
+
# line 592 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2033
2033
|
begin
|
2034
2034
|
te = p
|
2035
2035
|
p = p - 1; begin
|
@@ -2041,7 +2041,7 @@ p = p - 1; begin
|
|
2041
2041
|
end
|
2042
2042
|
end
|
2043
2043
|
when 56 then
|
2044
|
-
# line 600 "/Users/
|
2044
|
+
# line 600 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2045
2045
|
begin
|
2046
2046
|
te = p
|
2047
2047
|
p = p - 1; begin
|
@@ -2053,7 +2053,7 @@ p = p - 1; begin
|
|
2053
2053
|
end
|
2054
2054
|
end
|
2055
2055
|
when 64 then
|
2056
|
-
# line 608 "/Users/
|
2056
|
+
# line 608 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2057
2057
|
begin
|
2058
2058
|
te = p
|
2059
2059
|
p = p - 1; begin
|
@@ -2061,7 +2061,7 @@ p = p - 1; begin
|
|
2061
2061
|
end
|
2062
2062
|
end
|
2063
2063
|
when 63 then
|
2064
|
-
# line 613 "/Users/
|
2064
|
+
# line 613 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2065
2065
|
begin
|
2066
2066
|
te = p
|
2067
2067
|
p = p - 1; begin
|
@@ -2069,7 +2069,7 @@ p = p - 1; begin
|
|
2069
2069
|
end
|
2070
2070
|
end
|
2071
2071
|
when 60 then
|
2072
|
-
# line 619 "/Users/
|
2072
|
+
# line 619 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2073
2073
|
begin
|
2074
2074
|
te = p
|
2075
2075
|
p = p - 1; begin
|
@@ -2084,7 +2084,7 @@ p = p - 1; begin
|
|
2084
2084
|
end
|
2085
2085
|
end
|
2086
2086
|
when 45 then
|
2087
|
-
# line 623 "/Users/
|
2087
|
+
# line 623 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2088
2088
|
begin
|
2089
2089
|
te = p
|
2090
2090
|
p = p - 1; begin
|
@@ -2099,7 +2099,7 @@ p = p - 1; begin
|
|
2099
2099
|
end
|
2100
2100
|
end
|
2101
2101
|
when 44 then
|
2102
|
-
# line 633 "/Users/
|
2102
|
+
# line 633 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2103
2103
|
begin
|
2104
2104
|
te = p
|
2105
2105
|
p = p - 1; begin
|
@@ -2111,7 +2111,7 @@ p = p - 1; begin
|
|
2111
2111
|
end
|
2112
2112
|
end
|
2113
2113
|
when 43 then
|
2114
|
-
# line 644 "/Users/
|
2114
|
+
# line 644 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2115
2115
|
begin
|
2116
2116
|
te = p
|
2117
2117
|
p = p - 1; begin
|
@@ -2119,7 +2119,7 @@ p = p - 1; begin
|
|
2119
2119
|
end
|
2120
2120
|
end
|
2121
2121
|
when 3 then
|
2122
|
-
# line 477 "/Users/
|
2122
|
+
# line 477 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2123
2123
|
begin
|
2124
2124
|
begin p = ((te))-1; end
|
2125
2125
|
begin
|
@@ -2131,7 +2131,7 @@ p = p - 1; begin
|
|
2131
2131
|
end
|
2132
2132
|
end
|
2133
2133
|
when 11 then
|
2134
|
-
# line 613 "/Users/
|
2134
|
+
# line 613 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2135
2135
|
begin
|
2136
2136
|
begin p = ((te))-1; end
|
2137
2137
|
begin
|
@@ -2139,7 +2139,7 @@ p = p - 1; begin
|
|
2139
2139
|
end
|
2140
2140
|
end
|
2141
2141
|
when 8 then
|
2142
|
-
# line 619 "/Users/
|
2142
|
+
# line 619 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2143
2143
|
begin
|
2144
2144
|
begin p = ((te))-1; end
|
2145
2145
|
begin
|
@@ -2191,13 +2191,13 @@ end
|
|
2191
2191
|
end
|
2192
2192
|
end
|
2193
2193
|
when 77 then
|
2194
|
-
# line 147 "/Users/
|
2194
|
+
# line 147 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2195
2195
|
begin
|
2196
2196
|
|
2197
2197
|
text = copy(data, ts ? ts-1 : 0, -1)
|
2198
2198
|
raise PrematureEndError.new( text )
|
2199
2199
|
end
|
2200
|
-
# line 221 "/Users/
|
2200
|
+
# line 221 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2201
2201
|
begin
|
2202
2202
|
te = p
|
2203
2203
|
p = p - 1; begin
|
@@ -2213,13 +2213,13 @@ p = p - 1; begin
|
|
2213
2213
|
end
|
2214
2214
|
end
|
2215
2215
|
when 18 then
|
2216
|
-
# line 147 "/Users/
|
2216
|
+
# line 147 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2217
2217
|
begin
|
2218
2218
|
|
2219
2219
|
text = copy(data, ts ? ts-1 : 0, -1)
|
2220
2220
|
raise PrematureEndError.new( text )
|
2221
2221
|
end
|
2222
|
-
# line 221 "/Users/
|
2222
|
+
# line 221 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2223
2223
|
begin
|
2224
2224
|
begin p = ((te))-1; end
|
2225
2225
|
begin
|
@@ -2235,13 +2235,13 @@ p = p - 1; begin
|
|
2235
2235
|
end
|
2236
2236
|
end
|
2237
2237
|
when 92 then
|
2238
|
-
# line 147 "/Users/
|
2238
|
+
# line 147 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2239
2239
|
begin
|
2240
2240
|
|
2241
2241
|
text = copy(data, ts ? ts-1 : 0, -1)
|
2242
2242
|
raise PrematureEndError.new( text )
|
2243
2243
|
end
|
2244
|
-
# line 343 "/Users/
|
2244
|
+
# line 343 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2245
2245
|
begin
|
2246
2246
|
te = p
|
2247
2247
|
p = p - 1; begin
|
@@ -2256,13 +2256,13 @@ p = p - 1; begin
|
|
2256
2256
|
end
|
2257
2257
|
end
|
2258
2258
|
when 94 then
|
2259
|
-
# line 147 "/Users/
|
2259
|
+
# line 147 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2260
2260
|
begin
|
2261
2261
|
|
2262
2262
|
text = copy(data, ts ? ts-1 : 0, -1)
|
2263
2263
|
raise PrematureEndError.new( text )
|
2264
2264
|
end
|
2265
|
-
# line 348 "/Users/
|
2265
|
+
# line 348 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2266
2266
|
begin
|
2267
2267
|
te = p
|
2268
2268
|
p = p - 1; begin
|
@@ -2277,13 +2277,13 @@ p = p - 1; begin
|
|
2277
2277
|
end
|
2278
2278
|
end
|
2279
2279
|
when 25 then
|
2280
|
-
# line 147 "/Users/
|
2280
|
+
# line 147 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2281
2281
|
begin
|
2282
2282
|
|
2283
2283
|
text = copy(data, ts ? ts-1 : 0, -1)
|
2284
2284
|
raise PrematureEndError.new( text )
|
2285
2285
|
end
|
2286
|
-
# line 343 "/Users/
|
2286
|
+
# line 343 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2287
2287
|
begin
|
2288
2288
|
begin p = ((te))-1; end
|
2289
2289
|
begin
|
@@ -2298,13 +2298,13 @@ p = p - 1; begin
|
|
2298
2298
|
end
|
2299
2299
|
end
|
2300
2300
|
when 27 then
|
2301
|
-
# line 147 "/Users/
|
2301
|
+
# line 147 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2302
2302
|
begin
|
2303
2303
|
|
2304
2304
|
text = copy(data, ts ? ts-1 : 0, -1)
|
2305
2305
|
raise PrematureEndError.new( text )
|
2306
2306
|
end
|
2307
|
-
# line 348 "/Users/
|
2307
|
+
# line 348 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2308
2308
|
begin
|
2309
2309
|
begin p = ((te))-1; end
|
2310
2310
|
begin
|
@@ -2319,13 +2319,13 @@ p = p - 1; begin
|
|
2319
2319
|
end
|
2320
2320
|
end
|
2321
2321
|
when 29 then
|
2322
|
-
# line 153 "/Users/
|
2322
|
+
# line 153 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2323
2323
|
begin
|
2324
2324
|
|
2325
2325
|
text = copy(data, ts ? ts-1 : 0, -1)
|
2326
2326
|
validation_error(:sequence, 'sequence', text)
|
2327
2327
|
end
|
2328
|
-
# line 339 "/Users/
|
2328
|
+
# line 339 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2329
2329
|
begin
|
2330
2330
|
te = p+1
|
2331
2331
|
begin
|
@@ -2339,10 +2339,10 @@ te = p+1
|
|
2339
2339
|
end
|
2340
2340
|
end
|
2341
2341
|
when 5 then
|
2342
|
-
# line 160 "/Users/
|
2342
|
+
# line 160 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2343
2343
|
begin
|
2344
2344
|
self.group_depth = group_depth - 1 end
|
2345
|
-
# line 462 "/Users/
|
2345
|
+
# line 462 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2346
2346
|
begin
|
2347
2347
|
te = p+1
|
2348
2348
|
begin
|
@@ -2350,10 +2350,10 @@ te = p+1
|
|
2350
2350
|
end
|
2351
2351
|
end
|
2352
2352
|
when 36 then
|
2353
|
-
# line 160 "/Users/
|
2353
|
+
# line 160 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2354
2354
|
begin
|
2355
2355
|
self.group_depth = group_depth - 1 end
|
2356
|
-
# line 531 "/Users/
|
2356
|
+
# line 531 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2357
2357
|
begin
|
2358
2358
|
te = p+1
|
2359
2359
|
begin
|
@@ -2372,10 +2372,10 @@ te = p+1
|
|
2372
2372
|
end
|
2373
2373
|
end
|
2374
2374
|
when 38 then
|
2375
|
-
# line 161 "/Users/
|
2375
|
+
# line 161 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2376
2376
|
begin
|
2377
2377
|
self.set_depth = set_depth + 1 end
|
2378
|
-
# line 437 "/Users/
|
2378
|
+
# line 437 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2379
2379
|
begin
|
2380
2380
|
te = p+1
|
2381
2381
|
begin
|
@@ -2391,10 +2391,10 @@ te = p+1
|
|
2391
2391
|
end
|
2392
2392
|
end
|
2393
2393
|
when 71 then
|
2394
|
-
# line 162 "/Users/
|
2394
|
+
# line 162 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2395
2395
|
begin
|
2396
2396
|
self.set_depth = set_depth - 1 end
|
2397
|
-
# line 168 "/Users/
|
2397
|
+
# line 168 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2398
2398
|
begin
|
2399
2399
|
te = p+1
|
2400
2400
|
begin
|
@@ -2418,10 +2418,10 @@ te = p+1
|
|
2418
2418
|
end
|
2419
2419
|
end
|
2420
2420
|
when 76 then
|
2421
|
-
# line 162 "/Users/
|
2421
|
+
# line 162 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2422
2422
|
begin
|
2423
2423
|
self.set_depth = set_depth - 1 end
|
2424
|
-
# line 177 "/Users/
|
2424
|
+
# line 177 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2425
2425
|
begin
|
2426
2426
|
te = p+1
|
2427
2427
|
begin # special case, emits two tokens
|
@@ -2446,10 +2446,10 @@ te = p+1
|
|
2446
2446
|
end
|
2447
2447
|
end
|
2448
2448
|
when 20 then
|
2449
|
-
# line 162 "/Users/
|
2449
|
+
# line 162 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2450
2450
|
begin
|
2451
2451
|
self.set_depth = set_depth - 1 end
|
2452
|
-
# line 226 "/Users/
|
2452
|
+
# line 226 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2453
2453
|
begin
|
2454
2454
|
te = p+1
|
2455
2455
|
begin
|
@@ -2470,7 +2470,7 @@ te = p+1
|
|
2470
2470
|
begin
|
2471
2471
|
te = p+1
|
2472
2472
|
end
|
2473
|
-
# line 161 "/Users/
|
2473
|
+
# line 161 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2474
2474
|
begin
|
2475
2475
|
self.set_depth = set_depth + 1 end
|
2476
2476
|
when 83 then
|
@@ -2478,7 +2478,7 @@ te = p+1
|
|
2478
2478
|
begin
|
2479
2479
|
te = p+1
|
2480
2480
|
end
|
2481
|
-
# line 276 "/Users/
|
2481
|
+
# line 276 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2482
2482
|
begin
|
2483
2483
|
act = 16; end
|
2484
2484
|
when 82 then
|
@@ -2486,7 +2486,7 @@ act = 16; end
|
|
2486
2486
|
begin
|
2487
2487
|
te = p+1
|
2488
2488
|
end
|
2489
|
-
# line 282 "/Users/
|
2489
|
+
# line 282 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2490
2490
|
begin
|
2491
2491
|
act = 17; end
|
2492
2492
|
when 7 then
|
@@ -2494,7 +2494,7 @@ act = 17; end
|
|
2494
2494
|
begin
|
2495
2495
|
te = p+1
|
2496
2496
|
end
|
2497
|
-
# line 491 "/Users/
|
2497
|
+
# line 491 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2498
2498
|
begin
|
2499
2499
|
act = 41; end
|
2500
2500
|
when 2 then
|
@@ -2502,7 +2502,7 @@ act = 41; end
|
|
2502
2502
|
begin
|
2503
2503
|
te = p+1
|
2504
2504
|
end
|
2505
|
-
# line 644 "/Users/
|
2505
|
+
# line 644 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2506
2506
|
begin
|
2507
2507
|
act = 55; end
|
2508
2508
|
when 48 then
|
@@ -2510,16 +2510,16 @@ act = 55; end
|
|
2510
2510
|
begin
|
2511
2511
|
te = p+1
|
2512
2512
|
end
|
2513
|
-
# line 160 "/Users/
|
2513
|
+
# line 160 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2514
2514
|
begin
|
2515
2515
|
self.group_depth = group_depth - 1 end
|
2516
|
-
# line 159 "/Users/
|
2516
|
+
# line 159 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2517
2517
|
begin
|
2518
2518
|
self.group_depth = group_depth + 1 end
|
2519
|
-
# line 477 "/Users/
|
2519
|
+
# line 477 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2520
2520
|
begin
|
2521
2521
|
act = 40; end
|
2522
|
-
# line 2522 "/Users/
|
2522
|
+
# line 2522 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
2523
2523
|
end
|
2524
2524
|
end
|
2525
2525
|
end
|
@@ -2537,7 +2537,7 @@ ts = nil; end
|
|
2537
2537
|
begin
|
2538
2538
|
act = 0
|
2539
2539
|
end
|
2540
|
-
# line 2540 "/Users/
|
2540
|
+
# line 2540 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
2541
2541
|
end
|
2542
2542
|
|
2543
2543
|
if cs == 0
|
@@ -2559,19 +2559,19 @@ act = 0
|
|
2559
2559
|
end
|
2560
2560
|
case _re_scanner_eof_actions[cs]
|
2561
2561
|
when 12 then
|
2562
|
-
# line 8 "/Users/
|
2562
|
+
# line 8 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/property.rl"
|
2563
2563
|
begin
|
2564
2564
|
|
2565
2565
|
raise PrematureEndError.new('unicode property')
|
2566
2566
|
end
|
2567
2567
|
when 23 then
|
2568
|
-
# line 147 "/Users/
|
2568
|
+
# line 147 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2569
2569
|
begin
|
2570
2570
|
|
2571
2571
|
text = copy(data, ts ? ts-1 : 0, -1)
|
2572
2572
|
raise PrematureEndError.new( text )
|
2573
2573
|
end
|
2574
|
-
# line 2574 "/Users/
|
2574
|
+
# line 2574 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
2575
2575
|
end
|
2576
2576
|
end
|
2577
2577
|
|
@@ -2582,7 +2582,7 @@ act = 0
|
|
2582
2582
|
end
|
2583
2583
|
end
|
2584
2584
|
|
2585
|
-
# line 741 "/Users/
|
2585
|
+
# line 741 "/Users/janoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2586
2586
|
|
2587
2587
|
# to avoid "warning: assigned but unused variable - testEof"
|
2588
2588
|
testEof = testEof
|
@@ -2604,14 +2604,16 @@ end
|
|
2604
2604
|
end
|
2605
2605
|
|
2606
2606
|
# lazy-load property maps when first needed
|
2607
|
-
require 'yaml'
|
2608
|
-
|
2609
2607
|
def self.short_prop_map
|
2610
|
-
@short_prop_map ||=
|
2608
|
+
@short_prop_map ||= parse_prop_map('short')
|
2611
2609
|
end
|
2612
2610
|
|
2613
2611
|
def self.long_prop_map
|
2614
|
-
@long_prop_map ||=
|
2612
|
+
@long_prop_map ||= parse_prop_map('long')
|
2613
|
+
end
|
2614
|
+
|
2615
|
+
def self.parse_prop_map(name)
|
2616
|
+
File.read("#{__dir__}/scanner/properties/#{name}.csv").scan(/(.+),(.+)/).to_h
|
2615
2617
|
end
|
2616
2618
|
|
2617
2619
|
# Emits an array with the details of the scanned pattern
|