Examples of GlobalDescrBuilder


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

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public GlobalDescr globalStatement(PackageDescrBuilder pkg) throws RecognitionException {
        GlobalDescrBuilder global = null;
        try {
            global = helper.start(pkg,
                    GlobalDescrBuilder.class,
                    null);

            // 'global'
            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.GLOBAL,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            // type
            String type = type();
            if (state.backtracking == 0)
                global.type(type);
            if (state.failed)
                return null;

            // identifier
            Token id = match(input,
                    DRL6Lexer.ID,
                    null,
                    null,
                    DroolsEditorType.IDENTIFIER_TYPE);
            if (state.failed)
                return null;
            if (state.backtracking == 0) {
                global.identifier(id.getText());
                helper.setParaphrasesValue(DroolsParaphraseTypes.GLOBAL,
                        id.getText());
            }

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

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

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public GlobalDescr globalStatement( PackageDescrBuilder pkg ) throws RecognitionException {
        GlobalDescrBuilder global = null;
        try {
            global = helper.start( pkg,
                                   GlobalDescrBuilder.class,
                                   null );

            // 'global'
            match( input,
                   DRL6Lexer.ID,
                   DroolsSoftKeywords.GLOBAL,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            // type
            String type = type();
            if ( state.backtracking == 0 ) global.type( type );
            if ( state.failed ) return null;

            // identifier
            Token id = match( input,
                              DRL6Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER_TYPE );
            if ( state.failed ) return null;
            if ( state.backtracking == 0 ) {
                global.identifier( id.getText() );
                helper.setParaphrasesValue( DroolsParaphraseTypes.GLOBAL,
                                            id.getText() );
            }

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

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

     *
     * @return
     * @throws RecognitionException
     */
    public GlobalDescr globalStatement( PackageDescrBuilder pkg ) throws RecognitionException {
        GlobalDescrBuilder global = null;
        try {
            global = helper.start( pkg,
                                   GlobalDescrBuilder.class,
                                   null );

            // 'global'
            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.GLOBAL,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            // type
            String type = type();
            if ( state.backtracking == 0 ) global.type( type );
            if ( state.failed ) return null;

            // identifier
            Token id = match( input,
                              DRL5Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER_TYPE );
            if ( state.failed ) return null;
            if ( state.backtracking == 0 ) {
                global.identifier( id.getText() );
                helper.setParaphrasesValue( DroolsParaphraseTypes.GLOBAL,
                                            id.getText() );
            }

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

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

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public GlobalDescr globalStatement( PackageDescrBuilder pkg ) throws RecognitionException {
        GlobalDescrBuilder global = null;
        try {
            global = helper.start( pkg,
                                   GlobalDescrBuilder.class,
                                   null );

            // 'global'
            match( input,
                   DRL6Lexer.ID,
                   DroolsSoftKeywords.GLOBAL,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            // type
            String type = type();
            if ( state.backtracking == 0 ) global.type( type );
            if ( state.failed ) return null;

            // identifier
            Token id = match( input,
                              DRL6Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER_TYPE );
            if ( state.failed ) return null;
            if ( state.backtracking == 0 ) {
                global.identifier( id.getText() );
                helper.setParaphrasesValue( DroolsParaphraseTypes.GLOBAL,
                                            id.getText() );
            }

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

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

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public GlobalDescr globalStatement(PackageDescrBuilder pkg) throws RecognitionException {
        GlobalDescrBuilder global = null;
        try {
            global = helper.start(pkg,
                    GlobalDescrBuilder.class,
                    null);

            // 'global'
            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.GLOBAL,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            // type
            String type = type();
            if (state.backtracking == 0)
                global.type(type);
            if (state.failed)
                return null;

            // identifier
            Token id = match(input,
                    DRL6Lexer.ID,
                    null,
                    null,
                    DroolsEditorType.IDENTIFIER_TYPE);
            if (state.failed)
                return null;
            if (state.backtracking == 0) {
                global.identifier(id.getText());
                helper.setParaphrasesValue(DroolsParaphraseTypes.GLOBAL,
                        id.getText());
            }

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

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

     *
     * @return
     * @throws RecognitionException
     */
    public GlobalDescr globalStatement( PackageDescrBuilder pkg ) throws RecognitionException {
        GlobalDescrBuilder global = null;
        try {
            global = helper.start( pkg,
                                   GlobalDescrBuilder.class,
                                   null );

            // 'global'
            match( input,
                   DRL5Lexer.ID,
                   DroolsSoftKeywords.GLOBAL,
                   null,
                   DroolsEditorType.KEYWORD );
            if ( state.failed ) return null;

            // type
            String type = type();
            if ( state.backtracking == 0 ) global.type( type );
            if ( state.failed ) return null;

            // identifier
            Token id = match( input,
                              DRL5Lexer.ID,
                              null,
                              null,
                              DroolsEditorType.IDENTIFIER_TYPE );
            if ( state.failed ) return null;
            if ( state.backtracking == 0 ) {
                global.identifier( id.getText() );
                helper.setParaphrasesValue( DroolsParaphraseTypes.GLOBAL,
                                            id.getText() );
            }

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

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

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public GlobalDescr globalStatement(PackageDescrBuilder pkg) throws RecognitionException {
        GlobalDescrBuilder global = null;
        try {
            global = helper.start(pkg,
                    GlobalDescrBuilder.class,
                    null);

            // 'global'
            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.GLOBAL,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            // type
            String type = type();
            if (state.backtracking == 0)
                global.type(type);
            if (state.failed)
                return null;

            // identifier
            Token id = match(input,
                    DRL6Lexer.ID,
                    null,
                    null,
                    DroolsEditorType.IDENTIFIER_TYPE);
            if (state.failed)
                return null;
            if (state.backtracking == 0) {
                global.identifier(id.getText());
                helper.setParaphrasesValue(DroolsParaphraseTypes.GLOBAL,
                        id.getText());
            }

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

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

        descr.addAccumulateImport( (AccumulateImportDescr) initDescr(impl) );
        return impl;
    }

    public GlobalDescrBuilder newGlobal() {
        GlobalDescrBuilder global = new GlobalDescrBuilderImpl( this );
        descr.addGlobal( initDescr(global) );
        return global;
    }
View Full Code Here

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

                pushParaphrases( DroolsParaphraseTypes.ACCUMULATE_IMPORT );
                beginSentence( DroolsSentenceType.ACCUMULATE_IMPORT_STATEMENT );
                setStart( imp );
                return (T) imp;
            } else if ( GlobalDescrBuilder.class.isAssignableFrom( clazz ) ) {
                GlobalDescrBuilder global = ctxBuilder == null ?
                                            DescrFactory.newPackage().newGlobal() :
                                            ((PackageDescrBuilder) ctxBuilder).newGlobal();
                pushParaphrases( DroolsParaphraseTypes.GLOBAL );
                beginSentence( DroolsSentenceType.GLOBAL );
                setStart( global );
View Full Code Here

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

     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public GlobalDescr globalStatement(PackageDescrBuilder pkg) throws RecognitionException {
        GlobalDescrBuilder global = null;
        try {
            global = helper.start(pkg,
                    GlobalDescrBuilder.class,
                    null);

            // 'global'
            match(input,
                    DRL6Lexer.ID,
                    DroolsSoftKeywords.GLOBAL,
                    null,
                    DroolsEditorType.KEYWORD);
            if (state.failed)
                return null;

            // type
            String type = type();
            if (state.backtracking == 0)
                global.type(type);
            if (state.failed)
                return null;

            // identifier
            Token id = match(input,
                    DRL6Lexer.ID,
                    null,
                    null,
                    DroolsEditorType.IDENTIFIER_TYPE);
            if (state.failed)
                return null;
            if (state.backtracking == 0) {
                global.identifier(id.getText());
                helper.setParaphrasesValue(DroolsParaphraseTypes.GLOBAL,
                        id.getText());
            }

        } catch (RecognitionException re) {
            reportError(re);
        } finally {
            helper.end(GlobalDescrBuilder.class,
                    global);
        }
        return (global != null) ? global.getDescr() : null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.