[jboss-svn-commits] JBL Code SVN: r11695 - labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri May 4 15:14:02 EDT 2007


Author: tirelli
Date: 2007-05-04 15:14:02 -0400 (Fri, 04 May 2007)
New Revision: 11695

Modified:
   labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java
Log:
Fixing backward compatibility when parsing DSL files

Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java	2007-05-04 19:13:57 UTC (rev 11694)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java	2007-05-04 19:14:02 UTC (rev 11695)
@@ -43,6 +43,8 @@
     private static final String  CONDITION   = "[condition]";
     private static final String  CONSEQUENCE = "[consequence]";
     //private static final String  ANY         = "[*]";
+    private static final String  WHEN        = "[when]";
+    private static final String  THEN        = "[then]";
 
     private DSLMapping           mapping;
     private List                 errors;
@@ -101,9 +103,9 @@
                 DSLMappingEntry.Section section = DSLMappingEntry.ANY;
                 if ( KEYWORD.equals( sectionStr ) ) {
                     section = DSLMappingEntry.KEYWORD;
-                } else if ( CONDITION.equals( sectionStr ) ) {
+                } else if ( CONDITION.equals( sectionStr ) || WHEN.equals( sectionStr )) {
                     section = DSLMappingEntry.CONDITION;
-                } else if ( CONSEQUENCE.equals( sectionStr ) ) {
+                } else if ( CONSEQUENCE.equals( sectionStr ) || THEN.equals( sectionStr )) {
                     section = DSLMappingEntry.CONSEQUENCE;
                 }
 




More information about the jboss-svn-commits mailing list