abnftt 0.2.9 → 0.2.10
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 +4 -4
- data/abnftt.gemspec +1 -1
- data/lib/abnfgrammar.rb +44 -13
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a087059291d32ed775f03eb1c32af6b495f84ecbaa5769fb6063f8ec649e67d
|
4
|
+
data.tar.gz: b3fc37446f104478bee6dfc52e762ea173368c00a3b4d11a677259b05cd29bb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaab019ed235a73be1f8089d7764b43295ff94c95ff90bc81689b513a922f5a245c089a985309bb68911c2555c1411a977f943b663340bc8853ded08c01251d3
|
7
|
+
data.tar.gz: 6476cb791739a7345468ba71d379924712bb94331a987104ee5d24551f8e0ea0b54b624a037c107524b18455bb5d4628dd0546bacf82fe0479f885536b533986
|
data/abnftt.gemspec
CHANGED
data/lib/abnfgrammar.rb
CHANGED
@@ -2530,10 +2530,16 @@ module ABNFGrammar
|
|
2530
2530
|
end
|
2531
2531
|
|
2532
2532
|
module InlineModule0
|
2533
|
-
def
|
2533
|
+
def inline_module1
|
2534
|
+
elements[1]
|
2535
|
+
end
|
2534
2536
|
end
|
2535
2537
|
|
2536
2538
|
module InlineModule1
|
2539
|
+
def ast_wrap(a) ["im", a, text_value] end
|
2540
|
+
end
|
2541
|
+
|
2542
|
+
module InlineModule2
|
2537
2543
|
def ast_wrap(a) a end
|
2538
2544
|
end
|
2539
2545
|
|
@@ -2549,24 +2555,47 @@ module ABNFGrammar
|
|
2549
2555
|
end
|
2550
2556
|
|
2551
2557
|
i0 = index
|
2552
|
-
|
2553
|
-
|
2554
|
-
|
2558
|
+
i1, s1 = index, []
|
2559
|
+
if (match_len = has_terminal?('&', false, index))
|
2560
|
+
r3 = true
|
2561
|
+
@index += match_len
|
2562
|
+
else
|
2563
|
+
terminal_parse_failure('\'&\'')
|
2564
|
+
r3 = nil
|
2565
|
+
end
|
2566
|
+
if r3
|
2567
|
+
r2 = r3
|
2568
|
+
else
|
2569
|
+
r2 = instantiate_node(SyntaxNode,input, index...index)
|
2570
|
+
end
|
2571
|
+
s1 << r2
|
2572
|
+
if r2
|
2573
|
+
r4 = _nt_inline_module1
|
2574
|
+
s1 << r4
|
2575
|
+
end
|
2576
|
+
if s1.last
|
2577
|
+
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
2578
|
+
r1.extend(InlineModule0)
|
2579
|
+
r1.extend(InlineModule1)
|
2580
|
+
else
|
2581
|
+
@index = i1
|
2582
|
+
r1 = nil
|
2583
|
+
end
|
2555
2584
|
if r1
|
2556
2585
|
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
2557
2586
|
r0 = r1
|
2558
2587
|
else
|
2559
2588
|
if (match_len = has_terminal?('', false, index))
|
2560
|
-
|
2561
|
-
|
2589
|
+
r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2590
|
+
r5.extend(InlineModule2)
|
2562
2591
|
@index += match_len
|
2563
2592
|
else
|
2564
2593
|
terminal_parse_failure('\'\'')
|
2565
|
-
|
2594
|
+
r5 = nil
|
2566
2595
|
end
|
2567
|
-
if
|
2568
|
-
|
2569
|
-
r0 =
|
2596
|
+
if r5
|
2597
|
+
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
2598
|
+
r0 = r5
|
2570
2599
|
else
|
2571
2600
|
@index = i0
|
2572
2601
|
r0 = nil
|
@@ -2578,10 +2607,12 @@ module ABNFGrammar
|
|
2578
2607
|
r0
|
2579
2608
|
end
|
2580
2609
|
|
2581
|
-
end
|
2582
2610
|
|
2583
|
-
class
|
2584
|
-
|
2611
|
+
class Parser < Treetop::Runtime::CompiledParser
|
2612
|
+
include ABNFGrammar
|
2613
|
+
end
|
2585
2614
|
end
|
2586
2615
|
|
2616
|
+
ABNFGrammarParser = ABNFGrammar::Parser
|
2617
|
+
|
2587
2618
|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abnftt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-
|
10
|
+
date: 2025-04-29 00:00:00.000000000 Z
|
12
11
|
dependencies: []
|
13
12
|
description: Less shifty support for tools based on IETF's ABNF
|
14
13
|
email: cabo@tzi.org
|
@@ -34,7 +33,6 @@ homepage: http://github.com/cabo/abnftt
|
|
34
33
|
licenses:
|
35
34
|
- MIT
|
36
35
|
metadata: {}
|
37
|
-
post_install_message:
|
38
36
|
rdoc_options: []
|
39
37
|
require_paths:
|
40
38
|
- lib
|
@@ -49,8 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
47
|
- !ruby/object:Gem::Version
|
50
48
|
version: '0'
|
51
49
|
requirements: []
|
52
|
-
rubygems_version: 3.
|
53
|
-
signing_key:
|
50
|
+
rubygems_version: 3.6.2
|
54
51
|
specification_version: 4
|
55
52
|
summary: RFC 5234+7405 ABNF to Treetop
|
56
53
|
test_files: []
|