def tokenize_attribute(iterable, attribute):
 sattr = attribute.strip()
 mattr = r_attribute.match(sattr)
 if mattr:
  atrv = mattr.group(1)
  if r_comattrval.match(atrv):
   (name, type) = tokenize_single_comma(atrv)
   next_item = next(iterable)
  elif r_wcomattrval.match(atrv):
   (name, type) = tokenize_single_wcomma(atrv)
   next_item = next(iterable)
  else:
   raise ValueError('multi line not supported yet')
 else:
  raise ValueError(('First line unparsable: %s' % sattr))
 if (type == 'relational'):
  raise ValueError('relational attributes not supported yet')
 return (name, type, next_item)

def tokenize_attribute ( iterable , attribute ) : sattr = attribute . strip ( ) mattr = r_attribute . match ( sattr ) if mattr : atrv = mattr . group ( 1 ) if r_comattrval . match ( atrv ) : ( name , type ) = tokenize_single_comma ( atrv ) next_item = next ( iterable ) elif r_wcomattrval . match ( atrv ) : ( name , type ) = tokenize_single_wcomma ( atrv ) next_item = next ( iterable ) else : raise ValueError ( 'multi line not supported yet' ) else : raise ValueError ( ( 'First line unparsable: %s' % sattr ) ) if ( type == 'relational' ) : raise ValueError ( 'relational attributes not supported yet' ) return ( name , type , next_item )
parse a raw string in header .