Question: How would I write this in ML? Any help and explanation would be appreciated. Write an ML function named parse : string token list that

How would I write this in ML? Any help and explanation would be appreciated.
Write an ML function named parse : string token list that inputs the name of a text file. The file will contain a sequence of characters representing a (not necessarily proper) assignment statement. Your function will parse the text file character by character. The output will be a list of tokens that classify each type of word that was read in the file. The following tables shows all the possible words and their tokens. For example, if the text file is named input.txt and contains: profit=Revenuecost Then your function should work as follows: - parse("input.txt"); val it = [ID "profit", EQ, ID "Revenue", MI, ID "cost"] : token list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
