Please grab the zip file, which contains a folder called hw2, which contains all the files required for this homework.
Start by looking at the README, and then at the file hw2.sml.
Turn in two files to the dropbox:
Your solutions to this homework must use pattern matching. In particular, you may not use the functions null, hd, tl, #1, or #2. We will cover idiomatic ways of accessing elements of a pair in lecture on 1/18/17, or you can look at Dan's reading notes.
1/19/17 6:20pm: (Only relevant to tokenizing challenge problems.) Fixed a subtle bug in consume_num, which caused it to behave incorrectly near the end of a character list. It would incorrectly consume the number, but also leave it in the character list. This could cause tokenize_char_list to loop forever, successfully consuming the same number over and over again.
I also added a few tests for consume_num
1/19/17 11:30pm: (Only relevant to tokenizing challenge problems.) Updated spec of consume_string to require that lexical_error be called if an unterminated string literal is encountered.