sexp_processor 4.14.0 → 4.15.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.rdoc +31 -0
- data/Rakefile +2 -0
- data/lib/pt_testcase.rb +2 -2
- data/lib/sexp_matcher.rb +7 -9
- data/lib/sexp_processor.rb +1 -1
- data/test/test_sexp.rb +5 -1
- metadata +20 -17
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c76b0746c0b866b7e54068882b6374b2dca98bb47c65dec526e9cd8d1f57a7a2
|
4
|
+
data.tar.gz: 4575da1b79a1578d3855e8a9e8aedc89aaecbc3baaf5f4a26fd539e0f2c90b45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35e3a3daa6ec1fa8e788133c133342de6cfe2cc264ded602f91306450af0dcffaaa7b4986b8b5e0b19ee76665cb702cde745f0c11a47b20bcc851f5be2115d0f
|
7
|
+
data.tar.gz: 2bf1f91ef051ffd4eba0b05b9ba7b30141063f4662dbfba5566dd6fae6558a9c9c72718e391822a958978086d0e9ac0bf3385238b9f1816d0c653dfb3c4b4c7b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,34 @@
|
|
1
|
+
=== 4.15.3 / 2021-05-15
|
2
|
+
|
3
|
+
* 1 minor enhancement:
|
4
|
+
|
5
|
+
* Added 3.0 to pt_testcase.rb
|
6
|
+
|
7
|
+
=== 4.15.2 / 2021-01-10
|
8
|
+
|
9
|
+
* 1 bug fix:
|
10
|
+
|
11
|
+
* Bumped ruby version to include < 4 (trunk).
|
12
|
+
|
13
|
+
=== 4.15.1 / 2020-08-31
|
14
|
+
|
15
|
+
* 1 bug fix:
|
16
|
+
|
17
|
+
* Bumped ruby version to include 3.0 (trunk).
|
18
|
+
|
19
|
+
=== 4.15.0 / 2020-06-09
|
20
|
+
|
21
|
+
* 1 minor enhancement:
|
22
|
+
|
23
|
+
* Added `child` and `include` to Sexp::Matcher.parse language.
|
24
|
+
|
25
|
+
=== 4.14.1 / 2020-02-09
|
26
|
+
|
27
|
+
* 2 bug fixes:
|
28
|
+
|
29
|
+
* Declared support for ruby 2.2+ to gemspec.
|
30
|
+
* Fixed alias for `not?` to `-` for ruby <= 2.4. (nard-tech).
|
31
|
+
|
1
32
|
=== 4.14.0 / 2020-02-06
|
2
33
|
|
3
34
|
* 4 minor enhancements:
|
data/Rakefile
CHANGED
data/lib/pt_testcase.rb
CHANGED
@@ -77,7 +77,7 @@ class ParseTreeTestCase < Minitest::Test
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def self.add_19tests name, hash
|
80
|
-
add_tests "#{name}
|
80
|
+
add_tests "#{name}__19_20_21_22_23_24_25_26_27_30", hash # HACK?
|
81
81
|
end
|
82
82
|
|
83
83
|
def self.add_19edgecases ruby, sexp, cases
|
@@ -102,7 +102,7 @@ class ParseTreeTestCase < Minitest::Test
|
|
102
102
|
testcases[verbose][klass] = testcases[nonverbose][klass]
|
103
103
|
end
|
104
104
|
|
105
|
-
VER_RE = "(1[89]|2[
|
105
|
+
VER_RE = "(1[89]|2[01234567]|3[0])"
|
106
106
|
|
107
107
|
def self.generate_test klass, node, data, input_name, output_name
|
108
108
|
klass.send :define_method, "test_#{node}" do
|
data/lib/sexp_matcher.rb
CHANGED
@@ -156,8 +156,9 @@ class Sexp #:nodoc:
|
|
156
156
|
Not.new arg
|
157
157
|
end
|
158
158
|
|
159
|
-
|
160
|
-
|
159
|
+
class << self
|
160
|
+
alias - not?
|
161
|
+
end
|
161
162
|
|
162
163
|
# TODO: add Sibling factory method?
|
163
164
|
|
@@ -454,7 +455,7 @@ class Sexp #:nodoc:
|
|
454
455
|
# | NAME:name => name.to_sym
|
455
456
|
# UP_NAME: /[A-Z]\w*/
|
456
457
|
# NAME : /:?[\w?!=~-]+/
|
457
|
-
# CMD :
|
458
|
+
# CMD : t | k | m | atom | not? | - | any | child | include
|
458
459
|
|
459
460
|
def parse_sexp
|
460
461
|
token = next_token
|
@@ -504,7 +505,7 @@ class Sexp #:nodoc:
|
|
504
505
|
##
|
505
506
|
# A collection of allowed commands to convert into matchers.
|
506
507
|
|
507
|
-
ALLOWED = [:t, :m, :k, :atom, :not?, :-, :any].freeze
|
508
|
+
ALLOWED = [:t, :m, :k, :atom, :not?, :-, :any, :child, :include].freeze
|
508
509
|
|
509
510
|
##
|
510
511
|
# Parses a balanced command. A command is denoted by square
|
@@ -759,11 +760,8 @@ class Sexp #:nodoc:
|
|
759
760
|
# +child+.
|
760
761
|
|
761
762
|
def satisfy? o
|
762
|
-
|
763
|
-
|
764
|
-
elsif o.kind_of? Sexp
|
765
|
-
o.search_each(child).any?
|
766
|
-
end
|
763
|
+
child.satisfy?(o) ||
|
764
|
+
(o.kind_of?(Sexp) && o.search_each(child).any?)
|
767
765
|
end
|
768
766
|
|
769
767
|
def == o # :nodoc:
|
data/lib/sexp_processor.rb
CHANGED
data/test/test_sexp.rb
CHANGED
@@ -906,7 +906,7 @@ class TestChild < MatcherTestCase
|
|
906
906
|
end
|
907
907
|
|
908
908
|
def sexp
|
909
|
-
s(:x, s(:a))
|
909
|
+
s(:x, s(:b), s(:a))
|
910
910
|
end
|
911
911
|
|
912
912
|
def bad_sexp
|
@@ -926,6 +926,8 @@ class TestChild < MatcherTestCase
|
|
926
926
|
|
927
927
|
def test_satisfy_eh_by_child
|
928
928
|
assert_satisfy matcher, s(:a)
|
929
|
+
assert_satisfy matcher, sexp
|
930
|
+
refute_satisfy matcher, bad_sexp
|
929
931
|
end
|
930
932
|
end
|
931
933
|
|
@@ -1602,8 +1604,10 @@ class TestSexpMatcherParser < Minitest::Test
|
|
1602
1604
|
test_parse "not?", delay{ not?(m(/^_$/)) }, "[not? [m /^_$/]]"
|
1603
1605
|
test_parse "not2", delay{ -_ }, "[- _]"
|
1604
1606
|
test_parse "any", delay{ q(:a) | q(:b) }, "[any (a) (b)]"
|
1607
|
+
test_parse "child", delay{ child(q(:str, m(/woot/))) }, "[child (str [m /woot/])]"
|
1605
1608
|
|
1606
1609
|
test_parse "klass", delay{ q(:lit, k(Float)) }, "(lit [k Float])"
|
1610
|
+
test_parse "const", delay{ q(:const, :Float) }, "(const :Float)"
|
1607
1611
|
|
1608
1612
|
test_bad_parse "open_sexp", "(a"
|
1609
1613
|
test_bad_parse "closed_sexp", "a)"
|
metadata
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sexp_processor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.15.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDPjCCAiagAwIBAgIBBTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
14
14
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
15
|
+
GRYDY29tMB4XDTIwMTIyMjIwMzgzMFoXDTIxMTIyMjIwMzgzMFowRTETMBEGA1UE
|
16
16
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
17
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
18
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -22,14 +22,14 @@ cert_chain:
|
|
22
22
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
23
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
24
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
AQAE3XRm1YZcCVjAJy5yMZvTOFrS7B2SYErc+0QwmKYbHztTTDY2m5Bii+jhpuxh
|
26
|
+
H+ETcU1z8TUKLpsBUP4kUpIRowkVN1p/jKapV8T3Rbwq+VuYFe+GMKsf8wGZSecG
|
27
|
+
oMQ8DzzauZfbvhe2kDg7G9BBPU0wLQlY25rDcCy9bLnD7R0UK3ONqpwvsI5I7x5X
|
28
|
+
ZIMXR0a9/DG+55mawwdGzCQobDKiSNLK89KK7OcNTALKU0DfgdTkktdgKchzKHqZ
|
29
|
+
d/AHw/kcnU6iuMUoJEcGiJd4gVCTn1l3cDcIvxakGslCA88Jubw0Sqatan0TnC9g
|
30
|
+
KToW560QIey7SPfHWduzFJnV
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
32
|
+
date: 2021-05-15 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rdoc
|
@@ -57,14 +57,14 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '3.
|
60
|
+
version: '3.22'
|
61
61
|
type: :development
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '3.
|
67
|
+
version: '3.22'
|
68
68
|
description: |-
|
69
69
|
sexp_processor branches from ParseTree bringing all the generic sexp
|
70
70
|
processing tools with it. Sexp, SexpProcessor, Environment, etc... all
|
@@ -98,7 +98,7 @@ licenses:
|
|
98
98
|
- MIT
|
99
99
|
metadata:
|
100
100
|
homepage_uri: https://github.com/seattlerb/sexp_processor
|
101
|
-
post_install_message:
|
101
|
+
post_install_message:
|
102
102
|
rdoc_options:
|
103
103
|
- "--main"
|
104
104
|
- README.rdoc
|
@@ -108,15 +108,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
108
|
requirements:
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
111
|
+
version: '2.1'
|
112
|
+
- - "<"
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '4'
|
112
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
116
|
requirements:
|
114
117
|
- - ">="
|
115
118
|
- !ruby/object:Gem::Version
|
116
119
|
version: '0'
|
117
120
|
requirements: []
|
118
|
-
rubygems_version: 3.
|
119
|
-
signing_key:
|
121
|
+
rubygems_version: 3.2.16
|
122
|
+
signing_key:
|
120
123
|
specification_version: 4
|
121
124
|
summary: sexp_processor branches from ParseTree bringing all the generic sexp processing
|
122
125
|
tools with it
|
metadata.gz.sig
CHANGED
Binary file
|