Parsec implementation in C++