Package com.icona.tree.nodes

Examples of com.icona.tree.nodes.Protocol



    // $ANTLR start "protocol_declaration"
    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:324:1: protocol_declaration returns [Protocol protocol] : '@protocol' pName= protocol_name (pList= protocol_reference_list )? ( protocol_interface_declaration )? '@end' ;
    public final Protocol protocol_declaration() throws RecognitionException {
        Protocol protocol = null;


        String pName =null;

        ObjectiveCParser.protocol_reference_list_return pList =null;



          
            protocol = new Protocol(null, -1);
           
           
        try {
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:333:5: ( '@protocol' pName= protocol_name (pList= protocol_reference_list )? ( protocol_interface_declaration )? '@end' )
            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:335:2: '@protocol' pName= protocol_name (pList= protocol_reference_list )? ( protocol_interface_declaration )? '@end'
            {
            match(input,61,FOLLOW_61_in_protocol_declaration952); if (state.failed) return protocol;

            pushFollow(FOLLOW_protocol_name_in_protocol_declaration962);
            pName=protocol_name();

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

            if ( state.backtracking==0 ) { protocol.setProtocolName( pName ); }

            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:339:2: (pList= protocol_reference_list )?
            int alt37=2;
            int LA37_0 = input.LA(1);

            if ( (LA37_0==43) ) {
                alt37=1;
            }
            switch (alt37) {
                case 1 :
                    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:339:4: pList= protocol_reference_list
                    {
                    pushFollow(FOLLOW_protocol_reference_list_in_protocol_declaration975);
                    pList=protocol_reference_list();

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

                    }
                    break;

            }


            if ( state.backtracking==0 ) { protocol.setProtocolList((pList!=null?input.toString(pList.start,pList.stop):null)); }

            // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:341:2: ( protocol_interface_declaration )?
            int alt38=2;
            int LA38_0 = input.LA(1);

            if ( (LA38_0==31||LA38_0==35||LA38_0==57||(LA38_0 >= 63 && LA38_0 <= 64)||LA38_0==69||(LA38_0 >= 71 && LA38_0 <= 72)||LA38_0==75||(LA38_0 >= 77 && LA38_0 <= 78)||(LA38_0 >= 81 && LA38_0 <= 86)||(LA38_0 >= 88 && LA38_0 <= 91)) ) {
                alt38=1;
            }
            else if ( (LA38_0==54) ) {
                int LA38_2 = input.LA(2);

                if ( (synpred52_ObjectiveC()) ) {
                    alt38=1;
                }
            }
            switch (alt38) {
                case 1 :
                    // C:\\Users\\line47\\workspace\\ObjCFYPA\\src\\com\\icona\\antlr\\main\\ObjectiveC.g:341:4: protocol_interface_declaration
                    {
                    pushFollow(FOLLOW_protocol_interface_declaration_in_protocol_declaration987);
                    protocol_interface_declaration();

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

                    }
                    break;

            }


            match(input,54,FOLLOW_54_in_protocol_declaration996); if (state.failed) return protocol;

            if ( state.backtracking==0 ) { System.out.println( protocol.toString()  ); }

            }

        }
        catch (RecognitionException re) {
View Full Code Here

TOP

Related Classes of com.icona.tree.nodes.Protocol

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.