I am having difficulty correctly tokeninzing a file that is read in.
I am taking an Assembler class, but we are to write a scanner program in C. Each terminal needs to be recoginized and printed on a separate line. Terminals can include ( : ) , ; + - * / as well as words. I have been able to tokenize the file using the space or new line (\n) as a delimiter, but cannot figure out how to use the above symbols as the delimiters also. If I add them to the "sep" definition, they do not print.
How can I instruct the program to identify the terminals above, print them and go on to the next part of the file?
Any assistance or a point in the right direction would be greatly appreciated!
I have attached a text file that shows the program, the output and the original text file.