PhoneSubst.Tioga
"Trans" command file to convert PARC phone list to CNF file for Thrush/Finch
Last Edited by: Swinehart, October 1, 1986 10:25:36 am PDT
Regularize Intelnet numbers
-d 8'*{\b}
Eliminate "temp" designations
-d {\b'*}['011]
-d {'*}['011]
Eliminate distinction among "<", "[<", and "[" as mail name designators.
('['<|'[) '<
Distinguish above by trailing syntax: " >]" => "#>", ">" => "#>", "]" => "\>".
('>']|'>) '#'>
(']) '\'>
Insert temporary punctuation, eliminate trailing white space
<desig:\a>\b<name:#*>['011]<num:#+>['040'011]*\n |<desig>{<name>}<num>\n
For external locations, copy phone number from trailing position to extension position
'|\w<stuff:'{#*'}><num:#*>\n '|<num><stuff>\n
Get rid of Phone number or location information following name.
-d '}{[~'015]++}\n
Deal with these forms of RName designations:
{<deKleer#>, Johan} => [deKleer#] deKleer, Johan}
( # or \ may appear in spot indicated by # above)
'{'<<last:['a..'z]#*><desig:#>'><rest:#*>'} [<last><desig>]<last><rest>}
{<JoeMcFee#>, Joe} => [JoeMcFee#]McFee, Joe}
'{'<<pref:[~'M]**>Mc<last:#*><desig:#>'><rest:#*>'} [<pref>Mc<last><desig>]Mc<last><rest>}
{<AnnBDerrick#>, Ann} => [AnnBDerrick#]Derrick, Ann} (but watch out for McX)
Includes as a subset {<Terry#>, Doug} => [Terry#]Terry, Doug}
'{'<<pref:#*><last:['A..'Z][~'A..'Z]++><desig:#>'><rest:#*>'} [<pref><last><desig>]<last><rest>}
{Anderson, <Lee#>} => [Lee#]Anderson, Lee}
'{<last:[~'}]*>',\b'<<first:#*><desig:#>'><rest:#*>'} [<first><desig>]<last>,\s<first><rest>}
{Zellweger, Polle <PolleZ#>} => [PolleZ#]Zellweger, Polle}
'{<name:[~'}]*>'<<rname:#*><desig:#>'><rest:#*>'} [<rname><desig>]<name><rest>}
{Abraham, Margaret} => [MAbraham.xpa]Abraham, Margaret}
'{<last:[~'}]*>',\b<finit:#><first:#*>'} [<finit><last>.xpa]<last>,\s<finit><first>}
Add the proper registries
'# .pa
'\ .parc
Convert all telephone numbers to standard Intelnet or DDD form.
nxn-xxx-xxxx => 8*(nxn)xxx-xxxx
'|<num:[0..9]!3-[0..9]!3-[0..9]!4'[> !8'*<num>
496-6xxx => 8*922-6xxx
'|496-6<num:[0..9]!3'[> !8'*922-6<num>
xxx-xxxx => 9(415)xxx-xxxx
'|<num:[0..9]!3-[0..9]!4'[> !9(415)<num>
xxxx => 8*923-xxxx
'|<num:[0..9]!4'[> !8'*923-<num>
Convert to CNF form.
('||'!)<num:#*>'[<rname:#*>']<name:#*>'}\n Rname:\s<rname>\nName:\s<name>\nOffice\sNumber:\s<num>\n\n