fP and regex

Brian K. White brian at aljex.com
Thu Oct 4 09:51:04 PDT 2007


----- Original Message ----- 
From: "Fairlight" <fairlite at fairlite.com>
To: "filePro Mailing List" <filepro-list at lists.celestial.com>
Sent: Tuesday, October 02, 2007 3:53 PM
Subject: fP and regex


> Hola,
>
> I have been toying with the idea of writing a regular expression module 
> for
> filePro for a few weeks, on and off, spurred by someone's comment to Jose

> Heck, is it worth writing any model of it for fP?  Would anyone here pay
> for the ability to use regex as a processing module?  If so, how much?

I don't know 2 things.

1) I don't know how much it's worth to us (my company). I know it's useful, 
very useful once it a while but how much it would really matter to us I 
can't imagine. I think not much, because I can't think of anything that is 
currently hurting for it's lack. Then again, I'm not a user of our software 
so I could be completely ignorant.

2) How would it be implimented and used? This deals with both useability and 
run-time efficiency.
A call table? Pretty inconvenient and limiting. Though, maybe not too bad if 
it could be made so that it's easy to copy-in the table and use it as a 
gosub without much hacking, and be able to re-copy-in updated versions of 
the call table later without breaking the little hacking you did have to do.

A user command? Probably the closest thing to really useable from the 
programmers point of view, but comes with a small bag of run-time issues.
A daemon that new socket functions talk to? hmm maybe...
In either case, or the few others I can think of that I don't think are even 
as useable as these, maybe it's a case of when you need it, you need it, and 
whatever you have to work around, you work around.

I think good regex would be extremely (most?) useful in edits.

veering OT

This is a perfect example of why it would be awsome to be able to define 
functions in fp.
gosubs and call tables (even now that they are limitedly nestable) just 
don't cut it for lots of things, neither does waiting forever (litterally) 
for fp to build-in the function you would have written for yourself.

further OT

I wonder how feasible it would be to maybe write a filepro pre-processor as 
a way to get functions that don't exist?

wherever fp lacks a feature, as long as it's physically possible to do in 
processing, however much code it might take or or however unweildly, maybe 
you could just write your process table and in it use your imaginary foo() 
functions, save the table without syntax check or tokenizing, run the table 
through the preprocessor which swaps out the foo() with a gosub or call and 
whatever other necessary code like declaring variables, then it syntax 
checks and tokenizes the result.
Get an external editor configured well enough to do these things 
automatically and it might not be as much hassle as it sounds like. Or maybe 
a wrapper around cabe so you can edit in cabe.

Brian K. White    brian at aljex.com    http://www.myspace.com/KEYofR
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!



More information about the Filepro-list mailing list