Package org.drools.compiler.lang
Class AbstractDRLParser
- java.lang.Object
-
- org.drools.compiler.lang.AbstractDRLParser
-
- All Implemented Interfaces:
DRLParser
- Direct Known Subclasses:
DRL5Parser
,DRL6Parser
,DRL6StrictParser
public abstract class AbstractDRLParser extends Object implements DRLParser
-
-
Field Summary
Fields Modifier and Type Field Description protected ParserHelper
helper
protected org.antlr.runtime.TokenStream
input
protected org.antlr.runtime.RecognizerSharedState
state
-
Constructor Summary
Constructors Constructor Description AbstractDRLParser(org.antlr.runtime.TokenStream input)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PackageDescr
compilationUnit()
Entry point method of a DRL compilation unit compilationUnit := packageStatement?protected abstract PackageDescr
compilationUnit(PackageDescrBuilder pkg)
PackageDescr
compilationUnit(org.kie.api.io.Resource resource)
void
disableEditorInterface()
void
enableEditorInterface()
LinkedList<DroolsSentence>
getEditorInterface()
List<String>
getErrorMessages()
List<DroolsParserException>
getErrors()
ParserHelper
getHelper()
protected abstract org.kie.internal.builder.conf.LanguageLevelOption
getLanguageLevel()
boolean
hasErrors()
void
reportError(Exception ex)
void
reportError(org.antlr.runtime.RecognitionException ex)
-
-
-
Field Detail
-
input
protected org.antlr.runtime.TokenStream input
-
state
protected org.antlr.runtime.RecognizerSharedState state
-
helper
protected ParserHelper helper
-
-
Method Detail
-
getHelper
public ParserHelper getHelper()
-
getErrors
public List<DroolsParserException> getErrors()
-
getErrorMessages
public List<String> getErrorMessages()
- Specified by:
getErrorMessages
in interfaceDRLParser
-
enableEditorInterface
public void enableEditorInterface()
- Specified by:
enableEditorInterface
in interfaceDRLParser
-
disableEditorInterface
public void disableEditorInterface()
- Specified by:
disableEditorInterface
in interfaceDRLParser
-
getEditorInterface
public LinkedList<DroolsSentence> getEditorInterface()
- Specified by:
getEditorInterface
in interfaceDRLParser
-
reportError
public void reportError(org.antlr.runtime.RecognitionException ex)
- Specified by:
reportError
in interfaceDRLParser
-
reportError
public void reportError(Exception ex)
- Specified by:
reportError
in interfaceDRLParser
-
compilationUnit
public PackageDescr compilationUnit() throws org.antlr.runtime.RecognitionException
Entry point method of a DRL compilation unit compilationUnit := packageStatement? ( statement SEMICOLON? )*- Specified by:
compilationUnit
in interfaceDRLParser
- Returns:
- a PackageDescr with the content of the whole compilation unit
- Throws:
org.antlr.runtime.RecognitionException
-
compilationUnit
public PackageDescr compilationUnit(org.kie.api.io.Resource resource) throws org.antlr.runtime.RecognitionException
- Specified by:
compilationUnit
in interfaceDRLParser
- Throws:
org.antlr.runtime.RecognitionException
-
compilationUnit
protected abstract PackageDescr compilationUnit(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
- Throws:
org.antlr.runtime.RecognitionException
-
getLanguageLevel
protected abstract org.kie.internal.builder.conf.LanguageLevelOption getLanguageLevel()
-
-