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)).
- breakp — Was this the first token on a line.
Invariant (booleanp breakp).
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.
- Vl-plaintoken->breakp
- Access the breakp field of a vl-plaintoken-p structure.