blob: d76f11a05fc41fd22f50bb770a2ab2056f4cfbe4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include "Parser.h"
void Parser::parse(string input) const {
std::cout << input << std::endl;
}
istream & Parser::parse(const Parser & parser, istream & s) const {
string temp(std::istreambuf_iterator<char>(s), {});
parse(temp);
return s;
}
istream & operator >> (istream & s, const Parser & parser) {
return parser.parse(parser, s);
}
istream & operator << (const Parser & parser, istream & s) {
return parser.parse(parser, s);
}
|