• 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
                • Preprocessor-states
                  • Ppstate
                  • Plexeme
                    • Plexeme-fix
                    • Plexemep
                    • Plexeme-case
                    • Plexeme-equiv
                    • Plexeme-kind
                    • Plexeme-string
                    • Plexeme-spaces
                    • Plexeme-punctuator
                    • Plexeme-other
                    • Plexeme-number
                    • Plexeme-newline
                    • Plexeme-line-comment
                    • Plexeme-ident
                    • Plexeme-header
                    • Plexeme-char
                    • Plexeme-block-comment
                    • Plexeme-vertical-tab
                    • Plexeme-horizontal-tab
                    • Plexeme-form-feed
                  • Pnumber
                  • Macro-info
                  • Macro-add
                  • Init-ppstate
                  • Plexeme-token/newline-p
                  • Newline
                  • Plexeme-option
                  • Macro-info-option
                  • Macro-table
                  • Plexeme+span
                  • Update-ppstate->lexemes-unread
                  • Update-ppstate->lexemes-read
                  • Update-ppstate->lexemes-length
                  • Update-ppstate->chars-unread
                  • Update-ppstate->chars-read
                  • Update-ppstate->version
                  • Update-ppstate->position
                  • Update-ppstate->macros
                  • Update-ppstate->chars-length
                  • Macro-lookup
                  • Update-ppstate->bytes
                  • Update-ppstate->size
                  • Plexeme-token/space-p
                  • Plexeme-tokenp
                  • Ppstate->gcc
                  • Plexeme-list-token/space-p
                  • Ppstate->size
                  • Ppstate->lexemes-unread
                  • Ppstate->lexemes-read
                  • Ppstate->lexemes-length
                  • Ppstate->chars-unread
                  • Ppstate->bytes
                  • Plexeme-list-token/newline-p
                  • Plexeme-list-not-token/newline-p
                  • Ident-macroinfo-alist
                  • Update-ppstate->lexeme
                  • Update-ppstate->char
                  • Ppstate->version
                  • Ppstate->macros
                  • Ppstate->chars-read
                  • Ppstate->chars-length
                  • Plexeme-list-tokenp
                  • Plexeme-list-not-tokenp
                  • Macro-table-init
                  • Ppstate->lexeme
                  • Ppstate->char
                  • Ppstate-fix
                  • Plexeme+span-list
                  • Plexeme-list
                  • Irr-pnumber
                  • Irr-plexeme
                  • Irr-macro-table
                  • Ppstate->position
                • Pread-token/newline
                • Pread-token
                • Preprocessor-lexer
                • Pproc-files
                • Preprocessor-printer
                • Pproc-file
                • Filepath-plexeme-list-alist-to-filepath-filedata-map
                • Filepath-plexeme-list-alist
                • 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-states

Plexeme

Fixtype of preprocessing lexems.

This is a tagged union type, introduced by fty::deftagsum.

Member Tags → Types
:header → plexeme-header
:ident → plexeme-ident
:number → plexeme-number
:char → plexeme-char
:string → plexeme-string
:punctuator → plexeme-punctuator
:other → plexeme-other
:block-comment → plexeme-block-comment
:line-comment → plexeme-line-comment
:newline → plexeme-newline
:spaces → plexeme-spaces
:horizontal-tab → plexeme-horizontal-tab
:vertical-tab → plexeme-vertical-tab
:form-feed → plexeme-form-feed

This consists of preprocessing tokens [C17:6.4] [C17:A.1.1], with the addition of comments and white space.

We reuse some of the fixtypes for ASTs here.

The :other case corresponds to the last alternative in the ABNF grammar rule for preprocessing-token, as well as the prose description of the rule in [C17]. It consists of the code of the character.

For (block and line) comments, we include the content, consisting of the codes of the characters. For block comments, these are all the characters from just after the opening /* to just before the closing */. For line comments, these are all the characters from just after the opening // to just before the closing new-line.

We keep the information about the three possible kinds of new-line, and of all other white space characters, according to the ABNF grammar rule for white-space. Since spaces (code 32) often occur in consecutive chunks, we represent them more efficiently as chunks, via positive counts.

Subtopics

Plexeme-fix
Fixing function for plexeme structures.
Plexemep
Recognizer for plexeme structures.
Plexeme-case
Case macro for the different kinds of plexeme structures.
Plexeme-equiv
Basic equivalence relation for plexeme structures.
Plexeme-kind
Get the kind (tag) of a plexeme structure.
Plexeme-string
Plexeme-spaces
Plexeme-punctuator
Plexeme-other
Plexeme-number
Plexeme-newline
Plexeme-line-comment
Plexeme-ident
Plexeme-header
Plexeme-char
Plexeme-block-comment
Plexeme-vertical-tab
Plexeme-horizontal-tab
Plexeme-form-feed