Sha256: 2fa12ee3a683534da12e444be34a67dc0e4b84b9c656ff313596a178344d0797
Contents?: true
Size: 1.8 KB
Versions: 2
Compression:
Stored size: 1.8 KB
Contents
# encoding: UTF-8 grammar ScientificNameCanonical include ScientificNameClean include ScientificNameDirty rule root multinomial_with_garbage { def hybrid false end def details [super] end } / uninomial_with_garbage { def hybrid false end def details [super] end } end rule multinomial_with_garbage a:genus space b:infragenus space c:species garbage { def value a.value + " " + b.value + " " + c.value end def canonical a.canonical + " " + b.canonical + " " + c.canonical end def pos a.pos.merge(b.pos).merge(c.pos) end def details a.details.merge(b.details).merge(c.details) end } / a:genus space b:infragenus garbage { def value a.value + " " + b.value end def canonical a.canonical + " " + b.canonical end def pos a.pos.merge(b.pos) end def details a.details.merge(b.details) end } / a:genus space b:species garbage { def value a.value + " " + b.value end def canonical a.canonical + " " + b.canonical end def pos a.pos.merge(b.pos) end def details a.details.merge(b.details) end } end rule uninomial_with_garbage a:uninomial_string b:garbage { def value a.value end def canonical a.canonical end def pos a.pos end def details {:uninomial => a.details[:uninomial]} end } end rule garbage space (["',.]) space [^щ]* / space_hard [^ш]+ end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
biodiversity19-0.5.15 | lib/biodiversity/parser/scientific_name_canonical.treetop |
biodiversity-0.5.15 | lib/biodiversity/parser/scientific_name_canonical.treetop |