<> <> <> <<>> <> DIRECTORY Rope USING [ROPE], XNS USING [Address, Host, Net, unknownSocket, Socket]; XNSAddressParsing: CEDAR DEFINITIONS ~ { ROPE: TYPE ~ Rope.ROPE; Address: TYPE ~ XNS.Address; Net: TYPE ~ XNS.Net; Host: TYPE ~ XNS.Host; Socket: TYPE ~ XNS.Socket; <> <> <<>> <<.. or>> <<## >> <> <<>> <<1) Decimal: a sequence of characters in ['0..'9] optionally followed by 'D or 'd. The string may also have '- characters embedded, implying product format. A leading '- is not allowed.>> << >> <<2) Octal: a sequence of characters in ['0..'7] followed by 'B or 'b.>> <<>> <<3) Hex: a sequence of characters in {IN['0..'9], IN['A..'F], IN['a..'f]} beginning with a digit and followed by 'H or 'h. The trailing 'H or 'h is optional if at least one character is in {IN['A..'F], IN['a..'f]}.>> <<>> <> <<>> <<4) The special string "ME" (in upper case), which is equivalent to specifing the Processor ID (XNS Host number) of the host where the code is running.>> <<>> <<5) The special string "*", which is equivalent to specifing the broadcast XNS Host number.>> <<>> <> <<>> <> <<>> <> <<>> <<74B#25200000016#2>> <<25200000016B>> <> <<* >> <<1-000.ME.>> <<131B.*.>> <<#25200000016B#2>> <<>> <> <<>> <<74#2>> <> MyAddress: PROC RETURNS [Address]; <> <> <<>> MyRope: PROC [format: Format _ productSoftware] RETURNS [ROPE]; <> <> AddressFromRope: PROC [rope: ROPE, default: Socket _ XNS.unknownSocket] RETURNS [Address]; <> <> NetFromRope: PROC [rope: ROPE] RETURNS [Net]; HostFromRope: PROC [rope: ROPE] RETURNS [Host]; SocketFromRope: PROC [rope: ROPE] RETURNS [Socket]; <> Format: TYPE ~ { octal, hex, productSoftware }; <> RopeFromAddress: PROC [address: Address, format: Format _ productSoftware] RETURNS [ROPE]; <> <> <<>> RopeFromNet: PROC [net: Net, format: Format _ productSoftware] RETURNS [ROPE]; RopeFromHost: PROC [host: Host, format: Format _ productSoftware] RETURNS [ROPE]; RopeFromSocket: PROC [socket: Socket, format: Format _ productSoftware] RETURNS [ROPE]; <> ErrorCode: TYPE = { syntax, noResponse, errorFromServer, other }; <> Error: ERROR [code: ErrorCode, text: ROPE]; }.