-
1. Re: Parse error
sergiob Jul 2, 2013 2:28 AM (in response to sergiob)As an additional info, I tried debugging and verified the RuleScript object contains "DO NOTHING" in the rule text, as expected: then it gets passed to the ECAGrammarParser, and everything breaks as reported.
-
2. Re: Parse error
sergiob Jul 2, 2013 5:25 AM (in response to sergiob)Solved, the problem was the missing "catch all" condition (IF TRUE): I used Byteman long time ago and I was remembering it was not mandatory, but apparently I was wrong, or maybe things changed.
-
3. Re: Parse error
adinn Jul 2, 2013 5:51 AM (in response to sergiob)Hi Sergio,
Sergio Bossa wrote:
Solved, the problem was the missing "catch all" condition (IF TRUE): I used Byteman long time ago and I was remembering it was not mandatory, but apparently I was wrong, or maybe things changed.
The IF clause has always been mandatory.
I suppose we could relax that requirement but
- it's hardly a big deal to have to type IF true (although you would be surprised how much it appears to annoy some people :-)
- making it mandatory means you have to think about when you want the rule to fire and explicitly specify the 'always' case
The thing I should do is to add this as an error pattern in the parser. So, when it sees a DO without an intervening IF it will recognise that the condition has been omitted and generate an error message to that effect. I'll raise a JIRA for this. Thanks for reporting your problem.
regards,
Andrew Dinn
-
-
5. Re: Parse error
sergiob Jul 2, 2013 6:02 AM (in response to adinn)Hi Andrew,
thanks for your answer (and your great work on Byteman).
Good to know it has always been mandatory, my memory is definitely faulted, I should have re-read the manual
By the way, I'm absolutely fine with keeping it mandatory and having the parser emitting an error if missing.
Thanks again,
Regards,
Sergio B.