[jboss-jira] [JBoss JIRA] Created: (JBRULES-1295) DSL Mapping files does not support comments and empty lines

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Mon Oct 22 13:16:03 EDT 2007


DSL Mapping files does not support comments and empty lines
-----------------------------------------------------------

                 Key: JBRULES-1295
                 URL: http://jira.jboss.com/jira/browse/JBRULES-1295
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Drl Parser/Builder
    Affects Versions: 4.0.2
            Reporter: Edson Tirelli
         Assigned To: Edson Tirelli
             Fix For: 4.0.3, 4.1.0


Hi Mark,

I encountered a problem in DROOLS 4.0.2 (I was upgrading from 3.x). The 
problem consists in the fact that the DSL syntax has changed, now it 
does not accept empty lines, and lines continuing on the new line i.e.:

# this is ok
#
<--- Error, empty line
[then] name = java expression 1 \
java expression 2 <--- Error, it does not recognize anymore "\"

Now, I have a very large DSL file (sorry, I cannot disclose it) and I'm 
lazy enough not to edit that one, so instead I patched DROOLs with the 
following code (see the attached files). The code I added is a bit ugly 
(I'm in a hurry, always in a hurry :( ) I have done some basic tests, 
but since they are linked to the files that I cannot disclose (once 
again, sorry for that) they are not added here.

Anyway, here's the patch. Feel free to modify the code.
.java - my current version
.old - the svn extracted one
.diff - unified diff

I would have also some comments about the class loaders, but I will need 
to confirm that before making any comment.

Hope it will be included (in this form or another) in the next release.

Best Regards,
Radu

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

        



More information about the jboss-jira mailing list