Package tool.model

Examples of tool.model.ToolVirtualAttribute



    // $ANTLR start "virtualAttributeDeclaration"
    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:410:1: virtualAttributeDeclaration returns [ToolVirtualAttribute att] : ^( VIRTUAL_ATTRIBUTE modifier name type getExpression ( setExpression )? ) ;
    public final ToolVirtualAttribute virtualAttributeDeclaration() throws RecognitionException {
        ToolVirtualAttribute att = null;

        ForteAST.name_return name34 = null;

        ForteAST.type_return type35 = null;

        ForteAST.modifier_return modifier36 = null;

        ForteAST.getExpression_return getExpression37 = null;

        ForteAST.setExpression_return setExpression38 = null;


        try {
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:411:2: ( ^( VIRTUAL_ATTRIBUTE modifier name type getExpression ( setExpression )? ) )
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:411:4: ^( VIRTUAL_ATTRIBUTE modifier name type getExpression ( setExpression )? )
            {
            match(input,VIRTUAL_ATTRIBUTE,FOLLOW_VIRTUAL_ATTRIBUTE_in_virtualAttributeDeclaration1359); if (state.failed) return att;

            match(input, Token.DOWN, null); if (state.failed) return att;
            pushFollow(FOLLOW_modifier_in_virtualAttributeDeclaration1361);
            modifier36=modifier();

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_name_in_virtualAttributeDeclaration1363);
            name34=name();

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_type_in_virtualAttributeDeclaration1365);
            type35=type();

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_getExpression_in_virtualAttributeDeclaration1368);
            getExpression37=getExpression();

            state._fsp--;
            if (state.failed) return att;
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:411:58: ( setExpression )?
            int alt35=2;
            int LA35_0 = input.LA(1);

            if ( (LA35_0==SET_EXPRESSION) ) {
                alt35=1;
            }
            switch (alt35) {
                case 1 :
                    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:0:0: setExpression
                    {
                    pushFollow(FOLLOW_setExpression_in_virtualAttributeDeclaration1370);
                    setExpression38=setExpression();

                    state._fsp--;
                    if (state.failed) return att;

                    }
                    break;

            }


            match(input, Token.UP, null); if (state.failed) return att;
            if ( state.backtracking==0 ) {

                att = new ToolVirtualAttribute(currentType);
                att.setToolName((name34!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(name34.start),
                input.getTreeAdaptor().getTokenStopIndex(name34.start))):null));
                att.setType((type35!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(type35.start),
                input.getTreeAdaptor().getTokenStopIndex(type35.start))):null));
                att.setVisability((modifier36!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(modifier36.start),
                input.getTreeAdaptor().getTokenStopIndex(modifier36.start))):null));
                att.setGetExpression((getExpression37!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(getExpression37.start),
                input.getTreeAdaptor().getTokenStopIndex(getExpression37.start))):null));
                att.setSetExpression((setExpression38!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(setExpression38.start),
                input.getTreeAdaptor().getTokenStopIndex(setExpression38.start))):null));
                if (currentType instanceof ToolClass)
                    ((ToolClass)currentType).add(att);
                else if (currentType instanceof ToolInterface)
View Full Code Here



    // $ANTLR start "virtualAttributeDeclaration"
    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:116:1: virtualAttributeDeclaration returns [ToolVirtualAttribute att] : ^( VIRTUAL_ATTRIBUTE modifier name type getExpression ( setExpression )? ) ;
    public final ToolVirtualAttribute virtualAttributeDeclaration() throws RecognitionException {
        ToolVirtualAttribute att = null;

        ForteCDFTree.name_return name6 = null;

        ForteCDFTree.type_return type7 = null;

        ForteCDFTree.modifier_return modifier8 = null;

        ForteCDFTree.getExpression_return getExpression9 = null;

        ForteCDFTree.setExpression_return setExpression10 = null;


        try {
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:117:2: ( ^( VIRTUAL_ATTRIBUTE modifier name type getExpression ( setExpression )? ) )
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:117:4: ^( VIRTUAL_ATTRIBUTE modifier name type getExpression ( setExpression )? )
            {
            match(input,VIRTUAL_ATTRIBUTE,FOLLOW_VIRTUAL_ATTRIBUTE_in_virtualAttributeDeclaration362); if (state.failed) return att;

            match(input, Token.DOWN, null); if (state.failed) return att;
            pushFollow(FOLLOW_modifier_in_virtualAttributeDeclaration364);
            modifier8=modifier();

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_name_in_virtualAttributeDeclaration366);
            name6=name();

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_type_in_virtualAttributeDeclaration368);
            type7=type();

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_getExpression_in_virtualAttributeDeclaration371);
            getExpression9=getExpression();

            state._fsp--;
            if (state.failed) return att;
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:117:58: ( setExpression )?
            int alt12=2;
            int LA12_0 = input.LA(1);

            if ( (LA12_0==SET_EXPRESSION) ) {
                alt12=1;
            }
            switch (alt12) {
                case 1 :
                    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:0:0: setExpression
                    {
                    pushFollow(FOLLOW_setExpression_in_virtualAttributeDeclaration373);
                    setExpression10=setExpression();

                    state._fsp--;
                    if (state.failed) return att;

                    }
                    break;

            }


            match(input, Token.UP, null); if (state.failed) return att;
            if ( state.backtracking==0 ) {

                att = new ToolVirtualAttribute(((classDeclaration_scope)classDeclaration_stack.peek()).currentClass);
                att.setToolName((name6!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(name6.start),
                input.getTreeAdaptor().getTokenStopIndex(name6.start))):null));
                att.setType((type7!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(type7.start),
                input.getTreeAdaptor().getTokenStopIndex(type7.start))):null));
                att.setVisability((modifier8!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(modifier8.start),
                input.getTreeAdaptor().getTokenStopIndex(modifier8.start))):null));
                att.setGetExpression((getExpression9!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(getExpression9.start),
                input.getTreeAdaptor().getTokenStopIndex(getExpression9.start))):null));
                att.setSetExpression((setExpression10!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(setExpression10.start),
                input.getTreeAdaptor().getTokenStopIndex(setExpression10.start))):null));
                ((classDeclaration_scope)classDeclaration_stack.peek()).currentClass.add(att);
               
            }
View Full Code Here

TOP

Related Classes of tool.model.ToolVirtualAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.