Convenience constructor
Brought to you by:
fbb
The generated parser.h file should include a convenience constructor of the following form:
parser(std::istream &in = std::cin):d_scanner(in){}
This would make parsing on any istream extremely easy (without additional work on the programmer's part). Since istreams represent everything from interactive terminals to file streams, the constructor serves as a great generic interface for the parser. In addition, the default constructor would still create a parser on std::cin.