Re: more m4p bugs
Nikolaos Chatzikonstantinou <[email protected]> Mon, 19 May 2025 00:59:41 -0400
| Newsgroups | gmane.comp.gnu.m4.general |
|---|---|
| Message-ID | <CAAQmekeirnRL0003Veyn3df5_jcgxjrUruQ3tBi7ub7brGqNzg@mail.gmail.com> |
On Sun, May 18, 2025 at 11:31=E2=80=AFPM Nikolaos Chatzikonstantinou <[email protected]> wrote: > > On Sun, May 18, 2025 at 10:11=E2=80=AFPM Eric Blake <[email protected]> w= rote: > > > > On Sun, May 18, 2025 at 07:52:56AM -0400, Nikolaos Chatzikonstantinou w= rote: > > > > > > > I fixed this with 0225f85. I got argument collection wrong twice, but > > > the second time I was much further from the truth. At the time your > > > example len((1, 2)) threw me off. I didn't realize I was just trimmin= g > > > whitespace too aggressively, and I wrote a bad patch for it that had > > > special treatment of '(' when in argument collection. Your comment > > > example with (( and )) also helped me discover that I had an > > > "off-by-one" error in comment parsing (I had forgotten to include the > > > final delimiter). > > > > There's still an issue with argument collection where you are > > accidentally expanding a $@ that only exists as a result of whatever > > gets substituted into $1 and so on (tested at commit 852a0f): > > > > $ m4 > > define(b,`.$1$2.')dnl > > b($,1) > > .$1. > > b($,@) > > .$@. > > $ m4p > > define(b,`.$1$2.')dnl > > b($,1) > > .$1. > > b($,@) > > .$,@. > > Good catch. The info manual mentions arguments like $10 to mean the > 10th argument will be phased out of GNU m4. Should I still emulate > that or should I keep the single-digit-only expansion? For now I went with multi digit expansions to keep the 1.4.20 behavior. Regards, Nikolaos Chatzikonstantinou