PhoneSubst.Tioga
"Trans" command file to convert PARC phone list to CNF file for Thrush/Finch
Last Edited by: Swinehart, February 22, 1985 9:13:05 am PST
Regularize Intelnet numbers
-d 8'*{\b++}
Eliminate "temp" designations
-d [~8]{'*}
Put {xxx} around extension or external location
<desig:\a>\b<rest:[~'015]*\n> '{<desig>'}\s<rest>
For external locations, copy phone number from trailing position to extension position
'{\w'}<stuff:[~'015]*><num:(8'*[0..9]+|[0..9]+)((-[0..9]++)++)>\n '{<num>'}<stuff><num>\n
Get rid of Phone number or location information following name.
-d '{#[~'015]*{\b(8'*)*([0..9]+)(-\a)++}\n
Deal with six forms of RName designations:
{num} <ABDerrick>, Ann => {num} [ABDerrick.pa] Derrick, Ann
{num} <Terry>, Doug => {num} [Terry.pa] Terry, Doug
{num} <deKleer>, Johan => {num} [deKleer.pa] deKleer, Johan
{num} Anderson, <Lee> => {num} [Lee.pa] Anderson, Lee
{num} Zellweger, Polle <PolleZ> => {num} [PolleZ.pa] Zellweger, Polle
{num} Abraham, Margaret => {num} [MAbraham.xpa] Abraham, Margaret
<num:'{[~'}]*'}\b>'<<finits:(['A..'Z]**)><linit:['A..'Z]><lrname:['a..'z]([~'015]*)>'><stuffb:[~'015]*\n> <num>[<finits><linit><lrname>.pa]\s<linit><lrname><stuffb>
<num:'{[~'}]*'}\b>'<<rname:[~'015]*>'><stuffb:[~'015]*\n> <num>[<rname>.pa]\s<rname><stuffb>
<num:'{[~'}]*'}\b><last:[~'[][~'015]*><sp:',\b>'<<rname:[~'015]*>'><rest:[~'015]*\n> <num>[<rname>.pa]\s<last><sp><rname><rest>
<num:'{[~'}]*'}\b><stuffa:[~'015]*>'<<rname:[~'015]*>'><stuffb:[~'015]*\n> <num>[<rname>.pa]\s<stuffa><stuffb>
<num:'{[~'}]*'}\b><last:[~'[][~'015]*><sp:',\b><fi:#><rest:[~'015]*\n> <num>[<fi><last>.xpa]\s<last><sp><fi><rest>
Convert to CNF form.
'{<num:#*>'}\b'[<rname:#*>']\b<name:[~'015]*>\n Rname:\s<rname>\nName:\s<name>\nOffice\sNumber:\s<num>\n\n
Convert all telephone numbers to standard Intelnet or DDD form.
nxn-xxx-xxxx => 8*(nxn)xxx-xxxx
496-6xxx => 8*922-6xxx
xxx-xxxx => 9(415)xxx-xxxx
xxxx => 8*923-xxxx
<attr:Office\bNumber':\b><num:[0..9]!3-[0..9]!3-[0..9]!4\n> <attr>8'*<num>
<attr:Office\bNumber':\b>496-6<num:[0..9]!3\n> <attr>8'*922-6<num>
<attr:Office\bNumber':\b><num:[0..9]!3-[0..9]!4\n> <attr>9(415)<num>
<attr:Office\bNumber':\b><num:[0..9]!4\n> <attr>8'*923-<num>