• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • 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
              • Vl-lexstate-p
              • Vl-plaintoken-alistp
              • *vl-2012-strict-lexstate*
              • Vl-lexstate->plainalist
              • Vl-lexstate-init
                • *vl-2005-strict-lexstate*
                • *vl-2012-lexstate*
                • *vl-2005-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
    • Lexstate

    Vl-lexstate-init

    User-level constructor for internal lexer states.

    Signature
    (vl-lexstate-init config) → st
    Arguments
    config — Guard (vl-loadconfig-p config).
    Returns
    st — Type (vl-lexstate-p st).

    Definitions and Theorems

    Function: vl-lexstate-init

    (defun vl-lexstate-init (config)
     (declare (xargs :guard (vl-loadconfig-p config)))
     (let ((__function__ 'vl-lexstate-init))
      (declare (ignorable __function__))
      (b* (((vl-loadconfig config) config))
       (case config.edition
             (:verilog-2005 (if config.strictp *vl-2005-strict-lexstate*
                              *vl-2005-lexstate*))
             (:system-verilog-2012
                  (if config.strictp *vl-2012-strict-lexstate*
                    *vl-2012-lexstate*))
             (otherwise (progn$ (impossible)
                                *vl-2012-lexstate*))))))

    Theorem: vl-lexstate-p-of-vl-lexstate-init

    (defthm vl-lexstate-p-of-vl-lexstate-init
      (b* ((st (vl-lexstate-init config)))
        (vl-lexstate-p st))
      :rule-classes :rewrite)