Scanner scanner = null;
try {
scanner = new Scanner(resourceNameFromClass, reader);
final Java.CompilationUnit unit = new Parser(scanner).parseCompilationUnit();
final UnitCompiler uc = new UnitCompiler(unit, this);
uc.setCompileErrorHandler(new ErrorHandler() {
public void handleError(final String pMessage, final Location pOptionalLocation) throws CompileException {
final CompilationProblem problem = new JaninoCompilationProblem(pOptionalLocation, pMessage, true);
if (problemHandler != null) {
problemHandler.handle(problem);
}