def parse_cost_term(source, cost):
 coeff = parse_count(source)
 ch = source.get()
 if (ch not in 'dis'):
  raise ParseError()
 if (ch in cost):
  raise error('repeated fuzzy cost', source.string, source.pos)
 cost[ch] = int((coeff or 1))

def parse_cost_term ( source , cost ) : coeff = parse_count ( source ) ch = source . get ( ) if ( ch not in 'dis' ) : raise ParseError ( ) if ( ch in cost ) : raise error ( 'repeated fuzzy cost' , source . string , source . pos ) cost [ ch ] = int ( ( coeff or 1 ) )
parses a cost equation term .