• 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
            • 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
            • 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
    • 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)