GGParseIn.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last edited by Bier on January 28, 1987 8:25:27 pm PST
Contents: Routines for reading gargoyle data structures from a stream. Stolen from Solidviews Solidmodeler TFI3d.mesa.
Pier, February 16, 1987 6:19:24 pm PST
DIRECTORY
GGBasicTypes, Imager, ImagerColor, ImagerTransformation, IO, Rope;
GGParseIn: CEDAR DEFINITIONS =
BEGIN
BoundBox: TYPE = GGBasicTypes.BoundBox;
Color: TYPE = Imager.Color;
Point: TYPE = GGBasicTypes.Point;
SequenceOfReal: TYPE = GGBasicTypes.SequenceOfReal;
SyntaxError: SIGNAL [position: NAT, wasThere: Rope.ROPE, notThere: Rope.ROPE];
ReadBlank: PROC [f: IO.STREAM];
ReadWhiteSpace: PROC [f: IO.STREAM];
ReadHorizontalBlank: PROC [f: IO.STREAM] RETURNS [good: BOOL];
ReadBlankAndWord: PROC [f: IO.STREAM] RETURNS [word: Rope.ROPE];
ReadBlankAndRope: PROC [f: IO.STREAM, rope: Rope.ROPE];
ReadLine: PROC [f: IO.STREAM] RETURNS [line: Rope.ROPE];
ReadChar: PROC [f: IO.STREAM, c: CHAR];
ReadKeyWord: PROC [f: IO.STREAM] RETURNS [keyWord: Rope.ROPE, good: BOOL];
ReadBlankAndNAT: PROC [f: IO.STREAM] RETURNS [n: NAT];
ReadBlankAndReal: PROC [f: IO.STREAM] RETURNS [r: REAL];
ReadColor: PROC [f: IO.STREAM, version: REAL] RETURNS [color: Color];
ReadStrokeEnd: PROC [f: IO.STREAM] RETURNS [strokeEnd: Imager.StrokeEnd];
ReadPoint: PROC [f: IO.STREAM] RETURNS [point: Point];
ReadTransformation: PROC [f: IO.STREAM] RETURNS [transform: ImagerTransformation.Transformation];
ReadFactoredTransformation: PROC [f: IO.STREAM] RETURNS [transform: ImagerTransformation.Transformation];
ReadFactoredTransformationVEC: PROC [f: IO.STREAM] RETURNS [transform: ImagerTransformation.Transformation];
ReadBox: PROC [f: IO.STREAM] RETURNS [box: BoundBox];
ReadBOOL: PROC [f: IO.STREAM, version: REAL] RETURNS [truth: BOOL, good: BOOL];
ReadListOfRope: PROC [f: IO.STREAM] RETURNS [ropeList: LIST OF Rope.ROPE];
Reads a list of words separated by commas or spaces.
ReadArrayOfReal: PROC [f: IO.STREAM] RETURNS [reals: SequenceOfReal];
Reads a list of REALs enclosed in square brackets, separated by spaces, tabs, commas, or semi-colons. For instance [3.5, 2.6, 1, 4. 3.0 ] returns a list of 5 real numbers.
END.