On Mon, May 19, 2025 at 4:14 AM Nikolaos Chatzikonstantinou
<nchatz...@gmail.com> wrote:
>
> On Mon, May 19, 2025 at 12:59 AM Nikolaos Chatzikonstantinou
> <nchatz...@gmail.com> wrote:
> >
> > On Sun, May 18, 2025 at 11:31 PM Nikolaos Chatzikonstantinou
> > <nchatz...@gmail.com> wrote:
> > >
> > > On Sun, May 18, 2025 at 10:11 PM Eric Blake <ebl...@redhat.com> wrote:
> > > >
> > > > On Sun, May 18, 2025 at 07:52:56AM -0400, Nikolaos Chatzikonstantinou 
> > > > wrote:
> > > > > >
> > > > > 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 trimming
> > > > > 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.
>
> I also implemented --freeze-state and --reload-state just now. The
> produced files are not compatible with GNU m4's frozen files, but I
> don't think that's an issue, right? I need to implement a better test
> suite so that I can include tests that include all sorts of
> command-line options, so that's going to be the next goal.

If you want to try this, you'll have to `pip install -e .[tests]` once
more to install the dependencies. I used some more packages to
serialize the Parser.

Regards,
Nikolaos Chatzikonstantinou

Reply via email to