ilang  1.0.0
ILAng: A Modeling and Verification Platform for SoCs
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ilang::VarExtractor Class Reference

Public Types

enum  token_type {
 Type of tokens.
typedef std::pair< token_type, std::string > token
typedef std::function< bool(const std::string &)> str_j
 Type of function pointer of string judger.
typedef std::function< std::string(const token &)> str_r
 Type of function pointer of string replacer.

Public Member Functions

 VarExtractor (str_j is_ila_state, str_j is_ila_input, str_j is_vlg_sig)
void ParseToExtract (const std::string &in, bool force_vlg_statename=false)
void ForEachTokenReplace (str_r replacer)
 Traverse the tokens, see if replace is needed.
std::string GenString () const
 Get back string.
std::string Replace (const std::string &in, bool force_vlg_statename, str_r replacer)
 A shortcut to do all at once.

Static Public Member Functions

static bool contains_mod_inst_name (const std::string &s, const std::string &mi)

Protected Attributes

std::vector< token_tokens
 token from parsed string
str_j _is_ila_state
 a pointer to string judger (is ila state?)
str_j _is_ila_input
 a pointer to string judge (is ila input?)
str_j _is_vlg_sig
 a pointer to string judger (is vlg signal?)

Member Function Documentation

◆ ParseToExtract()

void ilang::VarExtractor::ParseToExtract ( const std::string &  in,
bool  force_vlg_statename = false 

Parse a string and populate the token vector, will clear the _tokens storage

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