• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
          • 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-echar-p
            • Vl-location
            • Vl-echarlist->chars
            • Vl-echarlist-from-chars
              • Vl-echarlist-from-chars-aux
              • Vl-echarlist-from-str
              • Vl-echarlist-unsigned-value
              • Vl-change-echarlist-locations
              • Vl-echar-digit-value
              • Vl-echarlist->string
            • 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
    • Vl-echarlist-from-chars

    Vl-echarlist-from-chars-aux

    Signature
    (vl-echarlist-from-chars-aux x filename line col nrev) → nrev
    Arguments
    x — Guard (character-listp x).
    filename — Guard (stringp filename).
    line — Guard (posp line).
    col — Guard (natp col).

    Definitions and Theorems

    Function: vl-echarlist-from-chars-aux

    (defun vl-echarlist-from-chars-aux (x filename line col nrev)
      (declare (xargs :stobjs (nrev)))
      (declare (type (integer 0 *) line)
               (type (integer 0 *) col))
      (declare (xargs :guard (and (character-listp x)
                                  (stringp filename)
                                  (posp line)
                                  (natp col))))
      (declare (xargs :split-types t))
      (let ((__function__ 'vl-echarlist-from-chars-aux))
        (declare (ignorable __function__))
        (b* (((when (atom x)) (nrev-fix nrev))
             (echar (make-vl-echar-fast :char (car x)
                                        :filename filename
                                        :line line
                                        :col col))
             (nrev (nrev-push echar nrev))
             ((the character c) (car x))
             (line (if (eql c #\Newline)
                       (the (integer 0 *) (+ 1 line))
                     line))
             (col (if (eql c #\Newline)
                      0
                    (the (integer 0 *) (+ 1 col)))))
          (vl-echarlist-from-chars-aux (cdr x)
                                       filename line col nrev))))