49 std::map< str8 , const char* , cmp_str >
_dict;
62 const char*
Get(
const char* key)
const;
109 std::vector< CFormula > _formulas;
127 s32
GetNumber(
const char* lhs_, s32 def_ = 0);
A tokenizer class for handling comma-separated equations.
Definition tokenizer.h:104
s32 GetNumber(const char *lhs_, s32 def_=0)
Get the right-hand side number associated with a left-hand side key.
Definition tokenizer.cpp:38
CTokenizer(const char *sz, const MacroDict *dict_=nullptr)
Constructor to initialize the tokenizer with a string of equations and an optional macro dictionary.
Definition tokenizer.cpp:49
str16 GetString(const char *lhs_, const char *def_="")
Get the right-hand side string associated with a left-hand side key.
Definition tokenizer.cpp:28
Module for managing fixed-size strings.
A dictionary for storing and retrieving macros.
Definition tokenizer.h:48
void DumpAll() const
Dump all macros to the console.
Definition tokenizer.cpp:4
MacroDict(size_t num_of_macro, const Macro *macros)
Constructor to initialize the dictionary with macros.
Definition tokenizer.cpp:22
std::map< str8, const char *, cmp_str > _dict
Internal storage for macros.
Definition tokenizer.h:49
const char * Get(const char *key) const
Get the value associated with a macro key.
Definition tokenizer.cpp:12
Structure representing a macro with a key-value pair.
Definition tokenizer.h:39
const char * _data
The value associated with the macro key.
Definition tokenizer.h:41
const char * _key
The key of the macro.
Definition tokenizer.h:40