File ParserInputDefs.mesa
November 7, 1979 11:55 AM
Last Edited by: McCreight, January 25, 1985 5:26:55 pm PST
DIRECTORY Rope;
ParserInputDefs: CEDAR DEFINITIONS =
BEGIN
EOF: CHARACTER = 004C;
Low level routines to handle character I/O from files.
Initialize and clean up routines.
InitInput: PROCEDURE RETURNS [BOOL];
Cleans up
FinishInput: PROCEDURE RETURNS [BOOL];
Save the current input file and switches to input from the file specified. GetChar automatically unstacks. Returns FALSE on error.
InFromFile: PROCEDURE [Rope.ROPE] RETURNS [BOOL];
Returns the next character from the file, advances a pointer so that successive calls give successive characters. Returns EOF if the end of the input file have been reached.
GetChar: PROCEDURE RETURNS [CHARACTER];
Returns the next character from the file without advancing the pointer, providing one character look ahead. Returns EOF if there are no more characters to be had.
Peek: PROCEDURE RETURNS [CHARACTER];
Returns TRUE if...
EndOfFile: PROCEDURE RETURNS [BOOL];
Munches characters from the input file through the first instance of its argument. Returns the last character munched (either its arg or EOF).
Flush: PROCEDURE [CHARACTER] RETURNS [CHARACTER];
Identifies the current input line.
Identify: PROCEDURE;
END.