//-*-java-*- Main { public static void main(String[] args) throws ParseException {{ Weaver.weave(args); Weaver.generate(); Weaver.reset(); // just to be nice }} } Err { (@ private static boolean shhh = false; private static int num_errors = 0; private static int num_warnings = 0; private static int num_bugs = 0; // :P @) static void beQuiet() (@ shhh = true; @) static void bug(String s) (@ System.err.println("You found a bug in the Weaver: "+s); System.err.println("\nMail josh about it."); num_bugs++; @) static void err(String s) (@ System.err.println("Weaver ERROR: "+s); num_errors++; @) static void warn(String s) (@ if(!shhh) { System.err.println("Weaver WARNING: "+s); num_warnings++; } @) static boolean report() {{ if(num_warnings > 0) System.err.println(""+num_warnings+" warnings."); if(num_errors > 0) System.err.println(""+num_errors+" errors."); if(num_bugs > 0) System.err.println(""+num_bugs+" BUGS. Junk."); if(num_errors+num_bugs > 0) { System.err.println("Abort."); return false; } return true; }} static void reset() {{ num_warnings = num_errors = num_bugs = 0; shhh = false; }} }