context: /* 
   * 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
   * 
   * http://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.
   */
  
  /* Generated By:JavaCC: Do not edit this line. QueryParserTokenManager.java */
  
  namespace Lucene.Net.QueryParsers
  {
  	
  	/// <summary>Token Manager. </summary>
  	public class QueryParserTokenManager : QueryParserConstants
  	{
  		private void  InitBlock()
  		{
  			System.IO.StreamWriter temp_writer;
  			temp_writer = new System.IO.StreamWriter(System.Console.OpenStandardOutput(), System.Console.Out.Encoding);
  			temp_writer.AutoFlush = true;
  			debugStream = temp_writer;
  		}
  		
  		/// <summary>Debug output. </summary>
  		public System.IO.StreamWriter debugStream;
  		/// <summary>Set debug output. </summary>
  		public virtual void  SetDebugStream(System.IO.StreamWriter ds)
  		{
  			debugStream = ds;
  		}
  		private int JjStopStringLiteralDfa_3(int pos, long active0)
  		{
  			switch (pos)
  			{
  				
  				default: 
  					return - 1;
  				
  			}
  		}
  		private int JjStartNfa_3(int pos, long active0)
  		{
  			return JjMoveNfa_3(JjStopStringLiteralDfa_3(pos, active0), pos + 1);
  		}
  		private int JjStopAtPos(int pos, int kind)
  		{
  			jjmatchedKind = kind;
  			jjmatchedPos = pos;
  			return pos + 1;
  		}
  		private int JjMoveStringLiteralDfa0_3()
  		{
  			switch (curChar)
  			{
  				
  				case (char) (40): 
  					return JjStopAtPos(0, 13);
  				
  				case (char) (41): 
  					return JjStopAtPos(0, 14);
  				
  				case (char) (42): 
  					return JjStartNfaWithStates_3(0, 16, 36);
  				
  				case (char) (43): 
  					return JjStopAtPos(0, 11);
  				
  				case (char) (45): 
  					return JjStopAtPos(0, 12);
  				
  				case (char) (58): 
  					return JjStopAtPos(0, 15);
  				
  				case (char) (91): 
  					return JjStopAtPos(0, 23);
  				
  				case (char) (94): 
  					return JjStopAtPos(0, 17);
  				
  				case (char) (123): 
  					return JjStopAtPos(0, 24);
  				
  				default: 
  					return JjMoveNfa_3(0, 0);
  				
  			}
  		}
  		private int JjStartNfaWithStates_3(int pos, int kind, int state)
  		{
  			jjmatchedKind = kind;
  			jjmatchedPos = pos;
  			try
  			{
  				curChar = input_stream.ReadChar();
  			}
  			catch (System.IO.IOException)
  			{
  				return pos + 1;
  			}
  			return JjMoveNfa_3(state, pos + 1);
  		}
  		internal static readonly ulong[] jjbitVec0 = new ulong[]{0x1L, 0x0L, 0x0L, 0x0L};
  		internal static readonly ulong[] jjbitVec1 = new ulong[]{0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL};
  		internal static readonly ulong[] jjbitVec3 = new ulong[]{0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL};
  		internal static readonly ulong[] jjbitVec4 = new ulong[]{0xfffefffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL};
  		private int JjMoveNfa_3(int startState, int curPos)
  		{
  			int startsAt = 0;
  			jjnewStateCnt = 36;
  			int i = 1;
  			jjstateSet[0] = startState;
  			int kind = 0x7fffffff;
  			for (; ; )
  			{
  				if (++jjround == 0x7fffffff)
  					ReInitRounds();
  				if (curChar < 64)
  				{
  					ulong l = (ulong) (1L << (int) curChar);
  					do 
  					{
  						switch (jjstateSet[--i])
  						{
  							
  							case 36: 
  							case 25: 
  								if ((0xfbfffcf8ffffd9ffL & l) == (ulong) 0L)
  									break;
  								if (kind > 22)
  									kind = 22;
  								JjCheckNAddTwoStates(25, 26);
  								break;
  							
  							case 0: 
  								if ((0xfbffd4f8ffffd9ffL & l) != (ulong) 0L)
  								{
  									if (kind > 22)
  										kind = 22;
  									JjCheckNAddTwoStates(25, 26);
  								}
  								else if ((0x100002600L & l) != 0L)
  								{
  									if (kind > 7)
  										kind = 7;
  								}
  								else if (curChar == 34)
  									JjCheckNAddStates(0, 2);
  								else if (curChar == 33)
  								{
  									if (kind > 10)
  										kind = 10;
  								}
  								if ((0x7bffd0f8ffffd9ffL & l) != 0L)
  								{
  									if (kind > 19)
  										kind = 19;
  									JjCheckNAddStates(3, 7);
  								}
  								else if (curChar == 42)
  								{
  									if (kind > 21)
  										kind = 21;
  								}
  								if (curChar == 38)
  									jjstateSet[jjnewStateCnt++] = 4;
  								break;
  							
  							case 4: 
  								if (curChar == 38 && kind > 8)
  									kind = 8;
  								break;
  							
  							case 5: 
  								if (curChar == 38)
  									jjstateSet[jjnewStateCnt++] = 4;
  								break;
  							
  							case 13: 
  								if (curChar == 33 && kind > 10)
  									kind = 10;
  								break;
  							
  							case 14: 
  								if (curChar == 34)
  									JjCheckNAddStates(0, 2);
  								break;
  							
  							case 15: 
  								if ((0xfffffffbffffffffL & l) != (ulong) 0L)
  									JjCheckNAddStates(0, 2);
  								break;
  							
  							case 17: 
  								JjCheckNAddStates(0, 2);
  								break;
  							
  							case 18: 
  								if (curChar == 34 && kind > 18)
  									kind = 18;
  								break;
  							
  							case 20: 
  								if ((0x3ff000000000000L & l) == 0L)
  									break;
  								if (kind > 20)
  									kind = 20;
  								JjAddStates(8, 9);
  								break;
  							
  							case 21: 
  								if (curChar == 46)
  									JjCheckNAdd(22);
  								break;
  							
  							case 22: 
  								if ((0x3ff000000000000L & l) == 0L)
  									break;
  								if (kind > 20)
  									kind = 20;
  								JjCheckNAdd(22);
  								break;
  							
  							case 23: 
  								if (curChar == 42 && kind > 21)
  									kind = 21;
  								break;
  							
  							case 24: 
  								if ((0xfbffd4f8ffffd9ffL & l) == (ulong) 0L)
  									break;
  								if (kind > 22)
  									kind = 22;
  								JjCheckNAddTwoStates(25, 26);
  								break;
  							
  							case 27: 
  								if (kind > 22)
  									kind = 22;
  								JjCheckNAddTwoStates(25, 26);
  								break;
  							
  							case 28: 
  								if ((0x7bffd0f8ffffd9ffL & l) == 0L)
  									break;
  
gt: 								if (kind > 19)