Package org.drools.compiler.lang.api

Examples of org.drools.compiler.lang.api.WindowDeclarationDescrBuilder


     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public WindowDeclarationDescr windowDeclaration(DeclareDescrBuilder ddb) throws RecognitionException {
        WindowDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start(ddb,
                    WindowDeclarationDescrBuilder.class,
                    null);

            String window = "";

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.WINDOW,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            Token id = match(input,
                    DRL6Lexer.ID,
                    null,
                    null,
                    DroolsEditorType.IDENTIFIER);
            if (state.failed)
                return null;
            window = id.getText();

            if (state.backtracking == 0) {
                declare.name(window);
            }

            while (input.LA(1) == DRL6Lexer.AT) {
                // annotation*
                annotation(declare);
                if (state.failed)
                    return null;
            }

            lhsPatternBind(declare, false);

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.END,
                    null,
                    DroolsEditorType.KEYWORD);

            if (state.failed)
                return null;

        } catch (RecognitionException re) {
            reportError(re);
        } finally {
            helper.end(WindowDeclarationDescrBuilder.class,
                    declare);
        }
        return (declare != null) ? declare.getDescr() : null;
    }
View Full Code Here


     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public WindowDeclarationDescr windowDeclaration( DeclareDescrBuilder ddb ) throws RecognitionException {
        WindowDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start( ddb,
                                    WindowDeclarationDescrBuilder.class,
                                    null );

            String window = "";

            match( input,
                   DRL6Lexer.ID,
                   DroolsSoftKeywords.WINDOW,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            Token id = match( input,
                              DRL6Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER );
            if ( state.failed ) return null;
            window = id.getText();

            if( state.backtracking == 0 ) {
                declare.name( window );
            }

            while ( input.LA( 1 ) == DRL6Lexer.AT ) {
                // annotation*
                annotation( declare );
                if ( state.failed ) return null;
            }

            lhsPatternBind( declare, false );

            match( input,
                   DRL6Lexer.ID,
                   DroolsSoftKeywords.END,
                   null,
                   DroolsEditorType.KEYWORD );

            if ( state.failed ) return null;

        } catch ( RecognitionException re ) {
            reportError( re );
        } finally {
            helper.end( WindowDeclarationDescrBuilder.class,
                        declare );
        }
        return (declare != null) ? declare.getDescr() : null;
    }
View Full Code Here

     *
     * @return
     * @throws RecognitionException
     */
    public WindowDeclarationDescr windowDeclaration( DeclareDescrBuilder ddb ) throws RecognitionException {
        WindowDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start( ddb,
                                    WindowDeclarationDescrBuilder.class,
                                    null );

            String window = "";

            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.WINDOW,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            Token id = match( input,
                              DRL5Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER );
            if ( state.failed ) return null;
            window = id.getText();
           
            if( state.backtracking == 0 ) {
                declare.name( window );
            }

            while ( input.LA( 1 ) == DRL5Lexer.AT ) {
                // annotation*
                annotation( declare );
                if ( state.failed ) return null;
            }
           
            lhsPatternBind( declare, false );

            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.END,
                   null,
                   DroolsEditorType.KEYWORD );

            if ( state.failed ) return null;

        } catch ( RecognitionException re ) {
            reportError( re );
        } finally {
            helper.end( WindowDeclarationDescrBuilder.class,
                        declare );
        }
        return (declare != null) ? declare.getDescr() : null;
    }
View Full Code Here

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public WindowDeclarationDescr windowDeclaration( DeclareDescrBuilder ddb ) throws RecognitionException {
        WindowDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start( ddb,
                                    WindowDeclarationDescrBuilder.class,
                                    null );

            String window = "";

            match( input,
                   DRL6Lexer.ID,
                   DroolsSoftKeywords.WINDOW,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            Token id = match( input,
                              DRL6Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER );
            if ( state.failed ) return null;
            window = id.getText();

            if( state.backtracking == 0 ) {
                declare.name( window );
            }

            while ( input.LA( 1 ) == DRL6Lexer.AT ) {
                // annotation*
                annotation( declare );
                if ( state.failed ) return null;
            }

            lhsPatternBind( declare, false );

            match( input,
                   DRL6Lexer.ID,
                   DroolsSoftKeywords.END,
                   null,
                   DroolsEditorType.KEYWORD );

            if ( state.failed ) return null;

        } catch ( RecognitionException re ) {
            reportError( re );
        } finally {
            helper.end( WindowDeclarationDescrBuilder.class,
                        declare );
        }
        return (declare != null) ? declare.getDescr() : null;
    }
View Full Code Here

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public WindowDeclarationDescr windowDeclaration(DeclareDescrBuilder ddb) throws RecognitionException {
        WindowDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start(ddb,
                    WindowDeclarationDescrBuilder.class,
                    null);

            String window = "";

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.WINDOW,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            Token id = match(input,
                    DRL6Lexer.ID,
                    null,
                    null,
                    DroolsEditorType.IDENTIFIER);
            if (state.failed)
                return null;
            window = id.getText();

            if (state.backtracking == 0) {
                declare.name(window);
            }

            while (input.LA(1) == DRL6Lexer.AT) {
                // annotation*
                annotation(declare);
                if (state.failed)
                    return null;
            }

            lhsPatternBind(declare, false);

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.END,
                    null,
                    DroolsEditorType.KEYWORD);

            if (state.failed)
                return null;

        } catch (RecognitionException re) {
            reportError(re);
        } finally {
            helper.end(WindowDeclarationDescrBuilder.class,
                    declare);
        }
        return (declare != null) ? declare.getDescr() : null;
    }
View Full Code Here

     *
     * @return
     * @throws RecognitionException
     */
    public WindowDeclarationDescr windowDeclaration( DeclareDescrBuilder ddb ) throws RecognitionException {
        WindowDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start( ddb,
                                    WindowDeclarationDescrBuilder.class,
                                    null );

            String window = "";

            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.WINDOW,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            Token id = match( input,
                              DRL5Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER );
            if ( state.failed ) return null;
            window = id.getText();
           
            if( state.backtracking == 0 ) {
                declare.name( window );
            }

            while ( input.LA( 1 ) == DRL5Lexer.AT ) {
                // annotation*
                annotation( declare );
                if ( state.failed ) return null;
            }
           
            lhsPatternBind( declare, false );

            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.END,
                   null,
                   DroolsEditorType.KEYWORD );

            if ( state.failed ) return null;

        } catch ( RecognitionException re ) {
            reportError( re );
        } finally {
            helper.end( WindowDeclarationDescrBuilder.class,
                        declare );
        }
        return (declare != null) ? declare.getDescr() : null;
    }
View Full Code Here

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public WindowDeclarationDescr windowDeclaration(DeclareDescrBuilder ddb) throws RecognitionException {
        WindowDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start(ddb,
                    WindowDeclarationDescrBuilder.class,
                    null);

            setAnnotationsOn(declare);

            String window = "";

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.WINDOW,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            Token id = match(input,
                    DRL6Lexer.ID,
                    null,
                    null,
                    DroolsEditorType.IDENTIFIER);
            if (state.failed)
                return null;
            window = id.getText();

            if (state.backtracking == 0) {
                declare.name(window);
            }

            lhsPatternBind(declare, false);

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.END,
                    null,
                    DroolsEditorType.KEYWORD);

            if (state.failed)
                return null;

        } catch (RecognitionException re) {
            reportError(re);
        } finally {
            helper.end(WindowDeclarationDescrBuilder.class,
                    declare);
        }
        return (declare != null) ? declare.getDescr() : null;
    }
View Full Code Here

                pushParaphrases( DroolsParaphraseTypes.ENTRYPOINT_DECLARE );
                beginSentence( DroolsSentenceType.ENTRYPOINT_DECLARATION );
                setStart( declare );
                return (T) declare;
            } else if ( WindowDeclarationDescrBuilder.class.isAssignableFrom( clazz ) ) {
                WindowDeclarationDescrBuilder declare = ctxBuilder == null ?
                                                            DescrFactory.newPackage().newDeclare().window() :
                                                            ((DeclareDescrBuilder) ctxBuilder).window();
                pushParaphrases( DroolsParaphraseTypes.WINDOW_DECLARE );
                beginSentence( DroolsSentenceType.WINDOW_DECLARATION );
                setStart( declare );
View Full Code Here

     *
     * @return
     * @throws RecognitionException
     */
    public WindowDeclarationDescr windowDeclaration( DeclareDescrBuilder ddb ) throws RecognitionException {
        WindowDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start( ddb,
                                    WindowDeclarationDescrBuilder.class,
                                    null );

            String window = "";

            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.WINDOW,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            Token id = match( input,
                              DRL5Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER );
            if ( state.failed ) return null;
            window = id.getText();
           
            if( state.backtracking == 0 ) {
                declare.name( window );
            }

            while ( input.LA( 1 ) == DRL5Lexer.AT ) {
                // annotation*
                annotation( declare );
                if ( state.failed ) return null;
            }
           
            lhsPatternBind( declare, false );

            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.END,
                   null,
                   DroolsEditorType.KEYWORD );

            if ( state.failed ) return null;

        } catch ( RecognitionException re ) {
            reportError( re );
        } finally {
            helper.end( WindowDeclarationDescrBuilder.class,
                        declare );
        }
        return (declare != null) ? declare.getDescr() : null;
    }
View Full Code Here

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public WindowDeclarationDescr windowDeclaration(DeclareDescrBuilder ddb) throws RecognitionException {
        WindowDeclarationDescrBuilder declare = null;
        try {
            declare = helper.start(ddb,
                    WindowDeclarationDescrBuilder.class,
                    null);

            String window = "";

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.WINDOW,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            Token id = match(input,
                    DRL6Lexer.ID,
                    null,
                    null,
                    DroolsEditorType.IDENTIFIER);
            if (state.failed)
                return null;
            window = id.getText();

            if (state.backtracking == 0) {
                declare.name(window);
            }

            while (input.LA(1) == DRL6Lexer.AT) {
                // annotation*
                annotation(declare);
                if (state.failed)
                    return null;
            }

            lhsPatternBind(declare, false);

            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.END,
                    null,
                    DroolsEditorType.KEYWORD);

            if (state.failed)
                return null;

        } catch (RecognitionException re) {
            reportError(re);
        } finally {
            helper.end(WindowDeclarationDescrBuilder.class,
                    declare);
        }
        return (declare != null) ? declare.getDescr() : null;
    }
View Full Code Here

TOP

Related Classes of org.drools.compiler.lang.api.WindowDeclarationDescrBuilder

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.