00001 #ifndef CK_CPARSEDFILE_H 00002 #define CK_CPARSEDFILE_H 00003 00004 #include "CEntry.h" 00005 #include "EToken.h" 00006 #include "sdag-globals.h" 00007 #include "xi-symbol.h" 00008 #include <list> 00009 00010 namespace xi { 00011 00012 class Chare; 00013 class Entry; 00014 00015 class CParsedFile { 00016 private: 00017 void mapCEntry(); // search and check if all functions in when() are defined. 00018 void generateConnectEntryList(void); 00019 void generateEntryList(void); // collect and setup CEntry list for When and If 00020 void generateCode(XStr& decls, XStr& defs); 00021 void generateEntries(XStr& decls, XStr& defs); 00022 void generateConnectEntries(XStr& output); 00023 void generateInitFunction(XStr& decls, XStr& defs); 00024 void generatePupFunction(XStr& decls, XStr& defs); 00025 void generateTraceEp(XStr& decls, XStr& defs); 00026 void generateRegisterEp(XStr& decls, XStr& defs); 00027 void generateDependencyMergePoints(XStr& output); 00028 std::list<Entry*> nodeList; 00029 std::list<CEntry*> entryList; 00030 std::list<SdagConstruct*> connectEntryList; 00031 Chare* container; 00032 00033 public: 00034 static XStr* className; 00035 CParsedFile(Chare* c) : container(c) {} 00036 ~CParsedFile(void) {} 00037 void print(int indent); 00038 void addNode(Entry* e) { nodeList.push_back(e); } 00039 void doProcess(XStr& classname, XStr& decls, XStr& defs); 00040 }; 00041 00042 } // namespace xi 00043 00044 #endif