edn-abnf 0.5.23 → 0.5.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2de62d87cb2ff756b2aaf5a615604391289921e5430f28f5ba0d655d4e0eb631
4
- data.tar.gz: 56d5f8bc3a375799c9d8c534463b61a3b0e1d69c8422e21d0b8e40e7f4b79164
3
+ metadata.gz: 7ecff49f462934ac958a9624737c4612c498e6f434958eb26787b0f05fbc7e13
4
+ data.tar.gz: 0ec7a86f00424edbf61b5027d1e7fae7f01817b9b098acf65b491c70aa4067bc
5
5
  SHA512:
6
- metadata.gz: 05ca01e9fb98904f0d81b61d94bd78006ab09c8abf059c8ee71d40bf8110624021c711ca995fda388ac0528d1653100e57459487425166e785dbd2e6f0ff67aa
7
- data.tar.gz: 3b8cb49feb84b974d613b87094e391bc3f00a7afb7fdbf113a37f92d996123b764729e876849432539a9a57244365954152d7d5daa9b41dbe208eb125b3bfb5a
6
+ metadata.gz: 2818b417115bb44c83a5f5e200f7cdaf9a60f823ddc17d4e1c24a56c1805660d1e0a78cf14b5b608997dcb8403e7a6262f149cab1ddadce0bd716af181fda1c8
7
+ data.tar.gz: ada8677b77c726d04a644066400d27711ec46f9acf9030b3e53039315656ee45a7c2d1acf0f2e17365538e505a6449c24f041f82bfa717341d400add0246853d
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.23"
3
+ s.version = "0.5.24"
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"
@@ -3339,10 +3339,58 @@ module EDNGRAMMAR
3339
3339
  r0
3340
3340
  end
3341
3341
 
3342
+ def _nt_eol_comment
3343
+ start_index = index
3344
+ if node_cache[:eol_comment].has_key?(index)
3345
+ cached = node_cache[:eol_comment][index]
3346
+ if cached
3347
+ node_cache[:eol_comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3348
+ @index = cached.interval.end
3349
+ end
3350
+ return cached
3351
+ end
3352
+
3353
+ i0 = index
3354
+ if (match_len = has_terminal?("#", false, index))
3355
+ r1 = true
3356
+ @index += match_len
3357
+ else
3358
+ terminal_parse_failure('"#"')
3359
+ r1 = nil
3360
+ end
3361
+ if r1
3362
+ r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
3363
+ r0 = r1
3364
+ else
3365
+ if (match_len = has_terminal?("//", false, index))
3366
+ r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
3367
+ @index += match_len
3368
+ else
3369
+ terminal_parse_failure('"//"')
3370
+ r2 = nil
3371
+ end
3372
+ if r2
3373
+ r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
3374
+ r0 = r2
3375
+ else
3376
+ @index = i0
3377
+ r0 = nil
3378
+ end
3379
+ end
3380
+
3381
+ node_cache[:eol_comment][start_index] = r0
3382
+
3383
+ r0
3384
+ end
3385
+
3342
3386
  module Comment0
3343
3387
  end
3344
3388
 
3345
3389
  module Comment1
3390
+ def eol_comment
3391
+ elements[0]
3392
+ end
3393
+
3346
3394
  end
3347
3395
 
3348
3396
  def _nt_comment
@@ -3376,7 +3424,12 @@ module EDNGRAMMAR
3376
3424
  break
3377
3425
  end
3378
3426
  end
3379
- r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
3427
+ if s3.empty?
3428
+ @index = i3
3429
+ r3 = nil
3430
+ else
3431
+ r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
3432
+ end
3380
3433
  s1 << r3
3381
3434
  if r3
3382
3435
  if (match_len = has_terminal?("/", false, index))
@@ -3401,13 +3454,7 @@ module EDNGRAMMAR
3401
3454
  r0 = r1
3402
3455
  else
3403
3456
  i6, s6 = index, []
3404
- if (match_len = has_terminal?("#", false, index))
3405
- r7 = true
3406
- @index += match_len
3407
- else
3408
- terminal_parse_failure('"#"')
3409
- r7 = nil
3410
- end
3457
+ r7 = _nt_eol_comment
3411
3458
  s6 << r7
3412
3459
  if r7
3413
3460
  s8, i8 = [], index
@@ -8195,6 +8242,10 @@ module EDNGRAMMAR
8195
8242
  end
8196
8243
 
8197
8244
  module SAppStringH4
8245
+ def eol_comment
8246
+ elements[0]
8247
+ end
8248
+
8198
8249
  end
8199
8250
 
8200
8251
  module SAppStringH5
@@ -8313,13 +8364,7 @@ module EDNGRAMMAR
8313
8364
  s0 << r2
8314
8365
  if r2
8315
8366
  i13, s13 = index, []
8316
- if (match_len = has_terminal?("#", false, index))
8317
- r14 = true
8318
- @index += match_len
8319
- else
8320
- terminal_parse_failure('"#"')
8321
- r14 = nil
8322
- end
8367
+ r14 = _nt_eol_comment
8323
8368
  s13 << r14
8324
8369
  if r14
8325
8370
  s15, i15 = [], index
@@ -8552,6 +8597,10 @@ module EDNGRAMMAR
8552
8597
  end
8553
8598
 
8554
8599
  module HComment1
8600
+ def eol_comment
8601
+ elements[0]
8602
+ end
8603
+
8555
8604
  def i_LF
8556
8605
  elements[2]
8557
8606
  end
@@ -8588,7 +8637,12 @@ module EDNGRAMMAR
8588
8637
  break
8589
8638
  end
8590
8639
  end
8591
- r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
8640
+ if s3.empty?
8641
+ @index = i3
8642
+ r3 = nil
8643
+ else
8644
+ r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
8645
+ end
8592
8646
  s1 << r3
8593
8647
  if r3
8594
8648
  if (match_len = has_terminal?("/", false, index))
@@ -8613,13 +8667,7 @@ module EDNGRAMMAR
8613
8667
  r0 = r1
8614
8668
  else
8615
8669
  i6, s6 = index, []
8616
- if (match_len = has_terminal?("#", false, index))
8617
- r7 = true
8618
- @index += match_len
8619
- else
8620
- terminal_parse_failure('"#"')
8621
- r7 = nil
8622
- end
8670
+ r7 = _nt_eol_comment
8623
8671
  s6 << r7
8624
8672
  if r7
8625
8673
  s8, i8 = [], index
@@ -8867,6 +8915,10 @@ module EDNGRAMMAR
8867
8915
  end
8868
8916
 
8869
8917
  module RhComment1
8918
+ def eol_comment
8919
+ elements[0]
8920
+ end
8921
+
8870
8922
  end
8871
8923
 
8872
8924
  def _nt_rh_comment
@@ -8900,7 +8952,12 @@ module EDNGRAMMAR
8900
8952
  break
8901
8953
  end
8902
8954
  end
8903
- r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
8955
+ if s3.empty?
8956
+ @index = i3
8957
+ r3 = nil
8958
+ else
8959
+ r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
8960
+ end
8904
8961
  s1 << r3
8905
8962
  if r3
8906
8963
  if (match_len = has_terminal?("/", false, index))
@@ -8925,13 +8982,7 @@ module EDNGRAMMAR
8925
8982
  r0 = r1
8926
8983
  else
8927
8984
  i6, s6 = index, []
8928
- if (match_len = has_terminal?("#", false, index))
8929
- r7 = true
8930
- @index += match_len
8931
- else
8932
- terminal_parse_failure('"#"')
8933
- r7 = nil
8934
- end
8985
+ r7 = _nt_eol_comment
8935
8986
  s6 << r7
8936
8987
  if r7
8937
8988
  s8, i8 = [], index
@@ -9072,6 +9123,10 @@ module EDNGRAMMAR
9072
9123
  end
9073
9124
 
9074
9125
  module RAppStringH4
9126
+ def eol_comment
9127
+ elements[0]
9128
+ end
9129
+
9075
9130
  def matchrawdelim
9076
9131
  elements[2]
9077
9132
  end
@@ -9194,13 +9249,7 @@ module EDNGRAMMAR
9194
9249
  if r2
9195
9250
  i12 = index
9196
9251
  i13, s13 = index, []
9197
- if (match_len = has_terminal?("#", false, index))
9198
- r14 = true
9199
- @index += match_len
9200
- else
9201
- terminal_parse_failure('"#"')
9202
- r14 = nil
9203
- end
9252
+ r14 = _nt_eol_comment
9204
9253
  s13 << r14
9205
9254
  if r14
9206
9255
  s15, i15 = [], index
@@ -9366,6 +9415,10 @@ module EDNGRAMMAR
9366
9415
  end
9367
9416
 
9368
9417
  module SAppStringB644
9418
+ def eol_comment
9419
+ elements[0]
9420
+ end
9421
+
9369
9422
  end
9370
9423
 
9371
9424
  module SAppStringB645
@@ -9564,13 +9617,7 @@ module EDNGRAMMAR
9564
9617
  s0 << r7
9565
9618
  if r7
9566
9619
  i26, s26 = index, []
9567
- if (match_len = has_terminal?("#", false, index))
9568
- r27 = true
9569
- @index += match_len
9570
- else
9571
- terminal_parse_failure('"#"')
9572
- r27 = nil
9573
- end
9620
+ r27 = _nt_eol_comment
9574
9621
  s26 << r27
9575
9622
  if r27
9576
9623
  s28, i28 = [], index
@@ -9777,6 +9824,10 @@ module EDNGRAMMAR
9777
9824
  end
9778
9825
 
9779
9826
  module B64Comment0
9827
+ def eol_comment
9828
+ elements[0]
9829
+ end
9830
+
9780
9831
  end
9781
9832
 
9782
9833
  def _nt_b64_comment
@@ -9791,13 +9842,7 @@ module EDNGRAMMAR
9791
9842
  end
9792
9843
 
9793
9844
  i0, s0 = index, []
9794
- if (match_len = has_terminal?("#", false, index))
9795
- r1 = true
9796
- @index += match_len
9797
- else
9798
- terminal_parse_failure('"#"')
9799
- r1 = nil
9800
- end
9845
+ r1 = _nt_eol_comment
9801
9846
  s0 << r1
9802
9847
  if r1
9803
9848
  s2, i2 = [], index
@@ -9942,6 +9987,10 @@ module EDNGRAMMAR
9942
9987
  end
9943
9988
 
9944
9989
  module RAppStringB644
9990
+ def eol_comment
9991
+ elements[0]
9992
+ end
9993
+
9945
9994
  def matchrawdelim
9946
9995
  elements[2]
9947
9996
  end
@@ -10144,13 +10193,7 @@ module EDNGRAMMAR
10144
10193
  if r7
10145
10194
  i25 = index
10146
10195
  i26, s26 = index, []
10147
- if (match_len = has_terminal?("#", false, index))
10148
- r27 = true
10149
- @index += match_len
10150
- else
10151
- terminal_parse_failure('"#"')
10152
- r27 = nil
10153
- end
10196
+ r27 = _nt_eol_comment
10154
10197
  s26 << r27
10155
10198
  if r27
10156
10199
  s28, i28 = [], index
@@ -10289,6 +10332,10 @@ module EDNGRAMMAR
10289
10332
  end
10290
10333
 
10291
10334
  module Rb64Comment0
10335
+ def eol_comment
10336
+ elements[0]
10337
+ end
10338
+
10292
10339
  end
10293
10340
 
10294
10341
  def _nt_rb64_comment
@@ -10303,13 +10350,7 @@ module EDNGRAMMAR
10303
10350
  end
10304
10351
 
10305
10352
  i0, s0 = index, []
10306
- if (match_len = has_terminal?("#", false, index))
10307
- r1 = true
10308
- @index += match_len
10309
- else
10310
- terminal_parse_failure('"#"')
10311
- r1 = nil
10312
- end
10353
+ r1 = _nt_eol_comment
10313
10354
  s0 << r1
10314
10355
  if r1
10315
10356
  s2, i2 = [], index
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edn-abnf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.23
4
+ version: 0.5.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann