'Test and consume the next token if it matches toktype'

def _accept(self, toktype):

    if (self.nexttok and (self.nexttok.type == toktype)):
        self._advance()
        return True
    else:
        return False
