![]() |
Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
|
#include <peglib.h>
Classes | |
| struct | ArgsFrame |
| struct | LRMemo |
| struct | PackratStats |
| struct | Snapshot |
Public Types | |
| using | LRRule = std::pair<const Definition *, size_t> |
| using | LRKey = std::pair<LRRule, const char *> |
Public Member Functions | |
| int32_t | cache_slot (size_t def_id) const |
| void | clear_packrat_cache (const char *pos, size_t def_id) |
| void | write_packrat_cache (const char *pos, size_t def_id, size_t len, const std::any &val) |
| Context (const char *path, const char *s, size_t l, size_t def_count, std::shared_ptr< Ope > whitespaceOpe, std::shared_ptr< Ope > wordOpe, bool enablePackratParsing, TracerEnter tracer_enter, TracerLeave tracer_leave, std::any trace_data, bool verbose_trace, Log log, ErrorReporter error_reporter=nullptr, const std::vector< int32_t > *packrat_index=nullptr, size_t packrat_cached_count=0) | |
| ~Context () | |
| Context (const Context &)=delete | |
| Context (Context &&)=delete | |
| Context | operator= (const Context &)=delete |
| template<typename T> | |
| void | packrat (const char *a_s, size_t def_id, size_t &len, std::any &val, T fn) |
| SemanticValues & | push_semantic_values_scope () |
| void | pop_semantic_values_scope () |
| void | push_args (std::vector< std::shared_ptr< Ope > > &&args, size_t macro_inst=0) |
| void | pop_args () |
| const std::vector< std::shared_ptr< Ope > > & | top_args () const |
| size_t | top_macro_inst () const |
| size_t | intern_macro_inst (std::vector< const void * > &&key) |
| Snapshot | snapshot (const SemanticValues &vs) const |
| void | rollback (SemanticValues &vs, const Snapshot &snap) |
| size_t | skip_whitespace (const char *a_s, size_t n, SemanticValues &vs, std::any &dt) |
| void | set_error_pos (const char *a_s, const char *literal=nullptr) |
| void | trace_enter (const Ope &ope, const char *a_s, size_t n, const SemanticValues &vs, std::any &dt) |
| void | trace_leave (const Ope &ope, const char *a_s, size_t n, const SemanticValues &vs, std::any &dt, size_t len) |
| bool | is_traceable (const Ope &ope) const |
| std::pair< size_t, size_t > | line_info (const char *cur) const |
Public Attributes | |
| const char * | path |
| const char * | s |
| const size_t | l |
| ErrorInfo | error_info |
| bool | recovered = false |
| std::vector< std::unique_ptr< SemanticValues > > | value_stack |
| size_t | value_stack_size = 0 |
| std::vector< Definition * > | rule_stack |
| std::vector< ArgsFrame > | args_stack |
| size_t | in_token_boundary_count = 0 |
| std::shared_ptr< Ope > | whitespaceOpe |
| bool | in_whitespace = false |
| std::shared_ptr< Ope > | wordOpe |
| std::vector< std::pair< std::string_view, std::string > > | capture_entries |
| std::vector< bool > | cut_stack |
| const size_t | def_count |
| const bool | enablePackratParsing |
| const std::vector< int32_t > * | packrat_index |
| size_t | packrat_cached_count |
| std::vector< bool > | cache_registered |
| std::vector< bool > | cache_success |
| std::vector< const char * > | active_pos |
| PackratCache | cache_values |
| std::map< LRKey, LRMemo > | lr_memo |
| std::set< LRRule > | lr_refs_hit |
| std::set< LRKey > | lr_active_seeds |
| std::map< std::vector< const void * >, size_t > | macro_inst_ids |
| size_t | next_macro_inst_ = 1 |
| TracerEnter | tracer_enter |
| TracerLeave | tracer_leave |
| const bool | has_tracer |
| std::any | trace_data |
| const bool | verbose_trace |
| unsigned char | tolower_table [256] |
| Log | log |
| ErrorReporter | error_reporter |
| std::vector< PackratStats > * | packrat_stats = nullptr |
| size_t | next_trace_id = 0 |
| std::vector< size_t > | trace_ids |
| bool | ignore_trace_state = false |
| std::once_flag | source_line_index_init_ |
| std::vector< size_t > | source_line_index |
| using peg::Context::LRKey = std::pair<LRRule, const char *> |
| using peg::Context::LRRule = std::pair<const Definition *, size_t> |
|
inline |
|
inline |
|
delete |
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| std::vector<const char *> peg::Context::active_pos |
| std::vector<ArgsFrame> peg::Context::args_stack |
| std::vector<bool> peg::Context::cache_registered |
| std::vector<bool> peg::Context::cache_success |
| PackratCache peg::Context::cache_values |
| std::vector<std::pair<std::string_view, std::string> > peg::Context::capture_entries |
| std::vector<bool> peg::Context::cut_stack |
| const size_t peg::Context::def_count |
| const bool peg::Context::enablePackratParsing |
| ErrorInfo peg::Context::error_info |
| ErrorReporter peg::Context::error_reporter |
| const bool peg::Context::has_tracer |
| bool peg::Context::ignore_trace_state = false |
| size_t peg::Context::in_token_boundary_count = 0 |
| bool peg::Context::in_whitespace = false |
| const size_t peg::Context::l |
| Log peg::Context::log |
| std::set<LRKey> peg::Context::lr_active_seeds |
| std::set<LRRule> peg::Context::lr_refs_hit |
| std::map<std::vector<const void *>, size_t> peg::Context::macro_inst_ids |
| size_t peg::Context::next_macro_inst_ = 1 |
| size_t peg::Context::next_trace_id = 0 |
| size_t peg::Context::packrat_cached_count |
| const std::vector<int32_t>* peg::Context::packrat_index |
| std::vector<PackratStats>* peg::Context::packrat_stats = nullptr |
| const char* peg::Context::path |
| bool peg::Context::recovered = false |
| std::vector<Definition *> peg::Context::rule_stack |
| const char* peg::Context::s |
|
mutable |
|
mutable |
| unsigned char peg::Context::tolower_table[256] |
| std::any peg::Context::trace_data |
| std::vector<size_t> peg::Context::trace_ids |
| TracerEnter peg::Context::tracer_enter |
| TracerLeave peg::Context::tracer_leave |
| std::vector<std::unique_ptr<SemanticValues> > peg::Context::value_stack |
| size_t peg::Context::value_stack_size = 0 |
| const bool peg::Context::verbose_trace |
| std::shared_ptr<Ope> peg::Context::whitespaceOpe |
| std::shared_ptr<Ope> peg::Context::wordOpe |