try
{
ifstream file("clock.txt");
if (file.is_open())
{
const Rule* clock = Parser::parse("Clock", file);
Clock24To12 visitor;
clock->accept(visitor);
}
}
catch (ParserException& e)
{
cout << "parser error: " << e.what() << endl;
}
catch (exception& e)
{
cout << "error: " << e.what() << endl;
}