• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
            • Input-files
            • Compilation-database
            • Printer
            • Output-files
            • Abstract-syntax-operations
            • Implementation-environments
            • Abstract-syntax
            • Concrete-syntax
            • Disambiguation
            • Validation
            • Gcc-builtins
            • Preprocessing
              • Preprocessor
                • Pproc
                • Preprocessor-states
                • Preprocessor-printer
                  • Pprint-char
                  • Pprint-astring
                  • Pprint-pnumber
                  • Pprint-oct-digit-achar
                  • Pprint-hex-digit-achar
                  • Pprint-dec-digit-achar
                  • Pprint-simple-escape
                  • Pprint-lexeme
                  • Pprint-chars
                  • Plexemes-to-bytes
                  • Pprint-univ-char-name
                  • Pprint-s-char-list
                  • Pprint-s-char
                  • Pprint-q-char-list
                  • Pprint-q-char
                  • Pprint-other
                  • Pprint-oct-escape
                  • Pprint-hex-digit-achars
                  • Pprint-header-name
                  • Pprint-h-char-list
                  • Pprint-h-char
                  • Pprint-c-char-list
                  • Pprint-c-char
                  • Pprint-block-comment
                  • Pprint-stringlit
                  • Pprint-punctuator
                  • Pprint-line-comment
                  • Pprint-lexeme-list
                  • Pprint-ident
                  • Pprint-hex-quad
                  • Pprint-cconst
                  • Pprint-newline
                  • Pprint-escape
                  • Pprint-eprefix
                  • Pprint-cprefix
                  • Pprint-spaces
                  • Pprint-sign
                  • Pprint-vertical-tab
                  • Pprint-horizontal-tab
                  • Pprint-form-feed
                • Pread-token/newline
                • Pread-token
                • Pproc-files
                • Preprocessor-lexer
                • Pproc-file
                • Pproc-group-part
                • Pproc-*-group-part
                • Pproc-directive
                • *pproc-files-max*
                • String-plexeme-list-alist-to-filepath-filedata-map
                • String-plexeme-list-alist
                • Read-input-file-to-preproc
                • Preprocessor-reader
                • Preprocessor-messages
              • External-preprocessing
            • Parsing
          • Atc
          • Transformation-tools
          • Language
          • Representation
          • Insertion-sort
          • Pack
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
        • Zcash
        • Yul
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Axe
        • Lists-light
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Preprocessor

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.