RetroArch
Public Member Functions | Public Attributes | List of all members
peg::Context Class Reference

#include <peglib.h>

Collaboration diagram for peg::Context:
[legend]

Public Member Functions

 Context (const char *a_path, const char *a_s, size_t a_l, size_t a_def_count, std::shared_ptr< Ope > a_whitespaceOpe, bool a_enablePackratParsing, Tracer a_tracer)
 
template<typename T >
void packrat (const char *a_s, size_t def_id, size_t &len, any &val, T fn)
 
SemanticValuespush ()
 
void pop ()
 
void set_error_pos (const char *a_s)
 
void trace (const char *name, const char *a_s, size_t n, SemanticValues &sv, any &dt) const
 

Public Attributes

const char * path
 
const char * s
 
const size_t l
 
const char * error_pos
 
const char * message_pos
 
std::string message
 
std::vector< std::shared_ptr< SemanticValues > > value_stack
 
size_t value_stack_size
 
size_t nest_level
 
bool in_token
 
std::shared_ptr< OpewhitespaceOpe
 
bool in_whitespace
 
const size_t def_count
 
const bool enablePackratParsing
 
std::vector< boolcache_registered
 
std::vector< boolcache_success
 
std::map< std::pair< size_t, size_t >, std::tuple< size_t, any > > cache_values
 
std::function< void(const char *, const char *, size_t, const SemanticValues &, const Context &, const any &)> tracer
 

Constructor & Destructor Documentation

◆ Context()

peg::Context::Context ( const char *  a_path,
const char *  a_s,
size_t  a_l,
size_t  a_def_count,
std::shared_ptr< Ope a_whitespaceOpe,
bool  a_enablePackratParsing,
Tracer  a_tracer 
)
inline

Member Function Documentation

◆ packrat()

template<typename T >
void peg::Context::packrat ( const char *  a_s,
size_t  def_id,
size_t &  len,
any val,
T  fn 
)
inline
Here is the call graph for this function:

◆ pop()

void peg::Context::pop ( )
inline

◆ push()

SemanticValues& peg::Context::push ( )
inline

◆ set_error_pos()

void peg::Context::set_error_pos ( const char *  a_s)
inline

◆ trace()

void peg::Context::trace ( const char *  name,
const char *  a_s,
size_t  n,
SemanticValues sv,
any dt 
) const
inline

Member Data Documentation

◆ cache_registered

std::vector<bool> peg::Context::cache_registered

◆ cache_success

std::vector<bool> peg::Context::cache_success

◆ cache_values

std::map<std::pair<size_t, size_t>, std::tuple<size_t, any> > peg::Context::cache_values

◆ def_count

const size_t peg::Context::def_count

◆ enablePackratParsing

const bool peg::Context::enablePackratParsing

◆ error_pos

const char* peg::Context::error_pos

◆ in_token

bool peg::Context::in_token

◆ in_whitespace

bool peg::Context::in_whitespace

◆ l

const size_t peg::Context::l

◆ message

std::string peg::Context::message

◆ message_pos

const char* peg::Context::message_pos

◆ nest_level

size_t peg::Context::nest_level

◆ path

const char* peg::Context::path

◆ s

const char* peg::Context::s

◆ tracer

std::function<void (const char*, const char*, size_t, const SemanticValues&, const Context&, const any&)> peg::Context::tracer

◆ value_stack

std::vector<std::shared_ptr<SemanticValues> > peg::Context::value_stack

◆ value_stack_size

size_t peg::Context::value_stack_size

◆ whitespaceOpe

std::shared_ptr<Ope> peg::Context::whitespaceOpe

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