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: [email protected]
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