INTERFACE QGet; (* Fast "Lex"-like procedures that die instead of raising Lex.Error. *) IMPORT Rd, Lex; CONST Blanks = Lex.Blanks; Spaces = SET OF CHAR{' ', '\t'}; PROCEDURE Skip(rd: Rd.T; READONLY cs: SET OF CHAR := Blanks); PROCEDURE Match(rd: Rd.T; t: TEXT); PROCEDURE EOL(rd: Rd.T); (* Equivalent to Skip(rd, Spaces); Match(rd, "\n"). *) PROCEDURE Colon(rd: Rd.T); (* Performs Skip(rd, Spaces); Match(rd, ":"); then skips one space or tab, if present. *) (* The procedures below will skip spaces or tabs (but not newlines, unlike their "Lex" counterparts) before the desired input. The procedures "Int", "Real", and "LongReal" are faster than the ones in FGet, but less accurate. *) PROCEDURE Char(rd: Rd.T): CHAR; PROCEDURE Bool(rd: Rd.T): BOOLEAN; PROCEDURE Int(rd: Rd.T): INTEGER; PROCEDURE Real(rd: Rd.T): REAL; PROCEDURE LongReal(rd: Rd.T): LONGREAL; END QGet.