Remove main from c++ template

This commit is contained in:
Robin Jadoul 2016-05-27 17:20:55 +02:00
parent a6cf6b7372
commit 48ed58f077
1 changed files with 0 additions and 16 deletions

View File

@ -88,19 +88,3 @@ char {{name}}::peek() {
std::size_t {{name}}::getByteOffset() {
return m_offset;
}
//Temporary main
int main(int argc, char** argv) {
std::istringstream in(argv[1]);
{{name}} lex(in);
try {
while (true)
std::cout << "Match: " << lex.nextToken().content << std::endl;
}
catch ({{name}}::NoMoreTokens& err) {
std::cout << "DONE, read " << lex.getByteOffset() << " bytes." << std::endl;
}
catch ({{name}}::NoMatch& err) {
std::cout << "No match, " << lex.getByteOffset() << std::endl;
}
}