Printer component of the preprocessor.
Our preprocessor reads files from specified paths, preprocessed them, and generates a file set with the files after preprocessing; see preprocessor. The preprocessing of the files results in a list of lexemes, which we turn into bytes via this printer.
Since our preprocessing lexemes include whitespace, the printing is relatively easy. We do not need to add whitespace, keep track of indentation, etc. Compare this with the printer.
Our printing functions take as input and return as output a list of bytes, which form the growing result in reverse. The list of bytes is extended by the printing functions via cons (which motivates the reversal of the list). The list of bytes is reversed after it is complete.