VMAssembler  v1.2
VMProtect 2 Virtual Instruction Assembler
Public Member Functions | Static Public Member Functions | List of all members
parse_t Class Reference

this singleton class contains all the information for parsed virtual instructions... More...

#include <parser.h>

Public Member Functions

void add_label (std::string label_name)
 used by yacc file to add new labels... More...
 
void add_vinstr (std::string vinstr_name)
 used by yacc file to add new virtual instruction with no imm... More...
 
void add_vinstr (std::string vinstr_name, std::uintptr_t imm_val)
 used by yacc file to add new virtual instruction with an imm... More...
 
bool for_each (callback_t callback)
 used to loop over every single label... More...
 

Static Public Member Functions

static auto get_instance () -> parse_t *
 gets the one and only instance of this class... More...
 

Detailed Description

this singleton class contains all the information for parsed virtual instructions...

Member Function Documentation

◆ add_label()

void parse_t::add_label ( std::string  label_name)

used by yacc file to add new labels...

Parameters
label_namelabel name, no pass by reference since a new std::string object must be created...

◆ add_vinstr() [1/2]

void parse_t::add_vinstr ( std::string  vinstr_name)

used by yacc file to add new virtual instruction with no imm...

Parameters
vinstr_namevirtual instruction name, no pass by reference since a new std::string object must be created...

◆ add_vinstr() [2/2]

void parse_t::add_vinstr ( std::string  vinstr_name,
std::uintptr_t  imm_val 
)

used by yacc file to add new virtual instruction with an imm...

Parameters
vinstr_namevirtual instruction name, no pass by reference since a new std::string object must be created...
imm_valimm value...

◆ for_each()

bool parse_t::for_each ( callback_t  callback)

used to loop over every single label...

Parameters
callbacklambda to call back given the label structure...
Returns
returns true if all labels were looped through...

◆ get_instance()

auto parse_t::get_instance ( ) -> parse_t *
static

gets the one and only instance of this class...

Returns
returns a pointer to the one and only instance of this class...

The documentation for this class was generated from the following files: