Hi All,
I managed to left factor the most of the code, but am stuck with this one:
//** Test **//
Test:
"B(" belquery+=Belquery ")"
| "G(" goalquery+=Goalquery ")"
| test+=Test "&" test+=Test
;
Now I have left factored it like this:
Test:
"B(" belquery+=Belquery ")"
| "G(" goalquery+=Goalquery ")"
| '(' terminalTest+=TerminalTest ')'
;
TerminalTest returns Test:
Test ({Operation.left=current} op='&' right=TerminalTest)?
;
And this works, but requires the '(' and ')' around the TerminalTest, witch should be left out, but if I remove them the problem is back again.
How to solve this one? I only found some examples like the solution above but I really want to leave the '(' and ')' out.
Thanks in advance.
Best regards,
Tim
[Updated on: Tue, 20 October 2009 09:15] by Moderator