• 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
              • Vl-inttoken-p
              • Vl-plaintoken-p
                • *vl-plaintoken-fal*
                • *vl-plaintoken-types*
                • Vl-plaintoken
                • Make-vl-plaintoken
                • Change-vl-plaintoken
                • *vl-2012-plain-nonkeywords*
                • Vl-plaintokentype-p
                • *vl-2005-plain-nonkeywords*
                • Make-honsed-vl-plaintoken
                • Honsed-vl-plaintoken
                • Vl-plaintoken->type
                • Vl-plaintoken->etext
              • Vl-token->etext
              • Vl-token->type
              • Vl-token-p
              • Vl-idtoken-p
              • Vl-timetoken-p
              • Vl-stringtoken-p
              • Vl-kill-whitespace-and-comments
              • Vl-tokenlist->etext
              • Vl-extinttoken-p
              • Vl-sysidtoken-p
              • Vl-realtoken-p
              • Vl-tokenlist-p
              • Vl-tokenlist->string-with-spaces
              • Vl-idtoken-list-p
              • Vl-token->loc
              • Vl-plaintokentypelist-p
              • Vl-tokenlistlist-p
              • Vl-token->string
            • Lex-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
  • Tokens

Vl-plaintoken-p

Tokens for whitespace, comments, operators, punctuation, and keywords.

(vl-plaintoken-p x) is a defaggregate of the following fields.

  • type — A keyword symbol that identifies what kind of token this is. There are many valid types for plain tokens, including lex-keywords and other kinds of nonkeyword tokens.
        Invariant (vl-plaintokentype-p type).
  • etext — The actual text that gave rise to this token from the Verilog source code. Having this text is useful for error reporting, e.g., it includes location information.
        Invariant (and (vl-echarlist-p etext) (consp etext) (true-listp etext)).

Source link: vl-plaintoken-p

Our lexer returns "plain tokens" when it encounters whitespace, comments, operators, punctuation, and keywords. We call these tokens plain because they do not have any extended information beyond what kind of token they are and which characters formed them.

Subtle. As an optimization, our plaintokens are tagless aggregates, and the particular ordering of the fields ensures that the type of the plaintoken is simply its car. We exploit this in the executable versions of functions like vl-token->etext.

Subtopics

*vl-plaintoken-fal*
Fast alist for looking up plain token types.
*vl-plaintoken-types*
All valid plain tokens that can arise from any kind of supported source code (Verilog-2005, SystemVerilog-2012, and VL Extensions).
Vl-plaintoken
Raw constructor for vl-plaintoken-p structures.
Make-vl-plaintoken
Constructor macro for vl-plaintoken-p structures.
Change-vl-plaintoken
A copying macro that lets you create new vl-plaintoken-p structures, based on existing structures.
*vl-2012-plain-nonkeywords*
Simple token types other than keywords (e.g., whitespace, comments, operators, and other kinds of separators and punctuation.) for use with SystemVerilog 2012 source code.
Vl-plaintokentype-p
*vl-2005-plain-nonkeywords*
Simple token types other than keywords (e.g., whitespace, comments, operators, and other kinds of separators and punctuation.) for use with Verilog-2005 source code.
Make-honsed-vl-plaintoken
Constructor macro for honsed vl-plaintoken-p structures.
Honsed-vl-plaintoken
Raw constructor for honsed vl-plaintoken-p structures.
Vl-plaintoken->type
Access the type field of a vl-plaintoken-p structure.
Vl-plaintoken->etext
Access the etext field of a vl-plaintoken-p structure.