BEGIN
AppendList:
PUBLIC
PROC [input:
LIST
OF
REF
ANY];
Appends the elements of the given list to the rear end of the keyboard queue, and wakes up any processes that may be waiting on the latter.
Append:
PUBLIC
PROC [item1, item2, item3, item4:
REF
ANY ←
NIL];
Appends the given inputs (if non-NIL) to the rear end of the keyboard queue, and wakes up any processes that may be waiting on the latter.
Pop:
PUBLIC
PROC
RETURNS [item:
REF
ANY];
Removes the next item from the front end of the queue and returns it.
Push:
PUBLIC
PROC [item1, item2, item3, item4:
REF
ANY ←
NIL];
Puts the given inputs (if non-NIL) in front of the queue. Generally used as PutBack after a Pop, or to "fake" tokens that are from the input stream.