#include "../include/parser.h" #include "../include/types.h" #include using namespace std; int main(int argc, char** argv) { int blah = 0; struct Command * foo; if ( argc != 2 ) { cout << "Usage cmdparse \n"; exit(1); } parseAlgo(argv[1], foo, blah); for (int i = 0; i < blah; i++) { cout << (unsigned short)foo[i].opcode << " " << (unsigned short)foo[i].arg << " " << foo[i].st1 << " " << foo[i].st2 << endl; } cout << endl << "Lines: " << blah << endl; return 0; }