Code example for PushbackReader

0
        //LOG.debug("OCL: " + ocl); 
        if (ocl.contains("ore")) {
            // TODO: Convert this to some sensible logging 
            System.out.println("VOILA!");
        } 
        Lexer lexer = new Lexer(new PushbackReader(new StringReader(
                "context X inv: " + ocl), 2));
        OclParser parser = new OclParser(lexer);
        Start tree = null;
         
        try { 
            tree = parser.parse();
        } catch (Exception e) {
            throw new InvalidOclException(ocl);
        } 
         
        EvaluateExpression ee = new EvaluateExpression(vt, mi);
        tree.apply(ee);
        return ee.getValue();
    }