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

#include <peglib.h>

Public Member Functions

 parser ()=default
 
 parser (const char *s, size_t n)
 
 parser (const char *s)
 
 operator bool ()
 
bool load_grammar (const char *s, size_t n)
 
bool load_grammar (const char *s)
 
bool parse_n (const char *s, size_t n, const char *path=nullptr) const
 
bool parse (const char *s, const char *path=nullptr) const
 
bool parse_n (const char *s, size_t n, any &dt, const char *path=nullptr) const
 
bool parse (const char *s, any &dt, const char *path=nullptr) const
 
template<typename T >
bool parse_n (const char *s, size_t n, T &val, const char *path=nullptr) const
 
template<typename T >
bool parse (const char *s, T &val, const char *path=nullptr) const
 
template<typename T >
bool parse_n (const char *s, size_t n, any &dt, T &val, const char *path=nullptr) const
 
template<typename T >
bool parse (const char *s, any &dt, T &val, const char *=nullptr) const
 
bool search (const char *s, size_t n, size_t &mpos, size_t &mlen) const
 
bool search (const char *s, size_t &mpos, size_t &mlen) const
 
Definitionoperator[] (const char *s)
 
void enable_packrat_parsing ()
 
template<typename T = Ast>
parserenable_ast ()
 
void enable_trace (Tracer tracer)
 

Public Attributes

MatchAction match_action
 
Log log
 

Private Member Functions

void output_log (const char *s, size_t n, const Definition::Result &r) const
 

Private Attributes

std::shared_ptr< Grammargrammar_
 
std::string start_
 

Constructor & Destructor Documentation

◆ parser() [1/3]

peg::parser::parser ( )
default

◆ parser() [2/3]

peg::parser::parser ( const char *  s,
size_t  n 
)
inline

◆ parser() [3/3]

peg::parser::parser ( const char *  s)
inline

Member Function Documentation

◆ enable_ast()

template<typename T = Ast>
parser& peg::parser::enable_ast ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ enable_packrat_parsing()

void peg::parser::enable_packrat_parsing ( )
inline

◆ enable_trace()

void peg::parser::enable_trace ( Tracer  tracer)
inline

◆ load_grammar() [1/2]

bool peg::parser::load_grammar ( const char *  s,
size_t  n 
)
inline
Here is the caller graph for this function:

◆ load_grammar() [2/2]

bool peg::parser::load_grammar ( const char *  s)
inline
Here is the call graph for this function:

◆ operator bool()

peg::parser::operator bool ( )
inline

◆ operator[]()

Definition& peg::parser::operator[] ( const char *  s)
inline

◆ output_log()

void peg::parser::output_log ( const char *  s,
size_t  n,
const Definition::Result r 
) const
inlineprivate
Here is the call graph for this function:

◆ parse() [1/4]

bool peg::parser::parse ( const char *  s,
const char *  path = nullptr 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse() [2/4]

bool peg::parser::parse ( const char *  s,
any dt,
const char *  path = nullptr 
) const
inline
Here is the call graph for this function:

◆ parse() [3/4]

template<typename T >
bool peg::parser::parse ( const char *  s,
T val,
const char *  path = nullptr 
) const
inline
Here is the call graph for this function:

◆ parse() [4/4]

template<typename T >
bool peg::parser::parse ( const char *  s,
any dt,
T val,
const char *  = nullptr 
) const
inline
Here is the call graph for this function:

◆ parse_n() [1/4]

bool peg::parser::parse_n ( const char *  s,
size_t  n,
const char *  path = nullptr 
) const
inline
Here is the caller graph for this function:

◆ parse_n() [2/4]

bool peg::parser::parse_n ( const char *  s,
size_t  n,
any dt,
const char *  path = nullptr 
) const
inline

◆ parse_n() [3/4]

template<typename T >
bool peg::parser::parse_n ( const char *  s,
size_t  n,
T val,
const char *  path = nullptr 
) const
inline

◆ parse_n() [4/4]

template<typename T >
bool peg::parser::parse_n ( const char *  s,
size_t  n,
any dt,
T val,
const char *  path = nullptr 
) const
inline

◆ search() [1/2]

bool peg::parser::search ( const char *  s,
size_t  n,
size_t &  mpos,
size_t &  mlen 
) const
inline
Here is the caller graph for this function:

◆ search() [2/2]

bool peg::parser::search ( const char *  s,
size_t &  mpos,
size_t &  mlen 
) const
inline
Here is the call graph for this function:

Member Data Documentation

◆ grammar_

std::shared_ptr<Grammar> peg::parser::grammar_
private

◆ log

Log peg::parser::log

◆ match_action

MatchAction peg::parser::match_action

◆ start_

std::string peg::parser::start_
private

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