[aspectc-user] puma usage :: retrieving scope info dtls from classdb
Terry
zhenrong.yang at gmail.com
Wed Jan 24 05:08:13 CET 2007
Hi,
This is regarding the usage of the Puma library.
The goal I intended to achieve is to find the starting and ending
nodes/tokens on the AST for a specific scope.
So, here are the steps I've taken:
1. produce the parse tree
Puma::CCParser parser;
Puma::CTranslationUnit* tu = parser.parse(*unit, project);
2. conduct further semantic analysis
Puma::CCSemVisitor semantics(err);
semantics.run(tu->tree());
3. I am interested in "attributes", so I use an "attribute" (generally a
variable) for instance. I tried to get the info I expected.
3.1 I obtained a pointer to the attribute info from the class database thru
"Puma::CAttributeInfo *pAttrInfo"
3.2 I obtained a pointer to the scope info of this attribute thru
"Puma::CScopeInfo * pScopeInfo = pAttrInfo->ObjectInfo()->Scope()"
3.3 I obtained a pointer to source info for the above scope thru
"Puma::CSourceInfo * pSrcInfo = pScopeInfo->SourceInfo()"
3.4 (where the problem lies) I tried to get the start token of this scope
thru
"Puma::CT_Token * pCTToken = pSrcInfo->StartToken()",
YET I kept receiving a null pointer for pCTToken.
If anyone knows how to address problem, please show me the right steps.
Thanks a lot!
Terry Yang
Computer Security Laboratory
Concordia Institute for Information Systems Security
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20070123/cbcca7d5/attachment.html>
More information about the aspectc-user
mailing list