![]() |
![]() |
Functions | |
template<class T > | |
void | ArgList2Vector (CNode *n, NodeOp_t op, int argNumber, vector< T > &v) |
Walks a list of nodes and collects the specified augments of a given node type. | |
void | EList2VectorExclude (CNode *n, const set< NodeOp_t > &excludeOps, vector< CNode * > &v) |
Walks an expression elist of nodes and collects the subtrees that don't match the given node types. | |
void | List2VectorExclude (CNode *n, const set< NodeOp_t > &excludeOps, vector< CNode * > &v) |
Walks an expression list of nodes and collects the subtrees that don't match the given node types. | |
CNode * | Vector2EList (const vector< CNode * > &v) |
Converts a vector array of CNode* into a linked ELIST of the elements. | |
CNode * | List2EList (list< CNode * > &v) |
Converts a list of CNode* into a linked ELIST of the elements. | |
int | ListCount (CNode *n, NodeOp_t op) |
Walks a list/elist of nodes and counts the number of node with the specified operation. | |
int | ListCount (CNode *n) |
Walks a list/elist of nodes and counts the number of non-list nodes. | |
void | AnalyseModules (CNode *codeList, set< CModule * > &allModules, set< CModule * > &topLevelModules, set< CModule * > &leafModules, set< CModule * > &undefinedModules, map< CModule *, CNode * > &module2Comments) |
Analyse module declarations in parse tree. |
void AnalyseModules | ( | CNode * | codeList, |
set< CModule * > & | allModules, | ||
set< CModule * > & | topLevelModules, | ||
set< CModule * > & | leafModules, | ||
set< CModule * > & | undefinedModules, | ||
map< CModule *, CNode * > & | module2Comments | ||
) |
Analyse module declarations in parse tree.
codeList | parse tree to anaylse. |
allModules | add all module declarations to set. |
topLevelModules | add all toplevel module declarations to set. |
leafModules | add all leaf module declarations to set. |
undefinedModules | add undefined module declarations to set. |
module2Comments | map to load associating all comments before module with the given module. |
void ArgList2Vector | ( | CNode * | n, |
NodeOp_t | op, | ||
int | argNumber, | ||
vector< T > & | v | ||
) |
Walks a list of nodes and collects the specified augments of a given node type.
Results are returned as elements of an stl vector.
n | tree to traverse. |
op | operation to search for. |
argNumber | argument number to return. |
v | containter to return results. |
void EList2VectorExclude | ( | CNode * | n, |
const set< NodeOp_t > & | excludeOps, | ||
vector< CNode * > & | v | ||
) | [inline] |
Walks an expression elist of nodes and collects the subtrees that don't match the given node types.
Results are returned as elements of an stl vector.
n | tree to traverse. |
excludeOps | operations to exclude from search |
v | containter to return results. |
CNode* List2EList | ( | list< CNode * > & | v | ) | [inline] |
Converts a list of CNode* into a linked ELIST of the elements.
v | list to convert. |
void List2VectorExclude | ( | CNode * | n, |
const set< NodeOp_t > & | excludeOps, | ||
vector< CNode * > & | v | ||
) | [inline] |
Walks an expression list of nodes and collects the subtrees that don't match the given node types.
Results are returned as elements of an stl vector.
n | tree to traverse. |
excludeOps | operations to exclude from search |
v | containter to return results. |
Walks a list/elist of nodes and counts the number of node with the specified operation.
n | tree to traverse. |
op | operation to search for. |
Walks a list/elist of nodes and counts the number of non-list nodes.
n | tree to traverse. |
CNode* Vector2EList | ( | const vector< CNode * > & | v | ) | [inline] |
Converts a vector array of CNode* into a linked ELIST of the elements.
v | vector array to convert. |