parameters: (ofile)
return_statement: return relation, attributes
docstring: Read the header of the iterable ofile.
docstring_summary: Read the header of the iterable ofile.
docstring_tokens: Read the header of the iterable ofile .
function: def read_header(ofile):
      """Read the header of the iterable ofile."""
      i = next(ofile)
  
      # Pass first comments
      while r_comment.match(i):
          i = next(ofile)
  
      # Header is everything up to DATA attribute ?
      relation = None
      attributes = []
      while not r_datameta.match(i):
          m = r_headerline.match(i)
          if m:
              isattr = r_attribute.match(i)
              if isattr:
                  name, type, i = tokenize_attribute(ofile, i)
                  attributes.append((name, type))
              else:
                  isrel = r_relation.match(i)
                  if isrel:
                      relation = isrel.group(1)
                  else:
                      raise ValueError("Error parsing line %s" % i)
                  i = next(ofile)
          else:
              i = next(ofile)
  
      return relation, attributes
function_tokens: def read_header ( ofile ) : i = next ( ofile ) # Pass first comments while r_comment . match ( i ) : i = next ( ofile ) # Header is everything up to DATA attribute ? relation = None attributes = [ ] while not r_datameta . match ( i ) : m = r_headerline . match ( i ) if m : isattr = r_attribute . match ( i ) if isattr : name , type , i = tokenize_attribute ( ofile , i ) attributes . append ( ( name , type ) ) else : isrel = r_relation . match ( i ) if isrel : relation = isrel . group ( 1 ) else : raise ValueError ( "Error parsing line %s" % i ) i = next ( ofile ) else : i = next ( ofile ) return relation , attributes