Any suggestions?
Thanks for your help ...
Cheers
Markus
On Thu, Apr 3, 2008 at 8:22 AM, Markus Helbig <info(a)markushelbig.de> wrote:
Hi,
i'd like to do the following in consequence:
for (Iterator it = $collection.iterator(); it.hasNext(); $item = it.next()) {
System.out.println($item);
}
But as always i'd like to use a DSL
[consequence][]For each {item} from {collection}=for (Iterator it =
{collection}.iterator(); it.hasNext(); {item} = it.next()) {
[consequence][]End=}
The Rule:
For each $item from $pli.getItems()
Show $item
End
The DRL Viewer exactly shows what i want to have. But compiling any
rulefile expanding this DSL (also the consequences are not used)
resolve into following errors:
line 68:0 mismatched character '<EOF>' expecting '"'
[0,-1]: unknown:0:-1 mismatched token: [@-1,0:0='<no
text>',<-1>,0:-1]; expecting type END
or
line 131:80 required (...)+ loop did not match anything at character '+'
line 15:74 no viable alternative at character '\'
The reason theems to be
[consequence][]End=}
But why?? Any suggestions, thans very much in advance
Cheers
Markus