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

📄 ognlparsertokenmanager.java

📁 OGNL文档包:----->最新版本!学习Struts2的必须帮助参考文档
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
/* Generated By:JJTree&JavaCC: Do not edit this line. OgnlParserTokenManager.java */
package ognl;
import java.math.*;

public class OgnlParserTokenManager implements OgnlParserConstants
{
      /** Holds the last value computed by a constant token. */
    Object literalValue;
      /** Holds the last character escaped or in a character literal. */
    private char charValue;
      /** Holds char literal start token. */
    private char charLiteralStartQuote;
      /** Holds the last string literal parsed. */
    private StringBuffer stringBuffer;

      /** Converts an escape sequence into a character value. */
    private char escapeChar()
    {
        int ofs = image.length() - 1;
        switch ( image.charAt(ofs) ) {
            case 'n':   return '\n';
            case 'r':   return '\r';
            case 't':   return '\t';
            case 'b':   return '\b';
            case 'f':   return '\f';
            case '\\':  return '\\';
            case '\'':  return '\'';
            case '\"':  return '\"';
        }

          // Otherwise, it's an octal number.  Find the backslash and convert.
        while ( image.charAt(--ofs) != '\\' )
          {}
        int value = 0;
        while ( ++ofs < image.length() )
            value = (value << 3) | (image.charAt(ofs) - '0');
        return (char) value;
    }

    private Object makeInt()
    {
        Object  result;
        String  s = image.toString();
        int     base = 10;

        if ( s.charAt(0) == '0' )
            base = (s.length() > 1 && (s.charAt(1) == 'x' || s.charAt(1) == 'X'))? 16 : 8;
        if ( base == 16 )
            s = s.substring(2); // Trim the 0x off the front
        switch ( s.charAt(s.length()-1) ) {
            case 'l': case 'L':
                result = Long.valueOf( s.substring(0,s.length()-1), base );
                break;

            case 'h': case 'H':
                result = new BigInteger( s.substring(0,s.length()-1), base );
                break;

            default:
                result = Integer.valueOf( s, base );
                break;
        }
        return result;
    }

    private Object makeFloat()
    {
        String s = image.toString();
        switch ( s.charAt(s.length()-1) ) {
            case 'f': case 'F':
                return Float.valueOf( s );

            case 'b': case 'B':
                return new BigDecimal( s.substring(0,s.length()-1) );

            case 'd': case 'D':
            default:
                return Double.valueOf( s );
        }
    }
  public  java.io.PrintStream debugStream = System.out;
  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
{
   switch (pos)
   {
      case 0:
         if ((active0 & 0x201c4055d555540L) != 0L)
         {
            jjmatchedKind = 64;
            return 1;
         }
         if ((active0 & 0x400000000000000L) != 0L)
            return 1;
         if ((active0 & 0x10000000000000L) != 0L)
            return 3;
         if ((active0 & 0x80000000000L) != 0L)
            return 9;
         return -1;
      case 1:
         if ((active0 & 0x201c00550045500L) != 0L)
         {
            if (jjmatchedPos != 1)
            {
               jjmatchedKind = 64;
               jjmatchedPos = 1;
            }
            return 1;
         }
         if ((active0 & 0x4000d510040L) != 0L)
            return 1;
         return -1;
      case 2:
         if ((active0 & 0x1c40400004000L) != 0L)
         {
            jjmatchedKind = 64;
            jjmatchedPos = 2;
            return 1;
         }
         if ((active0 & 0x200000155041500L) != 0L)
            return 1;
         return -1;
      case 3:
         if ((active0 & 0x1400400004000L) != 0L)
            return 1;
         if ((active0 & 0x840000000000L) != 0L)
         {
            jjmatchedKind = 64;
            jjmatchedPos = 3;
            return 1;
         }
         return -1;
      case 4:
         if ((active0 & 0x800000000000L) != 0L)
            return 1;
         if ((active0 & 0x40000000000L) != 0L)
         {
            jjmatchedKind = 64;
            jjmatchedPos = 4;
            return 1;
         }
         return -1;
      case 5:
         if ((active0 & 0x40000000000L) != 0L)
         {
            jjmatchedKind = 64;
            jjmatchedPos = 5;
            return 1;
         }
         return -1;
      case 6:
         if ((active0 & 0x40000000000L) != 0L)
         {
            jjmatchedKind = 64;
            jjmatchedPos = 6;
            return 1;
         }
         return -1;
      case 7:
         if ((active0 & 0x40000000000L) != 0L)
         {
            jjmatchedKind = 64;
            jjmatchedPos = 7;
            return 1;
         }
         return -1;
      case 8:
         if ((active0 & 0x40000000000L) != 0L)
         {
            jjmatchedKind = 64;
            jjmatchedPos = 8;
            return 1;
         }
         return -1;
      default :
         return -1;
   }
}
private final int jjStartNfa_0(int pos, long active0, long active1)
{
   return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
}
private final int jjStopAtPos(int pos, int kind)
{
   jjmatchedKind = kind;
   jjmatchedPos = pos;
   return pos + 1;
}
private final int jjStartNfaWithStates_0(int pos, int kind, int state)
{
   jjmatchedKind = kind;
   jjmatchedPos = pos;
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) { return pos + 1; }
   return jjMoveNfa_0(state, pos + 1);
}
private final int jjMoveStringLiteralDfa0_0()
{
   switch(curChar)
   {
      case 33:
         jjmatchedKind = 41;
         return jjMoveStringLiteralDfa1_0(0x20000L);
      case 34:
         return jjStopAtPos(0, 70);
      case 35:
         jjmatchedKind = 51;
         return jjMoveStringLiteralDfa1_0(0x6000000000000L);
      case 36:
         return jjStartNfaWithStates_0(0, 58, 1);
      case 37:
         return jjStopAtPos(0, 39);
      case 38:
         jjmatchedKind = 13;
         return jjMoveStringLiteralDfa1_0(0x80L);
      case 39:
         return jjStopAtPos(0, 69);
      case 40:
         return jjStopAtPos(0, 44);
      case 41:
         return jjStopAtPos(0, 45);
      case 42:
         return jjStopAtPos(0, 37);
      case 43:
         return jjStopAtPos(0, 35);
      case 44:
         return jjStopAtPos(0, 1);
      case 45:
         return jjStopAtPos(0, 36);
      case 46:
         return jjStartNfaWithStates_0(0, 43, 9);
      case 47:
         return jjStopAtPos(0, 38);
      case 58:
         return jjStopAtPos(0, 4);
      case 60:
         jjmatchedKind = 19;
         return jjMoveStringLiteralDfa1_0(0x20800000L);
      case 61:
         jjmatchedKind = 2;
         return jjMoveStringLiteralDfa1_0(0x8000L);
      case 62:
         jjmatchedKind = 21;
         return jjMoveStringLiteralDfa1_0(0x282000000L);
      case 63:
         return jjStopAtPos(0, 3);
      case 64:
         return jjStopAtPos(0, 56);
      case 91:
         return jjStartNfaWithStates_0(0, 52, 3);
      case 93:
         return jjStopAtPos(0, 53);
      case 94:
         return jjStopAtPos(0, 11);
      case 96:
         return jjStopAtPos(0, 68);
      case 97:
         return jjMoveStringLiteralDfa1_0(0x100L);
      case 98:
         return jjMoveStringLiteralDfa1_0(0x4400L);
      case 101:
         return jjMoveStringLiteralDfa1_0(0x10000L);
      case 102:
         return jjMoveStringLiteralDfa1_0(0x800000000000L);
      case 103:
         return jjMoveStringLiteralDfa1_0(0x4400000L);
      case 105:
         return jjMoveStringLiteralDfa1_0(0x40008000000L);
      case 108:
         return jjMoveStringLiteralDfa1_0(0x1100000L);
      case 110:
         return jjMoveStringLiteralDfa1_0(0x201000010040000L);
      case 111:
         return jjMoveStringLiteralDfa1_0(0x40L);
      case 115:
         return jjMoveStringLiteralDfa1_0(0x140000000L);
      case 116:
         return jjMoveStringLiteralDfa1_0(0x400000000000L);
      case 117:
         return jjMoveStringLiteralDfa1_0(0x400000000L);
      case 120:
         return jjMoveStringLiteralDfa1_0(0x1000L);
      case 123:
         return jjStopAtPos(0, 54);
      case 124:
         jjmatchedKind = 9;
         return jjMoveStringLiteralDfa1_0(0x20L);
      case 125:
         return jjStopAtPos(0, 55);
      case 126:
         return jjStopAtPos(0, 40);
      default :
         return jjMoveNfa_0(0, 0);
   }
}
private final int jjMoveStringLiteralDfa1_0(long active0)
{
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_0(0, active0, 0L);
      return 1;
   }
   switch(curChar)
   {
      case 38:
         if ((active0 & 0x80L) != 0L)
            return jjStopAtPos(1, 7);
         break;
      case 60:
         if ((active0 & 0x20000000L) != 0L)
            return jjStopAtPos(1, 29);
         break;
      case 61:
         if ((active0 & 0x8000L) != 0L)
            return jjStopAtPos(1, 15);
         else if ((active0 & 0x20000L) != 0L)
            return jjStopAtPos(1, 17);
         else if ((active0 & 0x800000L) != 0L)
            return jjStopAtPos(1, 23);
         else if ((active0 & 0x2000000L) != 0L)
            return jjStopAtPos(1, 25);
         break;
      case 62:
         if ((active0 & 0x80000000L) != 0L)
         {
            jjmatchedKind = 31;
            jjmatchedPos = 1;
         }
         return jjMoveStringLiteralDfa2_0(active0, 0x200000000L);
      case 97:
         return jjMoveStringLiteralDfa2_0(active0, 0x800000004000L);
      case 101:
         return jjMoveStringLiteralDfa2_0(active0, 0x200000000040000L);
      case 104:
         return jjMoveStringLiteralDfa2_0(active0, 0x140000000L);
      case 110:
         if ((active0 & 0x8000000L) != 0L)
         {
            jjmatchedKind = 27;
            jjmatchedPos = 1;
         }
         return jjMoveStringLiteralDfa2_0(active0, 0x40000000100L);
      case 111:
         return jjMoveStringLiteralDfa2_0(active0, 0x10001400L);
      case 113:
         if ((active0 & 0x10000L) != 0L)
            return jjStartNfaWithStates_0(1, 16, 1);
         break;
      case 114:
         if ((active0 & 0x40L) != 0L)
            return jjStartNfaWithStates_0(1, 6, 1);
         return jjMoveStringLiteralDfa2_0(active0, 0x4400000000000L);
      case 115:
         return jjMoveStringLiteralDfa2_0(active0, 0x400000000L);
      case 116:
         if ((active0 & 0x100000L) != 0L)
         {
            jjmatchedKind = 20;
            jjmatchedPos = 1;
         }
         else if ((active0 & 0x400000L) != 0L)
         {
            jjmatchedKind = 22;
            jjmatchedPos = 1;
         }
         return jjMoveStringLiteralDfa2_0(active0, 0x2000005000000L);
      case 117:
         return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000L);
      case 124:
         if ((active0 & 0x20L) != 0L)
            return jjStopAtPos(1, 5);
         break;
      default :
         break;
   }
   return jjStartNfa_0(0, active0, 0L);
}
private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
{
   if (((active0 &= old0)) == 0L)
      return jjStartNfa_0(0, old0, 0L);
   try { curChar = input_stream.readChar(); }
   catch(java.io.IOException e) {
      jjStopStringLiteralDfa_0(1, active0, 0L);
      return 2;
   }
   switch(curChar)
   {
      case 62:
         if ((active0 & 0x200000000L) != 0L)
            return jjStopAtPos(2, 33);
         break;
      case 100:
         if ((active0 & 0x100L) != 0L)
            return jjStartNfaWithStates_0(2, 8, 1);
         break;
      case 101:
         if ((active0 & 0x1000000L) != 0L)
            return jjStartNfaWithStates_0(2, 24, 1);
         else if ((active0 & 0x4000000L) != 0L)
            return jjStartNfaWithStates_0(2, 26, 1);
         break;
      case 104:
         return jjMoveStringLiteralDfa3_0(active0, 0x2000400000000L);
      case 108:
         if ((active0 & 0x40000000L) != 0L)
            return jjStartNfaWithStates_0(2, 30, 1);
         return jjMoveStringLiteralDfa3_0(active0, 0x1800000000000L);
      case 110:
         return jjMoveStringLiteralDfa3_0(active0, 0x4000L);
      case 111:
         return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000L);
      case 113:
         if ((active0 & 0x40000L) != 0L)
            return jjStartNfaWithStates_0(2, 18, 1);
         break;
      case 114:
         if ((active0 & 0x400L) != 0L)
            return jjStartNfaWithStates_0(2, 10, 1);
         else if ((active0 & 0x1000L) != 0L)
            return jjStartNfaWithStates_0(2, 12, 1);
         else if ((active0 & 0x100000000L) != 0L)
            return jjStartNfaWithStates_0(2, 32, 1);
         break;
      case 115:

⌨️ 快捷键说明

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