RetroArch
|
Namespaces | |
udl | |
Classes | |
class | Action |
class | AndPredicate |
class | any |
class | AnyCharacter |
struct | AssignIDToDefinition |
struct | AstBase |
struct | AstOptimizer |
class | Capture |
class | Character |
class | CharacterClass |
class | Context |
class | Definition |
class | DefinitionReference |
struct | EmptyType |
class | Holder |
class | Ignore |
struct | IsToken |
class | LiteralString |
struct | match |
class | NotPredicate |
class | OneOrMore |
class | Ope |
class | Option |
struct | parse_error |
class | parser |
class | ParserGenerator |
class | peg_token_iterator |
struct | peg_token_range |
class | PrioritizedChoice |
struct | scope_exit |
struct | SemanticValues |
class | Sequence |
class | TokenBoundary |
class | WeakHolder |
class | Whitespace |
class | ZeroOrMore |
Typedefs | |
typedef std::function< void(const char *s, size_t n, size_t id, const std::string &name)> | MatchAction |
typedef std::function< void(const char *name, const char *s, size_t n, const SemanticValues &sv, const Context &c, const any &dt)> | Tracer |
typedef std::function< size_t(const char *s, size_t n, SemanticValues &sv, any &dt)> | Parser |
typedef std::unordered_map< std::string, Definition > | Grammar |
typedef std::function< void(size_t, size_t, const std::string &)> | Log |
typedef AstBase< EmptyType > | Ast |
Functions | |
template<typename EF > | |
auto | make_scope_exit (EF &&exit_function) -> scope_exit< EF > |
std::pair< size_t, size_t > | line_info (const char *start, const char *cur) |
template<typename R , typename F , typename std::enable_if< std::is_void< R >::value >::type *& = enabler, typename... Args> | |
any | call (F fn, Args &&... args) |
bool | success (size_t len) |
bool | fail (size_t len) |
template<typename... Args> | |
std::shared_ptr< Ope > | seq (Args &&...args) |
template<typename... Args> | |
std::shared_ptr< Ope > | cho (Args &&...args) |
std::shared_ptr< Ope > | zom (const std::shared_ptr< Ope > &ope) |
std::shared_ptr< Ope > | oom (const std::shared_ptr< Ope > &ope) |
std::shared_ptr< Ope > | opt (const std::shared_ptr< Ope > &ope) |
std::shared_ptr< Ope > | apd (const std::shared_ptr< Ope > &ope) |
std::shared_ptr< Ope > | npd (const std::shared_ptr< Ope > &ope) |
std::shared_ptr< Ope > | lit (const std::string &lit) |
std::shared_ptr< Ope > | cls (const std::string &chars) |
std::shared_ptr< Ope > | chr (char dt) |
std::shared_ptr< Ope > | dot () |
std::shared_ptr< Ope > | cap (const std::shared_ptr< Ope > &ope, MatchAction ma, size_t n, const std::string &s) |
std::shared_ptr< Ope > | cap (const std::shared_ptr< Ope > &ope, MatchAction ma) |
std::shared_ptr< Ope > | tok (const std::shared_ptr< Ope > &ope) |
std::shared_ptr< Ope > | ign (const std::shared_ptr< Ope > &ope) |
std::shared_ptr< Ope > | ref (const std::unordered_map< std::string, Definition > &grammar, const std::string &name, const char *s) |
std::shared_ptr< Ope > | wsp (const std::shared_ptr< Ope > &ope) |
constexpr unsigned int | str2tag (const char *str, int h=0) |
template<typename T > | |
void | ast_to_s_core (const std::shared_ptr< T > &ptr, std::string &s, int level, std::function< std::string(const T &ast, int level)> fn) |
template<typename T > | |
std::string | ast_to_s (const std::shared_ptr< T > &ptr, std::function< std::string(const T &ast, int level)> fn=nullptr) |
template<typename T > | |
static std::shared_ptr< T > | optimize_ast (std::shared_ptr< T > ast, const std::vector< std::string > &filters={}) |
bool | peg_match (const char *syntax, const char *s, match &m) |
bool | peg_match (const char *syntax, const char *s) |
bool | peg_search (parser &pg, const char *s, size_t n, match &m) |
bool | peg_search (parser &pg, const char *s, match &m) |
bool | peg_search (const char *syntax, const char *s, size_t n, match &m) |
bool | peg_search (const char *syntax, const char *s, match &m) |
Variables | |
void * | enabler |
static const char * | WHITESPACE_DEFINITION_NAME = "%whitespace" |
const int | AstDefaultTag = -1 |
typedef std::unordered_map<std::string, Definition> peg::Grammar |
typedef std::function<void (size_t, size_t, const std::string&)> peg::Log |
typedef std::function<void (const char* s, size_t n, size_t id, const std::string& name)> peg::MatchAction |
typedef std::function<size_t (const char* s, size_t n, SemanticValues& sv, any& dt)> peg::Parser |
typedef std::function<void (const char* name, const char* s, size_t n, const SemanticValues& sv, const Context& c, const any& dt)> peg::Tracer |
std::string peg::ast_to_s | ( | const std::shared_ptr< T > & | ptr, |
std::function< std::string(const T &ast, int level)> | fn = nullptr |
||
) |
void peg::ast_to_s_core | ( | const std::shared_ptr< T > & | ptr, |
std::string & | s, | ||
int | level, | ||
std::function< std::string(const T &ast, int level)> | fn | ||
) |
any peg::call | ( | F | fn, |
Args &&... | args | ||
) |
|
inline |
|
inline |
std::shared_ptr<Ope> peg::cho | ( | Args &&... | args | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
auto peg::make_scope_exit | ( | EF && | exit_function | ) | -> scope_exit<EF> |
|
static |
|
inline |
std::shared_ptr<Ope> peg::seq | ( | Args &&... | args | ) |
|
inline |
|
inline |
const int peg::AstDefaultTag = -1 |
void* peg::enabler |
|
static |