PhoneSubst.Tioga
"Trans" command file to convert PARC phone list to CNF file for Thrush/Finch
Last Edited by: Swinehart, October 19, 1985 2:57:03 pm PDT
Regularize Intelnet numbers
-d 8'*{\b}
Eliminate "temp" designations
-d {\b'*}['011]
-d {'*}['011]
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.pa] deKleer, Johan}
'{'<<last:['a..'z]#*>'><rest:#*>'} [<last>.pa]<last><rest>}
{<JoeMcFee>, Joe} => [JoeMcFee.pa]McFee, Joe}
'{'<<pref:[~'M]**>Mc<last:#*>'><rest:#*>'} [<pref>Mc<last>.pa]Mc<last><rest>}
{<AnnBDerrick>, Ann} => [AnnBDerrick.pa]Derrick, Ann} (but watch out for McX)
Includes as a subset {<Terry>, Doug} => [Terry.pa]Terry, Doug}
'{'<<pref:#*><last:['A..'Z][~'A..'Z]++>'><rest:#*>'} [<pref><last>.pa]<last><rest>}
{Anderson, <Lee>} => [Lee.pa]Anderson, Lee}
'{<last:[~'}]*>',\b'<<first:#*>'><rest:#*>'} [<first>.pa]<last>,\s<first><rest>}
{Zellweger, Polle <PolleZ>} => [PolleZ.pa]Zellweger, Polle}
'{<name:[~'}]*>'<<rname:#*>'><rest:#*>'} [<rname>.pa]<name><rest>}
{Abraham, Margaret} => [MAbraham.xpa]Abraham, Margaret}
'{<last:[~'}]*>',\b<finit:#><first:#*>'} [<finit><last>.xpa]<last>,\s<finit><first>}
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