Sha256: 74b9682ec970d17821ad5d85c2d22cb5b03edcc967cde07fa5744fd8cda849bd
Contents?: true
Size: 1.8 KB
Versions: 7
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:subgenus 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:subgenus 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_epitheton 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
7 entries across 7 versions & 2 rubygems