[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A bug in parsing of conditional ops?
From: |
arnold |
Subject: |
Re: A bug in parsing of conditional ops? |
Date: |
Tue, 09 Jul 2024 11:04:28 -0600 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Denys Vlasenko <dvlasenk@redhat.com> wrote:
> On 7/9/24 16:04, arnold@skeeve.com wrote:
> >> since this unexpectedly works:
> >>
> >> $ awk 'BEGIN { print 3==v=3, v}'
> >> 1 3
> >>
> >> According to the table, it should not, (3==v)=3 is not a valid assignment.
> >
> > It's parsed (as you noted) as 3 == (v = 3)
>
> Well, it shouldn't. The == has higher precedence than =.
As I said, I don't really wish to dive into the grammar to try
to fix this.
However, if you wish to submit a patch that does, and doesn't bring
anything else, I will review it.
Thanks,
Arnold