def describe_token_expr(expr):
 if (':' in expr):
  (type, value) = expr.split(':', 1)
  if (type == 'name'):
   return value
 else:
  type = expr
 return _describe_token_type(type)

def describe_token_expr ( expr ) : if ( ':' in expr ) : ( type , value ) = expr . split ( ':' , 1 ) if ( type == 'name' ) : return value else : type = expr return _describe_token_type ( type )
like describe_token but for token expressions .