edn-abnf 0.5.32 → 0.5.33
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/edn-abnf.gemspec +1 -1
- data/lib/parser/edngrammar.rb +1044 -23
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc4cf907d32b47cc51a4326a110558a79a25ba4733873a5d6d84fd52f4e54903
|
|
4
|
+
data.tar.gz: 5424613f24e9fb8defca526961a428bba49832c57e952e848d8cbdd1b7a06f99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a0b733fbad7e31b0f371fb832c86e958476ee29da4a83d06673b216829cca62a7262f719d378480a9f315997554883df44b1fddbe47082c4af28c14727e630d1
|
|
7
|
+
data.tar.gz: 54abb14762231cfb8dbfd87a21b4f86594f0cbcc666f3333920dd2922f104f41a4cb9fc9277376dee952b831a92c563a056c6485dbf79e3a6e7e088272d1e39e
|
data/edn-abnf.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "edn-abnf"
|
|
3
|
-
s.version = "0.5.
|
|
3
|
+
s.version = "0.5.33"
|
|
4
4
|
s.summary = "CBOR Extended Diagnostic Notation (EDN) implemented in ABNF"
|
|
5
5
|
s.description = %q{edn-abnf implements converters and miscellaneous tools for CBOR EDN's ABNF}
|
|
6
6
|
s.author = "Carsten Bormann"
|
data/lib/parser/edngrammar.rb
CHANGED
|
@@ -2634,6 +2634,28 @@ module EDNGRAMMAR
|
|
|
2634
2634
|
def ast; elements[0].ast end
|
|
2635
2635
|
end
|
|
2636
2636
|
|
|
2637
|
+
module Bstr8
|
|
2638
|
+
def sq_app_string_dt
|
|
2639
|
+
elements[0]
|
|
2640
|
+
end
|
|
2641
|
+
|
|
2642
|
+
end
|
|
2643
|
+
|
|
2644
|
+
module Bstr9
|
|
2645
|
+
def ast; elements[0].ast end
|
|
2646
|
+
end
|
|
2647
|
+
|
|
2648
|
+
module Bstr10
|
|
2649
|
+
def raw_app_string_dt
|
|
2650
|
+
elements[0]
|
|
2651
|
+
end
|
|
2652
|
+
|
|
2653
|
+
end
|
|
2654
|
+
|
|
2655
|
+
module Bstr11
|
|
2656
|
+
def ast; elements[0].ast end
|
|
2657
|
+
end
|
|
2658
|
+
|
|
2637
2659
|
def _nt_bstr
|
|
2638
2660
|
start_index = index
|
|
2639
2661
|
if node_cache[:bstr].has_key?(index)
|
|
@@ -2766,38 +2788,100 @@ module EDNGRAMMAR
|
|
|
2766
2788
|
r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
|
|
2767
2789
|
r0 = r13
|
|
2768
2790
|
else
|
|
2769
|
-
|
|
2791
|
+
i17, s17 = index, []
|
|
2792
|
+
r18 = _nt_sq_app_string_dt
|
|
2793
|
+
s17 << r18
|
|
2794
|
+
if r18
|
|
2795
|
+
i19 = index
|
|
2796
|
+
r20 = lambda {|x|$options.integrated}.call(s17)
|
|
2797
|
+
if !r20
|
|
2798
|
+
terminal_parse_failure("<semantic predicate>")
|
|
2799
|
+
end
|
|
2800
|
+
if r20
|
|
2801
|
+
@index = i19
|
|
2802
|
+
r19 = instantiate_node(SyntaxNode,input, index...index)
|
|
2803
|
+
else
|
|
2804
|
+
@index = i19
|
|
2805
|
+
r19 = nil
|
|
2806
|
+
end
|
|
2807
|
+
s17 << r19
|
|
2808
|
+
end
|
|
2809
|
+
if s17.last
|
|
2810
|
+
r17 = instantiate_node(SyntaxNode,input, i17...index, s17)
|
|
2811
|
+
r17.extend(Bstr8)
|
|
2812
|
+
r17.extend(Bstr9)
|
|
2813
|
+
else
|
|
2814
|
+
@index = i17
|
|
2815
|
+
r17 = nil
|
|
2816
|
+
end
|
|
2770
2817
|
if r17
|
|
2771
2818
|
r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true
|
|
2772
2819
|
r0 = r17
|
|
2773
2820
|
else
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2821
|
+
i21, s21 = index, []
|
|
2822
|
+
r22 = _nt_raw_app_string_dt
|
|
2823
|
+
s21 << r22
|
|
2824
|
+
if r22
|
|
2825
|
+
i23 = index
|
|
2826
|
+
r24 = lambda {|x|$options.integrated}.call(s21)
|
|
2827
|
+
if !r24
|
|
2828
|
+
terminal_parse_failure("<semantic predicate>")
|
|
2829
|
+
end
|
|
2830
|
+
if r24
|
|
2831
|
+
@index = i23
|
|
2832
|
+
r23 = instantiate_node(SyntaxNode,input, index...index)
|
|
2833
|
+
else
|
|
2834
|
+
@index = i23
|
|
2835
|
+
r23 = nil
|
|
2836
|
+
end
|
|
2837
|
+
s21 << r23
|
|
2838
|
+
end
|
|
2839
|
+
if s21.last
|
|
2840
|
+
r21 = instantiate_node(SyntaxNode,input, i21...index, s21)
|
|
2841
|
+
r21.extend(Bstr10)
|
|
2842
|
+
r21.extend(Bstr11)
|
|
2778
2843
|
else
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2844
|
+
@index = i21
|
|
2845
|
+
r21 = nil
|
|
2846
|
+
end
|
|
2847
|
+
if r21
|
|
2848
|
+
r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true
|
|
2849
|
+
r0 = r21
|
|
2850
|
+
else
|
|
2851
|
+
r25 = _nt_app_string
|
|
2852
|
+
if r25
|
|
2853
|
+
r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true
|
|
2854
|
+
r0 = r25
|
|
2783
2855
|
else
|
|
2784
|
-
|
|
2785
|
-
if
|
|
2786
|
-
|
|
2787
|
-
r0 =
|
|
2856
|
+
r26 = _nt_sqstr
|
|
2857
|
+
if r26
|
|
2858
|
+
r26 = SyntaxNode.new(input, (index-1)...index) if r26 == true
|
|
2859
|
+
r0 = r26
|
|
2788
2860
|
else
|
|
2789
|
-
|
|
2790
|
-
if
|
|
2791
|
-
|
|
2792
|
-
r0 =
|
|
2861
|
+
r27 = _nt_app_rstring
|
|
2862
|
+
if r27
|
|
2863
|
+
r27 = SyntaxNode.new(input, (index-1)...index) if r27 == true
|
|
2864
|
+
r0 = r27
|
|
2793
2865
|
else
|
|
2794
|
-
|
|
2795
|
-
if
|
|
2796
|
-
|
|
2797
|
-
r0 =
|
|
2866
|
+
r28 = _nt_rawstring
|
|
2867
|
+
if r28
|
|
2868
|
+
r28 = SyntaxNode.new(input, (index-1)...index) if r28 == true
|
|
2869
|
+
r0 = r28
|
|
2798
2870
|
else
|
|
2799
|
-
|
|
2800
|
-
|
|
2871
|
+
r29 = _nt_app_sequence
|
|
2872
|
+
if r29
|
|
2873
|
+
r29 = SyntaxNode.new(input, (index-1)...index) if r29 == true
|
|
2874
|
+
r0 = r29
|
|
2875
|
+
else
|
|
2876
|
+
r30 = _nt_embedded
|
|
2877
|
+
if r30
|
|
2878
|
+
r30 = SyntaxNode.new(input, (index-1)...index) if r30 == true
|
|
2879
|
+
r0 = r30
|
|
2880
|
+
else
|
|
2881
|
+
@index = i0
|
|
2882
|
+
r0 = nil
|
|
2883
|
+
end
|
|
2884
|
+
end
|
|
2801
2885
|
end
|
|
2802
2886
|
end
|
|
2803
2887
|
end
|
|
@@ -11603,6 +11687,943 @@ module EDNGRAMMAR
|
|
|
11603
11687
|
r0
|
|
11604
11688
|
end
|
|
11605
11689
|
|
|
11690
|
+
def _nt_app_string_dt_prefix
|
|
11691
|
+
start_index = index
|
|
11692
|
+
if node_cache[:app_string_dt_prefix].has_key?(index)
|
|
11693
|
+
cached = node_cache[:app_string_dt_prefix][index]
|
|
11694
|
+
if cached
|
|
11695
|
+
node_cache[:app_string_dt_prefix][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
11696
|
+
@index = cached.interval.end
|
|
11697
|
+
end
|
|
11698
|
+
return cached
|
|
11699
|
+
end
|
|
11700
|
+
|
|
11701
|
+
i0 = index
|
|
11702
|
+
if (match_len = has_terminal?("dt", false, index))
|
|
11703
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
|
11704
|
+
@index += match_len
|
|
11705
|
+
else
|
|
11706
|
+
terminal_parse_failure('"dt"')
|
|
11707
|
+
r1 = nil
|
|
11708
|
+
end
|
|
11709
|
+
if r1
|
|
11710
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
11711
|
+
r0 = r1
|
|
11712
|
+
else
|
|
11713
|
+
if (match_len = has_terminal?("DT", false, index))
|
|
11714
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
|
11715
|
+
@index += match_len
|
|
11716
|
+
else
|
|
11717
|
+
terminal_parse_failure('"DT"')
|
|
11718
|
+
r2 = nil
|
|
11719
|
+
end
|
|
11720
|
+
if r2
|
|
11721
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
11722
|
+
r0 = r2
|
|
11723
|
+
else
|
|
11724
|
+
@index = i0
|
|
11725
|
+
r0 = nil
|
|
11726
|
+
end
|
|
11727
|
+
end
|
|
11728
|
+
|
|
11729
|
+
node_cache[:app_string_dt_prefix][start_index] = r0
|
|
11730
|
+
|
|
11731
|
+
r0
|
|
11732
|
+
end
|
|
11733
|
+
|
|
11734
|
+
module SqAppStringDt0
|
|
11735
|
+
def app_string_dt_prefix
|
|
11736
|
+
elements[0]
|
|
11737
|
+
end
|
|
11738
|
+
|
|
11739
|
+
def SQUOTE1
|
|
11740
|
+
elements[1]
|
|
11741
|
+
end
|
|
11742
|
+
|
|
11743
|
+
def app_string_dt
|
|
11744
|
+
elements[2]
|
|
11745
|
+
end
|
|
11746
|
+
|
|
11747
|
+
def SQUOTE2
|
|
11748
|
+
elements[3]
|
|
11749
|
+
end
|
|
11750
|
+
end
|
|
11751
|
+
|
|
11752
|
+
module SqAppStringDt1
|
|
11753
|
+
def ast
|
|
11754
|
+
CBOR_DIAG::App_dt.decode(app_string_dt_prefix.text_value, app_string_dt.ast)
|
|
11755
|
+
end
|
|
11756
|
+
end
|
|
11757
|
+
|
|
11758
|
+
def _nt_sq_app_string_dt
|
|
11759
|
+
start_index = index
|
|
11760
|
+
if node_cache[:sq_app_string_dt].has_key?(index)
|
|
11761
|
+
cached = node_cache[:sq_app_string_dt][index]
|
|
11762
|
+
if cached
|
|
11763
|
+
node_cache[:sq_app_string_dt][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
11764
|
+
@index = cached.interval.end
|
|
11765
|
+
end
|
|
11766
|
+
return cached
|
|
11767
|
+
end
|
|
11768
|
+
|
|
11769
|
+
i0, s0 = index, []
|
|
11770
|
+
r1 = _nt_app_string_dt_prefix
|
|
11771
|
+
s0 << r1
|
|
11772
|
+
if r1
|
|
11773
|
+
r2 = _nt_SQUOTE
|
|
11774
|
+
s0 << r2
|
|
11775
|
+
if r2
|
|
11776
|
+
r3 = _nt_app_string_dt
|
|
11777
|
+
s0 << r3
|
|
11778
|
+
if r3
|
|
11779
|
+
r4 = _nt_SQUOTE
|
|
11780
|
+
s0 << r4
|
|
11781
|
+
end
|
|
11782
|
+
end
|
|
11783
|
+
end
|
|
11784
|
+
if s0.last
|
|
11785
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
11786
|
+
r0.extend(SqAppStringDt0)
|
|
11787
|
+
r0.extend(SqAppStringDt1)
|
|
11788
|
+
else
|
|
11789
|
+
@index = i0
|
|
11790
|
+
r0 = nil
|
|
11791
|
+
end
|
|
11792
|
+
|
|
11793
|
+
node_cache[:sq_app_string_dt][start_index] = r0
|
|
11794
|
+
|
|
11795
|
+
r0
|
|
11796
|
+
end
|
|
11797
|
+
|
|
11798
|
+
module RawAppStringDt0
|
|
11799
|
+
def app_string_dt_prefix
|
|
11800
|
+
elements[0]
|
|
11801
|
+
end
|
|
11802
|
+
|
|
11803
|
+
def app_string_dt_raw1
|
|
11804
|
+
elements[1]
|
|
11805
|
+
end
|
|
11806
|
+
end
|
|
11807
|
+
|
|
11808
|
+
module RawAppStringDt1
|
|
11809
|
+
def ast
|
|
11810
|
+
CBOR_DIAG::App_dt.decode(app_string_dt_prefix.text_value, app_string_dt_raw1.ast)
|
|
11811
|
+
end
|
|
11812
|
+
end
|
|
11813
|
+
|
|
11814
|
+
def _nt_raw_app_string_dt
|
|
11815
|
+
start_index = index
|
|
11816
|
+
if node_cache[:raw_app_string_dt].has_key?(index)
|
|
11817
|
+
cached = node_cache[:raw_app_string_dt][index]
|
|
11818
|
+
if cached
|
|
11819
|
+
node_cache[:raw_app_string_dt][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
11820
|
+
@index = cached.interval.end
|
|
11821
|
+
end
|
|
11822
|
+
return cached
|
|
11823
|
+
end
|
|
11824
|
+
|
|
11825
|
+
i0, s0 = index, []
|
|
11826
|
+
r1 = _nt_app_string_dt_prefix
|
|
11827
|
+
s0 << r1
|
|
11828
|
+
if r1
|
|
11829
|
+
r2 = _nt_app_string_dt_raw1
|
|
11830
|
+
s0 << r2
|
|
11831
|
+
end
|
|
11832
|
+
if s0.last
|
|
11833
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
11834
|
+
r0.extend(RawAppStringDt0)
|
|
11835
|
+
r0.extend(RawAppStringDt1)
|
|
11836
|
+
else
|
|
11837
|
+
@index = i0
|
|
11838
|
+
r0 = nil
|
|
11839
|
+
end
|
|
11840
|
+
|
|
11841
|
+
node_cache[:raw_app_string_dt][start_index] = r0
|
|
11842
|
+
|
|
11843
|
+
r0
|
|
11844
|
+
end
|
|
11845
|
+
|
|
11846
|
+
module AppStringDtRaw10
|
|
11847
|
+
end
|
|
11848
|
+
|
|
11849
|
+
module AppStringDtRaw11
|
|
11850
|
+
def ast; elements[1].ast; end
|
|
11851
|
+
end
|
|
11852
|
+
|
|
11853
|
+
def _nt_app_string_dt_raw1
|
|
11854
|
+
start_index = index
|
|
11855
|
+
if node_cache[:app_string_dt_raw1].has_key?(index)
|
|
11856
|
+
cached = node_cache[:app_string_dt_raw1][index]
|
|
11857
|
+
if cached
|
|
11858
|
+
node_cache[:app_string_dt_raw1][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
11859
|
+
@index = cached.interval.end
|
|
11860
|
+
end
|
|
11861
|
+
return cached
|
|
11862
|
+
end
|
|
11863
|
+
|
|
11864
|
+
i0, s0 = index, []
|
|
11865
|
+
if (match_len = has_terminal?("`", false, index))
|
|
11866
|
+
r1 = true
|
|
11867
|
+
@index += match_len
|
|
11868
|
+
else
|
|
11869
|
+
terminal_parse_failure('"`"')
|
|
11870
|
+
r1 = nil
|
|
11871
|
+
end
|
|
11872
|
+
s0 << r1
|
|
11873
|
+
if r1
|
|
11874
|
+
i2 = index
|
|
11875
|
+
r3 = _nt_app_string_dt_raw2
|
|
11876
|
+
if r3
|
|
11877
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
11878
|
+
r2 = r3
|
|
11879
|
+
else
|
|
11880
|
+
r4 = _nt_app_string_dt_raw1
|
|
11881
|
+
if r4
|
|
11882
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
|
11883
|
+
r2 = r4
|
|
11884
|
+
else
|
|
11885
|
+
@index = i2
|
|
11886
|
+
r2 = nil
|
|
11887
|
+
end
|
|
11888
|
+
end
|
|
11889
|
+
s0 << r2
|
|
11890
|
+
if r2
|
|
11891
|
+
if (match_len = has_terminal?("`", false, index))
|
|
11892
|
+
r5 = true
|
|
11893
|
+
@index += match_len
|
|
11894
|
+
else
|
|
11895
|
+
terminal_parse_failure('"`"')
|
|
11896
|
+
r5 = nil
|
|
11897
|
+
end
|
|
11898
|
+
s0 << r5
|
|
11899
|
+
end
|
|
11900
|
+
end
|
|
11901
|
+
if s0.last
|
|
11902
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
11903
|
+
r0.extend(AppStringDtRaw10)
|
|
11904
|
+
r0.extend(AppStringDtRaw11)
|
|
11905
|
+
else
|
|
11906
|
+
@index = i0
|
|
11907
|
+
r0 = nil
|
|
11908
|
+
end
|
|
11909
|
+
|
|
11910
|
+
node_cache[:app_string_dt_raw1][start_index] = r0
|
|
11911
|
+
|
|
11912
|
+
r0
|
|
11913
|
+
end
|
|
11914
|
+
|
|
11915
|
+
module AppStringDtRaw20
|
|
11916
|
+
def app_string_dt
|
|
11917
|
+
elements[1]
|
|
11918
|
+
end
|
|
11919
|
+
end
|
|
11920
|
+
|
|
11921
|
+
module AppStringDtRaw21
|
|
11922
|
+
def ast; elements[1].ast; end
|
|
11923
|
+
end
|
|
11924
|
+
|
|
11925
|
+
def _nt_app_string_dt_raw2
|
|
11926
|
+
start_index = index
|
|
11927
|
+
if node_cache[:app_string_dt_raw2].has_key?(index)
|
|
11928
|
+
cached = node_cache[:app_string_dt_raw2][index]
|
|
11929
|
+
if cached
|
|
11930
|
+
node_cache[:app_string_dt_raw2][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
11931
|
+
@index = cached.interval.end
|
|
11932
|
+
end
|
|
11933
|
+
return cached
|
|
11934
|
+
end
|
|
11935
|
+
|
|
11936
|
+
i0, s0 = index, []
|
|
11937
|
+
r2 = _nt_newline
|
|
11938
|
+
if r2
|
|
11939
|
+
r1 = r2
|
|
11940
|
+
else
|
|
11941
|
+
r1 = instantiate_node(SyntaxNode,input, index...index)
|
|
11942
|
+
end
|
|
11943
|
+
s0 << r1
|
|
11944
|
+
if r1
|
|
11945
|
+
r3 = _nt_app_string_dt
|
|
11946
|
+
s0 << r3
|
|
11947
|
+
end
|
|
11948
|
+
if s0.last
|
|
11949
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
11950
|
+
r0.extend(AppStringDtRaw20)
|
|
11951
|
+
r0.extend(AppStringDtRaw21)
|
|
11952
|
+
else
|
|
11953
|
+
@index = i0
|
|
11954
|
+
r0 = nil
|
|
11955
|
+
end
|
|
11956
|
+
|
|
11957
|
+
node_cache[:app_string_dt_raw2][start_index] = r0
|
|
11958
|
+
|
|
11959
|
+
r0
|
|
11960
|
+
end
|
|
11961
|
+
|
|
11962
|
+
module AppStringDt0
|
|
11963
|
+
def ast; text_value; end
|
|
11964
|
+
end
|
|
11965
|
+
|
|
11966
|
+
def _nt_app_string_dt
|
|
11967
|
+
start_index = index
|
|
11968
|
+
if node_cache[:app_string_dt].has_key?(index)
|
|
11969
|
+
cached = node_cache[:app_string_dt][index]
|
|
11970
|
+
if cached
|
|
11971
|
+
node_cache[:app_string_dt][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
11972
|
+
@index = cached.interval.end
|
|
11973
|
+
end
|
|
11974
|
+
return cached
|
|
11975
|
+
end
|
|
11976
|
+
|
|
11977
|
+
r0 = _nt_date_time
|
|
11978
|
+
r0.extend(AppStringDt0)
|
|
11979
|
+
r0.extend(AppStringDt0)
|
|
11980
|
+
|
|
11981
|
+
node_cache[:app_string_dt][start_index] = r0
|
|
11982
|
+
|
|
11983
|
+
r0
|
|
11984
|
+
end
|
|
11985
|
+
|
|
11986
|
+
def _nt_date_fullyear
|
|
11987
|
+
start_index = index
|
|
11988
|
+
if node_cache[:date_fullyear].has_key?(index)
|
|
11989
|
+
cached = node_cache[:date_fullyear][index]
|
|
11990
|
+
if cached
|
|
11991
|
+
node_cache[:date_fullyear][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
11992
|
+
@index = cached.interval.end
|
|
11993
|
+
end
|
|
11994
|
+
return cached
|
|
11995
|
+
end
|
|
11996
|
+
|
|
11997
|
+
s0, i0 = [], index
|
|
11998
|
+
loop do
|
|
11999
|
+
r1 = _nt_DIGIT
|
|
12000
|
+
if r1
|
|
12001
|
+
s0 << r1
|
|
12002
|
+
else
|
|
12003
|
+
break
|
|
12004
|
+
end
|
|
12005
|
+
if s0.size == 4
|
|
12006
|
+
break
|
|
12007
|
+
end
|
|
12008
|
+
end
|
|
12009
|
+
if s0.size < 4
|
|
12010
|
+
@index = i0
|
|
12011
|
+
r0 = nil
|
|
12012
|
+
else
|
|
12013
|
+
if s0.size < 4
|
|
12014
|
+
@terminal_failures.pop
|
|
12015
|
+
end
|
|
12016
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12017
|
+
end
|
|
12018
|
+
|
|
12019
|
+
node_cache[:date_fullyear][start_index] = r0
|
|
12020
|
+
|
|
12021
|
+
r0
|
|
12022
|
+
end
|
|
12023
|
+
|
|
12024
|
+
def _nt_date_month
|
|
12025
|
+
start_index = index
|
|
12026
|
+
if node_cache[:date_month].has_key?(index)
|
|
12027
|
+
cached = node_cache[:date_month][index]
|
|
12028
|
+
if cached
|
|
12029
|
+
node_cache[:date_month][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12030
|
+
@index = cached.interval.end
|
|
12031
|
+
end
|
|
12032
|
+
return cached
|
|
12033
|
+
end
|
|
12034
|
+
|
|
12035
|
+
s0, i0 = [], index
|
|
12036
|
+
loop do
|
|
12037
|
+
r1 = _nt_DIGIT
|
|
12038
|
+
if r1
|
|
12039
|
+
s0 << r1
|
|
12040
|
+
else
|
|
12041
|
+
break
|
|
12042
|
+
end
|
|
12043
|
+
if s0.size == 2
|
|
12044
|
+
break
|
|
12045
|
+
end
|
|
12046
|
+
end
|
|
12047
|
+
if s0.size < 2
|
|
12048
|
+
@index = i0
|
|
12049
|
+
r0 = nil
|
|
12050
|
+
else
|
|
12051
|
+
if s0.size < 2
|
|
12052
|
+
@terminal_failures.pop
|
|
12053
|
+
end
|
|
12054
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12055
|
+
end
|
|
12056
|
+
|
|
12057
|
+
node_cache[:date_month][start_index] = r0
|
|
12058
|
+
|
|
12059
|
+
r0
|
|
12060
|
+
end
|
|
12061
|
+
|
|
12062
|
+
def _nt_date_mday
|
|
12063
|
+
start_index = index
|
|
12064
|
+
if node_cache[:date_mday].has_key?(index)
|
|
12065
|
+
cached = node_cache[:date_mday][index]
|
|
12066
|
+
if cached
|
|
12067
|
+
node_cache[:date_mday][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12068
|
+
@index = cached.interval.end
|
|
12069
|
+
end
|
|
12070
|
+
return cached
|
|
12071
|
+
end
|
|
12072
|
+
|
|
12073
|
+
s0, i0 = [], index
|
|
12074
|
+
loop do
|
|
12075
|
+
r1 = _nt_DIGIT
|
|
12076
|
+
if r1
|
|
12077
|
+
s0 << r1
|
|
12078
|
+
else
|
|
12079
|
+
break
|
|
12080
|
+
end
|
|
12081
|
+
if s0.size == 2
|
|
12082
|
+
break
|
|
12083
|
+
end
|
|
12084
|
+
end
|
|
12085
|
+
if s0.size < 2
|
|
12086
|
+
@index = i0
|
|
12087
|
+
r0 = nil
|
|
12088
|
+
else
|
|
12089
|
+
if s0.size < 2
|
|
12090
|
+
@terminal_failures.pop
|
|
12091
|
+
end
|
|
12092
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12093
|
+
end
|
|
12094
|
+
|
|
12095
|
+
node_cache[:date_mday][start_index] = r0
|
|
12096
|
+
|
|
12097
|
+
r0
|
|
12098
|
+
end
|
|
12099
|
+
|
|
12100
|
+
def _nt_time_hour
|
|
12101
|
+
start_index = index
|
|
12102
|
+
if node_cache[:time_hour].has_key?(index)
|
|
12103
|
+
cached = node_cache[:time_hour][index]
|
|
12104
|
+
if cached
|
|
12105
|
+
node_cache[:time_hour][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12106
|
+
@index = cached.interval.end
|
|
12107
|
+
end
|
|
12108
|
+
return cached
|
|
12109
|
+
end
|
|
12110
|
+
|
|
12111
|
+
s0, i0 = [], index
|
|
12112
|
+
loop do
|
|
12113
|
+
r1 = _nt_DIGIT
|
|
12114
|
+
if r1
|
|
12115
|
+
s0 << r1
|
|
12116
|
+
else
|
|
12117
|
+
break
|
|
12118
|
+
end
|
|
12119
|
+
if s0.size == 2
|
|
12120
|
+
break
|
|
12121
|
+
end
|
|
12122
|
+
end
|
|
12123
|
+
if s0.size < 2
|
|
12124
|
+
@index = i0
|
|
12125
|
+
r0 = nil
|
|
12126
|
+
else
|
|
12127
|
+
if s0.size < 2
|
|
12128
|
+
@terminal_failures.pop
|
|
12129
|
+
end
|
|
12130
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12131
|
+
end
|
|
12132
|
+
|
|
12133
|
+
node_cache[:time_hour][start_index] = r0
|
|
12134
|
+
|
|
12135
|
+
r0
|
|
12136
|
+
end
|
|
12137
|
+
|
|
12138
|
+
def _nt_time_minute
|
|
12139
|
+
start_index = index
|
|
12140
|
+
if node_cache[:time_minute].has_key?(index)
|
|
12141
|
+
cached = node_cache[:time_minute][index]
|
|
12142
|
+
if cached
|
|
12143
|
+
node_cache[:time_minute][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12144
|
+
@index = cached.interval.end
|
|
12145
|
+
end
|
|
12146
|
+
return cached
|
|
12147
|
+
end
|
|
12148
|
+
|
|
12149
|
+
s0, i0 = [], index
|
|
12150
|
+
loop do
|
|
12151
|
+
r1 = _nt_DIGIT
|
|
12152
|
+
if r1
|
|
12153
|
+
s0 << r1
|
|
12154
|
+
else
|
|
12155
|
+
break
|
|
12156
|
+
end
|
|
12157
|
+
if s0.size == 2
|
|
12158
|
+
break
|
|
12159
|
+
end
|
|
12160
|
+
end
|
|
12161
|
+
if s0.size < 2
|
|
12162
|
+
@index = i0
|
|
12163
|
+
r0 = nil
|
|
12164
|
+
else
|
|
12165
|
+
if s0.size < 2
|
|
12166
|
+
@terminal_failures.pop
|
|
12167
|
+
end
|
|
12168
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12169
|
+
end
|
|
12170
|
+
|
|
12171
|
+
node_cache[:time_minute][start_index] = r0
|
|
12172
|
+
|
|
12173
|
+
r0
|
|
12174
|
+
end
|
|
12175
|
+
|
|
12176
|
+
def _nt_time_second
|
|
12177
|
+
start_index = index
|
|
12178
|
+
if node_cache[:time_second].has_key?(index)
|
|
12179
|
+
cached = node_cache[:time_second][index]
|
|
12180
|
+
if cached
|
|
12181
|
+
node_cache[:time_second][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12182
|
+
@index = cached.interval.end
|
|
12183
|
+
end
|
|
12184
|
+
return cached
|
|
12185
|
+
end
|
|
12186
|
+
|
|
12187
|
+
s0, i0 = [], index
|
|
12188
|
+
loop do
|
|
12189
|
+
r1 = _nt_DIGIT
|
|
12190
|
+
if r1
|
|
12191
|
+
s0 << r1
|
|
12192
|
+
else
|
|
12193
|
+
break
|
|
12194
|
+
end
|
|
12195
|
+
if s0.size == 2
|
|
12196
|
+
break
|
|
12197
|
+
end
|
|
12198
|
+
end
|
|
12199
|
+
if s0.size < 2
|
|
12200
|
+
@index = i0
|
|
12201
|
+
r0 = nil
|
|
12202
|
+
else
|
|
12203
|
+
if s0.size < 2
|
|
12204
|
+
@terminal_failures.pop
|
|
12205
|
+
end
|
|
12206
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12207
|
+
end
|
|
12208
|
+
|
|
12209
|
+
node_cache[:time_second][start_index] = r0
|
|
12210
|
+
|
|
12211
|
+
r0
|
|
12212
|
+
end
|
|
12213
|
+
|
|
12214
|
+
module TimeSecfrac0
|
|
12215
|
+
end
|
|
12216
|
+
|
|
12217
|
+
def _nt_time_secfrac
|
|
12218
|
+
start_index = index
|
|
12219
|
+
if node_cache[:time_secfrac].has_key?(index)
|
|
12220
|
+
cached = node_cache[:time_secfrac][index]
|
|
12221
|
+
if cached
|
|
12222
|
+
node_cache[:time_secfrac][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12223
|
+
@index = cached.interval.end
|
|
12224
|
+
end
|
|
12225
|
+
return cached
|
|
12226
|
+
end
|
|
12227
|
+
|
|
12228
|
+
i0, s0 = index, []
|
|
12229
|
+
if (match_len = has_terminal?(".", false, index))
|
|
12230
|
+
r1 = true
|
|
12231
|
+
@index += match_len
|
|
12232
|
+
else
|
|
12233
|
+
terminal_parse_failure('"."')
|
|
12234
|
+
r1 = nil
|
|
12235
|
+
end
|
|
12236
|
+
s0 << r1
|
|
12237
|
+
if r1
|
|
12238
|
+
s2, i2 = [], index
|
|
12239
|
+
loop do
|
|
12240
|
+
r3 = _nt_DIGIT
|
|
12241
|
+
if r3
|
|
12242
|
+
s2 << r3
|
|
12243
|
+
else
|
|
12244
|
+
break
|
|
12245
|
+
end
|
|
12246
|
+
end
|
|
12247
|
+
if s2.empty?
|
|
12248
|
+
@index = i2
|
|
12249
|
+
r2 = nil
|
|
12250
|
+
else
|
|
12251
|
+
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
|
12252
|
+
end
|
|
12253
|
+
s0 << r2
|
|
12254
|
+
end
|
|
12255
|
+
if s0.last
|
|
12256
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12257
|
+
r0.extend(TimeSecfrac0)
|
|
12258
|
+
else
|
|
12259
|
+
@index = i0
|
|
12260
|
+
r0 = nil
|
|
12261
|
+
end
|
|
12262
|
+
|
|
12263
|
+
node_cache[:time_secfrac][start_index] = r0
|
|
12264
|
+
|
|
12265
|
+
r0
|
|
12266
|
+
end
|
|
12267
|
+
|
|
12268
|
+
module TimeNumoffset0
|
|
12269
|
+
def time_hour
|
|
12270
|
+
elements[1]
|
|
12271
|
+
end
|
|
12272
|
+
|
|
12273
|
+
def time_minute
|
|
12274
|
+
elements[3]
|
|
12275
|
+
end
|
|
12276
|
+
end
|
|
12277
|
+
|
|
12278
|
+
def _nt_time_numoffset
|
|
12279
|
+
start_index = index
|
|
12280
|
+
if node_cache[:time_numoffset].has_key?(index)
|
|
12281
|
+
cached = node_cache[:time_numoffset][index]
|
|
12282
|
+
if cached
|
|
12283
|
+
node_cache[:time_numoffset][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12284
|
+
@index = cached.interval.end
|
|
12285
|
+
end
|
|
12286
|
+
return cached
|
|
12287
|
+
end
|
|
12288
|
+
|
|
12289
|
+
i0, s0 = index, []
|
|
12290
|
+
i1 = index
|
|
12291
|
+
if (match_len = has_terminal?("+", false, index))
|
|
12292
|
+
r2 = true
|
|
12293
|
+
@index += match_len
|
|
12294
|
+
else
|
|
12295
|
+
terminal_parse_failure('"+"')
|
|
12296
|
+
r2 = nil
|
|
12297
|
+
end
|
|
12298
|
+
if r2
|
|
12299
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
12300
|
+
r1 = r2
|
|
12301
|
+
else
|
|
12302
|
+
if (match_len = has_terminal?("-", false, index))
|
|
12303
|
+
r3 = true
|
|
12304
|
+
@index += match_len
|
|
12305
|
+
else
|
|
12306
|
+
terminal_parse_failure('"-"')
|
|
12307
|
+
r3 = nil
|
|
12308
|
+
end
|
|
12309
|
+
if r3
|
|
12310
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
12311
|
+
r1 = r3
|
|
12312
|
+
else
|
|
12313
|
+
@index = i1
|
|
12314
|
+
r1 = nil
|
|
12315
|
+
end
|
|
12316
|
+
end
|
|
12317
|
+
s0 << r1
|
|
12318
|
+
if r1
|
|
12319
|
+
r4 = _nt_time_hour
|
|
12320
|
+
s0 << r4
|
|
12321
|
+
if r4
|
|
12322
|
+
if (match_len = has_terminal?(":", false, index))
|
|
12323
|
+
r5 = true
|
|
12324
|
+
@index += match_len
|
|
12325
|
+
else
|
|
12326
|
+
terminal_parse_failure('":"')
|
|
12327
|
+
r5 = nil
|
|
12328
|
+
end
|
|
12329
|
+
s0 << r5
|
|
12330
|
+
if r5
|
|
12331
|
+
r6 = _nt_time_minute
|
|
12332
|
+
s0 << r6
|
|
12333
|
+
end
|
|
12334
|
+
end
|
|
12335
|
+
end
|
|
12336
|
+
if s0.last
|
|
12337
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12338
|
+
r0.extend(TimeNumoffset0)
|
|
12339
|
+
else
|
|
12340
|
+
@index = i0
|
|
12341
|
+
r0 = nil
|
|
12342
|
+
end
|
|
12343
|
+
|
|
12344
|
+
node_cache[:time_numoffset][start_index] = r0
|
|
12345
|
+
|
|
12346
|
+
r0
|
|
12347
|
+
end
|
|
12348
|
+
|
|
12349
|
+
def _nt_time_offset
|
|
12350
|
+
start_index = index
|
|
12351
|
+
if node_cache[:time_offset].has_key?(index)
|
|
12352
|
+
cached = node_cache[:time_offset][index]
|
|
12353
|
+
if cached
|
|
12354
|
+
node_cache[:time_offset][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12355
|
+
@index = cached.interval.end
|
|
12356
|
+
end
|
|
12357
|
+
return cached
|
|
12358
|
+
end
|
|
12359
|
+
|
|
12360
|
+
i0 = index
|
|
12361
|
+
if (match_len = has_terminal?("z", :insens, index))
|
|
12362
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
|
12363
|
+
@index += match_len
|
|
12364
|
+
else
|
|
12365
|
+
terminal_parse_failure('"Z"')
|
|
12366
|
+
r1 = nil
|
|
12367
|
+
end
|
|
12368
|
+
if r1
|
|
12369
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
12370
|
+
r0 = r1
|
|
12371
|
+
else
|
|
12372
|
+
r2 = _nt_time_numoffset
|
|
12373
|
+
if r2
|
|
12374
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
12375
|
+
r0 = r2
|
|
12376
|
+
else
|
|
12377
|
+
@index = i0
|
|
12378
|
+
r0 = nil
|
|
12379
|
+
end
|
|
12380
|
+
end
|
|
12381
|
+
|
|
12382
|
+
node_cache[:time_offset][start_index] = r0
|
|
12383
|
+
|
|
12384
|
+
r0
|
|
12385
|
+
end
|
|
12386
|
+
|
|
12387
|
+
module PartialTime0
|
|
12388
|
+
def time_hour
|
|
12389
|
+
elements[0]
|
|
12390
|
+
end
|
|
12391
|
+
|
|
12392
|
+
def time_minute
|
|
12393
|
+
elements[2]
|
|
12394
|
+
end
|
|
12395
|
+
|
|
12396
|
+
def time_second
|
|
12397
|
+
elements[4]
|
|
12398
|
+
end
|
|
12399
|
+
|
|
12400
|
+
end
|
|
12401
|
+
|
|
12402
|
+
def _nt_partial_time
|
|
12403
|
+
start_index = index
|
|
12404
|
+
if node_cache[:partial_time].has_key?(index)
|
|
12405
|
+
cached = node_cache[:partial_time][index]
|
|
12406
|
+
if cached
|
|
12407
|
+
node_cache[:partial_time][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12408
|
+
@index = cached.interval.end
|
|
12409
|
+
end
|
|
12410
|
+
return cached
|
|
12411
|
+
end
|
|
12412
|
+
|
|
12413
|
+
i0, s0 = index, []
|
|
12414
|
+
r1 = _nt_time_hour
|
|
12415
|
+
s0 << r1
|
|
12416
|
+
if r1
|
|
12417
|
+
if (match_len = has_terminal?(":", false, index))
|
|
12418
|
+
r2 = true
|
|
12419
|
+
@index += match_len
|
|
12420
|
+
else
|
|
12421
|
+
terminal_parse_failure('":"')
|
|
12422
|
+
r2 = nil
|
|
12423
|
+
end
|
|
12424
|
+
s0 << r2
|
|
12425
|
+
if r2
|
|
12426
|
+
r3 = _nt_time_minute
|
|
12427
|
+
s0 << r3
|
|
12428
|
+
if r3
|
|
12429
|
+
if (match_len = has_terminal?(":", false, index))
|
|
12430
|
+
r4 = true
|
|
12431
|
+
@index += match_len
|
|
12432
|
+
else
|
|
12433
|
+
terminal_parse_failure('":"')
|
|
12434
|
+
r4 = nil
|
|
12435
|
+
end
|
|
12436
|
+
s0 << r4
|
|
12437
|
+
if r4
|
|
12438
|
+
r5 = _nt_time_second
|
|
12439
|
+
s0 << r5
|
|
12440
|
+
if r5
|
|
12441
|
+
r7 = _nt_time_secfrac
|
|
12442
|
+
if r7
|
|
12443
|
+
r6 = r7
|
|
12444
|
+
else
|
|
12445
|
+
r6 = instantiate_node(SyntaxNode,input, index...index)
|
|
12446
|
+
end
|
|
12447
|
+
s0 << r6
|
|
12448
|
+
end
|
|
12449
|
+
end
|
|
12450
|
+
end
|
|
12451
|
+
end
|
|
12452
|
+
end
|
|
12453
|
+
if s0.last
|
|
12454
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12455
|
+
r0.extend(PartialTime0)
|
|
12456
|
+
else
|
|
12457
|
+
@index = i0
|
|
12458
|
+
r0 = nil
|
|
12459
|
+
end
|
|
12460
|
+
|
|
12461
|
+
node_cache[:partial_time][start_index] = r0
|
|
12462
|
+
|
|
12463
|
+
r0
|
|
12464
|
+
end
|
|
12465
|
+
|
|
12466
|
+
module FullDate0
|
|
12467
|
+
def date_fullyear
|
|
12468
|
+
elements[0]
|
|
12469
|
+
end
|
|
12470
|
+
|
|
12471
|
+
def date_month
|
|
12472
|
+
elements[2]
|
|
12473
|
+
end
|
|
12474
|
+
|
|
12475
|
+
def date_mday
|
|
12476
|
+
elements[4]
|
|
12477
|
+
end
|
|
12478
|
+
end
|
|
12479
|
+
|
|
12480
|
+
def _nt_full_date
|
|
12481
|
+
start_index = index
|
|
12482
|
+
if node_cache[:full_date].has_key?(index)
|
|
12483
|
+
cached = node_cache[:full_date][index]
|
|
12484
|
+
if cached
|
|
12485
|
+
node_cache[:full_date][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12486
|
+
@index = cached.interval.end
|
|
12487
|
+
end
|
|
12488
|
+
return cached
|
|
12489
|
+
end
|
|
12490
|
+
|
|
12491
|
+
i0, s0 = index, []
|
|
12492
|
+
r1 = _nt_date_fullyear
|
|
12493
|
+
s0 << r1
|
|
12494
|
+
if r1
|
|
12495
|
+
if (match_len = has_terminal?("-", false, index))
|
|
12496
|
+
r2 = true
|
|
12497
|
+
@index += match_len
|
|
12498
|
+
else
|
|
12499
|
+
terminal_parse_failure('"-"')
|
|
12500
|
+
r2 = nil
|
|
12501
|
+
end
|
|
12502
|
+
s0 << r2
|
|
12503
|
+
if r2
|
|
12504
|
+
r3 = _nt_date_month
|
|
12505
|
+
s0 << r3
|
|
12506
|
+
if r3
|
|
12507
|
+
if (match_len = has_terminal?("-", false, index))
|
|
12508
|
+
r4 = true
|
|
12509
|
+
@index += match_len
|
|
12510
|
+
else
|
|
12511
|
+
terminal_parse_failure('"-"')
|
|
12512
|
+
r4 = nil
|
|
12513
|
+
end
|
|
12514
|
+
s0 << r4
|
|
12515
|
+
if r4
|
|
12516
|
+
r5 = _nt_date_mday
|
|
12517
|
+
s0 << r5
|
|
12518
|
+
end
|
|
12519
|
+
end
|
|
12520
|
+
end
|
|
12521
|
+
end
|
|
12522
|
+
if s0.last
|
|
12523
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12524
|
+
r0.extend(FullDate0)
|
|
12525
|
+
else
|
|
12526
|
+
@index = i0
|
|
12527
|
+
r0 = nil
|
|
12528
|
+
end
|
|
12529
|
+
|
|
12530
|
+
node_cache[:full_date][start_index] = r0
|
|
12531
|
+
|
|
12532
|
+
r0
|
|
12533
|
+
end
|
|
12534
|
+
|
|
12535
|
+
module FullTime0
|
|
12536
|
+
def partial_time
|
|
12537
|
+
elements[0]
|
|
12538
|
+
end
|
|
12539
|
+
|
|
12540
|
+
def time_offset
|
|
12541
|
+
elements[1]
|
|
12542
|
+
end
|
|
12543
|
+
end
|
|
12544
|
+
|
|
12545
|
+
def _nt_full_time
|
|
12546
|
+
start_index = index
|
|
12547
|
+
if node_cache[:full_time].has_key?(index)
|
|
12548
|
+
cached = node_cache[:full_time][index]
|
|
12549
|
+
if cached
|
|
12550
|
+
node_cache[:full_time][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12551
|
+
@index = cached.interval.end
|
|
12552
|
+
end
|
|
12553
|
+
return cached
|
|
12554
|
+
end
|
|
12555
|
+
|
|
12556
|
+
i0, s0 = index, []
|
|
12557
|
+
r1 = _nt_partial_time
|
|
12558
|
+
s0 << r1
|
|
12559
|
+
if r1
|
|
12560
|
+
r2 = _nt_time_offset
|
|
12561
|
+
s0 << r2
|
|
12562
|
+
end
|
|
12563
|
+
if s0.last
|
|
12564
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12565
|
+
r0.extend(FullTime0)
|
|
12566
|
+
else
|
|
12567
|
+
@index = i0
|
|
12568
|
+
r0 = nil
|
|
12569
|
+
end
|
|
12570
|
+
|
|
12571
|
+
node_cache[:full_time][start_index] = r0
|
|
12572
|
+
|
|
12573
|
+
r0
|
|
12574
|
+
end
|
|
12575
|
+
|
|
12576
|
+
module DateTime0
|
|
12577
|
+
def full_date
|
|
12578
|
+
elements[0]
|
|
12579
|
+
end
|
|
12580
|
+
|
|
12581
|
+
def full_time
|
|
12582
|
+
elements[2]
|
|
12583
|
+
end
|
|
12584
|
+
end
|
|
12585
|
+
|
|
12586
|
+
def _nt_date_time
|
|
12587
|
+
start_index = index
|
|
12588
|
+
if node_cache[:date_time].has_key?(index)
|
|
12589
|
+
cached = node_cache[:date_time][index]
|
|
12590
|
+
if cached
|
|
12591
|
+
node_cache[:date_time][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
12592
|
+
@index = cached.interval.end
|
|
12593
|
+
end
|
|
12594
|
+
return cached
|
|
12595
|
+
end
|
|
12596
|
+
|
|
12597
|
+
i0, s0 = index, []
|
|
12598
|
+
r1 = _nt_full_date
|
|
12599
|
+
s0 << r1
|
|
12600
|
+
if r1
|
|
12601
|
+
if (match_len = has_terminal?("t", :insens, index))
|
|
12602
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
|
12603
|
+
@index += match_len
|
|
12604
|
+
else
|
|
12605
|
+
terminal_parse_failure('"T"')
|
|
12606
|
+
r2 = nil
|
|
12607
|
+
end
|
|
12608
|
+
s0 << r2
|
|
12609
|
+
if r2
|
|
12610
|
+
r3 = _nt_full_time
|
|
12611
|
+
s0 << r3
|
|
12612
|
+
end
|
|
12613
|
+
end
|
|
12614
|
+
if s0.last
|
|
12615
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
12616
|
+
r0.extend(DateTime0)
|
|
12617
|
+
else
|
|
12618
|
+
@index = i0
|
|
12619
|
+
r0 = nil
|
|
12620
|
+
end
|
|
12621
|
+
|
|
12622
|
+
node_cache[:date_time][start_index] = r0
|
|
12623
|
+
|
|
12624
|
+
r0
|
|
12625
|
+
end
|
|
12626
|
+
|
|
11606
12627
|
|
|
11607
12628
|
class Parser < Treetop::Runtime::CompiledParser
|
|
11608
12629
|
include EDNGRAMMAR
|