From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2F+jOItZwmFRJAAAgWs5BA (envelope-from ) for ; Tue, 21 Dec 2021 23:47:39 +0100 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2PNPNItZwmGgPgAAbx9fmQ (envelope-from ) for ; Tue, 21 Dec 2021 22:47:39 +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 aspmx2.migadu.com (Postfix) with ESMTPS id A18DD18EA2 for ; Tue, 21 Dec 2021 23:47:36 +0100 (CET) Received: from localhost ([::1]:41954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mznux-0003RQ-4M for larch@yhetil.org; Tue, 21 Dec 2021 17:47:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mznta-0000A7-KN for guix-patches@gnu.org; Tue, 21 Dec 2021 17:46:11 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mznta-0001h6-9X for guix-patches@gnu.org; Tue, 21 Dec 2021 17:46:10 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mznta-00082b-8o for guix-patches@gnu.org; Tue, 21 Dec 2021 17:46:10 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52723] [PATCH 22/26] guix: maven: Fix java parser. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Dec 2021 22:46:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52723 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52723@debbugs.gnu.org Received: via spool by 52723-submit@debbugs.gnu.org id=B52723.164012675230710 (code B ref 52723); Tue, 21 Dec 2021 22:46:10 +0000 Received: (at 52723) by debbugs.gnu.org; 21 Dec 2021 22:45:52 +0000 Received: from localhost ([127.0.0.1]:56052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzntI-0007zA-HC for submit@debbugs.gnu.org; Tue, 21 Dec 2021 17:45:52 -0500 Received: from lepiller.eu ([89.234.186.109]:52554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mznsy-0007ve-KB for 52723@debbugs.gnu.org; Tue, 21 Dec 2021 17:45:33 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id f7edf91c for <52723@debbugs.gnu.org>; Tue, 21 Dec 2021 22:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=oPQZM/DwMlMoCI4wokBLQwPiW t9rvf0O/ys1FhzDX9w=; b=ai58sSzielMJ9zEpUVUa4LbAcCXdpdFSXF/4YavHb Oy6WnCKwK1W+yZMBLINUo3MmTTbeBadYKwNnfbvSPz59PsTU0hA8aH/+jHRzkXcC s5HaWcnQD+xkzhsRMgGdcUnKFdl0tsOGZlXhNaP5SUBn9Tg/MuIY/poGnMIZ03Ea alSHp1FIq33+OHPMPoyMrDO6zCXvkoDDAtNgwgrJvJLHda44cPUfWffx5LOfHWBJ 1xnHq5lsixoyRlERyGXDCFd46oyiZw+xBjLbYLZCd4dks0azb6acNBVdpHxA06kW IjiX8e5OxUdjT9GbZacr0GVFfmCtTbgQrhet8Advp9V9w== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 498e78db (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <52723@debbugs.gnu.org>; Tue, 21 Dec 2021 22:45:28 +0000 (UTC) From: Julien Lepiller Date: Tue, 21 Dec 2021 23:45:06 +0100 Message-Id: X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211221234231.44299f63@tachikoma.lepiller.eu> References: <20211221234231.44299f63@tachikoma.lepiller.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640126859; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=91mZHpQB8P+GGG62UbcmXymBTUMl1jzkRbglB5mIv8M=; b=aFAvx2aDz/ocplKOIUYMsLJcHe4RNyC6yQb7uz6LankgTAuSHVuO5op6UCcc0djQQbRdZH jRVAeMRzZi8Ru+TptGyNW+EMJRylB7eDOYCNEFyafX3pF2udkeudnJeZlSaAumYdpy6Gg4 ileLUfn4nebaxJRKOix9vzfv2WZ40hAYRUDQsWQI44Lioy6xitemY0M3NHK+1Trq9fA/6j +bAeBcsJtEXB9XXrYBpVc/VNBt3nzY0U1GVy7+5e7usGpYmBnEWVSH+ssSjvw7lUo3ODmg yStEp331iNMcYkQoIjunG4gICQmRuIXtZNF1m/nU2rUJHuehV95bpNeNL3q8YQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640126859; a=rsa-sha256; cv=none; b=C2BLDwdHT7IDiCt9OuN3ncrMjH1MemaY3M7UnhxqslyLQPoj0MRLQUNDIIS0ZTaBDR+XrK /uK4cK8rxZ+teUEjaHXsgUDR9Zs38R/3MmyuirmEYElEnot7q1GQpftQjpaLs6jq8pOJOu z4xm8ND6vJUVuaAcaZseOgrmVx1HEbCu2NLlMoRrzePSoEtsfaAtv7cS2b74qA0Z8YV5mf gTfd9QBgzw3xY1ApPLTdqEgg+5upkn5mldXgU7m3XO3V8rYIcluSv+/Hfmcz3jMr4z/d97 4nYQEoa5X5tReLhhVKl1Yfy8Z5mJemIQqUYz+LPpJS0Ks7rA1WbjKFLqZv0kZQ== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=ai58sSzi; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx2.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.03 Authentication-Results: aspmx2.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=ai58sSzi; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx2.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A18DD18EA2 X-Spam-Score: -0.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: vS5NgogZVFNM * guix/build/maven/java.scm (comment, comment-chr): Support more comment styles. --- guix/build/maven/java.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/guix/build/maven/java.scm b/guix/build/maven/java.scm index daa4c88045..f8c8e5745d 100644 --- a/guix/build/maven/java.scm +++ b/guix/build/maven/java.scm @@ -31,11 +31,14 @@ (define-peg-pattern import-pat all (and (ignore "import") (* WS) (? (and (ignore "static") (* WS))) package-name (* WS) (ignore ";"))) -(define-peg-pattern comment all (and (? (and annotation-pat (* WS))) (ignore "/*") - comment-part)) +(define-peg-pattern comment all (or + (and (? (and annotation-pat (* WS))) (ignore "/*") + comment-part) + (and (ignore "//") (* (or "\t" (range #\ #\xffff))) + (or (ignore "\n") (ignore "\r")) (* WS)))) (define-peg-pattern comment-part body (or (ignore (and (* "*") "/")) (and (* "*") (+ comment-chr) comment-part))) -(define-peg-pattern comment-chr body (or "\t" "\n" (range #\ #\)) (range #\+ #\xffff))) +(define-peg-pattern comment-chr body (or "\t" "\n" "\r" (range #\ #\)) (range #\+ #\xffff))) (define-peg-pattern inline-comment none (and (ignore "//") (* inline-comment-chr) (ignore "\n"))) (define-peg-pattern inline-comment-chr body (range #\ #\xffff)) -- 2.34.0