ROSE 0.11.145.147
|
Expand unrecognized terms to placholder variables.
When parsing a symbolic expression, any unrecognized variable names such as "foo" will be replaced with a new symbolic variable such as "v48722" and a record of the substitution is saved in this object. The same name is always substituted with the same placeholder.
Definition at line 413 of file SymbolicExpressionParser.h.
#include <Rose/BinaryAnalysis/SymbolicExpressionParser.h>
Public Types | |
typedef Sawyer::SharedPointer< TermPlaceholders > | Ptr |
Shared-ownership pointer. | |
typedef Sawyer::Container::BiMap< std::string, SymbolicExpression::Ptr > | NameToVarMap |
Mapping between term names and placeholder variables. | |
Public Types inherited from Rose::BinaryAnalysis::SymbolicExpressionParser::AtomExpansion | |
typedef Sawyer::SharedPointer< AtomExpansion > | Ptr |
Shared-ownership pointer to an AtomExpansion. | |
Public Types inherited from Rose::BinaryAnalysis::SymbolicExpressionParser::Expansion | |
typedef Sawyer::SharedPointer< Expansion > | Ptr |
Shared-ownership pointer to an Expansion. | |
Public Member Functions | |
const NameToVarMap & | map () const |
Mapping between terms and variables. | |
SymbolicExpression::Ptr | immediateExpansion (const SymbolicExpressionParser::Token &) override |
Expand a parsed atom into some other expression. | |
Public Member Functions inherited from Rose::BinaryAnalysis::SymbolicExpressionParser::Expansion | |
virtual SymbolicExpression::Ptr | delayedExpansion (const SymbolicExpression::Ptr &src, const SymbolicExpressionParser *) |
Substitute one expression with another. | |
const std::string & | title () const |
Property: Title to use for documentation. | |
void | title (const std::string &s) |
Property: Title to use for documentation. | |
const std::string & | docString () const |
Property: Documentation string. | |
void | docString (const std::string &s) |
Property: Documentation string. | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. | |
SharedObject (const SharedObject &) | |
Copy constructor. | |
virtual | ~SharedObject () |
Virtual destructor. | |
SharedObject & | operator= (const SharedObject &) |
Assignment. | |
Static Public Member Functions | |
static Ptr | instance () |
Allocating constructor. | |
typedef Sawyer::SharedPointer<TermPlaceholders> Rose::BinaryAnalysis::SymbolicExpressionParser::TermPlaceholders::Ptr |
Shared-ownership pointer.
See Shared ownership.
Definition at line 416 of file SymbolicExpressionParser.h.
typedef Sawyer::Container::BiMap<std::string, SymbolicExpression::Ptr> Rose::BinaryAnalysis::SymbolicExpressionParser::TermPlaceholders::NameToVarMap |
Mapping between term names and placeholder variables.
Definition at line 419 of file SymbolicExpressionParser.h.
|
inlineprotected |
Definition at line 425 of file SymbolicExpressionParser.h.
|
inline |
Mapping between terms and variables.
Definition at line 432 of file SymbolicExpressionParser.h.
|
overridevirtual |
Expand a parsed atom into some other expression.
This method takes a token parsed from the input and optionally replaces it with some other expression. For instance, a subclass that recognizes the token "true" would replace it with a single-bit constant 1. If this object does not recognize the token, it should return a null pointer. This phase of expansion occurs immediately during parsing; a second phase may occur later.
Implements Rose::BinaryAnalysis::SymbolicExpressionParser::AtomExpansion.