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

DrlParser (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.compiler
Class DrlParser

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

public class DrlParser
extends 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
 List getErrors()
           
 boolean hasErrors()
           
 PackageDescr parse(Reader reader)
           
 PackageDescr parse(Reader drl, Reader dsl)
          Parse and build a rule package from a DRL source with a domain specific language.
 PackageDescr parse(String text)
          Parse a rule from text
 PackageDescr parse(String source, 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(String text)
                   throws DroolsParserException
Parse a rule from text

Throws:
DroolsParserException

parse

public PackageDescr parse(Reader reader)
                   throws DroolsParserException
Throws:
DroolsParserException

parse

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

Throws:
DroolsParserException
IOException

parse

public PackageDescr parse(String source,
                          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 List getErrors()
Returns:
a list of ParserError's.


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.