biodiversity 3.1.7 → 3.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 491d00fe00b993aa7db0ed71a5c59b4ecf1e69be
4
- data.tar.gz: 55594c895a405d52d467a6a99a699151c59287eb
3
+ metadata.gz: c1655d5f7cba11e28f66fec5bf3e0b82e118e637
4
+ data.tar.gz: f499f992128929e495f79632bd43aef993297fcc
5
5
  SHA512:
6
- metadata.gz: cd9241b5a54fbb21b18a29fe6451216cba5a63b224900713210790ecbc70838ed6266dfd1d320dbe8f9a394ffc5300962e205cb659e96c9d9f91f7604c5978bc
7
- data.tar.gz: d005b7d1bc87868d948d670d71fcf984d72743f6b7a5ece62fe82c04dbecb2d4a2b9f5b8a1eceb33d6132e04aa3d5bbd6380666814a949cdf207798250e5940c
6
+ metadata.gz: 221cfe8f65d0eec4c1d3c01b82156000c8ea9f01dabe2771571a1f0fbda76e7bf4cd16147be572cd958f67c2dc0add2665e8ead43fc9ad1b6677766326f1ae25
7
+ data.tar.gz: 670e24f41c5ef54a830f9e3299e6999b8ba162fcb3ca16430f56f501464be5ec6f6ff00068a87e8296600565558af14315b2b01d9ca3884a7af05b6f9c75569c
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 3.1.8 -- downgrading dependency on treetop to 1.4.1
2
+
1
3
  3.1.7 -- fixed travis and dependencies
2
4
 
3
5
  3.1.6 -- added forma. to ranks, tests for species epithets with apostrophe
data/biodiversity.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.executables = ["nnparse", "parserver"]
17
17
  gem.require_paths = ["lib"]
18
18
 
19
- gem.add_runtime_dependency "treetop", "~> 1.4"
19
+ gem.add_runtime_dependency "treetop", "~> 1.4.1"
20
20
  gem.add_runtime_dependency "parallel", "~> 1.4"
21
21
  gem.add_runtime_dependency "unicode_utils", "~> 1.4"
22
22
 
@@ -44,7 +44,7 @@ module ScientificNameCanonical
44
44
  if node_cache[:root].has_key?(index)
45
45
  cached = node_cache[:root][index]
46
46
  if cached
47
- node_cache[:root][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
47
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
48
48
  @index = cached.interval.end
49
49
  end
50
50
  return cached
@@ -54,13 +54,11 @@ module ScientificNameCanonical
54
54
  r1 = _nt_multinomial_with_garbage
55
55
  r1.extend(Root0)
56
56
  if r1
57
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
58
57
  r0 = r1
59
58
  else
60
59
  r2 = _nt_uninomial_with_garbage
61
60
  r2.extend(Root1)
62
61
  if r2
63
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
64
62
  r0 = r2
65
63
  else
66
64
  @index = i0
@@ -194,7 +192,7 @@ module ScientificNameCanonical
194
192
  if node_cache[:multinomial_with_garbage].has_key?(index)
195
193
  cached = node_cache[:multinomial_with_garbage][index]
196
194
  if cached
197
- node_cache[:multinomial_with_garbage][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
195
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
198
196
  @index = cached.interval.end
199
197
  end
200
198
  return cached
@@ -233,7 +231,6 @@ module ScientificNameCanonical
233
231
  r1 = nil
234
232
  end
235
233
  if r1
236
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
237
234
  r0 = r1
238
235
  else
239
236
  i8, s8 = index, []
@@ -260,7 +257,6 @@ module ScientificNameCanonical
260
257
  r8 = nil
261
258
  end
262
259
  if r8
263
- r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
264
260
  r0 = r8
265
261
  else
266
262
  i13, s13 = index, []
@@ -287,7 +283,6 @@ module ScientificNameCanonical
287
283
  r13 = nil
288
284
  end
289
285
  if r13
290
- r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
291
286
  r0 = r13
292
287
  else
293
288
  @index = i0
@@ -334,7 +329,7 @@ module ScientificNameCanonical
334
329
  if node_cache[:uninomial_with_garbage].has_key?(index)
335
330
  cached = node_cache[:uninomial_with_garbage][index]
336
331
  if cached
337
- node_cache[:uninomial_with_garbage][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
332
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
338
333
  @index = cached.interval.end
339
334
  end
340
335
  return cached
@@ -391,7 +386,7 @@ module ScientificNameCanonical
391
386
  if node_cache[:garbage].has_key?(index)
392
387
  cached = node_cache[:garbage][index]
393
388
  if cached
394
- node_cache[:garbage][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
389
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
395
390
  @index = cached.interval.end
396
391
  end
397
392
  return cached
@@ -402,9 +397,9 @@ module ScientificNameCanonical
402
397
  r2 = _nt_space
403
398
  s1 << r2
404
399
  if r2
405
- if (match_len = has_terminal?("$$g@rbg3$$", false, index))
406
- r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
407
- @index += match_len
400
+ if has_terminal?("$$g@rbg3$$", false, index)
401
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 10))
402
+ @index += 10
408
403
  else
409
404
  terminal_parse_failure("$$g@rbg3$$")
410
405
  r3 = nil
@@ -419,18 +414,16 @@ module ScientificNameCanonical
419
414
  r1 = nil
420
415
  end
421
416
  if r1
422
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
423
417
  r0 = r1
424
418
  else
425
419
  i4, s4 = index, []
426
420
  r5 = _nt_space
427
421
  s4 << r5
428
422
  if r5
429
- if has_terminal?(@regexps[gr = '\A["\',.]'] ||= Regexp.new(gr), :regexp, index)
423
+ if has_terminal?('\G["\',.]', true, index)
430
424
  r6 = true
431
425
  @index += 1
432
426
  else
433
- terminal_parse_failure('["\',.]')
434
427
  r6 = nil
435
428
  end
436
429
  s4 << r6
@@ -440,11 +433,10 @@ module ScientificNameCanonical
440
433
  if r7
441
434
  s8, i8 = [], index
442
435
  loop do
443
- if has_terminal?(@regexps[gr = '\A[^щ]'] ||= Regexp.new(gr), :regexp, index)
436
+ if has_terminal?('\G[^щ]', true, index)
444
437
  r9 = true
445
438
  @index += 1
446
439
  else
447
- terminal_parse_failure('[^щ]')
448
440
  r9 = nil
449
441
  end
450
442
  if r9
@@ -466,7 +458,6 @@ module ScientificNameCanonical
466
458
  r4 = nil
467
459
  end
468
460
  if r4
469
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
470
461
  r0 = r4
471
462
  else
472
463
  i10, s10 = index, []
@@ -475,11 +466,10 @@ module ScientificNameCanonical
475
466
  if r11
476
467
  s12, i12 = [], index
477
468
  loop do
478
- if has_terminal?(@regexps[gr = '\A[^ш]'] ||= Regexp.new(gr), :regexp, index)
469
+ if has_terminal?('\G[^ш]', true, index)
479
470
  r13 = true
480
471
  @index += 1
481
472
  else
482
- terminal_parse_failure('[^ш]')
483
473
  r13 = nil
484
474
  end
485
475
  if r13
@@ -504,7 +494,6 @@ module ScientificNameCanonical
504
494
  r10 = nil
505
495
  end
506
496
  if r10
507
- r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
508
497
  r0 = r10
509
498
  else
510
499
  @index = i0
@@ -56,7 +56,7 @@ module ScientificNameClean
56
56
  if node_cache[:root].has_key?(index)
57
57
  cached = node_cache[:root][index]
58
58
  if cached
59
- node_cache[:root][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
59
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
60
60
  @index = cached.interval.end
61
61
  end
62
62
  return cached
@@ -180,7 +180,7 @@ module ScientificNameClean
180
180
  if node_cache[:scientific_name_5].has_key?(index)
181
181
  cached = node_cache[:scientific_name_5][index]
182
182
  if cached
183
- node_cache[:scientific_name_5][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
183
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
184
184
  @index = cached.interval.end
185
185
  end
186
186
  return cached
@@ -215,7 +215,6 @@ module ScientificNameClean
215
215
  r1 = nil
216
216
  end
217
217
  if r1
218
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
219
218
  r0 = r1
220
219
  else
221
220
  i7, s7 = index, []
@@ -246,12 +245,10 @@ module ScientificNameClean
246
245
  r7 = nil
247
246
  end
248
247
  if r7
249
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
250
248
  r0 = r7
251
249
  else
252
250
  r13 = _nt_scientific_name_4
253
251
  if r13
254
- r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
255
252
  r0 = r13
256
253
  else
257
254
  @index = i0
@@ -355,7 +352,7 @@ module ScientificNameClean
355
352
  if node_cache[:scientific_name_4].has_key?(index)
356
353
  cached = node_cache[:scientific_name_4][index]
357
354
  if cached
358
- node_cache[:scientific_name_4][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
355
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
359
356
  @index = cached.interval.end
360
357
  end
361
358
  return cached
@@ -390,7 +387,6 @@ module ScientificNameClean
390
387
  r1 = nil
391
388
  end
392
389
  if r1
393
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
394
390
  r0 = r1
395
391
  else
396
392
  i7, s7 = index, []
@@ -406,11 +402,10 @@ module ScientificNameClean
406
402
  r11 = _nt_space
407
403
  s7 << r11
408
404
  if r11
409
- if has_terminal?(@regexps[gr = '\A[\\?]'] ||= Regexp.new(gr), :regexp, index)
405
+ if has_terminal?('\G[\\?]', true, index)
410
406
  r13 = true
411
407
  @index += 1
412
408
  else
413
- terminal_parse_failure('[\\?]')
414
409
  r13 = nil
415
410
  end
416
411
  if r13
@@ -432,12 +427,10 @@ module ScientificNameClean
432
427
  r7 = nil
433
428
  end
434
429
  if r7
435
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
436
430
  r0 = r7
437
431
  else
438
432
  r14 = _nt_scientific_name_3
439
433
  if r14
440
- r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true
441
434
  r0 = r14
442
435
  else
443
436
  @index = i0
@@ -492,7 +485,7 @@ module ScientificNameClean
492
485
  if node_cache[:scientific_name_3].has_key?(index)
493
486
  cached = node_cache[:scientific_name_3][index]
494
487
  if cached
495
- node_cache[:scientific_name_3][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
488
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
496
489
  @index = cached.interval.end
497
490
  end
498
491
  return cached
@@ -519,12 +512,10 @@ module ScientificNameClean
519
512
  r1 = nil
520
513
  end
521
514
  if r1
522
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
523
515
  r0 = r1
524
516
  else
525
517
  r5 = _nt_scientific_name_2
526
518
  if r5
527
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
528
519
  r0 = r5
529
520
  else
530
521
  @index = i0
@@ -578,7 +569,7 @@ module ScientificNameClean
578
569
  if node_cache[:scientific_name_2].has_key?(index)
579
570
  cached = node_cache[:scientific_name_2][index]
580
571
  if cached
581
- node_cache[:scientific_name_2][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
572
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
582
573
  @index = cached.interval.end
583
574
  end
584
575
  return cached
@@ -605,12 +596,10 @@ module ScientificNameClean
605
596
  r1 = nil
606
597
  end
607
598
  if r1
608
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
609
599
  r0 = r1
610
600
  else
611
601
  r5 = _nt_scientific_name_1
612
602
  if r5
613
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
614
603
  r0 = r5
615
604
  else
616
605
  @index = i0
@@ -628,7 +617,7 @@ module ScientificNameClean
628
617
  if node_cache[:scientific_name_1].has_key?(index)
629
618
  cached = node_cache[:scientific_name_1][index]
630
619
  if cached
631
- node_cache[:scientific_name_1][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
620
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
632
621
  @index = cached.interval.end
633
622
  end
634
623
  return cached
@@ -637,17 +626,14 @@ module ScientificNameClean
637
626
  i0 = index
638
627
  r1 = _nt_multiuninomial_name
639
628
  if r1
640
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
641
629
  r0 = r1
642
630
  else
643
631
  r2 = _nt_multinomial_name
644
632
  if r2
645
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
646
633
  r0 = r2
647
634
  else
648
635
  r3 = _nt_uninomial_name
649
636
  if r3
650
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
651
637
  r0 = r3
652
638
  else
653
639
  @index = i0
@@ -689,7 +675,7 @@ module ScientificNameClean
689
675
  if node_cache[:status_part].has_key?(index)
690
676
  cached = node_cache[:status_part][index]
691
677
  if cached
692
- node_cache[:status_part][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
678
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
693
679
  @index = cached.interval.end
694
680
  end
695
681
  return cached
@@ -716,12 +702,10 @@ module ScientificNameClean
716
702
  r1 = nil
717
703
  end
718
704
  if r1
719
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
720
705
  r0 = r1
721
706
  else
722
707
  r5 = _nt_status_word
723
708
  if r5
724
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
725
709
  r0 = r5
726
710
  else
727
711
  @index = i0
@@ -755,7 +739,7 @@ module ScientificNameClean
755
739
  if node_cache[:status_word].has_key?(index)
756
740
  cached = node_cache[:status_word][index]
757
741
  if cached
758
- node_cache[:status_word][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
742
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
759
743
  @index = cached.interval.end
760
744
  end
761
745
  return cached
@@ -765,11 +749,10 @@ module ScientificNameClean
765
749
  r1 = _nt_latin_word
766
750
  s0 << r1
767
751
  if r1
768
- if has_terminal?(@regexps[gr = '\A[\\.]'] ||= Regexp.new(gr), :regexp, index)
752
+ if has_terminal?('\G[\\.]', true, index)
769
753
  r2 = true
770
754
  @index += 1
771
755
  else
772
- terminal_parse_failure('[\\.]')
773
756
  r2 = nil
774
757
  end
775
758
  s0 << r2
@@ -822,7 +805,7 @@ module ScientificNameClean
822
805
  if node_cache[:unparsed].has_key?(index)
823
806
  cached = node_cache[:unparsed][index]
824
807
  if cached
825
- node_cache[:unparsed][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
808
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
826
809
  @index = cached.interval.end
827
810
  end
828
811
  return cached
@@ -832,7 +815,7 @@ module ScientificNameClean
832
815
  s1, i1 = [], index
833
816
  loop do
834
817
  if index < input_length
835
- r2 = true
818
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
836
819
  @index += 1
837
820
  else
838
821
  terminal_parse_failure("any character")
@@ -1226,7 +1209,7 @@ module ScientificNameClean
1226
1209
  if node_cache[:multinomial_name].has_key?(index)
1227
1210
  cached = node_cache[:multinomial_name][index]
1228
1211
  if cached
1229
- node_cache[:multinomial_name][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1212
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1230
1213
  @index = cached.interval.end
1231
1214
  end
1232
1215
  return cached
@@ -1282,7 +1265,6 @@ module ScientificNameClean
1282
1265
  r1 = nil
1283
1266
  end
1284
1267
  if r1
1285
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
1286
1268
  r0 = r1
1287
1269
  else
1288
1270
  i12, s12 = index, []
@@ -1342,7 +1324,6 @@ module ScientificNameClean
1342
1324
  r12 = nil
1343
1325
  end
1344
1326
  if r12
1345
- r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true
1346
1327
  r0 = r12
1347
1328
  else
1348
1329
  i25, s25 = index, []
@@ -1386,7 +1367,6 @@ module ScientificNameClean
1386
1367
  r25 = nil
1387
1368
  end
1388
1369
  if r25
1389
- r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true
1390
1370
  r0 = r25
1391
1371
  else
1392
1372
  i34, s34 = index, []
@@ -1430,7 +1410,6 @@ module ScientificNameClean
1430
1410
  r34 = nil
1431
1411
  end
1432
1412
  if r34
1433
- r34 = SyntaxNode.new(input, (index-1)...index) if r34 == true
1434
1413
  r0 = r34
1435
1414
  else
1436
1415
  i43, s43 = index, []
@@ -1466,7 +1445,6 @@ module ScientificNameClean
1466
1445
  r43 = nil
1467
1446
  end
1468
1447
  if r43
1469
- r43 = SyntaxNode.new(input, (index-1)...index) if r43 == true
1470
1448
  r0 = r43
1471
1449
  else
1472
1450
  i50, s50 = index, []
@@ -1497,7 +1475,6 @@ module ScientificNameClean
1497
1475
  r50 = nil
1498
1476
  end
1499
1477
  if r50
1500
- r50 = SyntaxNode.new(input, (index-1)...index) if r50 == true
1501
1478
  r0 = r50
1502
1479
  else
1503
1480
  @index = i0
@@ -1564,7 +1541,7 @@ module ScientificNameClean
1564
1541
  if node_cache[:multiuninomial_name].has_key?(index)
1565
1542
  cached = node_cache[:multiuninomial_name][index]
1566
1543
  if cached
1567
- node_cache[:multiuninomial_name][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1544
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1568
1545
  @index = cached.interval.end
1569
1546
  end
1570
1547
  return cached
@@ -1652,7 +1629,7 @@ module ScientificNameClean
1652
1629
  if node_cache[:infraspecies_mult].has_key?(index)
1653
1630
  cached = node_cache[:infraspecies_mult][index]
1654
1631
  if cached
1655
- node_cache[:infraspecies_mult][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1632
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1656
1633
  @index = cached.interval.end
1657
1634
  end
1658
1635
  return cached
@@ -1679,13 +1656,11 @@ module ScientificNameClean
1679
1656
  r1 = nil
1680
1657
  end
1681
1658
  if r1
1682
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
1683
1659
  r0 = r1
1684
1660
  else
1685
1661
  r5 = _nt_infraspecies
1686
1662
  r5.extend(InfraspeciesMult2)
1687
1663
  if r5
1688
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
1689
1664
  r0 = r5
1690
1665
  else
1691
1666
  @index = i0
@@ -1735,7 +1710,7 @@ module ScientificNameClean
1735
1710
  if node_cache[:infraspecies].has_key?(index)
1736
1711
  cached = node_cache[:infraspecies][index]
1737
1712
  if cached
1738
- node_cache[:infraspecies][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1713
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1739
1714
  @index = cached.interval.end
1740
1715
  end
1741
1716
  return cached
@@ -1762,12 +1737,10 @@ module ScientificNameClean
1762
1737
  r1 = nil
1763
1738
  end
1764
1739
  if r1
1765
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
1766
1740
  r0 = r1
1767
1741
  else
1768
1742
  r5 = _nt_infraspecies_string
1769
1743
  if r5
1770
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
1771
1744
  r0 = r5
1772
1745
  else
1773
1746
  @index = i0
@@ -1880,7 +1853,7 @@ module ScientificNameClean
1880
1853
  if node_cache[:infraspecies_string].has_key?(index)
1881
1854
  cached = node_cache[:infraspecies_string][index]
1882
1855
  if cached
1883
- node_cache[:infraspecies_string][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1856
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1884
1857
  @index = cached.interval.end
1885
1858
  end
1886
1859
  return cached
@@ -1907,7 +1880,6 @@ module ScientificNameClean
1907
1880
  r1 = nil
1908
1881
  end
1909
1882
  if r1
1910
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
1911
1883
  r0 = r1
1912
1884
  else
1913
1885
  i5, s5 = index, []
@@ -1921,11 +1893,10 @@ module ScientificNameClean
1921
1893
  s5 << r8
1922
1894
  if r8
1923
1895
  i9 = index
1924
- if has_terminal?(@regexps[gr = '\A[\\.]'] ||= Regexp.new(gr), :regexp, index)
1896
+ if has_terminal?('\G[\\.]', true, index)
1925
1897
  r10 = true
1926
1898
  @index += 1
1927
1899
  else
1928
- terminal_parse_failure('[\\.]')
1929
1900
  r10 = nil
1930
1901
  end
1931
1902
  if r10
@@ -1947,7 +1918,6 @@ module ScientificNameClean
1947
1918
  r5 = nil
1948
1919
  end
1949
1920
  if r5
1950
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
1951
1921
  r0 = r5
1952
1922
  else
1953
1923
  i11, s11 = index, []
@@ -1955,11 +1925,10 @@ module ScientificNameClean
1955
1925
  s11 << r12
1956
1926
  if r12
1957
1927
  i13 = index
1958
- if has_terminal?(@regexps[gr = '\A[\\.]'] ||= Regexp.new(gr), :regexp, index)
1928
+ if has_terminal?('\G[\\.]', true, index)
1959
1929
  r14 = true
1960
1930
  @index += 1
1961
1931
  else
1962
- terminal_parse_failure('[\\.]')
1963
1932
  r14 = nil
1964
1933
  end
1965
1934
  if r14
@@ -1979,7 +1948,6 @@ module ScientificNameClean
1979
1948
  r11 = nil
1980
1949
  end
1981
1950
  if r11
1982
- r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true
1983
1951
  r0 = r11
1984
1952
  else
1985
1953
  @index = i0
@@ -2010,34 +1978,32 @@ module ScientificNameClean
2010
1978
  if node_cache[:taxon_concept_rank].has_key?(index)
2011
1979
  cached = node_cache[:taxon_concept_rank][index]
2012
1980
  if cached
2013
- node_cache[:taxon_concept_rank][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
1981
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2014
1982
  @index = cached.interval.end
2015
1983
  end
2016
1984
  return cached
2017
1985
  end
2018
1986
 
2019
1987
  i0 = index
2020
- if (match_len = has_terminal?("sec.", false, index))
2021
- r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2022
- @index += match_len
1988
+ if has_terminal?("sec.", false, index)
1989
+ r1 = instantiate_node(SyntaxNode,input, index...(index + 4))
1990
+ @index += 4
2023
1991
  else
2024
1992
  terminal_parse_failure("sec.")
2025
1993
  r1 = nil
2026
1994
  end
2027
1995
  if r1
2028
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
2029
1996
  r0 = r1
2030
1997
  r0.extend(TaxonConceptRank0)
2031
1998
  else
2032
- if (match_len = has_terminal?("sensu.", false, index))
2033
- r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2034
- @index += match_len
1999
+ if has_terminal?("sensu.", false, index)
2000
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 6))
2001
+ @index += 6
2035
2002
  else
2036
2003
  terminal_parse_failure("sensu.")
2037
2004
  r2 = nil
2038
2005
  end
2039
2006
  if r2
2040
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
2041
2007
  r0 = r2
2042
2008
  r0.extend(TaxonConceptRank0)
2043
2009
  else
@@ -2079,586 +2045,538 @@ module ScientificNameClean
2079
2045
  if node_cache[:rank].has_key?(index)
2080
2046
  cached = node_cache[:rank][index]
2081
2047
  if cached
2082
- node_cache[:rank][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2048
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2083
2049
  @index = cached.interval.end
2084
2050
  end
2085
2051
  return cached
2086
2052
  end
2087
2053
 
2088
2054
  i0 = index
2089
- if (match_len = has_terminal?("morph.", false, index))
2090
- r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2091
- @index += match_len
2055
+ if has_terminal?("morph.", false, index)
2056
+ r1 = instantiate_node(SyntaxNode,input, index...(index + 6))
2057
+ @index += 6
2092
2058
  else
2093
2059
  terminal_parse_failure("morph.")
2094
2060
  r1 = nil
2095
2061
  end
2096
2062
  if r1
2097
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
2098
2063
  r0 = r1
2099
2064
  r0.extend(Rank0)
2100
2065
  else
2101
- if (match_len = has_terminal?("f.sp.", false, index))
2102
- r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2103
- @index += match_len
2066
+ if has_terminal?("f.sp.", false, index)
2067
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 5))
2068
+ @index += 5
2104
2069
  else
2105
2070
  terminal_parse_failure("f.sp.")
2106
2071
  r2 = nil
2107
2072
  end
2108
2073
  if r2
2109
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
2110
2074
  r0 = r2
2111
2075
  r0.extend(Rank0)
2112
2076
  else
2113
- if (match_len = has_terminal?("B ", false, index))
2114
- r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2115
- @index += match_len
2077
+ if has_terminal?("B ", false, index)
2078
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 2))
2079
+ @index += 2
2116
2080
  else
2117
2081
  terminal_parse_failure("B ")
2118
2082
  r3 = nil
2119
2083
  end
2120
2084
  if r3
2121
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
2122
2085
  r0 = r3
2123
2086
  r0.extend(Rank0)
2124
2087
  else
2125
- if (match_len = has_terminal?("ssp.", false, index))
2126
- r4 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2127
- @index += match_len
2088
+ if has_terminal?("ssp.", false, index)
2089
+ r4 = instantiate_node(SyntaxNode,input, index...(index + 4))
2090
+ @index += 4
2128
2091
  else
2129
2092
  terminal_parse_failure("ssp.")
2130
2093
  r4 = nil
2131
2094
  end
2132
2095
  if r4
2133
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
2134
2096
  r0 = r4
2135
2097
  r0.extend(Rank0)
2136
2098
  else
2137
- if (match_len = has_terminal?("ssp ", false, index))
2138
- r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2139
- @index += match_len
2099
+ if has_terminal?("ssp ", false, index)
2100
+ r5 = instantiate_node(SyntaxNode,input, index...(index + 4))
2101
+ @index += 4
2140
2102
  else
2141
2103
  terminal_parse_failure("ssp ")
2142
2104
  r5 = nil
2143
2105
  end
2144
2106
  if r5
2145
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
2146
2107
  r0 = r5
2147
2108
  r0.extend(Rank0)
2148
2109
  else
2149
- if (match_len = has_terminal?("mut.", false, index))
2150
- r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2151
- @index += match_len
2110
+ if has_terminal?("mut.", false, index)
2111
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 4))
2112
+ @index += 4
2152
2113
  else
2153
2114
  terminal_parse_failure("mut.")
2154
2115
  r6 = nil
2155
2116
  end
2156
2117
  if r6
2157
- r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
2158
2118
  r0 = r6
2159
2119
  r0.extend(Rank0)
2160
2120
  else
2161
- if (match_len = has_terminal?("nat ", false, index))
2162
- r7 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2163
- @index += match_len
2121
+ if has_terminal?("nat ", false, index)
2122
+ r7 = instantiate_node(SyntaxNode,input, index...(index + 4))
2123
+ @index += 4
2164
2124
  else
2165
2125
  terminal_parse_failure("nat ")
2166
2126
  r7 = nil
2167
2127
  end
2168
2128
  if r7
2169
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
2170
2129
  r0 = r7
2171
2130
  r0.extend(Rank0)
2172
2131
  else
2173
- if (match_len = has_terminal?("nothosubsp.", false, index))
2174
- r8 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2175
- @index += match_len
2132
+ if has_terminal?("nothosubsp.", false, index)
2133
+ r8 = instantiate_node(SyntaxNode,input, index...(index + 11))
2134
+ @index += 11
2176
2135
  else
2177
2136
  terminal_parse_failure("nothosubsp.")
2178
2137
  r8 = nil
2179
2138
  end
2180
2139
  if r8
2181
- r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
2182
2140
  r0 = r8
2183
2141
  r0.extend(Rank0)
2184
2142
  else
2185
- if (match_len = has_terminal?("convar.", false, index))
2186
- r9 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2187
- @index += match_len
2143
+ if has_terminal?("convar.", false, index)
2144
+ r9 = instantiate_node(SyntaxNode,input, index...(index + 7))
2145
+ @index += 7
2188
2146
  else
2189
2147
  terminal_parse_failure("convar.")
2190
2148
  r9 = nil
2191
2149
  end
2192
2150
  if r9
2193
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
2194
2151
  r0 = r9
2195
2152
  r0.extend(Rank0)
2196
2153
  else
2197
- if (match_len = has_terminal?("pseudovar.", false, index))
2198
- r10 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2199
- @index += match_len
2154
+ if has_terminal?("pseudovar.", false, index)
2155
+ r10 = instantiate_node(SyntaxNode,input, index...(index + 10))
2156
+ @index += 10
2200
2157
  else
2201
2158
  terminal_parse_failure("pseudovar.")
2202
2159
  r10 = nil
2203
2160
  end
2204
2161
  if r10
2205
- r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
2206
2162
  r0 = r10
2207
2163
  r0.extend(Rank0)
2208
2164
  else
2209
- if (match_len = has_terminal?("sect.", false, index))
2210
- r11 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2211
- @index += match_len
2165
+ if has_terminal?("sect.", false, index)
2166
+ r11 = instantiate_node(SyntaxNode,input, index...(index + 5))
2167
+ @index += 5
2212
2168
  else
2213
2169
  terminal_parse_failure("sect.")
2214
2170
  r11 = nil
2215
2171
  end
2216
2172
  if r11
2217
- r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true
2218
2173
  r0 = r11
2219
2174
  r0.extend(Rank0)
2220
2175
  else
2221
- if (match_len = has_terminal?("ser.", false, index))
2222
- r12 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2223
- @index += match_len
2176
+ if has_terminal?("ser.", false, index)
2177
+ r12 = instantiate_node(SyntaxNode,input, index...(index + 4))
2178
+ @index += 4
2224
2179
  else
2225
2180
  terminal_parse_failure("ser.")
2226
2181
  r12 = nil
2227
2182
  end
2228
2183
  if r12
2229
- r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true
2230
2184
  r0 = r12
2231
2185
  r0.extend(Rank0)
2232
2186
  else
2233
- if (match_len = has_terminal?("var.", false, index))
2234
- r13 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2235
- @index += match_len
2187
+ if has_terminal?("var.", false, index)
2188
+ r13 = instantiate_node(SyntaxNode,input, index...(index + 4))
2189
+ @index += 4
2236
2190
  else
2237
2191
  terminal_parse_failure("var.")
2238
2192
  r13 = nil
2239
2193
  end
2240
2194
  if r13
2241
- r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
2242
2195
  r0 = r13
2243
2196
  r0.extend(Rank0)
2244
2197
  else
2245
- if (match_len = has_terminal?("subvar.", false, index))
2246
- r14 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2247
- @index += match_len
2198
+ if has_terminal?("subvar.", false, index)
2199
+ r14 = instantiate_node(SyntaxNode,input, index...(index + 7))
2200
+ @index += 7
2248
2201
  else
2249
2202
  terminal_parse_failure("subvar.")
2250
2203
  r14 = nil
2251
2204
  end
2252
2205
  if r14
2253
- r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true
2254
2206
  r0 = r14
2255
2207
  r0.extend(Rank0)
2256
2208
  else
2257
- if (match_len = has_terminal?("[var.]", false, index))
2258
- r15 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2259
- @index += match_len
2209
+ if has_terminal?("[var.]", false, index)
2210
+ r15 = instantiate_node(SyntaxNode,input, index...(index + 6))
2211
+ @index += 6
2260
2212
  else
2261
2213
  terminal_parse_failure("[var.]")
2262
2214
  r15 = nil
2263
2215
  end
2264
2216
  if r15
2265
- r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true
2266
2217
  r0 = r15
2267
2218
  r0.extend(Rank0)
2268
2219
  else
2269
- if (match_len = has_terminal?("var ", false, index))
2270
- r16 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2271
- @index += match_len
2220
+ if has_terminal?("var ", false, index)
2221
+ r16 = instantiate_node(SyntaxNode,input, index...(index + 4))
2222
+ @index += 4
2272
2223
  else
2273
2224
  terminal_parse_failure("var ")
2274
2225
  r16 = nil
2275
2226
  end
2276
2227
  if r16
2277
- r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true
2278
2228
  r0 = r16
2279
2229
  r0.extend(Rank0)
2280
2230
  else
2281
- if (match_len = has_terminal?("subsp.", false, index))
2282
- r17 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2283
- @index += match_len
2231
+ if has_terminal?("subsp.", false, index)
2232
+ r17 = instantiate_node(SyntaxNode,input, index...(index + 6))
2233
+ @index += 6
2284
2234
  else
2285
2235
  terminal_parse_failure("subsp.")
2286
2236
  r17 = nil
2287
2237
  end
2288
2238
  if r17
2289
- r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true
2290
2239
  r0 = r17
2291
2240
  r0.extend(Rank0)
2292
2241
  else
2293
- if (match_len = has_terminal?("subsp ", false, index))
2294
- r18 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2295
- @index += match_len
2242
+ if has_terminal?("subsp ", false, index)
2243
+ r18 = instantiate_node(SyntaxNode,input, index...(index + 6))
2244
+ @index += 6
2296
2245
  else
2297
2246
  terminal_parse_failure("subsp ")
2298
2247
  r18 = nil
2299
2248
  end
2300
2249
  if r18
2301
- r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true
2302
2250
  r0 = r18
2303
2251
  r0.extend(Rank0)
2304
2252
  else
2305
- if (match_len = has_terminal?("subf.", false, index))
2306
- r19 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2307
- @index += match_len
2253
+ if has_terminal?("subf.", false, index)
2254
+ r19 = instantiate_node(SyntaxNode,input, index...(index + 5))
2255
+ @index += 5
2308
2256
  else
2309
2257
  terminal_parse_failure("subf.")
2310
2258
  r19 = nil
2311
2259
  end
2312
2260
  if r19
2313
- r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true
2314
2261
  r0 = r19
2315
2262
  r0.extend(Rank0)
2316
2263
  else
2317
- if (match_len = has_terminal?("race ", false, index))
2318
- r20 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2319
- @index += match_len
2264
+ if has_terminal?("race ", false, index)
2265
+ r20 = instantiate_node(SyntaxNode,input, index...(index + 5))
2266
+ @index += 5
2320
2267
  else
2321
2268
  terminal_parse_failure("race ")
2322
2269
  r20 = nil
2323
2270
  end
2324
2271
  if r20
2325
- r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true
2326
2272
  r0 = r20
2327
2273
  r0.extend(Rank0)
2328
2274
  else
2329
- if (match_len = has_terminal?("forma.", false, index))
2330
- r21 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2331
- @index += match_len
2275
+ if has_terminal?("forma.", false, index)
2276
+ r21 = instantiate_node(SyntaxNode,input, index...(index + 6))
2277
+ @index += 6
2332
2278
  else
2333
2279
  terminal_parse_failure("forma.")
2334
2280
  r21 = nil
2335
2281
  end
2336
2282
  if r21
2337
- r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true
2338
2283
  r0 = r21
2339
2284
  r0.extend(Rank0)
2340
2285
  else
2341
- if (match_len = has_terminal?("forma ", false, index))
2342
- r22 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2343
- @index += match_len
2286
+ if has_terminal?("forma ", false, index)
2287
+ r22 = instantiate_node(SyntaxNode,input, index...(index + 6))
2288
+ @index += 6
2344
2289
  else
2345
2290
  terminal_parse_failure("forma ")
2346
2291
  r22 = nil
2347
2292
  end
2348
2293
  if r22
2349
- r22 = SyntaxNode.new(input, (index-1)...index) if r22 == true
2350
2294
  r0 = r22
2351
2295
  r0.extend(Rank0)
2352
2296
  else
2353
- if (match_len = has_terminal?("fma.", false, index))
2354
- r23 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2355
- @index += match_len
2297
+ if has_terminal?("fma.", false, index)
2298
+ r23 = instantiate_node(SyntaxNode,input, index...(index + 4))
2299
+ @index += 4
2356
2300
  else
2357
2301
  terminal_parse_failure("fma.")
2358
2302
  r23 = nil
2359
2303
  end
2360
2304
  if r23
2361
- r23 = SyntaxNode.new(input, (index-1)...index) if r23 == true
2362
2305
  r0 = r23
2363
2306
  r0.extend(Rank0)
2364
2307
  else
2365
- if (match_len = has_terminal?("fma ", false, index))
2366
- r24 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2367
- @index += match_len
2308
+ if has_terminal?("fma ", false, index)
2309
+ r24 = instantiate_node(SyntaxNode,input, index...(index + 4))
2310
+ @index += 4
2368
2311
  else
2369
2312
  terminal_parse_failure("fma ")
2370
2313
  r24 = nil
2371
2314
  end
2372
2315
  if r24
2373
- r24 = SyntaxNode.new(input, (index-1)...index) if r24 == true
2374
2316
  r0 = r24
2375
2317
  r0.extend(Rank0)
2376
2318
  else
2377
- if (match_len = has_terminal?("form.", false, index))
2378
- r25 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2379
- @index += match_len
2319
+ if has_terminal?("form.", false, index)
2320
+ r25 = instantiate_node(SyntaxNode,input, index...(index + 5))
2321
+ @index += 5
2380
2322
  else
2381
2323
  terminal_parse_failure("form.")
2382
2324
  r25 = nil
2383
2325
  end
2384
2326
  if r25
2385
- r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true
2386
2327
  r0 = r25
2387
2328
  r0.extend(Rank0)
2388
2329
  else
2389
- if (match_len = has_terminal?("form ", false, index))
2390
- r26 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2391
- @index += match_len
2330
+ if has_terminal?("form ", false, index)
2331
+ r26 = instantiate_node(SyntaxNode,input, index...(index + 5))
2332
+ @index += 5
2392
2333
  else
2393
2334
  terminal_parse_failure("form ")
2394
2335
  r26 = nil
2395
2336
  end
2396
2337
  if r26
2397
- r26 = SyntaxNode.new(input, (index-1)...index) if r26 == true
2398
2338
  r0 = r26
2399
2339
  r0.extend(Rank0)
2400
2340
  else
2401
- if (match_len = has_terminal?("fo.", false, index))
2402
- r27 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2403
- @index += match_len
2341
+ if has_terminal?("fo.", false, index)
2342
+ r27 = instantiate_node(SyntaxNode,input, index...(index + 3))
2343
+ @index += 3
2404
2344
  else
2405
2345
  terminal_parse_failure("fo.")
2406
2346
  r27 = nil
2407
2347
  end
2408
2348
  if r27
2409
- r27 = SyntaxNode.new(input, (index-1)...index) if r27 == true
2410
2349
  r0 = r27
2411
2350
  r0.extend(Rank0)
2412
2351
  else
2413
- if (match_len = has_terminal?("fo ", false, index))
2414
- r28 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2415
- @index += match_len
2352
+ if has_terminal?("fo ", false, index)
2353
+ r28 = instantiate_node(SyntaxNode,input, index...(index + 3))
2354
+ @index += 3
2416
2355
  else
2417
2356
  terminal_parse_failure("fo ")
2418
2357
  r28 = nil
2419
2358
  end
2420
2359
  if r28
2421
- r28 = SyntaxNode.new(input, (index-1)...index) if r28 == true
2422
2360
  r0 = r28
2423
2361
  r0.extend(Rank0)
2424
2362
  else
2425
- if (match_len = has_terminal?("f.", false, index))
2426
- r29 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2427
- @index += match_len
2363
+ if has_terminal?("f.", false, index)
2364
+ r29 = instantiate_node(SyntaxNode,input, index...(index + 2))
2365
+ @index += 2
2428
2366
  else
2429
2367
  terminal_parse_failure("f.")
2430
2368
  r29 = nil
2431
2369
  end
2432
2370
  if r29
2433
- r29 = SyntaxNode.new(input, (index-1)...index) if r29 == true
2434
2371
  r0 = r29
2435
2372
  r0.extend(Rank0)
2436
2373
  else
2437
- if (match_len = has_terminal?("α", false, index))
2438
- r30 = true
2439
- @index += match_len
2374
+ if has_terminal?("α", false, index)
2375
+ r30 = instantiate_node(SyntaxNode,input, index...(index + 1))
2376
+ @index += 1
2440
2377
  else
2441
2378
  terminal_parse_failure("α")
2442
2379
  r30 = nil
2443
2380
  end
2444
2381
  if r30
2445
- r30 = SyntaxNode.new(input, (index-1)...index) if r30 == true
2446
2382
  r0 = r30
2447
2383
  r0.extend(Rank0)
2448
2384
  else
2449
- if (match_len = has_terminal?("ββ", false, index))
2450
- r31 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2451
- @index += match_len
2385
+ if has_terminal?("ββ", false, index)
2386
+ r31 = instantiate_node(SyntaxNode,input, index...(index + 2))
2387
+ @index += 2
2452
2388
  else
2453
2389
  terminal_parse_failure("ββ")
2454
2390
  r31 = nil
2455
2391
  end
2456
2392
  if r31
2457
- r31 = SyntaxNode.new(input, (index-1)...index) if r31 == true
2458
2393
  r0 = r31
2459
2394
  r0.extend(Rank0)
2460
2395
  else
2461
- if (match_len = has_terminal?("β", false, index))
2462
- r32 = true
2463
- @index += match_len
2396
+ if has_terminal?("β", false, index)
2397
+ r32 = instantiate_node(SyntaxNode,input, index...(index + 1))
2398
+ @index += 1
2464
2399
  else
2465
2400
  terminal_parse_failure("β")
2466
2401
  r32 = nil
2467
2402
  end
2468
2403
  if r32
2469
- r32 = SyntaxNode.new(input, (index-1)...index) if r32 == true
2470
2404
  r0 = r32
2471
2405
  r0.extend(Rank0)
2472
2406
  else
2473
- if (match_len = has_terminal?("γ", false, index))
2474
- r33 = true
2475
- @index += match_len
2407
+ if has_terminal?("γ", false, index)
2408
+ r33 = instantiate_node(SyntaxNode,input, index...(index + 1))
2409
+ @index += 1
2476
2410
  else
2477
2411
  terminal_parse_failure("γ")
2478
2412
  r33 = nil
2479
2413
  end
2480
2414
  if r33
2481
- r33 = SyntaxNode.new(input, (index-1)...index) if r33 == true
2482
2415
  r0 = r33
2483
2416
  r0.extend(Rank0)
2484
2417
  else
2485
- if (match_len = has_terminal?("δ", false, index))
2486
- r34 = true
2487
- @index += match_len
2418
+ if has_terminal?("δ", false, index)
2419
+ r34 = instantiate_node(SyntaxNode,input, index...(index + 1))
2420
+ @index += 1
2488
2421
  else
2489
2422
  terminal_parse_failure("δ")
2490
2423
  r34 = nil
2491
2424
  end
2492
2425
  if r34
2493
- r34 = SyntaxNode.new(input, (index-1)...index) if r34 == true
2494
2426
  r0 = r34
2495
2427
  r0.extend(Rank0)
2496
2428
  else
2497
- if (match_len = has_terminal?("ε", false, index))
2498
- r35 = true
2499
- @index += match_len
2429
+ if has_terminal?("ε", false, index)
2430
+ r35 = instantiate_node(SyntaxNode,input, index...(index + 1))
2431
+ @index += 1
2500
2432
  else
2501
2433
  terminal_parse_failure("ε")
2502
2434
  r35 = nil
2503
2435
  end
2504
2436
  if r35
2505
- r35 = SyntaxNode.new(input, (index-1)...index) if r35 == true
2506
2437
  r0 = r35
2507
2438
  r0.extend(Rank0)
2508
2439
  else
2509
- if (match_len = has_terminal?("φ", false, index))
2510
- r36 = true
2511
- @index += match_len
2440
+ if has_terminal?("φ", false, index)
2441
+ r36 = instantiate_node(SyntaxNode,input, index...(index + 1))
2442
+ @index += 1
2512
2443
  else
2513
2444
  terminal_parse_failure("φ")
2514
2445
  r36 = nil
2515
2446
  end
2516
2447
  if r36
2517
- r36 = SyntaxNode.new(input, (index-1)...index) if r36 == true
2518
2448
  r0 = r36
2519
2449
  r0.extend(Rank0)
2520
2450
  else
2521
- if (match_len = has_terminal?("θ", false, index))
2522
- r37 = true
2523
- @index += match_len
2451
+ if has_terminal?("θ", false, index)
2452
+ r37 = instantiate_node(SyntaxNode,input, index...(index + 1))
2453
+ @index += 1
2524
2454
  else
2525
2455
  terminal_parse_failure("θ")
2526
2456
  r37 = nil
2527
2457
  end
2528
2458
  if r37
2529
- r37 = SyntaxNode.new(input, (index-1)...index) if r37 == true
2530
2459
  r0 = r37
2531
2460
  r0.extend(Rank0)
2532
2461
  else
2533
- if (match_len = has_terminal?("μ", false, index))
2534
- r38 = true
2535
- @index += match_len
2462
+ if has_terminal?("μ", false, index)
2463
+ r38 = instantiate_node(SyntaxNode,input, index...(index + 1))
2464
+ @index += 1
2536
2465
  else
2537
2466
  terminal_parse_failure("μ")
2538
2467
  r38 = nil
2539
2468
  end
2540
2469
  if r38
2541
- r38 = SyntaxNode.new(input, (index-1)...index) if r38 == true
2542
2470
  r0 = r38
2543
2471
  r0.extend(Rank0)
2544
2472
  else
2545
- if (match_len = has_terminal?("a.", false, index))
2546
- r39 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2547
- @index += match_len
2473
+ if has_terminal?("a.", false, index)
2474
+ r39 = instantiate_node(SyntaxNode,input, index...(index + 2))
2475
+ @index += 2
2548
2476
  else
2549
2477
  terminal_parse_failure("a.")
2550
2478
  r39 = nil
2551
2479
  end
2552
2480
  if r39
2553
- r39 = SyntaxNode.new(input, (index-1)...index) if r39 == true
2554
2481
  r0 = r39
2555
2482
  r0.extend(Rank0)
2556
2483
  else
2557
- if (match_len = has_terminal?("b.", false, index))
2558
- r40 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2559
- @index += match_len
2484
+ if has_terminal?("b.", false, index)
2485
+ r40 = instantiate_node(SyntaxNode,input, index...(index + 2))
2486
+ @index += 2
2560
2487
  else
2561
2488
  terminal_parse_failure("b.")
2562
2489
  r40 = nil
2563
2490
  end
2564
2491
  if r40
2565
- r40 = SyntaxNode.new(input, (index-1)...index) if r40 == true
2566
2492
  r0 = r40
2567
2493
  r0.extend(Rank0)
2568
2494
  else
2569
- if (match_len = has_terminal?("c.", false, index))
2570
- r41 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2571
- @index += match_len
2495
+ if has_terminal?("c.", false, index)
2496
+ r41 = instantiate_node(SyntaxNode,input, index...(index + 2))
2497
+ @index += 2
2572
2498
  else
2573
2499
  terminal_parse_failure("c.")
2574
2500
  r41 = nil
2575
2501
  end
2576
2502
  if r41
2577
- r41 = SyntaxNode.new(input, (index-1)...index) if r41 == true
2578
2503
  r0 = r41
2579
2504
  r0.extend(Rank0)
2580
2505
  else
2581
- if (match_len = has_terminal?("d.", false, index))
2582
- r42 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2583
- @index += match_len
2506
+ if has_terminal?("d.", false, index)
2507
+ r42 = instantiate_node(SyntaxNode,input, index...(index + 2))
2508
+ @index += 2
2584
2509
  else
2585
2510
  terminal_parse_failure("d.")
2586
2511
  r42 = nil
2587
2512
  end
2588
2513
  if r42
2589
- r42 = SyntaxNode.new(input, (index-1)...index) if r42 == true
2590
2514
  r0 = r42
2591
2515
  r0.extend(Rank0)
2592
2516
  else
2593
- if (match_len = has_terminal?("e.", false, index))
2594
- r43 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2595
- @index += match_len
2517
+ if has_terminal?("e.", false, index)
2518
+ r43 = instantiate_node(SyntaxNode,input, index...(index + 2))
2519
+ @index += 2
2596
2520
  else
2597
2521
  terminal_parse_failure("e.")
2598
2522
  r43 = nil
2599
2523
  end
2600
2524
  if r43
2601
- r43 = SyntaxNode.new(input, (index-1)...index) if r43 == true
2602
2525
  r0 = r43
2603
2526
  r0.extend(Rank0)
2604
2527
  else
2605
- if (match_len = has_terminal?("g.", false, index))
2606
- r44 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2607
- @index += match_len
2528
+ if has_terminal?("g.", false, index)
2529
+ r44 = instantiate_node(SyntaxNode,input, index...(index + 2))
2530
+ @index += 2
2608
2531
  else
2609
2532
  terminal_parse_failure("g.")
2610
2533
  r44 = nil
2611
2534
  end
2612
2535
  if r44
2613
- r44 = SyntaxNode.new(input, (index-1)...index) if r44 == true
2614
2536
  r0 = r44
2615
2537
  r0.extend(Rank0)
2616
2538
  else
2617
- if (match_len = has_terminal?("k.", false, index))
2618
- r45 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2619
- @index += match_len
2539
+ if has_terminal?("k.", false, index)
2540
+ r45 = instantiate_node(SyntaxNode,input, index...(index + 2))
2541
+ @index += 2
2620
2542
  else
2621
2543
  terminal_parse_failure("k.")
2622
2544
  r45 = nil
2623
2545
  end
2624
2546
  if r45
2625
- r45 = SyntaxNode.new(input, (index-1)...index) if r45 == true
2626
2547
  r0 = r45
2627
2548
  r0.extend(Rank0)
2628
2549
  else
2629
- if (match_len = has_terminal?("****", false, index))
2630
- r46 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2631
- @index += match_len
2550
+ if has_terminal?("****", false, index)
2551
+ r46 = instantiate_node(SyntaxNode,input, index...(index + 4))
2552
+ @index += 4
2632
2553
  else
2633
2554
  terminal_parse_failure("****")
2634
2555
  r46 = nil
2635
2556
  end
2636
2557
  if r46
2637
- r46 = SyntaxNode.new(input, (index-1)...index) if r46 == true
2638
2558
  r0 = r46
2639
2559
  r0.extend(Rank0)
2640
2560
  else
2641
- if (match_len = has_terminal?("**", false, index))
2642
- r47 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2643
- @index += match_len
2561
+ if has_terminal?("**", false, index)
2562
+ r47 = instantiate_node(SyntaxNode,input, index...(index + 2))
2563
+ @index += 2
2644
2564
  else
2645
2565
  terminal_parse_failure("**")
2646
2566
  r47 = nil
2647
2567
  end
2648
2568
  if r47
2649
- r47 = SyntaxNode.new(input, (index-1)...index) if r47 == true
2650
2569
  r0 = r47
2651
2570
  r0.extend(Rank0)
2652
2571
  else
2653
- if (match_len = has_terminal?("*", false, index))
2654
- r48 = true
2655
- @index += match_len
2572
+ if has_terminal?("*", false, index)
2573
+ r48 = instantiate_node(SyntaxNode,input, index...(index + 1))
2574
+ @index += 1
2656
2575
  else
2657
2576
  terminal_parse_failure("*")
2658
2577
  r48 = nil
2659
2578
  end
2660
2579
  if r48
2661
- r48 = SyntaxNode.new(input, (index-1)...index) if r48 == true
2662
2580
  r0 = r48
2663
2581
  r0.extend(Rank0)
2664
2582
  else
@@ -2737,226 +2655,208 @@ module ScientificNameClean
2737
2655
  if node_cache[:rank_uninomial].has_key?(index)
2738
2656
  cached = node_cache[:rank_uninomial][index]
2739
2657
  if cached
2740
- node_cache[:rank_uninomial][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2658
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2741
2659
  @index = cached.interval.end
2742
2660
  end
2743
2661
  return cached
2744
2662
  end
2745
2663
 
2746
2664
  i0 = index
2747
- if (match_len = has_terminal?("sect.", false, index))
2748
- r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2749
- @index += match_len
2665
+ if has_terminal?("sect.", false, index)
2666
+ r1 = instantiate_node(SyntaxNode,input, index...(index + 5))
2667
+ @index += 5
2750
2668
  else
2751
2669
  terminal_parse_failure("sect.")
2752
2670
  r1 = nil
2753
2671
  end
2754
2672
  if r1
2755
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
2756
2673
  r0 = r1
2757
2674
  r0.extend(RankUninomial0)
2758
2675
  else
2759
- if (match_len = has_terminal?("sect ", false, index))
2760
- r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2761
- @index += match_len
2676
+ if has_terminal?("sect ", false, index)
2677
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 5))
2678
+ @index += 5
2762
2679
  else
2763
2680
  terminal_parse_failure("sect ")
2764
2681
  r2 = nil
2765
2682
  end
2766
2683
  if r2
2767
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
2768
2684
  r0 = r2
2769
2685
  r0.extend(RankUninomial0)
2770
2686
  else
2771
- if (match_len = has_terminal?("subsect.", false, index))
2772
- r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2773
- @index += match_len
2687
+ if has_terminal?("subsect.", false, index)
2688
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 8))
2689
+ @index += 8
2774
2690
  else
2775
2691
  terminal_parse_failure("subsect.")
2776
2692
  r3 = nil
2777
2693
  end
2778
2694
  if r3
2779
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
2780
2695
  r0 = r3
2781
2696
  r0.extend(RankUninomial0)
2782
2697
  else
2783
- if (match_len = has_terminal?("subsect ", false, index))
2784
- r4 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2785
- @index += match_len
2698
+ if has_terminal?("subsect ", false, index)
2699
+ r4 = instantiate_node(SyntaxNode,input, index...(index + 8))
2700
+ @index += 8
2786
2701
  else
2787
2702
  terminal_parse_failure("subsect ")
2788
2703
  r4 = nil
2789
2704
  end
2790
2705
  if r4
2791
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
2792
2706
  r0 = r4
2793
2707
  r0.extend(RankUninomial0)
2794
2708
  else
2795
- if (match_len = has_terminal?("trib.", false, index))
2796
- r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2797
- @index += match_len
2709
+ if has_terminal?("trib.", false, index)
2710
+ r5 = instantiate_node(SyntaxNode,input, index...(index + 5))
2711
+ @index += 5
2798
2712
  else
2799
2713
  terminal_parse_failure("trib.")
2800
2714
  r5 = nil
2801
2715
  end
2802
2716
  if r5
2803
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
2804
2717
  r0 = r5
2805
2718
  r0.extend(RankUninomial0)
2806
2719
  else
2807
- if (match_len = has_terminal?("trib ", false, index))
2808
- r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2809
- @index += match_len
2720
+ if has_terminal?("trib ", false, index)
2721
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 5))
2722
+ @index += 5
2810
2723
  else
2811
2724
  terminal_parse_failure("trib ")
2812
2725
  r6 = nil
2813
2726
  end
2814
2727
  if r6
2815
- r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
2816
2728
  r0 = r6
2817
2729
  r0.extend(RankUninomial0)
2818
2730
  else
2819
- if (match_len = has_terminal?("subtrib.", false, index))
2820
- r7 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2821
- @index += match_len
2731
+ if has_terminal?("subtrib.", false, index)
2732
+ r7 = instantiate_node(SyntaxNode,input, index...(index + 8))
2733
+ @index += 8
2822
2734
  else
2823
2735
  terminal_parse_failure("subtrib.")
2824
2736
  r7 = nil
2825
2737
  end
2826
2738
  if r7
2827
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
2828
2739
  r0 = r7
2829
2740
  r0.extend(RankUninomial0)
2830
2741
  else
2831
- if (match_len = has_terminal?("subtrib ", false, index))
2832
- r8 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2833
- @index += match_len
2742
+ if has_terminal?("subtrib ", false, index)
2743
+ r8 = instantiate_node(SyntaxNode,input, index...(index + 8))
2744
+ @index += 8
2834
2745
  else
2835
2746
  terminal_parse_failure("subtrib ")
2836
2747
  r8 = nil
2837
2748
  end
2838
2749
  if r8
2839
- r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
2840
2750
  r0 = r8
2841
2751
  r0.extend(RankUninomial0)
2842
2752
  else
2843
- if (match_len = has_terminal?("ser.", false, index))
2844
- r9 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2845
- @index += match_len
2753
+ if has_terminal?("ser.", false, index)
2754
+ r9 = instantiate_node(SyntaxNode,input, index...(index + 4))
2755
+ @index += 4
2846
2756
  else
2847
2757
  terminal_parse_failure("ser.")
2848
2758
  r9 = nil
2849
2759
  end
2850
2760
  if r9
2851
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
2852
2761
  r0 = r9
2853
2762
  r0.extend(RankUninomial0)
2854
2763
  else
2855
- if (match_len = has_terminal?("ser ", false, index))
2856
- r10 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2857
- @index += match_len
2764
+ if has_terminal?("ser ", false, index)
2765
+ r10 = instantiate_node(SyntaxNode,input, index...(index + 4))
2766
+ @index += 4
2858
2767
  else
2859
2768
  terminal_parse_failure("ser ")
2860
2769
  r10 = nil
2861
2770
  end
2862
2771
  if r10
2863
- r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
2864
2772
  r0 = r10
2865
2773
  r0.extend(RankUninomial0)
2866
2774
  else
2867
- if (match_len = has_terminal?("subgen.", false, index))
2868
- r11 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2869
- @index += match_len
2775
+ if has_terminal?("subgen.", false, index)
2776
+ r11 = instantiate_node(SyntaxNode,input, index...(index + 7))
2777
+ @index += 7
2870
2778
  else
2871
2779
  terminal_parse_failure("subgen.")
2872
2780
  r11 = nil
2873
2781
  end
2874
2782
  if r11
2875
- r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true
2876
2783
  r0 = r11
2877
2784
  r0.extend(RankUninomial0)
2878
2785
  else
2879
- if (match_len = has_terminal?("subgen ", false, index))
2880
- r12 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2881
- @index += match_len
2786
+ if has_terminal?("subgen ", false, index)
2787
+ r12 = instantiate_node(SyntaxNode,input, index...(index + 7))
2788
+ @index += 7
2882
2789
  else
2883
2790
  terminal_parse_failure("subgen ")
2884
2791
  r12 = nil
2885
2792
  end
2886
2793
  if r12
2887
- r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true
2888
2794
  r0 = r12
2889
2795
  r0.extend(RankUninomial0)
2890
2796
  else
2891
- if (match_len = has_terminal?("fam.", false, index))
2892
- r13 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2893
- @index += match_len
2797
+ if has_terminal?("fam.", false, index)
2798
+ r13 = instantiate_node(SyntaxNode,input, index...(index + 4))
2799
+ @index += 4
2894
2800
  else
2895
2801
  terminal_parse_failure("fam.")
2896
2802
  r13 = nil
2897
2803
  end
2898
2804
  if r13
2899
- r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
2900
2805
  r0 = r13
2901
2806
  r0.extend(RankUninomial0)
2902
2807
  else
2903
- if (match_len = has_terminal?("fam ", false, index))
2904
- r14 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2905
- @index += match_len
2808
+ if has_terminal?("fam ", false, index)
2809
+ r14 = instantiate_node(SyntaxNode,input, index...(index + 4))
2810
+ @index += 4
2906
2811
  else
2907
2812
  terminal_parse_failure("fam ")
2908
2813
  r14 = nil
2909
2814
  end
2910
2815
  if r14
2911
- r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true
2912
2816
  r0 = r14
2913
2817
  r0.extend(RankUninomial0)
2914
2818
  else
2915
- if (match_len = has_terminal?("subfam.", false, index))
2916
- r15 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2917
- @index += match_len
2819
+ if has_terminal?("subfam.", false, index)
2820
+ r15 = instantiate_node(SyntaxNode,input, index...(index + 7))
2821
+ @index += 7
2918
2822
  else
2919
2823
  terminal_parse_failure("subfam.")
2920
2824
  r15 = nil
2921
2825
  end
2922
2826
  if r15
2923
- r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true
2924
2827
  r0 = r15
2925
2828
  r0.extend(RankUninomial0)
2926
2829
  else
2927
- if (match_len = has_terminal?("subfam ", false, index))
2928
- r16 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2929
- @index += match_len
2830
+ if has_terminal?("subfam ", false, index)
2831
+ r16 = instantiate_node(SyntaxNode,input, index...(index + 7))
2832
+ @index += 7
2930
2833
  else
2931
2834
  terminal_parse_failure("subfam ")
2932
2835
  r16 = nil
2933
2836
  end
2934
2837
  if r16
2935
- r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true
2936
2838
  r0 = r16
2937
2839
  r0.extend(RankUninomial0)
2938
2840
  else
2939
- if (match_len = has_terminal?("supertrib.", false, index))
2940
- r17 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2941
- @index += match_len
2841
+ if has_terminal?("supertrib.", false, index)
2842
+ r17 = instantiate_node(SyntaxNode,input, index...(index + 10))
2843
+ @index += 10
2942
2844
  else
2943
2845
  terminal_parse_failure("supertrib.")
2944
2846
  r17 = nil
2945
2847
  end
2946
2848
  if r17
2947
- r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true
2948
2849
  r0 = r17
2949
2850
  r0.extend(RankUninomial0)
2950
2851
  else
2951
- if (match_len = has_terminal?("supertrib ", false, index))
2952
- r18 = instantiate_node(SyntaxNode,input, index...(index + match_len))
2953
- @index += match_len
2852
+ if has_terminal?("supertrib ", false, index)
2853
+ r18 = instantiate_node(SyntaxNode,input, index...(index + 10))
2854
+ @index += 10
2954
2855
  else
2955
2856
  terminal_parse_failure("supertrib ")
2956
2857
  r18 = nil
2957
2858
  end
2958
2859
  if r18
2959
- r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true
2960
2860
  r0 = r18
2961
2861
  r0.extend(RankUninomial0)
2962
2862
  else
@@ -3027,7 +2927,7 @@ module ScientificNameClean
3027
2927
  if node_cache[:species].has_key?(index)
3028
2928
  cached = node_cache[:species][index]
3029
2929
  if cached
3030
- node_cache[:species][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2930
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3031
2931
  @index = cached.interval.end
3032
2932
  end
3033
2933
  return cached
@@ -3054,12 +2954,10 @@ module ScientificNameClean
3054
2954
  r1 = nil
3055
2955
  end
3056
2956
  if r1
3057
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
3058
2957
  r0 = r1
3059
2958
  else
3060
2959
  r5 = _nt_species_string
3061
2960
  if r5
3062
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
3063
2961
  r0 = r5
3064
2962
  else
3065
2963
  @index = i0
@@ -3095,7 +2993,7 @@ module ScientificNameClean
3095
2993
  if node_cache[:species_string].has_key?(index)
3096
2994
  cached = node_cache[:species_string][index]
3097
2995
  if cached
3098
- node_cache[:species_string][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
2996
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3099
2997
  @index = cached.interval.end
3100
2998
  end
3101
2999
  return cached
@@ -3105,12 +3003,10 @@ module ScientificNameClean
3105
3003
  r1 = _nt_species_word
3106
3004
  r1.extend(SpeciesString0)
3107
3005
  if r1
3108
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
3109
3006
  r0 = r1
3110
3007
  else
3111
3008
  r2 = _nt_species_word_hybrid
3112
3009
  if r2
3113
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
3114
3010
  r0 = r2
3115
3011
  else
3116
3012
  @index = i0
@@ -3168,7 +3064,7 @@ module ScientificNameClean
3168
3064
  if node_cache[:infragenus].has_key?(index)
3169
3065
  cached = node_cache[:infragenus][index]
3170
3066
  if cached
3171
- node_cache[:infragenus][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3067
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3172
3068
  @index = cached.interval.end
3173
3069
  end
3174
3070
  return cached
@@ -3184,12 +3080,10 @@ module ScientificNameClean
3184
3080
  i3 = index
3185
3081
  r4 = _nt_cap_latin_word
3186
3082
  if r4
3187
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
3188
3083
  r3 = r4
3189
3084
  else
3190
3085
  r5 = _nt_capped_dotted_char
3191
3086
  if r5
3192
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
3193
3087
  r3 = r5
3194
3088
  else
3195
3089
  @index = i3
@@ -3269,7 +3163,7 @@ module ScientificNameClean
3269
3163
  if node_cache[:genus].has_key?(index)
3270
3164
  cached = node_cache[:genus][index]
3271
3165
  if cached
3272
- node_cache[:genus][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3166
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3273
3167
  @index = cached.interval.end
3274
3168
  end
3275
3169
  return cached
@@ -3279,12 +3173,10 @@ module ScientificNameClean
3279
3173
  i1 = index
3280
3174
  r2 = _nt_abbreviated_genus
3281
3175
  if r2
3282
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
3283
3176
  r1 = r2
3284
3177
  else
3285
3178
  r3 = _nt_uninomial_string
3286
3179
  if r3
3287
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
3288
3180
  r1 = r3
3289
3181
  else
3290
3182
  @index = i1
@@ -3367,27 +3259,25 @@ module ScientificNameClean
3367
3259
  if node_cache[:abbreviated_genus].has_key?(index)
3368
3260
  cached = node_cache[:abbreviated_genus][index]
3369
3261
  if cached
3370
- node_cache[:abbreviated_genus][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3262
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3371
3263
  @index = cached.interval.end
3372
3264
  end
3373
3265
  return cached
3374
3266
  end
3375
3267
 
3376
3268
  i0, s0 = index, []
3377
- if has_terminal?(@regexps[gr = '\A[A-Z]'] ||= Regexp.new(gr), :regexp, index)
3269
+ if has_terminal?('\G[A-Z]', true, index)
3378
3270
  r1 = true
3379
3271
  @index += 1
3380
3272
  else
3381
- terminal_parse_failure('[A-Z]')
3382
3273
  r1 = nil
3383
3274
  end
3384
3275
  s0 << r1
3385
3276
  if r1
3386
- if has_terminal?(@regexps[gr = '\A[a-z]'] ||= Regexp.new(gr), :regexp, index)
3277
+ if has_terminal?('\G[a-z]', true, index)
3387
3278
  r3 = true
3388
3279
  @index += 1
3389
3280
  else
3390
- terminal_parse_failure('[a-z]')
3391
3281
  r3 = nil
3392
3282
  end
3393
3283
  if r3
@@ -3397,11 +3287,10 @@ module ScientificNameClean
3397
3287
  end
3398
3288
  s0 << r2
3399
3289
  if r2
3400
- if has_terminal?(@regexps[gr = '\A[a-z]'] ||= Regexp.new(gr), :regexp, index)
3290
+ if has_terminal?('\G[a-z]', true, index)
3401
3291
  r5 = true
3402
3292
  @index += 1
3403
3293
  else
3404
- terminal_parse_failure('[a-z]')
3405
3294
  r5 = nil
3406
3295
  end
3407
3296
  if r5
@@ -3411,11 +3300,10 @@ module ScientificNameClean
3411
3300
  end
3412
3301
  s0 << r4
3413
3302
  if r4
3414
- if has_terminal?(@regexps[gr = '\A[\\\\.]'] ||= Regexp.new(gr), :regexp, index)
3303
+ if has_terminal?('\G[\\\\.]', true, index)
3415
3304
  r6 = true
3416
3305
  @index += 1
3417
3306
  else
3418
- terminal_parse_failure('[\\\\.]')
3419
3307
  r6 = nil
3420
3308
  end
3421
3309
  s0 << r6
@@ -3561,7 +3449,7 @@ module ScientificNameClean
3561
3449
  if node_cache[:uninomial_name].has_key?(index)
3562
3450
  cached = node_cache[:uninomial_name][index]
3563
3451
  if cached
3564
- node_cache[:uninomial_name][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3452
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3565
3453
  @index = cached.interval.end
3566
3454
  end
3567
3455
  return cached
@@ -3596,7 +3484,6 @@ module ScientificNameClean
3596
3484
  r1 = nil
3597
3485
  end
3598
3486
  if r1
3599
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
3600
3487
  r0 = r1
3601
3488
  else
3602
3489
  i7, s7 = index, []
@@ -3619,7 +3506,6 @@ module ScientificNameClean
3619
3506
  r7 = nil
3620
3507
  end
3621
3508
  if r7
3622
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
3623
3509
  r0 = r7
3624
3510
  else
3625
3511
  i11, s11 = index, []
@@ -3642,12 +3528,10 @@ module ScientificNameClean
3642
3528
  r11 = nil
3643
3529
  end
3644
3530
  if r11
3645
- r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true
3646
3531
  r0 = r11
3647
3532
  else
3648
3533
  r15 = _nt_uninomial_string
3649
3534
  if r15
3650
- r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true
3651
3535
  r0 = r15
3652
3536
  else
3653
3537
  @index = i0
@@ -3685,7 +3569,7 @@ module ScientificNameClean
3685
3569
  if node_cache[:uninomial_string].has_key?(index)
3686
3570
  cached = node_cache[:uninomial_string][index]
3687
3571
  if cached
3688
- node_cache[:uninomial_string][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3572
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3689
3573
  @index = cached.interval.end
3690
3574
  end
3691
3575
  return cached
@@ -3694,13 +3578,11 @@ module ScientificNameClean
3694
3578
  i0 = index
3695
3579
  r1 = _nt_cap_latin_word_pair
3696
3580
  if r1
3697
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
3698
3581
  r0 = r1
3699
3582
  r0.extend(UninomialString0)
3700
3583
  else
3701
3584
  r2 = _nt_cap_latin_word
3702
3585
  if r2
3703
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
3704
3586
  r0 = r2
3705
3587
  r0.extend(UninomialString0)
3706
3588
  else
@@ -3816,7 +3698,7 @@ module ScientificNameClean
3816
3698
  if node_cache[:authorship].has_key?(index)
3817
3699
  cached = node_cache[:authorship][index]
3818
3700
  if cached
3819
- node_cache[:authorship][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3701
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
3820
3702
  @index = cached.interval.end
3821
3703
  end
3822
3704
  return cached
@@ -3833,9 +3715,9 @@ module ScientificNameClean
3833
3715
  r4 = _nt_simple_authorship
3834
3716
  s1 << r4
3835
3717
  if r4
3836
- if (match_len = has_terminal?(",", false, index))
3837
- r6 = true
3838
- @index += match_len
3718
+ if has_terminal?(",", false, index)
3719
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
3720
+ @index += 1
3839
3721
  else
3840
3722
  terminal_parse_failure(",")
3841
3723
  r6 = nil
@@ -3866,7 +3748,6 @@ module ScientificNameClean
3866
3748
  r1 = nil
3867
3749
  end
3868
3750
  if r1
3869
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
3870
3751
  r0 = r1
3871
3752
  else
3872
3753
  i9, s9 = index, []
@@ -3889,21 +3770,19 @@ module ScientificNameClean
3889
3770
  r9 = nil
3890
3771
  end
3891
3772
  if r9
3892
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
3893
3773
  r0 = r9
3894
3774
  else
3895
3775
  r13 = _nt_basionym_authorship_with_parenthesis
3896
3776
  if r13
3897
- r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
3898
3777
  r0 = r13
3899
3778
  else
3900
3779
  i14, s14 = index, []
3901
3780
  r15 = _nt_simple_authorship
3902
3781
  s14 << r15
3903
3782
  if r15
3904
- if (match_len = has_terminal?(",", false, index))
3905
- r17 = true
3906
- @index += match_len
3783
+ if has_terminal?(",", false, index)
3784
+ r17 = instantiate_node(SyntaxNode,input, index...(index + 1))
3785
+ @index += 1
3907
3786
  else
3908
3787
  terminal_parse_failure(",")
3909
3788
  r17 = nil
@@ -3932,12 +3811,10 @@ module ScientificNameClean
3932
3811
  r14 = nil
3933
3812
  end
3934
3813
  if r14
3935
- r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true
3936
3814
  r0 = r14
3937
3815
  else
3938
3816
  r20 = _nt_simple_authorship
3939
3817
  if r20
3940
- r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true
3941
3818
  r0 = r20
3942
3819
  else
3943
3820
  @index = i0
@@ -4129,7 +4006,7 @@ module ScientificNameClean
4129
4006
  if node_cache[:basionym_authorship_with_parenthesis].has_key?(index)
4130
4007
  cached = node_cache[:basionym_authorship_with_parenthesis][index]
4131
4008
  if cached
4132
- node_cache[:basionym_authorship_with_parenthesis][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4009
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4133
4010
  @index = cached.interval.end
4134
4011
  end
4135
4012
  return cached
@@ -4155,11 +4032,10 @@ module ScientificNameClean
4155
4032
  r7 = _nt_space
4156
4033
  s1 << r7
4157
4034
  if r7
4158
- if has_terminal?(@regexps[gr = '\A[,]'] ||= Regexp.new(gr), :regexp, index)
4035
+ if has_terminal?('\G[,]', true, index)
4159
4036
  r9 = true
4160
4037
  @index += 1
4161
4038
  else
4162
- terminal_parse_failure('[,]')
4163
4039
  r9 = nil
4164
4040
  end
4165
4041
  if r9
@@ -4191,7 +4067,6 @@ module ScientificNameClean
4191
4067
  r1 = nil
4192
4068
  end
4193
4069
  if r1
4194
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
4195
4070
  r0 = r1
4196
4071
  else
4197
4072
  i12, s12 = index, []
@@ -4204,9 +4079,9 @@ module ScientificNameClean
4204
4079
  r15 = _nt_simple_authorship
4205
4080
  s12 << r15
4206
4081
  if r15
4207
- if (match_len = has_terminal?(",", false, index))
4208
- r17 = true
4209
- @index += match_len
4082
+ if has_terminal?(",", false, index)
4083
+ r17 = instantiate_node(SyntaxNode,input, index...(index + 1))
4084
+ @index += 1
4210
4085
  else
4211
4086
  terminal_parse_failure(",")
4212
4087
  r17 = nil
@@ -4245,7 +4120,6 @@ module ScientificNameClean
4245
4120
  r12 = nil
4246
4121
  end
4247
4122
  if r12
4248
- r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true
4249
4123
  r0 = r12
4250
4124
  else
4251
4125
  i22, s22 = index, []
@@ -4276,7 +4150,6 @@ module ScientificNameClean
4276
4150
  r22 = nil
4277
4151
  end
4278
4152
  if r22
4279
- r22 = SyntaxNode.new(input, (index-1)...index) if r22 == true
4280
4153
  r0 = r22
4281
4154
  else
4282
4155
  i28, s28 = index, []
@@ -4286,9 +4159,9 @@ module ScientificNameClean
4286
4159
  r30 = _nt_space
4287
4160
  s28 << r30
4288
4161
  if r30
4289
- if (match_len = has_terminal?("?", false, index))
4290
- r31 = true
4291
- @index += match_len
4162
+ if has_terminal?("?", false, index)
4163
+ r31 = instantiate_node(SyntaxNode,input, index...(index + 1))
4164
+ @index += 1
4292
4165
  else
4293
4166
  terminal_parse_failure("?")
4294
4167
  r31 = nil
@@ -4313,7 +4186,6 @@ module ScientificNameClean
4313
4186
  r28 = nil
4314
4187
  end
4315
4188
  if r28
4316
- r28 = SyntaxNode.new(input, (index-1)...index) if r28 == true
4317
4189
  r0 = r28
4318
4190
  else
4319
4191
  @index = i0
@@ -4362,7 +4234,7 @@ module ScientificNameClean
4362
4234
  if node_cache[:ex_authorship].has_key?(index)
4363
4235
  cached = node_cache[:ex_authorship][index]
4364
4236
  if cached
4365
- node_cache[:ex_authorship][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4237
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4366
4238
  @index = cached.interval.end
4367
4239
  end
4368
4240
  return cached
@@ -4518,7 +4390,7 @@ module ScientificNameClean
4518
4390
  if node_cache[:simple_authorship].has_key?(index)
4519
4391
  cached = node_cache[:simple_authorship][index]
4520
4392
  if cached
4521
- node_cache[:simple_authorship][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4393
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4522
4394
  @index = cached.interval.end
4523
4395
  end
4524
4396
  return cached
@@ -4532,11 +4404,10 @@ module ScientificNameClean
4532
4404
  r3 = _nt_space
4533
4405
  s1 << r3
4534
4406
  if r3
4535
- if has_terminal?(@regexps[gr = '\A[,]'] ||= Regexp.new(gr), :regexp, index)
4407
+ if has_terminal?('\G[,]', true, index)
4536
4408
  r5 = true
4537
4409
  @index += 1
4538
4410
  else
4539
- terminal_parse_failure('[,]')
4540
4411
  r5 = nil
4541
4412
  end
4542
4413
  if r5
@@ -4557,11 +4428,10 @@ module ScientificNameClean
4557
4428
  end
4558
4429
  s1 << r7
4559
4430
  if r7
4560
- if has_terminal?(@regexps[gr = '\A[,]'] ||= Regexp.new(gr), :regexp, index)
4431
+ if has_terminal?('\G[,]', true, index)
4561
4432
  r10 = true
4562
4433
  @index += 1
4563
4434
  else
4564
- terminal_parse_failure('[,]')
4565
4435
  r10 = nil
4566
4436
  end
4567
4437
  if r10
@@ -4574,9 +4444,9 @@ module ScientificNameClean
4574
4444
  r11 = _nt_space
4575
4445
  s1 << r11
4576
4446
  if r11
4577
- if (match_len = has_terminal?("non", false, index))
4578
- r12 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4579
- @index += match_len
4447
+ if has_terminal?("non", false, index)
4448
+ r12 = instantiate_node(SyntaxNode,input, index...(index + 3))
4449
+ @index += 3
4580
4450
  else
4581
4451
  terminal_parse_failure("non")
4582
4452
  r12 = nil
@@ -4592,11 +4462,10 @@ module ScientificNameClean
4592
4462
  r15 = _nt_space
4593
4463
  s1 << r15
4594
4464
  if r15
4595
- if has_terminal?(@regexps[gr = '\A[,]'] ||= Regexp.new(gr), :regexp, index)
4465
+ if has_terminal?('\G[,]', true, index)
4596
4466
  r17 = true
4597
4467
  @index += 1
4598
4468
  else
4599
- terminal_parse_failure('[,]')
4600
4469
  r17 = nil
4601
4470
  end
4602
4471
  if r17
@@ -4633,7 +4502,6 @@ module ScientificNameClean
4633
4502
  r1 = nil
4634
4503
  end
4635
4504
  if r1
4636
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
4637
4505
  r0 = r1
4638
4506
  else
4639
4507
  i20, s20 = index, []
@@ -4643,11 +4511,10 @@ module ScientificNameClean
4643
4511
  r22 = _nt_space
4644
4512
  s20 << r22
4645
4513
  if r22
4646
- if has_terminal?(@regexps[gr = '\A[,]'] ||= Regexp.new(gr), :regexp, index)
4514
+ if has_terminal?('\G[,]', true, index)
4647
4515
  r24 = true
4648
4516
  @index += 1
4649
4517
  else
4650
- terminal_parse_failure('[,]')
4651
4518
  r24 = nil
4652
4519
  end
4653
4520
  if r24
@@ -4675,13 +4542,11 @@ module ScientificNameClean
4675
4542
  r20 = nil
4676
4543
  end
4677
4544
  if r20
4678
- r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true
4679
4545
  r0 = r20
4680
4546
  else
4681
4547
  r27 = _nt_authors_names
4682
4548
  r27.extend(SimpleAuthorship4)
4683
4549
  if r27
4684
- r27 = SyntaxNode.new(input, (index-1)...index) if r27 == true
4685
4550
  r0 = r27
4686
4551
  else
4687
4552
  @index = i0
@@ -4736,7 +4601,7 @@ module ScientificNameClean
4736
4601
  if node_cache[:authors_names].has_key?(index)
4737
4602
  cached = node_cache[:authors_names][index]
4738
4603
  if cached
4739
- node_cache[:authors_names][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4604
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4740
4605
  @index = cached.interval.end
4741
4606
  end
4742
4607
  return cached
@@ -4771,17 +4636,14 @@ module ScientificNameClean
4771
4636
  r1 = nil
4772
4637
  end
4773
4638
  if r1
4774
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
4775
4639
  r0 = r1
4776
4640
  else
4777
4641
  r7 = _nt_author_name
4778
4642
  if r7
4779
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
4780
4643
  r0 = r7
4781
4644
  else
4782
4645
  r8 = _nt_unknown_auth
4783
4646
  if r8
4784
- r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
4785
4647
  r0 = r8
4786
4648
  else
4787
4649
  @index = i0
@@ -4817,7 +4679,7 @@ module ScientificNameClean
4817
4679
  if node_cache[:unknown_auth].has_key?(index)
4818
4680
  cached = node_cache[:unknown_auth][index]
4819
4681
  if cached
4820
- node_cache[:unknown_auth][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4682
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4821
4683
  @index = cached.interval.end
4822
4684
  end
4823
4685
  return cached
@@ -4825,92 +4687,84 @@ module ScientificNameClean
4825
4687
 
4826
4688
  i0, s0 = index, []
4827
4689
  i1 = index
4828
- if (match_len = has_terminal?("auct.", false, index))
4829
- r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4830
- @index += match_len
4690
+ if has_terminal?("auct.", false, index)
4691
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 5))
4692
+ @index += 5
4831
4693
  else
4832
4694
  terminal_parse_failure("auct.")
4833
4695
  r2 = nil
4834
4696
  end
4835
4697
  if r2
4836
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
4837
4698
  r1 = r2
4838
4699
  else
4839
- if (match_len = has_terminal?("auct", false, index))
4840
- r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4841
- @index += match_len
4700
+ if has_terminal?("auct", false, index)
4701
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 4))
4702
+ @index += 4
4842
4703
  else
4843
4704
  terminal_parse_failure("auct")
4844
4705
  r3 = nil
4845
4706
  end
4846
4707
  if r3
4847
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
4848
4708
  r1 = r3
4849
4709
  else
4850
- if (match_len = has_terminal?("hort.", false, index))
4851
- r4 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4852
- @index += match_len
4710
+ if has_terminal?("hort.", false, index)
4711
+ r4 = instantiate_node(SyntaxNode,input, index...(index + 5))
4712
+ @index += 5
4853
4713
  else
4854
4714
  terminal_parse_failure("hort.")
4855
4715
  r4 = nil
4856
4716
  end
4857
4717
  if r4
4858
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
4859
4718
  r1 = r4
4860
4719
  else
4861
- if (match_len = has_terminal?("hort", false, index))
4862
- r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4863
- @index += match_len
4720
+ if has_terminal?("hort", false, index)
4721
+ r5 = instantiate_node(SyntaxNode,input, index...(index + 4))
4722
+ @index += 4
4864
4723
  else
4865
4724
  terminal_parse_failure("hort")
4866
4725
  r5 = nil
4867
4726
  end
4868
4727
  if r5
4869
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
4870
4728
  r1 = r5
4871
4729
  else
4872
- if (match_len = has_terminal?("anon.", false, index))
4873
- r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4874
- @index += match_len
4730
+ if has_terminal?("anon.", false, index)
4731
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 5))
4732
+ @index += 5
4875
4733
  else
4876
4734
  terminal_parse_failure("anon.")
4877
4735
  r6 = nil
4878
4736
  end
4879
4737
  if r6
4880
- r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
4881
4738
  r1 = r6
4882
4739
  else
4883
- if (match_len = has_terminal?("anon", false, index))
4884
- r7 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4885
- @index += match_len
4740
+ if has_terminal?("anon", false, index)
4741
+ r7 = instantiate_node(SyntaxNode,input, index...(index + 4))
4742
+ @index += 4
4886
4743
  else
4887
4744
  terminal_parse_failure("anon")
4888
4745
  r7 = nil
4889
4746
  end
4890
4747
  if r7
4891
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
4892
4748
  r1 = r7
4893
4749
  else
4894
- if (match_len = has_terminal?("ht.", false, index))
4895
- r8 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4896
- @index += match_len
4750
+ if has_terminal?("ht.", false, index)
4751
+ r8 = instantiate_node(SyntaxNode,input, index...(index + 3))
4752
+ @index += 3
4897
4753
  else
4898
4754
  terminal_parse_failure("ht.")
4899
4755
  r8 = nil
4900
4756
  end
4901
4757
  if r8
4902
- r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
4903
4758
  r1 = r8
4904
4759
  else
4905
- if (match_len = has_terminal?("ht", false, index))
4906
- r9 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4907
- @index += match_len
4760
+ if has_terminal?("ht", false, index)
4761
+ r9 = instantiate_node(SyntaxNode,input, index...(index + 2))
4762
+ @index += 2
4908
4763
  else
4909
4764
  terminal_parse_failure("ht")
4910
4765
  r9 = nil
4911
4766
  end
4912
4767
  if r9
4913
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
4914
4768
  r1 = r9
4915
4769
  else
4916
4770
  @index = i1
@@ -4957,7 +4811,7 @@ module ScientificNameClean
4957
4811
  if node_cache[:ex_sep].has_key?(index)
4958
4812
  cached = node_cache[:ex_sep][index]
4959
4813
  if cached
4960
- node_cache[:ex_sep][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4814
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4961
4815
  @index = cached.interval.end
4962
4816
  end
4963
4817
  return cached
@@ -4965,26 +4819,24 @@ module ScientificNameClean
4965
4819
 
4966
4820
  i0, s0 = index, []
4967
4821
  i1 = index
4968
- if (match_len = has_terminal?("ex", false, index))
4969
- r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4970
- @index += match_len
4822
+ if has_terminal?("ex", false, index)
4823
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 2))
4824
+ @index += 2
4971
4825
  else
4972
4826
  terminal_parse_failure("ex")
4973
4827
  r2 = nil
4974
4828
  end
4975
4829
  if r2
4976
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
4977
4830
  r1 = r2
4978
4831
  else
4979
- if (match_len = has_terminal?("in", false, index))
4980
- r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
4981
- @index += match_len
4832
+ if has_terminal?("in", false, index)
4833
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 2))
4834
+ @index += 2
4982
4835
  else
4983
4836
  terminal_parse_failure("in")
4984
4837
  r3 = nil
4985
4838
  end
4986
4839
  if r3
4987
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
4988
4840
  r1 = r3
4989
4841
  else
4990
4842
  @index = i1
@@ -4994,11 +4846,10 @@ module ScientificNameClean
4994
4846
  s0 << r1
4995
4847
  if r1
4996
4848
  i4 = index
4997
- if has_terminal?(@regexps[gr = '\A[\\s]'] ||= Regexp.new(gr), :regexp, index)
4849
+ if has_terminal?('\G[\\s]', true, index)
4998
4850
  r5 = true
4999
4851
  @index += 1
5000
4852
  else
5001
- terminal_parse_failure('[\\s]')
5002
4853
  r5 = nil
5003
4854
  end
5004
4855
  if r5
@@ -5043,70 +4894,65 @@ module ScientificNameClean
5043
4894
  if node_cache[:author_separator].has_key?(index)
5044
4895
  cached = node_cache[:author_separator][index]
5045
4896
  if cached
5046
- node_cache[:author_separator][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
4897
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5047
4898
  @index = cached.interval.end
5048
4899
  end
5049
4900
  return cached
5050
4901
  end
5051
4902
 
5052
4903
  i0 = index
5053
- if (match_len = has_terminal?("&amp;", false, index))
5054
- r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5055
- @index += match_len
4904
+ if has_terminal?("&amp;", false, index)
4905
+ r1 = instantiate_node(SyntaxNode,input, index...(index + 5))
4906
+ @index += 5
5056
4907
  else
5057
4908
  terminal_parse_failure("&amp;")
5058
4909
  r1 = nil
5059
4910
  end
5060
4911
  if r1
5061
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
5062
4912
  r0 = r1
5063
4913
  r0.extend(AuthorSeparator0)
5064
4914
  else
5065
- if (match_len = has_terminal?("&", false, index))
5066
- r2 = true
5067
- @index += match_len
4915
+ if has_terminal?("&", false, index)
4916
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
4917
+ @index += 1
5068
4918
  else
5069
4919
  terminal_parse_failure("&")
5070
4920
  r2 = nil
5071
4921
  end
5072
4922
  if r2
5073
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
5074
4923
  r0 = r2
5075
4924
  r0.extend(AuthorSeparator0)
5076
4925
  else
5077
- if (match_len = has_terminal?(",", false, index))
5078
- r3 = true
5079
- @index += match_len
4926
+ if has_terminal?(",", false, index)
4927
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
4928
+ @index += 1
5080
4929
  else
5081
4930
  terminal_parse_failure(",")
5082
4931
  r3 = nil
5083
4932
  end
5084
4933
  if r3
5085
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
5086
4934
  r0 = r3
5087
4935
  r0.extend(AuthorSeparator0)
5088
4936
  else
5089
- if (match_len = has_terminal?("and", false, index))
5090
- r4 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5091
- @index += match_len
4937
+ if has_terminal?("and", false, index)
4938
+ r4 = instantiate_node(SyntaxNode,input, index...(index + 3))
4939
+ @index += 3
5092
4940
  else
5093
4941
  terminal_parse_failure("and")
5094
4942
  r4 = nil
5095
4943
  end
5096
4944
  if r4
5097
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
5098
4945
  r0 = r4
5099
4946
  r0.extend(AuthorSeparator0)
5100
4947
  else
5101
- if (match_len = has_terminal?("et", false, index))
5102
- r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5103
- @index += match_len
4948
+ if has_terminal?("et", false, index)
4949
+ r5 = instantiate_node(SyntaxNode,input, index...(index + 2))
4950
+ @index += 2
5104
4951
  else
5105
4952
  terminal_parse_failure("et")
5106
4953
  r5 = nil
5107
4954
  end
5108
4955
  if r5
5109
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
5110
4956
  r0 = r5
5111
4957
  r0.extend(AuthorSeparator0)
5112
4958
  else
@@ -5165,7 +5011,7 @@ module ScientificNameClean
5165
5011
  if node_cache[:author_name].has_key?(index)
5166
5012
  cached = node_cache[:author_name][index]
5167
5013
  if cached
5168
- node_cache[:author_name][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5014
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5169
5015
  @index = cached.interval.end
5170
5016
  end
5171
5017
  return cached
@@ -5211,12 +5057,10 @@ module ScientificNameClean
5211
5057
  r1 = nil
5212
5058
  end
5213
5059
  if r1
5214
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
5215
5060
  r0 = r1
5216
5061
  else
5217
5062
  r9 = _nt_author_name_without_postfix
5218
5063
  if r9
5219
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
5220
5064
  r0 = r9
5221
5065
  else
5222
5066
  @index = i0
@@ -5294,7 +5138,7 @@ module ScientificNameClean
5294
5138
  if node_cache[:author_name_without_postfix].has_key?(index)
5295
5139
  cached = node_cache[:author_name_without_postfix][index]
5296
5140
  if cached
5297
- node_cache[:author_name_without_postfix][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5141
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5298
5142
  @index = cached.interval.end
5299
5143
  end
5300
5144
  return cached
@@ -5325,7 +5169,6 @@ module ScientificNameClean
5325
5169
  r1 = nil
5326
5170
  end
5327
5171
  if r1
5328
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
5329
5172
  r0 = r1
5330
5173
  else
5331
5174
  i6, s6 = index, []
@@ -5348,12 +5191,10 @@ module ScientificNameClean
5348
5191
  r6 = nil
5349
5192
  end
5350
5193
  if r6
5351
- r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
5352
5194
  r0 = r6
5353
5195
  else
5354
5196
  r10 = _nt_author_word
5355
5197
  if r10
5356
- r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
5357
5198
  r0 = r10
5358
5199
  else
5359
5200
  @index = i0
@@ -5437,71 +5278,66 @@ module ScientificNameClean
5437
5278
  if node_cache[:author_word].has_key?(index)
5438
5279
  cached = node_cache[:author_word][index]
5439
5280
  if cached
5440
- node_cache[:author_word][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5281
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5441
5282
  @index = cached.interval.end
5442
5283
  end
5443
5284
  return cached
5444
5285
  end
5445
5286
 
5446
5287
  i0 = index
5447
- if (match_len = has_terminal?("A S. Xu", false, index))
5448
- r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5288
+ if has_terminal?("A S. Xu", false, index)
5289
+ r1 = instantiate_node(SyntaxNode,input, index...(index + 7))
5449
5290
  r1.extend(AuthorWord0)
5450
- @index += match_len
5291
+ @index += 7
5451
5292
  else
5452
5293
  terminal_parse_failure("A S. Xu")
5453
5294
  r1 = nil
5454
5295
  end
5455
5296
  if r1
5456
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
5457
5297
  r0 = r1
5458
5298
  else
5459
5299
  i2 = index
5460
- if (match_len = has_terminal?("arg.", false, index))
5461
- r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5462
- @index += match_len
5300
+ if has_terminal?("arg.", false, index)
5301
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 4))
5302
+ @index += 4
5463
5303
  else
5464
5304
  terminal_parse_failure("arg.")
5465
5305
  r3 = nil
5466
5306
  end
5467
5307
  if r3
5468
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
5469
5308
  r2 = r3
5470
5309
  r2.extend(AuthorWord1)
5471
5310
  else
5472
- if (match_len = has_terminal?("et al.\{\?\}", false, index))
5473
- r4 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5474
- @index += match_len
5311
+ if has_terminal?("et al.\{\?\}", false, index)
5312
+ r4 = instantiate_node(SyntaxNode,input, index...(index + 9))
5313
+ @index += 9
5475
5314
  else
5476
5315
  terminal_parse_failure("et al.\{\?\}")
5477
5316
  r4 = nil
5478
5317
  end
5479
5318
  if r4
5480
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
5481
5319
  r2 = r4
5482
5320
  r2.extend(AuthorWord1)
5483
5321
  else
5484
- if (match_len = has_terminal?("et al.", false, index))
5485
- r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5486
- @index += match_len
5322
+ if has_terminal?("et al.", false, index)
5323
+ r5 = instantiate_node(SyntaxNode,input, index...(index + 6))
5324
+ @index += 6
5487
5325
  else
5488
5326
  terminal_parse_failure("et al.")
5489
5327
  r5 = nil
5490
5328
  end
5491
5329
  if r5
5492
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
5493
5330
  r2 = r5
5494
5331
  r2.extend(AuthorWord1)
5495
5332
  else
5496
- if (match_len = has_terminal?("et al", false, index))
5497
- r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5498
- @index += match_len
5333
+ if has_terminal?("et al", false, index)
5334
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 5))
5335
+ @index += 5
5499
5336
  else
5500
5337
  terminal_parse_failure("et al")
5501
5338
  r6 = nil
5502
5339
  end
5503
5340
  if r6
5504
- r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
5505
5341
  r2 = r6
5506
5342
  r2.extend(AuthorWord1)
5507
5343
  else
@@ -5512,163 +5348,146 @@ module ScientificNameClean
5512
5348
  end
5513
5349
  end
5514
5350
  if r2
5515
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
5516
5351
  r0 = r2
5517
5352
  else
5518
5353
  i7, s7 = index, []
5519
5354
  i8 = index
5520
- if (match_len = has_terminal?("Å", false, index))
5521
- r9 = true
5522
- @index += match_len
5355
+ if has_terminal?("Å", false, index)
5356
+ r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
5357
+ @index += 1
5523
5358
  else
5524
5359
  terminal_parse_failure("Å")
5525
5360
  r9 = nil
5526
5361
  end
5527
5362
  if r9
5528
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
5529
5363
  r8 = r9
5530
5364
  else
5531
- if (match_len = has_terminal?("Ö", false, index))
5532
- r10 = true
5533
- @index += match_len
5365
+ if has_terminal?("Ö", false, index)
5366
+ r10 = instantiate_node(SyntaxNode,input, index...(index + 1))
5367
+ @index += 1
5534
5368
  else
5535
5369
  terminal_parse_failure("Ö")
5536
5370
  r10 = nil
5537
5371
  end
5538
5372
  if r10
5539
- r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
5540
5373
  r8 = r10
5541
5374
  else
5542
- if (match_len = has_terminal?("Á", false, index))
5543
- r11 = true
5544
- @index += match_len
5375
+ if has_terminal?("Á", false, index)
5376
+ r11 = instantiate_node(SyntaxNode,input, index...(index + 1))
5377
+ @index += 1
5545
5378
  else
5546
5379
  terminal_parse_failure("Á")
5547
5380
  r11 = nil
5548
5381
  end
5549
5382
  if r11
5550
- r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true
5551
5383
  r8 = r11
5552
5384
  else
5553
- if (match_len = has_terminal?("Ø", false, index))
5554
- r12 = true
5555
- @index += match_len
5385
+ if has_terminal?("Ø", false, index)
5386
+ r12 = instantiate_node(SyntaxNode,input, index...(index + 1))
5387
+ @index += 1
5556
5388
  else
5557
5389
  terminal_parse_failure("Ø")
5558
5390
  r12 = nil
5559
5391
  end
5560
5392
  if r12
5561
- r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true
5562
5393
  r8 = r12
5563
5394
  else
5564
- if (match_len = has_terminal?("Ô", false, index))
5565
- r13 = true
5566
- @index += match_len
5395
+ if has_terminal?("Ô", false, index)
5396
+ r13 = instantiate_node(SyntaxNode,input, index...(index + 1))
5397
+ @index += 1
5567
5398
  else
5568
5399
  terminal_parse_failure("Ô")
5569
5400
  r13 = nil
5570
5401
  end
5571
5402
  if r13
5572
- r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
5573
5403
  r8 = r13
5574
5404
  else
5575
- if (match_len = has_terminal?("Š", false, index))
5576
- r14 = true
5577
- @index += match_len
5405
+ if has_terminal?("Š", false, index)
5406
+ r14 = instantiate_node(SyntaxNode,input, index...(index + 1))
5407
+ @index += 1
5578
5408
  else
5579
5409
  terminal_parse_failure("Š")
5580
5410
  r14 = nil
5581
5411
  end
5582
5412
  if r14
5583
- r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true
5584
5413
  r8 = r14
5585
5414
  else
5586
- if (match_len = has_terminal?("Ś", false, index))
5587
- r15 = true
5588
- @index += match_len
5415
+ if has_terminal?("Ś", false, index)
5416
+ r15 = instantiate_node(SyntaxNode,input, index...(index + 1))
5417
+ @index += 1
5589
5418
  else
5590
5419
  terminal_parse_failure("Ś")
5591
5420
  r15 = nil
5592
5421
  end
5593
5422
  if r15
5594
- r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true
5595
5423
  r8 = r15
5596
5424
  else
5597
- if (match_len = has_terminal?("Č", false, index))
5598
- r16 = true
5599
- @index += match_len
5425
+ if has_terminal?("Č", false, index)
5426
+ r16 = instantiate_node(SyntaxNode,input, index...(index + 1))
5427
+ @index += 1
5600
5428
  else
5601
5429
  terminal_parse_failure("Č")
5602
5430
  r16 = nil
5603
5431
  end
5604
5432
  if r16
5605
- r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true
5606
5433
  r8 = r16
5607
5434
  else
5608
- if (match_len = has_terminal?("Ķ", false, index))
5609
- r17 = true
5610
- @index += match_len
5435
+ if has_terminal?("Ķ", false, index)
5436
+ r17 = instantiate_node(SyntaxNode,input, index...(index + 1))
5437
+ @index += 1
5611
5438
  else
5612
5439
  terminal_parse_failure("Ķ")
5613
5440
  r17 = nil
5614
5441
  end
5615
5442
  if r17
5616
- r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true
5617
5443
  r8 = r17
5618
5444
  else
5619
- if (match_len = has_terminal?("Ł", false, index))
5620
- r18 = true
5621
- @index += match_len
5445
+ if has_terminal?("Ł", false, index)
5446
+ r18 = instantiate_node(SyntaxNode,input, index...(index + 1))
5447
+ @index += 1
5622
5448
  else
5623
5449
  terminal_parse_failure("Ł")
5624
5450
  r18 = nil
5625
5451
  end
5626
5452
  if r18
5627
- r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true
5628
5453
  r8 = r18
5629
5454
  else
5630
- if (match_len = has_terminal?("É", false, index))
5631
- r19 = true
5632
- @index += match_len
5455
+ if has_terminal?("É", false, index)
5456
+ r19 = instantiate_node(SyntaxNode,input, index...(index + 1))
5457
+ @index += 1
5633
5458
  else
5634
5459
  terminal_parse_failure("É")
5635
5460
  r19 = nil
5636
5461
  end
5637
5462
  if r19
5638
- r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true
5639
5463
  r8 = r19
5640
5464
  else
5641
- if (match_len = has_terminal?("Ž", false, index))
5642
- r20 = true
5643
- @index += match_len
5465
+ if has_terminal?("Ž", false, index)
5466
+ r20 = instantiate_node(SyntaxNode,input, index...(index + 1))
5467
+ @index += 1
5644
5468
  else
5645
5469
  terminal_parse_failure("Ž")
5646
5470
  r20 = nil
5647
5471
  end
5648
5472
  if r20
5649
- r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true
5650
5473
  r8 = r20
5651
5474
  else
5652
- if has_terminal?(@regexps[gr = '\A[A-W]'] ||= Regexp.new(gr), :regexp, index)
5475
+ if has_terminal?('\G[A-W]', true, index)
5653
5476
  r21 = true
5654
5477
  @index += 1
5655
5478
  else
5656
- terminal_parse_failure('[A-W]')
5657
5479
  r21 = nil
5658
5480
  end
5659
5481
  if r21
5660
- r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true
5661
5482
  r8 = r21
5662
5483
  else
5663
- if has_terminal?(@regexps[gr = '\A[Y-Z]'] ||= Regexp.new(gr), :regexp, index)
5484
+ if has_terminal?('\G[Y-Z]', true, index)
5664
5485
  r22 = true
5665
5486
  @index += 1
5666
5487
  else
5667
- terminal_parse_failure('[Y-Z]')
5668
5488
  r22 = nil
5669
5489
  end
5670
5490
  if r22
5671
- r22 = SyntaxNode.new(input, (index-1)...index) if r22 == true
5672
5491
  r8 = r22
5673
5492
  else
5674
5493
  @index = i8
@@ -5691,11 +5510,10 @@ module ScientificNameClean
5691
5510
  if r8
5692
5511
  s23, i23 = [], index
5693
5512
  loop do
5694
- if has_terminal?(@regexps[gr = '\A[^0-9\\[\\]\\(\\)\\s&,]'] ||= Regexp.new(gr), :regexp, index)
5513
+ if has_terminal?('\G[^0-9\\[\\]\\(\\)\\s&,]', true, index)
5695
5514
  r24 = true
5696
5515
  @index += 1
5697
5516
  else
5698
- terminal_parse_failure('[^0-9\\[\\]\\(\\)\\s&,]')
5699
5517
  r24 = nil
5700
5518
  end
5701
5519
  if r24
@@ -5716,13 +5534,12 @@ module ScientificNameClean
5716
5534
  r7 = nil
5717
5535
  end
5718
5536
  if r7
5719
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
5720
5537
  r0 = r7
5721
5538
  else
5722
5539
  i25, s25 = index, []
5723
- if (match_len = has_terminal?("X", false, index))
5724
- r26 = true
5725
- @index += match_len
5540
+ if has_terminal?("X", false, index)
5541
+ r26 = instantiate_node(SyntaxNode,input, index...(index + 1))
5542
+ @index += 1
5726
5543
  else
5727
5544
  terminal_parse_failure("X")
5728
5545
  r26 = nil
@@ -5731,11 +5548,10 @@ module ScientificNameClean
5731
5548
  if r26
5732
5549
  s27, i27 = [], index
5733
5550
  loop do
5734
- if has_terminal?(@regexps[gr = '\A[^0-9\\[\\]\\(\\)\\s&,]'] ||= Regexp.new(gr), :regexp, index)
5551
+ if has_terminal?('\G[^0-9\\[\\]\\(\\)\\s&,]', true, index)
5735
5552
  r28 = true
5736
5553
  @index += 1
5737
5554
  else
5738
- terminal_parse_failure('[^0-9\\[\\]\\(\\)\\s&,]')
5739
5555
  r28 = nil
5740
5556
  end
5741
5557
  if r28
@@ -5761,12 +5577,10 @@ module ScientificNameClean
5761
5577
  r25 = nil
5762
5578
  end
5763
5579
  if r25
5764
- r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true
5765
5580
  r0 = r25
5766
5581
  else
5767
5582
  r29 = _nt_author_prefix_word
5768
5583
  if r29
5769
- r29 = SyntaxNode.new(input, (index-1)...index) if r29 == true
5770
5584
  r0 = r29
5771
5585
  else
5772
5586
  @index = i0
@@ -5805,7 +5619,7 @@ module ScientificNameClean
5805
5619
  if node_cache[:author_prefix_word].has_key?(index)
5806
5620
  cached = node_cache[:author_prefix_word][index]
5807
5621
  if cached
5808
- node_cache[:author_prefix_word][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5622
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5809
5623
  @index = cached.interval.end
5810
5624
  end
5811
5625
  return cached
@@ -5816,180 +5630,164 @@ module ScientificNameClean
5816
5630
  s0 << r1
5817
5631
  if r1
5818
5632
  i2 = index
5819
- if (match_len = has_terminal?("ab", false, index))
5820
- r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5821
- @index += match_len
5633
+ if has_terminal?("ab", false, index)
5634
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 2))
5635
+ @index += 2
5822
5636
  else
5823
5637
  terminal_parse_failure("ab")
5824
5638
  r3 = nil
5825
5639
  end
5826
5640
  if r3
5827
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
5828
5641
  r2 = r3
5829
5642
  else
5830
- if (match_len = has_terminal?("af", false, index))
5831
- r4 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5832
- @index += match_len
5643
+ if has_terminal?("af", false, index)
5644
+ r4 = instantiate_node(SyntaxNode,input, index...(index + 2))
5645
+ @index += 2
5833
5646
  else
5834
5647
  terminal_parse_failure("af")
5835
5648
  r4 = nil
5836
5649
  end
5837
5650
  if r4
5838
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
5839
5651
  r2 = r4
5840
5652
  else
5841
- if (match_len = has_terminal?("bis", false, index))
5842
- r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5843
- @index += match_len
5653
+ if has_terminal?("bis", false, index)
5654
+ r5 = instantiate_node(SyntaxNode,input, index...(index + 3))
5655
+ @index += 3
5844
5656
  else
5845
5657
  terminal_parse_failure("bis")
5846
5658
  r5 = nil
5847
5659
  end
5848
5660
  if r5
5849
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
5850
5661
  r2 = r5
5851
5662
  else
5852
- if (match_len = has_terminal?("da", false, index))
5853
- r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5854
- @index += match_len
5663
+ if has_terminal?("da", false, index)
5664
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 2))
5665
+ @index += 2
5855
5666
  else
5856
5667
  terminal_parse_failure("da")
5857
5668
  r6 = nil
5858
5669
  end
5859
5670
  if r6
5860
- r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
5861
5671
  r2 = r6
5862
5672
  else
5863
- if (match_len = has_terminal?("der", false, index))
5864
- r7 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5865
- @index += match_len
5673
+ if has_terminal?("der", false, index)
5674
+ r7 = instantiate_node(SyntaxNode,input, index...(index + 3))
5675
+ @index += 3
5866
5676
  else
5867
5677
  terminal_parse_failure("der")
5868
5678
  r7 = nil
5869
5679
  end
5870
5680
  if r7
5871
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
5872
5681
  r2 = r7
5873
5682
  else
5874
- if (match_len = has_terminal?("des", false, index))
5875
- r8 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5876
- @index += match_len
5683
+ if has_terminal?("des", false, index)
5684
+ r8 = instantiate_node(SyntaxNode,input, index...(index + 3))
5685
+ @index += 3
5877
5686
  else
5878
5687
  terminal_parse_failure("des")
5879
5688
  r8 = nil
5880
5689
  end
5881
5690
  if r8
5882
- r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
5883
5691
  r2 = r8
5884
5692
  else
5885
- if (match_len = has_terminal?("den", false, index))
5886
- r9 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5887
- @index += match_len
5693
+ if has_terminal?("den", false, index)
5694
+ r9 = instantiate_node(SyntaxNode,input, index...(index + 3))
5695
+ @index += 3
5888
5696
  else
5889
5697
  terminal_parse_failure("den")
5890
5698
  r9 = nil
5891
5699
  end
5892
5700
  if r9
5893
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
5894
5701
  r2 = r9
5895
5702
  else
5896
- if (match_len = has_terminal?("della", false, index))
5897
- r10 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5898
- @index += match_len
5703
+ if has_terminal?("della", false, index)
5704
+ r10 = instantiate_node(SyntaxNode,input, index...(index + 5))
5705
+ @index += 5
5899
5706
  else
5900
5707
  terminal_parse_failure("della")
5901
5708
  r10 = nil
5902
5709
  end
5903
5710
  if r10
5904
- r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
5905
5711
  r2 = r10
5906
5712
  else
5907
- if (match_len = has_terminal?("dela", false, index))
5908
- r11 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5909
- @index += match_len
5713
+ if has_terminal?("dela", false, index)
5714
+ r11 = instantiate_node(SyntaxNode,input, index...(index + 4))
5715
+ @index += 4
5910
5716
  else
5911
5717
  terminal_parse_failure("dela")
5912
5718
  r11 = nil
5913
5719
  end
5914
5720
  if r11
5915
- r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true
5916
5721
  r2 = r11
5917
5722
  else
5918
- if (match_len = has_terminal?("de", false, index))
5919
- r12 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5920
- @index += match_len
5723
+ if has_terminal?("de", false, index)
5724
+ r12 = instantiate_node(SyntaxNode,input, index...(index + 2))
5725
+ @index += 2
5921
5726
  else
5922
5727
  terminal_parse_failure("de")
5923
5728
  r12 = nil
5924
5729
  end
5925
5730
  if r12
5926
- r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true
5927
5731
  r2 = r12
5928
5732
  else
5929
- if (match_len = has_terminal?("di", false, index))
5930
- r13 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5931
- @index += match_len
5733
+ if has_terminal?("di", false, index)
5734
+ r13 = instantiate_node(SyntaxNode,input, index...(index + 2))
5735
+ @index += 2
5932
5736
  else
5933
5737
  terminal_parse_failure("di")
5934
5738
  r13 = nil
5935
5739
  end
5936
5740
  if r13
5937
- r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
5938
5741
  r2 = r13
5939
5742
  else
5940
- if (match_len = has_terminal?("du", false, index))
5941
- r14 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5942
- @index += match_len
5743
+ if has_terminal?("du", false, index)
5744
+ r14 = instantiate_node(SyntaxNode,input, index...(index + 2))
5745
+ @index += 2
5943
5746
  else
5944
5747
  terminal_parse_failure("du")
5945
5748
  r14 = nil
5946
5749
  end
5947
5750
  if r14
5948
- r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true
5949
5751
  r2 = r14
5950
5752
  else
5951
- if (match_len = has_terminal?("la", false, index))
5952
- r15 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5953
- @index += match_len
5753
+ if has_terminal?("la", false, index)
5754
+ r15 = instantiate_node(SyntaxNode,input, index...(index + 2))
5755
+ @index += 2
5954
5756
  else
5955
5757
  terminal_parse_failure("la")
5956
5758
  r15 = nil
5957
5759
  end
5958
5760
  if r15
5959
- r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true
5960
5761
  r2 = r15
5961
5762
  else
5962
- if (match_len = has_terminal?("ter", false, index))
5963
- r16 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5964
- @index += match_len
5763
+ if has_terminal?("ter", false, index)
5764
+ r16 = instantiate_node(SyntaxNode,input, index...(index + 3))
5765
+ @index += 3
5965
5766
  else
5966
5767
  terminal_parse_failure("ter")
5967
5768
  r16 = nil
5968
5769
  end
5969
5770
  if r16
5970
- r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true
5971
5771
  r2 = r16
5972
5772
  else
5973
- if (match_len = has_terminal?("van", false, index))
5974
- r17 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5975
- @index += match_len
5773
+ if has_terminal?("van", false, index)
5774
+ r17 = instantiate_node(SyntaxNode,input, index...(index + 3))
5775
+ @index += 3
5976
5776
  else
5977
5777
  terminal_parse_failure("van")
5978
5778
  r17 = nil
5979
5779
  end
5980
5780
  if r17
5981
- r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true
5982
5781
  r2 = r17
5983
5782
  else
5984
- if (match_len = has_terminal?("von", false, index))
5985
- r18 = instantiate_node(SyntaxNode,input, index...(index + match_len))
5986
- @index += match_len
5783
+ if has_terminal?("von", false, index)
5784
+ r18 = instantiate_node(SyntaxNode,input, index...(index + 3))
5785
+ @index += 3
5987
5786
  else
5988
5787
  terminal_parse_failure("von")
5989
5788
  r18 = nil
5990
5789
  end
5991
5790
  if r18
5992
- r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true
5993
5791
  r2 = r18
5994
5792
  else
5995
5793
  @index = i2
@@ -6052,34 +5850,32 @@ module ScientificNameClean
6052
5850
  if node_cache[:author_postfix_word].has_key?(index)
6053
5851
  cached = node_cache[:author_postfix_word][index]
6054
5852
  if cached
6055
- node_cache[:author_postfix_word][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5853
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6056
5854
  @index = cached.interval.end
6057
5855
  end
6058
5856
  return cached
6059
5857
  end
6060
5858
 
6061
5859
  i0 = index
6062
- if (match_len = has_terminal?("f.", false, index))
6063
- r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6064
- @index += match_len
5860
+ if has_terminal?("f.", false, index)
5861
+ r1 = instantiate_node(SyntaxNode,input, index...(index + 2))
5862
+ @index += 2
6065
5863
  else
6066
5864
  terminal_parse_failure("f.")
6067
5865
  r1 = nil
6068
5866
  end
6069
5867
  if r1
6070
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
6071
5868
  r0 = r1
6072
5869
  r0.extend(AuthorPostfixWord0)
6073
5870
  else
6074
- if (match_len = has_terminal?("filius", false, index))
6075
- r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6076
- @index += match_len
5871
+ if has_terminal?("filius", false, index)
5872
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 6))
5873
+ @index += 6
6077
5874
  else
6078
5875
  terminal_parse_failure("filius")
6079
5876
  r2 = nil
6080
5877
  end
6081
5878
  if r2
6082
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
6083
5879
  r0 = r2
6084
5880
  r0.extend(AuthorPostfixWord0)
6085
5881
  else
@@ -6114,7 +5910,7 @@ module ScientificNameClean
6114
5910
  if node_cache[:cap_latin_word_pair].has_key?(index)
6115
5911
  cached = node_cache[:cap_latin_word_pair][index]
6116
5912
  if cached
6117
- node_cache[:cap_latin_word_pair][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
5913
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6118
5914
  @index = cached.interval.end
6119
5915
  end
6120
5916
  return cached
@@ -6124,9 +5920,9 @@ module ScientificNameClean
6124
5920
  r1 = _nt_cap_latin_word
6125
5921
  s0 << r1
6126
5922
  if r1
6127
- if (match_len = has_terminal?("-", false, index))
6128
- r2 = true
6129
- @index += match_len
5923
+ if has_terminal?("-", false, index)
5924
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
5925
+ @index += 1
6130
5926
  else
6131
5927
  terminal_parse_failure("-")
6132
5928
  r2 = nil
@@ -6211,7 +6007,7 @@ module ScientificNameClean
6211
6007
  if node_cache[:cap_latin_word].has_key?(index)
6212
6008
  cached = node_cache[:cap_latin_word][index]
6213
6009
  if cached
6214
- node_cache[:cap_latin_word][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6010
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6215
6011
  @index = cached.interval.end
6216
6012
  end
6217
6013
  return cached
@@ -6220,20 +6016,17 @@ module ScientificNameClean
6220
6016
  i0 = index
6221
6017
  i1, s1 = index, []
6222
6018
  i2 = index
6223
- if has_terminal?(@regexps[gr = '\A[A-Z]'] ||= Regexp.new(gr), :regexp, index)
6019
+ if has_terminal?('\G[A-Z]', true, index)
6224
6020
  r3 = true
6225
6021
  @index += 1
6226
6022
  else
6227
- terminal_parse_failure('[A-Z]')
6228
6023
  r3 = nil
6229
6024
  end
6230
6025
  if r3
6231
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
6232
6026
  r2 = r3
6233
6027
  else
6234
6028
  r4 = _nt_cap_digraph
6235
6029
  if r4
6236
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
6237
6030
  r2 = r4
6238
6031
  else
6239
6032
  @index = i2
@@ -6245,9 +6038,9 @@ module ScientificNameClean
6245
6038
  r5 = _nt_latin_word
6246
6039
  s1 << r5
6247
6040
  if r5
6248
- if (match_len = has_terminal?("?", false, index))
6249
- r6 = true
6250
- @index += match_len
6041
+ if has_terminal?("?", false, index)
6042
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
6043
+ @index += 1
6251
6044
  else
6252
6045
  terminal_parse_failure("?")
6253
6046
  r6 = nil
@@ -6264,25 +6057,21 @@ module ScientificNameClean
6264
6057
  r1 = nil
6265
6058
  end
6266
6059
  if r1
6267
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
6268
6060
  r0 = r1
6269
6061
  else
6270
6062
  i7, s7 = index, []
6271
6063
  i8 = index
6272
- if has_terminal?(@regexps[gr = '\A[A-Z]'] ||= Regexp.new(gr), :regexp, index)
6064
+ if has_terminal?('\G[A-Z]', true, index)
6273
6065
  r9 = true
6274
6066
  @index += 1
6275
6067
  else
6276
- terminal_parse_failure('[A-Z]')
6277
6068
  r9 = nil
6278
6069
  end
6279
6070
  if r9
6280
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
6281
6071
  r8 = r9
6282
6072
  else
6283
6073
  r10 = _nt_cap_digraph
6284
6074
  if r10
6285
- r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
6286
6075
  r8 = r10
6287
6076
  else
6288
6077
  @index = i8
@@ -6303,31 +6092,28 @@ module ScientificNameClean
6303
6092
  r7 = nil
6304
6093
  end
6305
6094
  if r7
6306
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
6307
6095
  r0 = r7
6308
6096
  else
6309
6097
  i12, s12 = index, []
6310
6098
  i13 = index
6311
- if (match_len = has_terminal?("AE", false, index))
6312
- r14 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6313
- @index += match_len
6099
+ if has_terminal?("AE", false, index)
6100
+ r14 = instantiate_node(SyntaxNode,input, index...(index + 2))
6101
+ @index += 2
6314
6102
  else
6315
6103
  terminal_parse_failure("AE")
6316
6104
  r14 = nil
6317
6105
  end
6318
6106
  if r14
6319
- r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true
6320
6107
  r13 = r14
6321
6108
  else
6322
- if (match_len = has_terminal?("OE", false, index))
6323
- r15 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6324
- @index += match_len
6109
+ if has_terminal?("OE", false, index)
6110
+ r15 = instantiate_node(SyntaxNode,input, index...(index + 2))
6111
+ @index += 2
6325
6112
  else
6326
6113
  terminal_parse_failure("OE")
6327
6114
  r15 = nil
6328
6115
  end
6329
6116
  if r15
6330
- r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true
6331
6117
  r13 = r15
6332
6118
  else
6333
6119
  @index = i13
@@ -6348,235 +6134,215 @@ module ScientificNameClean
6348
6134
  r12 = nil
6349
6135
  end
6350
6136
  if r12
6351
- r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true
6352
6137
  r0 = r12
6353
6138
  else
6354
6139
  i17 = index
6355
- if (match_len = has_terminal?("Ca", false, index))
6356
- r18 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6357
- @index += match_len
6140
+ if has_terminal?("Ca", false, index)
6141
+ r18 = instantiate_node(SyntaxNode,input, index...(index + 2))
6142
+ @index += 2
6358
6143
  else
6359
6144
  terminal_parse_failure("Ca")
6360
6145
  r18 = nil
6361
6146
  end
6362
6147
  if r18
6363
- r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true
6364
6148
  r17 = r18
6365
6149
  r17.extend(CapLatinWord6)
6366
6150
  else
6367
- if (match_len = has_terminal?("Ea", false, index))
6368
- r19 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6369
- @index += match_len
6151
+ if has_terminal?("Ea", false, index)
6152
+ r19 = instantiate_node(SyntaxNode,input, index...(index + 2))
6153
+ @index += 2
6370
6154
  else
6371
6155
  terminal_parse_failure("Ea")
6372
6156
  r19 = nil
6373
6157
  end
6374
6158
  if r19
6375
- r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true
6376
6159
  r17 = r19
6377
6160
  r17.extend(CapLatinWord6)
6378
6161
  else
6379
- if (match_len = has_terminal?("Ge", false, index))
6380
- r20 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6381
- @index += match_len
6162
+ if has_terminal?("Ge", false, index)
6163
+ r20 = instantiate_node(SyntaxNode,input, index...(index + 2))
6164
+ @index += 2
6382
6165
  else
6383
6166
  terminal_parse_failure("Ge")
6384
6167
  r20 = nil
6385
6168
  end
6386
6169
  if r20
6387
- r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true
6388
6170
  r17 = r20
6389
6171
  r17.extend(CapLatinWord6)
6390
6172
  else
6391
- if (match_len = has_terminal?("Ia", false, index))
6392
- r21 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6393
- @index += match_len
6173
+ if has_terminal?("Ia", false, index)
6174
+ r21 = instantiate_node(SyntaxNode,input, index...(index + 2))
6175
+ @index += 2
6394
6176
  else
6395
6177
  terminal_parse_failure("Ia")
6396
6178
  r21 = nil
6397
6179
  end
6398
6180
  if r21
6399
- r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true
6400
6181
  r17 = r21
6401
6182
  r17.extend(CapLatinWord6)
6402
6183
  else
6403
- if (match_len = has_terminal?("Io", false, index))
6404
- r22 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6405
- @index += match_len
6184
+ if has_terminal?("Io", false, index)
6185
+ r22 = instantiate_node(SyntaxNode,input, index...(index + 2))
6186
+ @index += 2
6406
6187
  else
6407
6188
  terminal_parse_failure("Io")
6408
6189
  r22 = nil
6409
6190
  end
6410
6191
  if r22
6411
- r22 = SyntaxNode.new(input, (index-1)...index) if r22 == true
6412
6192
  r17 = r22
6413
6193
  r17.extend(CapLatinWord6)
6414
6194
  else
6415
- if (match_len = has_terminal?("Io", false, index))
6416
- r23 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6417
- @index += match_len
6195
+ if has_terminal?("Io", false, index)
6196
+ r23 = instantiate_node(SyntaxNode,input, index...(index + 2))
6197
+ @index += 2
6418
6198
  else
6419
6199
  terminal_parse_failure("Io")
6420
6200
  r23 = nil
6421
6201
  end
6422
6202
  if r23
6423
- r23 = SyntaxNode.new(input, (index-1)...index) if r23 == true
6424
6203
  r17 = r23
6425
6204
  r17.extend(CapLatinWord6)
6426
6205
  else
6427
- if (match_len = has_terminal?("Ix", false, index))
6428
- r24 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6429
- @index += match_len
6206
+ if has_terminal?("Ix", false, index)
6207
+ r24 = instantiate_node(SyntaxNode,input, index...(index + 2))
6208
+ @index += 2
6430
6209
  else
6431
6210
  terminal_parse_failure("Ix")
6432
6211
  r24 = nil
6433
6212
  end
6434
6213
  if r24
6435
- r24 = SyntaxNode.new(input, (index-1)...index) if r24 == true
6436
6214
  r17 = r24
6437
6215
  r17.extend(CapLatinWord6)
6438
6216
  else
6439
- if (match_len = has_terminal?("Lo", false, index))
6440
- r25 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6441
- @index += match_len
6217
+ if has_terminal?("Lo", false, index)
6218
+ r25 = instantiate_node(SyntaxNode,input, index...(index + 2))
6219
+ @index += 2
6442
6220
  else
6443
6221
  terminal_parse_failure("Lo")
6444
6222
  r25 = nil
6445
6223
  end
6446
6224
  if r25
6447
- r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true
6448
6225
  r17 = r25
6449
6226
  r17.extend(CapLatinWord6)
6450
6227
  else
6451
- if (match_len = has_terminal?("Oa", false, index))
6452
- r26 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6453
- @index += match_len
6228
+ if has_terminal?("Oa", false, index)
6229
+ r26 = instantiate_node(SyntaxNode,input, index...(index + 2))
6230
+ @index += 2
6454
6231
  else
6455
6232
  terminal_parse_failure("Oa")
6456
6233
  r26 = nil
6457
6234
  end
6458
6235
  if r26
6459
- r26 = SyntaxNode.new(input, (index-1)...index) if r26 == true
6460
6236
  r17 = r26
6461
6237
  r17.extend(CapLatinWord6)
6462
6238
  else
6463
- if (match_len = has_terminal?("Ra", false, index))
6464
- r27 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6465
- @index += match_len
6239
+ if has_terminal?("Ra", false, index)
6240
+ r27 = instantiate_node(SyntaxNode,input, index...(index + 2))
6241
+ @index += 2
6466
6242
  else
6467
6243
  terminal_parse_failure("Ra")
6468
6244
  r27 = nil
6469
6245
  end
6470
6246
  if r27
6471
- r27 = SyntaxNode.new(input, (index-1)...index) if r27 == true
6472
6247
  r17 = r27
6473
6248
  r17.extend(CapLatinWord6)
6474
6249
  else
6475
- if (match_len = has_terminal?("Ty", false, index))
6476
- r28 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6477
- @index += match_len
6250
+ if has_terminal?("Ty", false, index)
6251
+ r28 = instantiate_node(SyntaxNode,input, index...(index + 2))
6252
+ @index += 2
6478
6253
  else
6479
6254
  terminal_parse_failure("Ty")
6480
6255
  r28 = nil
6481
6256
  end
6482
6257
  if r28
6483
- r28 = SyntaxNode.new(input, (index-1)...index) if r28 == true
6484
6258
  r17 = r28
6485
6259
  r17.extend(CapLatinWord6)
6486
6260
  else
6487
- if (match_len = has_terminal?("Ua", false, index))
6488
- r29 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6489
- @index += match_len
6261
+ if has_terminal?("Ua", false, index)
6262
+ r29 = instantiate_node(SyntaxNode,input, index...(index + 2))
6263
+ @index += 2
6490
6264
  else
6491
6265
  terminal_parse_failure("Ua")
6492
6266
  r29 = nil
6493
6267
  end
6494
6268
  if r29
6495
- r29 = SyntaxNode.new(input, (index-1)...index) if r29 == true
6496
6269
  r17 = r29
6497
6270
  r17.extend(CapLatinWord6)
6498
6271
  else
6499
- if (match_len = has_terminal?("Aa", false, index))
6500
- r30 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6501
- @index += match_len
6272
+ if has_terminal?("Aa", false, index)
6273
+ r30 = instantiate_node(SyntaxNode,input, index...(index + 2))
6274
+ @index += 2
6502
6275
  else
6503
6276
  terminal_parse_failure("Aa")
6504
6277
  r30 = nil
6505
6278
  end
6506
6279
  if r30
6507
- r30 = SyntaxNode.new(input, (index-1)...index) if r30 == true
6508
6280
  r17 = r30
6509
6281
  r17.extend(CapLatinWord6)
6510
6282
  else
6511
- if (match_len = has_terminal?("Ja", false, index))
6512
- r31 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6513
- @index += match_len
6283
+ if has_terminal?("Ja", false, index)
6284
+ r31 = instantiate_node(SyntaxNode,input, index...(index + 2))
6285
+ @index += 2
6514
6286
  else
6515
6287
  terminal_parse_failure("Ja")
6516
6288
  r31 = nil
6517
6289
  end
6518
6290
  if r31
6519
- r31 = SyntaxNode.new(input, (index-1)...index) if r31 == true
6520
6291
  r17 = r31
6521
6292
  r17.extend(CapLatinWord6)
6522
6293
  else
6523
- if (match_len = has_terminal?("Zu", false, index))
6524
- r32 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6525
- @index += match_len
6294
+ if has_terminal?("Zu", false, index)
6295
+ r32 = instantiate_node(SyntaxNode,input, index...(index + 2))
6296
+ @index += 2
6526
6297
  else
6527
6298
  terminal_parse_failure("Zu")
6528
6299
  r32 = nil
6529
6300
  end
6530
6301
  if r32
6531
- r32 = SyntaxNode.new(input, (index-1)...index) if r32 == true
6532
6302
  r17 = r32
6533
6303
  r17.extend(CapLatinWord6)
6534
6304
  else
6535
- if (match_len = has_terminal?("La", false, index))
6536
- r33 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6537
- @index += match_len
6305
+ if has_terminal?("La", false, index)
6306
+ r33 = instantiate_node(SyntaxNode,input, index...(index + 2))
6307
+ @index += 2
6538
6308
  else
6539
6309
  terminal_parse_failure("La")
6540
6310
  r33 = nil
6541
6311
  end
6542
6312
  if r33
6543
- r33 = SyntaxNode.new(input, (index-1)...index) if r33 == true
6544
6313
  r17 = r33
6545
6314
  r17.extend(CapLatinWord6)
6546
6315
  else
6547
- if (match_len = has_terminal?("Qu", false, index))
6548
- r34 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6549
- @index += match_len
6316
+ if has_terminal?("Qu", false, index)
6317
+ r34 = instantiate_node(SyntaxNode,input, index...(index + 2))
6318
+ @index += 2
6550
6319
  else
6551
6320
  terminal_parse_failure("Qu")
6552
6321
  r34 = nil
6553
6322
  end
6554
6323
  if r34
6555
- r34 = SyntaxNode.new(input, (index-1)...index) if r34 == true
6556
6324
  r17 = r34
6557
6325
  r17.extend(CapLatinWord6)
6558
6326
  else
6559
- if (match_len = has_terminal?("As", false, index))
6560
- r35 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6561
- @index += match_len
6327
+ if has_terminal?("As", false, index)
6328
+ r35 = instantiate_node(SyntaxNode,input, index...(index + 2))
6329
+ @index += 2
6562
6330
  else
6563
6331
  terminal_parse_failure("As")
6564
6332
  r35 = nil
6565
6333
  end
6566
6334
  if r35
6567
- r35 = SyntaxNode.new(input, (index-1)...index) if r35 == true
6568
6335
  r17 = r35
6569
6336
  r17.extend(CapLatinWord6)
6570
6337
  else
6571
- if (match_len = has_terminal?("Ba", false, index))
6572
- r36 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6573
- @index += match_len
6338
+ if has_terminal?("Ba", false, index)
6339
+ r36 = instantiate_node(SyntaxNode,input, index...(index + 2))
6340
+ @index += 2
6574
6341
  else
6575
6342
  terminal_parse_failure("Ba")
6576
6343
  r36 = nil
6577
6344
  end
6578
6345
  if r36
6579
- r36 = SyntaxNode.new(input, (index-1)...index) if r36 == true
6580
6346
  r17 = r36
6581
6347
  r17.extend(CapLatinWord6)
6582
6348
  else
@@ -6602,7 +6368,6 @@ module ScientificNameClean
6602
6368
  end
6603
6369
  end
6604
6370
  if r17
6605
- r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true
6606
6371
  r0 = r17
6607
6372
  else
6608
6373
  @index = i0
@@ -6631,25 +6396,24 @@ module ScientificNameClean
6631
6396
  if node_cache[:capped_dotted_char].has_key?(index)
6632
6397
  cached = node_cache[:capped_dotted_char][index]
6633
6398
  if cached
6634
- node_cache[:capped_dotted_char][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6399
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6635
6400
  @index = cached.interval.end
6636
6401
  end
6637
6402
  return cached
6638
6403
  end
6639
6404
 
6640
6405
  i0, s0 = index, []
6641
- if has_terminal?(@regexps[gr = '\A[A-Z]'] ||= Regexp.new(gr), :regexp, index)
6406
+ if has_terminal?('\G[A-Z]', true, index)
6642
6407
  r1 = true
6643
6408
  @index += 1
6644
6409
  else
6645
- terminal_parse_failure('[A-Z]')
6646
6410
  r1 = nil
6647
6411
  end
6648
6412
  s0 << r1
6649
6413
  if r1
6650
- if (match_len = has_terminal?(".", false, index))
6651
- r2 = true
6652
- @index += match_len
6414
+ if has_terminal?(".", false, index)
6415
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
6416
+ @index += 1
6653
6417
  else
6654
6418
  terminal_parse_failure(".")
6655
6419
  r2 = nil
@@ -6783,7 +6547,7 @@ module ScientificNameClean
6783
6547
  if node_cache[:species_word_hybrid].has_key?(index)
6784
6548
  cached = node_cache[:species_word_hybrid][index]
6785
6549
  if cached
6786
- node_cache[:species_word_hybrid][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6550
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6787
6551
  @index = cached.interval.end
6788
6552
  end
6789
6553
  return cached
@@ -6810,13 +6574,12 @@ module ScientificNameClean
6810
6574
  r1 = nil
6811
6575
  end
6812
6576
  if r1
6813
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
6814
6577
  r0 = r1
6815
6578
  else
6816
6579
  i5, s5 = index, []
6817
- if (match_len = has_terminal?("X", false, index))
6818
- r6 = true
6819
- @index += match_len
6580
+ if has_terminal?("X", false, index)
6581
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 1))
6582
+ @index += 1
6820
6583
  else
6821
6584
  terminal_parse_failure("X")
6822
6585
  r6 = nil
@@ -6839,13 +6602,12 @@ module ScientificNameClean
6839
6602
  r5 = nil
6840
6603
  end
6841
6604
  if r5
6842
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
6843
6605
  r0 = r5
6844
6606
  else
6845
6607
  i9, s9 = index, []
6846
- if (match_len = has_terminal?("x", false, index))
6847
- r10 = true
6848
- @index += match_len
6608
+ if has_terminal?("x", false, index)
6609
+ r10 = instantiate_node(SyntaxNode,input, index...(index + 1))
6610
+ @index += 1
6849
6611
  else
6850
6612
  terminal_parse_failure("x")
6851
6613
  r10 = nil
@@ -6868,7 +6630,6 @@ module ScientificNameClean
6868
6630
  r9 = nil
6869
6631
  end
6870
6632
  if r9
6871
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
6872
6633
  r0 = r9
6873
6634
  else
6874
6635
  @index = i0
@@ -6934,7 +6695,7 @@ module ScientificNameClean
6934
6695
  if node_cache[:annotation_identification].has_key?(index)
6935
6696
  cached = node_cache[:annotation_identification][index]
6936
6697
  if cached
6937
- node_cache[:annotation_identification][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6698
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6938
6699
  @index = cached.interval.end
6939
6700
  end
6940
6701
  return cached
@@ -6942,183 +6703,168 @@ module ScientificNameClean
6942
6703
 
6943
6704
  i0 = index
6944
6705
  i1 = index
6945
- if (match_len = has_terminal?("sp.nr.", false, index))
6946
- r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6947
- @index += match_len
6706
+ if has_terminal?("sp.nr.", false, index)
6707
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 6))
6708
+ @index += 6
6948
6709
  else
6949
6710
  terminal_parse_failure("sp.nr.")
6950
6711
  r2 = nil
6951
6712
  end
6952
6713
  if r2
6953
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
6954
6714
  r1 = r2
6955
6715
  r1.extend(AnnotationIdentification0)
6956
6716
  else
6957
- if (match_len = has_terminal?("sp. nr.", false, index))
6958
- r3 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6959
- @index += match_len
6717
+ if has_terminal?("sp. nr.", false, index)
6718
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 7))
6719
+ @index += 7
6960
6720
  else
6961
6721
  terminal_parse_failure("sp. nr.")
6962
6722
  r3 = nil
6963
6723
  end
6964
6724
  if r3
6965
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
6966
6725
  r1 = r3
6967
6726
  r1.extend(AnnotationIdentification0)
6968
6727
  else
6969
- if (match_len = has_terminal?("nr.", false, index))
6970
- r4 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6971
- @index += match_len
6728
+ if has_terminal?("nr.", false, index)
6729
+ r4 = instantiate_node(SyntaxNode,input, index...(index + 3))
6730
+ @index += 3
6972
6731
  else
6973
6732
  terminal_parse_failure("nr.")
6974
6733
  r4 = nil
6975
6734
  end
6976
6735
  if r4
6977
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
6978
6736
  r1 = r4
6979
6737
  r1.extend(AnnotationIdentification0)
6980
6738
  else
6981
- if (match_len = has_terminal?("nr ", false, index))
6982
- r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6983
- @index += match_len
6739
+ if has_terminal?("nr ", false, index)
6740
+ r5 = instantiate_node(SyntaxNode,input, index...(index + 3))
6741
+ @index += 3
6984
6742
  else
6985
6743
  terminal_parse_failure("nr ")
6986
6744
  r5 = nil
6987
6745
  end
6988
6746
  if r5
6989
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
6990
6747
  r1 = r5
6991
6748
  r1.extend(AnnotationIdentification0)
6992
6749
  else
6993
- if (match_len = has_terminal?("sp.aff.", false, index))
6994
- r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
6995
- @index += match_len
6750
+ if has_terminal?("sp.aff.", false, index)
6751
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 7))
6752
+ @index += 7
6996
6753
  else
6997
6754
  terminal_parse_failure("sp.aff.")
6998
6755
  r6 = nil
6999
6756
  end
7000
6757
  if r6
7001
- r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
7002
6758
  r1 = r6
7003
6759
  r1.extend(AnnotationIdentification0)
7004
6760
  else
7005
- if (match_len = has_terminal?("sp. aff.", false, index))
7006
- r7 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7007
- @index += match_len
6761
+ if has_terminal?("sp. aff.", false, index)
6762
+ r7 = instantiate_node(SyntaxNode,input, index...(index + 8))
6763
+ @index += 8
7008
6764
  else
7009
6765
  terminal_parse_failure("sp. aff.")
7010
6766
  r7 = nil
7011
6767
  end
7012
6768
  if r7
7013
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
7014
6769
  r1 = r7
7015
6770
  r1.extend(AnnotationIdentification0)
7016
6771
  else
7017
- if (match_len = has_terminal?("sp.", false, index))
7018
- r8 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7019
- @index += match_len
6772
+ if has_terminal?("sp.", false, index)
6773
+ r8 = instantiate_node(SyntaxNode,input, index...(index + 3))
6774
+ @index += 3
7020
6775
  else
7021
6776
  terminal_parse_failure("sp.")
7022
6777
  r8 = nil
7023
6778
  end
7024
6779
  if r8
7025
- r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true
7026
6780
  r1 = r8
7027
6781
  r1.extend(AnnotationIdentification0)
7028
6782
  else
7029
- if (match_len = has_terminal?("sp ", false, index))
7030
- r9 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7031
- @index += match_len
6783
+ if has_terminal?("sp ", false, index)
6784
+ r9 = instantiate_node(SyntaxNode,input, index...(index + 3))
6785
+ @index += 3
7032
6786
  else
7033
6787
  terminal_parse_failure("sp ")
7034
6788
  r9 = nil
7035
6789
  end
7036
6790
  if r9
7037
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
7038
6791
  r1 = r9
7039
6792
  r1.extend(AnnotationIdentification0)
7040
6793
  else
7041
- if (match_len = has_terminal?("species", false, index))
7042
- r10 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7043
- @index += match_len
6794
+ if has_terminal?("species", false, index)
6795
+ r10 = instantiate_node(SyntaxNode,input, index...(index + 7))
6796
+ @index += 7
7044
6797
  else
7045
6798
  terminal_parse_failure("species")
7046
6799
  r10 = nil
7047
6800
  end
7048
6801
  if r10
7049
- r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
7050
6802
  r1 = r10
7051
6803
  r1.extend(AnnotationIdentification0)
7052
6804
  else
7053
- if (match_len = has_terminal?("spp.", false, index))
7054
- r11 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7055
- @index += match_len
6805
+ if has_terminal?("spp.", false, index)
6806
+ r11 = instantiate_node(SyntaxNode,input, index...(index + 4))
6807
+ @index += 4
7056
6808
  else
7057
6809
  terminal_parse_failure("spp.")
7058
6810
  r11 = nil
7059
6811
  end
7060
6812
  if r11
7061
- r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true
7062
6813
  r1 = r11
7063
6814
  r1.extend(AnnotationIdentification0)
7064
6815
  else
7065
- if (match_len = has_terminal?("spp ", false, index))
7066
- r12 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7067
- @index += match_len
6816
+ if has_terminal?("spp ", false, index)
6817
+ r12 = instantiate_node(SyntaxNode,input, index...(index + 4))
6818
+ @index += 4
7068
6819
  else
7069
6820
  terminal_parse_failure("spp ")
7070
6821
  r12 = nil
7071
6822
  end
7072
6823
  if r12
7073
- r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true
7074
6824
  r1 = r12
7075
6825
  r1.extend(AnnotationIdentification0)
7076
6826
  else
7077
- if (match_len = has_terminal?("aff.", false, index))
7078
- r13 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7079
- @index += match_len
6827
+ if has_terminal?("aff.", false, index)
6828
+ r13 = instantiate_node(SyntaxNode,input, index...(index + 4))
6829
+ @index += 4
7080
6830
  else
7081
6831
  terminal_parse_failure("aff.")
7082
6832
  r13 = nil
7083
6833
  end
7084
6834
  if r13
7085
- r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true
7086
6835
  r1 = r13
7087
6836
  r1.extend(AnnotationIdentification0)
7088
6837
  else
7089
- if (match_len = has_terminal?("aff ", false, index))
7090
- r14 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7091
- @index += match_len
6838
+ if has_terminal?("aff ", false, index)
6839
+ r14 = instantiate_node(SyntaxNode,input, index...(index + 4))
6840
+ @index += 4
7092
6841
  else
7093
6842
  terminal_parse_failure("aff ")
7094
6843
  r14 = nil
7095
6844
  end
7096
6845
  if r14
7097
- r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true
7098
6846
  r1 = r14
7099
6847
  r1.extend(AnnotationIdentification0)
7100
6848
  else
7101
- if (match_len = has_terminal?("monst.", false, index))
7102
- r15 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7103
- @index += match_len
6849
+ if has_terminal?("monst.", false, index)
6850
+ r15 = instantiate_node(SyntaxNode,input, index...(index + 6))
6851
+ @index += 6
7104
6852
  else
7105
6853
  terminal_parse_failure("monst.")
7106
6854
  r15 = nil
7107
6855
  end
7108
6856
  if r15
7109
- r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true
7110
6857
  r1 = r15
7111
6858
  r1.extend(AnnotationIdentification0)
7112
6859
  else
7113
- if (match_len = has_terminal?("? ", false, index))
7114
- r16 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7115
- @index += match_len
6860
+ if has_terminal?("? ", false, index)
6861
+ r16 = instantiate_node(SyntaxNode,input, index...(index + 2))
6862
+ @index += 2
7116
6863
  else
7117
6864
  terminal_parse_failure("? ")
7118
6865
  r16 = nil
7119
6866
  end
7120
6867
  if r16
7121
- r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true
7122
6868
  r1 = r16
7123
6869
  r1.extend(AnnotationIdentification0)
7124
6870
  else
@@ -7140,31 +6886,28 @@ module ScientificNameClean
7140
6886
  end
7141
6887
  end
7142
6888
  if r1
7143
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
7144
6889
  r0 = r1
7145
6890
  else
7146
6891
  i17 = index
7147
- if (match_len = has_terminal?("cf.", false, index))
7148
- r18 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7149
- @index += match_len
6892
+ if has_terminal?("cf.", false, index)
6893
+ r18 = instantiate_node(SyntaxNode,input, index...(index + 3))
6894
+ @index += 3
7150
6895
  else
7151
6896
  terminal_parse_failure("cf.")
7152
6897
  r18 = nil
7153
6898
  end
7154
6899
  if r18
7155
- r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true
7156
6900
  r17 = r18
7157
6901
  r17.extend(AnnotationIdentification1)
7158
6902
  else
7159
- if (match_len = has_terminal?("cf ", false, index))
7160
- r19 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7161
- @index += match_len
6903
+ if has_terminal?("cf ", false, index)
6904
+ r19 = instantiate_node(SyntaxNode,input, index...(index + 3))
6905
+ @index += 3
7162
6906
  else
7163
6907
  terminal_parse_failure("cf ")
7164
6908
  r19 = nil
7165
6909
  end
7166
6910
  if r19
7167
- r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true
7168
6911
  r17 = r19
7169
6912
  r17.extend(AnnotationIdentification1)
7170
6913
  else
@@ -7173,7 +6916,6 @@ module ScientificNameClean
7173
6916
  end
7174
6917
  end
7175
6918
  if r17
7176
- r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true
7177
6919
  r0 = r17
7178
6920
  else
7179
6921
  @index = i0
@@ -7209,7 +6951,7 @@ module ScientificNameClean
7209
6951
  if node_cache[:species_word].has_key?(index)
7210
6952
  cached = node_cache[:species_word][index]
7211
6953
  if cached
7212
- node_cache[:species_word][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
6954
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7213
6955
  @index = cached.interval.end
7214
6956
  end
7215
6957
  return cached
@@ -7219,11 +6961,10 @@ module ScientificNameClean
7219
6961
  i1, s1 = index, []
7220
6962
  s2, i2 = [], index
7221
6963
  loop do
7222
- if has_terminal?(@regexps[gr = '\A[0-9]'] ||= Regexp.new(gr), :regexp, index)
6964
+ if has_terminal?('\G[0-9]', true, index)
7223
6965
  r3 = true
7224
6966
  @index += 1
7225
6967
  else
7226
- terminal_parse_failure('[0-9]')
7227
6968
  r3 = nil
7228
6969
  end
7229
6970
  if r3
@@ -7240,9 +6981,9 @@ module ScientificNameClean
7240
6981
  end
7241
6982
  s1 << r2
7242
6983
  if r2
7243
- if (match_len = has_terminal?("-", false, index))
7244
- r5 = true
7245
- @index += match_len
6984
+ if has_terminal?("-", false, index)
6985
+ r5 = instantiate_node(SyntaxNode,input, index...(index + 1))
6986
+ @index += 1
7246
6987
  else
7247
6988
  terminal_parse_failure("-")
7248
6989
  r5 = nil
@@ -7267,12 +7008,10 @@ module ScientificNameClean
7267
7008
  r1 = nil
7268
7009
  end
7269
7010
  if r1
7270
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
7271
7011
  r0 = r1
7272
7012
  else
7273
7013
  r7 = _nt_latin_word
7274
7014
  if r7
7275
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
7276
7015
  r0 = r7
7277
7016
  else
7278
7017
  @index = i0
@@ -7334,7 +7073,7 @@ module ScientificNameClean
7334
7073
  if node_cache[:latin_word].has_key?(index)
7335
7074
  cached = node_cache[:latin_word][index]
7336
7075
  if cached
7337
- node_cache[:latin_word][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7076
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7338
7077
  @index = cached.interval.end
7339
7078
  end
7340
7079
  return cached
@@ -7345,9 +7084,9 @@ module ScientificNameClean
7345
7084
  r2 = _nt_valid_name_letters
7346
7085
  s1 << r2
7347
7086
  if r2
7348
- if (match_len = has_terminal?("-", false, index))
7349
- r3 = true
7350
- @index += match_len
7087
+ if has_terminal?("-", false, index)
7088
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
7089
+ @index += 1
7351
7090
  else
7352
7091
  terminal_parse_failure("-")
7353
7092
  r3 = nil
@@ -7367,31 +7106,28 @@ module ScientificNameClean
7367
7106
  r1 = nil
7368
7107
  end
7369
7108
  if r1
7370
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
7371
7109
  r0 = r1
7372
7110
  else
7373
- if (match_len = has_terminal?("o'donelli", false, index))
7374
- r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7111
+ if has_terminal?("o'donelli", false, index)
7112
+ r5 = instantiate_node(SyntaxNode,input, index...(index + 9))
7375
7113
  r5.extend(LatinWord2)
7376
- @index += match_len
7114
+ @index += 9
7377
7115
  else
7378
7116
  terminal_parse_failure("o'donelli")
7379
7117
  r5 = nil
7380
7118
  end
7381
7119
  if r5
7382
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
7383
7120
  r0 = r5
7384
7121
  else
7385
- if (match_len = has_terminal?("o'neili", false, index))
7386
- r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7122
+ if has_terminal?("o'neili", false, index)
7123
+ r6 = instantiate_node(SyntaxNode,input, index...(index + 7))
7387
7124
  r6.extend(LatinWord3)
7388
- @index += match_len
7125
+ @index += 7
7389
7126
  else
7390
7127
  terminal_parse_failure("o'neili")
7391
7128
  r6 = nil
7392
7129
  end
7393
7130
  if r6
7394
- r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
7395
7131
  r0 = r6
7396
7132
  else
7397
7133
  i7, s7 = index, []
@@ -7410,7 +7146,6 @@ module ScientificNameClean
7410
7146
  r7 = nil
7411
7147
  end
7412
7148
  if r7
7413
- r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
7414
7149
  r0 = r7
7415
7150
  else
7416
7151
  @index = i0
@@ -7445,7 +7180,7 @@ module ScientificNameClean
7445
7180
  if node_cache[:valid_name_letters].has_key?(index)
7446
7181
  cached = node_cache[:valid_name_letters][index]
7447
7182
  if cached
7448
- node_cache[:valid_name_letters][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7183
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7449
7184
  @index = cached.interval.end
7450
7185
  end
7451
7186
  return cached
@@ -7453,11 +7188,10 @@ module ScientificNameClean
7453
7188
 
7454
7189
  s0, i0 = [], index
7455
7190
  loop do
7456
- if has_terminal?(@regexps[gr = '\A[a-zëæœ]'] ||= Regexp.new(gr), :regexp, index)
7191
+ if has_terminal?('\G[a-zëæœ]', true, index)
7457
7192
  r1 = true
7458
7193
  @index += 1
7459
7194
  else
7460
- terminal_parse_failure('[a-zëæœ]')
7461
7195
  r1 = nil
7462
7196
  end
7463
7197
  if r1
@@ -7494,18 +7228,17 @@ module ScientificNameClean
7494
7228
  if node_cache[:valid_name_letter].has_key?(index)
7495
7229
  cached = node_cache[:valid_name_letter][index]
7496
7230
  if cached
7497
- node_cache[:valid_name_letter][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7231
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7498
7232
  @index = cached.interval.end
7499
7233
  end
7500
7234
  return cached
7501
7235
  end
7502
7236
 
7503
- if has_terminal?(@regexps[gr = '\A[a-zëæœ]'] ||= Regexp.new(gr), :regexp, index)
7237
+ if has_terminal?('\G[a-zëæœ]', true, index)
7504
7238
  r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
7505
7239
  r0.extend(ValidNameLetter0)
7506
7240
  @index += 1
7507
7241
  else
7508
- terminal_parse_failure('[a-zëæœ]')
7509
7242
  r0 = nil
7510
7243
  end
7511
7244
 
@@ -7531,35 +7264,33 @@ module ScientificNameClean
7531
7264
  if node_cache[:cap_digraph].has_key?(index)
7532
7265
  cached = node_cache[:cap_digraph][index]
7533
7266
  if cached
7534
- node_cache[:cap_digraph][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7267
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7535
7268
  @index = cached.interval.end
7536
7269
  end
7537
7270
  return cached
7538
7271
  end
7539
7272
 
7540
7273
  i0 = index
7541
- if (match_len = has_terminal?("Æ", false, index))
7542
- r1 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7274
+ if has_terminal?("Æ", false, index)
7275
+ r1 = instantiate_node(SyntaxNode,input, index...(index + 1))
7543
7276
  r1.extend(CapDigraph0)
7544
- @index += match_len
7277
+ @index += 1
7545
7278
  else
7546
7279
  terminal_parse_failure("Æ")
7547
7280
  r1 = nil
7548
7281
  end
7549
7282
  if r1
7550
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
7551
7283
  r0 = r1
7552
7284
  else
7553
- if (match_len = has_terminal?("Œ", false, index))
7554
- r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7285
+ if has_terminal?("Œ", false, index)
7286
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
7555
7287
  r2.extend(CapDigraph1)
7556
- @index += match_len
7288
+ @index += 1
7557
7289
  else
7558
7290
  terminal_parse_failure("Œ")
7559
7291
  r2 = nil
7560
7292
  end
7561
7293
  if r2
7562
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
7563
7294
  r0 = r2
7564
7295
  else
7565
7296
  @index = i0
@@ -7613,7 +7344,7 @@ module ScientificNameClean
7613
7344
  if node_cache[:year].has_key?(index)
7614
7345
  cached = node_cache[:year][index]
7615
7346
  if cached
7616
- node_cache[:year][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7347
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7617
7348
  @index = cached.interval.end
7618
7349
  end
7619
7350
  return cached
@@ -7630,12 +7361,10 @@ module ScientificNameClean
7630
7361
  i4 = index
7631
7362
  r5 = _nt_year_number_with_character
7632
7363
  if r5
7633
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
7634
7364
  r4 = r5
7635
7365
  else
7636
7366
  r6 = _nt_year_number
7637
7367
  if r6
7638
- r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
7639
7368
  r4 = r6
7640
7369
  else
7641
7370
  @index = i4
@@ -7662,17 +7391,14 @@ module ScientificNameClean
7662
7391
  r1 = nil
7663
7392
  end
7664
7393
  if r1
7665
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
7666
7394
  r0 = r1
7667
7395
  else
7668
7396
  r9 = _nt_year_number_with_character
7669
7397
  if r9
7670
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
7671
7398
  r0 = r9
7672
7399
  else
7673
7400
  r10 = _nt_year_number
7674
7401
  if r10
7675
- r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
7676
7402
  r0 = r10
7677
7403
  else
7678
7404
  @index = i0
@@ -7712,7 +7438,7 @@ module ScientificNameClean
7712
7438
  if node_cache[:year_number_with_character].has_key?(index)
7713
7439
  cached = node_cache[:year_number_with_character][index]
7714
7440
  if cached
7715
- node_cache[:year_number_with_character][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7441
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7716
7442
  @index = cached.interval.end
7717
7443
  end
7718
7444
  return cached
@@ -7722,11 +7448,10 @@ module ScientificNameClean
7722
7448
  r1 = _nt_year_number
7723
7449
  s0 << r1
7724
7450
  if r1
7725
- if has_terminal?(@regexps[gr = '\A[a-zA-Z]'] ||= Regexp.new(gr), :regexp, index)
7451
+ if has_terminal?('\G[a-zA-Z]', true, index)
7726
7452
  r2 = true
7727
7453
  @index += 1
7728
7454
  else
7729
- terminal_parse_failure('[a-zA-Z]')
7730
7455
  r2 = nil
7731
7456
  end
7732
7457
  s0 << r2
@@ -7770,56 +7495,51 @@ module ScientificNameClean
7770
7495
  if node_cache[:year_number].has_key?(index)
7771
7496
  cached = node_cache[:year_number][index]
7772
7497
  if cached
7773
- node_cache[:year_number][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7498
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7774
7499
  @index = cached.interval.end
7775
7500
  end
7776
7501
  return cached
7777
7502
  end
7778
7503
 
7779
7504
  i0, s0 = index, []
7780
- if has_terminal?(@regexps[gr = '\A[12]'] ||= Regexp.new(gr), :regexp, index)
7505
+ if has_terminal?('\G[12]', true, index)
7781
7506
  r1 = true
7782
7507
  @index += 1
7783
7508
  else
7784
- terminal_parse_failure('[12]')
7785
7509
  r1 = nil
7786
7510
  end
7787
7511
  s0 << r1
7788
7512
  if r1
7789
- if has_terminal?(@regexps[gr = '\A[7890]'] ||= Regexp.new(gr), :regexp, index)
7513
+ if has_terminal?('\G[7890]', true, index)
7790
7514
  r2 = true
7791
7515
  @index += 1
7792
7516
  else
7793
- terminal_parse_failure('[7890]')
7794
7517
  r2 = nil
7795
7518
  end
7796
7519
  s0 << r2
7797
7520
  if r2
7798
- if has_terminal?(@regexps[gr = '\A[0-9]'] ||= Regexp.new(gr), :regexp, index)
7521
+ if has_terminal?('\G[0-9]', true, index)
7799
7522
  r3 = true
7800
7523
  @index += 1
7801
7524
  else
7802
- terminal_parse_failure('[0-9]')
7803
7525
  r3 = nil
7804
7526
  end
7805
7527
  s0 << r3
7806
7528
  if r3
7807
7529
  i4 = index
7808
7530
  i5, s5 = index, []
7809
- if has_terminal?(@regexps[gr = '\A[0-9]'] ||= Regexp.new(gr), :regexp, index)
7531
+ if has_terminal?('\G[0-9]', true, index)
7810
7532
  r6 = true
7811
7533
  @index += 1
7812
7534
  else
7813
- terminal_parse_failure('[0-9]')
7814
7535
  r6 = nil
7815
7536
  end
7816
7537
  s5 << r6
7817
7538
  if r6
7818
- if has_terminal?(@regexps[gr = '\A[\\?]'] ||= Regexp.new(gr), :regexp, index)
7539
+ if has_terminal?('\G[\\?]', true, index)
7819
7540
  r8 = true
7820
7541
  @index += 1
7821
7542
  else
7822
- terminal_parse_failure('[\\?]')
7823
7543
  r8 = nil
7824
7544
  end
7825
7545
  if r8
@@ -7837,18 +7557,16 @@ module ScientificNameClean
7837
7557
  r5 = nil
7838
7558
  end
7839
7559
  if r5
7840
- r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
7841
7560
  r4 = r5
7842
7561
  else
7843
- if (match_len = has_terminal?("?", false, index))
7844
- r9 = true
7845
- @index += match_len
7562
+ if has_terminal?("?", false, index)
7563
+ r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
7564
+ @index += 1
7846
7565
  else
7847
7566
  terminal_parse_failure("?")
7848
7567
  r9 = nil
7849
7568
  end
7850
7569
  if r9
7851
- r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
7852
7570
  r4 = r9
7853
7571
  else
7854
7572
  @index = i4
@@ -7878,15 +7596,15 @@ module ScientificNameClean
7878
7596
  if node_cache[:left_paren].has_key?(index)
7879
7597
  cached = node_cache[:left_paren][index]
7880
7598
  if cached
7881
- node_cache[:left_paren][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7599
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7882
7600
  @index = cached.interval.end
7883
7601
  end
7884
7602
  return cached
7885
7603
  end
7886
7604
 
7887
- if (match_len = has_terminal?("(", false, index))
7888
- r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7889
- @index += match_len
7605
+ if has_terminal?("(", false, index)
7606
+ r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
7607
+ @index += 1
7890
7608
  else
7891
7609
  terminal_parse_failure("(")
7892
7610
  r0 = nil
@@ -7902,15 +7620,15 @@ module ScientificNameClean
7902
7620
  if node_cache[:right_paren].has_key?(index)
7903
7621
  cached = node_cache[:right_paren][index]
7904
7622
  if cached
7905
- node_cache[:right_paren][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7623
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7906
7624
  @index = cached.interval.end
7907
7625
  end
7908
7626
  return cached
7909
7627
  end
7910
7628
 
7911
- if (match_len = has_terminal?(")", false, index))
7912
- r0 = instantiate_node(SyntaxNode,input, index...(index + match_len))
7913
- @index += match_len
7629
+ if has_terminal?(")", false, index)
7630
+ r0 = instantiate_node(SyntaxNode,input, index...(index + 1))
7631
+ @index += 1
7914
7632
  else
7915
7633
  terminal_parse_failure(")")
7916
7634
  r0 = nil
@@ -7932,7 +7650,7 @@ module ScientificNameClean
7932
7650
  if node_cache[:hybrid_character].has_key?(index)
7933
7651
  cached = node_cache[:hybrid_character][index]
7934
7652
  if cached
7935
- node_cache[:hybrid_character][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7653
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7936
7654
  @index = cached.interval.end
7937
7655
  end
7938
7656
  return cached
@@ -7940,27 +7658,25 @@ module ScientificNameClean
7940
7658
 
7941
7659
  i0 = index
7942
7660
  i1 = index
7943
- if (match_len = has_terminal?("x", false, index))
7944
- r2 = true
7945
- @index += match_len
7661
+ if has_terminal?("x", false, index)
7662
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
7663
+ @index += 1
7946
7664
  else
7947
7665
  terminal_parse_failure("x")
7948
7666
  r2 = nil
7949
7667
  end
7950
7668
  if r2
7951
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
7952
7669
  r1 = r2
7953
7670
  r1.extend(HybridCharacter0)
7954
7671
  else
7955
- if (match_len = has_terminal?("X", false, index))
7956
- r3 = true
7957
- @index += match_len
7672
+ if has_terminal?("X", false, index)
7673
+ r3 = instantiate_node(SyntaxNode,input, index...(index + 1))
7674
+ @index += 1
7958
7675
  else
7959
7676
  terminal_parse_failure("X")
7960
7677
  r3 = nil
7961
7678
  end
7962
7679
  if r3
7963
- r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
7964
7680
  r1 = r3
7965
7681
  r1.extend(HybridCharacter0)
7966
7682
  else
@@ -7969,12 +7685,10 @@ module ScientificNameClean
7969
7685
  end
7970
7686
  end
7971
7687
  if r1
7972
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
7973
7688
  r0 = r1
7974
7689
  else
7975
7690
  r4 = _nt_multiplication_sign
7976
7691
  if r4
7977
- r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
7978
7692
  r0 = r4
7979
7693
  else
7980
7694
  @index = i0
@@ -7998,34 +7712,32 @@ module ScientificNameClean
7998
7712
  if node_cache[:multiplication_sign].has_key?(index)
7999
7713
  cached = node_cache[:multiplication_sign][index]
8000
7714
  if cached
8001
- node_cache[:multiplication_sign][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7715
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
8002
7716
  @index = cached.interval.end
8003
7717
  end
8004
7718
  return cached
8005
7719
  end
8006
7720
 
8007
7721
  i0 = index
8008
- if (match_len = has_terminal?("×", false, index))
8009
- r1 = true
8010
- @index += match_len
7722
+ if has_terminal?("×", false, index)
7723
+ r1 = instantiate_node(SyntaxNode,input, index...(index + 1))
7724
+ @index += 1
8011
7725
  else
8012
7726
  terminal_parse_failure("×")
8013
7727
  r1 = nil
8014
7728
  end
8015
7729
  if r1
8016
- r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
8017
7730
  r0 = r1
8018
7731
  r0.extend(MultiplicationSign0)
8019
7732
  else
8020
- if (match_len = has_terminal?("*", false, index))
8021
- r2 = true
8022
- @index += match_len
7733
+ if has_terminal?("*", false, index)
7734
+ r2 = instantiate_node(SyntaxNode,input, index...(index + 1))
7735
+ @index += 1
8023
7736
  else
8024
7737
  terminal_parse_failure("*")
8025
7738
  r2 = nil
8026
7739
  end
8027
7740
  if r2
8028
- r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
8029
7741
  r0 = r2
8030
7742
  r0.extend(MultiplicationSign0)
8031
7743
  else
@@ -8044,7 +7756,7 @@ module ScientificNameClean
8044
7756
  if node_cache[:space].has_key?(index)
8045
7757
  cached = node_cache[:space][index]
8046
7758
  if cached
8047
- node_cache[:space][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7759
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
8048
7760
  @index = cached.interval.end
8049
7761
  end
8050
7762
  return cached
@@ -8052,11 +7764,10 @@ module ScientificNameClean
8052
7764
 
8053
7765
  s0, i0 = [], index
8054
7766
  loop do
8055
- if has_terminal?(@regexps[gr = '\A[\\s]'] ||= Regexp.new(gr), :regexp, index)
7767
+ if has_terminal?('\G[\\s]', true, index)
8056
7768
  r1 = true
8057
7769
  @index += 1
8058
7770
  else
8059
- terminal_parse_failure('[\\s]')
8060
7771
  r1 = nil
8061
7772
  end
8062
7773
  if r1
@@ -8077,7 +7788,7 @@ module ScientificNameClean
8077
7788
  if node_cache[:space_hard].has_key?(index)
8078
7789
  cached = node_cache[:space_hard][index]
8079
7790
  if cached
8080
- node_cache[:space_hard][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
7791
+ cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
8081
7792
  @index = cached.interval.end
8082
7793
  end
8083
7794
  return cached
@@ -8085,11 +7796,10 @@ module ScientificNameClean
8085
7796
 
8086
7797
  s0, i0 = [], index
8087
7798
  loop do
8088
- if has_terminal?(@regexps[gr = '\A[\\s]'] ||= Regexp.new(gr), :regexp, index)
7799
+ if has_terminal?('\G[\\s]', true, index)
8089
7800
  r1 = true
8090
7801
  @index += 1
8091
7802
  else
8092
- terminal_parse_failure('[\\s]')
8093
7803
  r1 = nil
8094
7804
  end
8095
7805
  if r1