Move Cephelepod into deprecated_compiler, create captian.sh to handle bootstrapping kraken from backup or from Cephelepod
This commit is contained in:
48
deprecated_compiler/include/Importer.h
Normal file
48
deprecated_compiler/include/Importer.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef __IMPORTER__H_
|
||||
#define __IMPORTER__H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "Parser.h"
|
||||
#include "NodeTree.h"
|
||||
#include "ASTData.h"
|
||||
#include "Symbol.h"
|
||||
#include "RemovalTransformation.h"
|
||||
#include "CollapseTransformation.h"
|
||||
#include "ASTTransformation.h"
|
||||
|
||||
class ASTTransformation;
|
||||
|
||||
class Importer {
|
||||
public:
|
||||
Importer(Parser* parserIn, std::vector<std::string> includePaths, std::string outputName, bool only_parseIn = false);
|
||||
~Importer();
|
||||
void import(std::string fileName);
|
||||
NodeTree<ASTData>* getUnit(std::string fileName);
|
||||
NodeTree<ASTData>* importFirstPass(std::string fileName);
|
||||
NodeTree<Symbol>* parseAndTrim(std::string fileName);
|
||||
void registerAST(std::string name, NodeTree<ASTData>* ast, NodeTree<Symbol>* syntaxTree);
|
||||
std::map<std::string, NodeTree<ASTData>*> getASTMap();
|
||||
private:
|
||||
std::string outputName;
|
||||
ASTTransformation *ASTTransformer;
|
||||
struct importTriplet {
|
||||
std::string name;
|
||||
NodeTree<ASTData>* ast;
|
||||
NodeTree<Symbol>* syntaxTree;
|
||||
};
|
||||
bool only_parse;
|
||||
std::vector<importTriplet> importedTrips;
|
||||
std::vector<std::string> includePaths;
|
||||
Parser* parser;
|
||||
std::vector<Symbol> removeSymbols;
|
||||
std::vector<Symbol> collapseSymbols;
|
||||
std::map<std::string, NodeTree<ASTData>*> imported;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user