CreateCommentFilterStream:
PROC [input:
STREAM]
RETURNS [
STREAM];
Creates a input stream s on top of stream such that any comments are filtered out. A comment is a sequence of characters beginning with -- and ending with -- or IO.CR. When s.GetChar[] reads a comment that ends in IO.CR from stream, it returns IO.CR; a comment that ends in -- returns IO.SP. (A comment must produce some character from s so that the comment serves as a separator between tokens.)
The character sequence produced by stream must follow Cedar conventions for string and character literals: "" and ' for quoting strings and characters, and \ as an escape character for certain characters (particularly ") within such literals. For instance, the character sequence "-- a string literal --" does not contain a comment and is passed through unchanged, while the character sequence '\"-- a comment -- " a string literal " does contain a comment and the sub-sequence -- a comment -- is translated into IO.SP.