regexp_parser 2.1.0 → 2.1.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 +7 -0
- data/lib/regexp_parser.rb +0 -1
- data/lib/regexp_parser/expression.rb +2 -1
- data/lib/regexp_parser/parser.rb +1 -0
- data/lib/regexp_parser/scanner.rb +14 -13
- data/lib/regexp_parser/scanner/scanner.rl +4 -3
- data/lib/regexp_parser/syntax.rb +2 -0
- data/lib/regexp_parser/syntax/versions.rb +1 -1
- data/lib/regexp_parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 077b8a0c90d90cf46e44671ec1335a5373eef72c61a0bcf4de43ba5217a188c3
|
4
|
+
data.tar.gz: b9aed868af73adcdf40c09720c5d10091b25a53b25a792717ceb5591039a2931
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c04d9a6434c6e3f322e97e8e2a1c86b3ddda88bd8821368a37b92f5836e4c3df1dc27a79165303420c3e8d5eea31bda1483824da01a40ce30961b645ba65ddd
|
7
|
+
data.tar.gz: 01e5c261e9dca0c4df7c696128dbc0520ca40aa6b9393cc8d6c3bdb8386470aeb773566000b811f98c1407038216c8d2c0b444c7955ea5a881ac759796f8a440
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [2.1.1] - 2021-02-23 - [Janosch Müller](mailto:janosch84@gmail.com)
|
4
|
+
|
5
|
+
### Fixed
|
6
|
+
|
7
|
+
- fixed `NameError` when requiring only `'regexp_parser/scanner'` in v2.1.0
|
8
|
+
* thanks to [Jared White and Sam Ruby](https://github.com/ruby2js/ruby2js) for the report
|
9
|
+
|
3
10
|
## [2.1.0] - 2021-02-22 - [Janosch Müller](mailto:janosch84@gmail.com)
|
4
11
|
|
5
12
|
### Added
|
data/lib/regexp_parser.rb
CHANGED
data/lib/regexp_parser/parser.rb
CHANGED
@@ -8,6 +8,8 @@
|
|
8
8
|
# THIS IS A GENERATED FILE, DO NOT EDIT DIRECTLY
|
9
9
|
# This file was generated from lib/regexp_parser/scanner/scanner.rl
|
10
10
|
|
11
|
+
require 'regexp_parser/error'
|
12
|
+
|
11
13
|
class Regexp::Scanner
|
12
14
|
# General scanner error (catch all)
|
13
15
|
class ScannerError < Regexp::Parser::Error; end
|
@@ -91,7 +93,7 @@ class Regexp::Scanner
|
|
91
93
|
self.char_pos = 0
|
92
94
|
|
93
95
|
|
94
|
-
# line
|
96
|
+
# line 96 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
95
97
|
class << self
|
96
98
|
attr_accessor :_re_scanner_trans_keys
|
97
99
|
private :_re_scanner_trans_keys, :_re_scanner_trans_keys=
|
@@ -1070,9 +1072,9 @@ end
|
|
1070
1072
|
self.re_scanner_en_main = 119;
|
1071
1073
|
|
1072
1074
|
|
1073
|
-
# line
|
1075
|
+
# line 739 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1074
1076
|
|
1075
|
-
# line
|
1077
|
+
# line 1077 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
1076
1078
|
begin
|
1077
1079
|
p ||= 0
|
1078
1080
|
pe ||= data.length
|
@@ -1083,9 +1085,9 @@ begin
|
|
1083
1085
|
act = 0
|
1084
1086
|
end
|
1085
1087
|
|
1086
|
-
# line
|
1088
|
+
# line 740 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
1087
1089
|
|
1088
|
-
# line
|
1090
|
+
# line 1090 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
1089
1091
|
begin
|
1090
1092
|
testEof = false
|
1091
1093
|
_slen, _trans, _keys, _inds, _acts, _nacts = nil
|
@@ -1113,7 +1115,7 @@ begin
|
|
1113
1115
|
begin
|
1114
1116
|
ts = p
|
1115
1117
|
end
|
1116
|
-
# line
|
1118
|
+
# line 1118 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
1117
1119
|
end
|
1118
1120
|
_keys = cs << 1
|
1119
1121
|
_inds = _re_scanner_index_offsets[cs]
|
@@ -2517,7 +2519,7 @@ te = p+1
|
|
2517
2519
|
# line 477 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2518
2520
|
begin
|
2519
2521
|
act = 40; end
|
2520
|
-
# line
|
2522
|
+
# line 2522 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
2521
2523
|
end
|
2522
2524
|
end
|
2523
2525
|
end
|
@@ -2535,7 +2537,7 @@ ts = nil; end
|
|
2535
2537
|
begin
|
2536
2538
|
act = 0
|
2537
2539
|
end
|
2538
|
-
# line
|
2540
|
+
# line 2540 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
2539
2541
|
end
|
2540
2542
|
|
2541
2543
|
if cs == 0
|
@@ -2569,7 +2571,7 @@ act = 0
|
|
2569
2571
|
text = copy(data, ts ? ts-1 : 0, -1)
|
2570
2572
|
raise PrematureEndError.new( text )
|
2571
2573
|
end
|
2572
|
-
# line
|
2574
|
+
# line 2574 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner.rb"
|
2573
2575
|
end
|
2574
2576
|
end
|
2575
2577
|
|
@@ -2580,7 +2582,7 @@ act = 0
|
|
2580
2582
|
end
|
2581
2583
|
end
|
2582
2584
|
|
2583
|
-
# line
|
2585
|
+
# line 741 "/Users/jannoschmuller/code/regexp_parser/lib/regexp_parser/scanner/scanner.rl"
|
2584
2586
|
|
2585
2587
|
# to avoid "warning: assigned but unused variable - testEof"
|
2586
2588
|
testEof = testEof
|
@@ -2603,14 +2605,13 @@ end
|
|
2603
2605
|
|
2604
2606
|
# lazy-load property maps when first needed
|
2605
2607
|
require 'yaml'
|
2606
|
-
PROP_MAPS_DIR = File.join(__dir__, 'scanner', 'properties')
|
2607
2608
|
|
2608
2609
|
def self.short_prop_map
|
2609
|
-
@short_prop_map ||= YAML.load_file("#{
|
2610
|
+
@short_prop_map ||= YAML.load_file("#{__dir__}/scanner/properties/short.yml")
|
2610
2611
|
end
|
2611
2612
|
|
2612
2613
|
def self.long_prop_map
|
2613
|
-
@long_prop_map ||= YAML.load_file("#{
|
2614
|
+
@long_prop_map ||= YAML.load_file("#{__dir__}/scanner/properties/long.yml")
|
2614
2615
|
end
|
2615
2616
|
|
2616
2617
|
# Emits an array with the details of the scanned pattern
|
@@ -651,6 +651,8 @@
|
|
651
651
|
# THIS IS A GENERATED FILE, DO NOT EDIT DIRECTLY
|
652
652
|
# This file was generated from lib/regexp_parser/scanner/scanner.rl
|
653
653
|
|
654
|
+
require 'regexp_parser/error'
|
655
|
+
|
654
656
|
class Regexp::Scanner
|
655
657
|
# General scanner error (catch all)
|
656
658
|
class ScannerError < Regexp::Parser::Error; end
|
@@ -758,14 +760,13 @@ class Regexp::Scanner
|
|
758
760
|
|
759
761
|
# lazy-load property maps when first needed
|
760
762
|
require 'yaml'
|
761
|
-
PROP_MAPS_DIR = File.join(__dir__, 'scanner', 'properties')
|
762
763
|
|
763
764
|
def self.short_prop_map
|
764
|
-
@short_prop_map ||= YAML.load_file("#{
|
765
|
+
@short_prop_map ||= YAML.load_file("#{__dir__}/scanner/properties/short.yml")
|
765
766
|
end
|
766
767
|
|
767
768
|
def self.long_prop_map
|
768
|
-
@long_prop_map ||= YAML.load_file("#{
|
769
|
+
@long_prop_map ||= YAML.load_file("#{__dir__}/scanner/properties/long.yml")
|
769
770
|
end
|
770
771
|
|
771
772
|
# Emits an array with the details of the scanned pattern
|
data/lib/regexp_parser/syntax.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: regexp_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ammar Ali
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A library for tokenizing, lexing, and parsing Ruby regular expressions.
|
14
14
|
email:
|