From user-return-7978-archive-asf-public=cust-asf.ponee.io@uima.apache.org Fri Oct 5 08:42:41 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id EE73C180649 for ; Fri, 5 Oct 2018 08:42:40 +0200 (CEST) Received: (qmail 71264 invoked by uid 500); 5 Oct 2018 06:42:39 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 71246 invoked by uid 99); 5 Oct 2018 06:42:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2018 06:42:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 9B67D1A1C0C for ; Fri, 5 Oct 2018 06:42:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.99 X-Spam-Level: * X-Spam-Status: No, score=1.99 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=unsilo-ai.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id s2i9MZ6FnrKB for ; Fri, 5 Oct 2018 06:42:36 +0000 (UTC) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id CE90B5F11D for ; Fri, 5 Oct 2018 06:42:35 +0000 (UTC) Received: by mail-qt1-f180.google.com with SMTP id e22-v6so5658911qto.6 for ; Thu, 04 Oct 2018 23:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unsilo-ai.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=cconkxAJLr3GbmivCRfvC4Z5/KWowF7JXbrx84qiUvc=; b=YzVA+vZfwoFwn2sT8N+aQBlAnOPa2Er1EPMnIZ5Brq1sODcnPqdaYnLLSaMYuK2Zy+ FzXe6KypYe3mgEOyB8i/nd+WVrKHtbsL9DcOEl/xO+gxbH3udxIKnBZWqZlZGXsUVVHz XddR6vq64w7k+ABOWcVokE0vdirmX0QSYBQjrFQ/RJ/mqcZyIzi7fGLZl+Rtg2OXPABo xVioWKZsUbrxF4lRt+KPp1YfoTXQAXF5mMZ0eyfZG5yh24LuZjSnT2qstolOesuqZDva Y7514aCYDR27Z1t6RuNYHf9SF0mn0hPh1OMk8a9QKl7IxoLE50oGQyXE/IBpK0pTm649 tAfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=cconkxAJLr3GbmivCRfvC4Z5/KWowF7JXbrx84qiUvc=; b=jpI1KH2huKuDWInOGPoNqRhJKZJLTbuW/S5gcskPcmMzyow4z1a0UDoIcVy1MyMwHB C4rLMS5242NQ7dX2gKdCZHmX3Gb69P8VTz579zLnUmFr+YVxZ0+ZZN+519HeRFgqfdVw p0EPhmq4HV8xwDQoLikWKDwu5idaZqjiEckcT4NRE/oWsQ5YvvrMoGz2DMSoU1KSYJM+ faEj5GMeS7iompTQ3ePWeWkbp2vHGzQ6AVd3g3Fgn7N3mqzNhiz9OcJ8DSwAeuxu25Ky sYBcpGyPFup/aqqRyY23Sb4HejTO41H/L9VT8JYdSbkK+0Tity5fjO4i1FXQEC+SXZzM mAIQ== X-Gm-Message-State: ABuFfogfVBC6jwS5MQAg5aXPlNzd34Z8l9o5Tvi1VozypluW4A18Vb5j 00KMKrViwyYfrCVMwqi9da5SWRU3kOs= X-Google-Smtp-Source: ACcGV62Q7en5OiZZoVca93ct7fKVqgZWZT2RpnKV+lCBORKnZvHJMR3nIBV3gjrR+U8R00H6tbFWLQ== X-Received: by 2002:aed:3384:: with SMTP id v4-v6mr8227980qtd.267.1538721748616; Thu, 04 Oct 2018 23:42:28 -0700 (PDT) Received: from ip-192-168-22-37.ec2.internal ([85.191.80.39]) by smtp.gmail.com with ESMTPSA id 76-v6sm5061748qkc.41.2018.10.04.23.42.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Oct 2018 23:42:28 -0700 (PDT) From: Mario Juric Content-Type: multipart/alternative; boundary="Apple-Mail=_D48153A6-D8E9-473D-90AA-EF341AC0EC84" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Ruta syntax check of missing ";" after rule statement Date: Fri, 5 Oct 2018 08:42:24 +0200 References: <991eb8c4-5e35-4ef5-d2ec-e495ba29f8af@averbis.com> To: user@uima.apache.org In-Reply-To: <991eb8c4-5e35-4ef5-d2ec-e495ba29f8af@averbis.com> Message-Id: <2872CB26-16F8-4FF0-BB34-4A1873D729F9@unsilo.ai> X-Mailer: Apple Mail (2.3445.9.1) --Apple-Mail=_D48153A6-D8E9-473D-90AA-EF341AC0EC84 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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 mobile: +45 3082 4100 skype: mario.juric.dk > On 3 Oct 2018, at 15:50 , Peter Kl=C3=BCgl = wrote: >=20 > Hi Mario, >=20 >=20 > hmm, the question is how Ruta should detect that a rule actually = should ends. There are no semantics on whitespaces and line breaks. >=20 >=20 > Ruta should complain with a syntax error if the semicolon is missing = and there is no valid stuff afterwards. >=20 >=20 > An example: >=20 >=20 > MyAnnotation { -> CREATE(SomeAnnotation)} >=20 > Document{-> MyType}; >=20 > >=20 >=20 > 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. >=20 >=20 > MyAnnotation { -> CREATE(SomeAnnotation)} >=20 > >=20 > ... or ... >=20 > MyAnnotation { -> CREATE(SomeAnnotation)} >=20 > DECLARE MyType; >=20 >=20 > This is not a valid script and a syntax error should be reported. >=20 >=20 >=20 > I normally find the missing semicolons quite easily with the Explain = View in the Ruta IDE, which is unfortunately only available for Eclispe. >=20 >=20 > I have right now no idea how our situation can be improved. Do you = have a proposal? >=20 >=20 > Best, >=20 >=20 > Peter >=20 >=20 > Am 02.10.2018 um 11:31 schrieb Mario Juric: >> Hi Peter, >>=20 >> It occasionally happens that developers forgets the semicolon =E2=80=9C= ;=E2=80=9D after a Ruta rule statement, e.g. >>=20 >> MyAnnotation { -> CREATE(SomeAnnotation)}; <=E2=80=94=E2=80=94 >>=20 >> We believe to remember that the Ruta engine previously produced = syntax errors in this case, but this doesn=E2=80=99t appear to happen = anymore, so we ended up wasting some time on tracking this down, because = the rule actions didn=E2=80=99t fire. It=E2=80=99s easy to overlook a = detail like that when we don=E2=80=99t have any syntax highlighting in = IDEA, which is our preferred IDE. Shouldn=E2=80=99t it produce a syntax = error, or is there some reasons to just skip the statements without it? >>=20 >> We are using Ruta version 2.6.1. >>=20 >> Cheers, >> Mario >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >=20 > --=20 > Peter Kl=C3=BCgl > R&D Text Mining/Machine Learning >=20 > Averbis GmbH > Tennenbacher Str. 11 > 79106 Freiburg > Germany >=20 > Fon: +49 761 708 394 0 > Fax: +49 761 708 394 10 > Email: peter.kluegl@averbis.com > Web: https://averbis.com >=20 > Headquarters: Freiburg im Breisgau > Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080 > Managing Directors: Dr. med. Philipp Daumke, Dr. Korn=C3=A9l Mark=C3=B3 >=20 --Apple-Mail=_D48153A6-D8E9-473D-90AA-EF341AC0EC84--