parameters: (str)
docstring: Pry off one value from STR. The value may be $hex, decimal, or "string".
  Return: (value, rest-of-STR)
docstring_summary: Pry off one value from STR. The value may be $hex, decimal, or "string".
  Return: (value, rest-of-STR)
docstring_tokens: Pry off one value from STR . The value may be $hex decimal or string . Return : ( value rest - of - STR )
function: def read_finale_value(str):
      """
  Pry off one value from STR. The value may be $hex, decimal, or "string".
  Return: (value, rest-of-STR)
      """
      while str and str[0] in ' \t\n':
          str = str[1:]
  
      if not str:
          return (None, str)
  
      if str[0] == '$':
          str = str[1:]
  
          hex = ''
          while str and str[0] in '0123456789ABCDEF':
              hex = hex + str[0]
              str = str[1:]
  
          return (int(hex, 16), str)
      elif str[0] == '"':
          str = str[1:]
          s = ''
          while str and str[0] != '"':
              s = s + str[0]
              str = str[1:]
  
          return (s, str)
      elif str[0] in '-0123456789':
          dec = ''
          while str and str[0] in '-0123456789':
              dec = dec + str[0]
              str = str[1:]
  
          return (int(dec), str)
      else:
          sys.stderr.write("cannot convert `%s'\n" % str)
          return (None, str)
function_tokens: def read_finale_value ( str ) : while str and str [ 0 ] in ' \t\n' : str = str [ 1 : ] if not str : return ( None , str ) if str [ 0 ] == '$' : str = str [ 1 : ] hex = '' while str and str [ 0 ] in '0123456789ABCDEF' : hex = hex + str [ 0 ] str = str [ 1 : ] return ( int ( hex , 16 ) , str ) elif str [ 0 ] == '"' : str = str [ 1 : ] s = '' while str and str [ 0 ] != '"' : s = s + str [ 0 ] str = str [ 1 : ] return ( s , str ) elif str [ 0 ] in '-0123456789' : dec = '' while str and str [ 0 ] in '-0123456789' : dec = dec + str [ 0 ] str = str [ 1 : ] return ( int ( dec ) , str ) else : sys . stderr . write ( "cannot convert `%s'\n" % str ) return ( None , str )