⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rqlparsertokenmanager.java

📁 这是外国一个开源推理机
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
                  {                     if (kind > 56)                        kind = 56;                     jjCheckNAdd(9);                  }                  break;               case 30:                  if ((0x3ff680000000000L & l) != 0L)                     jjCheckNAddTwoStates(16, 17);                  else if (curChar == 58)                  {                     if (kind > 61)                        kind = 61;                     jjCheckNAddStates(3, 5);                  }                  if ((0x3ff600000000000L & l) != 0L)                  {                     if (kind > 52)                        kind = 52;                     jjCheckNAdd(1);                  }                  break;               case 1:                  if ((0x3ff600000000000L & l) == 0L)                     break;                  if (kind > 52)                     kind = 52;                  jjCheckNAdd(1);                  break;               case 2:                  if (curChar == 36)                     jjstateSet[jjnewStateCnt++] = 3;                  break;               case 4:                  if ((0x3ff600000000000L & l) == 0L)                     break;                  if (kind > 53)                     kind = 53;                  jjstateSet[jjnewStateCnt++] = 4;                  break;               case 7:                  if ((0x3ff600000000000L & l) == 0L)                     break;                  if (kind > 54)                     kind = 54;                  jjstateSet[jjnewStateCnt++] = 7;                  break;               case 8:                  if (curChar == 46)                     jjCheckNAdd(9);                  break;               case 9:                  if ((0x3ff000000000000L & l) == 0L)                     break;                  if (kind > 56)                     kind = 56;                  jjCheckNAdd(9);                  break;               case 10:                  if (curChar == 34)                     jjCheckNAddTwoStates(11, 12);                  break;               case 11:                  if ((0xfffffffbffffffffL & l) != 0L)                     jjCheckNAddTwoStates(11, 12);                  break;               case 12:                  if (curChar == 34 && kind > 57)                     kind = 57;                  break;               case 13:                  if (curChar == 39)                     jjstateSet[jjnewStateCnt++] = 14;                  break;               case 14:                  if ((0xffffff7fffffffffL & l) != 0L)                     jjstateSet[jjnewStateCnt++] = 15;                  break;               case 15:                  if (curChar == 39 && kind > 58)                     kind = 58;                  break;               case 16:                  if ((0x3ff680000000000L & l) != 0L)                     jjCheckNAddTwoStates(16, 17);                  break;               case 17:                  if (curChar != 58)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddStates(3, 5);                  break;               case 18:                  if (curChar == 37)                     jjstateSet[jjnewStateCnt++] = 19;                  break;               case 19:                  if ((0x3ff000000000000L & l) != 0L)                     jjstateSet[jjnewStateCnt++] = 20;                  break;               case 20:                  if ((0x3ff000000000000L & l) == 0L)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddStates(3, 5);                  break;               case 21:                  if ((0xafffffd200000000L & l) == 0L)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddStates(3, 5);                  break;               case 22:                  if (curChar != 35)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddTwoStates(23, 26);                  break;               case 23:                  if (curChar == 37)                     jjstateSet[jjnewStateCnt++] = 24;                  break;               case 24:                  if ((0x3ff000000000000L & l) != 0L)                     jjstateSet[jjnewStateCnt++] = 25;                  break;               case 25:                  if ((0x3ff000000000000L & l) == 0L)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddTwoStates(23, 26);                  break;               case 26:                  if ((0xafffffd200000000L & l) == 0L)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddTwoStates(23, 26);                  break;               case 27:                  if ((0x3ff000000000000L & l) == 0L)                     break;                  if (kind > 55)                     kind = 55;                  jjCheckNAddStates(0, 2);                  break;               case 28:                  if ((0x3ff000000000000L & l) == 0L)                     break;                  if (kind > 55)                     kind = 55;                  jjCheckNAdd(28);                  break;               case 29:                  if ((0x3ff000000000000L & l) != 0L)                     jjCheckNAddTwoStates(29, 8);                  break;               default : break;            }         } while(i != startsAt);      }      else if (curChar < 128)      {         long l = 1L << (curChar & 077);         MatchLoop: do         {            switch(jjstateSet[--i])            {               case 0:                  if ((0x7fffffe87fffffeL & l) != 0L)                  {                     if (kind > 52)                        kind = 52;                     jjCheckNAdd(1);                  }                  else if (curChar == 64)                     jjstateSet[jjnewStateCnt++] = 6;                  if ((0x7fffffe07fffffeL & l) != 0L)                     jjCheckNAddTwoStates(16, 17);                  break;               case 32:               case 11:                  jjCheckNAddTwoStates(11, 12);                  break;               case 31:               case 16:                  if ((0x7fffffe07fffffeL & l) != 0L)                     jjCheckNAddTwoStates(16, 17);                  break;               case 30:                  if ((0x7fffffe87fffffeL & l) != 0L)                  {                     if (kind > 52)                        kind = 52;                     jjCheckNAdd(1);                  }                  if ((0x7fffffe07fffffeL & l) != 0L)                     jjCheckNAddTwoStates(16, 17);                  break;               case 1:                  if ((0x7fffffe87fffffeL & l) == 0L)                     break;                  if (kind > 52)                     kind = 52;                  jjCheckNAdd(1);                  break;               case 3:               case 4:                  if ((0x7fffffe87fffffeL & l) == 0L)                     break;                  if (kind > 53)                     kind = 53;                  jjCheckNAdd(4);                  break;               case 5:                  if (curChar == 64)                     jjstateSet[jjnewStateCnt++] = 6;                  break;               case 6:               case 7:                  if ((0x7fffffe87fffffeL & l) == 0L)                     break;                  if (kind > 54)                     kind = 54;                  jjCheckNAdd(7);                  break;               case 14:                  jjstateSet[jjnewStateCnt++] = 15;                  break;               case 19:                  if ((0x7e0000007eL & l) != 0L)                     jjstateSet[jjnewStateCnt++] = 20;                  break;               case 20:                  if ((0x7e0000007eL & l) == 0L)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddStates(3, 5);                  break;               case 21:                  if ((0x47fffffe87ffffffL & l) == 0L)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddStates(3, 5);                  break;               case 24:                  if ((0x7e0000007eL & l) != 0L)                     jjstateSet[jjnewStateCnt++] = 25;                  break;               case 25:                  if ((0x7e0000007eL & l) == 0L)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddTwoStates(23, 26);                  break;               case 26:                  if ((0x47fffffe87ffffffL & l) == 0L)                     break;                  if (kind > 61)                     kind = 61;                  jjCheckNAddTwoStates(23, 26);                  break;               default : break;            }         } while(i != startsAt);      }      else      {         int i2 = (curChar & 0xff) >> 6;         long l2 = 1L << (curChar & 077);         MatchLoop: do         {            switch(jjstateSet[--i])            {               case 32:               case 11:                  if ((jjbitVec0[i2] & l2) != 0L)                     jjCheckNAddTwoStates(11, 12);                  break;               case 14:                  if ((jjbitVec0[i2] & l2) != 0L)                     jjstateSet[jjnewStateCnt++] = 15;                  break;               default : break;            }         } while(i != startsAt);      }      if (kind != 0x7fffffff)      {         jjmatchedKind = kind;         jjmatchedPos = curPos;         kind = 0x7fffffff;      }      ++curPos;      if ((i = jjnewStateCnt) == (startsAt = 30 - (jjnewStateCnt = startsAt)))         return curPos;      try { curChar = input_stream.readChar(); }      catch(java.io.IOException e) { return curPos; }   }}static final int[] jjnextStates = {   28, 29, 8, 18, 21, 22,};public static final String[] jjstrLiteralImages = {"", null, null, null, null, "\74", "\74\75", "\75", "\76\75", "\76", "\41\75","\46", "\50", "\51", "\173", "\175", "\133", "\135", "\52", "\54", "\56", "\72","\47", "\42", "\136", null, null, null, null, null, null, null, null, null, null,null, null, null, null, null, null, null, null, null, null, null, null, null, null,null, null, null, null, null, null, null, null, null, null, null, null, null, null,null, null, null, null, null, null, null, null, };public static final String[] lexStateNames = {   "DEFAULT",};static final long[] jjtoToken = {   0x27ffffffffffffe1L, 0x0L,};static final long[] jjtoSkip = {   0x1eL, 0x0L,};protected SimpleCharStream input_stream;private final int[] jjrounds = new int[30];private final int[] jjstateSet = new int[60];protected char curChar;public RqlParserTokenManager(SimpleCharStream stream){   if (SimpleCharStream.staticFlag)      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");   input_stream = stream;}public RqlParserTokenManager(SimpleCharStream stream, int lexState){   this(stream);   SwitchTo(lexState);}public void ReInit(SimpleCharStream stream){   jjmatchedPos = jjnewStateCnt = 0;   curLexState = defaultLexState;   input_stream = stream;   ReInitRounds();}private final void ReInitRounds(){   int i;   jjround = 0x80000001;   for (i = 30; i-- > 0;)      jjrounds[i] = 0x80000000;}public void ReInit(SimpleCharStream stream, int lexState){   ReInit(stream);   SwitchTo(lexState);}public void SwitchTo(int lexState){   if (lexState >= 1 || lexState < 0)      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);   else      curLexState = lexState;}protected Token jjFillToken(){   Token t = Token.newToken(jjmatchedKind);   t.kind = jjmatchedKind;   String im = jjstrLiteralImages[jjmatchedKind];   t.image = (im == null) ? input_stream.GetImage() : im;   t.beginLine = input_stream.getBeginLine();   t.beginColumn = input_stream.getBeginColumn();   t.endLine = input_stream.getEndLine();   t.endColumn = input_stream.getEndColumn();   return t;}int curLexState = 0;int defaultLexState = 0;int jjnewStateCnt;int jjround;int jjmatchedPos;int jjmatchedKind;public Token getNextToken(){  int kind;  Token specialToken = null;  Token matchedToken;  int curPos = 0;  EOFLoop :  for (;;)  {   try   {      curChar = input_stream.BeginToken();   }   catch(java.io.IOException e)   {      jjmatchedKind = 0;      matchedToken = jjFillToken();      return matchedToken;   }   try { input_stream.backup(0);      while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)         curChar = input_stream.BeginToken();   }   catch (java.io.IOException e1) { continue EOFLoop; }   jjmatchedKind = 0x7fffffff;   jjmatchedPos = 0;   curPos = jjMoveStringLiteralDfa0_0();   if (jjmatchedKind != 0x7fffffff)   {      if (jjmatchedPos + 1 < curPos)         input_stream.backup(curPos - jjmatchedPos - 1);      if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)      {         matchedToken = jjFillToken();         return matchedToken;      }      else      {         continue EOFLoop;      }   }   int error_line = input_stream.getEndLine();   int error_column = input_stream.getEndColumn();   String error_after = null;   boolean EOFSeen = false;   try { input_stream.readChar(); input_stream.backup(1); }   catch (java.io.IOException e1) {      EOFSeen = true;      error_after = curPos <= 1 ? "" : input_stream.GetImage();      if (curChar == '\n' || curChar == '\r') {         error_line++;         error_column = 0;      }      else         error_column++;   }   if (!EOFSeen) {      input_stream.backup(1);      error_after = curPos <= 1 ? "" : input_stream.GetImage();   }   throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);  }}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -