• 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-printable-not-whitespace-p
              • Vl-simple-id-tail-p
              • Vl-simple-id-head-p
              • Vl-lex-system-identifier
              • Vl-read-escaped-identifier
              • Vl-lex-simple-identifier-or-keyword
              • Vl-lex-escaped-identifier
              • Vl-printable-not-whitespace-list-p
              • Vl-simple-id-tail-list-p
              • Vl-simple-id-head-list-p
              • Vl-read-simple-identifier
                • Vl-read-simple-identifier-prefix/remainder-thms
            • 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
          • 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
  • Lex-identifiers

Vl-read-simple-identifier

Try to match a simple identifier (or any keyword!).

Signature
(vl-read-simple-identifier echars) → (mv prefix remainder)
Arguments
echars — Guard (vl-echarlist-p echars).

Definitions and Theorems

Function: vl-read-simple-identifier

(defun vl-read-simple-identifier (echars)
  (declare (xargs :guard (vl-echarlist-p echars)))
  (let ((__function__ 'vl-read-simple-identifier))
    (declare (ignorable __function__))
    (if (or (not (consp echars))
            (not (vl-simple-id-head-echar-p (car echars))))
        (mv nil echars)
      (vl-read-while-simple-id-tail echars))))

Theorem: vl-read-simple-identifier-when-vl-simple-id-head-p

(defthm vl-read-simple-identifier-when-vl-simple-id-head-p
  (b* (((mv prefix ?remainder)
        (vl-read-simple-identifier echars)))
    (implies (vl-simple-id-head-p (vl-echar->char (first echars)))
             prefix)))

Subtopics

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