ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
arrIndexLabeler.h
Go to the documentation of this file.
1 #ifndef ARR_INDEX_LABELER_H
2 #define ARR_INDEX_LABELER_H
3 
4 #include <sage3.h>
5 #include <list>
6 
7 namespace arrIndexLabeler {
8 
9 // labels the portion of the AST rooted at root with annotations that identify the various portions
10 // the read/write sides of SgAssignOp nodes (if they are)
12 
13 // returns true if the given node is part of an array index expression and false otherwise
14 bool isArrayIndex(SgNode* n);
15 
16 // returns true the given SgPntrArrRefExp node this is a top-level SgPntrArrRefExp that is not part
17 // of a larger SgPntrArrRefExp
18 // (i.e. given a[b[i][j]][k][l], it is either a[b[i][j]][k][l] or b[i][j])
19 bool isTopArrayRefExp(const SgNode* n);
20 
21 // returns the SgExpression node that contains the name of the array in the given SgPntrArrRefExp or
22 // NULL if the node is not a SgPntrArrRefExp
24 
25 // returns the dimensionality of the array reference in the given SgPntrArrRefExp
27 
28 // returns the list of index expressionf in the given SgPntrArrRefExp
29  std::list<SgExpression*>& getArrayIndexExprs(SgPntrArrRefExp* n);
30 }
31 #endif