org.apache.lucene.misc_2.9.1.v20100421-0704

j_2_rtns[i] = new JJCalls();
    }
  }
  
  public PrecedenceQueryParser(PrecedenceQueryParserTokenManager tm)
  {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 24; i++) {
      jj_la1[i] = -1;
    }
    for (int i = 0; i < jj_2_rtns.length; i++) {
      jj_2_rtns[i] = new JJCalls();
    }
  }
  
  public void ReInit(PrecedenceQueryParserTokenManager tm)
  {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 24; i++) {
      jj_la1[i] = -1;
    }
    for (int i = 0; i < jj_2_rtns.length; i++) {
      jj_2_rtns[i] = new JJCalls();
    }
  }
  
  private final Token jj_consume_token(int kind)
    throws ParseException
  {
    Token oldToken;
    if (token).next != null) {
      token = token.next;
    } else {
      token = (token.next = token_source.getNextToken());
    }
    jj_ntk = -1;
    if (token.kind == kind)
    {
      jj_gen += 1;
      if (++jj_gc > 100)
      {
        jj_gc = 0;
        for (int i = 0; i < jj_2_rtns.length; i++)
        {
          JJCalls c = jj_2_rtns[i];
          while (c != null)
          {
            if (gen < jj_gen) {
              first = null;
            }
            c = next;
          }
        }
      }
      return token;
    }
    token = oldToken;
    jj_kind = kind;
    throw generateParseException();
  }
  
  private static final class LookaheadSuccess
    extends Error
  {
    private LookaheadSuccess() {}
    
    LookaheadSuccess(PrecedenceQueryParser.1 x0)
    {
      this();
    }
  }
  
  private final LookaheadSuccess jj_ls = new LookaheadSuccess(null);
  
  private final boolean jj_scan_token(int kind)
  {
    if (jj_scanpos == jj_lastpos)
    {
      jj_la -= 1;
      if (jj_scanpos.next == null) {
        jj_lastpos = (jj_scanpos = jj_scanpos.next = token_source.getNextToken());
      } else {
        jj_lastpos = (jj_scanpos = jj_scanpos.next);
      }
    }
    else
    {
      jj_scanpos = jj_scanpos.next;
    }
    if (jj_rescan)
    {
      int i = 0;
      for (Token tok = token; (tok != null) && (tok != jj_scanpos); tok = next) {
        i++;
      }
      if (tok != null) {
        jj_add_error_token(kind, i);
      }
    }
    if (jj_scanpos.kind != kind) {
      return true;
    }
    if ((jj_la == 0) && (jj_scanpos == jj_lastpos)) {
      throw jj_ls;
    }
    return false;
  }
  
  public final Token getNextToken()
  {
    if (token.next != null) {
      token = token.next;
    } else {
      token = (token.next = token_source.getNextToken());
    }
    jj_ntk = -1;
    jj_gen += 1;
    return token;
  }
  
  public final Token getToken(int index)
  {
    Token t = lookingAhead ? jj_scanpos : token;
    for (int i = 0; i < index; i++) {
      if (next != null) {
        t = next;
      } else {
        t = next = token_source.getNextToken();
      }
    }
    return t;
  }
  
  private final int jj_ntk()
  {
    if ((jj_nt = token.next) == null) {
      return jj_ntk = token.next = token_source.getNextToken()).kind;
    }
    return jj_ntk = jj_nt.kind;
  }
  
  private Vector jj_expentries = new Vector();
  private int[] jj_expentry;
  private int jj_kind = -1;
  private int[] jj_lasttokens = new int[100];
  private int jj_endpos;
  
  private void jj_add_error_token(int kind, int pos)
  {
    if (pos >= 100) {
      return;
    }
    if (pos == jj_endpos + 1)
    {
      jj_lasttokens[(jj_endpos++)] = kind;
    }
    else if (jj_endpos != 0)
    {
      jj_expentry = new int[jj_endpos];
      for (int i = 0; i < jj_endpos; i++) {
        jj_expentry[i] = jj_lasttokens[i];
      }
      boolean exists = false;
      for (Enumeration e = jj_expentries.elements(); e.hasMoreElements();)
      {
        int[] oldentry = (int[])e.nextElement();
        if (oldentry.length == jj_expentry.length)
        {
          exists = true;
          for (int i = 0; i < jj_expentry.length; i++) {
            if (oldentry[i] != jj_expentry[i])
            {
              exists = false;
              break;
            }
          }
          if (exists) {
            break;
          }
        }
      }
      if (!exists) {
        jj_expentries.addElement(jj_expentry);
      }
      if (pos != 0) {
        jj_lasttokens[((jj_endpos = pos) - 1)] = kind;
      }
    }
  }
  
  public ParseException generateParseException()
  {
    jj_expentries.removeAllElements();
    boolean[] la1tokens = new boolean[32];
    for (int i = 0; i < 32; i++) {
      la1tokens[i] = false;
    }
    if (jj_kind >= 0)
    {
      la1tokens[jj_kind] = true;
      jj_kind = -1;
    }
    for (int i = 0; i < 24; i++) {
      if (jj_la1[i] == jj_gen) {
        for (int j = 0; j < 32; j++) {
          if ((jj_la1_0[i] & 1 << j) != 0) {
            la1tokens[j] = true;
          }
        }
      }
    }
    for (int i = 0; i < 32; i++) {
      if (la1tokens[i] != 0)
      {
        jj_expentry = new int[1];
        jj_expentry[0] = i;
        jj_expentries.addElement(jj_expentry);
      }
    }
    jj_endpos = 0;
    jj_rescan_token();
    jj_add_error_token(0, 0);
    int[][] exptokseq = new int[jj_expentries.size()][];
    for (int i = 0; i < jj_expentries.size(); i++) {
      exptokseq[i] = ((int[])(int[])jj_expentries.elementAt(i));
    }
    return new ParseException(token, exptokseq, tokenImage);
  }
  
  private final void jj_rescan_token()
  {
    jj_rescan = true;
    for (int i = 0; i < 1; i++)
    {
      JJCalls p = jj_2_rtns[i];
      do
      {
        if (gen > jj_gen)
        {
          jj_la = arg;jj_lastpos = (jj_scanpos = first);
          switch (i)
          {
          case 0: 
            jj_3_1();
          }
        }
        p = next;
      } while (p != null);
    }
    jj_rescan = false;
  }
  
  private final void jj_save(int index, int xla)
  {
    JJCalls p = jj_2_rtns[index];
    while (gen > jj_gen)
    {
      if (next == null)
      {
        p = next = new JJCalls(); break;
      }
      p = next;
    }
    gen = (jj_gen + xla - jj_la);first = token;arg = xla;
  }
  
  public final void enable_tracing() {}
  
  public final void disable_tracing() {}
  
  static final class JJCalls
  {
    int gen;
    Token first;
    int arg;
    JJCalls next;
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.queryParser.precedence.PrecedenceQueryParser
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.queryParser.precedence;

public abstract interface PrecedenceQueryParserConstants
{
  public static final int EOF = 0;
  public static final int _NUM_CHAR = 1;
  public static final int _ESCAPED_CHAR = 2;
  public static final int _TERM_START_CHAR = 3;
  public static final int _TERM_CHAR = 4;
  public static final int _WHITESPACE = 5;
  public static final int AND = 7;
  public static final int OR = 8;
  public static final int NOT = 9;
  public static final int PLUS = 10;
  public static final int MINUS = 11;
  public static final int LPAREN = 12;
  public static final int RPAREN = 13;
  public static final int COLON = 14;
  public static final int CARAT = 15;
  public static final int QUOTED = 16;
  public static final int TERM = 17;
  public static final int FUZZY_SLOP = 18;
  public static final int PREFIXTERM = 19;
  public static final int WILDTERM = 20;
  public static final int RANGEIN_START = 21;
  public static final int RANGEEX_START = 22;
  public static final int NUMBER = 23;
  public static final int RANGEIN_TO = 24;
  public static final int RANGEIN_END = 25;
  public static final int RANGEIN_QUOTED = 26;
  public static final int RANGEIN_GOOP = 27;
  public static final int RANGEEX_TO = 28;
  public static final int RANGEEX_END = 29;
  public static final int RANGEEX_QUOTED = 30;
  public static final int RANGEEX_GOOP = 31;
  public static final int Boost = 0;
  public static final int RangeEx = 1;
  public static final int RangeIn = 2;
  public static final int DEFAULT = 3;
  public static final String[] tokenImage = { "<EOF>", "<_NUM_CHAR>", "<_ESCAPED_CHAR>", "<_TERM_START_CHAR>", "<_TERM_CHAR>", "<_WHITESPACE>", "<token of kind 6>", "<AND>", "<OR>", "<NOT>", "\"+\"", "\"-\"", "\"(\"", "\")\"", "\":\"", "\"^\"", "<QUOTED>", "<TERM>", "<FUZZY_SLOP>", "<PREFIXTERM>", "<WILDTERM>", "\"[\"", "\"{\"", "<NUMBER>", "\"TO\"", "\"]\"", "<RANGEIN_QUOTED>", "<RANGEIN_GOOP>", "\"TO\"", "\"}\"", "<RANGEEX_QUOTED>", "<RANGEEX_GOOP>" };
}

/* Location:
 * Qualified Name:     org.apache.lucene.queryParser.precedence.PrecedenceQueryParserConstants
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.queryParser.precedence;

import java.io.IOException;
import java.io.PrintStream;

public class PrecedenceQueryParserTokenManager
  implements PrecedenceQueryParserConstants
{
  public PrintStream debugStream = System.out;
  
  public void setDebugStream(PrintStream ds)
  {
    debugStream = ds;
  }
  
  private final int jjStopStringLiteralDfa_3(int pos, long active0)
  {
    switch (pos)
    {
    }
    return -1;
  }
  
  private final int jjStartNfa_3(int pos, long active0)
  {
    return jjMoveNfa_3(jjStopStringLiteralDfa_3(pos, active0), pos + 1);
  }
  
  private final int jjStopAtPos(int pos, int kind)
  {
    jjmatchedKind = kind;
    jjmatchedPos = pos;
    return pos + 1;
  }
  
  private final int jjStartNfaWithStates_3(int pos, int kind, int state)
  {
    jjmatchedKind = kind;
    jjmatchedPos = pos;
    try
    {
      curChar = input_stream.readChar();
    }
    catch (IOException e)
    {
      return pos + 1;
    }
    return jjMoveNfa_3(state, pos + 1);
  }
  
  private final int jjMoveStringLiteralDfa0_3()
  {
    switch (curChar)
    {
    case '(': 
      return jjStopAtPos(0, 12);
    case ')': 
      return jjStopAtPos(0, 13);
    case '+': 
      return jjStopAtPos(0, 10);
    case '-': 
      return jjStopAtPos(0, 11);
    case ':': 
      return jjStopAtPos(0, 14);
    case '[': 
      return jjStopAtPos(0, 21);
    case '^': 
      return jjStopAtPos(0, 15);
    case '{': 
      return jjStopAtPos(0, 22);
    }
    return jjMoveNfa_3(0, 0);
  }
  
  private final void jjCheckNAdd(int state)
  {
    if (jjrounds[state] != jjround)
    {
      jjstateSet[(jjnewStateCnt++)] = state;
      jjrounds[state] = jjround;
    }
  }
  
  private final void jjAddStates(int start, int end)
  {
    do
    {
      jjstateSet[(jjnewStateCnt++)] = jjnextStates[start];
    } while (start++ != end);
  }
  
  private final void jjCheckNAddTwoStates(int state1, int state2)
  {
    jjCheckNAdd(state1);
    jjCheckNAdd(state2);
  }
  
  private final void jjCheckNAddStates(int start, int end)
  {
    do
    {
      jjCheckNAdd(jjnextStates[start]);
    } while (start++ != end);
  }
  
  private final void jjCheckNAddStates(int start)
  {
    jjCheckNAdd(jjnextStates[start]);
    jjCheckNAdd(jjnextStates[(start + 1)]);
  }
  
  static final long[] jjbitVec0 = { -2L, -1L, -1L, -1L };
  static final long[] jjbitVec2 = { 0L, 0L, -1L, -1L };
  
  private final int jjMoveNfa_3(int startState, int curPos)
  {
    int startsAt = 0;
    jjnewStateCnt = 33;
    int i = 1;
    jjstateSet[0] = startState;
    int kind = Integer.MAX_VALUE;
    for (;;)
    {
      if (++jjround == Integer.MAX_VALUE) {
        ReInitRounds();
      }
      if (curChar < '@')
      {
        long l = 1L << curChar;
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
            if ((0x7BFFD0F8FFFFD9FF & l) != 0L)
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddStates(0, 6);
            }
            else if ((0x100002600 & l) != 0L)
            {
              if (kind > 6) {
                kind = 6;
              }
            }
            else if (curChar == '"')
            {
              jjCheckNAdd(15);
            }
            else if (curChar == '!')
            {
              if (kind > 9) {
                kind = 9;
              }
            }
            if (curChar == '&') {
              jjstateSet[(jjnewStateCnt++)] = 4;
            }
            break;
          case 4: 
            if ((curChar == '&') && (kind > 7)) {
              kind = 7;
            }
            break;
          case 5: 
            if (curChar == '&') {
              jjstateSet[(jjnewStateCnt++)] = 4;
            }
            break;
          case 13: 
            if ((curChar == '!') && (kind > 9)) {
              kind = 9;
            }
            break;
          case 14: 
            if (curChar == '"') {
              jjCheckNAdd(15);
            }
            break;
          case 15: 
            if ((0xFFFFFFFBFFFFFFFF & l) != 0L) {
              jjCheckNAddTwoStates(15, 16);
            }
            break;
          case 16: 
            if ((curChar == '"') && (kind > 16)) {
              kind = 16;
            }
            break;
          case 18: 
            if ((0x3FF000000000000 & l) != 0L)
            {
              if (kind > 18) {
                kind = 18;
              }
              jjAddStates(7, 8);
            }
            break;
          case 19: 
            if (curChar == '.') {
              jjCheckNAdd(20);
            }
            break;
          case 20: 
            if ((0x3FF000000000000 & l) != 0L)
            {
              if (kind > 18) {
                kind = 18;
              }
              jjCheckNAdd(20);
            }
            break;
          case 21: 
            if ((0x7BFFD0F8FFFFD9FF & l) != 0L)
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddStates(0, 6);
            }
            break;
          case 22: 
            if ((0x7BFFF8F8FFFFD9FF & l) != 0L)
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddTwoStates(22, 23);
            }
            break;
          case 24: 
            if ((0x84002F0600000000 & l) != 0L)
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddTwoStates(22, 23);
            }
            break;
          case 25: 
            if ((0x7BFFF8F8FFFFD9FF & l) != 0L) {
              jjCheckNAddStates(9, 11);
            }
            break;
          case 26: 
            if ((curChar == '*') && (kind > 19)) {
              kind = 19;
            }
            break;
          case 28: 
            if ((0x84002F0600000000 & l) != 0L) {
              jjCheckNAddStates(9, 11);
            }
            break;
          case 29: 
            if ((0xFBFFFCF8FFFFD9FF & l) != 0L)
            {
              if (kind > 20) {
                kind = 20;
              }
              jjCheckNAddTwoStates(29, 30);
            }
            break;
          case 31: 
            if ((0x84002F0600000000 & l) != 0L)
            {
              if (kind > 20) {
                kind = 20;
              }
              jjCheckNAddTwoStates(29, 30);
            }
            break;
          }
        } while (i != startsAt);
      }
      else if (curChar < '?')
      {
        long l = 1L << (curChar & 0x3F);
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
            if ((0x97FFFFFF97FFFFFF & l) != 0L)
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddStates(0, 6);
            }
            else if (curChar == '~')
            {
              if (kind > 18) {
                kind = 18;
              }
              jjstateSet[(jjnewStateCnt++)] = 18;
            }
            if (curChar == '\\') {
              jjCheckNAddStates(12, 14);
            } else if (curChar == 'N') {
              jjstateSet[(jjnewStateCnt++)] = 11;
            } else if (curChar == '|') {
              jjstateSet[(jjnewStateCnt++)] = 8;
            } else if (curChar == 'O') {
              jjstateSet[(jjnewStateCnt++)] = 6;
            } else if (curChar == 'A') {
              jjstateSet[(jjnewStateCnt++)] = 2;
            }
            break;
          case 1: 
            if ((curChar == 'D') && (kind > 7)) {
              kind = 7;
            }
            break;
          case 2: 
            if (curChar == 'N') {
              jjstateSet[(jjnewStateCnt++)] = 1;
            }
            break;
          case 3: 
            if (curChar == 'A') {
              jjstateSet[(jjnewStateCnt++)] = 2;
            }
            break;
          case 6: 
            if ((curChar == 'R') && (kind > 8)) {
              kind = 8;
            }
            break;
          case 7: 
            if (curChar == 'O') {
              jjstateSet[(jjnewStateCnt++)] = 6;
            }
            break;
          case 8: 
            if ((curChar == '|') && (kind > 8)) {
              kind = 8;
            }
            break;
          case 9: 
            if (curChar == '|') {
              jjstateSet[(jjnewStateCnt++)] = 8;
            }
            break;
          case 10: 
            if ((curChar == 'T') && (kind > 9)) {
              kind = 9;
            }
            break;
          case 11: 
            if (curChar == 'O') {
              jjstateSet[(jjnewStateCnt++)] = 10;
            }
            break;
          case 12: 
            if (curChar == 'N') {
              jjstateSet[(jjnewStateCnt++)] = 11;
            }
            break;
          case 15: 
            jjAddStates(15, 16);
            break;
          case 17: 
            if (curChar == '~')
            {
              if (kind > 18) {
                kind = 18;
              }
              jjstateSet[(jjnewStateCnt++)] = 18;
            }
            break;
          case 21: 
            if ((0x97FFFFFF97FFFFFF & l) != 0L)
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddStates(0, 6);
            }
            break;
          case 22: 
            if ((0x97FFFFFF97FFFFFF & l) != 0L)
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddTwoStates(22, 23);
            }
            break;
          case 23: 
            if (curChar == '\\') {
              jjCheckNAddTwoStates(24, 24);
            }
            break;
          case 24: 
            if ((0x6800000078000000 & l) != 0L)
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddTwoStates(22, 23);
            }
            break;
          case 25: 
            if ((0x97FFFFFF97FFFFFF & l) != 0L) {
              jjCheckNAddStates(9, 11);
            }
            break;
          case 27: 
            if (curChar == '\\') {
              jjCheckNAddTwoStates(28, 28);
            }
            break;
          case 28: 
            if ((0x6800000078000000 & l) != 0L) {
              jjCheckNAddStates(9, 11);
            }
            break;
          case 29: 
            if ((0x97FFFFFF97FFFFFF & l) != 0L)
            {
              if (kind > 20) {
                kind = 20;
              }
              jjCheckNAddTwoStates(29, 30);
            }
            break;
          case 30: 
            if (curChar == '\\') {
              jjCheckNAddTwoStates(31, 31);
            }
            break;
          case 31: 
            if ((0x6800000078000000 & l) != 0L)
            {
              if (kind > 20) {
                kind = 20;
              }
              jjCheckNAddTwoStates(29, 30);
            }
            break;
          case 32: 
            if (curChar == '\\') {
              jjCheckNAddStates(12, 14);
            }
            break;
          }
        } while (i != startsAt);
      }
      else
      {
        int hiByte = curChar >> '\b';
        int i1 = hiByte >> 6;
        long l1 = 1L << (hiByte & 0x3F);
        int i2 = (curChar & 0xFF) >> '\006';
        long l2 = 1L << (curChar & 0x3F);
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
            if (jjCanMove_0(hiByte, i1, i2, l1, l2))
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddStates(0, 6);
            }
            break;
          case 15: 
            if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
              jjAddStates(15, 16);
            }
            break;
          case 22: 
            if (jjCanMove_0(hiByte, i1, i2, l1, l2))
            {
              if (kind > 17) {
                kind = 17;
              }
              jjCheckNAddTwoStates(22, 23);
            }
            break;
          case 25: 
            if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
              jjCheckNAddStates(9, 11);
            }
            break;
          case 29: 
            if (jjCanMove_0(hiByte, i1, i2, l1, l2))
            {
              if (kind > 20) {
                kind = 20;
              }
              jjCheckNAddTwoStates(29, 30);
            }
            break;
          }
        } while (i != startsAt);
      }
      if (kind != Integer.MAX_VALUE)
      {
        jjmatchedKind = kind;
        jjmatchedPos = curPos;
        kind = Integer.MAX_VALUE;
      }
      curPos++;
      if ((i = jjnewStateCnt) == (startsAt = 33 - (jjnewStateCnt = startsAt))) {
        return curPos;
      }
      try
      {
        curChar = input_stream.readChar();
      }
      catch (IOException e) {}
    }
    return curPos;
  }
  
  private final int jjStopStringLiteralDfa_1(int pos, long active0)
  {
    switch (pos)
    {
    case 0: 
      if ((active0 & 0x10000000) != 0L)
      {
        jjmatchedKind = 31;
        return 4;
      }
      return -1;
    }
    return -1;
  }
  
  private final int jjStartNfa_1(int pos, long active0)
  {
    return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
  }
  
  private final int jjStartNfaWithStates_1(int pos, int kind, int state)
  {
    jjmatchedKind = kind;
    jjmatchedPos = pos;
    try
    {
      curChar = input_stream.readChar();
    }
    catch (IOException e)
    {
      return pos + 1;
    }
    return jjMoveNfa_1(state, pos + 1);
  }
  
  private final int jjMoveStringLiteralDfa0_1()
  {
    switch (curChar)
    {
    case 'T': 
      return jjMoveStringLiteralDfa1_1(268435456L);
    case '}': 
      return jjStopAtPos(0, 29);
    }
    return jjMoveNfa_1(0, 0);
  }
  
  private final int jjMoveStringLiteralDfa1_1(long active0)
  {
    try
    {
      curChar = input_stream.readChar();
    }
    catch (IOException e)
    {
      jjStopStringLiteralDfa_1(0, active0);
      return 1;
    }
    switch (curChar)
    {
    case 'O': 
      if ((active0 & 0x10000000) != 0L) {
        return jjStartNfaWithStates_1(1, 28, 4);
      }
      break;
    }
    return jjStartNfa_1(0, active0);
  }
  
  private final int jjMoveNfa_1(int startState, int curPos)
  {
    int startsAt = 0;
    jjnewStateCnt = 5;
    int i = 1;
    jjstateSet[0] = startState;
    int kind = Integer.MAX_VALUE;
    for (;;)
    {
      if (++jjround == Integer.MAX_VALUE) {
        ReInitRounds();
      }
      if (curChar < '@')
      {
        long l = 1L << curChar;
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
            if ((0xFFFFFFFEFFFFFFFF & l) != 0L)
            {
              if (kind > 31) {
                kind = 31;
              }
              jjCheckNAdd(4);
            }
            if ((0x100002600 & l) != 0L)
            {
              if (kind > 6) {
                kind = 6;
              }
            }
            else if (curChar == '"') {
              jjCheckNAdd(2);
            }
            break;
          case 1: 
            if (curChar == '"') {
              jjCheckNAdd(2);
            }
            break;
          case 2: 
            if ((0xFFFFFFFBFFFFFFFF & l) != 0L) {
              jjCheckNAddTwoStates(2, 3);
            }
            break;
          case 3: 
            if ((curChar == '"') && (kind > 30)) {
              kind = 30;
            }
            break;
          case 4: 
            if ((0xFFFFFFFEFFFFFFFF & l) != 0L)
            {
              if (kind > 31) {
                kind = 31;
              }
              jjCheckNAdd(4);
            }
            break;
          }
        } while (i != startsAt);
      }
      else if (curChar < '?')
      {
        long l = 1L << (curChar & 0x3F);
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
          case 4: 
            if ((0xDFFFFFFFFFFFFFFF & l) != 0L)
            {
              if (kind > 31) {
                kind = 31;
              }
              jjCheckNAdd(4);
            }
            break;
          case 2: 
            jjAddStates(17, 18);
          }
        } while (i != startsAt);
      }
      else
      {
        int hiByte = curChar >> '\b';
        int i1 = hiByte >> 6;
        long l1 = 1L << (hiByte & 0x3F);
        int i2 = (curChar & 0xFF) >> '\006';
        long l2 = 1L << (curChar & 0x3F);
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
          case 4: 
            if (jjCanMove_0(hiByte, i1, i2, l1, l2))
            {
              if (kind > 31) {
                kind = 31;
              }
              jjCheckNAdd(4);
            }
            break;
          case 2: 
            if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
              jjAddStates(17, 18);
            }
            break;
          }
        } while (i != startsAt);
      }
      if (kind != Integer.MAX_VALUE)
      {
        jjmatchedKind = kind;
        jjmatchedPos = curPos;
        kind = Integer.MAX_VALUE;
      }
      curPos++;
      if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) {
        return curPos;
      }
      try
      {
        curChar = input_stream.readChar();
      }
      catch (IOException e) {}
    }
    return curPos;
  }
  
  private final int jjMoveStringLiteralDfa0_0()
  {
    return jjMoveNfa_0(0, 0);
  }
  
  private final int jjMoveNfa_0(int startState, int curPos)
  {
    int startsAt = 0;
    jjnewStateCnt = 3;
    int i = 1;
    jjstateSet[0] = startState;
    int kind = Integer.MAX_VALUE;
    for (;;)
    {
      if (++jjround == Integer.MAX_VALUE) {
        ReInitRounds();
      }
      if (curChar < '@')
      {
        long l = 1L << curChar;
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
            if ((0x3FF000000000000 & l) != 0L)
            {
              if (kind > 23) {
                kind = 23;
              }
              jjAddStates(19, 20);
            }
            break;
          case 1: 
            if (curChar == '.') {
              jjCheckNAdd(2);
            }
            break;
          case 2: 
            if ((0x3FF000000000000 & l) != 0L)
            {
              if (kind > 23) {
                kind = 23;
              }
              jjCheckNAdd(2);
            }
            break;
          }
        } while (i != startsAt);
      }
      else if (curChar < '?')
      {
        long l = 1L << (curChar & 0x3F);
        do
        {
          switch (jjstateSet[(--i)])
          {
          }
        } while (i != startsAt);
      }
      else
      {
        int hiByte = curChar >> '\b';
        int i1 = hiByte >> 6;
        long l1 = 1L << (hiByte & 0x3F);
        int i2 = (curChar & 0xFF) >> '\006';
        long l2 = 1L << (curChar & 0x3F);
        do
        {
          switch (jjstateSet[(--i)])
          {
          }
        } while (i != startsAt);
      }
      if (kind != Integer.MAX_VALUE)
      {
        jjmatchedKind = kind;
        jjmatchedPos = curPos;
        kind = Integer.MAX_VALUE;
      }
      curPos++;
      if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt))) {
        return curPos;
      }
      try
      {
        curChar = input_stream.readChar();
      }
      catch (IOException e) {}
    }
    return curPos;
  }
  
  private final int jjStopStringLiteralDfa_2(int pos, long active0)
  {
    switch (pos)
    {
    case 0: 
      if ((active0 & 0x1000000) != 0L)
      {
        jjmatchedKind = 27;
        return 4;
      }
      return -1;
    }
    return -1;
  }
  
  private final int jjStartNfa_2(int pos, long active0)
  {
    return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
  }
  
  private final int jjStartNfaWithStates_2(int pos, int kind, int state)
  {
    jjmatchedKind = kind;
    jjmatchedPos = pos;
    try
    {
      curChar = input_stream.readChar();
    }
    catch (IOException e)
    {
      return pos + 1;
    }
    return jjMoveNfa_2(state, pos + 1);
  }
  
  private final int jjMoveStringLiteralDfa0_2()
  {
    switch (curChar)
    {
    case 'T': 
      return jjMoveStringLiteralDfa1_2(16777216L);
    case ']': 
      return jjStopAtPos(0, 25);
    }
    return jjMoveNfa_2(0, 0);
  }
  
  private final int jjMoveStringLiteralDfa1_2(long active0)
  {
    try
    {
      curChar = input_stream.readChar();
    }
    catch (IOException e)
    {
      jjStopStringLiteralDfa_2(0, active0);
      return 1;
    }
    switch (curChar)
    {
    case 'O': 
      if ((active0 & 0x1000000) != 0L) {
        return jjStartNfaWithStates_2(1, 24, 4);
      }
      break;
    }
    return jjStartNfa_2(0, active0);
  }
  
  private final int jjMoveNfa_2(int startState, int curPos)
  {
    int startsAt = 0;
    jjnewStateCnt = 5;
    int i = 1;
    jjstateSet[0] = startState;
    int kind = Integer.MAX_VALUE;
    for (;;)
    {
      if (++jjround == Integer.MAX_VALUE) {
        ReInitRounds();
      }
      if (curChar < '@')
      {
        long l = 1L << curChar;
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
            if ((0xFFFFFFFEFFFFFFFF & l) != 0L)
            {
              if (kind > 27) {
                kind = 27;
              }
              jjCheckNAdd(4);
            }
            if ((0x100002600 & l) != 0L)
            {
              if (kind > 6) {
                kind = 6;
              }
            }
            else if (curChar == '"') {
              jjCheckNAdd(2);
            }
            break;
          case 1: 
            if (curChar == '"') {
              jjCheckNAdd(2);
            }
            break;
          case 2: 
            if ((0xFFFFFFFBFFFFFFFF & l) != 0L) {
              jjCheckNAddTwoStates(2, 3);
            }
            break;
          case 3: 
            if ((curChar == '"') && (kind > 26)) {
              kind = 26;
            }
            break;
          case 4: 
            if ((0xFFFFFFFEFFFFFFFF & l) != 0L)
            {
              if (kind > 27) {
                kind = 27;
              }
              jjCheckNAdd(4);
            }
            break;
          }
        } while (i != startsAt);
      }
      else if (curChar < '?')
      {
        long l = 1L << (curChar & 0x3F);
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
          case 4: 
            if ((0xFFFFFFFFDFFFFFFF & l) != 0L)
            {
              if (kind > 27) {
                kind = 27;
              }
              jjCheckNAdd(4);
            }
            break;
          case 2: 
            jjAddStates(17, 18);
          }
        } while (i != startsAt);
      }
      else
      {
        int hiByte = curChar >> '\b';
        int i1 = hiByte >> 6;
        long l1 = 1L << (hiByte & 0x3F);
        int i2 = (curChar & 0xFF) >> '\006';
        long l2 = 1L << (curChar & 0x3F);
        do
        {
          switch (jjstateSet[(--i)])
          {
          case 0: 
          case 4: 
            if (jjCanMove_0(hiByte, i1, i2, l1, l2))
            {
              if (kind > 27) {
                kind = 27;
              }
              jjCheckNAdd(4);
            }
            break;
          case 2: 
            if (jjCanMove_0(hiByte, i1, i2, l1, l2)) {
              jjAddStates(17, 18);
            }
            break;
          }
        } while (i != startsAt);
      }
      if (kind != Integer.MAX_VALUE)
      {
        jjmatchedKind = kind;
        jjmatchedPos = curPos;
        kind = Integer.MAX_VALUE;
      }
      curPos++;
      if ((i = jjnewStateCnt) == (startsAt = 5 - (jjnewStateCnt = startsAt))) {
        return curPos;
      }
      try
      {
        curChar = input_stream.readChar();
      }
      catch (IOException e) {}
    }
    return curPos;
  }
  
  static final int[] jjnextStates = { 22, 25, 26, 29, 30, 27, 23, 18, 19, 25, 26, 27, 24, 28, 31, 15, 16, 2, 3, 0, 1 };
  
  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;
    }
    if ((jjbitVec0[i1] & l1) != 0L) {
      return true;
    }
    return false;
  }
  
  public static final String[] jjstrLiteralImages = { "", null, null, null, null, null, null, null, null, null, "+", "-", "(", ")", ":", "^", null, null, null, null, null, "[", "{", null, "TO", "]", null, null, "TO", "}", null, null };
  public static final String[] lexStateNames = { "Boost", "RangeEx", "RangeIn", "DEFAULT" };
  public static final int[] jjnewLexState = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 2, 1, 3, -1, 3, -1, -1, -1, 3, -1, -1 };
  static final long[] jjtoToken = { 4294967169L };
  static final long[] jjtoSkip = { 64L };
  protected CharStream input_stream;
  private final int[] jjrounds = new int[33];
  private final int[] jjstateSet = new int[66];
  protected char curChar;
  
  public PrecedenceQueryParserTokenManager(CharStream stream)
  {
    input_stream = stream;
  }
  
  public PrecedenceQueryParserTokenManager(CharStream stream, int lexState)
  {
    this(stream);
    SwitchTo(lexState);
  }
  
  public void ReInit(CharStream stream)
  {
    jjmatchedPos = (jjnewStateCnt = 0);
    curLexState = defaultLexState;
    input_stream = stream;
    ReInitRounds();
  }
  
  private final void ReInitRounds()
  {
    jjround = -2147483647;
    for (int i = 33; i-- > 0;) {
      jjrounds[i] = Integer.MIN_VALUE;
    }
  }
  
  public void ReInit(CharStream stream, int lexState)
  {
    ReInit(stream);
    SwitchTo(lexState);
  }
  
  public void SwitchTo(int lexState)
  {
    if ((lexState >= 4) || (lexState < 0)) {
      throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", 2);
    }
    curLexState = lexState;
  }
  
  protected Token jjFillToken()
  {
    Token t = Token.newToken(jjmatchedKind);
    kind = jjmatchedKind;
    String im = jjstrLiteralImages[jjmatchedKind];
    image = (im == null ? input_stream.GetImage() : im);
    beginLine = input_stream.getBeginLine();
    beginColumn = input_stream.getBeginColumn();
    endLine = input_stream.getEndLine();
    endColumn = input_stream.getEndColumn();
    return t;
  }
  
  int curLexState = 3;
  int defaultLexState = 3;
  int jjnewStateCnt;
  int jjround;
  int jjmatchedPos;
  int jjmatchedKind;
  
  public Token getNextToken()
  {
    Token specialToken = null;
    
    int curPos = 0;
    for (;;)
    {
      try
      {
        curChar = input_stream.BeginToken();
      }
      catch (IOException e)
      {
        jjmatchedKind = 0;
        return jjFillToken();
      }
      switch (curLexState)
      {
      case 0: 
        jjmatchedKind = Integer.MAX_VALUE;
        jjmatchedPos = 0;
        curPos = jjMoveStringLiteralDfa0_0();
        break;
      case 1: 
        jjmatchedKind = Integer.MAX_VALUE;
        jjmatchedPos = 0;
        curPos = jjMoveStringLiteralDfa0_1();
        break;
      case 2: 
        jjmatchedKind = Integer.MAX_VALUE;
        jjmatchedPos = 0;
        curPos = jjMoveStringLiteralDfa0_2();
        break;
      case 3: 
        jjmatchedKind = Integer.MAX_VALUE;
        jjmatchedPos = 0;
        curPos = jjMoveStringLiteralDfa0_3();
      }
      if (jjmatchedKind == Integer.MAX_VALUE) {
        break;
      }
      if (jjmatchedPos + 1 < curPos) {
        input_stream.backup(curPos - jjmatchedPos - 1);
      }
      if ((jjtoToken[(jjmatchedKind >> 6)] & 1L << (jjmatchedKind & 0x3F)) != 0L)
      {
        Token matchedToken = jjFillToken();
        if (jjnewLexState[jjmatchedKind] != -1) {
          curLexState = jjnewLexState[jjmatchedKind];
        }
        return matchedToken;
      }
      if (jjnewLexState[jjmatchedKind] != -1) {
        curLexState = jjnewLexState[jjmatchedKind];
      }
    }
    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 (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, 0);
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.queryParser.precedence.PrecedenceQueryParserTokenManager
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.queryParser.precedence;

public class Token
{
  public int kind;
  public int beginLine;
  public int beginColumn;
  public int endLine;
  public int endColumn;
  public String image;
  public Token next;
  public Token specialToken;
  
  public String toString()
  {
    return image;
  }
  
  public static final Token newToken(int ofKind)
  {
    switch (ofKind)
    {
    }
    return new Token();
  }
}

/* Location:
 * Qualified Name:     org.apache.lucene.queryParser.precedence.Token
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.lucene.queryParser.precedence;

public class TokenMgrError
  extends Error
{
  static final int LEXICAL_ERROR = 0;
  static final int STATIC_LEXER_ERROR = 1;
  static final int INVALID_LEXICAL_STATE = 2;
  static final int LOOP_DETECTED = 3;
  int errorCode;
  
  protected static final String addEscapes(String str)
  {
    StringBuffer retval = new StringBuffer();
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i))
      {
      case '\000': 
        break;
      case '\b': 
        retval.append("\\b");
        break;
      case '\t': 
        retval.append("\\t");
        break;
      case '\n': 
        retval.append("\\n");
        break;
      case '\f': 
        retval.append("\\f");
        break;
      case '\r': 
        retval.append("\\r");
        break;
      case '"': 
        retval.append("\\\"");
        break;
      case '\'': 
        retval.append("\\'");
        break;
      case '\\': 
        retval.append("\\\\");
        break;
      default: 
        char ch;
        if (((ch = str.charAt(i)) < ' ') || (ch > '~'))
        {
          String s = "0000" + Integer.toString(ch, 16);
          retval.append("\\u" + s.substring(s.length() - 4, s.length()));
        }
        else
        {
          retval.append(ch);
        }
        break;
      }
    }
    return retval.toString();
  }
  
  protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar)
  {
    return "Lexical error at line " + errorLine + ", column " + errorColumn + ".  Encountered: " + (EOFSeen ? "<EOF> " : new StringBuffer().append("\"").append(addEscapes(String.valueOf(curChar))).append("\"").append(" (").append(curChar).append("), ").toString()) + "after : \"" + addEscapes(errorAfter) + "\"";
  }
  
  public String getMessage()
  {
    return 
1 2 3 4

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd