Package tool.model

Examples of tool.model.ToolEvent



    // $ANTLR start "eventDeclaration"
    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:486:1: eventDeclaration returns [ToolEvent event] : ^( EVENT_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? ) ;
    public final ToolEvent eventDeclaration() throws RecognitionException {
        ToolEvent event = null;

        CommonTree IDENTIFIER42=null;

        try {
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:487:2: ( ^( EVENT_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? ) )
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:487:4: ^( EVENT_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? )
            {
            match(input,EVENT_DECLARATION,FOLLOW_EVENT_DECLARATION_in_eventDeclaration1625); if (state.failed) return event;

            match(input, Token.DOWN, null); if (state.failed) return event;
            pushFollow(FOLLOW_modifier_in_eventDeclaration1627);
            modifier();

            state._fsp--;
            if (state.failed) return event;
            IDENTIFIER42=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_eventDeclaration1629); if (state.failed) return event;
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:487:45: ( formalParameterDecls )?
            int alt47=2;
            int LA47_0 = input.LA(1);

            if ( (LA47_0==PARAMETER) ) {
                alt47=1;
            }
            switch (alt47) {
                case 1 :
                    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteAST.g:0:0: formalParameterDecls
                    {
                    pushFollow(FOLLOW_formalParameterDecls_in_eventDeclaration1632);
                    formalParameterDecls();

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

                    }
                    break;

            }


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

                event = new ToolEvent(currentType);
                event.setToolName((IDENTIFIER42!=null?IDENTIFIER42.getText():null));
                if (currentType instanceof ToolClass)
                  ((ToolClass)currentType).add(event);
                else if (currentType instanceof ToolInterface)
                  ((ToolInterface)currentType).add(event);
               
View Full Code Here



    // $ANTLR start "eventDeclaration"
    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:185:1: eventDeclaration returns [ToolEvent event] : ^( EVENT_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? ) ;
    public final ToolEvent eventDeclaration() throws RecognitionException {
        ToolEvent event = null;

        CommonTree IDENTIFIER14=null;

        try {
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:186:2: ( ^( EVENT_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? ) )
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:186:4: ^( EVENT_DECLARATION modifier IDENTIFIER ( formalParameterDecls )? )
            {
            match(input,EVENT_DECLARATION,FOLLOW_EVENT_DECLARATION_in_eventDeclaration627); if (state.failed) return event;

            match(input, Token.DOWN, null); if (state.failed) return event;
            pushFollow(FOLLOW_modifier_in_eventDeclaration629);
            modifier();

            state._fsp--;
            if (state.failed) return event;
            IDENTIFIER14=(CommonTree)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_eventDeclaration631); if (state.failed) return event;
            // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:186:45: ( formalParameterDecls )?
            int alt24=2;
            int LA24_0 = input.LA(1);

            if ( (LA24_0==PARAMETER) ) {
                alt24=1;
            }
            switch (alt24) {
                case 1 :
                    // /Users/peter/Documents/workspace/ToolModel/src/tool/model/grammar/ForteCDFTree.g:0:0: formalParameterDecls
                    {
                    pushFollow(FOLLOW_formalParameterDecls_in_eventDeclaration634);
                    formalParameterDecls();

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

                    }
                    break;

            }


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

                event = new ToolEvent(((classDeclaration_scope)classDeclaration_stack.peek()).currentClass);
                event.setToolName((IDENTIFIER14!=null?IDENTIFIER14.getText():null));
                ((classDeclaration_scope)classDeclaration_stack.peek()).currentClass.add(event);
               
            }

            }
View Full Code Here

TOP

Related Classes of tool.model.ToolEvent

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.