Search in sources :

Example 1 with DRLParser

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);
}
Also used : InternalResource(org.drools.core.io.internal.InternalResource) DRLParser(org.drools.compiler.lang.DRLParser)

Example 2 with DRLParser

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);
}
Also used : DRLParser(org.drools.compiler.lang.DRLParser)

Example 3 with DRLParser

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);
}
Also used : DRLParser(org.drools.compiler.lang.DRLParser)

Aggregations

DRLParser (org.drools.compiler.lang.DRLParser)3 InternalResource (org.drools.core.io.internal.InternalResource)1