Re: Supporting 2u

Bill Allombert <[email protected]> Thu, 12 Sep 2024 19:53:31 +0200
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <ZuMqm6o1PsH3VmY8@seventeen>
On Thu, Sep 12, 2024 at 04:43:28PM +0200, Vincent Lefevre wrote:
> On 2024-09-12 07:17:13 -0700, Ilya Zakharevich wrote:
> > On Mon, Aug 12, 2024 at 12:48:46PM +0200, Vincent Lefevre wrote:
> > > On 2024-08-12 12:04:36 +0200, Ruud H.G. van Tol wrote:
> > > > >    P.S.  IMO, 2u should better be parsed (as expected by the user!).
> > > > 
> > > > Rather not. For example, 2e1 is already syntax, so can't also mean 2*e1.
> > 
> > This does not stop other ambiguous syntaxes — like ++.
> 
> AFAIK, it isn't ambiguous in GP/PARI, where "++" always means
> the increment postfix operator, even with a space:
> 
> ? x+ +
> %1 = x + 1
> 
> (I'm wondering whether this is a bug.)

It is not a bug: all spaces are removed before tokenization.

Cheers,
Bill.