This class simplifies the development of queries on the AST resulting in a list of AST nodes.This class holds functions that are generally useful for a broad cross-section of transformations. Functionality specific to any specific transformation should be represented in a similar transformation support class that is a part of the preprocessor source code representing that specific transformation.
More...
|
static std::string | stringifyOperator (std::string name) |
| generates a source code string from operator name. More...
|
|
static operatorCodeType | classifyOverloadedOperator (std::string name, int numberOfParameters=0, bool prefixOperator=false) |
| Classifies operator and returns an operatorCodeType value (useful for switch statements). More...
|
|
static std::string | buildOperatorString (SgNode *astNode) |
| Return string representing operator node in AST. More...
|
|
static std::string | getFunctionName (SgFunctionCallExp *functionCallExp) |
| Get the string representing the function name (should be added to Sage III interface). More...
|
|
static std::string | getTypeName (SgType *type) |
| Get the string representing the type name (should be added to Sage III interface). More...
|
|
static std::string | getFunctionTypeName (SgFunctionCallExp *functionCallExpression) |
| Similar to getFunctionName(SgNode* astNode) above, but for member functions. More...
|
|
static std::string | buildMacro (std::string s) |
| wrap any string representing a macro into something that the unparser will unparse as a macro definition More...
|
|
static std::string | internalSupportingGlobalDeclarations (SgNode *astNode, std::string prefixString) |
| Builds variable declarations for all variable and types defined in subtree at astNode. More...
|
|
static SgProject * | getProject (const SgNode *astNode) |
|
static SgDirectory * | getDirectory (const SgNode *astNode) |
|
static SgFile * | getFile (const SgNode *astNode) |
|
static SgSourceFile * | getSourceFile (const SgNode *astNode) |
|
static SgBinaryComposite * | getBinaryFile (const SgNode *astNode) |
|
static SgGlobal * | getGlobalScope (const SgNode *astNode) |
|
static SgStatement * | getStatement (const SgNode *astNode) |
|
static SgFunctionDeclaration * | getFunctionDeclaration (const SgNode *astNode) |
|
static SgFunctionDefinition * | getFunctionDefinition (const SgNode *astNode) |
|
static SgClassDefinition * | getClassDefinition (const SgNode *astNode) |
|
static SgModuleStatement * | getModuleStatement (const SgNode *astNode) |
|
static SgDeclarationStatement * | getTemplateDeclaration (const SgNode *astNode) |
|
|
Supporting functions for reading transformation specifications (hints)
Preprocessors can optionally retrive hints embedded within the user's application. The mechanism is useful to provide additional information used to make more sophisticated optimizations than the knowledge of the semantics of abstractions might provide. It also is a way to pass on information as a substitution for program analysis.
|
static void | getTransformationOptions (SgNode *astNode, std::list< OptionDeclaration > &variableNameList, std::string identifingTypeName) |
| This interface permits a more general specification of options using strings to identify the options and values to associate with the identified option. More...
|
|
static void | getTransformationOptions (SgNode *astNode, std::list< int > &variableNameList, std::string identifingTypeName) |
| Get the list<int> of options (if any are specified). More...
|
|
static void | getTransformationOptionsFromVariableDeclarationConstructorArguments (SgVariableDeclaration *variableDeclaration, std::list< int > &returnList) |
| Function used internally (for list<int> interface) More...
|
|
static void | getTransformationOptionsFromVariableDeclarationConstructorArguments (SgVariableDeclaration *variableDeclaration, std::list< OptionDeclaration > &returnList) |
| Function used internally (used with list<string> version of interface) More...
|
|
This class simplifies the development of queries on the AST resulting in a list of AST nodes.
This class holds functions that are generally useful for a broad cross-section of transformations. Functionality specific to any specific transformation should be represented in a similar transformation support class that is a part of the preprocessor source code representing that specific transformation.
Definition at line 24 of file transformationSupport.h.
Enum values required to classify all possible overloaded C++ operators.
Enum value supports the conversion of overloaded function names --> operator codes used to
distiguish different sorts of transformations for each catagory of overloaded function.
We could not use the Cxx_GrammarVariants enum since it does not contain a classification for operator() and operator[].
Enumerator |
---|
FUNCTION_CALL_OPERATOR_CODE |
normal function call (used as the default value)
|
ADD_OPERATOR_CODE |
|
SUBT_OPERATOR_CODE |
|
MULT_OPERATOR_CODE |
|
DIV_OPERATOR_CODE |
|
INTEGER_DIV_OPERATOR_CODE |
|
MOD_OPERATOR_CODE |
|
AND_OPERATOR_CODE |
|
OR_OPERATOR_CODE |
|
BITXOR_OPERATOR_CODE |
|
BITAND_OPERATOR_CODE |
|
BITOR_OPERATOR_CODE |
|
EQ_OPERATOR_CODE |
|
LT_OPERATOR_CODE |
|
GT_OPERATOR_CODE |
|
NE_OPERATOR_CODE |
|
LE_OPERATOR_CODE |
|
GE_OPERATOR_CODE |
|
ASSIGN_OPERATOR_CODE |
|
PLUS_ASSIGN_OPERATOR_CODE |
|
MINUS_ASSIGN_OPERATOR_CODE |
|
AND_ASSIGN_OPERATOR_CODE |
|
IOR_ASSIGN_OPERATOR_CODE |
|
MULT_ASSIGN_OPERATOR_CODE |
|
DIV_ASSIGN_OPERATOR_CODE |
|
MOD_ASSIGN_OPERATOR_CODE |
|
XOR_ASSIGN_OPERATOR_CODE |
|
PARENTHESIS_OPERATOR_CODE |
|
BRACKET_OPERATOR_CODE |
|
NOT_OPERATOR_CODE |
|
DEREFERENCE_OPERATOR_CODE |
|
ADDRESS_OPERATOR_CODE |
|
LSHIFT_OPERATOR_CODE |
|
RSHIFT_OPERATOR_CODE |
|
LSHIFT_ASSIGN_OPERATOR_CODE |
|
RSHIFT_ASSIGN_OPERATOR_CODE |
|
PREFIX_PLUSPLUS_OPERATOR_CODE |
|
POSTFIX_PLUSPLUS_OPERATOR_CODE |
|
PREFIX_MINUSMINUS_OPERATOR_CODE |
|
POSTFIX_MINUSMINUS_OPERATOR_CODE |
|
OPERATOR_CODE_LAST_TAG |
|
Definition at line 37 of file transformationSupport.h.