Stanford University: Keith Schwarz's "Top-Down Parsing"

Read slide 4. The first bullet is a requirement statement and the third bullet is a function statement. An additional function is the output of meaningful and accurate messages, including error messages.