try
{
Rule clock =
Parser.Parse(
"clock",
new FileStream("clock.txt", FileMode.Open));
Clock24To12 visitor = new Clock24To12();
clock.Accept(visitor);
}
catch (ArgumentException e)
{
System.Console.WriteLine("argument error: " + e.Message);
}
catch (IOException e)
{
System.Console.WriteLine("io error: " + e.Message);
}
catch (ParserException e)
{
System.Console.WriteLine("parser error: " + e.Message);
}
catch (Exception e)
{
System.Console.WriteLine("error: " + e.Message);
}