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/*, zzEndReadL*/);
            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/*, zzEndReadL*/);
              zzCurrentPosL += Character.charCount(zzInput);
            }
          }
          int zzNext = zzTransL[ zzRowMapL[zzState] + ZZ_CMAP(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;
        zzDoEOF();
        return null;
      }
      else {
        switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
          case 1: 
            { if (myStateStack.isEmpty()) {
      return TokenType.BAD_CHARACTER;
    }

    yypushback(1);
    popState();
            } 
            // fall through
          case 50: break;
          case 2: 
            { return JsonPathTypes.ROOT_CONTEXT;
            } 
            // fall through
          case 51: break;
          case 3: 
            { return JsonPathTypes.EVAL_CONTEXT;
            } 
            // fall through
          case 52: break;
          case 4: 
            { if (myStateStack.isEmpty()) {
      return TokenType.BAD_CHARACTER;
    }
    yypushback(1);
    popState();
            } 
            // fall through
          case 53: break;
          case 5: 
            { return JsonPathTypes.IDENTIFIER;
            } 
            // fall through
          case 54: break;
          case 6: 
            { return JsonPathTypes.MINUS_OP;
            } 
            // fall through
          case 55: break;
          case 7: 
            { return JsonPathTypes.INTEGER_NUMBER;
            } 
            // fall through
          case 56: break;
          case 8: 
            { return JsonPathTypes.SINGLE_QUOTED_STRING;
            } 
            // fall through
          case 57: break;
          case 9: 
            { return JsonPathTypes.DOUBLE_QUOTED_STRING;
            } 
            // fall through
          case 58: break;
          case 10: 
            { return JsonPathTypes.DIVIDE_OP;
            } 
            // fall through
          case 59: break;
          case 11: 
            { pushState(WILDCARD_EXPECTED); return JsonPathTypes.DOT;
            } 
            // fall through
          case 60: break;
          case 12: 
            { return JsonPathTypes.PLUS_OP;
            } 
            // fall through
          case 61: break;
          case 13: 
            { pushState(SEGMENT_EXPRESSION); return JsonPathTypes.LBRACKET;
            } 
            // fall through
          case 62: break;
          case 14: 
            { return JsonPathTypes.WILDCARD;
            } 
            // fall through
          case 63: break;
          case 15: 
            { return JsonPathTypes.LBRACE;
            } 
            // fall through
          case 64: break;
          case 16: 
            { return JsonPathTypes.RBRACE;
            } 
            // fall through
          case 65: break;
          case 17: 
            { pushState(SCRIPT_EXPRESSION); return JsonPathTypes.LPARENTH;
            } 
            // fall through
          case 66: break;
          case 18: 
            { return JsonPathTypes.NOT_OP;
            } 
            // fall through
          case 67: break;
          case 19: 
            { return JsonPathTypes.GT_OP;
            } 
            // fall through
          case 68: break;
          case 20: 
            { return JsonPathTypes.LT_OP;
            } 
            // fall through
          case 69: break;
          case 21: 
            { return JsonPathTypes.COLON;
            } 
            // fall through
          case 70: break;
          case 22: 
            { return JsonPathTypes.COMMA;
            } 
            // fall through
          case 71: break;
          case 23: 
            { return JsonPathTypes.FILTER_OPERATOR;
            } 
            // fall through
          case 72: break;
          case 24: 
            { return TokenType.WHITE_SPACE;
            } 
            // fall through
          case 73: break;
          case 25: 
            { return JsonPathTypes.REGEX_STRING;
            } 
            // fall through
          case 74: break;
          case 26: 
            { return JsonPathTypes.DOT;
            } 
            // fall through
          case 75: break;
          case 27: 
            { return JsonPathTypes.LBRACKET;
            } 
            // fall through
          case 76: break;
          case 28: 
            { popState(); return JsonPathTypes.RPARENTH;
            } 
            // fall through
          case 77: break;
          case 29: 
            { popState(); return JsonPathTypes.RBRACKET;
            } 
            // fall through
          case 78: break;
          case 30: 
            { pushState(NESTED_PATH); return JsonPathTypes.ROOT_CONTEXT;
            } 
            // fall through
          case 79: break;
          case 31: 
            { pushState(NESTED_PATH); return JsonPathTypes.EVAL_CONTEXT;
            } 
            // fall through
          case 80: break;
          case 32: 
            { return JsonPathTypes.NAMED_OP;
            } 
            // fall through
          case 81: break;
          case 33: 
            { return JsonPathTypes.MULTIPLY_OP;
            } 
            // fall through
          case 82: break;
          case 34: 
            { return JsonPathTypes.RBRACKET;
            } 
            // fall through
          case 83: break;
          case 35: 
            { return JsonPathTypes.DOUBLE_NUMBER;
            } 
            // fall through
          case 84: break;
          case 36: 
            { pushState(WILDCARD_EXPECTED); return JsonPathTypes.RECURSIVE_DESCENT;
            } 
            // fall through
          case 85: break;
          case 37: 
            { return JsonPathTypes.NE_OP;
            } 
            // fall through
          case 86: break;
          case 38: 
            { return JsonPathTypes.EQ_OP;
            } 
            // fall through
          case 87: break;
          case 39: 
            { pushState(REGEX_EXPECTED); return JsonPathTypes.RE_OP;
            } 
            // fall through
          case 88: break;
          case 40: 
            { return JsonPathTypes.GE_OP;
            } 
            // fall through
          case 89: break;
          case 41: 
            { return JsonPathTypes.LE_OP;
            } 
            // fall through
          case 90: break;
          case 42: 
            { return JsonPathTypes.OR_OP;
            } 
            // fall through
          case 91: break;
          case 43: 
            { return JsonPathTypes.AND_OP;
            } 
            // fall through
          case 92: break;
          case 44: 
            { return JsonPathTypes.RECURSIVE_DESCENT;
            } 
            // fall through
          case 93: break;
          case 45: 
            { return JsonPathTypes.ENE_OP;
            } 
            // fall through
          case 94: break;
          case 46: 
            { return JsonPathTypes.EEQ_OP;
            } 
            // fall through
          case 95: break;
          case 47: 
            { return JsonPathTypes.NULL;
            } 
            // fall through
          case 96: break;
          case 48: 
            { return JsonPathTypes.TRUE;
            } 
            // fall through
          case 97: break;
          case 49: 
            { return JsonPathTypes.FALSE;
            } 
            // fall through
          case 98: break;
          default:
            zzScanError(ZZ_NO_MATCH);
          }
      }
    }
  }
public IElementType advance()