regexp_parser 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/LICENSE +1 -1
- data/lib/regexp_parser/lexer.rb +11 -2
- data/lib/regexp_parser/syntax.rb +2 -0
- data/lib/regexp_parser/syntax/ruby/2.1.7.rb +13 -0
- data/lib/regexp_parser/syntax/ruby/2.1.rb +2 -2
- data/lib/regexp_parser/syntax/ruby/2.2.3.rb +13 -0
- data/lib/regexp_parser/syntax/ruby/2.2.rb +2 -2
- data/lib/regexp_parser/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5efb4ad75410104cf63c36294b059d25bf483a86
|
4
|
+
data.tar.gz: 1cfccc0b75f308df7772265b7816248fc324d094
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21e70692c2d959f7d6bf6557ed101d505e0cc1e92ff0671982535196b43a749603d0ce48c28484323389d443f8c47c25441972270dff84a98105fab837e2589d
|
7
|
+
data.tar.gz: 111cf644c3a8b0305269dbf77941d64ace3bacddd0097190b36ddecfdd5480b40232bb9c5ae4ec3a4bc4057bd7b9a876664bb444fb682f6e75457e4223b08f9e
|
data/ChangeLog
CHANGED
data/LICENSE
CHANGED
data/lib/regexp_parser/lexer.rb
CHANGED
@@ -115,8 +115,17 @@ module Regexp::Lexer
|
|
115
115
|
# get normalized (as in the case of posix/bre) and end up becoming literals.
|
116
116
|
def self.merge_literal(current)
|
117
117
|
last = @tokens.pop
|
118
|
-
|
119
|
-
|
118
|
+
|
119
|
+
Regexp::Token.new(
|
120
|
+
:literal,
|
121
|
+
:literal,
|
122
|
+
last.text + current.text,
|
123
|
+
last.ts,
|
124
|
+
current.te,
|
125
|
+
@nesting,
|
126
|
+
@set_nesting,
|
127
|
+
@conditional_nesting
|
128
|
+
)
|
120
129
|
end
|
121
130
|
|
122
131
|
def self.merge_condition(current)
|
data/lib/regexp_parser/syntax.rb
CHANGED
@@ -67,6 +67,7 @@ module Regexp::Syntax
|
|
67
67
|
when 'ruby/2.1.4'; syntax = Regexp::Syntax::Ruby::V214.new
|
68
68
|
when 'ruby/2.1.5'; syntax = Regexp::Syntax::Ruby::V215.new
|
69
69
|
when 'ruby/2.1.6'; syntax = Regexp::Syntax::Ruby::V216.new
|
70
|
+
when 'ruby/2.1.7'; syntax = Regexp::Syntax::Ruby::V217.new
|
70
71
|
|
71
72
|
# aliases for the latest 2.1 implementations
|
72
73
|
when 'ruby/2.1'; syntax = Regexp::Syntax::Ruby::V21.new
|
@@ -75,6 +76,7 @@ module Regexp::Syntax
|
|
75
76
|
when 'ruby/2.2.0'; syntax = Regexp::Syntax::Ruby::V220.new
|
76
77
|
when 'ruby/2.2.1'; syntax = Regexp::Syntax::Ruby::V221.new
|
77
78
|
when 'ruby/2.2.2'; syntax = Regexp::Syntax::Ruby::V222.new
|
79
|
+
when 'ruby/2.2.3'; syntax = Regexp::Syntax::Ruby::V223.new
|
78
80
|
|
79
81
|
# aliases for the latest 2.2 implementations
|
80
82
|
when 'ruby/2.2'; syntax = Regexp::Syntax::Ruby::V22.new
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require File.expand_path('../2.1.
|
1
|
+
require File.expand_path('../2.1.7', __FILE__)
|
2
2
|
|
3
3
|
module Regexp::Syntax
|
4
4
|
module Ruby
|
5
5
|
# uses the latest 2.1 release
|
6
|
-
class V21 < Regexp::Syntax::Ruby::
|
6
|
+
class V21 < Regexp::Syntax::Ruby::V217; end
|
7
7
|
end
|
8
8
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require File.expand_path('../2.2.
|
1
|
+
require File.expand_path('../2.2.3', __FILE__)
|
2
2
|
|
3
3
|
module Regexp::Syntax
|
4
4
|
module Ruby
|
5
5
|
# uses the latest 2.2 release
|
6
|
-
class V22 < Regexp::Syntax::Ruby::
|
6
|
+
class V22 < Regexp::Syntax::Ruby::V223; end
|
7
7
|
end
|
8
8
|
end
|
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: 0.3.
|
4
|
+
version: 0.3.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: 2015-08-
|
11
|
+
date: 2015-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A library for tokenizing, lexing, and parsing Ruby regular expressions.
|
14
14
|
email:
|
@@ -64,10 +64,12 @@ files:
|
|
64
64
|
- lib/regexp_parser/syntax/ruby/2.1.4.rb
|
65
65
|
- lib/regexp_parser/syntax/ruby/2.1.5.rb
|
66
66
|
- lib/regexp_parser/syntax/ruby/2.1.6.rb
|
67
|
+
- lib/regexp_parser/syntax/ruby/2.1.7.rb
|
67
68
|
- lib/regexp_parser/syntax/ruby/2.1.rb
|
68
69
|
- lib/regexp_parser/syntax/ruby/2.2.0.rb
|
69
70
|
- lib/regexp_parser/syntax/ruby/2.2.1.rb
|
70
71
|
- lib/regexp_parser/syntax/ruby/2.2.2.rb
|
72
|
+
- lib/regexp_parser/syntax/ruby/2.2.3.rb
|
71
73
|
- lib/regexp_parser/syntax/ruby/2.2.rb
|
72
74
|
- lib/regexp_parser/syntax/tokens.rb
|
73
75
|
- lib/regexp_parser/syntax/tokens/anchor.rb
|