• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
            • 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-lex-block-comment
              • Vl-lex-oneline-comment
                • Vl-lex-oneline-comment-token/remainder-thms
            • 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-comments

Vl-lex-oneline-comment

Try to match a // ... style comment.

Signature
(vl-lex-oneline-comment echars) → (mv token/nil remainder)
Arguments
echars — Guard (vl-echarlist-p echars).

Definitions and Theorems

Function: vl-lex-oneline-comment

(defun vl-lex-oneline-comment (echars)
  (declare (xargs :guard (vl-echarlist-p echars)))
  (let ((__function__ 'vl-lex-oneline-comment))
    (declare (ignorable __function__))
    (b* (((unless (vl-matches-string-p "//" echars))
          (mv nil echars))
         ((mv & prefix remainder)
          (vl-read-through-literal *nls* (cddr echars)))
         (etext (list* (first echars)
                       (second echars)
                       prefix))
         (token (make-vl-plaintoken :etext etext
                                    :type :vl-comment)))
      (mv token remainder))))

Subtopics

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