• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Mailing-lists
      • Interfacing-tools
        • Io
        • Defttag
        • Sys-call
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
          • Example-lexer
            • Token-p
              • Token
              • Make-token
              • Change-token
                • Make-honsed-token
                • Honsed-token
                • Token->type
                • Token->text
              • Lex-punctuation
              • Lex-id/keyword
              • Lex-string
              • Lex-whitespace
              • Lex-comment
              • Lex1
              • Lex-main
              • Lex*
              • Tokenlist-p
              • Letter-char-p
              • Idtail-char-p
              • Whitespace-char-p
              • Number-char-p
              • Tokentype-p
              • Lex*-exec
              • Newline-string
            • Sin
            • Matching-functions
            • Def-sin-progress
          • Tshell
          • Unsound-eval
          • Hacker
          • ACL2s-interface
          • Startup-banner
          • Command-line
      • Macro-libraries
      • Interfacing-tools
        • Io
        • Defttag
        • Sys-call
        • Save-exec
        • Quicklisp
        • Std/io
        • Oslib
        • Bridge
        • Clex
          • Example-lexer
            • Token-p
              • Token
              • Make-token
              • Change-token
                • Make-honsed-token
                • Honsed-token
                • Token->type
                • Token->text
              • Lex-punctuation
              • Lex-id/keyword
              • Lex-string
              • Lex-whitespace
              • Lex-comment
              • Lex1
              • Lex-main
              • Lex*
              • Tokenlist-p
              • Letter-char-p
              • Idtail-char-p
              • Whitespace-char-p
              • Number-char-p
              • Tokentype-p
              • Lex*-exec
              • Newline-string
            • Sin
            • Matching-functions
            • Def-sin-progress
          • Tshell
          • Unsound-eval
          • Hacker
          • ACL2s-interface
          • Startup-banner
          • Command-line
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Token-p

      Change-token

      A copying macro that lets you create new token-p structures, based on existing structures.

      Syntax:

      (change-token x 
                    [:type <type>] 
                    [:text <text>]) 
      

      This is a sometimes useful alternative to make-token. It constructs a new token-p structure that is a copy of x, except that you can explicitly change some particular fields. Any fields you don't mention just keep their values from x.

      Definition

      This is an ordinary change- macro introduced by defaggregate.

      Macro: change-token

      (defmacro change-token (x &rest args)
        (std::change-aggregate 'token
                               x args
                               '((:type . token->type)
                                 (:text . token->text))
                               'change-token
                               'remake-token))