`
const char *HardCodePrint1 =
"0: LDC 0,1(0)"
"1: OUT 0,0,0"
"2: HALT 0,0,0";
const char *HardCodeASTPrint1 = " ";
void Register(line, code, r1,r2,r3, comment = "") {
registerStr = r1",",r2,","r3;
cout << (line,code,registerStr,comment) <<
}
void Register2(line, code, r1,difference,r2,comment) {
registerStr2 = r1","difference"("r2")";
cout << (line,code,registerStr2,comment);
}
void args(node){
if (node == "program") {
//to do
}
}
void print(line,HardCodeASTPrint1) {
Register2(line,"LDC",0,1,0, "where comment should be")
line += 1;
for (i in range(2)) {
Register(line,"OUT",0,0,0,"comment");
line += 1;
}
Register(line,"HALT",0,0,0,"comment");
}`
`
const char *HardCodePrint1 =
"0: LDC 0,1(0)"
"1: OUT 0,0,0"
"2: HALT 0,0,0";
const char *HardCodeASTPrint1 = " ";
void Register(line, code, r1,r2,r3, comment = "") {
registerStr = r1",",r2,","r3;
cout << (line,code,registerStr,comment) <<
}
void Register2(line, code, r1,difference,r2,comment) {
registerStr2 = r1","difference"("r2")";
cout << (line,code,registerStr2,comment);
}
void args(node){
if (node == "program") {
//to do
}
}
void print(line,HardCodeASTPrint1) {
Register2(line,"LDC",0,1,0, "where comment should be")
line += 1;
for (i in range(2)) {
Register(line,"OUT",0,0,0,"comment");
line += 1;
}
Register(line,"HALT",0,0,0,"comment");
}`