CBMC
ctokent Class Reference

#include <ctoken.h>

+ Collaboration diagram for ctokent:

Public Types

using kindt = enum { END_OF_FILE, INT_LIT, CHAR_LIT, FLOAT_LIT, STRING_LIT, C_COMMENT, CPP_COMMENT, IDENTIFIER, OPERATOR, WS, SEPARATOR, PREPROCESSOR_DIRECTIVE, UNKNOWN }
 

Public Member Functions

 ctokent ()=default
 
 ctokent (kindt _kind, std::string _text)
 
void output (std::ostream &) const
 
bool operator== (const char *other_text) const
 
bool operator== (char some_char) const
 
bool operator!= (char some_char) const
 

Public Attributes

kindt kind
 
std::string text
 
std::size_t line_number = 0
 

Detailed Description

Definition at line 18 of file ctoken.h.

Member Typedef Documentation

◆ kindt

using ctokent::kindt = enum { END_OF_FILE, INT_LIT, CHAR_LIT, FLOAT_LIT, STRING_LIT, C_COMMENT, CPP_COMMENT, IDENTIFIER, OPERATOR, WS, SEPARATOR, PREPROCESSOR_DIRECTIVE, UNKNOWN }

Definition at line 21 of file ctoken.h.

Constructor & Destructor Documentation

◆ ctokent() [1/2]

ctokent::ctokent ( )
default

◆ ctokent() [2/2]

ctokent::ctokent ( kindt  _kind,
std::string  _text 
)
inline

Definition at line 46 of file ctoken.h.

Member Function Documentation

◆ operator!=()

bool ctokent::operator!= ( char  some_char) const
inline

Definition at line 62 of file ctoken.h.

◆ operator==() [1/2]

bool ctokent::operator== ( char  some_char) const
inline

Definition at line 57 of file ctoken.h.

◆ operator==() [2/2]

bool ctokent::operator== ( const char *  other_text) const
inline

Definition at line 52 of file ctoken.h.

◆ output()

void ctokent::output ( std::ostream &  out) const

Definition at line 16 of file ctoken.cpp.

Member Data Documentation

◆ kind

kindt ctokent::kind

Definition at line 37 of file ctoken.h.

◆ line_number

std::size_t ctokent::line_number = 0

Definition at line 42 of file ctoken.h.

◆ text

std::string ctokent::text

Definition at line 40 of file ctoken.h.


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