Loading...
Searching...
No Matches
ledger::expr_t::token_t Struct Reference

#include <token.h>

Inherits boost::noncopyable.

+ Collaboration diagram for ledger::expr_t::token_t:

Public Types

enum  kind_t {
  ERROR , VALUE , IDENT , MASK ,
  LPAREN , RPAREN , LBRACE , RBRACE ,
  EQUAL , NEQUAL , LESS , LESSEQ ,
  GREATER , GREATEREQ , ASSIGN , MATCH ,
  NMATCH , MINUS , PLUS , STAR ,
  SLASH , ARROW , KW_DIV , EXCLAM ,
  KW_AND , KW_OR , KW_MOD , KW_IF ,
  KW_ELSE , QUERY , COLON , DOT ,
  COMMA , SEMI , TOK_EOF , UNKNOWN
}
 

Public Member Functions

void clear ()
 
void expected (const char wanted, const int c)
 
void expected (const kind_t wanted)
 
void next (std::istream &in, const parse_flags_t &flags)
 
token_toperator= (const token_t &other)
 
void parse_ident (std::istream &in)
 
int parse_reserved_word (std::istream &in)
 
void rewind (std::istream &in)
 
 token_t ()
 
void unexpected (const char wanted='\0')
 
 ~token_t () throw ()
 

Public Attributes

enum ledger::expr_t::token_t::kind_t kind
 
std::size_t length
 
char symbol [6]
 
value_t value
 

Detailed Description

Definition at line 48 of file token.h.

Member Enumeration Documentation

◆ kind_t

Enumerator
ERROR 
VALUE 
IDENT 
MASK 
LPAREN 
RPAREN 
LBRACE 
RBRACE 
EQUAL 
NEQUAL 
LESS 
LESSEQ 
GREATER 
GREATEREQ 
ASSIGN 
MATCH 
NMATCH 
MINUS 
PLUS 
STAR 
SLASH 
ARROW 
KW_DIV 
EXCLAM 
KW_AND 
KW_OR 
KW_MOD 
KW_IF 
KW_ELSE 
QUERY 
COLON 
DOT 
COMMA 
SEMI 
TOK_EOF 
UNKNOWN 

Definition at line 50 of file token.h.

Constructor & Destructor Documentation

◆ token_t()

ledger::expr_t::token_t::token_t ( )
inlineexplicit

Definition at line 102 of file token.h.

References TRACE_CTOR.

◆ ~token_t()

ledger::expr_t::token_t::~token_t ( )
throw ( )
inline

Definition at line 105 of file token.h.

References TRACE_DTOR.

Member Function Documentation

◆ clear()

void ledger::expr_t::token_t::clear ( )
inline

Definition at line 116 of file token.h.

References kind, length, NULL_VALUE, symbol, UNKNOWN, and value.

◆ expected() [1/2]

void ledger::expr_t::token_t::expected ( const char wanted,
const int c )

◆ expected() [2/2]

void ledger::expr_t::token_t::expected ( const kind_t wanted)

◆ next()

void ledger::expr_t::token_t::next ( std::istream & in,
const parse_flags_t & flags )

◆ operator=()

token_t & ledger::expr_t::token_t::operator= ( const token_t & other)
inline

Definition at line 109 of file token.h.

References assert, and ledger::downcast().

+ Here is the call graph for this function:

◆ parse_ident()

void ledger::expr_t::token_t::parse_ident ( std::istream & in)

◆ parse_reserved_word()

int ledger::expr_t::token_t::parse_reserved_word ( std::istream & in)

◆ rewind()

void ledger::expr_t::token_t::rewind ( std::istream & in)

◆ unexpected()

void ledger::expr_t::token_t::unexpected ( const char wanted = '\0')

Member Data Documentation

◆ kind

enum ledger::expr_t::token_t::kind_t ledger::expr_t::token_t::kind

Referenced by clear().

◆ length

std::size_t ledger::expr_t::token_t::length

Definition at line 100 of file token.h.

Referenced by clear().

◆ symbol

char ledger::expr_t::token_t::symbol[6]

Definition at line 98 of file token.h.

Referenced by clear().

◆ value

value_t ledger::expr_t::token_t::value

Definition at line 99 of file token.h.

Referenced by clear().


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