public class ParserHelper extends Object
Modifier and Type | Field and Description |
---|---|
LinkedList<DroolsSentence> |
editorInterface |
List<DroolsParserException> |
errors |
boolean |
isEditorInterfaceEnabled |
String[] |
statementKeywords |
Constructor and Description |
---|
ParserHelper(org.antlr.runtime.TokenStream input,
org.antlr.runtime.RecognizerSharedState state,
org.kie.internal.builder.conf.LanguageLevelOption languageLevel) |
Modifier and Type | Method and Description |
---|---|
void |
beginSentence(DroolsSentenceType sentenceType) |
void |
disableEditorInterface() |
void |
emit(int activeContext) |
void |
emit(List<?> tokens,
DroolsEditorType editorType) |
void |
emit(org.antlr.runtime.Token token,
DroolsEditorType editorType) |
void |
enableEditorInterface() |
<T extends DescrBuilder<?,?>> |
end(Class<T> clazz,
DescrBuilder<?,?> builder) |
DroolsSentence |
getActiveSentence() |
LinkedList<DroolsSentence> |
getEditorInterface() |
List<String> |
getErrorMessages()
Return a list of pretty strings summarising the errors
|
List<DroolsParserException> |
getErrors()
return the raw DroolsParserException errors
|
boolean |
getHasOperator() |
DroolsToken |
getLastTokenOnList(LinkedList<?> list) |
String |
getLeftMostExpr() |
String[] |
getStatementKeywords() |
boolean |
hasErrors()
return true if any parser errors were accumulated
|
boolean |
isPluggableEvaluator(boolean negated) |
boolean |
isPluggableEvaluator(int offset,
boolean negated) |
Map<DroolsParaphraseTypes,String> |
popParaphrases() |
void |
pushParaphrases(DroolsParaphraseTypes type)
Method that adds a paraphrase type into paraphrases stack.
|
void |
reportError(Exception e) |
void |
reportError(org.antlr.runtime.RecognitionException ex) |
String |
retrieveLT(int LTNumber) |
void |
setHasOperator(boolean hasOperator) |
void |
setLeftMostExpr(String value) |
void |
setParaphrasesValue(DroolsParaphraseTypes type,
String value)
Method that sets paraphrase value for a type into paraphrases stack.
|
<T extends DescrBuilder<?,?>> |
start(DescrBuilder<?,?> ctxBuilder,
Class<T> clazz,
String param) |
boolean |
validateAttribute(int index) |
boolean |
validateCEKeyword(int index) |
boolean |
validateIdentifierKey(String text) |
boolean |
validateLT(int LTNumber,
String text) |
boolean |
validateStatement(int index) |
public final String[] statementKeywords
public List<DroolsParserException> errors
public LinkedList<DroolsSentence> editorInterface
public boolean isEditorInterfaceEnabled
public ParserHelper(org.antlr.runtime.TokenStream input, org.antlr.runtime.RecognizerSharedState state, org.kie.internal.builder.conf.LanguageLevelOption languageLevel)
public LinkedList<DroolsSentence> getEditorInterface()
public void setLeftMostExpr(String value)
public String getLeftMostExpr()
public void enableEditorInterface()
public void disableEditorInterface()
public void setHasOperator(boolean hasOperator)
public boolean getHasOperator()
public void beginSentence(DroolsSentenceType sentenceType)
public DroolsSentence getActiveSentence()
public void emit(List<?> tokens, DroolsEditorType editorType)
public void emit(org.antlr.runtime.Token token, DroolsEditorType editorType)
public void emit(int activeContext)
public DroolsToken getLastTokenOnList(LinkedList<?> list)
public String retrieveLT(int LTNumber)
public boolean validateLT(int LTNumber, String text)
public boolean isPluggableEvaluator(int offset, boolean negated)
public boolean isPluggableEvaluator(boolean negated)
public boolean validateIdentifierKey(String text)
public boolean validateCEKeyword(int index)
public boolean validateStatement(int index)
public boolean validateAttribute(int index)
public void reportError(org.antlr.runtime.RecognitionException ex)
public void reportError(Exception e)
public List<DroolsParserException> getErrors()
public List<String> getErrorMessages()
public boolean hasErrors()
public void pushParaphrases(DroolsParaphraseTypes type)
type
- paraphrase typepublic Map<DroolsParaphraseTypes,String> popParaphrases()
public void setParaphrasesValue(DroolsParaphraseTypes type, String value)
type
- paraphrase typevalue
- paraphrase valuepublic <T extends DescrBuilder<?,?>> T start(DescrBuilder<?,?> ctxBuilder, Class<T> clazz, String param)
public <T extends DescrBuilder<?,?>> T end(Class<T> clazz, DescrBuilder<?,?> builder)
public String[] getStatementKeywords()
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.