A simple parser written in C++ for a final exam in an introductory course on programming