public IElementType advance() throws java.io.IOException
  {
    int zzInput;
    int zzAction;

    // cached fields:
    int zzCurrentPosL;
    int zzMarkedPosL;
    int zzEndReadL = zzEndRead;
    CharSequence zzBufferL = zzBuffer;

    int [] zzTransL = ZZ_TRANS;
    int [] zzRowMapL = ZZ_ROWMAP;
    int [] zzAttrL = ZZ_ATTRIBUTE;

    while (true) {
      zzMarkedPosL = zzMarkedPos;

      zzAction = -1;

      zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;

      zzState = ZZ_LEXSTATE[zzLexicalState];

      // set up zzAction for empty match case:
      int zzAttributes = zzAttrL[zzState];
      if ( (zzAttributes & 1) == 1 ) {
        zzAction = zzState;
      }


      zzForAction: {
        while (true) {

          if (zzCurrentPosL < zzEndReadL) {
            zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL);
            zzCurrentPosL += Character.charCount(zzInput);
          }
          else if (zzAtEOF) {
            zzInput = YYEOF;
            break zzForAction;
          }
          else {
            // store back cached positions
            zzCurrentPos  = zzCurrentPosL;
            zzMarkedPos   = zzMarkedPosL;
            boolean eof = zzRefill();
            // get translated positions and possibly new buffer
            zzCurrentPosL  = zzCurrentPos;
            zzMarkedPosL   = zzMarkedPos;
            zzBufferL      = zzBuffer;
            zzEndReadL     = zzEndRead;
            if (eof) {
              zzInput = YYEOF;
              break zzForAction;
            }
            else {
              zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL);
              zzCurrentPosL += Character.charCount(zzInput);
            }
          }
          int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMap(zzInput) ];
          if (zzNext == -1) break zzForAction;
          zzState = zzNext;

          zzAttributes = zzAttrL[zzState];
          if ( (zzAttributes & 1) == 1 ) {
            zzAction = zzState;
            zzMarkedPosL = zzCurrentPosL;
            if ( (zzAttributes & 8) == 8 ) break zzForAction;
          }

        }
      }

      // store back cached position
      zzMarkedPos = zzMarkedPosL;

      if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
        zzAtEOF = true;
        return null;
      }
      else {
        switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
          case 1:
            { yypopstate(); return RegExpTT.COMMENT;
            }
          // fall through
          case 139: break;
          case 2:
            { return RegExpTT.CHARACTER;
            }
          // fall through
          case 140: break;
          case 3:
            { return commentMode ? com.intellij.psi.TokenType.WHITE_SPACE : RegExpTT.CTRL_CHARACTER;
            }
          // fall through
          case 141: break;
          case 4:
            { return commentMode ? com.intellij.psi.TokenType.WHITE_SPACE : RegExpTT.CHARACTER;
            }
          // fall through
          case 142: break;
          case 5:
            { if (commentMode) { yypushstate(COMMENT); } else return RegExpTT.CHARACTER;
            }
          // fall through
          case 143: break;
          case 6:
            { return RegExpTT.DOLLAR;
            }
          // fall through
          case 144: break;
          case 7:
            { capturingGroupCount++; return RegExpTT.GROUP_BEGIN;
            }
          // fall through
          case 145: break;
          case 8:
            { return RegExpTT.GROUP_END;
            }
          // fall through
          case 146: break;
          case 9:
            { return RegExpTT.STAR;
            }
          // fall through
          case 147: break;
          case 10:
            { return RegExpTT.PLUS;
            }
          // fall through
          case 148: break;
          case 11:
            { return RegExpTT.DOT;
            }
          // fall through
          case 149: break;
          case 12:
            { return RegExpTT.QUEST;
            }
          // fall through
          case 150: break;
          case 13:
            { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN;
            }
          // fall through
          case 151: break;
          case 14:
            { return StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
            }
          // fall through
          case 152: break;
          case 15:
            { return allowDanglingMetacharacters == FALSE ? RegExpTT.CLASS_END : RegExpTT.CHARACTER;
            }
          // fall through
          case 153: break;
          case 16:
            { return RegExpTT.CARET;
            }
          // fall through
          case 154: break;
          case 17:
            { if (allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } return RegExpTT.CHARACTER;
            }
          // fall through
          case 155: break;
          case 18:
            { return RegExpTT.UNION;
            }
          // fall through
          case 156: break;
          case 19:
            { return (allowDanglingMetacharacters != FALSE) ? RegExpTT.CHARACTER : RegExpTT.RBRACE;
            }
          // fall through
          case 157: break;
          case 20:
            { yypopstate(); yypushback(1);
            }
          // fall through
          case 158: break;
          case 21:
            { return RegExpTT.EQ;
            }
          // fall through
          case 159: break;
          case 22:
            { return RegExpTT.NAME;
            }
          // fall through
          case 160: break;
          case 23:
            { yypopstate(); return RegExpTT.RBRACE;
            }
          // fall through
          case 161: break;
          case 24:
            { return RegExpTT.COMMA;
            }
          // fall through
          case 162: break;
          case 25:
            { return RegExpTT.NUMBER;
            }
          // fall through
          case 163: break;
          case 26:
            { yybegin(CLASS1); return RegExpTT.CARET;
            }
          // fall through
          case 164: break;
          case 27:
            { states.set(states.size() - 1, CLASS2); return RegExpTT.CHARACTER;
            }
          // fall through
          case 165: break;
          case 28:
            { yypushback(1); yybegin(CLASS2);
            }
          // fall through
          case 166: break;
          case 29:
            { if (commentMode && whitespaceInClass) return com.intellij.psi.TokenType.WHITE_SPACE; yypushback(1); yybegin(CLASS2);
            }
          // fall through
          case 167: break;
          case 30:
            { yybegin(CLASS2); if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
            }
          // fall through
          case 168: break;
          case 31:
            { if (allowEmptyCharacterClass) { yypopstate(); return RegExpTT.CLASS_END; } yybegin(CLASS2); return RegExpTT.CHARACTER;
            }
          // fall through
          case 169: break;
          case 32:
            { yybegin(YYINITIAL); yypushback(1);
            }
          // fall through
          case 170: break;
          case 33:
            { yybegin(YYINITIAL); return RegExpTT.GROUP_END;
            }
          // fall through
          case 171: break;
          case 34:
            { handleOptions(); return RegExpTT.OPTIONS_OFF;
            }
          // fall through
          case 172: break;
          case 35:
            { yybegin(YYINITIAL); return RegExpTT.COLON;
            }
          // fall through
          case 173: break;
          case 36:
            { handleOptions(); return RegExpTT.OPTIONS_ON;
            }
          // fall through
          case 174: break;
          case 37:
            { yybegin(YYINITIAL); return RegExpTT.GT;
            }
          // fall through
          case 175: break;
          case 38:
            { yybegin(YYINITIAL); return RegExpTT.QUOTE;
            }
          // fall through
          case 176: break;
          case 39:
            { return RegExpTT.BAD_CHARACTER;
            }
          // fall through
          case 177: break;
          case 40:
            { return allowMysqlBracketExpressions ? RegExpTT.NAME : RegExpTT.BAD_CHARACTER;
            }
          // fall through
          case 178: break;
          case 41:
            { yypopstate(); return (yycharat(-1) == 'u') ? StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN : RegExpTT.BAD_HEX_VALUE;
            }
          // fall through
          case 179: break;
          case 42:
            { yybegin(CONDITIONAL2); return RegExpTT.GROUP_BEGIN;
            }
          // fall through
          case 180: break;
          case 43:
            { return (commentMode && whitespaceInClass) ? com.intellij.psi.TokenType.WHITE_SPACE : RegExpTT.CTRL_CHARACTER;
            }
          // fall through
          case 181: break;
          case 44:
            { return (commentMode && whitespaceInClass) ? com.intellij.psi.TokenType.WHITE_SPACE : RegExpTT.CHARACTER;
            }
          // fall through
          case 182: break;
          case 45:
            { if (commentMode && whitespaceInClass) yypushstate(COMMENT); else return RegExpTT.CHARACTER;
            }
          // fall through
          case 183: break;
          case 46:
            { return RegExpTT.MINUS;
            }
          // fall through
          case 184: break;
          case 47:
            { if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
            }
          // fall through
          case 185: break;
          case 48:
            { yypopstate(); return RegExpTT.CLASS_END;
            }
          // fall through
          case 186: break;
          case 49:
            { yypopstate(); return RegExpTT.CATEGORY_SHORT_HAND;
            }
          // fall through
          case 187: break;
          case 50:
            { yypopstate(); yypushstate(EMBRACED); return RegExpTT.LBRACE;
            }
          // fall through
          case 188: break;
          case 51:
            { yybegin(OPTIONS); return RegExpTT.SET_OPTIONS;
            }
          // fall through
          case 189: break;
          case 52:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { yypushstate(NEGATED_CLASS); return RegExpTT.CLASS_BEGIN;
            }
          // fall through
          case 190: break;
          case 53:
            { return RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 191: break;
          case 54:
            { return commentMode ? RegExpTT.ESC_CTRL_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 192: break;
          case 55:
            { return commentMode ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 193: break;
          case 56:
            { return RegExpTT.ESC_CHARACTER;
            }
          // fall through
          case 194: break;
          case 57:
            { return (yystate() == CLASS2) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 195: break;
          case 58:
            { return (allowOctalNoLeadingZero ? RegExpTT.OCT_CHAR : RegExpTT.BAD_OCT_VALUE);
            }
          // fall through
          case 196: break;
          case 59:
            { String text = yytext().toString().substring(1);
                                if (allowOctalNoLeadingZero) {
                                  if (Integer.parseInt(text) <= capturingGroupCount && yystate() != CLASS2) return RegExpTT.BACKREF;
                                  int i = 0;
                                  int value = 0;
                                  for (; i < text.length(); i++) {
                                    char c = text.charAt(i);
                                    if (c > '7') break;
                                    value = value * 8 + (c - '0');
                                  }
                                  if (i > 0) {
                                    yypushback(text.length() - i);
                                    if (value > maxOctal) {
                                      yypushback(1);
                                      return RegExpTT.BAD_OCT_VALUE;
                                    }
                                    if (minOctalDigits > i && yystate() != CLASS2) {
                                      return RegExpTT.BAD_OCT_VALUE;
                                    }
                                    return RegExpTT.OCT_CHAR;
                                  }
                                  return StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
                                }
                                else {
                                  if (yystate() == CLASS2) {
                                    yypushback(yylength() - 2);
                                    return StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
                                  }
                                  /* java.util.regex.Pattern says about backrefs:
                                      "In this class, \1 through \9 are always interpreted as back references,
                                      and a larger number is accepted as a back reference if at least that many
                                      subexpressions exist at that point in the regular expression, otherwise the
                                      parser will drop digits until the number is smaller or equal to the existing
                                      number of groups or it is one digit."
                                  */
                                  while (yylength() > 2 && Integer.parseInt(yytext().toString().substring(1)) > capturingGroupCount) {
                                    yypushback(1);
                                  }
                                  return RegExpTT.BACKREF;
                                }
            }
          // fall through
          case 197: break;
          case 60:
            { return RegExpTT.BOUNDARY;
            }
          // fall through
          case 198: break;
          case 61:
            { if (xmlSchemaMode) return RegExpTT.CHAR_CLASS; else return StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
            }
          // fall through
          case 199: break;
          case 62:
            { return RegExpTT.CHAR_CLASS;
            }
          // fall through
          case 200: break;
          case 63:
            { return allowTransformationEscapes ? RegExpTT.CHAR_CLASS : StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
            }
          // fall through
          case 201: break;
          case 64:
            { return (allowHexDigitClass || allowHorizontalWhitespaceClass ? RegExpTT.CHAR_CLASS : StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN);
            }
          // fall through
          case 202: break;
          case 65:
            { yypushstate(NAMED); return RegExpTT.NAMED_CHARACTER;
            }
          // fall through
          case 203: break;
          case 66:
            { yypushstate(PROP); return RegExpTT.PROPERTY;
            }
          // fall through
          case 204: break;
          case 67:
            { yypushstate(QUOTED); return RegExpTT.QUOTE_BEGIN;
            }
          // fall through
          case 205: break;
          case 68:
            { return (allowDanglingMetacharacters == FALSE) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 206: break;
          case 69:
            { return RegExpTT.ESC_CTRL_CHARACTER;
            }
          // fall through
          case 207: break;
          case 70:
            { return allowTransformationEscapes ? RegExpTT.CHAR_CLASS : StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN;
            }
          // fall through
          case 208: break;
          case 71:
            { return RegExpTT.BAD_HEX_VALUE;
            }
          // fall through
          case 209: break;
          case 72:
            { return (allowDanglingMetacharacters != TRUE) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 210: break;
          case 73:
            { yypopstate(); return RegExpTT.QUOTE_END;
            }
          // fall through
          case 211: break;
          case 74:
            { yypopstate(); return RegExpTT.ESC_CHARACTER;
            }
          // fall through
          case 212: break;
          case 75:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { yybegin(CLASS2); if (allowMysqlBracketExpressions) { yypushback(1); } else if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } else { return RegExpTT.CHARACTER; }
            }
          // fall through
          case 213: break;
          case 76:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { yybegin(CLASS2); if (allowPosixBracketExpressions) { yypushback(1); } else if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } else { return RegExpTT.CHARACTER; }
            }
          // fall through
          case 214: break;
          case 77:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { yybegin(CLASS2); if (allowNestedCharacterClasses) { yypushstate(NEGATED_CLASS); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
            }
          // fall through
          case 215: break;
          case 78:
            { yypushstate(QUOTED_CLASS); return RegExpTT.QUOTE_BEGIN;
            }
          // fall through
          case 216: break;
          case 79:
            { yybegin(CLASS2); return allowEmptyCharacterClass ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 217: break;
          case 80:
            { yybegin(CLASS2); return RegExpTT.ESC_CHARACTER;
            }
          // fall through
          case 218: break;
          case 81:
            { yybegin(CLASS2); return RegExpTT.BRACKET_EXPRESSION_END;
            }
          // fall through
          case 219: break;
          case 82:
            { yybegin(CLASS2); return RegExpTT.MYSQL_CHAR_END;
            }
          // fall through
          case 220: break;
          case 83:
            { yybegin(CLASS2); return RegExpTT.MYSQL_CHAR_EQ_END;
            }
          // fall through
          case 221: break;
          case 84:
            { yybegin(CONDITIONAL2); return RegExpTT.QUOTED_CONDITION_BEGIN;
            }
          // fall through
          case 222: break;
          case 85:
            { yybegin(CONDITIONAL2); return RegExpTT.ANGLE_BRACKET_CONDITION_BEGIN;
            }
          // fall through
          case 223: break;
          case 86:
            { yybegin(YYINITIAL); return RegExpTT.QUOTED_CONDITION_END;
            }
          // fall through
          case 224: break;
          case 87:
            { yybegin(YYINITIAL); return RegExpTT.ANGLE_BRACKET_CONDITION_END;
            }
          // fall through
          case 225: break;
          case 88:
            { if (allowNestedCharacterClasses) return RegExpTT.ANDAND; else yypushback(1); return RegExpTT.CHARACTER;
            }
          // fall through
          case 226: break;
          case 89:
            { char c = yycharat(1);
                          if (allowPosixBracketExpressions && c == ':') {
                            yybegin(BRACKET_EXPRESSION);
                            return RegExpTT.BRACKET_EXPRESSION_BEGIN;
                          } else if (allowMysqlBracketExpressions && c == '=') {
                            yybegin(MYSQL_CHAR_EQ_EXPRESSION);
                            return RegExpTT.MYSQL_CHAR_EQ_BEGIN;
                          } else if (allowMysqlBracketExpressions && c == '.') {
                            yybegin(MYSQL_CHAR_EXPRESSION);
                            return RegExpTT.MYSQL_CHAR_BEGIN;
                          } else {
                            yypushback(1);
                            if (allowNestedCharacterClasses) {
                              yypushstate(CLASS1);
                              return RegExpTT.CLASS_BEGIN;
                            } else {
                              return RegExpTT.CHARACTER;
                            }
                          }
            }
          // fall through
          case 227: break;
          case 90:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { if (allowNestedCharacterClasses) { yypushstate(NEGATED_CLASS); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
            }
          // fall through
          case 228: break;
          case 91:
            { return (commentMode && whitespaceInClass) ? RegExpTT.ESC_CTRL_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 229: break;
          case 92:
            { return RegExpTT.NEG_LOOKAHEAD;
            }
          // fall through
          case 230: break;
          case 93:
            { yybegin(NAMED_GROUP); return RegExpTT.PCRE_RECURSIVE_NAMED_GROUP_REF;
            }
          // fall through
          case 231: break;
          case 94:
            { yybegin(QUOTED_NAMED_GROUP); capturingGroupCount++; return RegExpTT.RUBY_QUOTED_NAMED_GROUP;
            }
          // fall through
          case 232: break;
          case 95:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 2);
            { yybegin(CONDITIONAL1); return RegExpTT.CONDITIONAL;
            }
          // fall through
          case 233: break;
          case 96:
            { return RegExpTT.NON_CAPT_GROUP;
            }
          // fall through
          case 234: break;
          case 97:
            { yybegin(NAMED_GROUP); capturingGroupCount++; return RegExpTT.RUBY_NAMED_GROUP;
            }
          // fall through
          case 235: break;
          case 98:
            { return RegExpTT.POS_LOOKAHEAD;
            }
          // fall through
          case 236: break;
          case 99:
            { return RegExpTT.ATOMIC_GROUP;
            }
          // fall through
          case 237: break;
          case 100:
            { return RegExpTT.PCRE_BRANCH_RESET;
            }
          // fall through
          case 238: break;
          case 101:
            { return RegExpTT.OCT_CHAR;
            }
          // fall through
          case 239: break;
          case 102:
            { if (xmlSchemaMode) { yypushback(1); return RegExpTT.CHAR_CLASS; } else return RegExpTT.CTRL;
            }
          // fall through
          case 240: break;
          case 103:
            { yybegin(QUOTED_NAMED_GROUP); return RegExpTT.RUBY_QUOTED_NAMED_GROUP_CALL;
            }
          // fall through
          case 241: break;
          case 104:
            { return allowPcreBackReferences ? RegExpTT.BACKREF : StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
            }
          // fall through
          case 242: break;
          case 105:
            { yybegin(NAMED_GROUP); return RegExpTT.RUBY_NAMED_GROUP_CALL;
            }
          // fall through
          case 243: break;
          case 106:
            { yybegin(QUOTED_NAMED_GROUP); return RegExpTT.RUBY_QUOTED_NAMED_GROUP_REF;
            }
          // fall through
          case 244: break;
          case 107:
            { yybegin(NAMED_GROUP); return RegExpTT.RUBY_NAMED_GROUP_REF;
            }
          // fall through
          case 245: break;
          case 108:
            { yypushback(yylength() - 2); return StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN;
            }
          // fall through
          case 246: break;
          case 109:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 2);
            { if (allowExtendedUnicodeCharacter) yypushstate(EMBRACED_HEX); else return StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN;
            }
          // fall through
          case 247: break;
          case 110:
            { if (allowOneHexCharEscape) { return RegExpTT.HEX_CHAR; } else { yypushback(1); return RegExpTT.BAD_HEX_VALUE; }
            }
          // fall through
          case 248: break;
          case 111:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 2);
            { if (allowExtendedUnicodeCharacter) yypushstate(EMBRACED_HEX); else return RegExpTT.BAD_HEX_VALUE;
            }
          // fall through
          case 249: break;
          case 112:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { if (allowOmitBothNumbersInQuantifiers || allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } else return RegExpTT.CHARACTER;
            }
          // fall through
          case 250: break;
          case 113:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { yypushstate(QUANTIFIER); return RegExpTT.LBRACE;
            }
          // fall through
          case 251: break;
          case 114:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { return (allowDanglingMetacharacters != TRUE) ? RegExpTT.LBRACE : RegExpTT.CHARACTER;
            }
          // fall through
          case 252: break;
          case 115:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { return RegExpTT.CHARACTER;
            }
          // fall through
          case 253: break;
          case 116:
            { yypopstate(); return (yycharat(-1) == 'u') ? RegExpTT.UNICODE_CHAR : RegExpTT.HEX_CHAR;
            }
          // fall through
          case 254: break;
          case 117:
            { yybegin(YYINITIAL); return RegExpTT.NEG_LOOKAHEAD;
            }
          // fall through
          case 255: break;
          case 118:
            { yybegin(YYINITIAL); return RegExpTT.POS_LOOKAHEAD;
            }
          // fall through
          case 256: break;
          case 119:
            { if (allowPcreNumberedGroupRef) {
                                          yybegin(PCRE_NUMBERED_GROUP);
                                          return RegExpTT.PCRE_NUMBERED_GROUP_REF;
                                        }
                                        else { yypushback(yylength() - 2); yybegin(OPTIONS); return RegExpTT.SET_OPTIONS; }
            }
          // fall through
          case 257: break;
          case 120:
            { return RegExpTT.NEG_LOOKBEHIND;
            }
          // fall through
          case 258: break;
          case 121:
            { return RegExpTT.POS_LOOKBEHIND;
            }
          // fall through
          case 259: break;
          case 122:
            { yybegin(NAMED_GROUP); capturingGroupCount++; return RegExpTT.PYTHON_NAMED_GROUP;
            }
          // fall through
          case 260: break;
          case 123:
            { yybegin(PY_NAMED_GROUP_REF); return RegExpTT.PYTHON_NAMED_GROUP_REF;
            }
          // fall through
          case 261: break;
          case 124:
            { return RegExpTT.HEX_CHAR;
            }
          // fall through
          case 262: break;
          case 125:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 2);
            { return allowOmitBothNumbersInQuantifiers ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 263: break;
          case 126:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 2);
            { return RegExpTT.ESC_CHARACTER;
            }
          // fall through
          case 264: break;
          case 127:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { if (allowOmitNumbersInQuantifiers || allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } else return RegExpTT.CHARACTER;
            }
          // fall through
          case 265: break;
          case 128:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { if (allowDanglingMetacharacters == TRUE) { if (allowOmitBothNumbersInQuantifiers) yypushstate(NON_QUANTIFIER); return RegExpTT.CHARACTER; } else { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; }
            }
          // fall through
          case 266: break;
          case 129:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { if (allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } else { yypushstate(NON_QUANTIFIER); return RegExpTT.CHARACTER; }
            }
          // fall through
          case 267: break;
          case 130:
            { yybegin(YYINITIAL); return RegExpTT.NEG_LOOKBEHIND;
            }
          // fall through
          case 268: break;
          case 131:
            { yybegin(YYINITIAL); return RegExpTT.POS_LOOKBEHIND;
            }
          // fall through
          case 269: break;
          case 132:
            { return RegExpTT.COMMENT;
            }
          // fall through
          case 270: break;
          case 133:
            { if (allowOctalNoLeadingZero) yypushback(1); return RegExpTT.OCT_CHAR;
            }
          // fall through
          case 271: break;
          case 134:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 2);
            { return allowOmitNumbersInQuantifiers ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
            }
          // fall through
          case 272: break;
          case 135:
            // lookahead expression with fixed base length
            zzMarkedPos = Character.offsetByCodePoints
                (zzBufferL, zzStartRead, 1);
            { if (allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } else if (allowOmitNumbersInQuantifiers) yypushstate(NON_QUANTIFIER); return RegExpTT.CHARACTER;
            }
          // fall through
          case 273: break;
          case 136:
            { return RegExpTT.UNICODE_CHAR;
            }
          // fall through
          case 274: break;
          case 137:
            { return allowPcreConditions ? RegExpTT.PCRE_DEFINE : RegExpTT.NAME;
            }
          // fall through
          case 275: break;
          case 138:
            { return allowPcreConditions ? RegExpTT.PCRE_VERSION : RegExpTT.NAME;
            }
          // fall through
          case 276: break;
          default:
            zzScanError(ZZ_NO_MATCH);
          }
      }
    }
  }
public IElementType advance()