Lem parser = null;  try { parser = new Lem(); model = parser.parse( getInputStream( args ) );    System.err.println("Input file is VALID LEM.");   } catch ( ParseException e) { System.err.println("Doh! ... got " + e.getClass().getName() );  Token token = e.currentToken.next; printSourceLine( token ); System.err.println(e.getMessage()); } catch ( LemException e ) {  System.err.println("Oops! ... got " + e.getClass().getName() );  Token token = e.getToken(); printSourceLine( token ); System.err.println(e.getMessage()); System.err.println( e.getExplanation() );  } catch (Throwable e) {    System.err.println("Ouch! ... got " + e.getClass().getName() ); System.err.println(e.getMessage()); e.printStackTrace(); usage( null ); }
    public static void main(String args[]) {                        Model model = null;                // print a copyright notice                copyrightNotice();        checkOptions( args );                // create a LemParser to parse the input file                Lem parser = null;        try {                        parser = new Lem();            model = parser.parse( getInputStream( args ) );                        // if no exceptions were thrown, then the input stream is valid LEM                        System.err.println("Input file is VALID LEM.");                        // all done ... bit of an anti-climax really!                    } catch ( ParseException e) {            System.err.println("Doh! ... got " + e.getClass().getName() );                        /*parser.*/Token token = e.currentToken.next;            printSourceLine( token );            System.err.println(e.getMessage());        } catch ( LemException e ) {            System.err.println("Oops! ... got " + e.getClass().getName() );                        Token token = e.getToken();            printSourceLine( token );            System.err.println(e.getMessage());            System.err.println( e.getExplanation() );        } catch (Throwable e) {                        // report any exception thrown during LEM parsing or model building                        System.err.println("Ouch! ... got " + e.getClass().getName() );            System.err.println(e.getMessage());            e.printStackTrace();            usage( null );        }                System.exit( 0 );    }