RetroArch
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
peg::Definition Class Reference

#include <peglib.h>

Collaboration diagram for peg::Definition:
[legend]

Classes

struct  Result
 

Public Member Functions

 Definition ()
 
 Definition (const Definition &rhs)
 
 Definition (Definition &&rhs)
 
 Definition (const std::shared_ptr< Ope > &ope)
 
 operator std::shared_ptr< Ope > ()
 
Definitionoperator<= (const std::shared_ptr< Ope > &ope)
 
Result parse (const char *s, size_t n, const char *path=nullptr) const
 
Result parse (const char *s, const char *path=nullptr) const
 
Result parse (const char *s, size_t n, any &dt, const char *path=nullptr) const
 
Result parse (const char *s, any &dt, const char *path=nullptr) const
 
template<typename T >
Result parse_and_get_value (const char *s, size_t n, T &val, const char *path=nullptr) const
 
template<typename T >
Result parse_and_get_value (const char *s, T &val, const char *path=nullptr) const
 
template<typename T >
Result parse_and_get_value (const char *s, size_t n, any &dt, T &val, const char *path=nullptr) const
 
template<typename T >
Result parse_and_get_value (const char *s, any &dt, T &val, const char *path=nullptr) const
 
Definitionoperator= (Action a)
 
template<typename T >
Definitionoperator, (T fn)
 
Definitionoperator~ ()
 
void accept (Ope::Visitor &v)
 
std::shared_ptr< Opeget_core_operator ()
 

Public Attributes

std::string name
 
size_t id
 
Action action
 
std::function< void(any &dt)> enter
 
std::function< void(any &dt)> leave
 
std::function< std::string()> error_message
 
bool ignoreSemanticValue
 
std::shared_ptr< OpewhitespaceOpe
 
bool enablePackratParsing
 
bool is_token
 
bool has_token_boundary
 
Tracer tracer
 

Private Member Functions

Definitionoperator= (const Definition &rhs)
 
Definitionoperator= (Definition &&rhs)
 
Result parse_core (const char *s, size_t n, SemanticValues &sv, any &dt, const char *path) const
 

Private Attributes

std::shared_ptr< Holderholder_
 

Friends

class DefinitionReference
 

Constructor & Destructor Documentation

◆ Definition() [1/4]

peg::Definition::Definition ( )
inline

◆ Definition() [2/4]

peg::Definition::Definition ( const Definition rhs)
inline

◆ Definition() [3/4]

peg::Definition::Definition ( Definition &&  rhs)
inline

◆ Definition() [4/4]

peg::Definition::Definition ( const std::shared_ptr< Ope > &  ope)
inline

Member Function Documentation

◆ accept()

void peg::Definition::accept ( Ope::Visitor v)
inline

◆ get_core_operator()

std::shared_ptr<Ope> peg::Definition::get_core_operator ( )
inline

◆ operator std::shared_ptr< Ope >()

peg::Definition::operator std::shared_ptr< Ope > ( )
inline

◆ operator,()

template<typename T >
Definition& peg::Definition::operator, ( T  fn)
inline
Here is the call graph for this function:

◆ operator<=()

Definition& peg::Definition::operator<= ( const std::shared_ptr< Ope > &  ope)
inline
Here is the call graph for this function:

◆ operator=() [1/3]

Definition& peg::Definition::operator= ( Action  a)
inline
Here is the caller graph for this function:

◆ operator=() [2/3]

Definition& peg::Definition::operator= ( const Definition rhs)
private

◆ operator=() [3/3]

Definition& peg::Definition::operator= ( Definition &&  rhs)
private

◆ operator~()

Definition& peg::Definition::operator~ ( )
inline

◆ parse() [1/4]

Result peg::Definition::parse ( const char *  s,
size_t  n,
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]

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

◆ parse() [3/4]

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

◆ parse() [4/4]

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

◆ parse_and_get_value() [1/4]

template<typename T >
Result peg::Definition::parse_and_get_value ( const char *  s,
size_t  n,
T val,
const char *  path = nullptr 
) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_and_get_value() [2/4]

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

◆ parse_and_get_value() [3/4]

template<typename T >
Result peg::Definition::parse_and_get_value ( const char *  s,
size_t  n,
any dt,
T val,
const char *  path = nullptr 
) const
inline
Here is the call graph for this function:

◆ parse_and_get_value() [4/4]

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

◆ parse_core()

Result peg::Definition::parse_core ( const char *  s,
size_t  n,
SemanticValues sv,
any dt,
const char *  path 
) const
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ DefinitionReference

friend class DefinitionReference
friend

Member Data Documentation

◆ action

Action peg::Definition::action

◆ enablePackratParsing

bool peg::Definition::enablePackratParsing

◆ enter

std::function<void (any& dt)> peg::Definition::enter

◆ error_message

std::function<std::string ()> peg::Definition::error_message

◆ has_token_boundary

bool peg::Definition::has_token_boundary

◆ holder_

std::shared_ptr<Holder> peg::Definition::holder_
private

◆ id

size_t peg::Definition::id

◆ ignoreSemanticValue

bool peg::Definition::ignoreSemanticValue

◆ is_token

bool peg::Definition::is_token

◆ leave

std::function<void (any& dt)> peg::Definition::leave

◆ name

std::string peg::Definition::name

◆ tracer

Tracer peg::Definition::tracer

◆ whitespaceOpe

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

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