How to parse an LC3 assembly string?

I'm having trouble coming up with the concept for parsing an LC3 assembly string. I want the user to input a string: "4 + 3 = " or "22 * 33 = ", and have the program run it like a calculator. I need a space in between each operand/operator, and my understanding is that I use the time between two GETC functions allows me to manipulate the data I have, but I'm just lost on the concept on what needs to be done.