Unabasheded laziness and the phone edit

Jay R. Ashworth jra at baylink.com
Sat Aug 7 12:08:11 PDT 2004


On Fri, Aug 06, 2004 at 10:58:18AM -0400, Fairlight wrote:
> Broken over two lines for readability

Which leads me off in a different direction.

Why don't people break edits into smaller pieces for both testing and
readability purposes?  Wouldn't it be easier to have edits like:

OPT-OPENP:	[ "(" ]
OPT-CLOSEP:	[ ")" ]
OPT-SEP:	[ " " | "-" | "." ]
FIRST:		"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"

OPT-NPA:	[ OPT-OPENP FIRST N N OPT-CLOSEP ]
NXX:		FIRST N N
XXXX:		N N N N
PHONE-US:	OPT-NPA OPT-SEP NXX OPT-SEP XXXX
PHONE-INTL1:	"+" N OPT-SEP [ { N } ]
PHONE-INTL2:	"+" N N OPT-SEP [ { N } ]
PHONE-INTL3:	"+" N N N OPT-SEP [ { N } ]
PHONE:		PHONE-US | PHONE-INTL1 | PHONE-INTL2 | PHONE-INTL3

Or something reasonably close to that; like John, I didn't actually
test it yet.  :-)

With careful attention to ordering on OR's, and a little tuning, that
would seem to make certain types of changes, not to mention merely
understanding the thing, much easier.  It's been done on other
system-provided global edits (though usually not in quite this way), is
it time to do it to the PHONE and ZIP edits, too?

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

	"You know: I'm a fan of photosynthesis as much as the next guy,
	but if God merely wanted us to smell the flowers, he wouldn't 
	have invented a 3GHz microprocessor and a 3D graphics board."
					-- Luke Girardi


More information about the Filepro-list mailing list