From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id EA8833835838 for ; Mon, 12 Jul 2021 10:06:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EA8833835838 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x435.google.com with SMTP id d12so24166703wre.13 for ; Mon, 12 Jul 2021 03:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=nNYMAqC6s8aprehmnYAhFXPS3qRgVTNBCf4EQwxHIVU=; b=eWzANJutnqctxDUBEnnlHO+qCWeuBtH6SGGld+roG5GuSeBai2KRZQEJ50xTLjnhp5 fSwdfdNdUb/5FsIzF0dfhItvX6u9dCyYdxdjOoNOymsZRF737BMQVdipKW7v6opTs58C jBGfZoXoZE2Rio7Yc3x5lBk9SiOyzDMBvNlPDrKvihj2/ld0xOGEJva6zNpgQBZFXp96 K3y5Gxn87F1G8N7gpPKbBbDrSpRlBu0B+oGHexP25W6BHPWNrUJ/pcEs/gEUz3JjJYcm KjdGvU+kXkFLjYrsObBs91rzyfhT6sqUgFCYfZ+zyg9k7xVouPMXstA3ro+FhMz18hfF ELFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=nNYMAqC6s8aprehmnYAhFXPS3qRgVTNBCf4EQwxHIVU=; b=VkOVaRQ9jyDUihTYg03jr1a0WmDnfW8TF/ZXXa3WHanvYKiX8vz9MK3q02hWDgLPJE jEkjuXK3JmQxX+DZlsAPgXgeSoxftZNewok2SjfPEQbEq8KnV/OQmONKEdehlIugGQhS xq8cxhEXy0w9OkKgqfQTv7DV/pCU6KLS1nBgNcsCxdfquRJzVhFw3b6QnTFqt2p+Cgvy Cm4GYfNUJ9UXIPLb6J1NUdAXE6DoeX9/ilH8VawvjGqhpjxoUUZWL9wkzl0oEeLy+Zzb ZSpNvB9ZMubjGpUb6egjsK2gJ8KPO/7nGpxu03p+k72kb1oHve6TmmMbzI/F1ta3f1oA RWog== X-Gm-Message-State: AOAM532XR6+W/JaSnmrLDC4J2pIjmm0Ab54HdVkMqolbzQXAxab5x3pt 6XcSSvmabAcMLFUgb5v9O1PYPb2zIGLbEg== X-Google-Smtp-Source: ABdhPJwuGUsSP0NuXZV0+kE8lAtJ9TyZ4DhJm2/i2Q76erIfC8Kn68Cp8v9XcDfPV7ZIbbSXxbMksA== X-Received: by 2002:a5d:6304:: with SMTP id i4mr5402902wru.406.1626084363236; Mon, 12 Jul 2021 03:06:03 -0700 (PDT) Received: from [192.168.0.40] ([86.14.124.218]) by smtp.gmail.com with ESMTPSA id j16sm13799767wrw.62.2021.07.12.03.06.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jul 2021 03:06:02 -0700 (PDT) Subject: Re: [PATCH] Handle doc comment strings in lexer and parser To: Mark Wielaard Cc: gcc-rust@gcc.gnu.org References: <20210711201018.389798-1-mark@klomp.org> From: Philip Herron Message-ID: Date: Mon, 12 Jul 2021 11:06:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rOCr5LkKHKdNt50pyyLxZ6y4aTsJ67pZS" X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-rust@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: gcc-rust mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2021 10:06:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rOCr5LkKHKdNt50pyyLxZ6y4aTsJ67pZS Content-Type: multipart/mixed; boundary="fAAht9a1MjyrsSxzm94tvk4xXzpIY3XOr"; protected-headers="v1" From: Philip Herron To: Mark Wielaard Cc: gcc-rust@gcc.gnu.org Message-ID: Subject: Re: [PATCH] Handle doc comment strings in lexer and parser References: <20210711201018.389798-1-mark@klomp.org> In-Reply-To: --fAAht9a1MjyrsSxzm94tvk4xXzpIY3XOr Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US On 12/07/2021 09:32, Mark Wielaard wrote: > Hi Philip, > > On Mon, Jul 12, 2021 at 09:09:09AM +0100, Philip Herron wrote: >> This patch looks good to me. When I tried to apply it to merge it I go= t >> the following: >> >> ``` >> $ git am=C2=A0 '[PATCH] Handle doc comment strings in lexer and parser= =2Eeml' >> Applying: Handle doc comment strings in lexer and parser >> error: corrupt patch at line 531 >> Patch failed at 0001 Handle doc comment strings in lexer and parser >> hint: Use 'git am --show-current-patch' to see the failed patch >> When you have resolved this problem, run "git am --continue". >> If you prefer to skip this patch, run "git am --skip" instead. >> To restore the original branch and stop patching, run "git am --abort"= =2E >> ``` >> >> Not sure if I have done something wrong, have you any pointers? > Looks like that is one of the IsolatedCR tests (a bare \r not at the > end of a line followed by \n in a doc comment string). I assume some > mailer ate it and/or added a \n somehwere to "correct" it. > > Would you be able to pull directly from my git repo? > > The following changes since commit 4560f469ee33536cec6af0f8e5816ff97de6= 0de0: > > Merge #551 (2021-07-10 21:02:06 +0000) > > are available in the Git repository at: > > https://code.wildebeest.org/git/user/mjw/gccrs doc-comments > > for you to fetch changes up to e1e14958a90397a1ed6ab7236dc5a6f1c2f22505= : > > Handle doc comment strings in lexer and parser (2021-07-11 21:09:21 += 0200) > > ---------------------------------------------------------------- > Mark Wielaard (1): > Handle doc comment strings in lexer and parser > > gcc/rust/ast/rust-ast.h | 2 + > gcc/rust/lex/rust-lex.cc | 214 +++++++++++++= ++++++-- > gcc/rust/lex/rust-token.h | 25 ++- > gcc/rust/parse/rust-parse-impl.h | 60 +++++- > gcc/rust/parse/rust-parse.h | 1 + > gcc/testsuite/rust/compile/bad_inner_doc.rs | 15 ++ > .../rust/compile/doc_isolated_cr_block_comment.rs | 3 + > .../compile/doc_isolated_cr_inner_block_comment.rs | 5 + > .../compile/doc_isolated_cr_inner_line_comment.rs | 5 + > .../rust/compile/doc_isolated_cr_line_comment.rs | 3 + > .../compile/torture/all_doc_comment_line_blocks.rs | 47 +++++ > .../torture/all_doc_comment_line_blocks_crlf.rs | 47 +++++ > .../compile/torture/isolated_cr_block_comment.rs | 2 + > .../compile/torture/isolated_cr_line_comment.rs | 2 + > 14 files changed, 401 insertions(+), 30 deletions(-) > create mode 100644 gcc/testsuite/rust/compile/bad_inner_doc.rs > create mode 100644 gcc/testsuite/rust/compile/doc_isolated_cr_block_co= mment.rs > create mode 100644 gcc/testsuite/rust/compile/doc_isolated_cr_inner_bl= ock_comment.rs > create mode 100644 gcc/testsuite/rust/compile/doc_isolated_cr_inner_li= ne_comment.rs > create mode 100644 gcc/testsuite/rust/compile/doc_isolated_cr_line_com= ment.rs > create mode 100644 gcc/testsuite/rust/compile/torture/all_doc_comment_= line_blocks.rs > create mode 100644 gcc/testsuite/rust/compile/torture/all_doc_comment_= line_blocks_crlf.rs > create mode 100644 gcc/testsuite/rust/compile/torture/isolated_cr_bloc= k_comment.rs > create mode 100644 gcc/testsuite/rust/compile/torture/isolated_cr_line= _comment.rs > Thanks Mark that worked its up now: https://github.com/Rust-GCC/gccrs/pull/561 Great work once again. I am aiming to spend some time towards the end of the week to add more tickets and info for new contributors to get involved, which I will post the interesting ones onto the mailing list as well. I think it should be interesting to contributors of all levels. The main one that sticks out in my mind is the AST, HIR dumps which are a bit of a mess at the moment. Thanks --Phil --fAAht9a1MjyrsSxzm94tvk4xXzpIY3XOr-- --rOCr5LkKHKdNt50pyyLxZ6y4aTsJ67pZS Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsD5BAABCAAjFiEET83ATZOayqRjyL0Cr7gxHEFOdpkFAmDsFAkFAwAAAAAACgkQr7gxHEFOdpn6 uAwArM6tWzRBq5kb3IU4KwtpflxkkzZlaSfUt9ugFtp/DpXAwwGO2em2q+Ztottlhecl26pRuM2v OB8LDs+rTskzJyg4vSHnyApp+euGv2j0vEs7tCT2l5BcJCpxFY5sRjr+A/jVcDO9Vaqp/HZpPErZ 0LPUcH2qmpq8z2jjsL3XYwZRFVmxaC92c9ogHkCpTqAlfzo22YpAnACw7YHAXfn+4w2UCvEN4KdF daBkjteY6EN9zU4cNOUr2ai6MT1KcXJT07sDr8invZk+7uAHpYnnvWkhEBDR93To+EDvruIbuFIa 2vaaq+kLUTiOajMtGR6UIBDDUS7mEwpkEPTYQZjays1LgOCjPW+YsZAnj3k5/AxgZ6nA1uVa9tKE qvcanbIWZvJ+tiaI9LVd3gzgOoZXMW3K+JOec07X/fB/Qrs5z5WR2waLqC8/Ro+qGgHtAXAKSsD2 qPEvss7v4OzN358fH5e8V8mevFqyZenG5w1lRCDdfzzSBkkg37xI+Oi+uWzG =3ogy -----END PGP SIGNATURE----- --rOCr5LkKHKdNt50pyyLxZ6y4aTsJ67pZS--