| | |
| | | #ifndef DOT_H |
| | | #define DOT_H |
| | | #include <fstream> |
| | | #include "../ast.h" |
| | | #include "../gens.h" |
| | | #include <fstream> |
| | | |
| | | class dot_gen: public gen { |
| | | class dot_gen : public gen |
| | | { |
| | | std::ofstream out; |
| | | int node_cnt; |
| | | public: |
| | | |
| | | public: |
| | | ~dot_gen(); |
| | | void set_file(std::string file_name); |
| | | std::string* new_node(); |
| | | void* visit_Document(Document *d); |
| | | void* visit_Block_Table(Block_Table *bt); |
| | | void* visit_Block_Code(Block_Code *bc); |
| | | void* visit_Block_Line(Block_Line *bl); |
| | | void* visit_Heading(Heading *h); |
| | | void* visit_List(List *l); |
| | | void* visit_MathDisp(MathDisp *md); |
| | | void* visit_Line_Word(Line_Word *lw); |
| | | void* visit_MathInline(MathInline *mi); |
| | | void* visit_Link(Link *l); |
| | | void* visit_Text(Text *t); |
| | | void* visit_Format_Bold(Format_Bold *fb); |
| | | void* visit_Format_Italic(Format_Italic *fi); |
| | | void* visit_Format_Verbatim(Format_Verbatim *fv); |
| | | std::string *new_node(); |
| | | void *visit_Document(Document *d); |
| | | void *visit_Block_Table(Block_Table *bt); |
| | | void *visit_Block_Code(Block_Code *bc); |
| | | void *visit_Block_Word(Block_Word *bl); |
| | | void *visit_Heading(Heading *h); |
| | | void *visit_List(List *l); |
| | | void *visit_MathDisp(MathDisp *md); |
| | | void *visit_Line_Word(Line_Word *lw); |
| | | void *visit_MathInline(MathInline *mi); |
| | | void *visit_Link(Link *l); |
| | | void *visit_Text(Text *t); |
| | | void *visit_Format_Bold(Format_Bold *fb); |
| | | void *visit_Format_Italic(Format_Italic *fi); |
| | | void *visit_Format_Verbatim(Format_Verbatim *fv); |
| | | void *visit_Format_Strikethrough(Format_Strikethrough *fs); |
| | | void *visit_Format_Underline(Format_Underline *fu); |
| | | }; |
| | | #endif |