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,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10141 invoked from network); 6 Jul 2022 10:09:54 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 6 Jul 2022 10:09:54 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1657102194; b=ELnTBQ9BGduquF7lN7+RSu26ZHzGQwMymoKoYSitdGwt2p/auncdrhRFUZrySryz8elQT796k6 ro8rIBX8w9ThRkUq9PT2NO76nOOV5RKOSSnrqX+zp7kfyFS5AGPpnbvMaZElHqGX9ReoYlshbf 2bxIfGMfM9SgdMSelznwr8XxCeEG1AQQvcKbVWDwkKkemsXEFuD0FRA8ZexuOpn4XmzDBca6V3 qMuW6N95v3J4cipN1LP2Pu3hIZUpcKcfD3SymvUfK2Rj/t0J5Zjio0bIHweex12KY35EW8nBnQ aXQ+0tICgJprDQENNJzvwdou6qMFvOaICRfYJqz0nfa1Sg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1657102194; bh=oWS9+PPYtmP0nSADCldJYjDGOxQ9w3cDW67px/tZfzE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Subject:To:From:Date:References:In-Reply-To: Message-ID:MIME-Version:DKIM-Signature:DKIM-Signature:DKIM-Signature; b=JlGZ/7smZiy0I344Kx4frOEJJCLWDw7u8KASspa/CXscST33X2miChpf9dUDMB3TENqteIcFQA Lw+Zw5B7EeR4EkJ5/li4AM6sNqFefN9G00NM8zXZD4BIB2JmB/5sC78FeNI4XP7NeeGEkXjSES B7bnOWmqdF3PBeAQK5lyzJVPr0qeHjRmf59hxPWLAkXI0j26wxFQQRGCLn99KVB43iLxWQwVft 5ow74kiaHuVob+LFR8suM+C4AMnRhQnUQxyxp6VnBn2Ocy6VYjDRl8HA/Ouf06+hvNUqYKrMHx 8L7ymuh7YoLughOOIUEaMjG2pi1xKcR0RnTF/7tEgUyBJw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Subject:To:From:Date: References:In-Reply-To:Message-Id:Mime-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=VrxsoW1uUg183dtENQwBkchYEnicpQKqtpk/xfUgYjo=; b=kY5Liw8hN5efyvJNzGhRQ2tfsc /IbaXk0QKQibzGb1/VNhOlUUH0o+BU6YymaILSLycFUytVSmI4CIf8hwSuT/y8S8emrbG+zHawDpo 6qSZ85RNG7D2YJlMftaELWveHmH8qoiIu6HcvZPvhz9yMKDBp8HG+7k8mfmzR4UNHL9OPdlyYdahs jc6zCwBHWpkDHGcisy2N4XvxIYfwkjoQ7a58bsTJ4L3lI4DdDdFBqbQb/g1ip8/m43Czo//jMxdN/ V223d405D6t4qEZiwDl8NJaoTYHOeaj0YRfFSW29Ilxpk7/eskCi+LKWjtc8yL6zc910HDFRgbmuu ueRjPkWQ==; Received: from authenticated user by zero.zsh.org with local id 1o91yi-0001vO-2G; Wed, 06 Jul 2022 10:09:52 +0000 Authentication-Results: zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out5-smtp.messagingengine.com ([66.111.4.29]:34901) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1o91tY-0001Vp-TB; Wed, 06 Jul 2022 10:04:34 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B93745C0199 for ; Wed, 6 Jul 2022 06:04:30 -0400 (EDT) Received: from imap46 ([10.202.2.96]) by compute2.internal (MEProxy); Wed, 06 Jul 2022 06:04:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1657101870; x= 1657188270; bh=VrxsoW1uUg183dtENQwBkchYEnicpQKqtpk/xfUgYjo=; b=b Lg6lyQNSsrH83gPwlrg0UW79XE43Y3aM+Riw+2ZhUEFUY6CEqv10NVSbRb1ySl9b 6U8fyAKgzN2uL6Ju1S0Bz8LpAjO6IzaLNdD73CaraVLaoXTAvDbZRM0exg6yIfdR GH2X8oeDPlcgjcOr90W2mDenBL1MYq950UfGcgTmijTKNbfy2B4IV6ZF9rfRutRP Il6CTVRBacnU8FL8bUeRMsx1H2fVAa+zOvaNSjfaoLYTnI6iBWRGhzjo0yoOzUgY az/IIR0ADmaSIA5TSRMc1BCcWyntvYO2H3cvtijwrMjjRio2L7L8etvxHU83lsdV ZXFcG9NqEMcSGw7Jg5xSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1657101870; x=1657188270; bh=VrxsoW1uUg183dtENQwBkchYEnic pQKqtpk/xfUgYjo=; b=Gm5+EvPAloRZwdKpES1D7VT8VaRmkCUKRYIVJRjZswgl /4+5flZ6LkCM6k5yXYx9ivPtBFkfih5rQVVlVal185Qccs5i3qbw8bTiqiPZiU3o 0n8Hye9yqBuz1kSqH4XQXETCWB2VhbetHPoZqRfILaFvDp9PLbEEytyFDQhDGQK4 msYjRBWVaNv0cu7lVgie7OywNkDElmcrcvpyxwJrEtlAugNxCJ7Nu1vIcoCksB5s 2UKENSqMz6MT4KAkYlGFlwYyE9gKPBBQi57vduzaU0pb5pcadmIRJ1cgfBH9f0wq GeB/I+Yy4WJPwMKzbeY0Cowc1gCPS3TUZhdvyz6JgA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeifedgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpedfffgrnhhivghlucfuhhgrhhgrfhdfuceougdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeejueevheeuke ejtdffgeevlefhteehhfelhfffgfduuefhtddvhefhjeekgeehtdenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrsh hhrghhrghfrdhnrghmvg X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7C85B2A20079; Wed, 6 Jul 2022 06:04:30 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-713-g1f035dc716-fm-20220617.001-g1f035dc7 Mime-Version: 1.0 Message-Id: In-Reply-To: <1754611311.1326396.1656963688860@mail2.virginmedia.com> References: <76883431.1281129.1656942459330@mail2.virginmedia.com> <1754611311.1326396.1656963688860@mail2.virginmedia.com> Date: Wed, 06 Jul 2022 10:03:29 +0000 From: "Daniel Shahaf" To: zsh-workers@zsh.org Subject: Re: Extending regexes Content-Type: text/plain X-Seq: 50404 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: Peter Stephenson wrote on Mon, 04 Jul 2022 19:41 +00:00: >> On 04 July 2022 at 20:15 Bart Schaefer wrote: >> On Mon, Jul 4, 2022 at 6:53 AM Peter Stephenson >> wrote:> >> > > On 04 July 2022 at 13:03 Sebastian Gniazdowski wrote: >> > > Zsh has extensions to regular regexes - the ~ and ^ negations. >> >> PWS correct me if I go too far astray, but (^Y) is internally (*~Y) >> and (X~Y) is implemented by first matching (X) and then removing >> anything that matches (Y) ... which is where the regular-ness goes >> astray. My formal training on this is more than a little rusty, but I >> believe this means chaining together two finite-state machines rather >> than building a single one. "X and not Y" isn't chaining; it's a Cartesian product. Essentially one walks both the X machine and the "not Y" machine simultaneously and accepts iff both of them accept. Chaining machines would create a non-deterministic machine that matches the concatenation of the input machines' languages. Cheers, Daniel (backlogged, so, replying out of order) > That is basically how they're implemented. We have a sort of internal > scratchpad that allows us to backtrack over the exclusions as a nested > state of the main pattern match. You're entitled to say 'ick' at this > point. > > pws