Package org.drools.compiler.lang.descr

Examples of org.drools.compiler.lang.descr.BaseDescr


     *
     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    public BaseDescr declare(PackageDescrBuilder pkg) throws RecognitionException {
        BaseDescr declaration = null;
        try {
            DeclareDescrBuilder declare = helper.start(pkg,
                    DeclareDescrBuilder.class,
                    null);

View Full Code Here


     * @param allowOr
     * @throws org.antlr.runtime.RecognitionException
     */
    private BaseDescr lhsOr(final CEDescrBuilder<?, ?> ce,
            boolean allowOr) throws RecognitionException {
        BaseDescr result = null;
        if (allowOr && input.LA(1) == DRL6Lexer.LEFT_PAREN && helper.validateLT(2,
                DroolsSoftKeywords.OR)) {
            // prefixed OR
            CEDescrBuilder<?, OrDescr> or = null;
            if (state.backtracking == 0) {
View Full Code Here

     * @param ce
     * @throws org.antlr.runtime.RecognitionException
     */
    private BaseDescr lhsAnd(final CEDescrBuilder<?, ?> ce,
            boolean allowOr) throws RecognitionException {
        BaseDescr result = null;
        if (input.LA(1) == DRL6Lexer.LEFT_PAREN && helper.validateLT(2,
                DroolsSoftKeywords.AND)) {
            // prefixed AND
            CEDescrBuilder<?, AndDescr> and = null;
            if (state.backtracking == 0) {
View Full Code Here

     * @return
     */
    private BaseDescr lhsUnary(final CEDescrBuilder<?, ?> ce,
            boolean allowOr) throws RecognitionException {
        annotations();
        BaseDescr result = null;
        if (helper.validateIdentifierKey(DroolsSoftKeywords.EXISTS)) {
            result = lhsExists(ce,
                    allowOr);
            if (helper.validateIdentifierKey(DroolsSoftKeywords.DO)) {
                namedConsequence(ce, null);
View Full Code Here

     *
     * @param ce
     * @return
     */
    private BaseDescr consequenceInvocation(CEDescrBuilder<?, ?> ce) throws RecognitionException {
        BaseDescr result = null;
        if (helper.validateIdentifierKey(DroolsSoftKeywords.IF)) {
            result = conditionalBranch(ce, null);
        } else if (helper.validateIdentifierKey(DroolsSoftKeywords.DO)) {
            result = namedConsequence(ce, null);
        }
View Full Code Here

            return null;

        if (state.backtracking == 0 && input.LA(1) != DRL6Lexer.EOF) {
            helper.emit(Location.LOCATION_LHS_BEGIN_OF_CONDITION);
        }
        BaseDescr descr = lhsOr(ce,
                allowOr);
        if (state.failed)
            return null;

        match(input,
View Full Code Here

    @SuppressWarnings("unchecked")
    private BaseDescr lhsPatternBind(PatternContainerDescrBuilder<?, ?> ce,
            final boolean allowOr) throws RecognitionException {
        PatternDescrBuilder<?> pattern = null;
        CEDescrBuilder<?, OrDescr> or = null;
        BaseDescr result = null;

        Token first = input.LT(1);
        pattern = helper.start((DescrBuilder<?, ?>) ce,
                PatternDescrBuilder.class,
                null);
View Full Code Here

     * @return
     * @throws org.antlr.runtime.RecognitionException
     */
    private BaseDescr lhsAccumulate(PatternContainerDescrBuilder<?, ?> ce) throws RecognitionException {
        PatternDescrBuilder<?> pattern = null;
        BaseDescr result = null;

        pattern = helper.start((DescrBuilder<?, ?>) ce,
                PatternDescrBuilder.class,
                null);
        if (pattern != null) {
View Full Code Here

            // expression consumed something
            int last = input.LT(-1).getTokenIndex();
            String expr = toExpression(prefix, first, last);
            pattern.constraint(expr,
                    positional);
            BaseDescr constrDescr = pattern.getDescr().getDescrs().get(pattern.getDescr().getDescrs().size() - 1);
            constrDescr.setLocation(input.get(first).getLine(),
                    input.get(first).getCharPositionInLine());
            constrDescr.setEndLocation(input.get(last).getLine(),
                    input.get(last).getCharPositionInLine());
            constrDescr.setStartCharacter(((CommonToken) input.get(first)).getStartIndex());
            constrDescr.setEndCharacter(((CommonToken) input.get(last)).getStopIndex());
        }
    }
View Full Code Here

  // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:445:1: shiftExpression returns [BaseDescr result] : left= additiveExpression ( ( shiftOp )=> shiftOp additiveExpression )* ;
  public final DRL5Expressions.shiftExpression_return shiftExpression() throws RecognitionException {
    DRL5Expressions.shiftExpression_return retval = new DRL5Expressions.shiftExpression_return();
    retval.start = input.LT(1);

    BaseDescr left =null;

    try {
      // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:446:3: (left= additiveExpression ( ( shiftOp )=> shiftOp additiveExpression )* )
      // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:446:5: left= additiveExpression ( ( shiftOp )=> shiftOp additiveExpression )*
      {
 
View Full Code Here

TOP

Related Classes of org.drools.compiler.lang.descr.BaseDescr

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.