Bill Allombert on Sat, 25 Oct 2025 14:25:24 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [EXTERN] Re: Re: Definition of tokens in GP language


On Sat, Oct 25, 2025 at 12:46:41PM +0200, Bill Allombert wrote:
> On Sat, Oct 25, 2025 at 11:37:29AM +0200, Hong-Phuc Bui wrote:
> > Before I try to do something impossible: did someone try to rewrite the lexer in lex?
> 
> Ah ah! Good idea. In fact, I did it already. 
> See gp2c, file src/lang.l
> 
> https://pari.math.u-bordeaux.fr/cgi-bin/cgitweb.cgi?p=gp2c.git;a=blob_plain;f=src/lang.l;hb=HEAD
> 
> but it fails in some corner cases, I need to fix it:
> 
> echo "3!==6"| gp2c
> stdin:1: syntax error, unexpected '='
> Errors found: aborting...

I hopefully fixed it in gp2c GIT tree. The above link should point to the fixed version now.

Cheers,
Bill