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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6916 invoked from network); 6 Jul 2023 01:40:24 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 6 Jul 2023 01:40:24 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1688607624; b=M/9hYq3QTb3EjFFQJ4n0NBUY6QpcTNCz8m7yomJvdaiSYbmqZtz9W/j0z2m5BD0y+GDI4oKiY8 v1PGrejIVi4Vei81TJOvt4jpijQBauhAoopwNTfiwivqZ9zcb570QDiiYvq0MEAhL/WwXJ8LtG pByOt8gnZAsthmXvOulaXgSqJWKxXJJyUH0ANbBOGKxzTj5pbosY1YaikZUpXY6KE6O+ChMyUc 4Id7m7JQBzWAj3D/Zw/fc7TjWMT+ZuhzvKeRiUrZo/OqYui7xU8PbZuES66gey/X4dWylyX6i4 /17oHndSPWey9MWYCUaxZK3luBljxDKNRJ9ZVmTDnyl2DQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f48.google.com) smtp.remote-ip=209.85.218.48; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1688607624; bh=9wgeJcCZJ5O97IKpUtAD28/QZWGLIVvtFglWwEnIB+0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=c7nI39ZI3yzQoZaXUPyl0ciOm93vcgl3GN787vbceqSMdNUrAAWnorCZ3d6cX/zPYxXJMTkpF6 I9/idGuf8DUaHoiIvmhdyqPbrgu067UzyGii7c1xlpP3765UjdVsqn1CJrDS5M9KbcyEDQ7LoH FYnAk2m4WUL7AW+PauVOBCO/A8c0Oa19r7AIfkcMkmn9MhGY6uo/6WESrYhxjLXN6Y5zz26ggB i0RdA2khWmx+nLYhd7LeRYZ4iF1wggjv5Hb4v/T0DuAo2CC4J5wFKicaC8/4jyGpvYxSt4AH2e g+RrCcullf/0XwIb+nfLnIaeqEkJ9O7ZpGS2CQp999xw9A==; 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-Transfer-Encoding: Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=+mvOxajdWsw8qkoJZO3tmovfMS51c93pC7Um/aDE0/0=; b=VWp5AgIz1Y2t4xYmURgqIDbPt4 RAAqOjpgWC3sJbpg2aKuoLFa2iiOOkDi0xi3o4E2L7dqgy1GhX4pkKA2j/WsW03pRzzSbPYytwe2L 0QgyLO8dLBsJCs2mc1oJyKISxrS8XSTmdvS+hQKlxaDsUHNAQGzLFowwDySBeEQx2uaFhGWhsTHPg 32iyAnxZ4pIkBl+nj5TsezOYlolxbdn3F7s+tdlfmiL3GUKY9bL5tF+CLlhR6EafUIFAAMUgUojRf zieP9OEOSBDqq4nZGgHkRVo+C/J9gfHxcseeljJ6Cq71VH5X1rdtZAQ3v74fJ860x5LN+W81ybnia k+GjTJjg==; Received: by zero.zsh.org with local id 1qHDyq-0007B9-4w; Thu, 06 Jul 2023 01:40:24 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f48.google.com) smtp.remote-ip=209.85.218.48; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f48.google.com ([209.85.218.48]:51530) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qHDyF-0006r3-P6; Thu, 06 Jul 2023 01:39:50 +0000 Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-992f6d7c7fbso14136266b.3 for ; Wed, 05 Jul 2023 18:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20221208.gappssmtp.com; s=20221208; t=1688607587; x=1691199587; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+mvOxajdWsw8qkoJZO3tmovfMS51c93pC7Um/aDE0/0=; b=sFi6Qz5D/imDbVOnR3SkyLm9e8yquaRvNiZy4CMl006YlIK8bGN5PPpzp5p6uFa4bY IRj5rIhfiFlRYNiRMfFGyRfb5Y6UNuT8RU5S94YN/Q3Z37tYeh+JhzgqNQC1orxrvjfA x5nyi0sMusZBkZgbKO+QhA3NqwTatZptGDft7Nv3Js8BpmfZZRee7fx4l2pjvx5rr3u3 WNgzrSFlX1jGXB5AO024jWqP3jxlyIXzvcZhFFIf3GQ2hOHsD1onT4iIeNh3tCrLdR1G bLITYuwS/XEhiR/cacBUkAH+aKtCEBhAIB090mOI1PUsnV9Io9sWNMmxU6NezeJ6mPhm zfZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688607587; x=1691199587; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+mvOxajdWsw8qkoJZO3tmovfMS51c93pC7Um/aDE0/0=; b=HMLtQMFX/FFCpKW9kBKO9LODkpBCgHJKEIS4NivHnoLVj2T/fnR5wnjDckwCvTne1+ VcYMlNUTe8cPi2df3RxnHJydXOj6fk8a+qXgzK31FgvvOQsoFkSSwL6h18HWf7+aLoVK hMGYGmg3hO+3rj8EnMlgK1XaJAmzzSF92EZtqnY+qX/cEOxM5boQ2aNqRH1TloFmfiId 8oTi26qAl8TgDSU2YnixTugX61nRk3zXxZVkh1N5kOD6pTXkkZ6vAOD0gMkN2BsoZG+I XXRK8I+p68rkk+gqSOMYE2HFsVVgPBQ0/Q1+sjEvv+UV9+CqZun6s3EfwEweImTCd683 Eiaw== X-Gm-Message-State: ABy/qLZu22RKTLrPJxtXojVo3jhwQqzz4Rq+edkoE/nI1iXN5OR0a0AR Ec37BYjJTXH5CUWb/PugDEywmbZwv4ohfKz+P8frXHY5mMxs+ZtltHE= X-Google-Smtp-Source: APBJJlFSRFDokwffK1MQtqN67VFplgWBcbEvvPLJU+7zqeBGx2TL98vnEOxEbg4B2MXgw2F3utzbSZE/gYtj7fAENzs= X-Received: by 2002:a17:906:e17:b0:988:dced:f339 with SMTP id l23-20020a1709060e1700b00988dcedf339mr216633eji.31.1688607586658; Wed, 05 Jul 2023 18:39:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Wed, 5 Jul 2023 18:39:35 -0700 Message-ID: Subject: Re: [PATCH] Support the mksh's ${|func;} substitution To: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51906 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: On Tue, Jul 4, 2023 at 10:32=E2=80=AFPM Bart Schaefer wrote: > > The first three of those are implementable within the structure of the > patch from workers/51898 although it's a little messy because of the > multiple "return" points in paramsubst(). Fiddling with this has led me to find a few other issues with either of Sebastian's or my earlier patch in this thread, namely, both need to be more clever about finding the closing brace of the ${|...} substitution. This in turn leads me to ask if one of the old hands with the lexer can explain why, inside double quotes, "}" is always replaced by Outbrace but "{" is not replaced by Inbrace unless it is preceded by "$"? A small tweak to the lexer still passes all tests and makes skipparens(Inbrace, Outbrace, &str) work more consistently, but I don't want to have missed something.