try
{
Rule clock = Parser.parse("clock", new File("clock.txt"));
Clock24To12 visitor = new Clock24To12();
clock.accept(visitor);
}
catch (IllegalArgumentException e)
{
System.out.println("argument error: " + e.getMessage());
}
catch (IOException e)
{
System.out.println("io error: " + e.getMessage());
}
catch (ParserException e)
{
System.out.println("parser error: " + e.getMessage());
}