I haven't made it recognize all of the cases. It still gets a few wrong, but usually it'll just say FAILURE when it can't solve it.
As the page says, it's just a ~300 line grammar file and a parser-generator with syntax directed translation to solve the questions.