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

drdaveg drdaveg at gmail.com
Tue Jul 24 16:49:49 EDT 2012


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.


More information about the rules-users mailing list