Package tool.model

Examples of tool.model.ToolAttribute



    // $ANTLR start "attributeDeclaration"
    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:394:1: attributeDeclaration returns [ToolAttribute att] : ^( ATTRIBUTE_DECLARATION modifier name type ( GENERATED )? ) ;
    public final ToolAttribute attributeDeclaration() throws RecognitionException {
        ToolAttribute att = null;

        ForteAST.name_return name31 = null;

        ForteAST.type_return type32 = null;

        ForteAST.modifier_return modifier33 = null;


        try {
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:395:3: ( ^( ATTRIBUTE_DECLARATION modifier name type ( GENERATED )? ) )
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:395:5: ^( ATTRIBUTE_DECLARATION modifier name type ( GENERATED )? )
            {
            match(input,ATTRIBUTE_DECLARATION,FOLLOW_ATTRIBUTE_DECLARATION_in_attributeDeclaration1303); if (state.failed) return att;

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

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_name_in_attributeDeclaration1307);
            name31=name();

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_type_in_attributeDeclaration1309);
            type32=type();

            state._fsp--;
            if (state.failed) return att;
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:395:49: ( GENERATED )?
            int alt34=2;
            int LA34_0 = input.LA(1);

            if ( (LA34_0==GENERATED) ) {
                alt34=1;
            }
            switch (alt34) {
                case 1 :
                    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:0:0: GENERATED
                    {
                    match(input,GENERATED,FOLLOW_GENERATED_in_attributeDeclaration1312); if (state.failed) return att;

                    }
                    break;

            }


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

                att = new ToolAttribute(currentType);
                att.setToolName((name31!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(name31.start),
                input.getTreeAdaptor().getTokenStopIndex(name31.start))):null));
                att.setType((type32!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(type32.start),
                input.getTreeAdaptor().getTokenStopIndex(type32.start))):null));
                att.setVisability((modifier33!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(modifier33.start),
                input.getTreeAdaptor().getTokenStopIndex(modifier33.start))):null));
                if (currentType instanceof ToolClass)
                    ((ToolClass)currentType).add(att);
               
View Full Code Here



    // $ANTLR start "attributeDeclaration"
    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:100:1: attributeDeclaration returns [ToolAttribute att] : ^( ATTRIBUTE_DECLARATION modifier name type ( GENERATED )? ) ;
    public final ToolAttribute attributeDeclaration() throws RecognitionException {
        ToolAttribute att = null;

        ForteCDFTree.name_return name3 = null;

        ForteCDFTree.type_return type4 = null;

        ForteCDFTree.modifier_return modifier5 = null;


        try {
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:101:3: ( ^( ATTRIBUTE_DECLARATION modifier name type ( GENERATED )? ) )
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:101:5: ^( ATTRIBUTE_DECLARATION modifier name type ( GENERATED )? )
            {
            match(input,ATTRIBUTE_DECLARATION,FOLLOW_ATTRIBUTE_DECLARATION_in_attributeDeclaration305); if (state.failed) return att;

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

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_name_in_attributeDeclaration309);
            name3=name();

            state._fsp--;
            if (state.failed) return att;
            pushFollow(FOLLOW_type_in_attributeDeclaration311);
            type4=type();

            state._fsp--;
            if (state.failed) return att;
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:101:49: ( GENERATED )?
            int alt11=2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0==GENERATED) ) {
                alt11=1;
            }
            switch (alt11) {
                case 1 :
                    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:0:0: GENERATED
                    {
                    match(input,GENERATED,FOLLOW_GENERATED_in_attributeDeclaration314); if (state.failed) return att;

                    }
                    break;

            }


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

                att = new ToolAttribute(((classDeclaration_scope)classDeclaration_stack.peek()).currentClass);
                att.setToolName((name3!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(name3.start),
                input.getTreeAdaptor().getTokenStopIndex(name3.start))):null));
                att.setType((type4!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(type4.start),
                input.getTreeAdaptor().getTokenStopIndex(type4.start))):null));
                att.setVisability((modifier5!=null?(input.getTokenStream().toString(
                input.getTreeAdaptor().getTokenStartIndex(modifier5.start),
                input.getTreeAdaptor().getTokenStopIndex(modifier5.start))):null));
                ((classDeclaration_scope)classDeclaration_stack.peek()).currentClass.add(att);
               
            }
View Full Code Here

TOP

Related Classes of tool.model.ToolAttribute

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.