All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openscience.cdk.smiles.smarts.parser.SMARTSParserTokenManager Maven / Gradle / Ivy

There is a newer version: 2.10
Show newest version
/* Generated By:JJTree&JavaCC: Do not edit this line. SMARTSParserTokenManager.java */
/* Copyright (C) 2004-2007  The Chemistry Development Kit (CDK) project
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 * (or see http://www.gnu.org/copyleft/lesser.html)
 */
package org.openscience.cdk.smiles.smarts.parser;
import java.io.StringReader;
import org.openscience.cdk.isomorphism.matchers.QueryAtomContainer;
import org.openscience.cdk.interfaces.IChemObjectBuilder;

/** Token Manager. */
public class SMARTSParserTokenManager implements SMARTSParserConstants
{
    // Required by SetState
    void backup(int n) { input_stream.backup(n); }

  /** Debug output. */
  public  java.io.PrintStream debugStream = System.out;
  /** Set debug output. */
  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1, long active2)
{
   switch (pos)
   {
      default :
         return -1;
   }
}
private final int jjStartNfa_1(int pos, long active0, long active1, long active2)
{
   return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1, active2), pos + 1);
}
private int jjStopAtPos(int pos, int kind)
{
   jjmatchedKind = kind;
   jjmatchedPos = pos;
   return pos + 1;
}
private int jjMoveStringLiteralDfa0_1()
{
   switch(curChar)
   {
      case 33:
         return jjStopAtPos(0, 5);
      case 35:
         return jjStopAtPos(0, 12);
      case 36:
         return jjStopAtPos(0, 43);
      case 37:
         return jjStopAtPos(0, 150);
      case 38:
         return jjStopAtPos(0, 3);
      case 40:
         return jjStopAtPos(0, 40);
      case 41:
         return jjStopAtPos(0, 41);
      case 42:
         return jjStopAtPos(0, 33);
      case 43:
         jjmatchedKind = 44;
         return jjMoveStringLiteralDfa1_1(0x0L, 0x1fc0000000L);
      case 44:
         return jjStopAtPos(0, 4);
      case 45:
         jjmatchedKind = 6;
         return jjMoveStringLiteralDfa1_1(0x0L, 0x3f800000L);
      case 46:
         return jjStopAtPos(0, 149);
      case 47:
         jjmatchedKind = 7;
         return jjMoveStringLiteralDfa1_1(0x200L, 0x0L);
      case 58:
         return jjStopAtPos(0, 13);
      case 59:
         return jjStopAtPos(0, 2);
      case 61:
         return jjStopAtPos(0, 11);
      case 62:
         jjmatchedKind = 148;
         return jjMoveStringLiteralDfa1_1(0x0L, 0x80000L);
      case 63:
         return jjStopAtPos(0, 37);
      case 64:
         return jjStopAtPos(0, 15);
      case 65:
         return jjStopAtPos(0, 35);
      case 66:
         jjmatchedKind = 23;
         return jjMoveStringLiteralDfa1_1(0x80000000L, 0x0L);
      case 67:
         jjmatchedKind = 24;
         return jjMoveStringLiteralDfa1_1(0x40000000L, 0x0L);
      case 70:
         return jjStopAtPos(0, 27);
      case 73:
         return jjStopAtPos(0, 32);
      case 78:
         return jjStopAtPos(0, 25);
      case 79:
         return jjStopAtPos(0, 26);
      case 80:
         return jjStopAtPos(0, 28);
      case 83:
         return jjStopAtPos(0, 29);
      case 91:
         return jjStopAtPos(0, 39);
      case 92:
         jjmatchedKind = 8;
         return jjMoveStringLiteralDfa1_1(0x400L, 0x0L);
      case 93:
         return jjStopAtPos(0, 42);
      case 94:
         return jjStopAtPos(0, 36);
      case 97:
         jjmatchedKind = 34;
         return jjMoveStringLiteralDfa1_1(0x200000L, 0x0L);
      case 99:
         return jjStopAtPos(0, 16);
      case 110:
         return jjStopAtPos(0, 17);
      case 111:
         return jjStopAtPos(0, 18);
      case 112:
         return jjStopAtPos(0, 20);
      case 115:
         jjmatchedKind = 19;
         return jjMoveStringLiteralDfa1_1(0x400000L, 0x0L);
      case 126:
         return jjStopAtPos(0, 14);
      default :
         return jjMoveNfa_1(0, 0);
   }
}
private int jjMoveStringLiteralDfa1_1(long active0, long active2)
{
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_1(0, active0, 0L, active2);
      return 1;
   }
   switch(curChar)
   {
      case 43:
         if ((active2 & 0x40000000L) != 0L)
         {
            jjmatchedKind = 158;
            jjmatchedPos = 1;
         }
         return jjMoveStringLiteralDfa2_1(active0, 0L, active2, 0x1f80000000L);
      case 45:
         if ((active2 & 0x800000L) != 0L)
         {
            jjmatchedKind = 151;
            jjmatchedPos = 1;
         }
         return jjMoveStringLiteralDfa2_1(active0, 0L, active2, 0x3f000000L);
      case 62:
         if ((active2 & 0x80000L) != 0L)
            return jjStopAtPos(1, 147);
         break;
      case 63:
         if ((active0 & 0x200L) != 0L)
            return jjStopAtPos(1, 9);
         else if ((active0 & 0x400L) != 0L)
            return jjStopAtPos(1, 10);
         break;
      case 101:
         if ((active0 & 0x400000L) != 0L)
            return jjStopAtPos(1, 22);
         break;
      case 108:
         if ((active0 & 0x40000000L) != 0L)
            return jjStopAtPos(1, 30);
         break;
      case 114:
         if ((active0 & 0x80000000L) != 0L)
            return jjStopAtPos(1, 31);
         break;
      case 115:
         if ((active0 & 0x200000L) != 0L)
            return jjStopAtPos(1, 21);
         break;
      default :
         break;
   }
   return jjStartNfa_1(0, active0, 0L, active2);
}
private int jjMoveStringLiteralDfa2_1(long old0, long active0, long old2, long active2)
{
   if (((active0 &= old0) | (active2 &= old2)) == 0L)
      return jjStartNfa_1(0, old0, 0L, old2);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_1(1, 0L, 0L, active2);
      return 2;
   }
   switch(curChar)
   {
      case 43:
         if ((active2 & 0x80000000L) != 0L)
         {
            jjmatchedKind = 159;
            jjmatchedPos = 2;
         }
         return jjMoveStringLiteralDfa3_1(active2, 0x1f00000000L);
      case 45:
         if ((active2 & 0x1000000L) != 0L)
         {
            jjmatchedKind = 152;
            jjmatchedPos = 2;
         }
         return jjMoveStringLiteralDfa3_1(active2, 0x3e000000L);
      default :
         break;
   }
   return jjStartNfa_1(1, 0L, 0L, active2);
}
private int jjMoveStringLiteralDfa3_1(long old2, long active2)
{
   if (((active2 &= old2)) == 0L)
      return jjStartNfa_1(1, 0L, 0L, old2);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_1(2, 0L, 0L, active2);
      return 3;
   }
   switch(curChar)
   {
      case 43:
         if ((active2 & 0x100000000L) != 0L)
         {
            jjmatchedKind = 160;
            jjmatchedPos = 3;
         }
         return jjMoveStringLiteralDfa4_1(active2, 0x1e00000000L);
      case 45:
         if ((active2 & 0x2000000L) != 0L)
         {
            jjmatchedKind = 153;
            jjmatchedPos = 3;
         }
         return jjMoveStringLiteralDfa4_1(active2, 0x3c000000L);
      default :
         break;
   }
   return jjStartNfa_1(2, 0L, 0L, active2);
}
private int jjMoveStringLiteralDfa4_1(long old2, long active2)
{
   if (((active2 &= old2)) == 0L)
      return jjStartNfa_1(2, 0L, 0L, old2);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_1(3, 0L, 0L, active2);
      return 4;
   }
   switch(curChar)
   {
      case 43:
         if ((active2 & 0x200000000L) != 0L)
         {
            jjmatchedKind = 161;
            jjmatchedPos = 4;
         }
         return jjMoveStringLiteralDfa5_1(active2, 0x1c00000000L);
      case 45:
         if ((active2 & 0x4000000L) != 0L)
         {
            jjmatchedKind = 154;
            jjmatchedPos = 4;
         }
         return jjMoveStringLiteralDfa5_1(active2, 0x38000000L);
      default :
         break;
   }
   return jjStartNfa_1(3, 0L, 0L, active2);
}
private int jjMoveStringLiteralDfa5_1(long old2, long active2)
{
   if (((active2 &= old2)) == 0L)
      return jjStartNfa_1(3, 0L, 0L, old2);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_1(4, 0L, 0L, active2);
      return 5;
   }
   switch(curChar)
   {
      case 43:
         if ((active2 & 0x400000000L) != 0L)
         {
            jjmatchedKind = 162;
            jjmatchedPos = 5;
         }
         return jjMoveStringLiteralDfa6_1(active2, 0x1800000000L);
      case 45:
         if ((active2 & 0x8000000L) != 0L)
         {
            jjmatchedKind = 155;
            jjmatchedPos = 5;
         }
         return jjMoveStringLiteralDfa6_1(active2, 0x30000000L);
      default :
         break;
   }
   return jjStartNfa_1(4, 0L, 0L, active2);
}
private int jjMoveStringLiteralDfa6_1(long old2, long active2)
{
   if (((active2 &= old2)) == 0L)
      return jjStartNfa_1(4, 0L, 0L, old2);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_1(5, 0L, 0L, active2);
      return 6;
   }
   switch(curChar)
   {
      case 43:
         if ((active2 & 0x800000000L) != 0L)
         {
            jjmatchedKind = 163;
            jjmatchedPos = 6;
         }
         return jjMoveStringLiteralDfa7_1(active2, 0x1000000000L);
      case 45:
         if ((active2 & 0x10000000L) != 0L)
         {
            jjmatchedKind = 156;
            jjmatchedPos = 6;
         }
         return jjMoveStringLiteralDfa7_1(active2, 0x20000000L);
      default :
         break;
   }
   return jjStartNfa_1(5, 0L, 0L, active2);
}
private int jjMoveStringLiteralDfa7_1(long old2, long active2)
{
   if (((active2 &= old2)) == 0L)
      return jjStartNfa_1(5, 0L, 0L, old2);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_1(6, 0L, 0L, active2);
      return 7;
   }
   switch(curChar)
   {
      case 43:
         if ((active2 & 0x1000000000L) != 0L)
            return jjStopAtPos(7, 164);
         break;
      case 45:
         if ((active2 & 0x20000000L) != 0L)
            return jjStopAtPos(7, 157);
         break;
      default :
         break;
   }
   return jjStartNfa_1(6, 0L, 0L, active2);
}
private int jjMoveNfa_1(int startState, int curPos)
{
   int startsAt = 0;
   jjnewStateCnt = 2;
   int i = 1;
   jjstateSet[0] = startState;
   int kind = 0x7fffffff;
   for (;;)
   {
      if (++jjround == 0x7fffffff)
         ReInitRounds();
      if (curChar < 64)
      {
         long l = 1L << curChar;
         do
         {
            switch(jjstateSet[--i])
            {
               case 0:
                  if ((0x3ff000000000000L & l) != 0L)
                  {
                     if (kind > 38)
                        kind = 38;
                  }
                  else if ((0x100002600L & l) != 0L)
                  {
                     if (kind > 1)
                        kind = 1;
                  }
                  break;
               case 1:
                  if ((0x3ff000000000000L & l) != 0L)
                     kind = 38;
                  break;
               default : break;
            }
         } while(i != startsAt);
      }
      else if (curChar < 128)
      {
         long l = 1L << (curChar & 077);
         do
         {
            switch(jjstateSet[--i])
            {
               default : break;
            }
         } while(i != startsAt);
      }
      else
      {
         int i2 = (curChar & 0xff) >> 6;
         long l2 = 1L << (curChar & 077);
         do
         {
            switch(jjstateSet[--i])
            {
               default : break;
            }
         } while(i != startsAt);
      }
      if (kind != 0x7fffffff)
      {
         jjmatchedKind = kind;
         jjmatchedPos = curPos;
         kind = 0x7fffffff;
      }
      ++curPos;
      if ((i = jjnewStateCnt) == (startsAt = 2 - (jjnewStateCnt = startsAt)))
         return curPos;
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) { return curPos; }
   }
}
private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1, long active2)
{
   switch (pos)
   {
      default :
         return -1;
   }
}
private final int jjStartNfa_0(int pos, long active0, long active1, long active2)
{
   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1, active2), pos + 1);
}
private int jjMoveStringLiteralDfa0_0()
{
   switch(curChar)
   {
      case 33:
         return jjStopAtPos(0, 5);
      case 35:
         jjmatchedKind = 12;
         return jjMoveStringLiteralDfa1_0(0x20000000000000L, 0x0L, 0x0L);
      case 36:
         return jjStopAtPos(0, 43);
      case 38:
         return jjStopAtPos(0, 3);
      case 40:
         return jjStopAtPos(0, 40);
      case 41:
         return jjStopAtPos(0, 41);
      case 42:
         return jjStopAtPos(0, 33);
      case 43:
         return jjStopAtPos(0, 44);
      case 44:
         return jjStopAtPos(0, 4);
      case 45:
         return jjStopAtPos(0, 6);
      case 47:
         jjmatchedKind = 7;
         return jjMoveStringLiteralDfa1_0(0x200L, 0x0L, 0x0L);
      case 58:
         return jjStopAtPos(0, 13);
      case 59:
         return jjStopAtPos(0, 2);
      case 61:
         return jjStopAtPos(0, 11);
      case 63:
         return jjStopAtPos(0, 37);
      case 64:
         return jjStopAtPos(0, 15);
      case 65:
         jjmatchedKind = 35;
         return jjMoveStringLiteralDfa1_0(0xa000000000000000L, 0x422080004002000L, 0x0L);
      case 66:
         jjmatchedKind = 23;
         return jjMoveStringLiteralDfa1_0(0x200000080000000L, 0x1000800400000000L, 0x0L);
      case 67:
         jjmatchedKind = 24;
         return jjMoveStringLiteralDfa1_0(0x40000000L, 0x2800000208000292L, 0x10L);
      case 68:
         jjmatchedKind = 46;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x800L);
      case 69:
         return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000000000000L, 0x2100L);
      case 70:
         jjmatchedKind = 27;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x8008000000000040L, 0x0L);
      case 71:
         jjmatchedKind = 52;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x1800L, 0x200L);
      case 72:
         jjmatchedKind = 54;
         return jjMoveStringLiteralDfa1_0(0x80000000000000L, 0x101000000000L, 0x1000L);
      case 73:
         jjmatchedKind = 32;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x20010000000L, 0x0L);
      case 75:
         jjmatchedKind = 64;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x8000L, 0x0L);
      case 76:
         return jjMoveStringLiteralDfa1_0(0x100000000000000L, 0x800000000L, 0x10004L);
      case 77:
         return jjMoveStringLiteralDfa1_0(0x1000000000000000L, 0x200020L, 0x1L);
      case 78:
         jjmatchedKind = 25;
         return jjMoveStringLiteralDfa1_0(0xc00000000000000L, 0x100100L, 0x2aL);
      case 79:
         jjmatchedKind = 26;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x10000000000L, 0x0L);
      case 80:
         jjmatchedKind = 28;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x281440002000000L, 0x20040L);
      case 82:
         jjmatchedKind = 47;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x14008001810000L, 0x0L);
      case 83:
         jjmatchedKind = 29;
         return jjMoveStringLiteralDfa1_0(0x4000000000000000L, 0x60024000L, 0x40080L);
      case 84:
         return jjMoveStringLiteralDfa1_0(0x0L, 0x40202080400004L, 0x4400L);
      case 85:
         return jjStopAtPos(0, 120);
      case 86:
         return jjStopAtPos(0, 67);
      case 87:
         return jjStopAtPos(0, 102);
      case 88:
         jjmatchedKind = 50;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x100000000L, 0x0L);
      case 89:
         jjmatchedKind = 82;
         return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x8000L);
      case 90:
         return jjMoveStringLiteralDfa1_0(0x0L, 0x80400L, 0x0L);
      case 91:
         return jjStopAtPos(0, 39);
      case 92:
         jjmatchedKind = 8;
         return jjMoveStringLiteralDfa1_0(0x400L, 0x0L, 0x0L);
      case 93:
         return jjStopAtPos(0, 42);
      case 94:
         return jjStopAtPos(0, 36);
      case 97:
         jjmatchedKind = 34;
         return jjMoveStringLiteralDfa1_0(0x200000L, 0x0L, 0x0L);
      case 99:
         return jjStopAtPos(0, 16);
      case 104:
         return jjStopAtPos(0, 45);
      case 110:
         return jjStopAtPos(0, 17);
      case 111:
         return jjStopAtPos(0, 18);
      case 112:
         return jjStopAtPos(0, 20);
      case 114:
         return jjStopAtPos(0, 48);
      case 115:
         jjmatchedKind = 19;
         return jjMoveStringLiteralDfa1_0(0x400000L, 0x0L, 0x0L);
      case 118:
         return jjStopAtPos(0, 49);
      case 120:
         return jjStopAtPos(0, 51);
      case 126:
         return jjStopAtPos(0, 14);
      default :
         return jjMoveNfa_0(0, 0);
   }
}
private int jjMoveStringLiteralDfa1_0(long active0, long active1, long active2)
{
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_0(0, active0, active1, active2);
      return 1;
   }
   switch(curChar)
   {
      case 63:
         if ((active0 & 0x200L) != 0L)
            return jjStopAtPos(1, 9);
         else if ((active0 & 0x400L) != 0L)
            return jjStopAtPos(1, 10);
         break;
      case 88:
         if ((active0 & 0x20000000000000L) != 0L)
            return jjStopAtPos(1, 53);
         break;
      case 97:
         if ((active0 & 0x800000000000000L) != 0L)
            return jjStopAtPos(1, 59);
         else if ((active1 & 0x2L) != 0L)
            return jjStopAtPos(1, 65);
         else if ((active1 & 0x800L) != 0L)
            return jjStopAtPos(1, 75);
         else if ((active1 & 0x400000000L) != 0L)
            return jjStopAtPos(1, 98);
         else if ((active1 & 0x800000000L) != 0L)
            return jjStopAtPos(1, 99);
         else if ((active1 & 0x2000000000L) != 0L)
            return jjStopAtPos(1, 101);
         else if ((active1 & 0x10000000000000L) != 0L)
            return jjStopAtPos(1, 116);
         else if ((active1 & 0x80000000000000L) != 0L)
            return jjStopAtPos(1, 119);
         break;
      case 98:
         if ((active1 & 0x10000L) != 0L)
            return jjStopAtPos(1, 80);
         else if ((active1 & 0x100000L) != 0L)
            return jjStopAtPos(1, 84);
         else if ((active1 & 0x40000000L) != 0L)
            return jjStopAtPos(1, 94);
         else if ((active1 & 0x400000000000L) != 0L)
            return jjStopAtPos(1, 110);
         else if ((active2 & 0x400L) != 0L)
            return jjStopAtPos(1, 138);
         else if ((active2 & 0x8000L) != 0L)
            return jjStopAtPos(1, 143);
         break;
      case 99:
         if ((active1 & 0x400000L) != 0L)
            return jjStopAtPos(1, 86);
         else if ((active1 & 0x20000000000000L) != 0L)
            return jjStopAtPos(1, 117);
         else if ((active2 & 0x40000L) != 0L)
            return jjStopAtPos(1, 146);
         break;
      case 100:
         if ((active1 & 0x2000000L) != 0L)
            return jjStopAtPos(1, 89);
         else if ((active1 & 0x8000000L) != 0L)
            return jjStopAtPos(1, 91);
         else if ((active2 & 0x1L) != 0L)
            return jjStopAtPos(1, 128);
         else if ((active2 & 0x20L) != 0L)
            return jjStopAtPos(1, 133);
         else if ((active2 & 0x200L) != 0L)
            return jjStopAtPos(1, 137);
         break;
      case 101:
         if ((active0 & 0x400000L) != 0L)
            return jjStopAtPos(1, 22);
         else if ((active0 & 0x80000000000000L) != 0L)
            return jjStopAtPos(1, 55);
         else if ((active0 & 0x200000000000000L) != 0L)
            return jjStopAtPos(1, 57);
         else if ((active0 & 0x400000000000000L) != 0L)
            return jjStopAtPos(1, 58);
         else if ((active1 & 0x40L) != 0L)
            return jjStopAtPos(1, 70);
         else if ((active1 & 0x1000L) != 0L)
            return jjStopAtPos(1, 76);
         else if ((active1 & 0x4000L) != 0L)
            return jjStopAtPos(1, 78);
         else if ((active1 & 0x80000000L) != 0L)
            return jjStopAtPos(1, 95);
         else if ((active1 & 0x100000000L) != 0L)
            return jjStopAtPos(1, 96);
         else if ((active1 & 0x8000000000L) != 0L)
            return jjStopAtPos(1, 103);
         else if ((active2 & 0x10L) != 0L)
            return jjStopAtPos(1, 132);
         break;
      case 102:
         if ((active1 & 0x1000000000L) != 0L)
            return jjStopAtPos(1, 100);
         else if ((active1 & 0x2000000000000000L) != 0L)
            return jjStopAtPos(1, 125);
         break;
      case 103:
         if ((active0 & 0x1000000000000000L) != 0L)
            return jjStopAtPos(1, 60);
         else if ((active1 & 0x4000000L) != 0L)
            return jjStopAtPos(1, 90);
         else if ((active1 & 0x100000000000L) != 0L)
            return jjStopAtPos(1, 108);
         break;
      case 104:
         if ((active1 & 0x1000000L) != 0L)
            return jjStopAtPos(1, 88);
         else if ((active1 & 0x40000000000000L) != 0L)
            return jjStopAtPos(1, 118);
         break;
      case 105:
         if ((active0 & 0x100000000000000L) != 0L)
            return jjStopAtPos(1, 56);
         else if ((active0 & 0x4000000000000000L) != 0L)
            return jjStopAtPos(1, 62);
         else if ((active1 & 0x4L) != 0L)
            return jjStopAtPos(1, 66);
         else if ((active1 & 0x100L) != 0L)
            return jjStopAtPos(1, 72);
         else if ((active1 & 0x800000000000L) != 0L)
            return jjStopAtPos(1, 111);
         break;
      case 107:
         if ((active1 & 0x1000000000000000L) != 0L)
            return jjStopAtPos(1, 124);
         break;
      case 108:
         if ((active0 & 0x40000000L) != 0L)
            return jjStopAtPos(1, 30);
         else if ((active0 & 0x2000000000000000L) != 0L)
            return jjStopAtPos(1, 61);
         else if ((active1 & 0x200000000000L) != 0L)
            return jjStopAtPos(1, 109);
         break;
      case 109:
         if ((active1 & 0x400000000000000L) != 0L)
            return jjStopAtPos(1, 122);
         else if ((active1 & 0x800000000000000L) != 0L)
            return jjStopAtPos(1, 123);
         else if ((active1 & 0x8000000000000000L) != 0L)
            return jjStopAtPos(1, 127);
         else if ((active2 & 0x40L) != 0L)
            return jjStopAtPos(1, 134);
         else if ((active2 & 0x80L) != 0L)
            return jjStopAtPos(1, 135);
         else if ((active2 & 0x4000L) != 0L)
            return jjStopAtPos(1, 142);
         break;
      case 110:
         if ((active1 & 0x20L) != 0L)
            return jjStopAtPos(1, 69);
         else if ((active1 & 0x400L) != 0L)
            return jjStopAtPos(1, 74);
         else if ((active1 & 0x10000000L) != 0L)
            return jjStopAtPos(1, 92);
         else if ((active1 & 0x20000000L) != 0L)
            return jjStopAtPos(1, 93);
         else if ((active1 & 0x4000000000000L) != 0L)
            return jjStopAtPos(1, 114);
         break;
      case 111:
         if ((active1 & 0x80L) != 0L)
            return jjStopAtPos(1, 71);
         else if ((active1 & 0x200000L) != 0L)
            return jjStopAtPos(1, 85);
         else if ((active1 & 0x1000000000000L) != 0L)
            return jjStopAtPos(1, 112);
         else if ((active2 & 0x2L) != 0L)
            return jjStopAtPos(1, 129);
         else if ((active2 & 0x1000L) != 0L)
            return jjStopAtPos(1, 140);
         break;
      case 112:
         if ((active2 & 0x8L) != 0L)
            return jjStopAtPos(1, 131);
         break;
      case 114:
         if ((active0 & 0x80000000L) != 0L)
            return jjStopAtPos(1, 31);
         else if ((active0 & 0x8000000000000000L) != 0L)
            return jjStopAtPos(1, 63);
         else if ((active1 & 0x10L) != 0L)
            return jjStopAtPos(1, 68);
         else if ((active1 & 0x8000L) != 0L)
            return jjStopAtPos(1, 79);
         else if ((active1 & 0x20000L) != 0L)
            return jjStopAtPos(1, 81);
         else if ((active1 & 0x80000L) != 0L)
            return jjStopAtPos(1, 83);
         else if ((active1 & 0x20000000000L) != 0L)
            return jjStopAtPos(1, 105);
         else if ((active1 & 0x8000000000000L) != 0L)
            return jjStopAtPos(1, 115);
         else if ((active2 & 0x4L) != 0L)
            return jjStopAtPos(1, 130);
         else if ((active2 & 0x2000L) != 0L)
            return jjStopAtPos(1, 141);
         else if ((active2 & 0x20000L) != 0L)
            return jjStopAtPos(1, 145);
         break;
      case 115:
         if ((active0 & 0x200000L) != 0L)
            return jjStopAtPos(1, 21);
         else if ((active1 & 0x2000L) != 0L)
            return jjStopAtPos(1, 77);
         else if ((active1 & 0x200000000L) != 0L)
            return jjStopAtPos(1, 97);
         else if ((active1 & 0x10000000000L) != 0L)
            return jjStopAtPos(1, 104);
         else if ((active1 & 0x4000000000000000L) != 0L)
            return jjStopAtPos(1, 126);
         break;
      case 116:
         if ((active1 & 0x40000000000L) != 0L)
            return jjStopAtPos(1, 106);
         else if ((active1 & 0x2000000000000L) != 0L)
            return jjStopAtPos(1, 113);
         break;
      case 117:
         if ((active1 & 0x200L) != 0L)
            return jjStopAtPos(1, 73);
         else if ((active1 & 0x800000L) != 0L)
            return jjStopAtPos(1, 87);
         else if ((active1 & 0x80000000000L) != 0L)
            return jjStopAtPos(1, 107);
         else if ((active1 & 0x200000000000000L) != 0L)
            return jjStopAtPos(1, 121);
         else if ((active2 & 0x100L) != 0L)
            return jjStopAtPos(1, 136);
         else if ((active2 & 0x10000L) != 0L)
            return jjStopAtPos(1, 144);
         break;
      case 121:
         if ((active2 & 0x800L) != 0L)
            return jjStopAtPos(1, 139);
         break;
      default :
         break;
   }
   return jjStartNfa_0(0, active0, active1, active2);
}
private int jjMoveNfa_0(int startState, int curPos)
{
   int startsAt = 0;
   jjnewStateCnt = 2;
   int i = 1;
   jjstateSet[0] = startState;
   int kind = 0x7fffffff;
   for (;;)
   {
      if (++jjround == 0x7fffffff)
         ReInitRounds();
      if (curChar < 64)
      {
         long l = 1L << curChar;
         do
         {
            switch(jjstateSet[--i])
            {
               case 0:
                  if ((0x3ff000000000000L & l) != 0L)
                  {
                     if (kind > 38)
                        kind = 38;
                  }
                  else if ((0x100002600L & l) != 0L)
                  {
                     if (kind > 1)
                        kind = 1;
                  }
                  break;
               case 1:
                  if ((0x3ff000000000000L & l) != 0L)
                     kind = 38;
                  break;
               default : break;
            }
         } while(i != startsAt);
      }
      else if (curChar < 128)
      {
         long l = 1L << (curChar & 077);
         do
         {
            switch(jjstateSet[--i])
            {
               default : break;
            }
         } while(i != startsAt);
      }
      else
      {
         int i2 = (curChar & 0xff) >> 6;
         long l2 = 1L << (curChar & 077);
         do
         {
            switch(jjstateSet[--i])
            {
               default : break;
            }
         } while(i != startsAt);
      }
      if (kind != 0x7fffffff)
      {
         jjmatchedKind = kind;
         jjmatchedPos = curPos;
         kind = 0x7fffffff;
      }
      ++curPos;
      if ((i = jjnewStateCnt) == (startsAt = 2 - (jjnewStateCnt = startsAt)))
         return curPos;
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) { return curPos; }
   }
}
static final int[] jjnextStates = {
};

/** Token literal values. */
public static final String[] jjstrLiteralImages = {
"", null, "\73", "\46", "\54", "\41", "\55", "\57", "\134", "\57\77", 
"\134\77", "\75", "\43", "\72", "\176", "\100", "\143", "\156", "\157", "\163", "\160", 
"\141\163", "\163\145", "\102", "\103", "\116", "\117", "\106", "\120", "\123", 
"\103\154", "\102\162", "\111", "\52", "\141", "\101", "\136", "\77", null, "\133", "\50", 
"\51", "\135", "\44", "\53", "\150", "\104", "\122", "\162", "\166", "\130", "\170", 
"\107", "\43\130", "\110", "\110\145", "\114\151", "\102\145", "\116\145", "\116\141", 
"\115\147", "\101\154", "\123\151", "\101\162", "\113", "\103\141", "\124\151", "\126", 
"\103\162", "\115\156", "\106\145", "\103\157", "\116\151", "\103\165", "\132\156", 
"\107\141", "\107\145", "\101\163", "\123\145", "\113\162", "\122\142", "\123\162", 
"\131", "\132\162", "\116\142", "\115\157", "\124\143", "\122\165", "\122\150", 
"\120\144", "\101\147", "\103\144", "\111\156", "\123\156", "\123\142", "\124\145", 
"\130\145", "\103\163", "\102\141", "\114\141", "\110\146", "\124\141", "\127", 
"\122\145", "\117\163", "\111\162", "\120\164", "\101\165", "\110\147", "\124\154", 
"\120\142", "\102\151", "\120\157", "\101\164", "\122\156", "\106\162", "\122\141", 
"\101\143", "\124\150", "\120\141", "\125", "\120\165", "\101\155", "\103\155", 
"\102\153", "\103\146", "\105\163", "\106\155", "\115\144", "\116\157", "\114\162", 
"\116\160", "\103\145", "\116\144", "\120\155", "\123\155", "\105\165", "\107\144", 
"\124\142", "\104\171", "\110\157", "\105\162", "\124\155", "\131\142", "\114\165", 
"\120\162", "\123\143", "\76\76", "\76", "\56", "\45", "\55\55", "\55\55\55", 
"\55\55\55\55", "\55\55\55\55\55", "\55\55\55\55\55\55", "\55\55\55\55\55\55\55", 
"\55\55\55\55\55\55\55\55", "\53\53", "\53\53\53", "\53\53\53\53", "\53\53\53\53\53", 
"\53\53\53\53\53\53", "\53\53\53\53\53\53\53", "\53\53\53\53\53\53\53\53", };

/** Lexer state names. */
public static final String[] lexStateNames = {
   "ATOM_EXPRESSION",
   "DEFAULT",
};

/** Lex State array. */
public static final int[] jjnewLexState = {
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 
};
protected SimpleCharStream input_stream;
private final int[] jjrounds = new int[2];
private final int[] jjstateSet = new int[4];
protected char curChar;
/** Constructor. */
public SMARTSParserTokenManager(SimpleCharStream stream){
   if (SimpleCharStream.staticFlag)
      throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
   input_stream = stream;
}

/** Constructor. */
public SMARTSParserTokenManager(SimpleCharStream stream, int lexState){
   this(stream);
   SwitchTo(lexState);
}

/** Reinitialise parser. */
public void ReInit(SimpleCharStream stream)
{
   jjmatchedPos = jjnewStateCnt = 0;
   curLexState = defaultLexState;
   input_stream = stream;
   ReInitRounds();
}
private void ReInitRounds()
{
   int i;
   jjround = 0x80000001;
   for (i = 2; i-- > 0;)
      jjrounds[i] = 0x80000000;
}

/** Reinitialise parser. */
public void ReInit(SimpleCharStream stream, int lexState)
{
   ReInit(stream);
   SwitchTo(lexState);
}

/** Switch to specified lex state. */
public void SwitchTo(int lexState)
{
   if (lexState >= 2 || lexState < 0)
      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
   else
      curLexState = lexState;
}

protected Token jjFillToken()
{
   final Token t;
   final String curTokenImage;
   final int beginLine;
   final int endLine;
   final int beginColumn;
   final int endColumn;
   String im = jjstrLiteralImages[jjmatchedKind];
   curTokenImage = (im == null) ? input_stream.GetImage() : im;
   beginLine = input_stream.getBeginLine();
   beginColumn = input_stream.getBeginColumn();
   endLine = input_stream.getEndLine();
   endColumn = input_stream.getEndColumn();
   t = Token.newToken(jjmatchedKind, curTokenImage);

   t.beginLine = beginLine;
   t.endLine = endLine;
   t.beginColumn = beginColumn;
   t.endColumn = endColumn;

   return t;
}

int curLexState = 1;
int defaultLexState = 1;
int jjnewStateCnt;
int jjround;
int jjmatchedPos;
int jjmatchedKind;

/** Get the next Token. */
public Token getNextToken() 
{
  Token matchedToken;
  int curPos = 0;

  EOFLoop :
  for (;;)
  {
   try
   {
      curChar = input_stream.BeginToken();
   }
   catch(java.io.IOException e)
   {
      jjmatchedKind = 0;
      matchedToken = jjFillToken();
      return matchedToken;
   }

   switch(curLexState)
   {
     case 0:
       jjmatchedKind = 0x7fffffff;
       jjmatchedPos = 0;
       curPos = jjMoveStringLiteralDfa0_0();
       break;
     case 1:
       jjmatchedKind = 0x7fffffff;
       jjmatchedPos = 0;
       curPos = jjMoveStringLiteralDfa0_1();
       break;
   }
     if (jjmatchedKind != 0x7fffffff)
     {
        if (jjmatchedPos + 1 < curPos)
           input_stream.backup(curPos - jjmatchedPos - 1);
           matchedToken = jjFillToken();
       if (jjnewLexState[jjmatchedKind] != -1)
         curLexState = jjnewLexState[jjmatchedKind];
           return matchedToken;
     }
     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);
  }
}

private void jjCheckNAdd(int state)
{
   if (jjrounds[state] != jjround)
   {
      jjstateSet[jjnewStateCnt++] = state;
      jjrounds[state] = jjround;
   }
}
private void jjAddStates(int start, int end)
{
   do {
      jjstateSet[jjnewStateCnt++] = jjnextStates[start];
   } while (start++ != end);
}
private void jjCheckNAddTwoStates(int state1, int state2)
{
   jjCheckNAdd(state1);
   jjCheckNAdd(state2);
}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy