def METHOD_NAME(self, tokens):
    first_dfa = self._pgen_grammar.nonterminal_to_dfas[self._start_nonterminal][0]
    self.stack = Stack([StackNode(first_dfa)])
    for token in tokens:
        self._add_token(token)
    while True:
        tos = self.stack[-1]
        if not tos.dfa.is_final:
            # We never broke out -- EOF is too soon -- Unfinished statement.
            # However, the error recovery might have added the token again, if
            # the stack is empty, we're fine.
            raise InternalParseError(
                "incomplete input", token.type, token.string, token.start_pos
            )
        if len(self.stack) > 1:
            self._pop()
        else:
            return self.convert_node(tos.nonterminal, tos.nodes)