Re: Understanding regxp implementation

2007-03-22 Thread Asiri Rathnayake
Nikolai, As you might know, the reg_comp() method is called twice when compiling a r.e; first to determine the size of the compiled expression and then to actually compile it. I was thinking if this can be used to our advantage, while on the first pass, we look for occurrences of special

Re: Understanding regxp implementation

2007-03-22 Thread Nikolai Weibull
On 3/22/07, Asiri Rathnayake [EMAIL PROTECTED] wrote: As you might know, the reg_comp() method is called twice when compiling a r.e; first to determine the size of the compiled expression and then to actually compile it. I was thinking if this can be used to our advantage, while on the first

Re: Understanding regxp implementation

2007-03-22 Thread Asiri Rathnayake
On Thu, 2007-03-22 at 09:26 +0100, Nikolai Weibull wrote: On 3/22/07, Asiri Rathnayake [EMAIL PROTECTED] wrote: As you might know, the reg_comp() method is called twice when compiling a r.e; first to determine the size of the compiled expression and then to actually compile it. I was

Re: Understanding regxp implementation

2007-03-22 Thread Bram Moolenaar
Nikolai Weibull wrote: On 3/22/07, Asiri Rathnayake [EMAIL PROTECTED] wrote: As you might know, the reg_comp() method is called twice when compiling a r.e; first to determine the size of the compiled expression and then to actually compile it. I was thinking if this can be used to our

Re: Understanding regxp implementation

2007-03-22 Thread Asiri Rathnayake
On Thu, 2007-03-22 at 22:21 +0100, Bram Moolenaar wrote: Adding a third matcher won't happen soon, and is a big change. It's not really needed to prepare for that. The disadvantage of using a function pointer is that in the place where it's used you only see:

Re: Understanding regxp implementation

2007-03-21 Thread Asiri Rathnayake
This mail bounced off for some reason, I'm repeating it. Sorry if you've already got this. - Hi Bram, Nikolai, All, I think the best way to understand current implementation of regxp is to first go through Henry Spencer's original regxp implementation ( thanks nikolai ). It's

Re: Understanding regxp implementation

2007-03-20 Thread Asiri Rathnayake
Hi Bram,Nikolai, I went through the regxp code and have a few questions... First, Why use this kind of a coding scheme and encode patterns rather than using a state diagram ? ( Performance/Memory ? ). Secondly, is it a requirement that the new implementation has to follow the same method ? I

Re: Understanding regxp implementation

2007-03-19 Thread Asiri Rathnayake
On Mon, 2007-03-19 at 11:55 +0100, Nikolai Weibull wrote: On 3/19/07, Asiri Rathnayake [EMAIL PROTECTED] wrote: Hi Bram, Nicolai, A 'k' would be greatly appreciated. I'm really really sorry, won't happen again... I'm unable to grasp the description ( attachment ) given in the regxp.c

Re: Understanding regxp implementation

2007-03-19 Thread Nikolai Weibull
On 1/1/07, Asiri Rathnayake [EMAIL PROTECTED] wrote: On Mon, 2007-03-19 at 11:55 +0100, Nikolai Weibull wrote: On 3/19/07, Asiri Rathnayake [EMAIL PROTECTED] wrote: Hi Bram, Nicolai, A 'k' would be greatly appreciated. I'm really really sorry, won't happen again... Hehe, don't take it

Re: Understanding regxp implementation

2007-03-19 Thread Martin Stubenschrott
On Mon, Mar 19, 2007 at 01:49:53PM +0100, Nikolai Weibull wrote: On 1/1/07, Asiri Rathnayake [EMAIL PROTECTED] wrote: On Mon, 2007-03-19 at 11:55 +0100, Nikolai Weibull wrote: On 3/19/07, Asiri Rathnayake [EMAIL PROTECTED] wrote: Hi Bram, Nicolai, A 'k' would be greatly appreciated.