def _process_match(rule, syms):
 subs = {}
 varlist = rule._varlist
 if (not (len(varlist) == len(syms))):
  raise RuntimeError("length of varlist doesn't match length of syms.")
 for (v, s) in zip(varlist, syms):
  if ((v in subs) and (subs[v] != s)):
   return None
  else:
   subs[v] = s
 return subs

def _process_match ( rule , syms ) : subs = { } varlist = rule . _varlist if ( not ( len ( varlist ) == len ( syms ) ) ) : raise RuntimeError ( "length of varlist doesn't match length of syms." ) for ( v , s ) in zip ( varlist , syms ) : if ( ( v in subs ) and ( subs [ v ] != s ) ) : return None else : subs [ v ] = s return subs
process a match to determine if it is correct .