• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
            • Parse-insts
            • Parse-functions
              • Vl-make-hidden-variables-for-portdecls
              • Vl-parse-function-declaration-2005
              • Vl-parse-task-declaration-2005
              • Vl-parse-task-item-declaration-noatts
              • Vl-parse-taskport-declaration
              • Parse-functions-sv2012
              • Vl-parse-taskport-list
              • Vl-make-fundecl-for-parser
              • Vl-make-taskdecl-for-parser
              • Vl-parse-0+-task-item-declarations
              • Vl-parse-optional-function-range-or-type
              • Vl-parse-task-item-declaration
              • Vl-skip-through-endfunction
              • Vl-skip-through-endtask
                • Vl-make-hidden-variable-for-portdecl
                • Vl-filter-portdecl-or-blockitem-list
                • Vl-build-taskports
                • Vl-portdecllist-find-noninput
              • 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-functions

    Vl-skip-through-endtask

    Barbaric fault tolerance routine. Find endtask so we can try to resume parsing after a problematic function.

    Signature
    (vl-skip-through-endtask &key (tokstream 'tokstream) 
                             (config 'config)) 
     
      → 
    (mv errmsg? value new-tokstream)
    Arguments
    config — Guard (vl-loadconfig-p config).

    Definitions and Theorems

    Function: vl-skip-through-endtask-fn

    (defun vl-skip-through-endtask-fn (tokstream config)
      (declare (xargs :stobjs (tokstream)))
      (declare (xargs :guard (vl-loadconfig-p config)))
      (declare (ignorable config))
      (let ((__function__ 'vl-skip-through-endtask))
        (declare (ignorable __function__))
        (seq tokstream
             (when (vl-is-token? :vl-kwd-endtask)
                   (end := (vl-match))
                   (return end))
             (:s= (vl-match-any))
             (end := (vl-skip-through-endtask))
             (return end))))

    Theorem: vl-skip-through-endtask-fails-gracefully

    (defthm vl-skip-through-endtask-fails-gracefully
      (implies (mv-nth 0 (vl-skip-through-endtask))
               (not (mv-nth 1 (vl-skip-through-endtask)))))

    Theorem: vl-warning-p-of-vl-skip-through-endtask

    (defthm vl-warning-p-of-vl-skip-through-endtask
      (iff (vl-warning-p (mv-nth 0 (vl-skip-through-endtask)))
           (mv-nth 0 (vl-skip-through-endtask))))

    Theorem: vl-skip-through-endtask-result

    (defthm vl-skip-through-endtask-result
      (implies (and t)
               (equal (vl-token-p (mv-nth 1 (vl-skip-through-endtask)))
                      (not (mv-nth 0 (vl-skip-through-endtask))))))

    Theorem: vl-skip-through-endtask-count-strong

    (defthm vl-skip-through-endtask-count-strong
     (and
       (<= (vl-tokstream-measure
                :tokstream (mv-nth 2 (vl-skip-through-endtask)))
           (vl-tokstream-measure))
       (implies (not (mv-nth 0 (vl-skip-through-endtask)))
                (< (vl-tokstream-measure
                        :tokstream (mv-nth 2 (vl-skip-through-endtask)))
                   (vl-tokstream-measure))))
     :rule-classes ((:rewrite) (:linear)))