Empirical
Public Member Functions | Public Attributes | List of all members
emp::TokenInfo Struct Reference

Information about an individual token type to be processed within a Lexer. More...

#include <Lexer.h>

Public Member Functions

 TokenInfo (const std::string &n, const std::string &r, size_t i, bool s=false)
 
 TokenInfo (const TokenInfo &)=default
 
TokenInfooperator= (const TokenInfo &)=default
 
void Print (std::ostream &os=std::cout) const
 Print out the status of this token (for debugging) More...
 

Public Attributes

std::string name
 Name of this token type. More...
 
RegEx regex
 Pattern to describe token type. More...
 
size_t id
 Unique id for token. More...
 
bool save_lexeme
 Should we preserve the lexeme for this token? More...
 

Detailed Description

Information about an individual token type to be processed within a Lexer.

Constructor & Destructor Documentation

emp::TokenInfo::TokenInfo ( const std::string &  n,
const std::string &  r,
size_t  i,
bool  s = false 
)
inline
emp::TokenInfo::TokenInfo ( const TokenInfo )
default

Member Function Documentation

TokenInfo& emp::TokenInfo::operator= ( const TokenInfo )
default
void emp::TokenInfo::Print ( std::ostream &  os = std::cout) const
inline

Print out the status of this token (for debugging)

Member Data Documentation

size_t emp::TokenInfo::id

Unique id for token.

std::string emp::TokenInfo::name

Name of this token type.

RegEx emp::TokenInfo::regex

Pattern to describe token type.

bool emp::TokenInfo::save_lexeme

Should we preserve the lexeme for this token?


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