ebnf 2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/bin/ebnf +0 -1
  4. data/lib/ebnf/base.rb +2 -1
  5. data/lib/ebnf/rule.rb +4 -2
  6. metadata +18 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 675c1d0315518a2a8159fb1cdfb3bd0054e2a4eac1a12adae63dbbe02cf2d611
4
- data.tar.gz: '0229b65832d59f84c39bfc9770555fb50a3500f5d551ea400bd3ae57df1b408b'
3
+ metadata.gz: c56b57d125d152b6bfcd4c77b3a2d160ba1e7e11fc538c182085868fe5b2d4a4
4
+ data.tar.gz: c7c3987ce05152cc1efa031f0ecc03f2bc111442fbcbbcb3d2cf82b85f59e4cf
5
5
  SHA512:
6
- metadata.gz: 0e13f53ed30fad026c5fd901a449805089e948838e6aae38b4e3fe87d274f07e19ae9c197a93cba0dc90a57cea4f8b341f13904265ac47a91631a5cc7801e6ec
7
- data.tar.gz: 9bb40f43a8a9ff95bbd9d097729db694033217ba1226a403844e9bf5b20ee852b57f8fef54dd200d3ee98847da7a21efcaa675a34fb607c799a901f4798f3085
6
+ metadata.gz: 9692cedc65cfde26fd21781f01a3f44c52f69de178893b63ce94b74e9a9ef24218979a9693eec18c02469bf69ea9b15a9b248817958b5c6a6874ec078ac02091
7
+ data.tar.gz: dc8c937d4ba0f70e4b981cd4c91a40b2cd59c6803e1b5409f5bdc8f5dea6acc4af2c176f26e1cde805077c035aa93baf3d8e0b15858238380e2a1c25a6f1c32b
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.1
1
+ 2.3.0
data/bin/ebnf CHANGED
@@ -6,7 +6,6 @@
6
6
  # * And with First/Follow rules
7
7
 
8
8
  $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", 'lib')))
9
- require "bundler/setup"
10
9
  require 'rubygems'
11
10
  require 'getoptlong'
12
11
  require 'ebnf'
data/lib/ebnf/base.rb CHANGED
@@ -201,8 +201,9 @@ module EBNF
201
201
 
202
202
  ##
203
203
  # Write out parsed syntax string as an S-Expression
204
+ #
204
205
  # @return [String]
205
- def to_sxp
206
+ def to_sxp(**options)
206
207
  require 'sxp' unless defined?(SXP)
207
208
  SXP::Generator.string(ast.map(&:for_sxp))
208
209
  end
data/lib/ebnf/rule.rb CHANGED
@@ -206,10 +206,11 @@ module EBNF
206
206
  end
207
207
 
208
208
  # Return SXP representation of this rule
209
+ #
209
210
  # @return [String]
210
- def to_sxp
211
+ def to_sxp(**options)
211
212
  require 'sxp' unless defined?(SXP)
212
- for_sxp.to_sxp
213
+ for_sxp.to_sxp(**options)
213
214
  end
214
215
 
215
216
  alias_method :to_s, :to_sxp
@@ -416,6 +417,7 @@ module EBNF
416
417
  # @param [Rule] other
417
418
  # @return [Boolean]
418
419
  def ==(other)
420
+ other.is_a?(Rule) &&
419
421
  sym == other.sym &&
420
422
  kind == other.kind &&
421
423
  expr == other.expr
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebnf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-25 00:00:00.000000000 Z
11
+ date: 2021-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sxp
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.1'
26
+ version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: scanf
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.1'
47
+ version: '3.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.1'
54
+ version: '3.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: htmlentities
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,70 +72,70 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.6'
75
+ version: '1.7'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.6'
82
+ version: '1.7'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: amazing_print
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.2'
89
+ version: '1.4'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.2'
96
+ version: '1.4'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rdf-spec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.1'
103
+ version: '3.2'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '3.1'
110
+ version: '3.2'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rdf-turtle
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '3.1'
117
+ version: '3.2'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '3.1'
124
+ version: '3.2'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: nokogiri
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.10'
131
+ version: '1.12'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.10'
138
+ version: '1.12'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: erubis
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -283,14 +283,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
283
283
  requirements:
284
284
  - - ">="
285
285
  - !ruby/object:Gem::Version
286
- version: '2.4'
286
+ version: '2.6'
287
287
  required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  requirements:
289
289
  - - ">="
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
- rubygems_version: 3.2.15
293
+ rubygems_version: 3.3.3
294
294
  signing_key:
295
295
  specification_version: 4
296
296
  summary: EBNF parser and parser generator in Ruby.