treetop 1.6.12 → 1.6.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5717056d3dbb9b543f988059dcd86c2b5789eac8912591c366bb36db9803ce09
4
- data.tar.gz: 143894fceb89a090a1a558733ebda88cd9af044c9fdcd37043ae2e7c80d018e3
3
+ metadata.gz: 85cafe36108ed3986c52918b7c00524bfef215242bbc832eeeb0d97f4a4d86bb
4
+ data.tar.gz: d229b89c5b841c33d42c5c49bb69a26ba3ece2008294d298d0c50274286a46f9
5
5
  SHA512:
6
- metadata.gz: 67a3c52c5a7fd0203f927e3a2cea9e433a634dbe1c016afc6375a0e5ebd4b7005f11e85623334996fc0a6c3564e866c1bd47c4dbbe7ce5b0f18697caec05f198
7
- data.tar.gz: ffec456f918bece9ea9ede24df590d6c87622ae93541f0189bf1fe26205f997a42b7268c3a466a11b5e4007fc53a4b34111e4c9a48fcf50152c76afd393ae6ed
6
+ metadata.gz: b14f976d9c332f66cecab07736cdf6cce44c6f30332161c7b1c2446db9dfcc4cb21941158a6835294dec836645acd5c37d618a35899c47a60cbfb0134685be5c
7
+ data.tar.gz: 3da6264ff6ed120dbbae4361f4149b1e5c654e32e89f487ab999f3df7e6b4ce5f6a8d0e701f2f4258b53a67250371da975e0725c3d7a3a8bc9ebfc88b95fb263
@@ -4231,11 +4231,13 @@ module Treetop
4231
4231
  r0
4232
4232
  end
4233
4233
 
4234
- end
4235
4234
 
4236
- class MetagrammarParser < Treetop::Runtime::CompiledParser
4237
- include Metagrammar
4235
+ class Parser < Treetop::Runtime::CompiledParser
4236
+ include Metagrammar
4237
+ end
4238
4238
  end
4239
4239
 
4240
+ MetagrammarParser = Metagrammar::Parser
4241
+
4240
4242
  end
4241
4243
  end
@@ -3,26 +3,28 @@ module Treetop
3
3
  class Grammar < Runtime::SyntaxNode
4
4
  def compile
5
5
  builder = RubyBuilder.new
6
-
6
+
7
7
  builder.module_declaration "#{grammar_name.text_value}" do
8
8
  builder.in(indent_level) # account for initial indentation of grammar declaration
9
9
  builder << "include Treetop::Runtime"
10
10
  builder.newline
11
11
  declaration_sequence.compile(builder)
12
+ builder.newline
13
+ builder.class_declaration "Parser < Treetop::Runtime::CompiledParser" do
14
+ builder << "include #{grammar_name.text_value}"
15
+ end
12
16
  end
13
17
  builder.newline
14
- builder.class_declaration "#{parser_name} < Treetop::Runtime::CompiledParser" do
15
- builder << "include #{grammar_name.text_value}"
16
- end
18
+ builder << "#{parser_name} = #{grammar_name.text_value}::Parser"
17
19
  end
18
-
20
+
19
21
  def indent_level
20
22
  input.column_of(interval.begin) - 1
21
23
  end
22
-
24
+
23
25
  def parser_name
24
26
  grammar_name.text_value + 'Parser'
25
27
  end
26
28
  end
27
- end
29
+ end
28
30
  end
@@ -2,7 +2,7 @@ module Treetop #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 6
5
- TINY = 12
5
+ TINY = 14
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: treetop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.12
4
+ version: 1.6.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Sobo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-11-25 00:00:00.000000000 Z
12
+ date: 2025-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polyglot
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  - !ruby/object:Gem::Version
199
199
  version: '0'
200
200
  requirements: []
201
- rubygems_version: 3.2.22
201
+ rubygems_version: 3.0.3.1
202
202
  signing_key:
203
203
  specification_version: 4
204
204
  summary: A Ruby-based text parsing and interpretation DSL