Package org.drools.lang.descr

Examples of org.drools.lang.descr.AtomicExprDescr


                    state._fsp--;
                    if (state.failed) return result;
                    if ( state.backtracking==0 ) {
                       if( buildDescr  ) {
                                     result = new RelationalExprDescr( (op!=null?input.toString(op.start,op.stop):null), false, null, left, new AtomicExprDescr((right!=null?input.toString(right.start,right.stop):null)) );
                                 }
                              
                    }

                    }
View Full Code Here


            if (state.failed) return result;
            if ( state.backtracking==0 ) {
               if( buildDescr  ) { result = left; }
                    if( left instanceof BindingDescr ) {
                        binding = (BindingDescr)left;
                        leftDescr = new AtomicExprDescr( binding.getExpression() );
                    } else {
                        leftDescr = left;
                    }
                 
            }
View Full Code Here

               if( buildDescr  ) {
                        result = ( (left!=null?left.result:null) != null &&
                                    ( (!((left!=null?left.result:null) instanceof AtomicExprDescr)) ||
                                      ((left!=null?input.toString(left.start,left.stop):null).equals(((AtomicExprDescr)(left!=null?left.result:null)).getExpression())) )) ?
                                  (left!=null?left.result:null) :
                                  new AtomicExprDescr( (left!=null?input.toString(left.start,left.stop):null) ) ;
                        ((relationalExpression_scope)relationalExpression_stack.peek()).lsd = result;
                    }
                 
            }
            // /home/etirelli/workspace/jboss/drools/core/drools-compiler/src/main/resources/org/drools/lang/DRLExpressions.g:297:3: ( ( orRestriction )=>right= orRestriction )*
 
View Full Code Here

                       if( buildDescr  ) {
                                     BaseDescr descr = ( (value!=null?value.result:null) != null &&
                                                       ( (!((value!=null?value.result:null) instanceof AtomicExprDescr)) ||
                                                         ((value!=null?input.toString(value.start,value.stop):null).equals(((AtomicExprDescr)(value!=null?value.result:null)).getExpression())) )) ?
                                              (value!=null?value.result:null) :
                                              new AtomicExprDescr( (value!=null?input.toString(value.start,value.stop):null) ) ;
                                     result = new RelationalExprDescr( (op!=null?op.opr:null), (op!=null?op.negated:false), (op!=null?op.params:null), ((relationalExpression_scope)relationalExpression_stack.peek()).lsd, descr );
                               if( ((relationalExpression_scope)relationalExpression_stack.peek()).lsd instanceof BindingDescr ) {
                                   ((relationalExpression_scope)relationalExpression_stack.peek()).lsd = new AtomicExprDescr( ((BindingDescr)((relationalExpression_scope)relationalExpression_stack.peek()).lsd).getExpression() );
                               }
                                 }
                              
                    }
View Full Code Here

                    literal9=literal();

                    state._fsp--;
                    if (state.failed) return result;
                    if ( state.backtracking==0 ) {
                       if( buildDescr  ) { result = new AtomicExprDescr( (literal9!=null?input.toString(literal9.start,literal9.stop):null), true );
                    }

                    }
                    break;
                case 4 :
View Full Code Here

            String leftValue = null;
            String rightValue = null;
            boolean isRightLiteral = false;
            boolean usesThisRef = false;
            if ( exprDescr.getRight() instanceof AtomicExprDescr ) {
                AtomicExprDescr rdescr = ((AtomicExprDescr) exprDescr.getRight());
                rightValue = rdescr.getExpression().trim();
                usesThisRef = "this".equals( rightValue ) || rightValue.startsWith( "this." );
                isRightLiteral = rdescr.isLiteral();
            } else {
                BindingDescr rdescr = ((BindingDescr) exprDescr.getRight());
                rightValue = rdescr.getExpression().trim();
                usesThisRef = "this".equals( rightValue ) || rightValue.startsWith( "this." );
            }
            if ( exprDescr.getLeft() instanceof AtomicExprDescr ) {
                AtomicExprDescr ldescr = (AtomicExprDescr) exprDescr.getLeft();
                leftValue = ldescr.getExpression();
                usesThisRef = usesThisRef || "this".equals( leftValue ) || leftValue.startsWith( "this." );
            } else {
                leftValue = ((BindingDescr) exprDescr.getLeft()).getExpression();
                usesThisRef = usesThisRef || "this".equals( leftValue ) || leftValue.startsWith( "this." );
            }
View Full Code Here

                                            final Map<String, OperatorDescr> aliases ) {
        String value1;
        String value2;
        boolean usesThisRef;
        if ( relDescr.getRight() instanceof AtomicExprDescr ) {
            AtomicExprDescr rdescr = ((AtomicExprDescr) relDescr.getRight());
            value2 = rdescr.getRewrittenExpression().trim();
            usesThisRef = "this".equals( value2 ) || value2.startsWith( "this." );
        } else {
            BindingDescr rdescr = ((BindingDescr) relDescr.getRight());
            value2 = rdescr.getExpression().trim();
            usesThisRef = "this".equals( value2 ) || value2.startsWith( "this." );
        }
        if ( relDescr.getLeft() instanceof AtomicExprDescr ) {
            AtomicExprDescr ldescr = (AtomicExprDescr) relDescr.getLeft();
            value1 = ldescr.getRewrittenExpression();
            usesThisRef = usesThisRef || "this".equals( value1 ) || value1.startsWith( "this." );
        } else {
            value1 = ((BindingDescr) relDescr.getLeft()).getExpression();
            usesThisRef = usesThisRef || "this".equals( value1 ) || value1.startsWith( "this." );
        }
View Full Code Here

                    state._fsp--;
                    if (state.failed) return result;
                    if ( state.backtracking==0 ) {
                       if( buildDescr  ) {
                                     result = new RelationalExprDescr( (op!=null?input.toString(op.start,op.stop):null), false, null, left, new AtomicExprDescr((right!=null?input.toString(right.start,right.stop):null)) );
                                 }
                              
                    }

                    }
View Full Code Here

            if (state.failed) return result;
            if ( state.backtracking==0 ) {
               if( buildDescr  ) { result = left; }
                    if( left instanceof BindingDescr ) {
                        binding = (BindingDescr)left;
                        leftDescr = new AtomicExprDescr( binding.getExpression() );
                    } else {
                        leftDescr = left;
                    }
                 
            }
View Full Code Here

               if( buildDescr  ) {
                        result = ( (left!=null?left.result:null) != null &&
                                    ( (!((left!=null?left.result:null) instanceof AtomicExprDescr)) ||
                                      ((left!=null?input.toString(left.start,left.stop):null).equals(((AtomicExprDescr)(left!=null?left.result:null)).getExpression())) )) ?
                                  (left!=null?left.result:null) :
                                  new AtomicExprDescr( (left!=null?input.toString(left.start,left.stop):null) ) ;
                        ((relationalExpression_scope)relationalExpression_stack.peek()).lsd = result;
                    }
                 
            }
            // src/main/resources/org/drools/lang/DRLExpressions.g:320:3: ( ( operator | LEFT_PAREN )=>right= orRestriction )*
 
View Full Code Here

TOP

Related Classes of org.drools.lang.descr.AtomicExprDescr

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.