• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
            • Parse-expressions
            • Parse-udps
            • Parse-statements
            • Parse-property
            • Vl-genelements
            • Parse-paramdecls
            • Parse-blockitems
            • Parse-utils
              • Defparser
              • Vl-endinfo-p
              • Vl-match-token
              • Vl-match-some-token
              • Vl-match-any-except
              • Vl-parse-error
              • Vl-match
              • Vl-type-of-matched-token
              • Vl-tokstream-backup-p
              • Vl-maybe-match-token
              • Vl-parse-warning
              • Vl-match-any
              • Vl-linestart-indent
              • Vl-current-loc
              • Vl-choose-parse-error
              • Vl-parse-endblock-name
              • Vl-tokenlist-fix
              • Vl-lookahead-is-some-token?
              • Vl-tokstream-fix
              • Vl-is-token?
              • Vl-is-some-token?
              • Vl-add-context-to-parser-warning
              • Vl-lookahead-is-token?
              • Vl-tokstream-save
              • Vl-tokstream->tokens
              • Vl-tokstream-restore
                • Vl-tokstream-add-warning
                • Vl-tokstream->pstate
                • Vl-tokstream->position
                • Expand-defparsers
                • Vl-tokstream-pop
                • *vl-default-token*
              • Parse-insts
              • Parse-functions
              • Parse-assignments
              • Parse-clocking
              • Parse-strengths
              • Vl-parse-genvar-declaration
              • Vl-parse
              • Parse-netdecls
              • Parse-asserts
              • Vl-maybe-parse-lifetime
              • Parse-dpi-import-export
              • Parse-ports
              • Parse-timeunits
              • Seq
              • Parse-packages
              • Parse-eventctrl
            • Vl-load-merge-descriptions
            • Vl-find-basename/extension
            • Vl-load-file
            • Vl-loadresult
            • Scope-of-defines
            • Vl-find-file
            • Vl-flush-out-descriptions
            • Vl-description
            • Vl-read-file
            • Vl-includeskips-report-gather
            • Vl-load-main
            • Extended-characters
            • Vl-load
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-preprocess-debug
            • Vl-write-preprocessor-debug-file
            • Vl-read-file-report-gather
            • Vl-load-descriptions
            • Vl-load-files
            • Translate-off
            • Vl-load-read-file-hook
            • Vl-read-file-report
            • Vl-loadstate-pad
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-loadstate->warnings
            • Vl-iskips-report
            • Vl-descriptionlist
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Parse-utils

    Vl-tokstream-restore

    Signature
    (vl-tokstream-restore backup &key (tokstream 'tokstream)) 
      → 
    tokstream
    Arguments
    backup — Guard (vl-tokstream-backup-p backup).

    Definitions and Theorems

    Function: vl-tokstream-restore-fn

    (defun vl-tokstream-restore-fn (backup tokstream)
      (declare (xargs :stobjs (tokstream)))
      (declare (xargs :guard (vl-tokstream-backup-p backup)))
      (let ((__function__ 'vl-tokstream-restore))
        (declare (ignorable __function__))
        (b* (((vl-tokstream-backup backup))
             (tokstream (vl-tokstream-update-pstate backup.pstate))
             (tokstream (vl-tokstream-update-position backup.position))
             (tokstream (vl-tokstream-update-tokens backup.tokens)))
          (vl-tokstream-fix))))

    Theorem: vl-tokstream-restore-of-vl-tokstream-save

    (defthm vl-tokstream-restore-of-vl-tokstream-save
      (equal (vl-tokstream-restore (vl-tokstream-save)
                                   :tokstream anything)
             (vl-tokstream-fix)))