• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
            • Lex-strings
            • Lex-identifiers
            • Vl-typo-uppercase-p
            • Vl-typo-number-p
            • Vl-typo-lowercase-p
            • Lex-numbers
            • Chartypes
            • Vl-lex
            • Defchar
            • Tokens
            • Lex-keywords
            • Lexstate
            • Make-test-tokens
            • Lexer-utils
              • Def-prefix/remainder-thms
              • Def-token/remainder-thms
              • Vl-read-until-literal
              • Vl-read-through-literal
              • Vl-matches-string-p
              • Vl-read-literal
              • Vl-echarlist-kill-underscores
              • Vl-read-some-literal
                • Vl-read-some-literal-prefix/remainder-thms
            • Lex-comments
            • Vl-typo-uppercase-list-p
            • Vl-typo-lowercase-list-p
            • Vl-typo-number-list-p
          • Parser
          • 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
  • Lexer-utils

Vl-read-some-literal

Match one of many exact literal strings.

Signature
(vl-read-some-literal strings echars) → (mv prefix remainder)
Arguments
strings — The strings to search for, in priority order.
    Guard (string-listp strings).
echars — The characters we're lexing.
    Guard (vl-echarlist-p echars).
Returns
prefix — nil on failure, or the matching prefix of echars on success.

Definitions and Theorems

Function: vl-read-some-literal

(defun vl-read-some-literal (strings echars)
  (declare (xargs :guard (and (string-listp strings)
                              (vl-echarlist-p echars))))
  (declare (xargs :guard (not (member-equal "" strings))))
  (let ((__function__ 'vl-read-some-literal))
    (declare (ignorable __function__))
    (b* (((when (atom strings)) (mv nil echars))
         ((mv prefix remainder)
          (vl-read-literal (car strings) echars))
         ((when prefix) (mv prefix remainder)))
      (vl-read-some-literal (cdr strings)
                            echars))))

Subtopics

Vl-read-some-literal-prefix/remainder-thms
Prefix and remainder theorems for vl-read-some-literal, automatically generated by def-prefix/remainder-thms.