Hi Peter,

I think I understand the conflict, although I never considered this possibility 
since we never used the rules in this way as illustrated by your first example. 
We always had the constraint and action part at the end of the rules followed 
by semicolon and never in between, but I can see why it might be difficult to 
determine a syntax error in this case. I therefore have no suggestions for 
improving the situation, since it would generally be impossible to determine 
whether such a rule makes semantic sense or not. However, now that we are aware 
of it we might stand a better change to spot the problem earlier. Thanks for 
the feedback :)


Best Regards,

Mario Juric
Head of Research & Development
UNSILO.ai <http://unsilo.ai/>
mobile:  +45 3082 4100
skype: mario.juric.dk












> On 3 Oct 2018, at 15:50 , Peter Klügl <peter.klu...@averbis.com> wrote:
> 
> Hi Mario,
> 
> 
> hmm, the question is how Ruta should detect that a rule actually should ends. 
> There are no semantics on whitespaces and line breaks.
> 
> 
> Ruta should complain with a syntax error if the semicolon is missing and 
> there is no valid stuff afterwards.
> 
> 
> An example:
> 
> 
> MyAnnotation { -> CREATE(SomeAnnotation)}
> 
> Document{-> MyType};
> 
> <EOF>
> 
> 
> This is a valid script, but the rule will never match and the CREATE will 
> never be executed. It's actually one rule with two rule element.
> 
> 
> MyAnnotation { -> CREATE(SomeAnnotation)}
> 
> <EOF>
> 
> ... or ...
> 
> MyAnnotation { -> CREATE(SomeAnnotation)}
> 
> DECLARE MyType;
> 
> 
> This is not a valid script and a syntax error should be reported.
> 
> 
> 
> I normally find the missing semicolons quite easily with the Explain View in 
> the Ruta IDE, which is unfortunately only available for Eclispe.
> 
> 
> I have right now no idea how our situation can be improved. Do you have a 
> proposal?
> 
> 
> Best,
> 
> 
> Peter
> 
> 
> Am 02.10.2018 um 11:31 schrieb Mario Juric:
>> Hi Peter,
>> 
>> It occasionally happens that developers forgets the semicolon “;” after a 
>> Ruta rule statement, e.g.
>> 
>> MyAnnotation { -> CREATE(SomeAnnotation)}; <——
>> 
>> We believe to remember that the Ruta engine previously produced syntax 
>> errors in this case, but this doesn’t appear to happen anymore, so we ended 
>> up wasting some time on tracking this down, because the rule actions didn’t 
>> fire. It’s easy to overlook a detail like that when we don’t have any syntax 
>> highlighting in IDEA, which is our preferred IDE. Shouldn’t it produce a 
>> syntax error, or is there some reasons to just skip the statements without 
>> it?
>> 
>> We are using Ruta version 2.6.1.
>> 
>> Cheers,
>> Mario
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> -- 
> Peter Klügl
> R&D Text Mining/Machine Learning
> 
> Averbis GmbH
> Tennenbacher Str. 11
> 79106 Freiburg
> Germany
> 
> Fon: +49 761 708 394 0
> Fax: +49 761 708 394 10
> Email: peter.klu...@averbis.com
> Web: https://averbis.com
> 
> Headquarters: Freiburg im Breisgau
> Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080
> Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó
> 

Reply via email to