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

📄 javatreeparser.java

📁 drools 一个开放源码的规则引擎
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
            _t = __t354;
            _t = _t.getNextSibling();
        }
        catch ( RecognitionException ex )
        {
            reportError( ex );
            if ( _t != null )
            {
                _t = _t.getNextSibling();
            }
        }
        _retTree = _t;
    }

    public final void whenBlock(AST _t) throws RecognitionException
    {

        AST whenBlock_AST_in = (AST) _t;

        try
        { // for error handling
            AST __t342 = _t;
            AST tmp15_AST_in = (AST) _t;
            match( _t,
                   WHEN );
            _t = _t.getFirstChild();
            AST tmp16_AST_in = (AST) _t;
            if ( _t == null ) throw new MismatchedTokenException();
            _t = _t.getNextSibling();
            _t = __t342;
            _t = _t.getNextSibling();
        }
        catch ( RecognitionException ex )
        {
            reportError( ex );
            if ( _t != null )
            {
                _t = _t.getNextSibling();
            }
        }
        _retTree = _t;
    }

    public final void thenBlock(AST _t) throws RecognitionException
    {

        AST thenBlock_AST_in = (AST) _t;

        try
        { // for error handling
            AST __t344 = _t;
            AST tmp17_AST_in = (AST) _t;
            match( _t,
                   THEN );
            _t = _t.getFirstChild();
            {
                if ( _t == null ) _t = ASTNULL;
                switch ( _t.getType() )
                {
                    case SLIST :
                    {
                        slist( _t );
                        _t = _retTree;
                        break;
                    }
                    case 3 :
                    {
                        break;
                    }
                    default :
                    {
                        throw new NoViableAltException( _t );
                    }
                }
            }
            _t = __t344;
            _t = _t.getNextSibling();
        }
        catch ( RecognitionException ex )
        {
            reportError( ex );
            if ( _t != null )
            {
                _t = _t.getNextSibling();
            }
        }
        _retTree = _t;
    }

    public final void slist(AST _t) throws RecognitionException
    {

        AST slist_AST_in = (AST) _t;

        try
        { // for error handling
            AST __t423 = _t;
            AST tmp18_AST_in = (AST) _t;
            match( _t,
                   SLIST );
            _t = _t.getFirstChild();
            {
                _loop425 : do
                {
                    if ( _t == null ) _t = ASTNULL;
                    if ( (_tokenSet_0.member( _t.getType() )) )
                    {
                        stat( _t );
                        _t = _retTree;
                    }
                    else
                    {
                        break _loop425;
                    }

                }
                while ( true );
            }
            _t = __t423;
            _t = _t.getNextSibling();
        }
        catch ( RecognitionException ex )
        {
            reportError( ex );
            if ( _t != null )
            {
                _t = _t.getNextSibling();
            }
        }
        _retTree = _t;
    }

    public final void identifier(AST _t) throws RecognitionException
    {

        AST identifier_AST_in = (AST) _t;

        try
        { // for error handling
            if ( _t == null ) _t = ASTNULL;
            switch ( _t.getType() )
            {
                case IDENT :
                {
                    AST tmp19_AST_in = (AST) _t;
                    match( _t,
                           IDENT );
                    _t = _t.getNextSibling();
                    break;
                }
                case DOT :
                {
                    AST __t413 = _t;
                    AST tmp20_AST_in = (AST) _t;
                    match( _t,
                           DOT );
                    _t = _t.getFirstChild();
                    identifier( _t );
                    _t = _retTree;
                    AST tmp21_AST_in = (AST) _t;
                    match( _t,
                           IDENT );
                    _t = _t.getNextSibling();
                    _t = __t413;
                    _t = _t.getNextSibling();
                    break;
                }
                default :
                {
                    throw new NoViableAltException( _t );
                }
            }
        }
        catch ( RecognitionException ex )
        {
            reportError( ex );
            if ( _t != null )
            {
                _t = _t.getNextSibling();
            }
        }
        _retTree = _t;
    }

    public final void identifierStar(AST _t) throws RecognitionException
    {

        AST identifierStar_AST_in = (AST) _t;

        try
        { // for error handling
            if ( _t == null ) _t = ASTNULL;
            switch ( _t.getType() )
            {
                case IDENT :
                {
                    AST tmp22_AST_in = (AST) _t;
                    match( _t,
                           IDENT );
                    _t = _t.getNextSibling();
                    break;
                }
                case DOT :
                {
                    AST __t415 = _t;
                    AST tmp23_AST_in = (AST) _t;
                    match( _t,
                           DOT );
                    _t = _t.getFirstChild();
                    identifier( _t );
                    _t = _retTree;
                    {
                        if ( _t == null ) _t = ASTNULL;
                        switch ( _t.getType() )
                        {
                            case STAR :
                            {
                                AST tmp24_AST_in = (AST) _t;
                                match( _t,
                                       STAR );
                                _t = _t.getNextSibling();
                                break;
                            }
                            case IDENT :
                            {
                                AST tmp25_AST_in = (AST) _t;
                                match( _t,
                                       IDENT );
                                _t = _t.getNextSibling();
                                break;
                            }
                            default :
                            {
                                throw new NoViableAltException( _t );
                            }
                        }
                    }
                    _t = __t415;
                    _t = _t.getNextSibling();
                    break;
                }
                default :
                {
                    throw new NoViableAltException( _t );
                }
            }
        }
        catch ( RecognitionException ex )
        {
            reportError( ex );
            if ( _t != null )
            {
                _t = _t.getNextSibling();
            }
        }
        _retTree = _t;
    }

    public final void modifiers(AST _t) throws RecognitionException
    {

        AST modifiers_AST_in = (AST) _t;

        try
        { // for error handling
            AST __t360 = _t;
            AST tmp26_AST_in = (AST) _t;
            match( _t,
                   MODIFIERS );
            _t = _t.getFirstChild();
            {
                _loop362 : do
                {
                    if ( _t == null ) _t = ASTNULL;
                    if ( (_tokenSet_1.member( _t.getType() )) )
                    {
                        modifier( _t );
                        _t = _retTree;
                    }
                    else
                    {
                        break _loop362;
                    }

                }
                while ( true );
            }
            _t = __t360;
            _t = _t.getNextSibling();
        }
        catch ( RecognitionException ex )
        {
            reportError( ex );
            if ( _t != null )
            {
                _t = _t.getNextSibling();
            }
        }
        _retTree = _t;
    }

    public final void extendsClause(AST _t) throws RecognitionException
    {

        AST extendsClause_AST_in = (AST) _t;

        try
        { // for error handling
            AST __t365 = _t;
            AST tmp27_AST_in = (AST) _t;
            match( _t,
                   EXTENDS_CLAUSE );
            _t = _t.getFirstChild();
            {
                _loop367 : do
                {
                    if ( _t == null ) _t = ASTNULL;
                    if ( (_t.getType() == IDENT || _t.getType() == DOT) )
                    {
                        identifier( _t );
                        _t = _retTree;
                    }
                    else
                    {
                        break _loop367;
                    }

                }
                while ( true );
            }
            _t = __t365;
            _t = _t.getNextSibling();
        }
        catch ( RecognitionException ex )
        {
            reportError( ex );
            if ( _t != null )
            {
                _t = _t.getNextSibling();
            }
        }
        _retTree = _t;
    }

    public final void implementsClause(AST _t) throws RecognitionException
    {

        AST implementsClause_AST_in = (AST) _t;

        try
        { // for error handling
            AST __t369 = _t;
            AST tmp28_AST_in = (AST) _t;
            match( _t,
                   IMPLEMENTS_CLAUSE );
            _t = _t.getFirstChild();
            {
                _loop371 : do
                {
                    if ( _t == null ) _t = ASTNULL;
                    if ( (_t.getType() == IDENT || _t.getType() == DOT) )
                    {
                        identifier( _t );
                        _t = _retTree;
                    }
                    else
                    {
                        break _loop371;
                    }

                }
                while ( true );
            }
            _t = __t369;
            _t = _t.getNextSibling();
        }
        catch ( RecognitionException ex )
        {
            reportError( ex );
            if ( _t != null )
            {
                _t = _t.getNextSibling();
            }
        }
        _retTree = _t;
    }

    public final void objBlock(AST _t) throws RecognitionException
    {

        AST objBlock_AST_in = (AST) _t;

        try
        { // for error handling
            AST __t377 = _t;
            AST tmp29_AST_in = (AST) _t;
            match( _t,
                   OBJBLOCK );
            _t = _t.getFirstChild();
            {
                _loop381 : do
                {
                    if ( _t == null ) _t = ASTNULL;
                    switch ( _t.getType() )
                    {
                        case CTOR_DEF :
                        {
                            ctorDef( _t );
                            _t = _retTree;
                            break;
                        }
                        case METHOD_DEF :
                        {
                            methodDef( _t );
                            _t = _retTree;
                            break;
                        }
                        case VARIABLE_DEF :
                        {
                            variableDef( _t );
                            _t = _retTree;
                            break;
                        }
                        case CLASS_DEF :
                        case INTERFACE_DEF :
                        {
                            typeDefinition( _t );
                            _t = _retTree;
                            break;
                        }
                        case STATIC_INIT :
                        {
                            AST __t379 = _t;
                            AST tmp30_AST_in = (AST) _t;
                            match( _t,
                                   STATIC_INIT );
                            _t = _t.getFirstChild();
                            slist( _t );
                            _t = _retTree;

⌨️ 快捷键说明

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