parameters: (f, value_string)
docstring: Checks that value-string is a valid value-string for the given feature.
docstring_summary: Checks that value-string is a valid value-string for the given feature.
docstring_tokens: Checks that value - string is a valid value - string for the given feature .
function: def validate_value_string (f, value_string):
      """ Checks that value-string is a valid value-string for the given feature.
      """
      if f.free() or value_string in f.values():
          return
  
      values = [value_string]
  
      if f.subfeatures():
          if not value_string in f.values() and \
                 not value_string in f.subfeatures():
              values = value_string.split('-')
  
      # An empty value is allowed for optional features
      if not values[0] in f.values() and \
             (values[0] or not f.optional()):
          raise InvalidValue ("'%s' is not a known value of feature '%s'\nlegal values: '%s'" % (values [0], feature, f.values()))
  
      for v in values [1:]:
          # this will validate any subfeature values in value-string
          implied_subfeature(f, v, values[0])
function_tokens: def validate_value_string ( f , value_string ) : if f . free ( ) or value_string in f . values ( ) : return values = [ value_string ] if f . subfeatures ( ) : if not value_string in f . values ( ) and not value_string in f . subfeatures ( ) : values = value_string . split ( '-' ) # An empty value is allowed for optional features if not values [ 0 ] in f . values ( ) and ( values [ 0 ] or not f . optional ( ) ) : raise InvalidValue ( "'%s' is not a known value of feature '%s'\nlegal values: '%s'" % ( values [ 0 ] , feature , f . values ( ) ) ) for v in values [ 1 : ] : # this will validate any subfeature values in value-string implied_subfeature ( f , v , values [ 0 ] )