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