Re: [rules-users] Moving comment in DSLR file causes issue under 5.3

2012-07-25 Thread Wolfgang Laun
I'm not sure what exactly causes your errors - is it exactly what you
have posted, or anything different from what you have written, with
that line moved elsewhere or anywhere?

What does the resulting DRL look like?

A semicolon at the end of the statement is indicated unless it's commented out.

-W



On 24/07/2012, drdaveg drda...@gmail.com wrote:
 This is an odd one.  I was testing some DSL and have been tracing back an
 error in the translation.  The line marked in the code below, even as a
 comment, causes multiple cannot be resolved errors when moved.  Any
 thoughts on what could cause this other than a bug?

 Note that almsot all of the code is commented and as it appears now
 generates the errors.  If I move the line to the LHS the cannot be
 resolved errors go away.  The only interesting thing shown in the DRL
 viewer is that some of the comments appear duplicated.

 rule Compute
 when
 # Fare(fareBasisCode  == fp1)
 #  ts1 : TrainSegment(fl1 : fareList)
 #  ts2 : TrainSegment(fl2 : fareList)
 #  mySol : Solution()
  Fare(fp1 : fareBasisCode, thruFare == true)
   x : FQ3()
 # eval(fl1.get(fp1 )!=null)
 # eval(fl2.get(fp1)!=null)
 # eval(mySol .nthSegment(ts1)==(mySol .nthSegment(ts2)+1))
 then
 #  //int n = fq.nthSegment(fp1)   ** moving this line can cause a
 syntax error
 #  FQ3 test = new FQ3(); test = fq;
   System.out.println(fp1);
  x.setPassengerString(T);  // x.getPassengerString()+
 end



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Moving-comment-in-DSLR-file-causes-issue-under-5-3-tp4018882.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Moving comment in DSLR file causes issue under 5.3

2012-07-25 Thread drdaveg
Thanks.  I think this is actualy a bug in 5.3.  I wonder if there is an issue
with the mvel getting unsynchronized as files get larger?

The # should indicate a comment and  should indicate something passed thru
to DROOLS directly.  So almost the entire rule is commented out.  I am
particuarly puzzled why moving the offending statement to the left hand side
removes the 2 errors - fp1 cannot be resolved to a variable and x cannot
be resolved to a variable.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Moving-comment-in-DSLR-file-causes-issue-under-5-3-tp4018882p4018898.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Moving comment in DSLR file causes issue under 5.3

2012-07-24 Thread drdaveg
This is an odd one.  I was testing some DSL and have been tracing back an
error in the translation.  The line marked in the code below, even as a
comment, causes multiple cannot be resolved errors when moved.  Any
thoughts on what could cause this other than a bug?

Note that almsot all of the code is commented and as it appears now
generates the errors.  If I move the line to the LHS the cannot be
resolved errors go away.  The only interesting thing shown in the DRL
viewer is that some of the comments appear duplicated.

rule Compute
when
#   Fare(fareBasisCode  == fp1) 
#ts1 : TrainSegment(fl1 : fareList)
#ts2 : TrainSegment(fl2 : fareList)
#mySol : Solution()
   Fare(fp1 : fareBasisCode, thruFare == true) 
x : FQ3()
#   eval(fl1.get(fp1 )!=null)
#   eval(fl2.get(fp1)!=null)
#   eval(mySol .nthSegment(ts1)==(mySol .nthSegment(ts2)+1))
then  
#//int n = fq.nthSegment(fp1)   ** moving this line can cause a
syntax error 
#FQ3 test = new FQ3(); test = fq;
   System.out.println(fp1);
   x.setPassengerString(T);  // x.getPassengerString()+
end 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Moving-comment-in-DSLR-file-causes-issue-under-5-3-tp4018882.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users