2013-12-31 23:43:49 -06:00
|
|
|
#ifndef __IMPORTER__H_
|
|
|
|
|
#define __IMPORTER__H_
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <fstream>
|
|
|
|
|
|
|
|
|
|
#include "Parser.h"
|
|
|
|
|
#include "NodeTree.h"
|
|
|
|
|
#include "ASTData.h"
|
|
|
|
|
#include "Symbol.h"
|
|
|
|
|
#include "RemovalTransformation.h"
|
|
|
|
|
#include "CollapseTransformation.h"
|
|
|
|
|
#include "ASTTransformation.h"
|
|
|
|
|
|
|
|
|
|
class Importer {
|
|
|
|
|
public:
|
2014-05-01 01:18:01 -04:00
|
|
|
Importer(Parser* parserIn, std::vector<std::string> includePaths);
|
2013-12-31 23:43:49 -06:00
|
|
|
~Importer();
|
|
|
|
|
NodeTree<ASTData>* import(std::string fileName);
|
2014-01-01 17:29:19 -06:00
|
|
|
std::map<std::string, NodeTree<ASTData>*> getASTMap();
|
2013-12-31 23:43:49 -06:00
|
|
|
private:
|
2014-05-01 01:18:01 -04:00
|
|
|
std::vector<std::string> includePaths;
|
2013-12-31 23:43:49 -06:00
|
|
|
Parser* parser;
|
|
|
|
|
std::vector<Symbol> removeSymbols;
|
|
|
|
|
std::vector<Symbol> collapseSymbols;
|
2014-01-01 17:29:19 -06:00
|
|
|
std::map<std::string, NodeTree<ASTData>*> imported;
|
2013-12-31 23:43:49 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|