• 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
              • *vl-2012-keyword-table*
              • *vl-2012-keyword-table-strict*
              • Vl-keyword-lookup
                • Vl-plaintokentype-p-of-vl-keyword-lookup
              • Vl-lex-simple-identifier-or-keyword
              • *vl-2005-keyword-table*
              • *vl-2005-keyword-table-strict*
              • Vl-keyword-table-p
              • *vl-2012-keywords*
              • Vl-full-keyword-table
              • Vl-make-keyword-table
              • *vl-extra-keywords*
              • *vl-2005-keywords*
            • 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
  • Lex-keywords

Vl-keyword-lookup

Determine if a string is a Verilog keyword.

Signature
(vl-keyword-lookup x table) → sym
Arguments
x — An identifier that has just been lexed, which may or may not be a valid Verilog keyword.
    Guard (stringp x).
table — Table of currently acceptable keywords.
    Guard (vl-keyword-table-p table).
Returns
sym — When x is a keyword, the associated :vl-kwd-??? symbol; otherwise nil.

Definitions and Theorems

Function: vl-keyword-lookup$inline

(defun vl-keyword-lookup$inline (x table)
  (declare (xargs :guard (and (stringp x)
                              (vl-keyword-table-p table))))
  (let ((__function__ 'vl-keyword-lookup))
    (declare (ignorable __function__))
    (cdr (hons-get x table))))

Theorem: symbolp-of-vl-keyword-lookup

(defthm symbolp-of-vl-keyword-lookup
  (implies (vl-keyword-table-p table)
           (symbolp (vl-keyword-lookup x table))))

Subtopics

Vl-plaintokentype-p-of-vl-keyword-lookup
Dumb technical lemma showing that we always get a good plaintoken as long as we're using a valid keyword table.