DIRECTORY IO USING [STREAM], PFSNames USING [Component, PATH, Version], Rope USING [ROPE]; PFSCanonicalNames: CEDAR DEFINITIONS SHARES PFSNames ~ BEGIN OPEN PFSNames; ROPE: TYPE = Rope.ROPE; UnparseName: PROC[name: PATH] RETURNS [fullFName: ROPE]; UnparseComponent: PROC [component: Component] RETURNS [ROPE]; UnparseVersion: PUBLIC PROC [version: Version] RETURNS [ROPE]; ParseName: PROC [name: ROPE] RETURNS [parsedName: PATH]; ParseComponent: PROC [name: ROPE, first: NAT ฌ 0] RETURNS [component: Component, next: NAT]; ParseVersion: PROC [v: ROPE, first: NAT ฌ 0] RETURNS [version: Version, next: NAT]; ParseNameFromStream: PROC [s: IO.STREAM] RETURNS [name: PATH]; END. l PFSCanonicalNames.mesa Copyright ำ 1991 by Xerox Corporation. All rights reserved. Carl Hauser, August 9, 1988 5:54:24 pm PDT Canonical unparsing: [/]component0/component1/.../componentComponentCount-1[/] The first / is included if name.absolute; the last if name.directory. Canonical unparsing: Rope.Cat[name, Unparse[version]] bug: name unparsing should insert escape characters on /, ! (and, of course, the escape character). Canonical unparsing: NIL, !H, !L, !*, !num as appropriate. Parsing names in canonical form. parses a component beginning at name[first] and returns that component; next = first + length of the parsed component. bug: should interpret escape sequences. parses a version beginning at name[first] and returns that version; next = first + length of the parsed version. A convenient way to read a whitespace-delimited name from a stream. ส๑–(cedarcode) style•NewlineDelimiter ™šœ™Jšœ ฯeœ1™™K™%———K™š Ÿ œžœžœžœžœ˜8K™ K™š Ÿœžœžœ žœžœžœ˜\K™vK™'—K˜š Ÿ œžœžœ žœžœžœ˜SK™p——K˜š Ÿœžœž œžœžœ˜>K™E——K˜Kšžœ˜—…—ฎ