edn-abnf 0.5.20 → 0.5.21
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 +1517 -244
- metadata +1 -1
data/lib/parser/edngrammar.rb
CHANGED
|
@@ -2344,6 +2344,28 @@ module EDNGRAMMAR
|
|
|
2344
2344
|
def ast; elements[0].ast end
|
|
2345
2345
|
end
|
|
2346
2346
|
|
|
2347
|
+
module Bstr4
|
|
2348
|
+
def raw_app_string_h
|
|
2349
|
+
elements[0]
|
|
2350
|
+
end
|
|
2351
|
+
|
|
2352
|
+
end
|
|
2353
|
+
|
|
2354
|
+
module Bstr5
|
|
2355
|
+
def ast; elements[0].ast end
|
|
2356
|
+
end
|
|
2357
|
+
|
|
2358
|
+
module Bstr6
|
|
2359
|
+
def raw_app_string_b64
|
|
2360
|
+
elements[0]
|
|
2361
|
+
end
|
|
2362
|
+
|
|
2363
|
+
end
|
|
2364
|
+
|
|
2365
|
+
module Bstr7
|
|
2366
|
+
def ast; elements[0].ast end
|
|
2367
|
+
end
|
|
2368
|
+
|
|
2347
2369
|
def _nt_bstr
|
|
2348
2370
|
start_index = index
|
|
2349
2371
|
if node_cache[:bstr].has_key?(index)
|
|
@@ -2416,38 +2438,100 @@ module EDNGRAMMAR
|
|
|
2416
2438
|
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
2417
2439
|
r0 = r5
|
|
2418
2440
|
else
|
|
2419
|
-
|
|
2441
|
+
i9, s9 = index, []
|
|
2442
|
+
r10 = _nt_raw_app_string_h
|
|
2443
|
+
s9 << r10
|
|
2444
|
+
if r10
|
|
2445
|
+
i11 = index
|
|
2446
|
+
r12 = lambda {|x|$options.integrated}.call(s9)
|
|
2447
|
+
if !r12
|
|
2448
|
+
terminal_parse_failure("<semantic predicate>")
|
|
2449
|
+
end
|
|
2450
|
+
if r12
|
|
2451
|
+
@index = i11
|
|
2452
|
+
r11 = instantiate_node(SyntaxNode,input, index...index)
|
|
2453
|
+
else
|
|
2454
|
+
@index = i11
|
|
2455
|
+
r11 = nil
|
|
2456
|
+
end
|
|
2457
|
+
s9 << r11
|
|
2458
|
+
end
|
|
2459
|
+
if s9.last
|
|
2460
|
+
r9 = instantiate_node(SyntaxNode,input, i9...index, s9)
|
|
2461
|
+
r9.extend(Bstr4)
|
|
2462
|
+
r9.extend(Bstr5)
|
|
2463
|
+
else
|
|
2464
|
+
@index = i9
|
|
2465
|
+
r9 = nil
|
|
2466
|
+
end
|
|
2420
2467
|
if r9
|
|
2421
2468
|
r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
|
|
2422
2469
|
r0 = r9
|
|
2423
2470
|
else
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2471
|
+
i13, s13 = index, []
|
|
2472
|
+
r14 = _nt_raw_app_string_b64
|
|
2473
|
+
s13 << r14
|
|
2474
|
+
if r14
|
|
2475
|
+
i15 = index
|
|
2476
|
+
r16 = lambda {|x|$options.integrated}.call(s13)
|
|
2477
|
+
if !r16
|
|
2478
|
+
terminal_parse_failure("<semantic predicate>")
|
|
2479
|
+
end
|
|
2480
|
+
if r16
|
|
2481
|
+
@index = i15
|
|
2482
|
+
r15 = instantiate_node(SyntaxNode,input, index...index)
|
|
2483
|
+
else
|
|
2484
|
+
@index = i15
|
|
2485
|
+
r15 = nil
|
|
2486
|
+
end
|
|
2487
|
+
s13 << r15
|
|
2488
|
+
end
|
|
2489
|
+
if s13.last
|
|
2490
|
+
r13 = instantiate_node(SyntaxNode,input, i13...index, s13)
|
|
2491
|
+
r13.extend(Bstr6)
|
|
2492
|
+
r13.extend(Bstr7)
|
|
2428
2493
|
else
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2494
|
+
@index = i13
|
|
2495
|
+
r13 = nil
|
|
2496
|
+
end
|
|
2497
|
+
if r13
|
|
2498
|
+
r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
|
|
2499
|
+
r0 = r13
|
|
2500
|
+
else
|
|
2501
|
+
r17 = _nt_app_string
|
|
2502
|
+
if r17
|
|
2503
|
+
r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true
|
|
2504
|
+
r0 = r17
|
|
2433
2505
|
else
|
|
2434
|
-
|
|
2435
|
-
if
|
|
2436
|
-
|
|
2437
|
-
r0 =
|
|
2506
|
+
r18 = _nt_sqstr
|
|
2507
|
+
if r18
|
|
2508
|
+
r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true
|
|
2509
|
+
r0 = r18
|
|
2438
2510
|
else
|
|
2439
|
-
|
|
2440
|
-
if
|
|
2441
|
-
|
|
2442
|
-
r0 =
|
|
2511
|
+
r19 = _nt_app_rstring
|
|
2512
|
+
if r19
|
|
2513
|
+
r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true
|
|
2514
|
+
r0 = r19
|
|
2443
2515
|
else
|
|
2444
|
-
|
|
2445
|
-
if
|
|
2446
|
-
|
|
2447
|
-
r0 =
|
|
2516
|
+
r20 = _nt_rawstring
|
|
2517
|
+
if r20
|
|
2518
|
+
r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true
|
|
2519
|
+
r0 = r20
|
|
2448
2520
|
else
|
|
2449
|
-
|
|
2450
|
-
|
|
2521
|
+
r21 = _nt_app_sequence
|
|
2522
|
+
if r21
|
|
2523
|
+
r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true
|
|
2524
|
+
r0 = r21
|
|
2525
|
+
else
|
|
2526
|
+
r22 = _nt_embedded
|
|
2527
|
+
if r22
|
|
2528
|
+
r22 = SyntaxNode.new(input, (index-1)...index) if r22 == true
|
|
2529
|
+
r0 = r22
|
|
2530
|
+
else
|
|
2531
|
+
@index = i0
|
|
2532
|
+
r0 = nil
|
|
2533
|
+
end
|
|
2534
|
+
end
|
|
2451
2535
|
end
|
|
2452
2536
|
end
|
|
2453
2537
|
end
|
|
@@ -7913,6 +7997,86 @@ module EDNGRAMMAR
|
|
|
7913
7997
|
r0
|
|
7914
7998
|
end
|
|
7915
7999
|
|
|
8000
|
+
def _nt_r_non_lf
|
|
8001
|
+
start_index = index
|
|
8002
|
+
if node_cache[:r_non_lf].has_key?(index)
|
|
8003
|
+
cached = node_cache[:r_non_lf][index]
|
|
8004
|
+
if cached
|
|
8005
|
+
node_cache[:r_non_lf][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
8006
|
+
@index = cached.interval.end
|
|
8007
|
+
end
|
|
8008
|
+
return cached
|
|
8009
|
+
end
|
|
8010
|
+
|
|
8011
|
+
i0 = index
|
|
8012
|
+
if (match_len = has_terminal?("\t", false, index))
|
|
8013
|
+
r1 = true
|
|
8014
|
+
@index += match_len
|
|
8015
|
+
else
|
|
8016
|
+
terminal_parse_failure('"\\t"')
|
|
8017
|
+
r1 = nil
|
|
8018
|
+
end
|
|
8019
|
+
if r1
|
|
8020
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
8021
|
+
r0 = r1
|
|
8022
|
+
else
|
|
8023
|
+
if (match_len = has_terminal?("\r", false, index))
|
|
8024
|
+
r2 = true
|
|
8025
|
+
@index += match_len
|
|
8026
|
+
else
|
|
8027
|
+
terminal_parse_failure('"\\r"')
|
|
8028
|
+
r2 = nil
|
|
8029
|
+
end
|
|
8030
|
+
if r2
|
|
8031
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
8032
|
+
r0 = r2
|
|
8033
|
+
else
|
|
8034
|
+
if has_terminal?(@regexps[gr = '\A[\\ -_]'] ||= Regexp.new(gr), :regexp, index)
|
|
8035
|
+
r3 = true
|
|
8036
|
+
@index += 1
|
|
8037
|
+
else
|
|
8038
|
+
terminal_parse_failure('[\\ -_]')
|
|
8039
|
+
r3 = nil
|
|
8040
|
+
end
|
|
8041
|
+
if r3
|
|
8042
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
8043
|
+
r0 = r3
|
|
8044
|
+
else
|
|
8045
|
+
if has_terminal?(@regexps[gr = '\A[a-]'] ||= Regexp.new(gr), :regexp, index)
|
|
8046
|
+
r4 = true
|
|
8047
|
+
@index += 1
|
|
8048
|
+
else
|
|
8049
|
+
terminal_parse_failure('[a-]')
|
|
8050
|
+
r4 = nil
|
|
8051
|
+
end
|
|
8052
|
+
if r4
|
|
8053
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
|
8054
|
+
r0 = r4
|
|
8055
|
+
else
|
|
8056
|
+
r5 = _nt_NONASCII
|
|
8057
|
+
if r5
|
|
8058
|
+
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
8059
|
+
r0 = r5
|
|
8060
|
+
else
|
|
8061
|
+
r6 = _nt_shortrawdelim
|
|
8062
|
+
if r6
|
|
8063
|
+
r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
|
|
8064
|
+
r0 = r6
|
|
8065
|
+
else
|
|
8066
|
+
@index = i0
|
|
8067
|
+
r0 = nil
|
|
8068
|
+
end
|
|
8069
|
+
end
|
|
8070
|
+
end
|
|
8071
|
+
end
|
|
8072
|
+
end
|
|
8073
|
+
end
|
|
8074
|
+
|
|
8075
|
+
node_cache[:r_non_lf][start_index] = r0
|
|
8076
|
+
|
|
8077
|
+
r0
|
|
8078
|
+
end
|
|
8079
|
+
|
|
7916
8080
|
module SqAppStringH0
|
|
7917
8081
|
def app_string_h
|
|
7918
8082
|
elements[1]
|
|
@@ -8475,153 +8639,1329 @@ module EDNGRAMMAR
|
|
|
8475
8639
|
r0
|
|
8476
8640
|
end
|
|
8477
8641
|
|
|
8478
|
-
module
|
|
8479
|
-
def
|
|
8480
|
-
elements[
|
|
8642
|
+
module Fitrawdelim0
|
|
8643
|
+
def rawdelim
|
|
8644
|
+
elements[0]
|
|
8481
8645
|
end
|
|
8482
8646
|
|
|
8483
8647
|
end
|
|
8484
8648
|
|
|
8485
|
-
|
|
8486
|
-
def ast; app_string_b64.ast end
|
|
8487
|
-
end
|
|
8488
|
-
|
|
8489
|
-
def _nt_sq_app_string_b64
|
|
8649
|
+
def _nt_fitrawdelim
|
|
8490
8650
|
start_index = index
|
|
8491
|
-
if node_cache[:
|
|
8492
|
-
cached = node_cache[:
|
|
8651
|
+
if node_cache[:fitrawdelim].has_key?(index)
|
|
8652
|
+
cached = node_cache[:fitrawdelim][index]
|
|
8493
8653
|
if cached
|
|
8494
|
-
node_cache[:
|
|
8654
|
+
node_cache[:fitrawdelim][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
8495
8655
|
@index = cached.interval.end
|
|
8496
8656
|
end
|
|
8497
8657
|
return cached
|
|
8498
8658
|
end
|
|
8499
8659
|
|
|
8500
8660
|
i0, s0 = index, []
|
|
8501
|
-
|
|
8502
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
|
8503
|
-
@index += match_len
|
|
8504
|
-
else
|
|
8505
|
-
terminal_parse_failure('"b64\'"')
|
|
8506
|
-
r1 = nil
|
|
8507
|
-
end
|
|
8661
|
+
r1 = _nt_rawdelim
|
|
8508
8662
|
s0 << r1
|
|
8509
8663
|
if r1
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
if
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8664
|
+
i2 = index
|
|
8665
|
+
r3 = lambda {|(rd)|rd.text_value.length == @rawdelimlength}.call(s0)
|
|
8666
|
+
if !r3
|
|
8667
|
+
terminal_parse_failure("<semantic predicate>")
|
|
8668
|
+
end
|
|
8669
|
+
if r3
|
|
8670
|
+
@index = i2
|
|
8671
|
+
r2 = instantiate_node(SyntaxNode,input, index...index)
|
|
8672
|
+
else
|
|
8673
|
+
@index = i2
|
|
8674
|
+
r2 = nil
|
|
8521
8675
|
end
|
|
8676
|
+
s0 << r2
|
|
8522
8677
|
end
|
|
8523
8678
|
if s0.last
|
|
8524
8679
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
8525
|
-
r0.extend(
|
|
8526
|
-
r0.extend(SqAppStringB641)
|
|
8680
|
+
r0.extend(Fitrawdelim0)
|
|
8527
8681
|
else
|
|
8528
8682
|
@index = i0
|
|
8529
8683
|
r0 = nil
|
|
8530
8684
|
end
|
|
8531
8685
|
|
|
8532
|
-
node_cache[:
|
|
8686
|
+
node_cache[:fitrawdelim][start_index] = r0
|
|
8533
8687
|
|
|
8534
8688
|
r0
|
|
8535
8689
|
end
|
|
8536
8690
|
|
|
8537
|
-
module
|
|
8538
|
-
def
|
|
8539
|
-
elements[0]
|
|
8540
|
-
end
|
|
8541
|
-
|
|
8542
|
-
def b64_S
|
|
8543
|
-
elements[1]
|
|
8544
|
-
end
|
|
8545
|
-
end
|
|
8546
|
-
|
|
8547
|
-
module AppStringB641
|
|
8548
|
-
def b64_S
|
|
8549
|
-
elements[1]
|
|
8550
|
-
end
|
|
8551
|
-
|
|
8552
|
-
end
|
|
8553
|
-
|
|
8554
|
-
module AppStringB642
|
|
8555
|
-
def b64dig
|
|
8556
|
-
elements[0]
|
|
8557
|
-
end
|
|
8558
|
-
|
|
8559
|
-
def b64_S
|
|
8560
|
-
elements[1]
|
|
8561
|
-
end
|
|
8562
|
-
|
|
8563
|
-
end
|
|
8564
|
-
|
|
8565
|
-
module AppStringB643
|
|
8566
|
-
def b64dig1
|
|
8567
|
-
elements[0]
|
|
8568
|
-
end
|
|
8569
|
-
|
|
8570
|
-
def b64_S1
|
|
8571
|
-
elements[1]
|
|
8572
|
-
end
|
|
8573
|
-
|
|
8574
|
-
def b64dig2
|
|
8575
|
-
elements[2]
|
|
8576
|
-
end
|
|
8577
|
-
|
|
8578
|
-
def b64_S2
|
|
8579
|
-
elements[3]
|
|
8580
|
-
end
|
|
8581
|
-
|
|
8582
|
-
def b64_S3
|
|
8583
|
-
elements[5]
|
|
8584
|
-
end
|
|
8585
|
-
end
|
|
8586
|
-
|
|
8587
|
-
module AppStringB644
|
|
8588
|
-
end
|
|
8589
|
-
|
|
8590
|
-
module AppStringB645
|
|
8591
|
-
def b64_S
|
|
8691
|
+
module RhS0
|
|
8692
|
+
def rh_comment
|
|
8592
8693
|
elements[0]
|
|
8593
8694
|
end
|
|
8594
8695
|
|
|
8595
8696
|
end
|
|
8596
8697
|
|
|
8597
|
-
module
|
|
8598
|
-
def ast
|
|
8599
|
-
t = text_value.gsub(/\s|#[^\n]*(?:\n|\z)/, '').chars.each_slice(4).map(&:join)
|
|
8600
|
-
if last = t[-1]
|
|
8601
|
-
last << "=" * (4 - last.size)
|
|
8602
|
-
end
|
|
8603
|
-
b = t.join.tr("-_", "+/")
|
|
8604
|
-
begin
|
|
8605
|
-
b.unpack("m0")[0]
|
|
8606
|
-
rescue ArgumentError
|
|
8607
|
-
raise ArgumentError, "cbor-diagnostic: invalid base64 #{b.inspect}", caller[1..-1]
|
|
8608
|
-
end
|
|
8609
|
-
end
|
|
8698
|
+
module RhS1
|
|
8610
8699
|
end
|
|
8611
8700
|
|
|
8612
|
-
def
|
|
8701
|
+
def _nt_rh_S
|
|
8613
8702
|
start_index = index
|
|
8614
|
-
if node_cache[:
|
|
8615
|
-
cached = node_cache[:
|
|
8703
|
+
if node_cache[:rh_S].has_key?(index)
|
|
8704
|
+
cached = node_cache[:rh_S][index]
|
|
8616
8705
|
if cached
|
|
8617
|
-
node_cache[:
|
|
8706
|
+
node_cache[:rh_S][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
8618
8707
|
@index = cached.interval.end
|
|
8619
8708
|
end
|
|
8620
8709
|
return cached
|
|
8621
8710
|
end
|
|
8622
8711
|
|
|
8623
8712
|
i0, s0 = index, []
|
|
8624
|
-
|
|
8713
|
+
s1, i1 = [], index
|
|
8714
|
+
loop do
|
|
8715
|
+
r2 = _nt_blank
|
|
8716
|
+
if r2
|
|
8717
|
+
s1 << r2
|
|
8718
|
+
else
|
|
8719
|
+
break
|
|
8720
|
+
end
|
|
8721
|
+
end
|
|
8722
|
+
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
|
8723
|
+
s0 << r1
|
|
8724
|
+
if r1
|
|
8725
|
+
s3, i3 = [], index
|
|
8726
|
+
loop do
|
|
8727
|
+
i4, s4 = index, []
|
|
8728
|
+
r5 = _nt_rh_comment
|
|
8729
|
+
s4 << r5
|
|
8730
|
+
if r5
|
|
8731
|
+
s6, i6 = [], index
|
|
8732
|
+
loop do
|
|
8733
|
+
r7 = _nt_blank
|
|
8734
|
+
if r7
|
|
8735
|
+
s6 << r7
|
|
8736
|
+
else
|
|
8737
|
+
break
|
|
8738
|
+
end
|
|
8739
|
+
end
|
|
8740
|
+
r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
|
|
8741
|
+
s4 << r6
|
|
8742
|
+
end
|
|
8743
|
+
if s4.last
|
|
8744
|
+
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
|
8745
|
+
r4.extend(RhS0)
|
|
8746
|
+
else
|
|
8747
|
+
@index = i4
|
|
8748
|
+
r4 = nil
|
|
8749
|
+
end
|
|
8750
|
+
if r4
|
|
8751
|
+
s3 << r4
|
|
8752
|
+
else
|
|
8753
|
+
break
|
|
8754
|
+
end
|
|
8755
|
+
end
|
|
8756
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
|
8757
|
+
s0 << r3
|
|
8758
|
+
end
|
|
8759
|
+
if s0.last
|
|
8760
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
8761
|
+
r0.extend(RhS1)
|
|
8762
|
+
else
|
|
8763
|
+
@index = i0
|
|
8764
|
+
r0 = nil
|
|
8765
|
+
end
|
|
8766
|
+
|
|
8767
|
+
node_cache[:rh_S][start_index] = r0
|
|
8768
|
+
|
|
8769
|
+
r0
|
|
8770
|
+
end
|
|
8771
|
+
|
|
8772
|
+
def _nt_rh_non_slash
|
|
8773
|
+
start_index = index
|
|
8774
|
+
if node_cache[:rh_non_slash].has_key?(index)
|
|
8775
|
+
cached = node_cache[:rh_non_slash][index]
|
|
8776
|
+
if cached
|
|
8777
|
+
node_cache[:rh_non_slash][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
8778
|
+
@index = cached.interval.end
|
|
8779
|
+
end
|
|
8780
|
+
return cached
|
|
8781
|
+
end
|
|
8782
|
+
|
|
8783
|
+
i0 = index
|
|
8784
|
+
r1 = _nt_blank
|
|
8785
|
+
if r1
|
|
8786
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
8787
|
+
r0 = r1
|
|
8788
|
+
else
|
|
8789
|
+
if has_terminal?(@regexps[gr = '\A[!-\\.]'] ||= Regexp.new(gr), :regexp, index)
|
|
8790
|
+
r2 = true
|
|
8791
|
+
@index += 1
|
|
8792
|
+
else
|
|
8793
|
+
terminal_parse_failure('[!-\\.]')
|
|
8794
|
+
r2 = nil
|
|
8795
|
+
end
|
|
8796
|
+
if r2
|
|
8797
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
8798
|
+
r0 = r2
|
|
8799
|
+
else
|
|
8800
|
+
if has_terminal?(@regexps[gr = '\A[0-_]'] ||= Regexp.new(gr), :regexp, index)
|
|
8801
|
+
r3 = true
|
|
8802
|
+
@index += 1
|
|
8803
|
+
else
|
|
8804
|
+
terminal_parse_failure('[0-_]')
|
|
8805
|
+
r3 = nil
|
|
8806
|
+
end
|
|
8807
|
+
if r3
|
|
8808
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
8809
|
+
r0 = r3
|
|
8810
|
+
else
|
|
8811
|
+
if has_terminal?(@regexps[gr = '\A[a-]'] ||= Regexp.new(gr), :regexp, index)
|
|
8812
|
+
r4 = true
|
|
8813
|
+
@index += 1
|
|
8814
|
+
else
|
|
8815
|
+
terminal_parse_failure('[a-]')
|
|
8816
|
+
r4 = nil
|
|
8817
|
+
end
|
|
8818
|
+
if r4
|
|
8819
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
|
8820
|
+
r0 = r4
|
|
8821
|
+
else
|
|
8822
|
+
r5 = _nt_NONASCII
|
|
8823
|
+
if r5
|
|
8824
|
+
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
8825
|
+
r0 = r5
|
|
8826
|
+
else
|
|
8827
|
+
r6 = _nt_shortrawdelim
|
|
8828
|
+
if r6
|
|
8829
|
+
r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
|
|
8830
|
+
r0 = r6
|
|
8831
|
+
else
|
|
8832
|
+
@index = i0
|
|
8833
|
+
r0 = nil
|
|
8834
|
+
end
|
|
8835
|
+
end
|
|
8836
|
+
end
|
|
8837
|
+
end
|
|
8838
|
+
end
|
|
8839
|
+
end
|
|
8840
|
+
|
|
8841
|
+
node_cache[:rh_non_slash][start_index] = r0
|
|
8842
|
+
|
|
8843
|
+
r0
|
|
8844
|
+
end
|
|
8845
|
+
|
|
8846
|
+
module RhComment0
|
|
8847
|
+
end
|
|
8848
|
+
|
|
8849
|
+
module RhComment1
|
|
8850
|
+
end
|
|
8851
|
+
|
|
8852
|
+
def _nt_rh_comment
|
|
8853
|
+
start_index = index
|
|
8854
|
+
if node_cache[:rh_comment].has_key?(index)
|
|
8855
|
+
cached = node_cache[:rh_comment][index]
|
|
8856
|
+
if cached
|
|
8857
|
+
node_cache[:rh_comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
8858
|
+
@index = cached.interval.end
|
|
8859
|
+
end
|
|
8860
|
+
return cached
|
|
8861
|
+
end
|
|
8862
|
+
|
|
8863
|
+
i0 = index
|
|
8864
|
+
i1, s1 = index, []
|
|
8865
|
+
if (match_len = has_terminal?("/", false, index))
|
|
8866
|
+
r2 = true
|
|
8867
|
+
@index += match_len
|
|
8868
|
+
else
|
|
8869
|
+
terminal_parse_failure('"/"')
|
|
8870
|
+
r2 = nil
|
|
8871
|
+
end
|
|
8872
|
+
s1 << r2
|
|
8873
|
+
if r2
|
|
8874
|
+
s3, i3 = [], index
|
|
8875
|
+
loop do
|
|
8876
|
+
r4 = _nt_rh_non_slash
|
|
8877
|
+
if r4
|
|
8878
|
+
s3 << r4
|
|
8879
|
+
else
|
|
8880
|
+
break
|
|
8881
|
+
end
|
|
8882
|
+
end
|
|
8883
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
|
8884
|
+
s1 << r3
|
|
8885
|
+
if r3
|
|
8886
|
+
if (match_len = has_terminal?("/", false, index))
|
|
8887
|
+
r5 = true
|
|
8888
|
+
@index += match_len
|
|
8889
|
+
else
|
|
8890
|
+
terminal_parse_failure('"/"')
|
|
8891
|
+
r5 = nil
|
|
8892
|
+
end
|
|
8893
|
+
s1 << r5
|
|
8894
|
+
end
|
|
8895
|
+
end
|
|
8896
|
+
if s1.last
|
|
8897
|
+
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
|
8898
|
+
r1.extend(RhComment0)
|
|
8899
|
+
else
|
|
8900
|
+
@index = i1
|
|
8901
|
+
r1 = nil
|
|
8902
|
+
end
|
|
8903
|
+
if r1
|
|
8904
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
8905
|
+
r0 = r1
|
|
8906
|
+
else
|
|
8907
|
+
i6, s6 = index, []
|
|
8908
|
+
if (match_len = has_terminal?("#", false, index))
|
|
8909
|
+
r7 = true
|
|
8910
|
+
@index += match_len
|
|
8911
|
+
else
|
|
8912
|
+
terminal_parse_failure('"#"')
|
|
8913
|
+
r7 = nil
|
|
8914
|
+
end
|
|
8915
|
+
s6 << r7
|
|
8916
|
+
if r7
|
|
8917
|
+
s8, i8 = [], index
|
|
8918
|
+
loop do
|
|
8919
|
+
r9 = _nt_r_non_lf
|
|
8920
|
+
if r9
|
|
8921
|
+
s8 << r9
|
|
8922
|
+
else
|
|
8923
|
+
break
|
|
8924
|
+
end
|
|
8925
|
+
end
|
|
8926
|
+
r8 = instantiate_node(SyntaxNode,input, i8...index, s8)
|
|
8927
|
+
s6 << r8
|
|
8928
|
+
if r8
|
|
8929
|
+
if (match_len = has_terminal?("\n", false, index))
|
|
8930
|
+
r10 = true
|
|
8931
|
+
@index += match_len
|
|
8932
|
+
else
|
|
8933
|
+
terminal_parse_failure('"\\n"')
|
|
8934
|
+
r10 = nil
|
|
8935
|
+
end
|
|
8936
|
+
s6 << r10
|
|
8937
|
+
end
|
|
8938
|
+
end
|
|
8939
|
+
if s6.last
|
|
8940
|
+
r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
|
|
8941
|
+
r6.extend(RhComment1)
|
|
8942
|
+
else
|
|
8943
|
+
@index = i6
|
|
8944
|
+
r6 = nil
|
|
8945
|
+
end
|
|
8946
|
+
if r6
|
|
8947
|
+
r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
|
|
8948
|
+
r0 = r6
|
|
8949
|
+
else
|
|
8950
|
+
@index = i0
|
|
8951
|
+
r0 = nil
|
|
8952
|
+
end
|
|
8953
|
+
end
|
|
8954
|
+
|
|
8955
|
+
node_cache[:rh_comment][start_index] = r0
|
|
8956
|
+
|
|
8957
|
+
r0
|
|
8958
|
+
end
|
|
8959
|
+
|
|
8960
|
+
module RawAppStringH0
|
|
8961
|
+
def startrawdelim
|
|
8962
|
+
elements[1]
|
|
8963
|
+
end
|
|
8964
|
+
|
|
8965
|
+
def r_app_string_h
|
|
8966
|
+
elements[2]
|
|
8967
|
+
end
|
|
8968
|
+
end
|
|
8969
|
+
|
|
8970
|
+
module RawAppStringH1
|
|
8971
|
+
def ast; r_app_string_h.ast end
|
|
8972
|
+
end
|
|
8973
|
+
|
|
8974
|
+
def _nt_raw_app_string_h
|
|
8975
|
+
start_index = index
|
|
8976
|
+
if node_cache[:raw_app_string_h].has_key?(index)
|
|
8977
|
+
cached = node_cache[:raw_app_string_h][index]
|
|
8978
|
+
if cached
|
|
8979
|
+
node_cache[:raw_app_string_h][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
8980
|
+
@index = cached.interval.end
|
|
8981
|
+
end
|
|
8982
|
+
return cached
|
|
8983
|
+
end
|
|
8984
|
+
|
|
8985
|
+
i0, s0 = index, []
|
|
8986
|
+
if (match_len = has_terminal?("h", false, index))
|
|
8987
|
+
r1 = true
|
|
8988
|
+
@index += match_len
|
|
8989
|
+
else
|
|
8990
|
+
terminal_parse_failure('"h"')
|
|
8991
|
+
r1 = nil
|
|
8992
|
+
end
|
|
8993
|
+
s0 << r1
|
|
8994
|
+
if r1
|
|
8995
|
+
r2 = _nt_startrawdelim
|
|
8996
|
+
s0 << r2
|
|
8997
|
+
if r2
|
|
8998
|
+
r3 = _nt_r_app_string_h
|
|
8999
|
+
s0 << r3
|
|
9000
|
+
end
|
|
9001
|
+
end
|
|
9002
|
+
if s0.last
|
|
9003
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
9004
|
+
r0.extend(RawAppStringH0)
|
|
9005
|
+
r0.extend(RawAppStringH1)
|
|
9006
|
+
else
|
|
9007
|
+
@index = i0
|
|
9008
|
+
r0 = nil
|
|
9009
|
+
end
|
|
9010
|
+
|
|
9011
|
+
node_cache[:raw_app_string_h][start_index] = r0
|
|
9012
|
+
|
|
9013
|
+
r0
|
|
9014
|
+
end
|
|
9015
|
+
|
|
9016
|
+
module RAppStringH0
|
|
9017
|
+
def HEXDIG1
|
|
9018
|
+
elements[0]
|
|
9019
|
+
end
|
|
9020
|
+
|
|
9021
|
+
def rh_S1
|
|
9022
|
+
elements[1]
|
|
9023
|
+
end
|
|
9024
|
+
|
|
9025
|
+
def HEXDIG2
|
|
9026
|
+
elements[2]
|
|
9027
|
+
end
|
|
9028
|
+
|
|
9029
|
+
def rh_S2
|
|
9030
|
+
elements[3]
|
|
9031
|
+
end
|
|
9032
|
+
end
|
|
9033
|
+
|
|
9034
|
+
module RAppStringH1
|
|
9035
|
+
def ast
|
|
9036
|
+
Integer(elements[0].text_value + elements[2].text_value, 16).chr("BINARY")
|
|
9037
|
+
end
|
|
9038
|
+
end
|
|
9039
|
+
|
|
9040
|
+
module RAppStringH2
|
|
9041
|
+
def ellipsis
|
|
9042
|
+
elements[0]
|
|
9043
|
+
end
|
|
9044
|
+
|
|
9045
|
+
def h_S
|
|
9046
|
+
elements[1]
|
|
9047
|
+
end
|
|
9048
|
+
end
|
|
9049
|
+
|
|
9050
|
+
module RAppStringH3
|
|
9051
|
+
def ast; ellipsis.ast end
|
|
9052
|
+
end
|
|
9053
|
+
|
|
9054
|
+
module RAppStringH4
|
|
9055
|
+
def matchrawdelim
|
|
9056
|
+
elements[2]
|
|
9057
|
+
end
|
|
9058
|
+
end
|
|
9059
|
+
|
|
9060
|
+
module RAppStringH5
|
|
9061
|
+
def rh_S
|
|
9062
|
+
elements[0]
|
|
9063
|
+
end
|
|
9064
|
+
|
|
9065
|
+
end
|
|
9066
|
+
|
|
9067
|
+
module RAppStringH6
|
|
9068
|
+
def unpack_thread(s)
|
|
9069
|
+
case s[0]
|
|
9070
|
+
when CBOR::Tagged
|
|
9071
|
+
s[0]
|
|
9072
|
+
when String
|
|
9073
|
+
s.join
|
|
9074
|
+
else
|
|
9075
|
+
raise "@@@ unpack_thread #{s.inspect}"
|
|
9076
|
+
end
|
|
9077
|
+
end
|
|
9078
|
+
def ast
|
|
9079
|
+
e1 = elements[1].elements.map {|e| e.ast}
|
|
9080
|
+
out = []
|
|
9081
|
+
curr = []
|
|
9082
|
+
e1.each { |el|
|
|
9083
|
+
if curr.size == 0 || curr[0].class == el.class
|
|
9084
|
+
curr << el
|
|
9085
|
+
else
|
|
9086
|
+
out << curr
|
|
9087
|
+
curr = [el]
|
|
9088
|
+
end
|
|
9089
|
+
}
|
|
9090
|
+
if out.size == 0 && (curr.size == 0 || String === curr[0])
|
|
9091
|
+
curr.join.b # unpack_thread(curr)
|
|
9092
|
+
else
|
|
9093
|
+
CBOR::Tagged.new(888, (out << curr).map {|x| unpack_thread(x)})
|
|
9094
|
+
end
|
|
9095
|
+
end
|
|
9096
|
+
end
|
|
9097
|
+
|
|
9098
|
+
def _nt_r_app_string_h
|
|
9099
|
+
start_index = index
|
|
9100
|
+
if node_cache[:r_app_string_h].has_key?(index)
|
|
9101
|
+
cached = node_cache[:r_app_string_h][index]
|
|
9102
|
+
if cached
|
|
9103
|
+
node_cache[:r_app_string_h][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9104
|
+
@index = cached.interval.end
|
|
9105
|
+
end
|
|
9106
|
+
return cached
|
|
9107
|
+
end
|
|
9108
|
+
|
|
9109
|
+
i0, s0 = index, []
|
|
9110
|
+
r1 = _nt_rh_S
|
|
9111
|
+
s0 << r1
|
|
9112
|
+
if r1
|
|
9113
|
+
s2, i2 = [], index
|
|
9114
|
+
loop do
|
|
9115
|
+
i3 = index
|
|
9116
|
+
i4, s4 = index, []
|
|
9117
|
+
r5 = _nt_HEXDIG
|
|
9118
|
+
s4 << r5
|
|
9119
|
+
if r5
|
|
9120
|
+
r6 = _nt_rh_S
|
|
9121
|
+
s4 << r6
|
|
9122
|
+
if r6
|
|
9123
|
+
r7 = _nt_HEXDIG
|
|
9124
|
+
s4 << r7
|
|
9125
|
+
if r7
|
|
9126
|
+
r8 = _nt_rh_S
|
|
9127
|
+
s4 << r8
|
|
9128
|
+
end
|
|
9129
|
+
end
|
|
9130
|
+
end
|
|
9131
|
+
if s4.last
|
|
9132
|
+
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
|
9133
|
+
r4.extend(RAppStringH0)
|
|
9134
|
+
r4.extend(RAppStringH1)
|
|
9135
|
+
else
|
|
9136
|
+
@index = i4
|
|
9137
|
+
r4 = nil
|
|
9138
|
+
end
|
|
9139
|
+
if r4
|
|
9140
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
|
9141
|
+
r3 = r4
|
|
9142
|
+
else
|
|
9143
|
+
i9, s9 = index, []
|
|
9144
|
+
r10 = _nt_ellipsis
|
|
9145
|
+
s9 << r10
|
|
9146
|
+
if r10
|
|
9147
|
+
r11 = _nt_h_S
|
|
9148
|
+
s9 << r11
|
|
9149
|
+
end
|
|
9150
|
+
if s9.last
|
|
9151
|
+
r9 = instantiate_node(SyntaxNode,input, i9...index, s9)
|
|
9152
|
+
r9.extend(RAppStringH2)
|
|
9153
|
+
r9.extend(RAppStringH3)
|
|
9154
|
+
else
|
|
9155
|
+
@index = i9
|
|
9156
|
+
r9 = nil
|
|
9157
|
+
end
|
|
9158
|
+
if r9
|
|
9159
|
+
r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
|
|
9160
|
+
r3 = r9
|
|
9161
|
+
else
|
|
9162
|
+
@index = i3
|
|
9163
|
+
r3 = nil
|
|
9164
|
+
end
|
|
9165
|
+
end
|
|
9166
|
+
if r3
|
|
9167
|
+
s2 << r3
|
|
9168
|
+
else
|
|
9169
|
+
break
|
|
9170
|
+
end
|
|
9171
|
+
end
|
|
9172
|
+
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
|
9173
|
+
s0 << r2
|
|
9174
|
+
if r2
|
|
9175
|
+
i12 = index
|
|
9176
|
+
i13, s13 = index, []
|
|
9177
|
+
if (match_len = has_terminal?("#", false, index))
|
|
9178
|
+
r14 = true
|
|
9179
|
+
@index += match_len
|
|
9180
|
+
else
|
|
9181
|
+
terminal_parse_failure('"#"')
|
|
9182
|
+
r14 = nil
|
|
9183
|
+
end
|
|
9184
|
+
s13 << r14
|
|
9185
|
+
if r14
|
|
9186
|
+
s15, i15 = [], index
|
|
9187
|
+
loop do
|
|
9188
|
+
r16 = _nt_r_non_lf
|
|
9189
|
+
if r16
|
|
9190
|
+
s15 << r16
|
|
9191
|
+
else
|
|
9192
|
+
break
|
|
9193
|
+
end
|
|
9194
|
+
end
|
|
9195
|
+
r15 = instantiate_node(SyntaxNode,input, i15...index, s15)
|
|
9196
|
+
s13 << r15
|
|
9197
|
+
if r15
|
|
9198
|
+
r17 = _nt_matchrawdelim
|
|
9199
|
+
s13 << r17
|
|
9200
|
+
end
|
|
9201
|
+
end
|
|
9202
|
+
if s13.last
|
|
9203
|
+
r13 = instantiate_node(SyntaxNode,input, i13...index, s13)
|
|
9204
|
+
r13.extend(RAppStringH4)
|
|
9205
|
+
else
|
|
9206
|
+
@index = i13
|
|
9207
|
+
r13 = nil
|
|
9208
|
+
end
|
|
9209
|
+
if r13
|
|
9210
|
+
r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
|
|
9211
|
+
r12 = r13
|
|
9212
|
+
else
|
|
9213
|
+
r18 = _nt_fitrawdelim
|
|
9214
|
+
if r18
|
|
9215
|
+
r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true
|
|
9216
|
+
r12 = r18
|
|
9217
|
+
else
|
|
9218
|
+
@index = i12
|
|
9219
|
+
r12 = nil
|
|
9220
|
+
end
|
|
9221
|
+
end
|
|
9222
|
+
s0 << r12
|
|
9223
|
+
end
|
|
9224
|
+
end
|
|
9225
|
+
if s0.last
|
|
9226
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
9227
|
+
r0.extend(RAppStringH5)
|
|
9228
|
+
r0.extend(RAppStringH6)
|
|
9229
|
+
else
|
|
9230
|
+
@index = i0
|
|
9231
|
+
r0 = nil
|
|
9232
|
+
end
|
|
9233
|
+
|
|
9234
|
+
node_cache[:r_app_string_h][start_index] = r0
|
|
9235
|
+
|
|
9236
|
+
r0
|
|
9237
|
+
end
|
|
9238
|
+
|
|
9239
|
+
module SqAppStringB640
|
|
9240
|
+
def app_string_b64
|
|
9241
|
+
elements[1]
|
|
9242
|
+
end
|
|
9243
|
+
|
|
9244
|
+
end
|
|
9245
|
+
|
|
9246
|
+
module SqAppStringB641
|
|
9247
|
+
def ast; app_string_b64.ast end
|
|
9248
|
+
end
|
|
9249
|
+
|
|
9250
|
+
def _nt_sq_app_string_b64
|
|
9251
|
+
start_index = index
|
|
9252
|
+
if node_cache[:sq_app_string_b64].has_key?(index)
|
|
9253
|
+
cached = node_cache[:sq_app_string_b64][index]
|
|
9254
|
+
if cached
|
|
9255
|
+
node_cache[:sq_app_string_b64][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9256
|
+
@index = cached.interval.end
|
|
9257
|
+
end
|
|
9258
|
+
return cached
|
|
9259
|
+
end
|
|
9260
|
+
|
|
9261
|
+
i0, s0 = index, []
|
|
9262
|
+
if (match_len = has_terminal?("b64'", false, index))
|
|
9263
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
|
9264
|
+
@index += match_len
|
|
9265
|
+
else
|
|
9266
|
+
terminal_parse_failure('"b64\'"')
|
|
9267
|
+
r1 = nil
|
|
9268
|
+
end
|
|
9269
|
+
s0 << r1
|
|
9270
|
+
if r1
|
|
9271
|
+
r2 = _nt_app_string_b64
|
|
9272
|
+
s0 << r2
|
|
9273
|
+
if r2
|
|
9274
|
+
if (match_len = has_terminal?("'", false, index))
|
|
9275
|
+
r3 = true
|
|
9276
|
+
@index += match_len
|
|
9277
|
+
else
|
|
9278
|
+
terminal_parse_failure('"\'"')
|
|
9279
|
+
r3 = nil
|
|
9280
|
+
end
|
|
9281
|
+
s0 << r3
|
|
9282
|
+
end
|
|
9283
|
+
end
|
|
9284
|
+
if s0.last
|
|
9285
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
9286
|
+
r0.extend(SqAppStringB640)
|
|
9287
|
+
r0.extend(SqAppStringB641)
|
|
9288
|
+
else
|
|
9289
|
+
@index = i0
|
|
9290
|
+
r0 = nil
|
|
9291
|
+
end
|
|
9292
|
+
|
|
9293
|
+
node_cache[:sq_app_string_b64][start_index] = r0
|
|
9294
|
+
|
|
9295
|
+
r0
|
|
9296
|
+
end
|
|
9297
|
+
|
|
9298
|
+
module AppStringB640
|
|
9299
|
+
def b64dig
|
|
9300
|
+
elements[0]
|
|
9301
|
+
end
|
|
9302
|
+
|
|
9303
|
+
def b64_S
|
|
9304
|
+
elements[1]
|
|
9305
|
+
end
|
|
9306
|
+
end
|
|
9307
|
+
|
|
9308
|
+
module AppStringB641
|
|
9309
|
+
def b64_S
|
|
9310
|
+
elements[1]
|
|
9311
|
+
end
|
|
9312
|
+
|
|
9313
|
+
end
|
|
9314
|
+
|
|
9315
|
+
module AppStringB642
|
|
9316
|
+
def b64dig
|
|
9317
|
+
elements[0]
|
|
9318
|
+
end
|
|
9319
|
+
|
|
9320
|
+
def b64_S
|
|
9321
|
+
elements[1]
|
|
9322
|
+
end
|
|
9323
|
+
|
|
9324
|
+
end
|
|
9325
|
+
|
|
9326
|
+
module AppStringB643
|
|
9327
|
+
def b64dig1
|
|
9328
|
+
elements[0]
|
|
9329
|
+
end
|
|
9330
|
+
|
|
9331
|
+
def b64_S1
|
|
9332
|
+
elements[1]
|
|
9333
|
+
end
|
|
9334
|
+
|
|
9335
|
+
def b64dig2
|
|
9336
|
+
elements[2]
|
|
9337
|
+
end
|
|
9338
|
+
|
|
9339
|
+
def b64_S2
|
|
9340
|
+
elements[3]
|
|
9341
|
+
end
|
|
9342
|
+
|
|
9343
|
+
def b64_S3
|
|
9344
|
+
elements[5]
|
|
9345
|
+
end
|
|
9346
|
+
end
|
|
9347
|
+
|
|
9348
|
+
module AppStringB644
|
|
9349
|
+
end
|
|
9350
|
+
|
|
9351
|
+
module AppStringB645
|
|
9352
|
+
def b64_S
|
|
9353
|
+
elements[0]
|
|
9354
|
+
end
|
|
9355
|
+
|
|
9356
|
+
end
|
|
9357
|
+
|
|
9358
|
+
module AppStringB646
|
|
9359
|
+
def ast
|
|
9360
|
+
t = text_value.gsub(/\s|#[^\n]*(?:\n|\z)/, '').chars.each_slice(4).map(&:join)
|
|
9361
|
+
if last = t[-1]
|
|
9362
|
+
last << "=" * (4 - last.size)
|
|
9363
|
+
end
|
|
9364
|
+
b = t.join.tr("-_", "+/")
|
|
9365
|
+
begin
|
|
9366
|
+
b.unpack("m0")[0]
|
|
9367
|
+
rescue ArgumentError
|
|
9368
|
+
raise ArgumentError, "cbor-diagnostic: invalid base64 #{b.inspect}", caller[1..-1]
|
|
9369
|
+
end
|
|
9370
|
+
end
|
|
9371
|
+
end
|
|
9372
|
+
|
|
9373
|
+
def _nt_app_string_b64
|
|
9374
|
+
start_index = index
|
|
9375
|
+
if node_cache[:app_string_b64].has_key?(index)
|
|
9376
|
+
cached = node_cache[:app_string_b64][index]
|
|
9377
|
+
if cached
|
|
9378
|
+
node_cache[:app_string_b64][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9379
|
+
@index = cached.interval.end
|
|
9380
|
+
end
|
|
9381
|
+
return cached
|
|
9382
|
+
end
|
|
9383
|
+
|
|
9384
|
+
i0, s0 = index, []
|
|
9385
|
+
r1 = _nt_b64_S
|
|
9386
|
+
s0 << r1
|
|
9387
|
+
if r1
|
|
9388
|
+
s2, i2 = [], index
|
|
9389
|
+
loop do
|
|
9390
|
+
s3, i3 = [], index
|
|
9391
|
+
loop do
|
|
9392
|
+
i4, s4 = index, []
|
|
9393
|
+
r5 = _nt_b64dig
|
|
9394
|
+
s4 << r5
|
|
9395
|
+
if r5
|
|
9396
|
+
r6 = _nt_b64_S
|
|
9397
|
+
s4 << r6
|
|
9398
|
+
end
|
|
9399
|
+
if s4.last
|
|
9400
|
+
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
|
9401
|
+
r4.extend(AppStringB640)
|
|
9402
|
+
else
|
|
9403
|
+
@index = i4
|
|
9404
|
+
r4 = nil
|
|
9405
|
+
end
|
|
9406
|
+
if r4
|
|
9407
|
+
s3 << r4
|
|
9408
|
+
else
|
|
9409
|
+
break
|
|
9410
|
+
end
|
|
9411
|
+
if s3.size == 4
|
|
9412
|
+
break
|
|
9413
|
+
end
|
|
9414
|
+
end
|
|
9415
|
+
if s3.size < 4
|
|
9416
|
+
@index = i3
|
|
9417
|
+
r3 = nil
|
|
9418
|
+
else
|
|
9419
|
+
if s3.size < 4
|
|
9420
|
+
@terminal_failures.pop
|
|
9421
|
+
end
|
|
9422
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
|
9423
|
+
end
|
|
9424
|
+
if r3
|
|
9425
|
+
s2 << r3
|
|
9426
|
+
else
|
|
9427
|
+
break
|
|
9428
|
+
end
|
|
9429
|
+
end
|
|
9430
|
+
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
|
9431
|
+
s0 << r2
|
|
9432
|
+
if r2
|
|
9433
|
+
i8, s8 = index, []
|
|
9434
|
+
r9 = _nt_b64dig
|
|
9435
|
+
s8 << r9
|
|
9436
|
+
if r9
|
|
9437
|
+
r10 = _nt_b64_S
|
|
9438
|
+
s8 << r10
|
|
9439
|
+
if r10
|
|
9440
|
+
r11 = _nt_b64dig
|
|
9441
|
+
s8 << r11
|
|
9442
|
+
if r11
|
|
9443
|
+
r12 = _nt_b64_S
|
|
9444
|
+
s8 << r12
|
|
9445
|
+
if r12
|
|
9446
|
+
i14 = index
|
|
9447
|
+
i15, s15 = index, []
|
|
9448
|
+
if (match_len = has_terminal?("=", false, index))
|
|
9449
|
+
r16 = true
|
|
9450
|
+
@index += match_len
|
|
9451
|
+
else
|
|
9452
|
+
terminal_parse_failure('"="')
|
|
9453
|
+
r16 = nil
|
|
9454
|
+
end
|
|
9455
|
+
s15 << r16
|
|
9456
|
+
if r16
|
|
9457
|
+
r17 = _nt_b64_S
|
|
9458
|
+
s15 << r17
|
|
9459
|
+
if r17
|
|
9460
|
+
if (match_len = has_terminal?("=", false, index))
|
|
9461
|
+
r18 = true
|
|
9462
|
+
@index += match_len
|
|
9463
|
+
else
|
|
9464
|
+
terminal_parse_failure('"="')
|
|
9465
|
+
r18 = nil
|
|
9466
|
+
end
|
|
9467
|
+
s15 << r18
|
|
9468
|
+
end
|
|
9469
|
+
end
|
|
9470
|
+
if s15.last
|
|
9471
|
+
r15 = instantiate_node(SyntaxNode,input, i15...index, s15)
|
|
9472
|
+
r15.extend(AppStringB641)
|
|
9473
|
+
else
|
|
9474
|
+
@index = i15
|
|
9475
|
+
r15 = nil
|
|
9476
|
+
end
|
|
9477
|
+
if r15
|
|
9478
|
+
r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true
|
|
9479
|
+
r14 = r15
|
|
9480
|
+
else
|
|
9481
|
+
i19, s19 = index, []
|
|
9482
|
+
r20 = _nt_b64dig
|
|
9483
|
+
s19 << r20
|
|
9484
|
+
if r20
|
|
9485
|
+
r21 = _nt_b64_S
|
|
9486
|
+
s19 << r21
|
|
9487
|
+
if r21
|
|
9488
|
+
if (match_len = has_terminal?("=", false, index))
|
|
9489
|
+
r23 = true
|
|
9490
|
+
@index += match_len
|
|
9491
|
+
else
|
|
9492
|
+
terminal_parse_failure('"="')
|
|
9493
|
+
r23 = nil
|
|
9494
|
+
end
|
|
9495
|
+
if r23
|
|
9496
|
+
r22 = r23
|
|
9497
|
+
else
|
|
9498
|
+
r22 = instantiate_node(SyntaxNode,input, index...index)
|
|
9499
|
+
end
|
|
9500
|
+
s19 << r22
|
|
9501
|
+
end
|
|
9502
|
+
end
|
|
9503
|
+
if s19.last
|
|
9504
|
+
r19 = instantiate_node(SyntaxNode,input, i19...index, s19)
|
|
9505
|
+
r19.extend(AppStringB642)
|
|
9506
|
+
else
|
|
9507
|
+
@index = i19
|
|
9508
|
+
r19 = nil
|
|
9509
|
+
end
|
|
9510
|
+
if r19
|
|
9511
|
+
r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true
|
|
9512
|
+
r14 = r19
|
|
9513
|
+
else
|
|
9514
|
+
@index = i14
|
|
9515
|
+
r14 = nil
|
|
9516
|
+
end
|
|
9517
|
+
end
|
|
9518
|
+
if r14
|
|
9519
|
+
r13 = r14
|
|
9520
|
+
else
|
|
9521
|
+
r13 = instantiate_node(SyntaxNode,input, index...index)
|
|
9522
|
+
end
|
|
9523
|
+
s8 << r13
|
|
9524
|
+
if r13
|
|
9525
|
+
r24 = _nt_b64_S
|
|
9526
|
+
s8 << r24
|
|
9527
|
+
end
|
|
9528
|
+
end
|
|
9529
|
+
end
|
|
9530
|
+
end
|
|
9531
|
+
end
|
|
9532
|
+
if s8.last
|
|
9533
|
+
r8 = instantiate_node(SyntaxNode,input, i8...index, s8)
|
|
9534
|
+
r8.extend(AppStringB643)
|
|
9535
|
+
else
|
|
9536
|
+
@index = i8
|
|
9537
|
+
r8 = nil
|
|
9538
|
+
end
|
|
9539
|
+
if r8
|
|
9540
|
+
r7 = r8
|
|
9541
|
+
else
|
|
9542
|
+
r7 = instantiate_node(SyntaxNode,input, index...index)
|
|
9543
|
+
end
|
|
9544
|
+
s0 << r7
|
|
9545
|
+
if r7
|
|
9546
|
+
i26, s26 = index, []
|
|
9547
|
+
if (match_len = has_terminal?("#", false, index))
|
|
9548
|
+
r27 = true
|
|
9549
|
+
@index += match_len
|
|
9550
|
+
else
|
|
9551
|
+
terminal_parse_failure('"#"')
|
|
9552
|
+
r27 = nil
|
|
9553
|
+
end
|
|
9554
|
+
s26 << r27
|
|
9555
|
+
if r27
|
|
9556
|
+
s28, i28 = [], index
|
|
9557
|
+
loop do
|
|
9558
|
+
r29 = _nt_i_non_lf
|
|
9559
|
+
if r29
|
|
9560
|
+
s28 << r29
|
|
9561
|
+
else
|
|
9562
|
+
break
|
|
9563
|
+
end
|
|
9564
|
+
end
|
|
9565
|
+
r28 = instantiate_node(SyntaxNode,input, i28...index, s28)
|
|
9566
|
+
s26 << r28
|
|
9567
|
+
end
|
|
9568
|
+
if s26.last
|
|
9569
|
+
r26 = instantiate_node(SyntaxNode,input, i26...index, s26)
|
|
9570
|
+
r26.extend(AppStringB644)
|
|
9571
|
+
else
|
|
9572
|
+
@index = i26
|
|
9573
|
+
r26 = nil
|
|
9574
|
+
end
|
|
9575
|
+
if r26
|
|
9576
|
+
r25 = r26
|
|
9577
|
+
else
|
|
9578
|
+
r25 = instantiate_node(SyntaxNode,input, index...index)
|
|
9579
|
+
end
|
|
9580
|
+
s0 << r25
|
|
9581
|
+
end
|
|
9582
|
+
end
|
|
9583
|
+
end
|
|
9584
|
+
if s0.last
|
|
9585
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
9586
|
+
r0.extend(AppStringB645)
|
|
9587
|
+
r0.extend(AppStringB646)
|
|
9588
|
+
else
|
|
9589
|
+
@index = i0
|
|
9590
|
+
r0 = nil
|
|
9591
|
+
end
|
|
9592
|
+
|
|
9593
|
+
node_cache[:app_string_b64][start_index] = r0
|
|
9594
|
+
|
|
9595
|
+
r0
|
|
9596
|
+
end
|
|
9597
|
+
|
|
9598
|
+
def _nt_b64dig
|
|
9599
|
+
start_index = index
|
|
9600
|
+
if node_cache[:b64dig].has_key?(index)
|
|
9601
|
+
cached = node_cache[:b64dig][index]
|
|
9602
|
+
if cached
|
|
9603
|
+
node_cache[:b64dig][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9604
|
+
@index = cached.interval.end
|
|
9605
|
+
end
|
|
9606
|
+
return cached
|
|
9607
|
+
end
|
|
9608
|
+
|
|
9609
|
+
i0 = index
|
|
9610
|
+
r1 = _nt_ALPHA
|
|
9611
|
+
if r1
|
|
9612
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
9613
|
+
r0 = r1
|
|
9614
|
+
else
|
|
9615
|
+
r2 = _nt_DIGIT
|
|
9616
|
+
if r2
|
|
9617
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
9618
|
+
r0 = r2
|
|
9619
|
+
else
|
|
9620
|
+
if (match_len = has_terminal?("-", false, index))
|
|
9621
|
+
r3 = true
|
|
9622
|
+
@index += match_len
|
|
9623
|
+
else
|
|
9624
|
+
terminal_parse_failure('"-"')
|
|
9625
|
+
r3 = nil
|
|
9626
|
+
end
|
|
9627
|
+
if r3
|
|
9628
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
9629
|
+
r0 = r3
|
|
9630
|
+
else
|
|
9631
|
+
if (match_len = has_terminal?("_", false, index))
|
|
9632
|
+
r4 = true
|
|
9633
|
+
@index += match_len
|
|
9634
|
+
else
|
|
9635
|
+
terminal_parse_failure('"_"')
|
|
9636
|
+
r4 = nil
|
|
9637
|
+
end
|
|
9638
|
+
if r4
|
|
9639
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
|
9640
|
+
r0 = r4
|
|
9641
|
+
else
|
|
9642
|
+
if (match_len = has_terminal?("+", false, index))
|
|
9643
|
+
r5 = true
|
|
9644
|
+
@index += match_len
|
|
9645
|
+
else
|
|
9646
|
+
terminal_parse_failure('"+"')
|
|
9647
|
+
r5 = nil
|
|
9648
|
+
end
|
|
9649
|
+
if r5
|
|
9650
|
+
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
9651
|
+
r0 = r5
|
|
9652
|
+
else
|
|
9653
|
+
if (match_len = has_terminal?("/", false, index))
|
|
9654
|
+
r6 = true
|
|
9655
|
+
@index += match_len
|
|
9656
|
+
else
|
|
9657
|
+
terminal_parse_failure('"/"')
|
|
9658
|
+
r6 = nil
|
|
9659
|
+
end
|
|
9660
|
+
if r6
|
|
9661
|
+
r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
|
|
9662
|
+
r0 = r6
|
|
9663
|
+
else
|
|
9664
|
+
@index = i0
|
|
9665
|
+
r0 = nil
|
|
9666
|
+
end
|
|
9667
|
+
end
|
|
9668
|
+
end
|
|
9669
|
+
end
|
|
9670
|
+
end
|
|
9671
|
+
end
|
|
9672
|
+
|
|
9673
|
+
node_cache[:b64dig][start_index] = r0
|
|
9674
|
+
|
|
9675
|
+
r0
|
|
9676
|
+
end
|
|
9677
|
+
|
|
9678
|
+
module B64S0
|
|
9679
|
+
def b64_comment
|
|
9680
|
+
elements[0]
|
|
9681
|
+
end
|
|
9682
|
+
|
|
9683
|
+
end
|
|
9684
|
+
|
|
9685
|
+
module B64S1
|
|
9686
|
+
end
|
|
9687
|
+
|
|
9688
|
+
def _nt_b64_S
|
|
9689
|
+
start_index = index
|
|
9690
|
+
if node_cache[:b64_S].has_key?(index)
|
|
9691
|
+
cached = node_cache[:b64_S][index]
|
|
9692
|
+
if cached
|
|
9693
|
+
node_cache[:b64_S][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9694
|
+
@index = cached.interval.end
|
|
9695
|
+
end
|
|
9696
|
+
return cached
|
|
9697
|
+
end
|
|
9698
|
+
|
|
9699
|
+
i0, s0 = index, []
|
|
9700
|
+
s1, i1 = [], index
|
|
9701
|
+
loop do
|
|
9702
|
+
r2 = _nt_i_blank
|
|
9703
|
+
if r2
|
|
9704
|
+
s1 << r2
|
|
9705
|
+
else
|
|
9706
|
+
break
|
|
9707
|
+
end
|
|
9708
|
+
end
|
|
9709
|
+
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
|
9710
|
+
s0 << r1
|
|
9711
|
+
if r1
|
|
9712
|
+
s3, i3 = [], index
|
|
9713
|
+
loop do
|
|
9714
|
+
i4, s4 = index, []
|
|
9715
|
+
r5 = _nt_b64_comment
|
|
9716
|
+
s4 << r5
|
|
9717
|
+
if r5
|
|
9718
|
+
s6, i6 = [], index
|
|
9719
|
+
loop do
|
|
9720
|
+
r7 = _nt_i_blank
|
|
9721
|
+
if r7
|
|
9722
|
+
s6 << r7
|
|
9723
|
+
else
|
|
9724
|
+
break
|
|
9725
|
+
end
|
|
9726
|
+
end
|
|
9727
|
+
r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
|
|
9728
|
+
s4 << r6
|
|
9729
|
+
end
|
|
9730
|
+
if s4.last
|
|
9731
|
+
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
|
9732
|
+
r4.extend(B64S0)
|
|
9733
|
+
else
|
|
9734
|
+
@index = i4
|
|
9735
|
+
r4 = nil
|
|
9736
|
+
end
|
|
9737
|
+
if r4
|
|
9738
|
+
s3 << r4
|
|
9739
|
+
else
|
|
9740
|
+
break
|
|
9741
|
+
end
|
|
9742
|
+
end
|
|
9743
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
|
9744
|
+
s0 << r3
|
|
9745
|
+
end
|
|
9746
|
+
if s0.last
|
|
9747
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
9748
|
+
r0.extend(B64S1)
|
|
9749
|
+
else
|
|
9750
|
+
@index = i0
|
|
9751
|
+
r0 = nil
|
|
9752
|
+
end
|
|
9753
|
+
|
|
9754
|
+
node_cache[:b64_S][start_index] = r0
|
|
9755
|
+
|
|
9756
|
+
r0
|
|
9757
|
+
end
|
|
9758
|
+
|
|
9759
|
+
module B64Comment0
|
|
9760
|
+
end
|
|
9761
|
+
|
|
9762
|
+
def _nt_b64_comment
|
|
9763
|
+
start_index = index
|
|
9764
|
+
if node_cache[:b64_comment].has_key?(index)
|
|
9765
|
+
cached = node_cache[:b64_comment][index]
|
|
9766
|
+
if cached
|
|
9767
|
+
node_cache[:b64_comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9768
|
+
@index = cached.interval.end
|
|
9769
|
+
end
|
|
9770
|
+
return cached
|
|
9771
|
+
end
|
|
9772
|
+
|
|
9773
|
+
i0, s0 = index, []
|
|
9774
|
+
if (match_len = has_terminal?("#", false, index))
|
|
9775
|
+
r1 = true
|
|
9776
|
+
@index += match_len
|
|
9777
|
+
else
|
|
9778
|
+
terminal_parse_failure('"#"')
|
|
9779
|
+
r1 = nil
|
|
9780
|
+
end
|
|
9781
|
+
s0 << r1
|
|
9782
|
+
if r1
|
|
9783
|
+
s2, i2 = [], index
|
|
9784
|
+
loop do
|
|
9785
|
+
r3 = _nt_i_non_lf
|
|
9786
|
+
if r3
|
|
9787
|
+
s2 << r3
|
|
9788
|
+
else
|
|
9789
|
+
break
|
|
9790
|
+
end
|
|
9791
|
+
end
|
|
9792
|
+
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
|
9793
|
+
s0 << r2
|
|
9794
|
+
if r2
|
|
9795
|
+
if (match_len = has_terminal?("\n", false, index))
|
|
9796
|
+
r4 = true
|
|
9797
|
+
@index += match_len
|
|
9798
|
+
else
|
|
9799
|
+
terminal_parse_failure('"\\n"')
|
|
9800
|
+
r4 = nil
|
|
9801
|
+
end
|
|
9802
|
+
s0 << r4
|
|
9803
|
+
end
|
|
9804
|
+
end
|
|
9805
|
+
if s0.last
|
|
9806
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
9807
|
+
r0.extend(B64Comment0)
|
|
9808
|
+
else
|
|
9809
|
+
@index = i0
|
|
9810
|
+
r0 = nil
|
|
9811
|
+
end
|
|
9812
|
+
|
|
9813
|
+
node_cache[:b64_comment][start_index] = r0
|
|
9814
|
+
|
|
9815
|
+
r0
|
|
9816
|
+
end
|
|
9817
|
+
|
|
9818
|
+
module RawAppStringB640
|
|
9819
|
+
def startrawdelim
|
|
9820
|
+
elements[1]
|
|
9821
|
+
end
|
|
9822
|
+
|
|
9823
|
+
def r_app_string_b64
|
|
9824
|
+
elements[2]
|
|
9825
|
+
end
|
|
9826
|
+
end
|
|
9827
|
+
|
|
9828
|
+
module RawAppStringB641
|
|
9829
|
+
def ast; r_app_string_b64.ast end
|
|
9830
|
+
end
|
|
9831
|
+
|
|
9832
|
+
def _nt_raw_app_string_b64
|
|
9833
|
+
start_index = index
|
|
9834
|
+
if node_cache[:raw_app_string_b64].has_key?(index)
|
|
9835
|
+
cached = node_cache[:raw_app_string_b64][index]
|
|
9836
|
+
if cached
|
|
9837
|
+
node_cache[:raw_app_string_b64][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9838
|
+
@index = cached.interval.end
|
|
9839
|
+
end
|
|
9840
|
+
return cached
|
|
9841
|
+
end
|
|
9842
|
+
|
|
9843
|
+
i0, s0 = index, []
|
|
9844
|
+
if (match_len = has_terminal?("b64", false, index))
|
|
9845
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
|
9846
|
+
@index += match_len
|
|
9847
|
+
else
|
|
9848
|
+
terminal_parse_failure('"b64"')
|
|
9849
|
+
r1 = nil
|
|
9850
|
+
end
|
|
9851
|
+
s0 << r1
|
|
9852
|
+
if r1
|
|
9853
|
+
r2 = _nt_startrawdelim
|
|
9854
|
+
s0 << r2
|
|
9855
|
+
if r2
|
|
9856
|
+
r3 = _nt_r_app_string_b64
|
|
9857
|
+
s0 << r3
|
|
9858
|
+
end
|
|
9859
|
+
end
|
|
9860
|
+
if s0.last
|
|
9861
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
9862
|
+
r0.extend(RawAppStringB640)
|
|
9863
|
+
r0.extend(RawAppStringB641)
|
|
9864
|
+
else
|
|
9865
|
+
@index = i0
|
|
9866
|
+
r0 = nil
|
|
9867
|
+
end
|
|
9868
|
+
|
|
9869
|
+
node_cache[:raw_app_string_b64][start_index] = r0
|
|
9870
|
+
|
|
9871
|
+
r0
|
|
9872
|
+
end
|
|
9873
|
+
|
|
9874
|
+
module RAppStringB640
|
|
9875
|
+
def b64dig
|
|
9876
|
+
elements[0]
|
|
9877
|
+
end
|
|
9878
|
+
|
|
9879
|
+
def b64_S
|
|
9880
|
+
elements[1]
|
|
9881
|
+
end
|
|
9882
|
+
end
|
|
9883
|
+
|
|
9884
|
+
module RAppStringB641
|
|
9885
|
+
def rb64_S
|
|
9886
|
+
elements[1]
|
|
9887
|
+
end
|
|
9888
|
+
|
|
9889
|
+
end
|
|
9890
|
+
|
|
9891
|
+
module RAppStringB642
|
|
9892
|
+
def b64dig
|
|
9893
|
+
elements[0]
|
|
9894
|
+
end
|
|
9895
|
+
|
|
9896
|
+
def rb64_S
|
|
9897
|
+
elements[1]
|
|
9898
|
+
end
|
|
9899
|
+
|
|
9900
|
+
end
|
|
9901
|
+
|
|
9902
|
+
module RAppStringB643
|
|
9903
|
+
def b64dig1
|
|
9904
|
+
elements[0]
|
|
9905
|
+
end
|
|
9906
|
+
|
|
9907
|
+
def rb64_S1
|
|
9908
|
+
elements[1]
|
|
9909
|
+
end
|
|
9910
|
+
|
|
9911
|
+
def b64dig2
|
|
9912
|
+
elements[2]
|
|
9913
|
+
end
|
|
9914
|
+
|
|
9915
|
+
def rb64_S2
|
|
9916
|
+
elements[3]
|
|
9917
|
+
end
|
|
9918
|
+
|
|
9919
|
+
def rb64_S3
|
|
9920
|
+
elements[5]
|
|
9921
|
+
end
|
|
9922
|
+
end
|
|
9923
|
+
|
|
9924
|
+
module RAppStringB644
|
|
9925
|
+
def matchrawdelim
|
|
9926
|
+
elements[2]
|
|
9927
|
+
end
|
|
9928
|
+
end
|
|
9929
|
+
|
|
9930
|
+
module RAppStringB645
|
|
9931
|
+
def b64_S
|
|
9932
|
+
elements[0]
|
|
9933
|
+
end
|
|
9934
|
+
|
|
9935
|
+
end
|
|
9936
|
+
|
|
9937
|
+
module RAppStringB646
|
|
9938
|
+
def ast
|
|
9939
|
+
t = text_value.gsub(/\s|#[^\n]*(?:\n|\z)/, '').chars.each_slice(4).map(&:join)
|
|
9940
|
+
if last = t[-1]
|
|
9941
|
+
last << "=" * (4 - last.size)
|
|
9942
|
+
end
|
|
9943
|
+
b = t.join.tr("-_", "+/")
|
|
9944
|
+
begin
|
|
9945
|
+
b.unpack("m0")[0]
|
|
9946
|
+
rescue ArgumentError
|
|
9947
|
+
raise ArgumentError, "cbor-diagnostic: invalid base64 #{b.inspect}", caller[1..-1]
|
|
9948
|
+
end
|
|
9949
|
+
end
|
|
9950
|
+
end
|
|
9951
|
+
|
|
9952
|
+
def _nt_r_app_string_b64
|
|
9953
|
+
start_index = index
|
|
9954
|
+
if node_cache[:r_app_string_b64].has_key?(index)
|
|
9955
|
+
cached = node_cache[:r_app_string_b64][index]
|
|
9956
|
+
if cached
|
|
9957
|
+
node_cache[:r_app_string_b64][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9958
|
+
@index = cached.interval.end
|
|
9959
|
+
end
|
|
9960
|
+
return cached
|
|
9961
|
+
end
|
|
9962
|
+
|
|
9963
|
+
i0, s0 = index, []
|
|
9964
|
+
r1 = _nt_b64_S
|
|
8625
9965
|
s0 << r1
|
|
8626
9966
|
if r1
|
|
8627
9967
|
s2, i2 = [], index
|
|
@@ -8637,7 +9977,7 @@ module EDNGRAMMAR
|
|
|
8637
9977
|
end
|
|
8638
9978
|
if s4.last
|
|
8639
9979
|
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
|
8640
|
-
r4.extend(
|
|
9980
|
+
r4.extend(RAppStringB640)
|
|
8641
9981
|
else
|
|
8642
9982
|
@index = i4
|
|
8643
9983
|
r4 = nil
|
|
@@ -8673,13 +10013,13 @@ module EDNGRAMMAR
|
|
|
8673
10013
|
r9 = _nt_b64dig
|
|
8674
10014
|
s8 << r9
|
|
8675
10015
|
if r9
|
|
8676
|
-
r10 =
|
|
10016
|
+
r10 = _nt_rb64_S
|
|
8677
10017
|
s8 << r10
|
|
8678
10018
|
if r10
|
|
8679
10019
|
r11 = _nt_b64dig
|
|
8680
10020
|
s8 << r11
|
|
8681
10021
|
if r11
|
|
8682
|
-
r12 =
|
|
10022
|
+
r12 = _nt_rb64_S
|
|
8683
10023
|
s8 << r12
|
|
8684
10024
|
if r12
|
|
8685
10025
|
i14 = index
|
|
@@ -8693,7 +10033,7 @@ module EDNGRAMMAR
|
|
|
8693
10033
|
end
|
|
8694
10034
|
s15 << r16
|
|
8695
10035
|
if r16
|
|
8696
|
-
r17 =
|
|
10036
|
+
r17 = _nt_rb64_S
|
|
8697
10037
|
s15 << r17
|
|
8698
10038
|
if r17
|
|
8699
10039
|
if (match_len = has_terminal?("=", false, index))
|
|
@@ -8708,7 +10048,7 @@ module EDNGRAMMAR
|
|
|
8708
10048
|
end
|
|
8709
10049
|
if s15.last
|
|
8710
10050
|
r15 = instantiate_node(SyntaxNode,input, i15...index, s15)
|
|
8711
|
-
r15.extend(
|
|
10051
|
+
r15.extend(RAppStringB641)
|
|
8712
10052
|
else
|
|
8713
10053
|
@index = i15
|
|
8714
10054
|
r15 = nil
|
|
@@ -8721,7 +10061,7 @@ module EDNGRAMMAR
|
|
|
8721
10061
|
r20 = _nt_b64dig
|
|
8722
10062
|
s19 << r20
|
|
8723
10063
|
if r20
|
|
8724
|
-
r21 =
|
|
10064
|
+
r21 = _nt_rb64_S
|
|
8725
10065
|
s19 << r21
|
|
8726
10066
|
if r21
|
|
8727
10067
|
if (match_len = has_terminal?("=", false, index))
|
|
@@ -8741,7 +10081,7 @@ module EDNGRAMMAR
|
|
|
8741
10081
|
end
|
|
8742
10082
|
if s19.last
|
|
8743
10083
|
r19 = instantiate_node(SyntaxNode,input, i19...index, s19)
|
|
8744
|
-
r19.extend(
|
|
10084
|
+
r19.extend(RAppStringB642)
|
|
8745
10085
|
else
|
|
8746
10086
|
@index = i19
|
|
8747
10087
|
r19 = nil
|
|
@@ -8761,7 +10101,7 @@ module EDNGRAMMAR
|
|
|
8761
10101
|
end
|
|
8762
10102
|
s8 << r13
|
|
8763
10103
|
if r13
|
|
8764
|
-
r24 =
|
|
10104
|
+
r24 = _nt_rb64_S
|
|
8765
10105
|
s8 << r24
|
|
8766
10106
|
end
|
|
8767
10107
|
end
|
|
@@ -8770,7 +10110,7 @@ module EDNGRAMMAR
|
|
|
8770
10110
|
end
|
|
8771
10111
|
if s8.last
|
|
8772
10112
|
r8 = instantiate_node(SyntaxNode,input, i8...index, s8)
|
|
8773
|
-
r8.extend(
|
|
10113
|
+
r8.extend(RAppStringB643)
|
|
8774
10114
|
else
|
|
8775
10115
|
@index = i8
|
|
8776
10116
|
r8 = nil
|
|
@@ -8782,6 +10122,7 @@ module EDNGRAMMAR
|
|
|
8782
10122
|
end
|
|
8783
10123
|
s0 << r7
|
|
8784
10124
|
if r7
|
|
10125
|
+
i25 = index
|
|
8785
10126
|
i26, s26 = index, []
|
|
8786
10127
|
if (match_len = has_terminal?("#", false, index))
|
|
8787
10128
|
r27 = true
|
|
@@ -8794,7 +10135,7 @@ module EDNGRAMMAR
|
|
|
8794
10135
|
if r27
|
|
8795
10136
|
s28, i28 = [], index
|
|
8796
10137
|
loop do
|
|
8797
|
-
r29 =
|
|
10138
|
+
r29 = _nt_r_non_lf
|
|
8798
10139
|
if r29
|
|
8799
10140
|
s28 << r29
|
|
8800
10141
|
else
|
|
@@ -8803,18 +10144,30 @@ module EDNGRAMMAR
|
|
|
8803
10144
|
end
|
|
8804
10145
|
r28 = instantiate_node(SyntaxNode,input, i28...index, s28)
|
|
8805
10146
|
s26 << r28
|
|
10147
|
+
if r28
|
|
10148
|
+
r30 = _nt_matchrawdelim
|
|
10149
|
+
s26 << r30
|
|
10150
|
+
end
|
|
8806
10151
|
end
|
|
8807
10152
|
if s26.last
|
|
8808
10153
|
r26 = instantiate_node(SyntaxNode,input, i26...index, s26)
|
|
8809
|
-
r26.extend(
|
|
10154
|
+
r26.extend(RAppStringB644)
|
|
8810
10155
|
else
|
|
8811
10156
|
@index = i26
|
|
8812
10157
|
r26 = nil
|
|
8813
10158
|
end
|
|
8814
10159
|
if r26
|
|
10160
|
+
r26 = SyntaxNode.new(input, (index-1)...index) if r26 == true
|
|
8815
10161
|
r25 = r26
|
|
8816
10162
|
else
|
|
8817
|
-
|
|
10163
|
+
r31 = _nt_fitrawdelim
|
|
10164
|
+
if r31
|
|
10165
|
+
r31 = SyntaxNode.new(input, (index-1)...index) if r31 == true
|
|
10166
|
+
r25 = r31
|
|
10167
|
+
else
|
|
10168
|
+
@index = i25
|
|
10169
|
+
r25 = nil
|
|
10170
|
+
end
|
|
8818
10171
|
end
|
|
8819
10172
|
s0 << r25
|
|
8820
10173
|
end
|
|
@@ -8822,114 +10175,34 @@ module EDNGRAMMAR
|
|
|
8822
10175
|
end
|
|
8823
10176
|
if s0.last
|
|
8824
10177
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
8825
|
-
r0.extend(
|
|
8826
|
-
r0.extend(
|
|
10178
|
+
r0.extend(RAppStringB645)
|
|
10179
|
+
r0.extend(RAppStringB646)
|
|
8827
10180
|
else
|
|
8828
10181
|
@index = i0
|
|
8829
10182
|
r0 = nil
|
|
8830
10183
|
end
|
|
8831
10184
|
|
|
8832
|
-
node_cache[:
|
|
8833
|
-
|
|
8834
|
-
r0
|
|
8835
|
-
end
|
|
8836
|
-
|
|
8837
|
-
def _nt_b64dig
|
|
8838
|
-
start_index = index
|
|
8839
|
-
if node_cache[:b64dig].has_key?(index)
|
|
8840
|
-
cached = node_cache[:b64dig][index]
|
|
8841
|
-
if cached
|
|
8842
|
-
node_cache[:b64dig][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
8843
|
-
@index = cached.interval.end
|
|
8844
|
-
end
|
|
8845
|
-
return cached
|
|
8846
|
-
end
|
|
8847
|
-
|
|
8848
|
-
i0 = index
|
|
8849
|
-
r1 = _nt_ALPHA
|
|
8850
|
-
if r1
|
|
8851
|
-
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
8852
|
-
r0 = r1
|
|
8853
|
-
else
|
|
8854
|
-
r2 = _nt_DIGIT
|
|
8855
|
-
if r2
|
|
8856
|
-
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
8857
|
-
r0 = r2
|
|
8858
|
-
else
|
|
8859
|
-
if (match_len = has_terminal?("-", false, index))
|
|
8860
|
-
r3 = true
|
|
8861
|
-
@index += match_len
|
|
8862
|
-
else
|
|
8863
|
-
terminal_parse_failure('"-"')
|
|
8864
|
-
r3 = nil
|
|
8865
|
-
end
|
|
8866
|
-
if r3
|
|
8867
|
-
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
8868
|
-
r0 = r3
|
|
8869
|
-
else
|
|
8870
|
-
if (match_len = has_terminal?("_", false, index))
|
|
8871
|
-
r4 = true
|
|
8872
|
-
@index += match_len
|
|
8873
|
-
else
|
|
8874
|
-
terminal_parse_failure('"_"')
|
|
8875
|
-
r4 = nil
|
|
8876
|
-
end
|
|
8877
|
-
if r4
|
|
8878
|
-
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
|
8879
|
-
r0 = r4
|
|
8880
|
-
else
|
|
8881
|
-
if (match_len = has_terminal?("+", false, index))
|
|
8882
|
-
r5 = true
|
|
8883
|
-
@index += match_len
|
|
8884
|
-
else
|
|
8885
|
-
terminal_parse_failure('"+"')
|
|
8886
|
-
r5 = nil
|
|
8887
|
-
end
|
|
8888
|
-
if r5
|
|
8889
|
-
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
8890
|
-
r0 = r5
|
|
8891
|
-
else
|
|
8892
|
-
if (match_len = has_terminal?("/", false, index))
|
|
8893
|
-
r6 = true
|
|
8894
|
-
@index += match_len
|
|
8895
|
-
else
|
|
8896
|
-
terminal_parse_failure('"/"')
|
|
8897
|
-
r6 = nil
|
|
8898
|
-
end
|
|
8899
|
-
if r6
|
|
8900
|
-
r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
|
|
8901
|
-
r0 = r6
|
|
8902
|
-
else
|
|
8903
|
-
@index = i0
|
|
8904
|
-
r0 = nil
|
|
8905
|
-
end
|
|
8906
|
-
end
|
|
8907
|
-
end
|
|
8908
|
-
end
|
|
8909
|
-
end
|
|
8910
|
-
end
|
|
8911
|
-
|
|
8912
|
-
node_cache[:b64dig][start_index] = r0
|
|
10185
|
+
node_cache[:r_app_string_b64][start_index] = r0
|
|
8913
10186
|
|
|
8914
10187
|
r0
|
|
8915
10188
|
end
|
|
8916
10189
|
|
|
8917
|
-
module
|
|
8918
|
-
def
|
|
10190
|
+
module Rb64S0
|
|
10191
|
+
def rb64_comment
|
|
8919
10192
|
elements[0]
|
|
8920
10193
|
end
|
|
8921
10194
|
|
|
8922
10195
|
end
|
|
8923
10196
|
|
|
8924
|
-
module
|
|
10197
|
+
module Rb64S1
|
|
8925
10198
|
end
|
|
8926
10199
|
|
|
8927
|
-
def
|
|
10200
|
+
def _nt_rb64_S
|
|
8928
10201
|
start_index = index
|
|
8929
|
-
if node_cache[:
|
|
8930
|
-
cached = node_cache[:
|
|
10202
|
+
if node_cache[:rb64_S].has_key?(index)
|
|
10203
|
+
cached = node_cache[:rb64_S][index]
|
|
8931
10204
|
if cached
|
|
8932
|
-
node_cache[:
|
|
10205
|
+
node_cache[:rb64_S][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
8933
10206
|
@index = cached.interval.end
|
|
8934
10207
|
end
|
|
8935
10208
|
return cached
|
|
@@ -8938,7 +10211,7 @@ module EDNGRAMMAR
|
|
|
8938
10211
|
i0, s0 = index, []
|
|
8939
10212
|
s1, i1 = [], index
|
|
8940
10213
|
loop do
|
|
8941
|
-
r2 =
|
|
10214
|
+
r2 = _nt_blank
|
|
8942
10215
|
if r2
|
|
8943
10216
|
s1 << r2
|
|
8944
10217
|
else
|
|
@@ -8951,12 +10224,12 @@ module EDNGRAMMAR
|
|
|
8951
10224
|
s3, i3 = [], index
|
|
8952
10225
|
loop do
|
|
8953
10226
|
i4, s4 = index, []
|
|
8954
|
-
r5 =
|
|
10227
|
+
r5 = _nt_rb64_comment
|
|
8955
10228
|
s4 << r5
|
|
8956
10229
|
if r5
|
|
8957
10230
|
s6, i6 = [], index
|
|
8958
10231
|
loop do
|
|
8959
|
-
r7 =
|
|
10232
|
+
r7 = _nt_blank
|
|
8960
10233
|
if r7
|
|
8961
10234
|
s6 << r7
|
|
8962
10235
|
else
|
|
@@ -8968,7 +10241,7 @@ module EDNGRAMMAR
|
|
|
8968
10241
|
end
|
|
8969
10242
|
if s4.last
|
|
8970
10243
|
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
|
8971
|
-
r4.extend(
|
|
10244
|
+
r4.extend(Rb64S0)
|
|
8972
10245
|
else
|
|
8973
10246
|
@index = i4
|
|
8974
10247
|
r4 = nil
|
|
@@ -8984,26 +10257,26 @@ module EDNGRAMMAR
|
|
|
8984
10257
|
end
|
|
8985
10258
|
if s0.last
|
|
8986
10259
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
8987
|
-
r0.extend(
|
|
10260
|
+
r0.extend(Rb64S1)
|
|
8988
10261
|
else
|
|
8989
10262
|
@index = i0
|
|
8990
10263
|
r0 = nil
|
|
8991
10264
|
end
|
|
8992
10265
|
|
|
8993
|
-
node_cache[:
|
|
10266
|
+
node_cache[:rb64_S][start_index] = r0
|
|
8994
10267
|
|
|
8995
10268
|
r0
|
|
8996
10269
|
end
|
|
8997
10270
|
|
|
8998
|
-
module
|
|
10271
|
+
module Rb64Comment0
|
|
8999
10272
|
end
|
|
9000
10273
|
|
|
9001
|
-
def
|
|
10274
|
+
def _nt_rb64_comment
|
|
9002
10275
|
start_index = index
|
|
9003
|
-
if node_cache[:
|
|
9004
|
-
cached = node_cache[:
|
|
10276
|
+
if node_cache[:rb64_comment].has_key?(index)
|
|
10277
|
+
cached = node_cache[:rb64_comment][index]
|
|
9005
10278
|
if cached
|
|
9006
|
-
node_cache[:
|
|
10279
|
+
node_cache[:rb64_comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9007
10280
|
@index = cached.interval.end
|
|
9008
10281
|
end
|
|
9009
10282
|
return cached
|
|
@@ -9021,7 +10294,7 @@ module EDNGRAMMAR
|
|
|
9021
10294
|
if r1
|
|
9022
10295
|
s2, i2 = [], index
|
|
9023
10296
|
loop do
|
|
9024
|
-
r3 =
|
|
10297
|
+
r3 = _nt_r_non_lf
|
|
9025
10298
|
if r3
|
|
9026
10299
|
s2 << r3
|
|
9027
10300
|
else
|
|
@@ -9043,13 +10316,13 @@ module EDNGRAMMAR
|
|
|
9043
10316
|
end
|
|
9044
10317
|
if s0.last
|
|
9045
10318
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
9046
|
-
r0.extend(
|
|
10319
|
+
r0.extend(Rb64Comment0)
|
|
9047
10320
|
else
|
|
9048
10321
|
@index = i0
|
|
9049
10322
|
r0 = nil
|
|
9050
10323
|
end
|
|
9051
10324
|
|
|
9052
|
-
node_cache[:
|
|
10325
|
+
node_cache[:rb64_comment][start_index] = r0
|
|
9053
10326
|
|
|
9054
10327
|
r0
|
|
9055
10328
|
end
|