def find_program_variables(code):
 vars = {}
 lines = code.split('\n')
 for line in lines:
  m = re.match((('\\s*' + re_prog_var_declaration) + '\\s*(=|;)'), line)
  if (m is not None):
   (vtype, dtype, names) = m.groups()[:3]
   for name in names.split(','):
    vars[name.strip()] = (vtype, dtype)
 return vars

def find_program_variables ( code ) : vars = { } lines = code . split ( '\n' ) for line in lines : m = re . match ( ( ( '\\s*' + re_prog_var_declaration ) + '\\s*(=|;)' ) , line ) if ( m is not None ) : ( vtype , dtype , names ) = m . groups ( ) [ : 3 ] for name in names . split ( ',' ) : vars [ name . strip ( ) ] = ( vtype , dtype ) return vars
return a dict describing program variables:: {var_name: .