def METHOD_NAME(self, type, token, start, end, line,
            NEWLINE=tokenize.NEWLINE,
            JUNK=(tokenize.COMMENT, tokenize.NL),
            OP=tokenize.OP,
            NAME=tokenize.NAME):
    state = self.state
    if type in JUNK:
        pass
    elif state is FIND_DOT:
        if type is OP and token == ".":
            state = FIND_APPEND
    elif state is FIND_APPEND:
        if type is NAME and token == "append":
            self.line = line
            self.lineno = start[0]
            state = FIND_LPAREN
        else:
            state = FIND_DOT
    elif state is FIND_LPAREN:
        if type is OP and token == "(":
            self.level = 1
            state = FIND_COMMA
        else:
            state = FIND_DOT
    elif state is FIND_COMMA:
        if type is OP:
            if token in ("(", "{", "["):
                self.level = self.level + 1
            elif token in (")", "}", "]"):
                self.level = self.level - 1
                if self.level == 0:
                    state = FIND_DOT
            elif token == "," and self.level == 1:
                self.nerrors = self.nerrors + 1
                print "%s(%d):\n%s" % (self.fname, self.lineno,
                                       self.line)
                # don't gripe about this stmt again
                state = FIND_STMT
    elif state is FIND_STMT:
        if type is NEWLINE:
            state = FIND_DOT
    else:
        raise SystemError("unknown internal state '%r'" % (state,))
    self.state = state