| | |
| | | for (std::vector<Line_Word*>::size_type j = 0; j < t->size(); j++) { |
| | | delete (*t)[j]; |
| | | } |
| | | table[i]->clear(); |
| | | t->clear(); |
| | | delete t; |
| | | } |
| | | table.clear(); |
| | | } |
| | |
| | | |
| | | class gen: public ast_visitor { |
| | | public: |
| | | virtual ~gen()=default; |
| | | virtual void set_file(std::string file_name)=0; |
| | | virtual void* visit_Document(Document *d)=0; |
| | | virtual void* visit_Block_Table(Block_Table *bt)=0; |
| | |
| | | { |
| | | Document *d; |
| | | parser *p = new tester(); |
| | | gen *g = new dot_gen(); |
| | | dot_gen *g = new dot_gen(); |
| | | g->set_file("temp.dot"); |
| | | d = p->parse(); |
| | | d->visit(g); |