Hi guys,

 

While I was trying out DSL, I can get my codes to run successfully, but I cannot get the DroolsCompilerAntTask to build the package. It gives the following errors..

If the DSL has the condition of [then]Print = System.out.println("printing \#123");
[compiler] [2,42]: [ERR 101] Line 2:42 no viable alternative at input ''[1,0]: [ERR 101] Line 1:0 no viable alternative at input '['

Did I escape the # correctly?

When I removed the # and tried to build again (the above error is gone), the compiler gives the same type, but another error.
[compiler] [1,0]: [ERR 101] Line 1:0 no viable alternative at input ''[1,0]: [ERR 101] Line 1:0 no viable alternative at input '['

But my DSL only contains 2 lines.
[when]True = eval(true)
[then]Print = System.out.println("printing 123");

 

Btw I am using Drools 5.1.0.M1 and my build.xml is as below..

 

  <? xml version="1.0" encoding="UTF-8" ?>
- < project default =" build " name =" RuleProject " >
<!--  Uncomment this for Maven Runner
  -->
- < path id =" drools.classpath " >
- < fileset dir =" D:/Drools/runtime " >
  < include name =" *.jar " />
  </ fileset >
- < fileset dir =" D:/Drools/runtime/lib " >
  < include name =" *.jar " />
  </ fileset >
- < fileset dir =" ${basedir}/lib " >
  < include name =" *.jar " />
  </ fileset >
  < pathelement location =" target " />
  </ path >
  < taskdef name =" compiler " classname =" org.drools.contrib.DroolsCompilerAntTask " classpathref =" drools.classpath " />
- < target name =" build " >
- < compiler srcdir =" ${eclipsepath}/src/main/rules " tofile =" ${eclipsepath}/build/rules.pkg " binformat =" package " >
  < include name =" *.dsl " />
  < include name =" *.dslr " />
  </ compiler >
  </ target >
  </ project >

 

Appreciate any help.. Thanks!!