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

Hong-Phuc Bui <[email protected]> Fri, 24 Oct 2025 21:59:38 +0200
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
Hi Bill,

I took a look at the function. It is not really long, but I'm not sure about complexity:
Is it possible to recognize all tokens of GP by using regular express?
Or I have to port this function to python?

Thank you in advance
   Hong-Phuc


On 24/10/2025 14:49, Bill Allombert wrote:
> On Fri, Oct 24, 2025 at 01:59:28PM +0200, Hong-Phuc Bui wrote:
>> Dear Pari developer,
>>
>> I'm writing a Pygments lexer[1] for GP language and I'm searching definitions of Tokens used in GP language.
>> I found some in the file `src/language/parse.y` but not all.
>> Can you tell me where all tokens are defined?
> 
> Hi Hong-Phuc,
> 
> They are defined in the function pari_lex in src/language/anal.c.
> 
> Cheers,
> Bill.

-- 
Hochschule für Technik und Wirtschaft des Saarlandes
University of Applied Sciences

Fakultät für Ingenieurwissenschaften
School of Engineering

Hong-Phuc Bui, M.Sc.
Informatik

Campus Alt-Saarbrücken
Goebenstraße 40
66117 Saarbrücken

+49 (0) 681 58 67 - 804
[email protected]
www.htwsaar.de