use of org.drools.compiler.lang.DRLParser in project drools by kiegroup.
the class DrlParser method parse.
public PackageDescr parse(final boolean isEditor, final Resource resource, final InputStream is) throws DroolsParserException, IOException {
this.resource = resource;
String encoding = resource instanceof InternalResource ? ((InternalResource) resource).getEncoding() : null;
lexer = buildLexer(is, encoding, languageLevel);
DRLParser parser = buildParser(lexer, languageLevel);
return compile(isEditor, parser);
}
use of org.drools.compiler.lang.DRLParser in project drools by kiegroup.
the class DrlParser method parse.
public PackageDescr parse(final boolean isEditor, final Reader reader) throws DroolsParserException {
lexer = buildLexer(reader, languageLevel);
DRLParser parser = buildParser(lexer, languageLevel);
return compile(isEditor, parser);
}
use of org.drools.compiler.lang.DRLParser in project drools by kiegroup.
the class DrlParser method parse.
public PackageDescr parse(final boolean isEditor, final String text) throws DroolsParserException {
lexer = buildLexer(text, languageLevel);
DRLParser parser = buildParser(lexer, languageLevel);
return compile(isEditor, parser);
}
Aggregations