站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 3.0.6 API 英文版文档

DrlParser - JBoss RULES 3.0.6 API 英文版文档


org.drools.compiler
Class DrlParser

java.lang.Object
  extended by org.drools.compiler.DrlParser

public class DrlParser
extends java.lang.Object

This is a low level parser API. This will return textual AST representations of the DRL source, including with DSL expanders if appropriate.


Constructor Summary
DrlParser()
           
 
Method Summary
 java.util.List getErrors()
           
 boolean hasErrors()
           
 PackageDescr parse(java.io.Reader reader)
          Parse and build a rule package from a DRL source
 PackageDescr parse(java.io.Reader drl, java.io.Reader dsl)
          Parse and build a rule package from a DRL source with a domain specific language.
 PackageDescr parse(java.lang.String text)
          Parse a rule from text
 PackageDescr parse(java.lang.String source, java.io.Reader dsl)
          Parse and build a rule package from a DRL source with a domain specific language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrlParser

public DrlParser()
Method Detail

parse

public PackageDescr parse(java.lang.String text)
                   throws DroolsParserException
Parse a rule from text

Throws:
DroolsParserException

parse

public PackageDescr parse(java.io.Reader reader)
                   throws java.io.IOException,
                          DroolsParserException
Parse and build a rule package from a DRL source

Throws:
java.io.IOException
DroolsParserException

parse

public PackageDescr parse(java.io.Reader drl,
                          java.io.Reader dsl)
                   throws DroolsParserException,
                          java.io.IOException
Parse and build a rule package from a DRL source with a domain specific language.

Throws:
DroolsParserException
java.io.IOException

parse

public PackageDescr parse(java.lang.String source,
                          java.io.Reader dsl)
                   throws DroolsParserException
Parse and build a rule package from a DRL source with a domain specific language.

Parameters:
source - As Text.
dsl -
Returns:
Throws:
DroolsParserException

hasErrors

public boolean hasErrors()
Returns:
true if there were parser errors.

getErrors

public java.util.List getErrors()
Returns:
a list of ParserError's.