public class NRLParser extends Object implements INRLParser
INRLParser| Constructor and Description |
|---|
NRLParser() |
| Modifier and Type | Method and Description |
|---|---|
List<NRLError> |
getErrors()
After any call to the parse or resolve methods, this method returns a list of errors, if any.
|
protected String |
getStreamAsString(Reader reader)
Uses a reader to read a stream and returns the content as a string.
|
IRuleFile |
parse(InputStream stream)
Deprecated.
|
IRuleFile |
parse(Reader reader)
Deprecated.
|
IRuleFile |
parse(URI uri,
IResolverFactory resolverFactory)
Parse an NRL file using a reader, and return an AST.
|
void |
resolveModelReferences(IRuleFile ruleFile,
IModelCollection models)
Deprecated.
|
void |
resolveOperatorReferences(IRuleFile ruleFile,
IOperators[] operators)
Deprecated.
|
public List<NRLError> getErrors()
getErrors in interface INRLParserprotected String getStreamAsString(Reader reader) throws IOException
reader - the readerIOException@Deprecated public IRuleFile parse(InputStream stream) throws Exception
parse(URI, IResolverFactory)parse in interface INRLParserException@Deprecated public IRuleFile parse(Reader reader) throws Exception
parse(URI, IResolverFactory)parse in interface INRLParserExceptionpublic IRuleFile parse(URI uri, IResolverFactory resolverFactory) throws IOException, org.antlr.runtime.RecognitionException, ModelLoadingException, ResolverException, OperatorLoadingException
IMPORTANT: Call getErrors() after calling this method to check if any syntax
or semantic errors occurred.
parse in interface INRLParserreader - the reader to useresolverFactory - the resolver factory to use to load resourcesIOExceptionorg.antlr.runtime.RecognitionExceptionModelLoadingExceptionResolverExceptionOperatorLoadingException@Deprecated public void resolveModelReferences(IRuleFile ruleFile, IModelCollection models)
After calling this, you must call getErrors() to check if any errors
occurred. If so, the AST may be unstable.
resolveModelReferences in interface INRLParserruleFile - the rule file to decoratemodels - the models to use@Deprecated public void resolveOperatorReferences(IRuleFile ruleFile, IOperators[] operators)
resolveOperatorReferences in interface INRLParserruleFile - the file to resolveoperators - the collection of operator filesXmlOperatorPersistenceCopyright © 2006-2013. All Rights Reserved.