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

📄 htmlparsertokenmanager.java

📁 反ajax原代码
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   HTMLParserTokenManager.java

package com.laoer.bbscs.lucene.html;

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

// Referenced classes of package com.laoer.bbscs.lucene.html:
//            TokenMgrError, HTMLParserConstants, SimpleCharStream, Token

public class HTMLParserTokenManager
    implements HTMLParserConstants
{

    public PrintStream debugStream;
    static final long jjbitVec0[] = {
        0L, 0L, -1L, -1L
    };
    static final int jjnextStates[] = {
        17, 18, 21, 12, 14, 5, 8, 0, 4, 6, 
        0, 4, 6, 5, 0, 4, 6, 12, 13, 3, 
        4
    };
    public static final String jjstrLiteralImages[] = {
        "", "<script", null, null, "<!--", "<!", null, null, null, null, 
        null, null, null, null, null, null, "=", null, null, "'", 
        "\"", null, null, null, null, null, null, "-->", null, ">"
    };
    public static final String lexStateNames[] = {
        "DEFAULT", "WithinScript", "WithinTag", "AfterEquals", "WithinQuote1", "WithinQuote2", "WithinComment1", "WithinComment2"
    };
    public static final int jjnewLexState[] = {
        -1, 1, 2, 2, 6, 7, -1, -1, -1, -1, 
        -1, -1, -1, -1, 0, -1, 3, 0, 2, 4, 
        5, -1, -1, 2, -1, 2, -1, 0, -1, 0
    };
    static final long jjtoToken[] = {
        0x3fdff67fL
    };
    static final long jjtoSkip[] = {
        0x200000L
    };
    protected SimpleCharStream input_stream;
    private final int jjrounds[];
    private final int jjstateSet[];
    protected char curChar;
    int curLexState;
    int defaultLexState;
    int jjnewStateCnt;
    int jjround;
    int jjmatchedPos;
    int jjmatchedKind;

    public void setDebugStream(PrintStream ds)
    {
        debugStream = ds;
    }

    private final int jjStopStringLiteralDfa_0(int pos, long active0)
    {
        switch(pos)
        {
        case 0: // '\0'
            return (active0 & 50L) == 0L ? -1 : 17;

        case 1: // '\001'
            if((active0 & 48L) != 0L)
                return 22;
            if((active0 & 2L) != 0L)
            {
                if(jjmatchedPos != 1)
                {
                    jjmatchedKind = 2;
                    jjmatchedPos = 1;
                }
                return 19;
            } else
            {
                return -1;
            }

        case 2: // '\002'
            if((active0 & 2L) != 0L)
            {
                jjmatchedKind = 2;
                jjmatchedPos = 2;
                return 20;
            } else
            {
                return -1;
            }

        case 3: // '\003'
            if((active0 & 2L) != 0L)
            {
                jjmatchedKind = 2;
                jjmatchedPos = 3;
                return 20;
            } else
            {
                return -1;
            }

        case 4: // '\004'
            if((active0 & 2L) != 0L)
            {
                jjmatchedKind = 2;
                jjmatchedPos = 4;
                return 20;
            } else
            {
                return -1;
            }

        case 5: // '\005'
            if((active0 & 2L) != 0L)
            {
                jjmatchedKind = 2;
                jjmatchedPos = 5;
                return 20;
            } else
            {
                return -1;
            }
        }
        return -1;
    }

    private final int jjStartNfa_0(int pos, long active0)
    {
        return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), 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(IOException e)
        {
            return pos + 1;
        }
        return jjMoveNfa_0(state, pos + 1);
    }

    private final int jjMoveStringLiteralDfa0_0()
    {
        switch(curChar)
        {
        case 60: // '<'
            return jjMoveStringLiteralDfa1_0(50L);
        }
        return jjMoveNfa_0(11, 0);
    }

    private final int jjMoveStringLiteralDfa1_0(long active0)
    {
        try
        {
            curChar = input_stream.readChar();
        }
        catch(IOException e)
        {
            jjStopStringLiteralDfa_0(0, active0);
            return 1;
        }
        switch(curChar)
        {
        case 33: // '!'
            if((active0 & 32L) != 0L)
            {
                jjmatchedKind = 5;
                jjmatchedPos = 1;
            }
            return jjMoveStringLiteralDfa2_0(active0, 16L);

        case 115: // 's'
            return jjMoveStringLiteralDfa2_0(active0, 2L);
        }
        return jjStartNfa_0(0, active0);
    }

    private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
    {
        if((active0 &= old0) == 0L)
            return jjStartNfa_0(0, old0);
        try
        {
            curChar = input_stream.readChar();
        }
        catch(IOException e)
        {
            jjStopStringLiteralDfa_0(1, active0);
            return 2;
        }
        switch(curChar)
        {
        case 45: // '-'
            return jjMoveStringLiteralDfa3_0(active0, 16L);

        case 99: // 'c'
            return jjMoveStringLiteralDfa3_0(active0, 2L);
        }
        return jjStartNfa_0(1, active0);
    }

    private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
    {
        if((active0 &= old0) == 0L)
            return jjStartNfa_0(1, old0);
        try
        {
            curChar = input_stream.readChar();
        }
        catch(IOException e)
        {
            jjStopStringLiteralDfa_0(2, active0);
            return 3;
        }
        switch(curChar)
        {
        case 45: // '-'
            if((active0 & 16L) != 0L)
                return jjStopAtPos(3, 4);
            break;

        case 114: // 'r'
            return jjMoveStringLiteralDfa4_0(active0, 2L);
        }
        return jjStartNfa_0(2, active0);
    }

    private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
    {
        if((active0 &= old0) == 0L)
            return jjStartNfa_0(2, old0);
        try
        {
            curChar = input_stream.readChar();
        }
        catch(IOException e)
        {
            jjStopStringLiteralDfa_0(3, active0);
            return 4;
        }
        switch(curChar)
        {
        case 105: // 'i'
            return jjMoveStringLiteralDfa5_0(active0, 2L);
        }
        return jjStartNfa_0(3, active0);
    }

    private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
    {
        if((active0 &= old0) == 0L)
            return jjStartNfa_0(3, old0);
        try
        {
            curChar = input_stream.readChar();
        }
        catch(IOException e)
        {
            jjStopStringLiteralDfa_0(4, active0);
            return 5;
        }
        switch(curChar)
        {
        case 112: // 'p'
            return jjMoveStringLiteralDfa6_0(active0, 2L);
        }
        return jjStartNfa_0(4, active0);
    }

    private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
    {
        if((active0 &= old0) == 0L)
            return jjStartNfa_0(4, old0);
        try
        {
            curChar = input_stream.readChar();
        }
        catch(IOException e)
        {
            jjStopStringLiteralDfa_0(5, active0);
            return 6;
        }
        switch(curChar)
        {
        case 116: // 't'
            if((active0 & 2L) != 0L)
                return jjStartNfaWithStates_0(6, 1, 20);
            break;
        }
        return jjStartNfa_0(5, active0);
    }

    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]);
    }

    private final int jjMoveNfa_0(int startState, int curPos)
    {
        int startsAt = 0;
        jjnewStateCnt = 25;
        int i = 1;
        jjstateSet[0] = startState;
        int kind = 0x7fffffff;
        do
        {
            if(++jjround == 0x7fffffff)
                ReInitRounds();
            if(curChar < '@')
            {
                long l = 1L << curChar;
                do
                    switch(jjstateSet[--i])
                    {
                    case 11: // '\013'
                        if((0x3ff000000000000L & l) != 0L)
                            jjCheckNAddTwoStates(7, 2);
                        else
                        if((0x100002600L & l) != 0L)
                        {
                            if(kind > 10)
                                kind = 10;
                            jjCheckNAdd(10);
                        } else
                        if(curChar == '<')
                            jjCheckNAddStates(0, 2);
                        else
                        if(curChar == '&')
                            jjAddStates(3, 4);
                        else
                        if(curChar == '$')
                            jjstateSet[jjnewStateCnt++] = 1;
                        if((0x3ff000000000000L & l) != 0L)
                        {
                            if(kind > 6)
                                kind = 6;
                            jjCheckNAddStates(5, 9);
                        }
                        break;

                    case 17: // '\021'
                        if(curChar == '!')
                            jjstateSet[jjnewStateCnt++] = 22;
                        else
                        if(curChar == '/')
                            jjCheckNAdd(18);
                        break;

                    case 0: // '\0'
                        if(curChar == '$')
                            jjstateSet[jjnewStateCnt++] = 1;
                        break;

                    case 1: // '\001'
                        if((0x3ff000000000000L & l) != 0L)
                            jjCheckNAdd(2);
                        break;

                    case 2: // '\002'
                        if((0x500000000000L & l) != 0L)
                            jjstateSet[jjnewStateCnt++] = 3;
                        break;

                    case 3: // '\003'
                    case 9: // '\t'
                        if((0x3ff000000000000L & l) != 0L)
                        {
                            if(kind > 6)
                                kind = 6;
                            jjCheckNAddStates(10, 12);
                        }
                        break;

                    case 4: // '\004'
                        if((0x3ff000000000000L & l) != 0L)
                        {
                            if(kind > 6)
                                kind = 6;
                            jjCheckNAddStates(5, 9);
                        }
                        break;

                    case 5: // '\005'
                        if((0x880000000000L & l) != 0L)
                        {
                            if(kind > 6)
                                kind = 6;
                            jjCheckNAddStates(13, 16);
                        }
                        break;

                    case 6: // '\006'
                        if((0x3ff000000000000L & l) != 0L)
                            jjCheckNAddTwoStates(7, 2);
                        break;

                    case 7: // '\007'
                        if(curChar == '"')
                        {
                            if(kind > 6)
                                kind = 6;

⌨️ 快捷键说明

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