![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <peglib.h>
Classes | |
| struct | Result |
Public Member Functions | |
| Definition () | |
| Definition (const Definition &rhs) | |
| Definition (const std::shared_ptr< Ope > &ope) | |
| operator std::shared_ptr< Ope > () | |
| Definition & | operator<= (const std::shared_ptr< Ope > &ope) |
| Result | parse (const char *s, size_t n, const char *path=nullptr, Log log=nullptr, ErrorReporter error_reporter=nullptr) const |
| Result | parse (const char *s, const char *path=nullptr, Log log=nullptr, ErrorReporter error_reporter=nullptr) const |
| Result | parse (const char *s, size_t n, std::any &dt, const char *path=nullptr, Log log=nullptr, ErrorReporter error_reporter=nullptr) const |
| Result | parse (const char *s, std::any &dt, const char *path=nullptr, Log log=nullptr, ErrorReporter error_reporter=nullptr) const |
| template<typename T> | |
| Result | parse_and_get_value (const char *s, size_t n, T &val, const char *path=nullptr, Log log=nullptr, ErrorReporter error_reporter=nullptr) const |
| template<typename T> | |
| Result | parse_and_get_value (const char *s, T &val, const char *path=nullptr, Log log=nullptr, ErrorReporter error_reporter=nullptr) const |
| template<typename T> | |
| Result | parse_and_get_value (const char *s, size_t n, std::any &dt, T &val, const char *path=nullptr, Log log=nullptr, ErrorReporter error_reporter=nullptr) const |
| template<typename T> | |
| Result | parse_and_get_value (const char *s, std::any &dt, T &val, const char *path=nullptr, Log log=nullptr, ErrorReporter error_reporter=nullptr) const |
| void | operator= (Action a) |
| template<typename T> | |
| Definition & | operator, (T fn) |
| Definition & | operator~ () |
| void | accept (Ope::Visitor &v) |
| std::shared_ptr< Ope > | get_core_operator () const |
| bool | is_token () const |
Public Attributes | |
| std::string | name |
| const char * | s_ = nullptr |
| std::pair< size_t, size_t > | line_ = {1, 1} |
| Predicate | predicate |
| size_t | id = 0 |
| Action | action |
| std::function< void(const Context &c, const char *s, size_t n, std::any &dt)> | enter |
| std::function< void(const Context &c, const char *s, size_t n, size_t matchlen, std::any &value, std::any &dt)> | leave |
| bool | ignoreSemanticValue = false |
| std::shared_ptr< Ope > | whitespaceOpe |
| std::shared_ptr< Ope > | wordOpe |
| bool | enablePackratParsing = false |
| bool | is_macro = false |
| std::vector< std::string > | params |
| bool | disable_action = false |
| bool | is_left_recursive = false |
| bool | can_be_empty = false |
| TracerEnter | tracer_enter |
| TracerLeave | tracer_leave |
| bool | verbose_trace = false |
| TracerStartOrEnd | tracer_start |
| TracerStartOrEnd | tracer_end |
| std::string | error_message |
| bool | no_ast_opt = false |
| bool | no_whitespace = false |
| std::string | ast_name |
| bool | eoi_check = true |
| bool | collect_packrat_stats = false |
| std::vector< Context::PackratStats > | packrat_stats_ |
Private Member Functions | |
| Definition & | operator= (const Definition &rhs) |
| Definition & | operator= (Definition &&rhs) |
| void | initialize_definition_ids () const |
| void | initialize_packrat_filter () const |
| Result | parse_core (const char *s, size_t n, SemanticValues &vs, std::any &dt, const char *path, Log log, ErrorReporter error_reporter=nullptr) const |
Private Attributes | |
| std::shared_ptr< Holder > | holder_ |
| std::once_flag | is_token_init_ |
| bool | is_token_ = false |
| std::once_flag | assign_id_to_definition_init_ |
| std::once_flag | definition_ids_init_ |
| std::unordered_map< void *, size_t > | definition_ids_ |
| std::once_flag | packrat_filter_init_ |
| std::vector< int32_t > | packrat_index_ |
| size_t | packrat_cached_count_ = 0 |
Friends | |
| class | Reference |
| class | ParserGenerator |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
friend |
|
friend |
| Action peg::Definition::action |
|
mutableprivate |
| std::string peg::Definition::ast_name |
| bool peg::Definition::can_be_empty = false |
|
mutable |
|
mutableprivate |
|
mutableprivate |
| bool peg::Definition::disable_action = false |
| bool peg::Definition::enablePackratParsing = false |
| std::function<void(const Context &c, const char *s, size_t n, std::any &dt)> peg::Definition::enter |
| bool peg::Definition::eoi_check = true |
| std::string peg::Definition::error_message |
|
private |
| size_t peg::Definition::id = 0 |
| bool peg::Definition::ignoreSemanticValue = false |
| bool peg::Definition::is_left_recursive = false |
| bool peg::Definition::is_macro = false |
|
mutableprivate |
|
mutableprivate |
| std::function<void(const Context &c, const char *s, size_t n, size_t matchlen, std::any &value, std::any &dt)> peg::Definition::leave |
| std::pair<size_t, size_t> peg::Definition::line_ = {1, 1} |
| std::string peg::Definition::name |
| bool peg::Definition::no_ast_opt = false |
| bool peg::Definition::no_whitespace = false |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutable |
| std::vector<std::string> peg::Definition::params |
| Predicate peg::Definition::predicate |
| const char* peg::Definition::s_ = nullptr |
| TracerStartOrEnd peg::Definition::tracer_end |
| TracerEnter peg::Definition::tracer_enter |
| TracerLeave peg::Definition::tracer_leave |
| TracerStartOrEnd peg::Definition::tracer_start |
| bool peg::Definition::verbose_trace = false |
| std::shared_ptr<Ope> peg::Definition::whitespaceOpe |
| std::shared_ptr<Ope> peg::Definition::wordOpe |