/* TurtleParserTokenManager.java */
/* Generated By:JavaCC: Do not edit this line. TurtleParserTokenManager.java */
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 *
 *   SPDX-License-Identifier: Apache-2.0
 */

package org.apache.jena.core_ttl.parser.javacc;
import org.apache.jena.core_ttl.parser.*;
import org.apache.jena.graph.*;

/** Token Manager. */
@SuppressWarnings ("unused")
public class TurtleParserTokenManager implements TurtleParserConstants {

  /** Debug output. */
  public  java.io.PrintStream debugStream = System.out;
  /** Set debug output. */
  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
private int jjStopAtPos(int pos, int kind)
{
   jjmatchedKind = kind;
   jjmatchedPos = pos;
   return pos + 1;
}
private int jjMoveStringLiteralDfa0_0(){
   switch(curChar)
   {
      case 9:
         jjmatchedKind = 7;
         return jjMoveNfa_0(0, 0);
      case 10:
         jjmatchedKind = 8;
         return jjMoveNfa_0(0, 0);
      case 12:
         jjmatchedKind = 10;
         return jjMoveNfa_0(0, 0);
      case 13:
         jjmatchedKind = 9;
         return jjMoveNfa_0(0, 0);
      case 32:
         jjmatchedKind = 6;
         return jjMoveNfa_0(0, 0);
      case 33:
         jjmatchedKind = 1;
         return jjMoveNfa_0(0, 0);
      case 36:
         jjmatchedKind = 51;
         return jjMoveNfa_0(0, 0);
      case 40:
         jjmatchedKind = 38;
         return jjMoveNfa_0(0, 0);
      case 41:
         jjmatchedKind = 39;
         return jjMoveNfa_0(0, 0);
      case 42:
         jjmatchedKind = 55;
         return jjMoveNfa_0(0, 0);
      case 44:
         jjmatchedKind = 47;
         return jjMoveNfa_0(0, 0);
      case 45:
         return jjMoveStringLiteralDfa1_0(0x10L);
      case 46:
         jjmatchedKind = 48;
         return jjMoveNfa_0(0, 0);
      case 47:
         jjmatchedKind = 56;
         return jjMoveNfa_0(0, 0);
      case 58:
         jjmatchedKind = 54;
         return jjMoveNfa_0(0, 0);
      case 59:
         jjmatchedKind = 46;
         return jjMoveNfa_0(0, 0);
      case 60:
         return jjMoveStringLiteralDfa1_0(0x20L);
      case 61:
         jjmatchedKind = 49;
         return jjMoveStringLiteralDfa1_0(0x4000000000000L);
      case 63:
         jjmatchedKind = 52;
         return jjMoveNfa_0(0, 0);
      case 64:
         jjmatchedKind = 60;
         return jjMoveStringLiteralDfa1_0(0xc000L);
      case 70:
         return jjMoveStringLiteralDfa1_0(0x20000L);
      case 84:
         return jjMoveStringLiteralDfa1_0(0x10000L);
      case 91:
         jjmatchedKind = 43;
         return jjMoveNfa_0(0, 0);
      case 92:
         jjmatchedKind = 57;
         return jjMoveNfa_0(0, 0);
      case 93:
         jjmatchedKind = 44;
         return jjMoveNfa_0(0, 0);
      case 94:
         jjmatchedKind = 3;
         return jjMoveStringLiteralDfa1_0(0x800000000000000L);
      case 97:
         jjmatchedKind = 13;
         return jjMoveNfa_0(0, 0);
      case 102:
         return jjMoveStringLiteralDfa1_0(0x20000L);
      case 116:
         return jjMoveStringLiteralDfa1_0(0x10000L);
      case 123:
         jjmatchedKind = 41;
         return jjMoveNfa_0(0, 0);
      case 124:
         jjmatchedKind = 2;
         return jjMoveNfa_0(0, 0);
      case 125:
         jjmatchedKind = 42;
         return jjMoveNfa_0(0, 0);
      case 126:
         jjmatchedKind = 53;
         return jjMoveNfa_0(0, 0);
      case 65279:
         jjmatchedKind = 58;
         return jjMoveNfa_0(0, 0);
      default :
         return jjMoveNfa_0(0, 0);
   }
}
private int jjMoveStringLiteralDfa1_0(long active0){
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
   return jjMoveNfa_0(0, 0);
   }
   switch(curChar)
   {
      case 45:
         if ((active0 & 0x20L) != 0L)
         {
            jjmatchedKind = 5;
            jjmatchedPos = 1;
         }
         break;
      case 62:
         if ((active0 & 0x10L) != 0L)
         {
            jjmatchedKind = 4;
            jjmatchedPos = 1;
         }
         else if ((active0 & 0x4000000000000L) != 0L)
         {
            jjmatchedKind = 50;
            jjmatchedPos = 1;
         }
         break;
      case 65:
         return jjMoveStringLiteralDfa2_0(active0, 0x20000L);
      case 82:
         return jjMoveStringLiteralDfa2_0(active0, 0x10000L);
      case 94:
         if ((active0 & 0x800000000000000L) != 0L)
         {
            jjmatchedKind = 59;
            jjmatchedPos = 1;
         }
         break;
      case 97:
         return jjMoveStringLiteralDfa2_0(active0, 0x20000L);
      case 98:
         return jjMoveStringLiteralDfa2_0(active0, 0x8000L);
      case 112:
         return jjMoveStringLiteralDfa2_0(active0, 0x4000L);
      case 114:
         return jjMoveStringLiteralDfa2_0(active0, 0x10000L);
      default :
         break;
   }
   return jjMoveNfa_0(0, 1);
}
private int jjMoveStringLiteralDfa2_0(long old0, long active0){
   if (((active0 &= old0)) == 0L)
      return jjMoveNfa_0(0, 1);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
   return jjMoveNfa_0(0, 1);
   }
   switch(curChar)
   {
      case 76:
         return jjMoveStringLiteralDfa3_0(active0, 0x20000L);
      case 85:
         return jjMoveStringLiteralDfa3_0(active0, 0x10000L);
      case 97:
         return jjMoveStringLiteralDfa3_0(active0, 0x8000L);
      case 108:
         return jjMoveStringLiteralDfa3_0(active0, 0x20000L);
      case 114:
         return jjMoveStringLiteralDfa3_0(active0, 0x4000L);
      case 117:
         return jjMoveStringLiteralDfa3_0(active0, 0x10000L);
      default :
         break;
   }
   return jjMoveNfa_0(0, 2);
}
private int jjMoveStringLiteralDfa3_0(long old0, long active0){
   if (((active0 &= old0)) == 0L)
      return jjMoveNfa_0(0, 2);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
   return jjMoveNfa_0(0, 2);
   }
   switch(curChar)
   {
      case 69:
         if ((active0 & 0x10000L) != 0L)
         {
            jjmatchedKind = 16;
            jjmatchedPos = 3;
         }
         break;
      case 83:
         return jjMoveStringLiteralDfa4_0(active0, 0x20000L);
      case 101:
         if ((active0 & 0x10000L) != 0L)
         {
            jjmatchedKind = 16;
            jjmatchedPos = 3;
         }
         return jjMoveStringLiteralDfa4_0(active0, 0x4000L);
      case 115:
         return jjMoveStringLiteralDfa4_0(active0, 0x28000L);
      default :
         break;
   }
   return jjMoveNfa_0(0, 3);
}
private int jjMoveStringLiteralDfa4_0(long old0, long active0){
   if (((active0 &= old0)) == 0L)
      return jjMoveNfa_0(0, 3);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
   return jjMoveNfa_0(0, 3);
   }
   switch(curChar)
   {
      case 69:
         if ((active0 & 0x20000L) != 0L)
         {
            jjmatchedKind = 17;
            jjmatchedPos = 4;
         }
         break;
      case 101:
         if ((active0 & 0x8000L) != 0L)
         {
            jjmatchedKind = 15;
            jjmatchedPos = 4;
         }
         else if ((active0 & 0x20000L) != 0L)
         {
            jjmatchedKind = 17;
            jjmatchedPos = 4;
         }
         break;
      case 102:
         return jjMoveStringLiteralDfa5_0(active0, 0x4000L);
      default :
         break;
   }
   return jjMoveNfa_0(0, 4);
}
private int jjMoveStringLiteralDfa5_0(long old0, long active0){
   if (((active0 &= old0)) == 0L)
      return jjMoveNfa_0(0, 4);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
   return jjMoveNfa_0(0, 4);
   }
   switch(curChar)
   {
      case 105:
         return jjMoveStringLiteralDfa6_0(active0, 0x4000L);
      default :
         break;
   }
   return jjMoveNfa_0(0, 5);
}
private int jjMoveStringLiteralDfa6_0(long old0, long active0){
   if (((active0 &= old0)) == 0L)
      return jjMoveNfa_0(0, 5);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
   return jjMoveNfa_0(0, 5);
   }
   switch(curChar)
   {
      case 120:
         if ((active0 & 0x4000L) != 0L)
         {
            jjmatchedKind = 14;
            jjmatchedPos = 6;
         }
         break;
      default :
         break;
   }
   return jjMoveNfa_0(0, 6);
}
static final long[] jjbitVec0 = {
   0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
};
static final long[] jjbitVec2 = {
   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
};
static final long[] jjbitVec3 = {
   0xfffe7000fffffff6L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0x7e00000000ffffffL
};
static final long[] jjbitVec4 = {
   0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
};
static final long[] jjbitVec5 = {
   0x0L, 0xbfff000000000000L, 0xffffffffffffffffL, 0xffffffffffffffffL
};
static final long[] jjbitVec6 = {
   0x3000L, 0xffff000000000000L, 0xffffffffffffffffL, 0xffffffffffffffffL
};
static final long[] jjbitVec7 = {
   0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L
};
static final long[] jjbitVec8 = {
   0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffL
};
static final long[] jjbitVec9 = {
   0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0x3fffffffffffffffL
};
static final long[] jjbitVec10 = {
   0x0L, 0x0L, 0x80000000000000L, 0xff7fffffff7fffffL
};
static final long[] jjbitVec11 = {
   0xffffffffffffffffL, 0xbfffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
};
static final long[] jjbitVec12 = {
   0x8000000000003000L, 0xffff000000000001L, 0xffffffffffffffffL, 0xffffffffffffffffL
};
private int jjMoveNfa_0(int startState, int curPos)
{
   int strKind = jjmatchedKind;
   int strPos = jjmatchedPos;
   int seenUpto;
   input_stream.backup(seenUpto = curPos + 1);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) { throw new Error("Internal Error"); }
   curPos = 0;
   int startsAt = 0;
   jjnewStateCnt = 109;
   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 > 18)
                        kind = 18;
                     { jjCheckNAddStates(0, 7); }
                  }
                  else if ((0x280000000000L & l) != 0L)
                     { jjCheckNAddStates(8, 12); }
                  else if (curChar == 58)
                  {
                     if (kind > 31)
                        kind = 31;
                     { jjCheckNAdd(105); }
                  }
                  else if (curChar == 46)
                     { jjCheckNAddTwoStates(78, 80); }
                  else if (curChar == 40)
                     { jjCheckNAddStates(13, 15); }
                  else if (curChar == 60)
                     { jjCheckNAddTwoStates(42, 43); }
                  else if (curChar == 34)
                     jjstateSet[jjnewStateCnt++] = 39;
                  else if (curChar == 39)
                     jjstateSet[jjnewStateCnt++] = 27;
                  else if (curChar == 35)
                  {
                     if (kind > 12)
                        kind = 12;
                     { jjCheckNAddStates(16, 18); }
                  }
                  else if (curChar == 63)
                     jjstateSet[jjnewStateCnt++] = 50;
                  if (curChar == 34)
                     { jjCheckNAddStates(19, 21); }
                  else if (curChar == 39)
                     { jjCheckNAddStates(22, 24); }
                  break;
               case 1:
                  if ((0xffffffffffffdbffL & l) == 0L)
                     break;
                  if (kind > 12)
                     kind = 12;
                  { jjCheckNAddStates(16, 18); }
                  break;
               case 2:
                  if ((0x2400L & l) != 0L && kind > 12)
                     kind = 12;
                  break;
               case 3:
                  if (curChar == 10 && kind > 12)
                     kind = 12;
                  break;
               case 4:
                  if (curChar == 13)
                     jjstateSet[jjnewStateCnt++] = 3;
                  break;
               case 6:
                  if ((0x8400000000L & l) != 0L && kind > 24)
                     kind = 24;
                  break;
               case 7:
                  if (curChar == 39)
                     { jjCheckNAddStates(22, 24); }
                  break;
               case 8:
                  if ((0xffffff7fffffdbffL & l) != 0L)
                     { jjCheckNAddStates(22, 24); }
                  break;
               case 10:
                  if ((0x8400000000L & l) != 0L)
                     { jjCheckNAddStates(22, 24); }
                  break;
               case 11:
                  if (curChar == 39 && kind > 25)
                     kind = 25;
                  break;
               case 12:
                  if (curChar == 34)
                     { jjCheckNAddStates(19, 21); }
                  break;
               case 13:
                  if ((0xfffffffbffffdbffL & l) != 0L)
                     { jjCheckNAddStates(19, 21); }
                  break;
               case 15:
                  if ((0x8400000000L & l) != 0L)
                     { jjCheckNAddStates(19, 21); }
                  break;
               case 16:
                  if (curChar == 34 && kind > 26)
                     kind = 26;
                  break;
               case 17:
                  if (curChar == 39)
                     { jjCheckNAddStates(25, 28); }
                  break;
               case 18:
               case 22:
                  if ((0xffffff7fffffffffL & l) != 0L)
                     { jjCheckNAddStates(25, 28); }
                  break;
               case 20:
                  if ((0x8400000000L & l) != 0L)
                     { jjCheckNAddStates(25, 28); }
                  break;
               case 21:
               case 24:
                  if (curChar == 39)
                     { jjCheckNAdd(22); }
                  break;
               case 23:
                  if (curChar == 39)
                     { jjAddStates(29, 30); }
                  break;
               case 25:
                  if (curChar == 39 && kind > 27)
                     kind = 27;
                  break;
               case 26:
                  if (curChar == 39)
                     jjstateSet[jjnewStateCnt++] = 25;
                  break;
               case 27:
                  if (curChar == 39)
                     jjstateSet[jjnewStateCnt++] = 17;
                  break;
               case 28:
                  if (curChar == 39)
                     jjstateSet[jjnewStateCnt++] = 27;
                  break;
               case 29:
                  if (curChar == 34)
                     { jjCheckNAddStates(31, 34); }
                  break;
               case 30:
               case 34:
                  if ((0xfffffffbffffffffL & l) != 0L)
                     { jjCheckNAddStates(31, 34); }
                  break;
               case 32:
                  if ((0x8400000000L & l) != 0L)
                     { jjCheckNAddStates(31, 34); }
                  break;
               case 33:
               case 36:
                  if (curChar == 34)
                     { jjCheckNAdd(34); }
                  break;
               case 35:
                  if (curChar == 34)
                     { jjAddStates(35, 36); }
                  break;
               case 37:
                  if (curChar == 34 && kind > 28)
                     kind = 28;
                  break;
               case 38:
                  if (curChar == 34)
                     jjstateSet[jjnewStateCnt++] = 37;
                  break;
               case 39:
                  if (curChar == 34)
                     jjstateSet[jjnewStateCnt++] = 29;
                  break;
               case 40:
                  if (curChar == 34)
                     jjstateSet[jjnewStateCnt++] = 39;
                  break;
               case 41:
                  if (curChar == 60)
                     { jjCheckNAddTwoStates(42, 43); }
                  break;
               case 42:
                  if ((0xaffffffa00000000L & l) != 0L)
                     { jjCheckNAddTwoStates(42, 43); }
                  break;
               case 43:
                  if (curChar == 62 && kind > 30)
                     kind = 30;
                  break;
               case 44:
                  if (curChar == 58)
                     jjstateSet[jjnewStateCnt++] = 45;
                  break;
               case 45:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 33)
                     kind = 33;
                  { jjCheckNAddTwoStates(46, 47); }
                  break;
               case 46:
                  if ((0x3ff600000000000L & l) != 0L)
                     { jjCheckNAddTwoStates(46, 47); }
                  break;
               case 47:
                  if ((0x3ff200000000000L & l) != 0L && kind > 33)
                     kind = 33;
                  break;
               case 49:
                  if (curChar == 63)
                     jjstateSet[jjnewStateCnt++] = 50;
                  break;
               case 50:
               case 51:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 34)
                     kind = 34;
                  { jjCheckNAdd(51); }
                  break;
               case 54:
                  if (curChar == 45)
                     { jjCheckNAdd(55); }
                  break;
               case 55:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 35)
                     kind = 35;
                  { jjCheckNAddTwoStates(54, 55); }
                  break;
               case 56:
                  if (curChar == 40)
                     { jjCheckNAddStates(13, 15); }
                  break;
               case 57:
                  if (curChar == 35)
                     { jjCheckNAddStates(37, 42); }
                  break;
               case 58:
                  if ((0xffffffffffffdbffL & l) != 0L)
                     { jjCheckNAddStates(37, 42); }
                  break;
               case 59:
                  if ((0x2400L & l) != 0L)
                     { jjCheckNAddStates(13, 15); }
                  break;
               case 60:
                  if ((0x100003600L & l) != 0L)
                     { jjCheckNAddStates(13, 15); }
                  break;
               case 61:
                  if (curChar == 41 && kind > 40)
                     kind = 40;
                  break;
               case 62:
                  if (curChar == 10)
                     { jjCheckNAddStates(13, 15); }
                  break;
               case 63:
                  if (curChar == 13)
                     jjstateSet[jjnewStateCnt++] = 62;
                  break;
               case 65:
                  if (curChar == 35)
                     { jjCheckNAddStates(43, 48); }
                  break;
               case 66:
                  if ((0xffffffffffffdbffL & l) != 0L)
                     { jjCheckNAddStates(43, 48); }
                  break;
               case 67:
                  if ((0x2400L & l) != 0L)
                     { jjCheckNAddStates(49, 51); }
                  break;
               case 68:
                  if ((0x100003600L & l) != 0L)
                     { jjCheckNAddStates(49, 51); }
                  break;
               case 70:
                  if (curChar == 10)
                     { jjCheckNAddStates(49, 51); }
                  break;
               case 71:
                  if (curChar == 13)
                     jjstateSet[jjnewStateCnt++] = 70;
                  break;
               case 72:
                  if ((0x280000000000L & l) != 0L)
                     { jjCheckNAddStates(8, 12); }
                  break;
               case 73:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 18)
                     kind = 18;
                  { jjCheckNAdd(73); }
                  break;
               case 74:
                  if ((0x3ff000000000000L & l) != 0L)
                     { jjCheckNAddTwoStates(74, 75); }
                  break;
               case 75:
                  if (curChar != 46)
                     break;
                  if (kind > 19)
                     kind = 19;
                  { jjCheckNAdd(76); }
                  break;
               case 76:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 19)
                     kind = 19;
                  { jjCheckNAdd(76); }
                  break;
               case 77:
                  if (curChar == 46)
                     { jjCheckNAdd(78); }
                  break;
               case 78:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 19)
                     kind = 19;
                  { jjCheckNAdd(78); }
                  break;
               case 79:
                  if (curChar == 46)
                     { jjCheckNAdd(80); }
                  break;
               case 80:
                  if ((0x3ff000000000000L & l) != 0L)
                     { jjCheckNAddTwoStates(80, 81); }
                  break;
               case 82:
                  if ((0x280000000000L & l) != 0L)
                     { jjCheckNAdd(83); }
                  break;
               case 83:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 20)
                     kind = 20;
                  { jjCheckNAdd(83); }
                  break;
               case 84:
                  if ((0x3ff000000000000L & l) != 0L)
                     { jjCheckNAddStates(52, 55); }
                  break;
               case 85:
                  if ((0x3ff000000000000L & l) != 0L)
                     { jjCheckNAddTwoStates(85, 86); }
                  break;
               case 86:
                  if (curChar == 46)
                     { jjCheckNAddTwoStates(87, 88); }
                  break;
               case 87:
                  if ((0x3ff000000000000L & l) != 0L)
                     { jjCheckNAddTwoStates(87, 88); }
                  break;
               case 89:
                  if ((0x280000000000L & l) != 0L)
                     { jjCheckNAdd(90); }
                  break;
               case 90:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 20)
                     kind = 20;
                  { jjCheckNAdd(90); }
                  break;
               case 91:
                  if ((0x3ff000000000000L & l) != 0L)
                     { jjCheckNAddTwoStates(91, 92); }
                  break;
               case 93:
                  if ((0x280000000000L & l) != 0L)
                     { jjCheckNAdd(94); }
                  break;
               case 94:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 20)
                     kind = 20;
                  { jjCheckNAdd(94); }
                  break;
               case 95:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 18)
                     kind = 18;
                  { jjCheckNAddStates(0, 7); }
                  break;
               case 96:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 29)
                     kind = 29;
                  { jjCheckNAdd(96); }
                  break;
               case 97:
                  if (curChar == 46)
                     { jjCheckNAddTwoStates(78, 80); }
                  break;
               case 99:
                  if ((0x3ff600000000000L & l) != 0L)
                     { jjAddStates(56, 57); }
                  break;
               case 100:
                  if ((0x3ff200000000000L & l) != 0L)
                     jjstateSet[jjnewStateCnt++] = 101;
                  break;
               case 101:
                  if (curChar == 58 && kind > 31)
                     kind = 31;
                  break;
               case 102:
                  if ((0x3ff600000000000L & l) != 0L)
                     { jjAddStates(58, 59); }
                  break;
               case 103:
                  if ((0x3ff200000000000L & l) != 0L)
                     jjstateSet[jjnewStateCnt++] = 104;
                  break;
               case 104:
                  if (curChar == 58)
                     { jjCheckNAdd(105); }
                  break;
               case 105:
                  if ((0x3ff000000000000L & l) == 0L)
                     break;
                  if (kind > 32)
                     kind = 32;
                  { jjCheckNAddTwoStates(106, 107); }
                  break;
               case 106:
                  if ((0x3ff600000000000L & l) != 0L)
                     { jjCheckNAddTwoStates(106, 107); }
                  break;
               case 107:
                  if ((0x3ff200000000000L & l) != 0L && kind > 32)
                     kind = 32;
                  break;
               case 108:
                  if (curChar != 58)
                     break;
                  if (kind > 31)
                     kind = 31;
                  { jjCheckNAdd(105); }
                  break;
               default : break;
            }
         } while(i != startsAt);
      }
      else if (curChar < 128)
      {
         long l = 1L << (curChar & 077);
         do
         {
            switch(jjstateSet[--i])
            {
               case 0:
                  if ((0x7fffffe07fffffeL & l) != 0L)
                     { jjCheckNAddStates(60, 65); }
                  else if (curChar == 91)
                     { jjCheckNAddStates(49, 51); }
                  else if (curChar == 64)
                     { jjCheckNAdd(53); }
                  else if (curChar == 95)
                     jjstateSet[jjnewStateCnt++] = 44;
                  else if (curChar == 92)
                     jjstateSet[jjnewStateCnt++] = 6;
                  break;
               case 1:
                  if (kind > 12)
                     kind = 12;
                  { jjAddStates(16, 18); }
                  break;
               case 5:
                  if (curChar == 92)
                     jjstateSet[jjnewStateCnt++] = 6;
                  break;
               case 6:
                  if ((0x14404410144044L & l) != 0L && kind > 24)
                     kind = 24;
                  break;
               case 8:
                  if ((0xffffffffefffffffL & l) != 0L)
                     { jjCheckNAddStates(22, 24); }
                  break;
               case 9:
                  if (curChar == 92)
                     jjstateSet[jjnewStateCnt++] = 10;
                  break;
               case 10:
                  if ((0x14404410144044L & l) != 0L)
                     { jjCheckNAddStates(22, 24); }
                  break;
               case 13:
                  if ((0xffffffffefffffffL & l) != 0L)
                     { jjCheckNAddStates(19, 21); }
                  break;
               case 14:
                  if (curChar == 92)
                     jjstateSet[jjnewStateCnt++] = 15;
                  break;
               case 15:
                  if ((0x14404410144044L & l) != 0L)
                     { jjCheckNAddStates(19, 21); }
                  break;
               case 18:
                  if ((0xffffffffefffffffL & l) != 0L)
                     { jjCheckNAddStates(25, 28); }
                  break;
               case 19:
                  if (curChar == 92)
                     jjstateSet[jjnewStateCnt++] = 20;
                  break;
               case 20:
                  if ((0x14404410144044L & l) != 0L)
                     { jjCheckNAddStates(25, 28); }
                  break;
               case 22:
                  { jjCheckNAddStates(25, 28); }
                  break;
               case 30:
                  if ((0xffffffffefffffffL & l) != 0L)
                     { jjCheckNAddStates(31, 34); }
                  break;
               case 31:
                  if (curChar == 92)
                     jjstateSet[jjnewStateCnt++] = 32;
                  break;
               case 32:
                  if ((0x14404410144044L & l) != 0L)
                     { jjCheckNAddStates(31, 34); }
                  break;
               case 34:
                  { jjCheckNAddStates(31, 34); }
                  break;
               case 42:
                  if ((0xc7fffffeafffffffL & l) != 0L)
                     { jjAddStates(66, 67); }
                  break;
               case 45:
                  if ((0x7fffffe87fffffeL & l) == 0L)
                     break;
                  if (kind > 33)
                     kind = 33;
                  { jjCheckNAddTwoStates(46, 47); }
                  break;
               case 46:
                  if ((0x7fffffe87fffffeL & l) != 0L)
                     { jjCheckNAddTwoStates(46, 47); }
                  break;
               case 47:
                  if ((0x7fffffe87fffffeL & l) != 0L && kind > 33)
                     kind = 33;
                  break;
               case 48:
                  if (curChar == 95)
                     jjstateSet[jjnewStateCnt++] = 44;
                  break;
               case 50:
               case 51:
                  if ((0x7fffffe87fffffeL & l) == 0L)
                     break;
                  if (kind > 34)
                     kind = 34;
                  { jjCheckNAdd(51); }
                  break;
               case 52:
                  if (curChar == 64)
                     { jjCheckNAdd(53); }
                  break;
               case 53:
                  if ((0x7fffffe07fffffeL & l) == 0L)
                     break;
                  if (kind > 35)
                     kind = 35;
                  { jjCheckNAddTwoStates(53, 54); }
                  break;
               case 55:
                  if ((0x7fffffe07fffffeL & l) == 0L)
                     break;
                  if (kind > 35)
                     kind = 35;
                  { jjCheckNAddTwoStates(54, 55); }
                  break;
               case 58:
                  { jjAddStates(37, 42); }
                  break;
               case 64:
                  if (curChar == 91)
                     { jjCheckNAddStates(49, 51); }
                  break;
               case 66:
                  { jjCheckNAddStates(43, 48); }
                  break;
               case 69:
                  if (curChar == 93 && kind > 45)
                     kind = 45;
                  break;
               case 81:
                  if ((0x2000000020L & l) != 0L)
                     { jjAddStates(68, 69); }
                  break;
               case 88:
                  if ((0x2000000020L & l) != 0L)
                     { jjAddStates(70, 71); }
                  break;
               case 92:
                  if ((0x2000000020L & l) != 0L)
                     { jjAddStates(72, 73); }
                  break;
               case 98:
                  if ((0x7fffffe07fffffeL & l) != 0L)
                     { jjCheckNAddStates(60, 65); }
                  break;
               case 99:
                  if ((0x7fffffe87fffffeL & l) != 0L)
                     { jjCheckNAddTwoStates(99, 100); }
                  break;
               case 100:
                  if ((0x7fffffe87fffffeL & l) != 0L)
                     { jjCheckNAdd(101); }
                  break;
               case 102:
                  if ((0x7fffffe87fffffeL & l) != 0L)
                     { jjCheckNAddTwoStates(102, 103); }
                  break;
               case 103:
                  if ((0x7fffffe87fffffeL & l) != 0L)
                     { jjCheckNAdd(104); }
                  break;
               case 105:
                  if ((0x7fffffe87fffffeL & l) == 0L)
                     break;
                  if (kind > 32)
                     kind = 32;
                  { jjCheckNAddTwoStates(106, 107); }
                  break;
               case 106:
                  if ((0x7fffffe87fffffeL & l) != 0L)
                     { jjCheckNAddTwoStates(106, 107); }
                  break;
               case 107:
                  if ((0x7fffffe87fffffeL & l) != 0L && kind > 32)
                     kind = 32;
                  break;
               default : break;
            }
         } while(i != startsAt);
      }
      else
      {
         int hiByte = (curChar >> 8);
         int i1 = hiByte >> 6;
         long l1 = 1L << (hiByte & 077);
         int i2 = (curChar & 0xff) >> 6;
         long l2 = 1L << (curChar & 077);
         do
         {
            switch(jjstateSet[--i])
            {
               case 0:
                  if (jjCanMove_1(hiByte, i1, i2, l1, l2))
                     { jjCheckNAddStates(60, 65); }
                  break;
               case 1:
                  if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
                     break;
                  if (kind > 12)
                     kind = 12;
                  { jjAddStates(16, 18); }
                  break;
               case 8:
                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                     { jjAddStates(22, 24); }
                  break;
               case 13:
                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                     { jjAddStates(19, 21); }
                  break;
               case 18:
               case 22:
                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                     { jjCheckNAddStates(25, 28); }
                  break;
               case 30:
               case 34:
                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                     { jjCheckNAddStates(31, 34); }
                  break;
               case 42:
                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                     { jjAddStates(66, 67); }
                  break;
               case 45:
                  if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
                     break;
                  if (kind > 33)
                     kind = 33;
                  { jjCheckNAddTwoStates(46, 47); }
                  break;
               case 46:
                  if (jjCanMove_2(hiByte, i1, i2, l1, l2))
                     { jjCheckNAddTwoStates(46, 47); }
                  break;
               case 47:
                  if (jjCanMove_2(hiByte, i1, i2, l1, l2) && kind > 33)
                     kind = 33;
                  break;
               case 50:
                  if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
                     break;
                  if (kind > 34)
                     kind = 34;
                  { jjCheckNAdd(51); }
                  break;
               case 51:
                  if (!jjCanMove_2(hiByte, i1, i2, l1, l2))
                     break;
                  if (kind > 34)
                     kind = 34;
                  { jjCheckNAdd(51); }
                  break;
               case 58:
                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                     { jjAddStates(37, 42); }
                  break;
               case 66:
                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
                     { jjAddStates(43, 48); }
                  break;
               case 99:
                  if (jjCanMove_2(hiByte, i1, i2, l1, l2))
                     { jjCheckNAddTwoStates(99, 100); }
                  break;
               case 100:
                  if (jjCanMove_2(hiByte, i1, i2, l1, l2))
                     { jjCheckNAdd(101); }
                  break;
               case 102:
                  if (jjCanMove_2(hiByte, i1, i2, l1, l2))
                     { jjCheckNAddTwoStates(102, 103); }
                  break;
               case 103:
                  if (jjCanMove_2(hiByte, i1, i2, l1, l2))
                     { jjCheckNAdd(104); }
                  break;
               case 105:
                  if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
                     break;
                  if (kind > 32)
                     kind = 32;
                  { jjCheckNAddTwoStates(106, 107); }
                  break;
               case 106:
                  if (jjCanMove_2(hiByte, i1, i2, l1, l2))
                     { jjCheckNAddTwoStates(106, 107); }
                  break;
               case 107:
                  if (jjCanMove_2(hiByte, i1, i2, l1, l2) && kind > 32)
                     kind = 32;
                  break;
               default : if (i1 == 0 || l1 == 0 || i2 == 0 ||  l2 == 0) break; else break;
            }
         } while(i != startsAt);
      }
      if (kind != 0x7fffffff)
      {
         jjmatchedKind = kind;
         jjmatchedPos = curPos;
         kind = 0x7fffffff;
      }
      ++curPos;
      if ((i = jjnewStateCnt) == (startsAt = 109 - (jjnewStateCnt = startsAt)))
         break;
      try { curChar = input_stream.readChar(); }
      catch(java.io.IOException e) { break; }
   }
   if (jjmatchedPos > strPos)
      return curPos;

   int toRet = Math.max(curPos, seenUpto);

   if (curPos < toRet)
      for (i = toRet - Math.min(curPos, seenUpto); i-- > 0; )
         try { curChar = input_stream.readChar(); }
         catch(java.io.IOException e) { throw new Error("Internal Error : Please send a bug report."); }

   if (jjmatchedPos < strPos)
   {
      jjmatchedKind = strKind;
      jjmatchedPos = strPos;
   }
   else if (jjmatchedPos == strPos && jjmatchedKind > strKind)
      jjmatchedKind = strKind;

   return toRet;
}

/** Token literal values. */
public static final String[] jjstrLiteralImages = {
"", "\41", "\174", "\136", "\55\76", "\74\55", null, null, null, null, null, 
null, null, "\141", "\100\160\162\145\146\151\170", "\100\142\141\163\145", null, 
null, null, null, null, null, null, null, null, null, null, null, null, null, null, 
null, null, null, null, null, null, null, "\50", "\51", null, "\173", "\175", 
"\133", "\135", null, "\73", "\54", "\56", "\75", "\75\76", "\44", "\77", "\176", 
"\72", "\52", "\57", "\134", "\ufeff", "\136\136", "\100", null, null, null, null, 
null, null, null, };
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;
}
static final int[] jjnextStates = {
   73, 74, 75, 85, 86, 91, 92, 96, 73, 74, 77, 79, 84, 57, 60, 61, 
   1, 2, 4, 13, 14, 16, 8, 9, 11, 18, 19, 21, 23, 24, 26, 30, 
   31, 33, 35, 36, 38, 57, 58, 59, 63, 60, 61, 65, 66, 67, 71, 68, 
   69, 65, 68, 69, 85, 86, 91, 92, 99, 100, 102, 103, 99, 100, 101, 102, 
   103, 104, 42, 43, 82, 83, 89, 90, 93, 94, 
};
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
   switch(hiByte)
   {
      case 0:
         return ((jjbitVec2[i2] & l2) != 0L);
      default :
         if ((jjbitVec0[i1] & l1) != 0L)
            return true;
         return false;
   }
}
private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
{
   switch(hiByte)
   {
      case 0:
         return ((jjbitVec4[i2] & l2) != 0L);
      case 3:
         return ((jjbitVec5[i2] & l2) != 0L);
      case 32:
         return ((jjbitVec6[i2] & l2) != 0L);
      case 33:
         return ((jjbitVec7[i2] & l2) != 0L);
      case 47:
         return ((jjbitVec8[i2] & l2) != 0L);
      case 48:
         return ((jjbitVec0[i2] & l2) != 0L);
      case 255:
         return ((jjbitVec9[i2] & l2) != 0L);
      default :
         if ((jjbitVec3[i1] & l1) != 0L)
            return true;
         return false;
   }
}
private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, long l2)
{
   switch(hiByte)
   {
      case 0:
         return ((jjbitVec10[i2] & l2) != 0L);
      case 3:
         return ((jjbitVec11[i2] & l2) != 0L);
      case 32:
         return ((jjbitVec12[i2] & l2) != 0L);
      case 33:
         return ((jjbitVec7[i2] & l2) != 0L);
      case 47:
         return ((jjbitVec8[i2] & l2) != 0L);
      case 48:
         return ((jjbitVec0[i2] & l2) != 0L);
      case 255:
         return ((jjbitVec9[i2] & l2) != 0L);
      default :
         if ((jjbitVec3[i1] & l1) != 0L)
            return true;
         return false;
   }
}

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

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

  EOFLoop :
  for (;;)
  {
   try
   {
      curChar = input_stream.BeginToken();
   }
   catch(Exception e)
   {
      jjmatchedKind = 0;
      jjmatchedPos = -1;
      matchedToken = jjFillToken();
      matchedToken.specialToken = specialToken;
      return matchedToken;
   }

   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();
         matchedToken.specialToken = specialToken;
         return matchedToken;
      }
      else
      {
         if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
         {
            matchedToken = jjFillToken();
            if (specialToken == null)
               specialToken = matchedToken;
            else
            {
               matchedToken.specialToken = specialToken;
               specialToken = (specialToken.next = matchedToken);
            }
         }
         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);
  }
}

void SkipLexicalActions(Token matchedToken)
{
   switch(jjmatchedKind)
   {
      default :
         break;
   }
}
void MoreLexicalActions()
{
   jjimageLen += (lengthOfMatch = jjmatchedPos + 1);
   switch(jjmatchedKind)
   {
      default :
         break;
   }
}
void TokenLexicalActions(Token matchedToken)
{
   switch(jjmatchedKind)
   {
      default :
         break;
   }
}
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);
}

private void jjCheckNAddStates(int start, int end)
{
   do {
      jjCheckNAdd(jjnextStates[start]);
   } while (start++ != end);
}

    /** Constructor. */
    public TurtleParserTokenManager(JavaCharStream stream){

      if (JavaCharStream.staticFlag)
            throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");

    input_stream = stream;
  }

  /** Constructor. */
  public TurtleParserTokenManager (JavaCharStream stream, int lexState){
    ReInit(stream);
    SwitchTo(lexState);
  }

  /** Reinitialise parser. */
  
  public void ReInit(JavaCharStream stream)
  {


    jjmatchedPos =
    jjnewStateCnt =
    0;
    curLexState = defaultLexState;
    input_stream = stream;
    ReInitRounds();
  }

  private void ReInitRounds()
  {
    int i;
    jjround = 0x80000001;
    for (i = 109; i-- > 0;)
      jjrounds[i] = 0x80000000;
  }

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

  /** Switch to specified lex state. */
  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;
  }


/** Lexer state names. */
public static final String[] lexStateNames = {
   "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, 
};
static final long[] jjtoToken = {
   0x1fffffcfff1fe03fL, 0x0L, 
};
static final long[] jjtoSkip = {
   0x17c0L, 0x0L, 
};
static final long[] jjtoSpecial = {
   0x1000L, 0x0L, 
};
static final long[] jjtoMore = {
   0x0L, 0x0L, 
};
    protected JavaCharStream  input_stream;

    private final int[] jjrounds = new int[109];
    private final int[] jjstateSet = new int[2 * 109];
    private final StringBuilder jjimage = new StringBuilder();
    private StringBuilder image = jjimage;
    private int jjimageLen;
    private int lengthOfMatch;
    protected int curChar;
}
