def nextToken(self):
        self.sval = ""
        while self.c != EOF:
            if self.c in (' ', '\n', '\r', '\t'):
                self.consume()
                continue

            if self.c in self.__idStartChar:
                self.sval += self.c
                self.consume()
                while self.__idChar in self.c:
                    self.sval += self.c
                    self.consume()

                return ID

            if self.c == '(':
                self.consume()
                return BEGIN

            if self.c == ')':
                self.consume()
                return END

            if self.c == '%':
                self.consume()
                return PERCENT

            if self.c == ':':
                self.consume()
                return COLON

            if self.c == '.':
                self.consume()
                return DOT

            if self.c == '[': # grab [x] as a string, returning x
                self.consume()
                while self.c != ']':
                    if self.c == '\\':
                        self.consume()
                        if self.c != ']':
                            self.sval += '\\'

                        self.sval += self.c

                    else:
                        self.sval += self.c

                    self.consume()

                self.consume()
                return ARG

            self.consume()
            self.error = True
            return EOF

        return EOF
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/antlr3/antlr3/treewizard.py/TreePatternLexer.nextToken/swapped operands of `in`