CBMC
Loading...
Searching...
No Matches
smt2_tokenizert::tokent Class Reference

One SMT-LIB v2.6 token. More...

#include <smt2_tokenizer.h>

+ Collaboration diagram for smt2_tokenizert::tokent:

Public Member Functions

 tokent ()=default
 
 tokent (token_kindt _kind)
 
 operator token_kindt () const
 Implicit conversion to the kind so the parser can keep using switch(token) and token == OPEN patterns directly.
 

Public Attributes

token_kindt kind = NONE
 The kind of token; see token_kindt.
 
std::string text
 The source text of the token (excluding any delimiters): the symbol name for SYMBOL/KEYWORD, the digits/#b/#x representation for NUMERAL, the unescaped contents of a STRING_LITERAL, empty for OPEN/CLOSE/END_OF_FILE.
 
unsigned line_no = 0
 The source line number on which the token ends.
 
bool quoted_symbol = false
 True iff kind == SYMBOL and the symbol was given in |...| quoted form; always false for other token kinds.
 

Detailed Description

One SMT-LIB v2.6 token.

Pure value class: it carries the token kind, the source text, the line number on which the token ends, and – for SYMBOL only – whether the symbol was supplied in |...| quoted form. It does not hold any tokenizer state.

Definition at line 90 of file smt2_tokenizer.h.

Constructor & Destructor Documentation

◆ tokent() [1/2]

smt2_tokenizert::tokent::tokent ( )
default

◆ tokent() [2/2]

smt2_tokenizert::tokent::tokent ( token_kindt  _kind)
inlineexplicit

Definition at line 94 of file smt2_tokenizer.h.

Member Function Documentation

◆ operator token_kindt()

smt2_tokenizert::tokent::operator token_kindt ( ) const
inline

Implicit conversion to the kind so the parser can keep using switch(token) and token == OPEN patterns directly.

Definition at line 113 of file smt2_tokenizer.h.

Member Data Documentation

◆ kind

token_kindt smt2_tokenizert::tokent::kind = NONE

The kind of token; see token_kindt.

Definition at line 99 of file smt2_tokenizer.h.

◆ line_no

unsigned smt2_tokenizert::tokent::line_no = 0

The source line number on which the token ends.

Definition at line 106 of file smt2_tokenizer.h.

◆ quoted_symbol

bool smt2_tokenizert::tokent::quoted_symbol = false

True iff kind == SYMBOL and the symbol was given in |...| quoted form; always false for other token kinds.

Definition at line 109 of file smt2_tokenizer.h.

◆ text

std::string smt2_tokenizert::tokent::text

The source text of the token (excluding any delimiters): the symbol name for SYMBOL/KEYWORD, the digits/#b/#x representation for NUMERAL, the unescaped contents of a STRING_LITERAL, empty for OPEN/CLOSE/END_OF_FILE.

Definition at line 104 of file smt2_tokenizer.h.


The documentation for this class was generated from the following file: