Cockatrice 2026-09-01-Development-3.1.0-beta.10
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
peg::GrammarBlob Struct Reference

#include <peglib.h>

Classes

struct  Writer
struct  Reader

Public Types

enum  Tag : uint8_t {
  T_Sequence , T_Choice , T_Repetition , T_And ,
  T_Not , T_Dictionary , T_Literal , T_CharClass ,
  T_Char , T_AnyChar , T_CaptureScope , T_Capture ,
  T_TokenBoundary , T_Ignore , T_BackRef , T_Reference ,
  T_Whitespace , T_Recovery , T_Cut , T_PrecedenceClimbing ,
  T_Null
}

Static Public Member Functions

static void write_ope (Writer &w, const std::shared_ptr< Ope > &o)
static std::shared_ptr< Operead_ope (Reader &r, Grammar &g, Definition *owner)
static std::vector< uint8_t > serialize (const Grammar &g, const std::string &start)
static std::shared_ptr< Grammardeserialize (const std::vector< uint8_t > &blob, std::string &start_out)

Static Public Attributes

static const uint32_t MAGIC = 0x50454732

Member Enumeration Documentation

◆ Tag

enum peg::GrammarBlob::Tag : uint8_t
Enumerator
T_Sequence 
T_Choice 
T_Repetition 
T_And 
T_Not 
T_Dictionary 
T_Literal 
T_CharClass 
T_Char 
T_AnyChar 
T_CaptureScope 
T_Capture 
T_TokenBoundary 
T_Ignore 
T_BackRef 
T_Reference 
T_Whitespace 
T_Recovery 
T_Cut 
T_PrecedenceClimbing 
T_Null 

Member Function Documentation

◆ deserialize()

std::shared_ptr< Grammar > peg::GrammarBlob::deserialize ( const std::vector< uint8_t > & blob,
std::string & start_out )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_ope()

std::shared_ptr< Ope > peg::GrammarBlob::read_ope ( Reader & r,
Grammar & g,
Definition * owner )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ serialize()

std::vector< uint8_t > peg::GrammarBlob::serialize ( const Grammar & g,
const std::string & start )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_ope()

void peg::GrammarBlob::write_ope ( Writer & w,
const std::shared_ptr< Ope > & o )
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ MAGIC

const uint32_t peg::GrammarBlob::MAGIC = 0x50454732
static

The documentation for this struct was generated from the following file:
  • libcockatrice_utility/libcockatrice/utility/peglib.h