public void addPackageFromDslr( final Resource resource ) throws DroolsParserException,
IOException {
this.resource = resource;
final DrlParser parser = new DrlParser();
DefaultExpander expander = getDslExpander();
try {
if ( expander == null ) {
expander = new DefaultExpander();
}
String str = expander.expand( resource.getReader() );
if ( expander.hasErrors() ) {
this.results.addAll( expander.getErrors() );
}
final PackageDescr pkg = parser.parse( str );
this.results.addAll( parser.getErrors() );
if ( !parser.hasErrors() ) {