C++ (Qt) inline int nextToken() { switch (*bufptr++) { case '\0': return EOF_SYMBOL; case '<': in_tag = true; return LEFT_ANGLE; case '>': if (! in_tag) break; in_tag = false; return RIGHT_ANGLE; break; } // switch return ANY; }