this.resource = resource;
InputStream is = resource.getInputStream();
String encoding = resource instanceof InternalResource ? ((InternalResource) resource).getEncoding() : null;
lexer = buildLexer(is, encoding, languageLevel);
DRLParser parser = buildParser(lexer, languageLevel);
return compile(isEditor, parser);
}