CrankIO.mesa
Copyright Ó 1987, 1991 by Xerox Corporation. All rights reserved.
Michael Plass, May 6, 1987 0:40:47 am PDT
DIRECTORY
CrankTypes USING [Attributes, Tree],
IO USING [STREAM],
MPTree USING [AttrId, Link, NodeName],
Rope USING [ROPE],
UnparserBuffer USING [BreakCondition];
Input processing
ParseRope:
PROC [rope:
ROPE]
RETURNS [MPTree.Link];
Parses a ROPE as a cedar/mesa module
ParseFile:
PROC [fileName:
ROPE]
RETURNS [MPTree.Link];
Parses a file as a cedar/mesa module
DecodeAttr:
PROC [name: MPTree.NodeName, attrBits:
PACKED
ARRAY MPTree.AttrId
OF
BOOL]
RETURNS [CrankTypes.Attributes];
Turns the attr bits into a more self-explanatory structure.
AddAttributeNodes:
PROC [tree: CrankTypes.Tree]
RETURNS [CrankTypes.Tree];
Adds instances of CrankTypes.AttributedNode to the structure, but doesn't do any non-trivial analysis. A few easily-deriviable attributes are filled in.
Output
MakeOutputName:
PROC [inputName:
ROPE, ext:
ROPE]
RETURNS [
ROPE];
RopeFromTree:
PROC [tree: CrankTypes.Tree]
RETURNS [
ROPE];
RopeFromNodeName:
PROC [nodeName: MPTree.NodeName]
RETURNS [
ROPE];
WriteTree:
PROC [tree: CrankTypes.Tree, fileName:
ROPE, sourceName:
ROPE ¬
NIL, skipAttributes:
LIST
OF
ATOM ¬
NIL]
RETURNS [fullFName:
ROPE];
WriteSTree:
PROC [tree: CrankTypes.Tree, fileName:
ROPE, breakCondition: UnparserBuffer.BreakCondition ¬ united, sourceName:
ROPE ¬
NIL, skipAttributes:
LIST
OF
ATOM ¬
NIL]
RETURNS [fullFName:
ROPE];
PutTree:
PROC [stream:
IO.
STREAM, tree: CrankTypes.Tree, structure:
BOOL ¬
FALSE, breakCondition: UnparserBuffer.BreakCondition ¬ united, sourceFrom:
ROPE ¬
NIL, skipAttributes:
LIST
OF
ATOM ¬
NIL];