Next / Previous / Contents / Shipman's homepage

21. class NonSpTail: Scanner for the non-species tail

The purpose of this class is to handle the scanning logic of the tail part of a standard forms line for a taxon that is a higher rank than genus. Here is the class interface.

# - - - - -   c l a s s   N o n S p T a i l

class NonSpTail(object):
    '''Parses the tail section of a higher-taxon standard forms line.

        NonSpTail ( scan ):
          [ scan is a Scan instance ->
              if the balance of the line in scan is a valid
              higher-taxon tail ->
                scan  :=  scan advanced to end of line
                return a new NonSpTail instance representing the
                fields of that line
              else ->
                scan  :=  scan advanced not past end of line
                Log()  +:=  error message(s)
                raise SyntaxError ]
        .sci:     [ scientific name field ]
        .eng:     [ English name field ]