Preprocessor-printer
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.
Subtopics
- Pprint-char
- Print a character after preprocessing.
- Pprint-astring
- Print the characters from an ACL2 string after preprocessing.
- Pprint-pnumber
- Print a preprocessing number after preprocessing.
- Pprint-oct-digit-achar
- Print an ACL2 octal digit character after preprocessing.
- Pprint-hex-digit-achar
- Print an ACL2 hexadecimal digit character after preprocessing.
- Pprint-dec-digit-achar
- Print an ACL2 decimal digit character after preprocessing.
- Pprint-simple-escape
- Print a simple escape after preprocessing.
- Pprint-lexeme
- Print a lexeme after preprocessing.
- Pprint-chars
- Print zero or more characters after preprocessing.
- Plexemes-to-bytes
- Turn a list of preprocessor lexemes into a list of bytes.
- Pprint-univ-char-name
- Print a universal character name after preprocessing.
- Pprint-s-char-list
- Print a list of characters and escape sequences
usable in string literals,
after preprocessing.
- Pprint-s-char
- Print a character or escape sequence usable in string literals,
after preprocessing.
- Pprint-q-char-list
- Print a list of characters
usable in header names between double quotes,
after preprocessing.
- Pprint-q-char
- Print a character usable in header names between double quotes
after preprocessing.
- Pprint-other
- Print a character that does not fit any lexeme after preprocessing.
- Pprint-oct-escape
- Print an octal escape after preprocessing.
- Pprint-hex-digit-achars
- Print zero or more ACL2 hexadecimal digit characters
after preprocessing.
- Pprint-header-name
- Print a header name after preprocessing.
- Pprint-h-char-list
- Print a list of characters
usable in header names between angle brackets,
after preprocessing.
- Pprint-h-char
- Print a character usable in header names between angle brackets
after preprocessing.
- Pprint-c-char-list
- Print a list of characters and escape sequences
usable in character constants,
after preprocessing.
- Pprint-c-char
- Print a character or escape sequence usable in character constants,
after preprocessing.
- Pprint-block-comment
- Print a block comment after preprocessing.
- Pprint-stringlit
- Print a string literal after preprocessing.
- Pprint-punctuator
- Print a punctuator after preprocessing.
- Pprint-line-comment
- Print a line comment after preprocessing.
- Pprint-lexeme-list
- Print a list of lexemes after preprocessing.
- Pprint-ident
- Print an identifier after preprocessing.
- Pprint-hex-quad
- Print a quadruple of hexadecimal digits after preprocessing.
- Pprint-cconst
- Print a character constant after preprocessing.
- Pprint-newline
- Print a newline after preprocessing.
- Pprint-escape
- Print an escape sequence.
- Pprint-eprefix
- Print an encoding prefix after preprocessing.
- Pprint-cprefix
- Print a character constant prefix after preprocessing.
- Pprint-spaces
- Print one or more spaces after preprocessing.
- Pprint-sign
- Print a sign after preprocessing.
- Pprint-vertical-tab
- Print a vertical tab after preprocessing.
- Pprint-horizontal-tab
- Print a horizontal tab after preprocessing.
- Pprint-form-feed
- Print a form feed after preprocessing.