def indicates_division(token):
 if (token.type == 'operator'):
  return (token.value in (')', ']', '}', '++', '--'))
 return (token.type in ('name', 'number', 'string', 'regexp'))

def indicates_division ( token ) : if ( token . type == 'operator' ) : return ( token . value in ( ')' , ']' , '}' , '++' , '--' ) ) return ( token . type in ( 'name' , 'number' , 'string' , 'regexp' ) )
a helper function that helps the tokenizer to decide if the current token may be followed by a division operator .