This is a text file that I am reading into my program. I need to read each line and into a string and then split the string so that I can store for example, the PROG: label into a label variable and START into a symbol variable and #0 into the operand variable. The goal at the end is to store this information into a binary search tree. The problem here is that some of the lines do not contain any label therefore I am not sure how to solve that problem.
PROG: START #0
ONE: FIX
COMPR S,T
LDL #10
STB TWO,X
SVC #5
TWO: NORM
END ONE
Aucun commentaire:
Enregistrer un commentaire