abnftt 0.2.10 → 0.2.11
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 +43 -7
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce0bd11b56d3a9d3c55db976ef351ec25268dd76ec2a6871c8871e4d8346af6f
|
|
4
|
+
data.tar.gz: 163ecb90fd7b1c67671e471566e8e0d4d41c896ffe81a6035b4b6240cd701a28
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dbecedf01cdb747a8ac4d3f85924b68b55466c82b73e980a168b7b73017c75b6c7b33b5690db2ffe0f30ee51872cc67f960a214308d8f15e568be8695c2fef46
|
|
7
|
+
data.tar.gz: c56a18742093e06f885884a24480b349115b0392573206d319c9170bd1e9723cf9db4e1fbe6e94419bbb9718e4040d2077498d4e16192606772959ff6b32bec0
|
data/abnftt.gemspec
CHANGED
data/lib/abnfgrammar.rb
CHANGED
|
@@ -2540,6 +2540,16 @@ module ABNFGrammar
|
|
|
2540
2540
|
end
|
|
2541
2541
|
|
|
2542
2542
|
module InlineModule2
|
|
2543
|
+
def rulename
|
|
2544
|
+
elements[1]
|
|
2545
|
+
end
|
|
2546
|
+
end
|
|
2547
|
+
|
|
2548
|
+
module InlineModule3
|
|
2549
|
+
def ast_wrap(a) ["im", a, text_value] end
|
|
2550
|
+
end
|
|
2551
|
+
|
|
2552
|
+
module InlineModule4
|
|
2543
2553
|
def ast_wrap(a) a end
|
|
2544
2554
|
end
|
|
2545
2555
|
|
|
@@ -2585,20 +2595,46 @@ module ABNFGrammar
|
|
|
2585
2595
|
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
2586
2596
|
r0 = r1
|
|
2587
2597
|
else
|
|
2588
|
-
|
|
2589
|
-
|
|
2598
|
+
i5, s5 = index, []
|
|
2599
|
+
if has_terminal?(@regexps[gr = '\A[&!]'] ||= Regexp.new(gr), :regexp, index)
|
|
2600
|
+
r6 = true
|
|
2601
|
+
@index += 1
|
|
2602
|
+
else
|
|
2603
|
+
terminal_parse_failure('[&!]')
|
|
2604
|
+
r6 = nil
|
|
2605
|
+
end
|
|
2606
|
+
s5 << r6
|
|
2607
|
+
if r6
|
|
2608
|
+
r7 = _nt_rulename
|
|
2609
|
+
s5 << r7
|
|
2610
|
+
end
|
|
2611
|
+
if s5.last
|
|
2612
|
+
r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
|
|
2590
2613
|
r5.extend(InlineModule2)
|
|
2591
|
-
|
|
2614
|
+
r5.extend(InlineModule3)
|
|
2592
2615
|
else
|
|
2593
|
-
|
|
2616
|
+
@index = i5
|
|
2594
2617
|
r5 = nil
|
|
2595
2618
|
end
|
|
2596
2619
|
if r5
|
|
2597
2620
|
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
2598
2621
|
r0 = r5
|
|
2599
2622
|
else
|
|
2600
|
-
|
|
2601
|
-
|
|
2623
|
+
if (match_len = has_terminal?('', false, index))
|
|
2624
|
+
r8 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
|
2625
|
+
r8.extend(InlineModule4)
|
|
2626
|
+
@index += match_len
|
|
2627
|
+
else
|
|
2628
|
+
terminal_parse_failure('\'\'')
|
|
2629
|
+
r8 = nil
|
|
2630
|
+
end
|
|
2631
|
+
if r8
|
|
2632
|
+
r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
|
|
2633
|
+
r0 = r8
|
|
2634
|
+
else
|
|
2635
|
+
@index = i0
|
|
2636
|
+
r0 = nil
|
|
2637
|
+
end
|
|
2602
2638
|
end
|
|
2603
2639
|
end
|
|
2604
2640
|
|
|
@@ -2613,6 +2649,6 @@ module ABNFGrammar
|
|
|
2613
2649
|
end
|
|
2614
2650
|
end
|
|
2615
2651
|
|
|
2616
|
-
ABNFGrammarParser = ABNFGrammar::Parser
|
|
2652
|
+
(remove_const(:ABNFGrammarParser) if const_defined?(:ABNFGrammarParser)) rescue nil; ABNFGrammarParser = ABNFGrammar::Parser
|
|
2617
2653
|
|
|
2618
2654
|
|
metadata
CHANGED
|
@@ -1,13 +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.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carsten Bormann
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: Less shifty support for tools based on IETF's ABNF
|
|
13
13
|
email: cabo@tzi.org
|
|
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
48
|
version: '0'
|
|
49
49
|
requirements: []
|
|
50
|
-
rubygems_version:
|
|
50
|
+
rubygems_version: 4.0.8
|
|
51
51
|
specification_version: 4
|
|
52
52
|
summary: RFC 5234+7405 ABNF to Treetop
|
|
53
53
|
test_files: []
|