From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +BfWCsD9Zl8kAgAA0tVLHw (envelope-from ) for ; Sun, 20 Sep 2020 06:59:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yIezBsD9Zl8rfwAA1q6Kng (envelope-from ) for ; Sun, 20 Sep 2020 06:59:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4A203940148 for ; Sun, 20 Sep 2020 06:59:11 +0000 (UTC) Received: from localhost ([::1]:33540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJtJU-0006I1-N6 for larch@yhetil.org; Sun, 20 Sep 2020 02:59:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJtJO-0006Hp-Kd for guix-patches@gnu.org; Sun, 20 Sep 2020 02:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJtJO-00041f-B7 for guix-patches@gnu.org; Sun, 20 Sep 2020 02:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJtJO-000776-AD for guix-patches@gnu.org; Sun, 20 Sep 2020 02:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43525] [PATCH] gnu: Add antlr4. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 20 Sep 2020 06:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43525 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 43525@debbugs.gnu.org Received: via spool by 43525-submit@debbugs.gnu.org id=B43525.160058508627284 (code B ref 43525); Sun, 20 Sep 2020 06:59:02 +0000 Received: (at 43525) by debbugs.gnu.org; 20 Sep 2020 06:58:06 +0000 Received: from localhost ([127.0.0.1]:48574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJtIU-000760-Bd for submit@debbugs.gnu.org; Sun, 20 Sep 2020 02:58:06 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJtIR-00075r-JB for 43525@debbugs.gnu.org; Sun, 20 Sep 2020 02:58:04 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1600585077; cv=none; d=zohomail.com; s=zohoarc; b=U0aSe6Tey4C5tznIGX4nv76IUkGBOp1jX1WivX2hAoVaL9uJvas+UgPAepHuOJpO7XI0PFplxkNcGpw4I+iO4GScrkpc0mivnoTm+q7mwGunTexpJ+RNNbhksNTB8KQsQcdYQHBUbUe+DjQ9ZLjOHy838LYFNYawStS9FGjIfHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600585077; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=DostB7MxZZ8jRnmNKvWoZFuQT6iIOX64ATgo8gJtTXw=; b=SiqpiZXYx2MKVuBUMNbTAjNIAub/8bMsVuAU+713swzh81C3Wjt966mk5zXWSt2tbsa/K5hA0elz07XcYVkeBm2dXo0mNGrpx2qkp5uYWsWeyZWLiOGxTKJ1jXNw+fzflvC4LtTR29EIcPCK8URbCR0X6zgSFLbIRZuDAqh+NXE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1600585077; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=DostB7MxZZ8jRnmNKvWoZFuQT6iIOX64ATgo8gJtTXw=; b=SW5H3Hf8ESsHfKeCJTLx+zzKe1RbAwXgxi/t6NTvTYVeopghrroAOIKqBArXhZGG ycRgBaUnO3WW6TVzzliUArld0xtDWdEyYk5xkSdJMjgkA9S6KELRQ4z+cAS97cmYI9N 9OhQCKDYXK96czZ+QLkkS9G6miaVjVVSMvny7wew= Received: from localhost (p54ad419e.dip0.t-ipconnect.de [84.173.65.158]) by mx.zohomail.com with SMTPS id 1600585075912610.5835555872795; Sat, 19 Sep 2020 23:57:55 -0700 (PDT) References: <20200920031817.1ff59225@tachikoma.lepiller.eu> User-agent: mu4e 1.4.13; emacs 27.1 From: Ricardo Wurmus In-reply-to: <20200920031817.1ff59225@tachikoma.lepiller.eu> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Sun, 20 Sep 2020 08:59:18 +0200 Message-ID: <87eemxszll.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=elephly.net header.s=zoho header.b=SW5H3Hf8; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 1.99 X-TUID: EhjOT7z10jVJ Hi Julien, > + (add-before 'check 'remove-graphemes > + (lambda _ > + ;; When running antlr on grahemes.g4, we get a runtime exce= ption: > + ;; set is empty. So delete the file that depends on it. > + (delete-file "runtime-testsuite/test/org/antlr/v4/test/runt= ime/java/api/perf/TimeLexerSpeed.java"))) Please let the phase end on #t. Please also use double spacing in comments. > + (add-before 'build 'generate-unicode > + (lambda _ > + ;; First: build the generator > + (invoke "javac" "-cp" (getenv "CLASSPATH") > + "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java" > + "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateC= ontroller.java") > + ;; Then use it > + (invoke "java" "-cp" (string-append (getenv "CLASSPATH") > + ":tool/src:runtime/Java= ") > + "org.antlr.v4.unicode.UnicodeRenderer" > + "tool/resources/org/antlr/v4/tool/templates" > + "unicodedata" > + "tool/src/org/antlr/v4/unicode/UnicodeData.java") > + (begin > + ;; It seems there is a bug with our ST4 > + (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.j= ava" > + (("\\\\>") ">")) > + ;; Remove the additional file > + (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRender= er.java") > + #t))) Why have a BEGIN here? > + (add-before 'build 'generate-grammar > + (lambda* (#:key inputs #:allow-other-keys) > + (with-directory-excursion "tool/src/org/antlr/v4/parse" > + (for-each (lambda (file) > + (format #t "~a\n" file) I=E2=80=99m not sure this actually outputs anything. Does it? I=E2=80=99m= not a fan of using FORMAT when DISPLAY would work just fine. > + (system* "antlr3" file)) Why not INVOKE? > + '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTrans= former.g" > + "GrammarTreeVisitor.g" "ATNBuilder.g" > + "ActionSplitter.g" "LeftRecursiveRuleWalker.g= "))) > + (with-directory-excursion "tool/src/org/antlr/v4/codegen" > + (copy-file "../parse/ANTLRParser.tokens" "ANTLRParser.tok= ens") You can use INSTALL-FILE to avoid having to restate the target file name. > + (format #t "SourceGenTriggers.g\n") How about DISPLAY here? --=20 Ricardo