• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Lexer
            • Lex-strings
              • Vl-read-string-aux
              • Vl-read-octal-string-escape
              • Vl-read-string-escape-sequence
              • Vl-read-hex-string-escape
              • Vl-read-string
              • Vl-lex-string
                • Vl-lex-string-token/remainder-thms
            • 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
            • Lex-comments
            • Vl-typo-uppercase-list-p
            • Vl-typo-lowercase-list-p
            • Vl-typo-number-list-p
          • Vl-loadstate
          • Parser
          • Vl-load-merge-descriptions
          • Scope-of-defines
          • Vl-load-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-loadresult
          • Vl-read-file
          • Vl-find-basename/extension
          • Vl-find-file
          • Vl-read-files
          • Extended-characters
          • Vl-load
          • Vl-load-main
          • Vl-load-description
          • Vl-descriptions-left-to-load
          • Inject-warnings
          • Vl-load-descriptions
          • Vl-load-files
          • Vl-load-summary
          • Vl-collect-modules-from-descriptions
          • Vl-descriptionlist
        • Transforms
        • Lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Lex-strings

Vl-lex-string

Lexing of string literals.

Signature
(vl-lex-string echars st) → (mv token/nil remainder)
Arguments
echars — Guard (vl-echarlist-p echars).
st — Guard (vl-lexstate-p st).

Definitions and Theorems

Function: vl-lex-string

(defun vl-lex-string (echars st)
  (declare (xargs :guard (and (vl-echarlist-p echars)
                              (vl-lexstate-p st))))
  (let ((__function__ 'vl-lex-string))
    (declare (ignorable __function__))
    (b* (((unless (and (consp echars)
                       (eql (vl-echar->char (car echars))
                            #\")))
          (mv nil echars))
         ((mv string prefix remainder)
          (vl-read-string echars st))
         ((unless string) (mv nil echars))
         (token (make-vl-stringtoken :etext prefix
                                     :expansion string)))
      (mv token remainder))))

Subtopics

Vl-lex-string-token/remainder-thms
Token and remainder theorems for vl-lex-string, automatically generated by def-token/remainder-thms.