Hello everyone. I have to make a compiler that will print out the given expression as a set of assembly operations. I have the following:
As input (string) we have arithmetical expression (only =, +, * and () operands) and as an output it should print the expression in the form of a pseudo-assembler. So far, I've managed to split all the tokens from the string, but have some difficulties with coding the next part. I tried with checking if each token issalpha() or ispunct() and corresponding to that to print what is desired, but still cannot get the right thing (type conversions get in the way). Any suggestions will be welcomed.