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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 85cafe36108ed3986c52918b7c00524bfef215242bbc832eeeb0d97f4a4d86bb
|
|
4
|
+
data.tar.gz: d229b89c5b841c33d42c5c49bb69a26ba3ece2008294d298d0c50274286a46f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
4237
|
-
|
|
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
|
|
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
|
data/lib/treetop/version.rb
CHANGED
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.
|
|
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:
|
|
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.
|
|
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
|