00001 // Author: Markus Schordan 00002 // $Id: AstNodePtrs.h,v 1.3 2008/01/08 02:56:38 dquinlan Exp $ 00003 00004 #ifndef ASTNODEPTRS_H 00005 #define ASTNODEPTRS_H 00006 00007 #include <string> 00008 #include <iomanip> 00009 #include "AstProcessing.h" 00010 00011 // DQ (8/10/2004): 00012 // This class appears to return a list of all traversed AST nodes. It is equivalent to the 00013 // AstQuery operator with the input variant V_SgNode. Not sure how important this mechanism 00014 // is (appears to be used in ASTConsistencyTests.[Ch]). 00015 00016 struct AstNodePtrSynAttr 00017 { 00018 SgNode* node; 00019 AstNodePtrSynAttr() { node = NULL; } 00020 }; 00021 00022 class AstNodePtrs : public SgBottomUpProcessing<AstNodePtrSynAttr> 00023 { 00024 public: 00025 AstNodePtrs(); 00026 ~AstNodePtrs(); 00027 protected: 00028 typedef std::vector<SgNode*> AstNodePointersList; 00029 virtual AstNodePtrSynAttr evaluateSynthesizedAttribute(SgNode* node, SynthesizedAttributesList ); 00030 virtual void visitWithAstNodePointersList(SgNode* node, AstNodePointersList l) {} 00031 private: 00032 }; 00033 00034 #endif
1.4.7