dimus-biodiversity 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/biodiversity.rb +0 -2
- data/lib/biodiversity/parser.rb +4 -7
- data/lib/biodiversity/parser/scientific_name_canonical.rb +22 -0
- data/lib/biodiversity/parser/scientific_name_canonical.treetop +18 -2
- data/lib/biodiversity/parser/scientific_name_clean.rb +139 -60
- data/lib/biodiversity/parser/scientific_name_clean.treetop +85 -9
- data/spec/parser/scientific_name.spec.rb +15 -5
- data/spec/parser/scientific_name_canonical.spec.rb +6 -5
- data/spec/parser/scientific_name_clean.spec.rb +79 -73
- data/spec/parser/scientific_name_dirty.spec.rb +13 -13
- metadata +1 -1
data/lib/biodiversity.rb
CHANGED
data/lib/biodiversity/parser.rb
CHANGED
|
@@ -23,17 +23,14 @@ class ScientificNameParser
|
|
|
23
23
|
parsed = self.class != Hash
|
|
24
24
|
res = {:parsed => parsed}
|
|
25
25
|
if parsed
|
|
26
|
+
hybrid = self.hybrid rescue false
|
|
26
27
|
res.merge!({
|
|
27
28
|
:verbatim => self.text_value,
|
|
28
29
|
:normalized => self.value,
|
|
29
|
-
:canonical => self.canonical
|
|
30
|
+
:canonical => self.canonical,
|
|
31
|
+
:hybrid => hybrid,
|
|
32
|
+
:details => self.details
|
|
30
33
|
})
|
|
31
|
-
data = self.details
|
|
32
|
-
if data[:species] && data[:species][:namedHybrid]
|
|
33
|
-
data[:species].delete(:namedHybrid)
|
|
34
|
-
data = {:namedHybrid => data}
|
|
35
|
-
end
|
|
36
|
-
res.merge!(data)
|
|
37
34
|
else
|
|
38
35
|
res.merge!(self)
|
|
39
36
|
end
|
|
@@ -10,6 +10,26 @@ module ScientificNameCanonical
|
|
|
10
10
|
|
|
11
11
|
include ScientificNameDirty
|
|
12
12
|
|
|
13
|
+
module Root0
|
|
14
|
+
def hybrid
|
|
15
|
+
false
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def details
|
|
19
|
+
[super]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
module Root1
|
|
24
|
+
def hybrid
|
|
25
|
+
false
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def details
|
|
29
|
+
[super]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
13
33
|
def _nt_root
|
|
14
34
|
start_index = index
|
|
15
35
|
if node_cache[:root].has_key?(index)
|
|
@@ -20,10 +40,12 @@ module ScientificNameCanonical
|
|
|
20
40
|
|
|
21
41
|
i0 = index
|
|
22
42
|
r1 = _nt_multinomial_with_garbage
|
|
43
|
+
r1.extend(Root0)
|
|
23
44
|
if r1
|
|
24
45
|
r0 = r1
|
|
25
46
|
else
|
|
26
47
|
r2 = _nt_uninomial_with_garbage
|
|
48
|
+
r2.extend(Root1)
|
|
27
49
|
if r2
|
|
28
50
|
r0 = r2
|
|
29
51
|
else
|
|
@@ -4,9 +4,25 @@ grammar ScientificNameCanonical
|
|
|
4
4
|
include ScientificNameDirty
|
|
5
5
|
|
|
6
6
|
rule root
|
|
7
|
-
multinomial_with_garbage
|
|
7
|
+
multinomial_with_garbage {
|
|
8
|
+
def hybrid
|
|
9
|
+
false
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def details
|
|
13
|
+
[super]
|
|
14
|
+
end
|
|
15
|
+
}
|
|
8
16
|
/
|
|
9
|
-
uninomial_with_garbage
|
|
17
|
+
uninomial_with_garbage {
|
|
18
|
+
def hybrid
|
|
19
|
+
false
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def details
|
|
23
|
+
[super]
|
|
24
|
+
end
|
|
25
|
+
}
|
|
10
26
|
end
|
|
11
27
|
|
|
12
28
|
rule multinomial_with_garbage
|
|
@@ -33,8 +33,12 @@ module ScientificNameClean
|
|
|
33
33
|
a.pos
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def hybrid
|
|
37
|
+
a.hybrid
|
|
38
|
+
end
|
|
39
|
+
|
|
36
40
|
def details
|
|
37
|
-
a.details
|
|
41
|
+
a.details.class == Array ? a.details : [a.details]
|
|
38
42
|
end
|
|
39
43
|
end
|
|
40
44
|
|
|
@@ -105,7 +109,11 @@ module ScientificNameClean
|
|
|
105
109
|
def pos
|
|
106
110
|
a.pos.merge(c.pos)
|
|
107
111
|
end
|
|
108
|
-
|
|
112
|
+
|
|
113
|
+
def hybrid
|
|
114
|
+
a.hybrid
|
|
115
|
+
end
|
|
116
|
+
|
|
109
117
|
def details
|
|
110
118
|
a.details.merge(b.details(c))
|
|
111
119
|
end
|
|
@@ -199,8 +207,12 @@ module ScientificNameClean
|
|
|
199
207
|
a.pos.merge(b.pos)
|
|
200
208
|
end
|
|
201
209
|
|
|
210
|
+
def hybrid
|
|
211
|
+
true
|
|
212
|
+
end
|
|
213
|
+
|
|
202
214
|
def details
|
|
203
|
-
|
|
215
|
+
[a.details, b.details]
|
|
204
216
|
end
|
|
205
217
|
end
|
|
206
218
|
|
|
@@ -236,8 +248,12 @@ module ScientificNameClean
|
|
|
236
248
|
a.pos
|
|
237
249
|
end
|
|
238
250
|
|
|
251
|
+
def hybrid
|
|
252
|
+
true
|
|
253
|
+
end
|
|
254
|
+
|
|
239
255
|
def details
|
|
240
|
-
|
|
256
|
+
[a.details, "?"]
|
|
241
257
|
end
|
|
242
258
|
end
|
|
243
259
|
|
|
@@ -362,8 +378,12 @@ module ScientificNameClean
|
|
|
362
378
|
b.pos
|
|
363
379
|
end
|
|
364
380
|
|
|
381
|
+
def hybrid
|
|
382
|
+
true
|
|
383
|
+
end
|
|
384
|
+
|
|
365
385
|
def details
|
|
366
|
-
|
|
386
|
+
b.details
|
|
367
387
|
end
|
|
368
388
|
end
|
|
369
389
|
|
|
@@ -439,6 +459,10 @@ module ScientificNameClean
|
|
|
439
459
|
a.pos
|
|
440
460
|
end
|
|
441
461
|
|
|
462
|
+
def hybrid
|
|
463
|
+
a.hybrid rescue false
|
|
464
|
+
end
|
|
465
|
+
|
|
442
466
|
def details
|
|
443
467
|
a.details.merge(b.details)
|
|
444
468
|
end
|
|
@@ -680,6 +704,10 @@ module ScientificNameClean
|
|
|
680
704
|
def pos
|
|
681
705
|
a.pos.merge(b.pos).merge(c.pos).merge(d.pos)
|
|
682
706
|
end
|
|
707
|
+
|
|
708
|
+
def hybrid
|
|
709
|
+
c.hybrid rescue false
|
|
710
|
+
end
|
|
683
711
|
|
|
684
712
|
def details
|
|
685
713
|
a.details.merge(b.details).merge(c.details).merge(d.details)
|
|
@@ -725,6 +753,10 @@ module ScientificNameClean
|
|
|
725
753
|
a.pos.merge(b.pos).merge(c.pos)
|
|
726
754
|
end
|
|
727
755
|
|
|
756
|
+
def hybrid
|
|
757
|
+
c.hybrid rescue false
|
|
758
|
+
end
|
|
759
|
+
|
|
728
760
|
def details
|
|
729
761
|
a.details.merge(b.details).merge(c.details)
|
|
730
762
|
end
|
|
@@ -768,6 +800,10 @@ module ScientificNameClean
|
|
|
768
800
|
def pos
|
|
769
801
|
a.pos.merge(b.pos).merge(c.pos)
|
|
770
802
|
end
|
|
803
|
+
|
|
804
|
+
def hybrid
|
|
805
|
+
b.hybrid rescue false
|
|
806
|
+
end
|
|
771
807
|
|
|
772
808
|
def details
|
|
773
809
|
a.details.merge(b.details).merge(c.details)
|
|
@@ -805,6 +841,10 @@ module ScientificNameClean
|
|
|
805
841
|
a.pos.merge(b.pos)
|
|
806
842
|
end
|
|
807
843
|
|
|
844
|
+
def hybrid
|
|
845
|
+
b.hybrid rescue false
|
|
846
|
+
end
|
|
847
|
+
|
|
808
848
|
def details
|
|
809
849
|
a.details.merge(b.details)
|
|
810
850
|
end
|
|
@@ -1037,6 +1077,12 @@ module ScientificNameClean
|
|
|
1037
1077
|
end
|
|
1038
1078
|
end
|
|
1039
1079
|
|
|
1080
|
+
module InfraspeciesMult2
|
|
1081
|
+
def details
|
|
1082
|
+
{:infraspecies => [super[:infraspecies]]}
|
|
1083
|
+
end
|
|
1084
|
+
end
|
|
1085
|
+
|
|
1040
1086
|
def _nt_infraspecies_mult
|
|
1041
1087
|
start_index = index
|
|
1042
1088
|
if node_cache[:infraspecies_mult].has_key?(index)
|
|
@@ -1069,6 +1115,7 @@ module ScientificNameClean
|
|
|
1069
1115
|
r0 = r1
|
|
1070
1116
|
else
|
|
1071
1117
|
r5 = _nt_infraspecies
|
|
1118
|
+
r5.extend(InfraspeciesMult2)
|
|
1072
1119
|
if r5
|
|
1073
1120
|
r0 = r5
|
|
1074
1121
|
else
|
|
@@ -1544,8 +1591,8 @@ module ScientificNameClean
|
|
|
1544
1591
|
r1.extend(Rank0)
|
|
1545
1592
|
else
|
|
1546
1593
|
if input.index("α", index) == index
|
|
1547
|
-
r18 = instantiate_node(SyntaxNode,input, index...(index +
|
|
1548
|
-
@index +=
|
|
1594
|
+
r18 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
1595
|
+
@index += 2
|
|
1549
1596
|
else
|
|
1550
1597
|
terminal_parse_failure("α")
|
|
1551
1598
|
r18 = nil
|
|
@@ -1555,8 +1602,8 @@ module ScientificNameClean
|
|
|
1555
1602
|
r1.extend(Rank0)
|
|
1556
1603
|
else
|
|
1557
1604
|
if input.index("ββ", index) == index
|
|
1558
|
-
r19 = instantiate_node(SyntaxNode,input, index...(index +
|
|
1559
|
-
@index +=
|
|
1605
|
+
r19 = instantiate_node(SyntaxNode,input, index...(index + 4))
|
|
1606
|
+
@index += 4
|
|
1560
1607
|
else
|
|
1561
1608
|
terminal_parse_failure("ββ")
|
|
1562
1609
|
r19 = nil
|
|
@@ -1566,8 +1613,8 @@ module ScientificNameClean
|
|
|
1566
1613
|
r1.extend(Rank0)
|
|
1567
1614
|
else
|
|
1568
1615
|
if input.index("β", index) == index
|
|
1569
|
-
r20 = instantiate_node(SyntaxNode,input, index...(index +
|
|
1570
|
-
@index +=
|
|
1616
|
+
r20 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
1617
|
+
@index += 2
|
|
1571
1618
|
else
|
|
1572
1619
|
terminal_parse_failure("β")
|
|
1573
1620
|
r20 = nil
|
|
@@ -1577,8 +1624,8 @@ module ScientificNameClean
|
|
|
1577
1624
|
r1.extend(Rank0)
|
|
1578
1625
|
else
|
|
1579
1626
|
if input.index("γ", index) == index
|
|
1580
|
-
r21 = instantiate_node(SyntaxNode,input, index...(index +
|
|
1581
|
-
@index +=
|
|
1627
|
+
r21 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
1628
|
+
@index += 2
|
|
1582
1629
|
else
|
|
1583
1630
|
terminal_parse_failure("γ")
|
|
1584
1631
|
r21 = nil
|
|
@@ -1588,8 +1635,8 @@ module ScientificNameClean
|
|
|
1588
1635
|
r1.extend(Rank0)
|
|
1589
1636
|
else
|
|
1590
1637
|
if input.index("δ", index) == index
|
|
1591
|
-
r22 = instantiate_node(SyntaxNode,input, index...(index +
|
|
1592
|
-
@index +=
|
|
1638
|
+
r22 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
1639
|
+
@index += 2
|
|
1593
1640
|
else
|
|
1594
1641
|
terminal_parse_failure("δ")
|
|
1595
1642
|
r22 = nil
|
|
@@ -1599,8 +1646,8 @@ module ScientificNameClean
|
|
|
1599
1646
|
r1.extend(Rank0)
|
|
1600
1647
|
else
|
|
1601
1648
|
if input.index("ε", index) == index
|
|
1602
|
-
r23 = instantiate_node(SyntaxNode,input, index...(index +
|
|
1603
|
-
@index +=
|
|
1649
|
+
r23 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
1650
|
+
@index += 2
|
|
1604
1651
|
else
|
|
1605
1652
|
terminal_parse_failure("ε")
|
|
1606
1653
|
r23 = nil
|
|
@@ -1610,8 +1657,8 @@ module ScientificNameClean
|
|
|
1610
1657
|
r1.extend(Rank0)
|
|
1611
1658
|
else
|
|
1612
1659
|
if input.index("φ", index) == index
|
|
1613
|
-
r24 = instantiate_node(SyntaxNode,input, index...(index +
|
|
1614
|
-
@index +=
|
|
1660
|
+
r24 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
1661
|
+
@index += 2
|
|
1615
1662
|
else
|
|
1616
1663
|
terminal_parse_failure("φ")
|
|
1617
1664
|
r24 = nil
|
|
@@ -1621,8 +1668,8 @@ module ScientificNameClean
|
|
|
1621
1668
|
r1.extend(Rank0)
|
|
1622
1669
|
else
|
|
1623
1670
|
if input.index("θ", index) == index
|
|
1624
|
-
r25 = instantiate_node(SyntaxNode,input, index...(index +
|
|
1625
|
-
@index +=
|
|
1671
|
+
r25 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
1672
|
+
@index += 2
|
|
1626
1673
|
else
|
|
1627
1674
|
terminal_parse_failure("θ")
|
|
1628
1675
|
r25 = nil
|
|
@@ -1632,8 +1679,8 @@ module ScientificNameClean
|
|
|
1632
1679
|
r1.extend(Rank0)
|
|
1633
1680
|
else
|
|
1634
1681
|
if input.index("μ", index) == index
|
|
1635
|
-
r26 = instantiate_node(SyntaxNode,input, index...(index +
|
|
1636
|
-
@index +=
|
|
1682
|
+
r26 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
1683
|
+
@index += 2
|
|
1637
1684
|
else
|
|
1638
1685
|
terminal_parse_failure("μ")
|
|
1639
1686
|
r26 = nil
|
|
@@ -1909,6 +1956,10 @@ module ScientificNameClean
|
|
|
1909
1956
|
a.canonical
|
|
1910
1957
|
end
|
|
1911
1958
|
|
|
1959
|
+
def hybrid
|
|
1960
|
+
a.hybrid rescue false
|
|
1961
|
+
end
|
|
1962
|
+
|
|
1912
1963
|
def pos
|
|
1913
1964
|
a.pos.merge(b.pos)
|
|
1914
1965
|
end
|
|
@@ -1992,6 +2043,10 @@ module ScientificNameClean
|
|
|
1992
2043
|
def canonical
|
|
1993
2044
|
a.value
|
|
1994
2045
|
end
|
|
2046
|
+
|
|
2047
|
+
def hybrid
|
|
2048
|
+
a.hybrid rescue false
|
|
2049
|
+
end
|
|
1995
2050
|
|
|
1996
2051
|
def pos
|
|
1997
2052
|
{a.interval.begin => ['species', a.interval.end]}
|
|
@@ -2011,6 +2066,10 @@ module ScientificNameClean
|
|
|
2011
2066
|
{interval.begin => ['species', interval.end]}
|
|
2012
2067
|
end
|
|
2013
2068
|
|
|
2069
|
+
def hybrid
|
|
2070
|
+
false
|
|
2071
|
+
end
|
|
2072
|
+
|
|
2014
2073
|
def details
|
|
2015
2074
|
{:species => {:epitheton => value}}
|
|
2016
2075
|
end
|
|
@@ -2295,6 +2354,10 @@ module ScientificNameClean
|
|
|
2295
2354
|
a.pos.merge(b.pos)
|
|
2296
2355
|
end
|
|
2297
2356
|
|
|
2357
|
+
def hybrid
|
|
2358
|
+
false
|
|
2359
|
+
end
|
|
2360
|
+
|
|
2298
2361
|
def details
|
|
2299
2362
|
{:uninomial => a.details[:uninomial].merge(b.details)}
|
|
2300
2363
|
end
|
|
@@ -2354,6 +2417,10 @@ module ScientificNameClean
|
|
|
2354
2417
|
{interval.begin => ['uninomial', interval.end]}
|
|
2355
2418
|
end
|
|
2356
2419
|
|
|
2420
|
+
def hybrid
|
|
2421
|
+
false
|
|
2422
|
+
end
|
|
2423
|
+
|
|
2357
2424
|
def details
|
|
2358
2425
|
{:uninomial => {:epitheton => value}}
|
|
2359
2426
|
end
|
|
@@ -3932,8 +3999,8 @@ module ScientificNameClean
|
|
|
3932
3999
|
i6, s6 = index, []
|
|
3933
4000
|
i7 = index
|
|
3934
4001
|
if input.index("Å", index) == index
|
|
3935
|
-
r8 = instantiate_node(SyntaxNode,input, index...(index +
|
|
3936
|
-
@index +=
|
|
4002
|
+
r8 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4003
|
+
@index += 2
|
|
3937
4004
|
else
|
|
3938
4005
|
terminal_parse_failure("Å")
|
|
3939
4006
|
r8 = nil
|
|
@@ -3942,8 +4009,8 @@ module ScientificNameClean
|
|
|
3942
4009
|
r7 = r8
|
|
3943
4010
|
else
|
|
3944
4011
|
if input.index("Ö", index) == index
|
|
3945
|
-
r9 = instantiate_node(SyntaxNode,input, index...(index +
|
|
3946
|
-
@index +=
|
|
4012
|
+
r9 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4013
|
+
@index += 2
|
|
3947
4014
|
else
|
|
3948
4015
|
terminal_parse_failure("Ö")
|
|
3949
4016
|
r9 = nil
|
|
@@ -3952,8 +4019,8 @@ module ScientificNameClean
|
|
|
3952
4019
|
r7 = r9
|
|
3953
4020
|
else
|
|
3954
4021
|
if input.index("Á", index) == index
|
|
3955
|
-
r10 = instantiate_node(SyntaxNode,input, index...(index +
|
|
3956
|
-
@index +=
|
|
4022
|
+
r10 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4023
|
+
@index += 2
|
|
3957
4024
|
else
|
|
3958
4025
|
terminal_parse_failure("Á")
|
|
3959
4026
|
r10 = nil
|
|
@@ -3962,8 +4029,8 @@ module ScientificNameClean
|
|
|
3962
4029
|
r7 = r10
|
|
3963
4030
|
else
|
|
3964
4031
|
if input.index("Ø", index) == index
|
|
3965
|
-
r11 = instantiate_node(SyntaxNode,input, index...(index +
|
|
3966
|
-
@index +=
|
|
4032
|
+
r11 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4033
|
+
@index += 2
|
|
3967
4034
|
else
|
|
3968
4035
|
terminal_parse_failure("Ø")
|
|
3969
4036
|
r11 = nil
|
|
@@ -3972,8 +4039,8 @@ module ScientificNameClean
|
|
|
3972
4039
|
r7 = r11
|
|
3973
4040
|
else
|
|
3974
4041
|
if input.index("Ô", index) == index
|
|
3975
|
-
r12 = instantiate_node(SyntaxNode,input, index...(index +
|
|
3976
|
-
@index +=
|
|
4042
|
+
r12 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4043
|
+
@index += 2
|
|
3977
4044
|
else
|
|
3978
4045
|
terminal_parse_failure("Ô")
|
|
3979
4046
|
r12 = nil
|
|
@@ -3982,8 +4049,8 @@ module ScientificNameClean
|
|
|
3982
4049
|
r7 = r12
|
|
3983
4050
|
else
|
|
3984
4051
|
if input.index("Š", index) == index
|
|
3985
|
-
r13 = instantiate_node(SyntaxNode,input, index...(index +
|
|
3986
|
-
@index +=
|
|
4052
|
+
r13 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4053
|
+
@index += 2
|
|
3987
4054
|
else
|
|
3988
4055
|
terminal_parse_failure("Š")
|
|
3989
4056
|
r13 = nil
|
|
@@ -3992,8 +4059,8 @@ module ScientificNameClean
|
|
|
3992
4059
|
r7 = r13
|
|
3993
4060
|
else
|
|
3994
4061
|
if input.index("Ś", index) == index
|
|
3995
|
-
r14 = instantiate_node(SyntaxNode,input, index...(index +
|
|
3996
|
-
@index +=
|
|
4062
|
+
r14 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4063
|
+
@index += 2
|
|
3997
4064
|
else
|
|
3998
4065
|
terminal_parse_failure("Ś")
|
|
3999
4066
|
r14 = nil
|
|
@@ -4002,8 +4069,8 @@ module ScientificNameClean
|
|
|
4002
4069
|
r7 = r14
|
|
4003
4070
|
else
|
|
4004
4071
|
if input.index("Č", index) == index
|
|
4005
|
-
r15 = instantiate_node(SyntaxNode,input, index...(index +
|
|
4006
|
-
@index +=
|
|
4072
|
+
r15 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4073
|
+
@index += 2
|
|
4007
4074
|
else
|
|
4008
4075
|
terminal_parse_failure("Č")
|
|
4009
4076
|
r15 = nil
|
|
@@ -4012,8 +4079,8 @@ module ScientificNameClean
|
|
|
4012
4079
|
r7 = r15
|
|
4013
4080
|
else
|
|
4014
4081
|
if input.index("Ķ", index) == index
|
|
4015
|
-
r16 = instantiate_node(SyntaxNode,input, index...(index +
|
|
4016
|
-
@index +=
|
|
4082
|
+
r16 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4083
|
+
@index += 2
|
|
4017
4084
|
else
|
|
4018
4085
|
terminal_parse_failure("Ķ")
|
|
4019
4086
|
r16 = nil
|
|
@@ -4022,8 +4089,8 @@ module ScientificNameClean
|
|
|
4022
4089
|
r7 = r16
|
|
4023
4090
|
else
|
|
4024
4091
|
if input.index("Ł", index) == index
|
|
4025
|
-
r17 = instantiate_node(SyntaxNode,input, index...(index +
|
|
4026
|
-
@index +=
|
|
4092
|
+
r17 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4093
|
+
@index += 2
|
|
4027
4094
|
else
|
|
4028
4095
|
terminal_parse_failure("Ł")
|
|
4029
4096
|
r17 = nil
|
|
@@ -4032,8 +4099,8 @@ module ScientificNameClean
|
|
|
4032
4099
|
r7 = r17
|
|
4033
4100
|
else
|
|
4034
4101
|
if input.index("É", index) == index
|
|
4035
|
-
r18 = instantiate_node(SyntaxNode,input, index...(index +
|
|
4036
|
-
@index +=
|
|
4102
|
+
r18 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4103
|
+
@index += 2
|
|
4037
4104
|
else
|
|
4038
4105
|
terminal_parse_failure("É")
|
|
4039
4106
|
r18 = nil
|
|
@@ -4042,8 +4109,8 @@ module ScientificNameClean
|
|
|
4042
4109
|
r7 = r18
|
|
4043
4110
|
else
|
|
4044
4111
|
if input.index("Ž", index) == index
|
|
4045
|
-
r19 = instantiate_node(SyntaxNode,input, index...(index +
|
|
4046
|
-
@index +=
|
|
4112
|
+
r19 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
4113
|
+
@index += 2
|
|
4047
4114
|
else
|
|
4048
4115
|
terminal_parse_failure("Ž")
|
|
4049
4116
|
r19 = nil
|
|
@@ -4785,12 +4852,16 @@ module ScientificNameClean
|
|
|
4785
4852
|
b.value
|
|
4786
4853
|
end
|
|
4787
4854
|
|
|
4855
|
+
def hybrid
|
|
4856
|
+
true
|
|
4857
|
+
end
|
|
4858
|
+
|
|
4788
4859
|
def pos
|
|
4789
4860
|
{b.interval.begin => ['species', b.interval.end]}
|
|
4790
4861
|
end
|
|
4791
4862
|
|
|
4792
4863
|
def details
|
|
4793
|
-
{:species => {:epitheton => b.value
|
|
4864
|
+
{:species => {:epitheton => b.value}}
|
|
4794
4865
|
end
|
|
4795
4866
|
end
|
|
4796
4867
|
|
|
@@ -4817,12 +4888,16 @@ module ScientificNameClean
|
|
|
4817
4888
|
b.value
|
|
4818
4889
|
end
|
|
4819
4890
|
|
|
4891
|
+
def hybrid
|
|
4892
|
+
true
|
|
4893
|
+
end
|
|
4894
|
+
|
|
4820
4895
|
def pos
|
|
4821
4896
|
{b.interval.begin => ['species', b.interval.end]}
|
|
4822
4897
|
end
|
|
4823
4898
|
|
|
4824
4899
|
def details
|
|
4825
|
-
{:species => {:epitheton => b.value
|
|
4900
|
+
{:species => {:epitheton => b.value}}
|
|
4826
4901
|
end
|
|
4827
4902
|
end
|
|
4828
4903
|
|
|
@@ -4849,12 +4924,16 @@ module ScientificNameClean
|
|
|
4849
4924
|
b.value
|
|
4850
4925
|
end
|
|
4851
4926
|
|
|
4927
|
+
def hybrid
|
|
4928
|
+
true
|
|
4929
|
+
end
|
|
4930
|
+
|
|
4852
4931
|
def pos
|
|
4853
4932
|
{b.interval.begin => ['species', b.interval.end]}
|
|
4854
4933
|
end
|
|
4855
4934
|
|
|
4856
4935
|
def details
|
|
4857
|
-
{:species => {:epitheton => b.value
|
|
4936
|
+
{:species => {:epitheton => b.value}}
|
|
4858
4937
|
end
|
|
4859
4938
|
end
|
|
4860
4939
|
|
|
@@ -5375,9 +5454,9 @@ module ScientificNameClean
|
|
|
5375
5454
|
|
|
5376
5455
|
i0 = index
|
|
5377
5456
|
if input.index("Æ", index) == index
|
|
5378
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
|
5457
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
5379
5458
|
r1.extend(CapDigraph0)
|
|
5380
|
-
@index +=
|
|
5459
|
+
@index += 2
|
|
5381
5460
|
else
|
|
5382
5461
|
terminal_parse_failure("Æ")
|
|
5383
5462
|
r1 = nil
|
|
@@ -5386,9 +5465,9 @@ module ScientificNameClean
|
|
|
5386
5465
|
r0 = r1
|
|
5387
5466
|
else
|
|
5388
5467
|
if input.index("Œ", index) == index
|
|
5389
|
-
r2 = instantiate_node(SyntaxNode,input, index...(index +
|
|
5468
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
5390
5469
|
r2.extend(CapDigraph1)
|
|
5391
|
-
@index +=
|
|
5470
|
+
@index += 2
|
|
5392
5471
|
else
|
|
5393
5472
|
terminal_parse_failure("Œ")
|
|
5394
5473
|
r2 = nil
|
|
@@ -5428,9 +5507,9 @@ module ScientificNameClean
|
|
|
5428
5507
|
|
|
5429
5508
|
i0 = index
|
|
5430
5509
|
if input.index("æ", index) == index
|
|
5431
|
-
r1 = instantiate_node(SyntaxNode,input, index...(index +
|
|
5510
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
5432
5511
|
r1.extend(Digraph0)
|
|
5433
|
-
@index +=
|
|
5512
|
+
@index += 2
|
|
5434
5513
|
else
|
|
5435
5514
|
terminal_parse_failure("æ")
|
|
5436
5515
|
r1 = nil
|
|
@@ -5439,9 +5518,9 @@ module ScientificNameClean
|
|
|
5439
5518
|
r0 = r1
|
|
5440
5519
|
else
|
|
5441
5520
|
if input.index("œ", index) == index
|
|
5442
|
-
r2 = instantiate_node(SyntaxNode,input, index...(index +
|
|
5521
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
5443
5522
|
r2.extend(Digraph1)
|
|
5444
|
-
@index +=
|
|
5523
|
+
@index += 2
|
|
5445
5524
|
else
|
|
5446
5525
|
terminal_parse_failure("œ")
|
|
5447
5526
|
r2 = nil
|
|
@@ -5829,9 +5908,9 @@ module ScientificNameClean
|
|
|
5829
5908
|
end
|
|
5830
5909
|
|
|
5831
5910
|
if input.index("×", index) == index
|
|
5832
|
-
r0 = instantiate_node(SyntaxNode,input, index...(index +
|
|
5911
|
+
r0 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
|
5833
5912
|
r0.extend(MultiplicationSign0)
|
|
5834
|
-
@index +=
|
|
5913
|
+
@index += 2
|
|
5835
5914
|
else
|
|
5836
5915
|
terminal_parse_failure("×")
|
|
5837
5916
|
r0 = nil
|