regexp_parser 0.4.13 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +15 -0
- data/lib/regexp_parser/expression.rb +43 -51
- data/lib/regexp_parser/expression/classes/alternation.rb +6 -7
- data/lib/regexp_parser/expression/classes/character_class.rb +11 -0
- data/lib/regexp_parser/expression/classes/conditional.rb +10 -18
- data/lib/regexp_parser/expression/classes/free_space.rb +1 -1
- data/lib/regexp_parser/expression/classes/group.rb +9 -21
- data/lib/regexp_parser/expression/classes/property.rb +2 -2
- data/lib/regexp_parser/expression/classes/set.rb +1 -12
- data/lib/regexp_parser/expression/methods/traverse.rb +1 -1
- data/lib/regexp_parser/expression/quantifier.rb +9 -9
- data/lib/regexp_parser/expression/sequence.rb +5 -4
- data/lib/regexp_parser/expression/subexpression.rb +16 -59
- data/lib/regexp_parser/lexer.rb +31 -27
- data/lib/regexp_parser/parser.rb +179 -179
- data/lib/regexp_parser/scanner.rb +172 -166
- data/lib/regexp_parser/scanner/scanner.rl +44 -38
- data/lib/regexp_parser/syntax.rb +2 -53
- data/lib/regexp_parser/syntax/base.rb +13 -24
- data/lib/regexp_parser/syntax/tokens/character_class.rb +16 -0
- data/lib/regexp_parser/syntax/tokens/unicode_property.rb +26 -26
- data/lib/regexp_parser/syntax/version_lookup.rb +82 -0
- data/lib/regexp_parser/syntax/versions.rb +1 -5
- data/lib/regexp_parser/syntax/versions/1.8.6.rb +30 -0
- data/lib/regexp_parser/syntax/versions/1.9.1.rb +36 -0
- data/lib/regexp_parser/syntax/versions/1.9.3.rb +11 -0
- data/lib/regexp_parser/syntax/versions/2.0.0.rb +20 -0
- data/lib/regexp_parser/syntax/versions/2.2.0.rb +10 -0
- data/lib/regexp_parser/syntax/versions/2.3.0.rb +10 -0
- data/lib/regexp_parser/syntax/versions/2.4.0.rb +10 -0
- data/lib/regexp_parser/syntax/versions/2.4.1.rb +9 -0
- data/lib/regexp_parser/syntax/versions/2.5.0.rb +10 -0
- data/lib/regexp_parser/token.rb +6 -29
- data/lib/regexp_parser/version.rb +1 -1
- data/test/expression/test_strfregexp.rb +7 -0
- data/test/expression/test_to_h.rb +6 -0
- data/test/parser/test_properties.rb +12 -4
- data/test/support/warning_extractor.rb +3 -1
- data/test/syntax/test_all.rb +1 -1
- data/test/syntax/test_syntax.rb +5 -9
- data/test/syntax/{ruby → versions}/test_1.8.rb +14 -14
- data/test/syntax/{ruby → versions}/test_1.9.1.rb +7 -8
- data/test/syntax/{ruby → versions}/test_1.9.3.rb +7 -7
- data/test/syntax/versions/test_2.0.0.rb +37 -0
- data/test/syntax/{ruby → versions}/test_2.2.0.rb +7 -7
- data/test/syntax/versions/test_aliases.rb +129 -0
- data/test/syntax/{ruby → versions}/test_all.rb +1 -1
- metadata +73 -113
- data/lib/regexp_parser/syntax/ruby/1.8.6.rb +0 -37
- data/lib/regexp_parser/syntax/ruby/1.8.7.rb +0 -14
- data/lib/regexp_parser/syntax/ruby/1.8.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/1.9.1.rb +0 -45
- data/lib/regexp_parser/syntax/ruby/1.9.2.rb +0 -9
- data/lib/regexp_parser/syntax/ruby/1.9.3.rb +0 -19
- data/lib/regexp_parser/syntax/ruby/1.9.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.0.0.rb +0 -23
- data/lib/regexp_parser/syntax/ruby/2.0.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.1.0.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.10.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.5.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.6.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.7.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.8.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.9.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.1.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.2.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.2.1.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.10.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.5.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.6.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.7.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.8.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.9.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.2.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.3.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.3.1.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.5.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.6.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.7.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.3.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.4.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.4.1.rb +0 -15
- data/lib/regexp_parser/syntax/ruby/2.4.2.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.4.3.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.4.4.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.4.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.5.0.rb +0 -16
- data/lib/regexp_parser/syntax/ruby/2.5.1.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.5.rb +0 -8
- data/lib/regexp_parser/syntax/ruby/2.6.0.rb +0 -13
- data/lib/regexp_parser/syntax/ruby/2.6.rb +0 -8
- data/test/syntax/ruby/test_2.0.0.rb +0 -32
- data/test/syntax/ruby/test_files.rb +0 -353
@@ -1,37 +0,0 @@
|
|
1
|
-
module Regexp::Syntax
|
2
|
-
|
3
|
-
module Ruby
|
4
|
-
class V186 < Regexp::Syntax::Base
|
5
|
-
include Regexp::Syntax::Token
|
6
|
-
|
7
|
-
def initialize
|
8
|
-
super
|
9
|
-
|
10
|
-
implements :anchor, Anchor::All
|
11
|
-
implements :assertion, Assertion::Lookahead
|
12
|
-
implements :backref, [:number]
|
13
|
-
|
14
|
-
implements :escape,
|
15
|
-
Escape::Basic + Escape::Backreference +
|
16
|
-
Escape::ASCII + Escape::Meta + Escape::Control
|
17
|
-
|
18
|
-
implements :group, Group::All
|
19
|
-
|
20
|
-
implements :meta, Meta::Extended
|
21
|
-
|
22
|
-
implements :quantifier,
|
23
|
-
Quantifier::Greedy + Quantifier::Reluctant +
|
24
|
-
Quantifier::Interval + Quantifier::IntervalReluctant
|
25
|
-
|
26
|
-
implements :set, CharacterSet::OpenClose +
|
27
|
-
CharacterSet::Extended + CharacterSet::Types +
|
28
|
-
CharacterSet::POSIX::Standard
|
29
|
-
|
30
|
-
implements :type,
|
31
|
-
CharacterType::Extended
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require File.expand_path('../1.8', __FILE__)
|
2
|
-
|
3
|
-
module Regexp::Syntax
|
4
|
-
|
5
|
-
module Ruby
|
6
|
-
class V191 < Regexp::Syntax::Ruby::V18
|
7
|
-
include Regexp::Syntax::Token
|
8
|
-
|
9
|
-
def initialize
|
10
|
-
super
|
11
|
-
|
12
|
-
implements :assertion, Assertion::Lookbehind +
|
13
|
-
SubexpressionCall::All
|
14
|
-
|
15
|
-
implements :backref, Backreference::All +
|
16
|
-
SubexpressionCall::All
|
17
|
-
|
18
|
-
implements :escape, Escape::Unicode + Escape::Hex + Escape::Octal
|
19
|
-
|
20
|
-
implements :type, CharacterType::Hex
|
21
|
-
|
22
|
-
implements :property,
|
23
|
-
UnicodeProperty::V190
|
24
|
-
|
25
|
-
implements :nonproperty,
|
26
|
-
UnicodeProperty::V190
|
27
|
-
|
28
|
-
implements :quantifier,
|
29
|
-
Quantifier::Possessive + Quantifier::IntervalPossessive
|
30
|
-
|
31
|
-
implements :set,
|
32
|
-
CharacterSet::POSIX::StandardNegative +
|
33
|
-
CharacterSet::POSIX::Extensions +
|
34
|
-
CharacterSet::POSIX::ExtensionsNegative +
|
35
|
-
UnicodeProperty::V190
|
36
|
-
|
37
|
-
implements :subset, CharacterSet::OpenClose +
|
38
|
-
CharacterSet::Extended + CharacterSet::Types +
|
39
|
-
CharacterSet::POSIX::Standard
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require File.expand_path('../1.9.2', __FILE__)
|
2
|
-
|
3
|
-
module Regexp::Syntax
|
4
|
-
|
5
|
-
module Ruby
|
6
|
-
class V193 < Regexp::Syntax::Ruby::V192
|
7
|
-
include Regexp::Syntax::Token
|
8
|
-
|
9
|
-
def initialize
|
10
|
-
super
|
11
|
-
|
12
|
-
# these were added with update of Oniguruma to Unicode 6.0
|
13
|
-
implements :property, UnicodeProperty::V193
|
14
|
-
implements :nonproperty, UnicodeProperty::V193
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require File.expand_path('../1.9', __FILE__)
|
2
|
-
|
3
|
-
module Regexp::Syntax
|
4
|
-
module Ruby
|
5
|
-
|
6
|
-
# use the last 1.9 release as the base
|
7
|
-
class V200 < Regexp::Syntax::Ruby::V19
|
8
|
-
def initialize
|
9
|
-
super
|
10
|
-
|
11
|
-
implements :keep, Keep::All
|
12
|
-
implements :conditional, Conditional::All
|
13
|
-
implements :property, UnicodeProperty::V200
|
14
|
-
implements :nonproperty, UnicodeProperty::V200
|
15
|
-
|
16
|
-
implements :type, CharacterType::Clustered
|
17
|
-
implements :set, CharacterSet::Clustered
|
18
|
-
implements :subset, CharacterSet::Clustered
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require File.expand_path('../2.1', __FILE__)
|
2
|
-
|
3
|
-
module Regexp::Syntax
|
4
|
-
module Ruby
|
5
|
-
|
6
|
-
class V220 < Regexp::Syntax::Ruby::V21
|
7
|
-
def initialize
|
8
|
-
super
|
9
|
-
|
10
|
-
implements :property, UnicodeProperty::V220
|
11
|
-
implements :nonproperty, UnicodeProperty::V220
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|