Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125258 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 6775D1A00BD for ; Mon, 26 Aug 2024 09:14:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724663784; bh=7qnfVHOiUCr6SumGBjNN+570Hngf+/+LkkoYC5z+B0I=; h=Date:Subject:To:References:From:In-Reply-To:From; b=NmloDZDkh8hAsdvER6QNNxpnf4jI09XmgYRt6p8ko2zqkhgyEpWeStd2YIrIsp3i7 idTpGq5js53zzia8N5h2bd+jc3A3MLaUgdNXwRRHg1o32hBBZ3MJhiUOvKsHooXqb9 NRRruVsD1c1r2ZrnJbjcb/HKeffQEpkWJ1KaNycAKb0LkXxwhvFcn8lErAyJLMLHSn lNbPH1OVF5VaJugv0vHcLrpIe2hebE2nzxXhAuMMf8m7uce1z/SeqCk9vZOWEweoa6 GWf14sCSsVlCTuqL52DrcgYjh9alEQZqcp18yNorn/sweAcHNweEovuhRv17EtFf0G A4sysUuu/Y/6A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D6CD1180034 for ; Mon, 26 Aug 2024 09:16:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 26 Aug 2024 09:16:23 +0000 (UTC) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-428e0d18666so34950715e9.3 for ; Mon, 26 Aug 2024 02:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1724663669; x=1725268469; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=XrvS6WuLf6In79uzZHDqqBp2Gz5Hf8gGREnEPk7Cij8=; b=kJz4uOLRH+nQ2sZYlsSk6vmTbiwHCLqiUhaJpLp33FHtHUg1NRumRy3La5z0+J3gbH fXafR8j3FCa5E0OrnqyhYWNURqg/eszAx8Q1APvjVKvMr6am8+M+e7oeVuksXqFtXbh+ pDjGUNEbY1SHfYZlBZ8QsUCfTBhzj8Qwr5DISmMmKoLRuaEHduRgh3AhpDTD5xmGgTWL brYIq9RNVfcv7c+bFZj0BN78af9Lm/d5LztH5LKJ4duiOw/pJ3hL8ulpoM5OtPa7SiAE Wj8szQNywSa1NrSApZGTC3Sh2we4qbCFCnMfH8MXScXhybi1t0yVC9Uhi2jrzZrgtTb+ 90OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724663669; x=1725268469; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XrvS6WuLf6In79uzZHDqqBp2Gz5Hf8gGREnEPk7Cij8=; b=MjnvZd9kmQG9E/UcJaPcDCq1w8k/In+veYU+F9pHCgNVdU9711BYuLzjRdQsS4Vgoh NSlpU0euP3SvfeZxNL5YIYVEgaM1baa2bTew6PyDhNYX/Q+P3WAzlzkSaJCUjMp83pSI UzuXtSn405ztaeMa/O2naXIKN5GD1TdiaMlHmGpYpVFMSsF+FhZGxCGnYYB+uy4M5AS+ PNiEILvpAxTBfufBkD//kOXFKFyF4GRlzq4nyX6q97omx+vlAGW2tmwaqETtUyV9BysH v6h3CcxuQeMiGooUgZnDNegJxEIQw29gydaUJoyNNErKx89PWrKF2YtYxbCAXSlzP+Vj xjQw== X-Forwarded-Encrypted: i=1; AJvYcCVEUKc/qLzuxvzpfKSLW6ucpBsBteGJxWF0FCrPQ4MeZHvioBiZTvxeXYZqZJ8CfIVbUxRsnF+n6eA=@lists.php.net X-Gm-Message-State: AOJu0YzZ+wrq9tREWj93OIiv03t12LvrXlsDG0t7aDgU4e9IaC9LzOcQ 81zvKXy1qFrzLEFWdbSGNhJCwBJul3pcALBej38kcLQSHIWtYQ147QbEYSj1urc= X-Google-Smtp-Source: AGHT+IGZaJtbB2WenMR/1t+/ONvZgHcwh/pgfMaaDQK1RBTEhti+TQ88f51TlTEQmJGCAcWFIxvy8g== X-Received: by 2002:a05:600c:4e08:b0:426:6f62:3bc1 with SMTP id 5b1f17b1804b1-42acc8d3e54mr64942465e9.5.1724663669071; Mon, 26 Aug 2024 02:14:29 -0700 (PDT) Received: from ?IPV6:2a01:4b00:bf09:5101:24c4:e0bf:99bf:8460? ([2a01:4b00:bf09:5101:24c4:e0bf:99bf:8460]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-42abef815d2sm182262655e9.24.2024.08.26.02.14.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2024 02:14:28 -0700 (PDT) Message-ID: Date: Mon, 26 Aug 2024 10:14:27 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] Default expression To: "Christoph M. Becker" , internals@lists.php.net References: <0c8ed5d6-5507-4c41-8d7f-05d14ba8aa4c@scriptfusion.com> <0cfd3a28-3cb0-4478-85fb-cf086d8e5c66@app.fastmail.com> <3e0d031e-256f-47cd-9a2b-dcdc760f5498@scriptfusion.com> <6afeb23a-867f-457d-9b13-fdf5af02c31e@scriptfusion.com> <928d6c8c-c969-4d55-82ff-5da8fc3d3035@scriptfusion.com> <73301950-03e7-4f3c-9fab-402645f77272@gmx.de> Content-Language: en-GB In-Reply-To: <73301950-03e7-4f3c-9fab-402645f77272@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: bilge@scriptfusion.com (Bilge) On 26/08/2024 09:58, Christoph M. Becker wrote: > On 25.08.2024 at 23:51, Bilge wrote: > >> If you believe I am incorrect about this, I encourage you to submit a >> (working) Bison patch to demonstrate how a restricted expression grammar >> subset can still recurse with the unrestricted superset, then we can >> start having this discussion more seriously. > It seems to me that the restriction does not have be enforced by the > parser, but *could* be enforced during compilation of the AST. If that > *should* be done, is a different question. > > Christoph > Thanks Christoph. You're absolutely right, I would be interested to see any viable patch that effectively implements a set of restrictions on how `default` may be used. Requesting it be done at the parser level was not meant as a gotcha, that's just how I (with my lack of experience) would have approached it, but certainly trapping cases in the compiler is equally, if not more valid and/or practical. Cheers, Bilge