Re: Euphoria Regex suggestions

new topic     » goto parent     » topic index » view thread      » older message » newer message
AndySerpa said...
jimcbrown said...

What sort of changes are you suggesting for find_replace() ?

I'm not (necessarily), but I notice that it was done internally (pcre has no built-in replace function that I know of, so someone must have written one) so if the eu development team would prefer to have (or it would just be better to have) some of this API stuff done internally, I can suggest the functionality, but couldn't be helpful with the code. In other words, I can write Euphoria, but not C. But in general, even if you do put it in internally, as long as the stringnumber function is exposed and key parts of the fullinfo function, it would make possible any API (in Euphoria) that anyone would care to make, whereas now those things just aren't accessible so its impossible. I'll develop these thoughts more fully and provide some examples of what I'm talking about.

The main reason for find_replace() to be C seems to be because the PCRE C interface uses malloc'd memory to pass data back and forth, so it was just easier to manipulate those structures in C code and then stuff it into a sequence at the end.

I'm open to the idea of moving it into Euphoria code (and doing the stuff using allocate() and peek() and poke()) if that expands the pool of people who can work on it. (If you already have your own euphoric implementation of a find_replace()-like function from your own library, that'd be even better.)

AndySerpa said...

(Should I join the dev forum and talk about it there?)

You are quite welcome to.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu