From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16265 invoked from network); 15 Feb 2021 01:39:16 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 15 Feb 2021 01:39:16 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613353156; b=anb9TFWMB6SpbJKdJfxhvdj2s2GMpzsrO7SBhCgevk+g258jXbYzUPaHKFT9visUvy8l2a8ZuT X67iVLFYbHFAa41k4OUUSJJ685Ehy1UclIDbMhgOhxT4Ay8SE2K9AhqitzdBzwRYn9Wmgkkygh 7OdbpfIpRZzfqb/KFpGgbdoaakTrxsP67cVKcgMxxVufBUrSYG/9s73KNEieV7eeZR6+efp3fF JWOtTWsbkBbaJvkOIWSVjlxtWcKhE5s5cgoDDz4RuZWWRh1amuFDujr9IGKNHs76z1pzJU/mcS JF6TW4GxNO/woFfbirdsC6H7EqG9/1Cd9NrAVTUYxiey3A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; dmarc=none header.from=vinc17.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613353156; bh=0SZCQLbDcA6pEGy9BhB8QeJRYPEm70usTdWSfR3V0eM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature; b=T0LkwwEWKArFG9blkxz4wxQJiFB11vGiMGqBP331myv1/O1ZjB3es148nZDakNzDG9fpr97Xgw 5toZQsUgXltq16rshCPBS+HXmX9nI9Uw067ICZ+SKpbxqkLp7gwdjW1nPMWG75+QmVBUUzvK1g oHY4Nkcnc+JZRrR+onsRgu6wD7kklVc0bh3XBqutEj25f9Sr7Bn1BHaTBHkOXFCPM7GUU7xJk5 vV6i4Z0kRQbReFwFLSbNIzyJM/3NQ4tFW3b/duAdv7UjLN1AnxEq/owc5CYW/z7YFxNtLi4mri APd5Em/TutLsVf081Cavt3YhMS7gsBwr985/SFdc7ez5Sw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=dmqLzYbDaTbKZzBoUcMMIsFR0+V8QLcUsR2KLeR+Ofg=; b=Ta37U4Kew5xhfEdQQqyqDMwBCF qWwxFzjsmIwuJmsv/dbPaq8Gk9tfsOlT3n8BanR9Mc6jk5WFrCdtGe9/IL8+LJItwK8plwcVPIjUg D4sOUTvP7vaMbg0SVsKc4WpEaJFcp0TLYnSQbt6n/EW4wgPoI8miHgcd3nFXC1iztb6huYYHYc5zw do+0z6Dm9gt7KkJVvufWRR5cUBMulBo/8UH1CCfM/QZBYsUWXl55yO0La+TfffXxYeOwzm8FO/Y4t lmU7Jr5M+5WJ100jnBcBhNsv3Djd0EG6IzRspssKlFpv1uynEClq0ZtBqtLCTISoqS/8BcwJsCDkQ C3DOHL7A==; Received: from authenticated user by zero.zsh.org with local id 1lBSr4-000G9S-FP; Mon, 15 Feb 2021 01:39:14 +0000 Authentication-Results: zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; dmarc=none header.from=vinc17.net; arc=none Received: from joooj.vinc17.net ([155.133.131.76]:39876) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lBSqp-000G0N-8E; Mon, 15 Feb 2021 01:38:59 +0000 Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id A6ACE2F6; Mon, 15 Feb 2021 02:38:58 +0100 (CET) Received: by zira.vinc17.org (Postfix, from userid 1000) id 89DE5C20AC7; Mon, 15 Feb 2021 02:38:57 +0100 (CET) Date: Mon, 15 Feb 2021 02:38:57 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: Block comments ala Ray Message-ID: <20210215013857.GE2302738@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <20210213083521.kv3y3qzfnaffflfh@chazelas.org> <20210215003628.GC2302738@zira.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.0.5+111 (106ff19a) vl-132933 (2021-02-08) X-Seq: 48052 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On 2021-02-14 17:07:23 -0800, Bart Schaefer wrote: > On Sun, Feb 14, 2021 at 4:36 PM Vincent Lefevre wrote: > > > > How about the "'' " prefix (two single quotes followed by a space) > > Not very visually distinctive, especially for two single quotes then > space then newline. Note that this is only a prefix. You can decide what you want to write after it. > Also as I mentioned, it's significantly more work if the introducer is > more than two characters, because of the need to back up and re-lex if > it turns out not to be a comment. Can't this be shared with the usual parsing and decide after reading the first word? Here, this would normally correspond to an "empty" command. > It's easy to peek one character ahead of "!" and unget the peek if > it isn't "#". To use more than two characters means turning the > whole thing into a real lexical token rather than just something > thrown away during lexing (as happens with comments at present). But here, the 3rd character is just a word delimiter, so that I would think that this is simpler. > Hm, what about paren then ampersand? Doesn't conflict with ksh > pattern-list syntax, is currently a syntax error, etc. The problem > being that the reverse (ampersand paren) could appear in valid code, > so the end marker would have to be asymmetric to remove that > objection. Could you give an example of valid code with "&)" at the beginning of a line? -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)