Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef sourceCommandType tuple<string,string,string,string>;
- // sourceCommands are in the format of (label, statement, op1, op2)
- // they can be parsed from the input text box, or from QtJsonObjects (which are read from the compiled file
- class program {
- public:
- int compile(vector<sourceCommandType> sourceCommands) {
- foreach(sourceCommand in sourceCommands) {
- statement = makeStatement(sourceCommand);
- }
- }
- int execute();
- QtJsonObject export();
- private:
- makeStatement(sourceCommandType sourceCommand) {
- }
- // various maps for converting from string identifiers to statement objects, labels, etc
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement