(self, tokens)
Process a list of tokens into an AST.

        This method must be single-threaded. To process multiple
        tokens in multiple threads, use one Parser instance per
        thread.

        Args:
          tokens: An iterable of lexer.Token objects. All tokens will
            be loaded into memory for processing.

        Raises:
          ParserError: Some pattern of tokens did not match the grammar.
Process a list of tokens into an AST.
Process a list of tokens into an AST .
def process_tokens(self, tokens):
        """Process a list of tokens into an AST.

        This method must be single-threaded. To process multiple
        tokens in multiple threads, use one Parser instance per
        thread.

        Args:
          tokens: An iterable of lexer.Token objects. All tokens will
            be loaded into memory for processing.

        Raises:
          ParserError: Some pattern of tokens did not match the grammar.
        """
        self._tokens = list(tokens)
        self._pos = 0
        self._ast = self._assert(self._chunk(), 'input to be a program')
        self._ast.store_token_groups(self._tokens)
def process_tokens ( self , tokens ) : self . _tokens = list ( tokens ) self . _pos = 0 self . _ast = self . _assert ( self . _chunk ( ) , 'input to be a program' ) self . _ast . store_token_groups ( self . _tokens )