PhoneSubst.Tioga
"Trans" command file to convert PARC phone list to CNF file for Thrush/Finch
Last Edited by: Swinehart, October 3, 1986 11:16:53 am PDT
Insert temporary punctuation, eliminate trailing white space
<name:#*>['011]<num:#+>\b<domain:[~'011'015]**><rest:#*>\n {<name>}8*<num>[<domain>]\n
Do Name processing: see TransParcPhoneListToCNF
{<deKleer>, Johan} => ~deKleer← deKleer, Johan}
'{'<<last:['a..'z]#*>'><rest:#*>'} ~<last><last><rest>}
{<JoeMcFee>, Joe} => [JoeMcFee]McFee, Joe}
'{'<<pref:[~'M]**>Mc<last:#*>'><rest:#*>'} ~<pref>Mc<last>←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]++>'><rest:#*>'} ~<pref><last><last><rest>}
{Anderson, <Lee>} => ~Lee𡤊nderson, Lee}
'{<last:[~'}]*>',['011..'040]**'<<first:#*>'><rest:#*>'} ~<first><last>,\s<first><rest>}
{Zellweger, Polle <PolleZ>} => ~PolleZ←Zellweger, Polle}
'{<name:[~'}]*>'<<rname:#*>'><rest:#*>'} ~<rname><name><rest>}
{Abraham, Margaret} => ~MAbraham�raham, Margaret}
'{<last:[~'}]*>',['011..'040]**<finit:#><first:#*>'} ~<finit><last><last>,\s<finit><first>}
Fill in two-line names: ~Beeson�son,Bob}8*856-2131[South]<cr>{}8*943-4612[400/SVHQ507] => ~Beeson�son,Bob}8*856-2131—8*943-4612[South]
'~<name:[~'015]*>'}<num:[~'015]*>'[<rol:[~'015]*>\n'{'}<numm:[~'015]*>'[<rolll:#*>\n ~<name>'}<num><numm>'[<rol>\n
Translate domains to registries:
Assoc => assoc
Bay => osbuBayshore
El Seg => elSegundo
North => osbuNorth
South => osbuSouth
SV => sunnyvale
SDD-RX => sdd-rx
DEFAULT => none
'~<rname:[~'015]*>'←<name:[~'015]*>'}<num:[~'015]*>'[Assoc']<rol:[~'015]*>\n ~<rname>.assoc←<name>'}<num>\n
'~<rname:[~'015]*>'←<name:[~'015]*>'}<num:[~'015]*>'[Bay']<rol:[~'015]*>\n ~<rname>.osbuBayshore←<name>'}<num>\n
'~<rname:[~'015]*>'←<name:[~'015]*>'}<num:[~'015]*>'[El('040)Seg']<rol:[~'015]*>\n ~<rname>.elSegundo←<name>'}<num>\n
'~<rname:[~'015]*>'←<name:[~'015]*>'}<num:[~'015]*>'[North']<rol:[~'015]*>\n ~<rname>.osbuNorth←<name>'}<num>\n
'~<rname:[~'015]*>'←<name:[~'015]*>'}<num:[~'015]*>'[South']<rol:[~'015]*>\n ~<rname>.osbuSouth←<name>'}<num>\n
'~<rname:[~'015]*>'←<name:[~'015]*>'}<num:[~'015]*>'[SV']<rol:[~'015]*>\n ~<rname>.sunnyvale←<name>'}<num>\n
'~<rname:[~'015]*>'←<name:[~'015]*>'}<num:[~'015]*>'[SDD-RX']<rol:[~'015]*>\n ~<rname>.sdd-rx←<name>'}<num>\n
'~<rname:[~'015]*>'←<name:[~'015]*>'}<num:[~'015]*>'[<rol:[~'015]*>\n ~<rname>.none←<name>'}<num>\n
Convert to CNF
'~<rname:[~'015]*>'←<name:[~'015]*>'}<num:[~'015]*>\n Rname:\s<rname>\nName:\s<name>\nOffice\sNumber:\s<num>\n\n
Convert two-line entries: 8*856-2131—8*943-4612 => 8*856-2131\nOffice Number: 8*943-4612
Office\bNumber':\b<num:[~'015]*>'—<numm:[~'015]*>\n Office\sNumber:\s<num>\nOffice\sNumber:\s<numm>\n