def _p_search(self):
        self._p_simple_string(' ')

        # If the next token is 'CHARSET' then we need to pull aside the
        # CHARSET. If not, we default the charset to 'us-ascii'
        #
        if self._p_simple_string('charset', silent = True):
            self._p_simple_string(' ')
            self.charset = self._p_astring().lower()
            self._p_simple_string(' ')
        else:
            self.charset = 'us-ascii'

        # If we get back a list search key's then this is really a bunch of
        # search keys with AND's between them.
        #
        self.search_key = IMAPSearch('and', search_key = \
                                     self._p_list_of(self._p_search_key))

    #######################################################################
    #
search ::= "SEARCH" SPACE ["CHARSET" SPACE astring SPACE]
dataset/ETHPy150Open scanner/asimap/asimap/parse.py/IMAPClientCommand._p_search