summaryrefslogtreecommitdiffstats
path: root/sdmaasm/instructionparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'sdmaasm/instructionparser.h')
-rwxr-xr-xsdmaasm/instructionparser.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/sdmaasm/instructionparser.h b/sdmaasm/instructionparser.h
new file mode 100755
index 0000000..ed458f8
--- /dev/null
+++ b/sdmaasm/instructionparser.h
@@ -0,0 +1,26 @@
+#ifndef INSTRUCTIONPARSER_H
+#define INSTRUCTIONPARSER_H
+
+#include "instructionlist.h"
+#include "instruction.h"
+
+using namespace std;
+
+class InstructionParser
+{
+private:
+ InstructionList *instructions;
+ vector<string> programLines;
+ vector<string> programLinesBinary;
+ //Instruction* getInstruction(const string &instruction);
+ void programLinesToBinary();
+ void binaryToProgramLines();
+public:
+ InstructionParser(InstructionList *il);
+ void readProgramLines(const string &filename);
+ void readTextBlob(const string &filename);
+ void binaryOutputToFile(const string &filename);
+ void instructionOutputToFile(const string &filename);
+};
+
+#endif // INSTRUCTIONPARSER_H