[jboss-jira] [JBoss JIRA] Closed: (JBRULES-2130) DSL Bug while creating comparison combinations

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Mon Jul 13 10:50:29 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBRULES-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edson Tirelli closed JBRULES-2130.
----------------------------------

    Fix Version/s: 5.1.0.M1
       Resolution: Rejected


This is not a bug. It is designed to be this way to allow grammar sentences chaining:

http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e5515

"You can chain DSL expressions together on one line, as long as it is clear to the parser what the {tokens} are (otherwise you risk reading in too much text until the end of the line). The DSL expressions are processed according to the mapping file, top to bottom in order. "

So, in case you don't want to chain the result of a sentence into another sentence, always write your most specific sentences first in the grammar file.

> DSL Bug while creating comparison combinations
> ----------------------------------------------
>
>                 Key: JBRULES-2130
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-2130
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.0.1.FINAL
>         Environment: I tried building the DSL using Guvnor
>            Reporter: Prem Stephen
>            Assignee: Edson Tirelli
>             Fix For: 5.1.0.M1
>
>
> In http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html#d0e5595, section 4.10.4 - I am expanding on the following syntax example for structuring combinations in the DSL.
> In my example, I have
> [when]There is a Contact with=Contact()
> [when]- age is less than {age}=age < {age}
> [when]- age is greater than {age}=age > {age}
> [when]- age is less than or equal to {age}=age <= {age}   <-------------------- this line does not work
> [when]- age is foo than or equal to {age}=age <= {age}
> and my rule is
> when
> 	There is a Contact with
> 	- age is foo than or equal to 35
> 	
> then
> 	Log : "Contact exists Test";
> Now, the line that does not work is because it shares the start "age is less than " with an earlier DSL.
> Replacing "less" with "foo" works for this reason.
> I think the parsing needs to be fixed to look at the whole sentence.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list