re-write to c++11 (parsing c++ like code), from Ronald Mak's 1996 Compiler book.