public class DRL6StrictParser extends AbstractDRLParser implements DRLParser
helper, input, state
Constructor and Description |
---|
DRL6StrictParser(org.antlr.runtime.TokenStream input) |
Modifier and Type | Method and Description |
---|---|
AttributeDescr |
attribute(AttributeSupportBuilder<?> as)
attribute :=
salience
| enabled
| ( NO-LOOP
| AUTO-FOCUS
| LOCK-ON-ACTIVE
| REFRACT
| DIRECT
) BOOLEAN?
|
String |
chunk(int leftDelimiter,
int rightDelimiter,
int location)
Matches a chunk started by the leftDelimiter and ended by the rightDelimiter.
|
protected PackageDescr |
compilationUnit(PackageDescrBuilder pkg) |
String |
conditionalExpression()
Matches a conditional expression
|
String |
conditionalOrExpression()
Matches a conditional || expression
|
BaseDescr |
declare(PackageDescrBuilder pkg)
declare := DECLARE
| (ENTRY-POINT) => entryPointDeclaration
| (WINDOW) => windowDeclaration
| (TRAIT) => typeDeclaration (trait)
| (ENUM) => enumDeclaration
| typeDeclaration (class)
END
|
void |
defaultConsequence(RuleDescrBuilder rule)
defaultConsequence := THEN chunk
|
EntryPointDeclarationDescr |
entryPointDeclaration(DeclareDescrBuilder ddb)
entryPointDeclaration := annotation* ENTRY-POINT stringId END
|
EnumDeclarationDescr |
enumDeclaration(DeclareDescrBuilder ddb) |
FunctionDescr |
function(PackageDescrBuilder pkg)
function := FUNCTION type?
|
protected String |
getConsequenceCode(int first) |
protected org.kie.internal.builder.conf.LanguageLevelOption |
getLanguageLevel() |
GlobalDescr |
globalStatement(PackageDescrBuilder pkg)
globalStatement := GLOBAL type ID
|
ImportDescr |
importStatement(PackageDescrBuilder pkg)
importStatement := IMPORT ((FUNCTION|STATIC)?
|
protected BaseDescr |
lhsExists(CEDescrBuilder<?,?> ce,
boolean allowOr)
lhsExists := EXISTS
( (LEFT_PAREN (or_key|and_key))=> lhsOr // prevents '((' for prefixed and/or
| LEFT_PAREN lhsOr RIGHT_PAREN
| lhsPatternBind
)
|
protected BaseDescr |
lhsForall(CEDescrBuilder<?,?> ce)
lhsForall := FORALL LEFT_PAREN lhsPatternBind+ RIGHT_PAREN
|
protected BaseDescr |
lhsNot(CEDescrBuilder<?,?> ce,
boolean allowOr)
lhsNot := NOT
( (LEFT_PAREN (or_key|and_key))=> lhsOr // prevents '((' for prefixed and/or
| LEFT_PAREN lhsOr RIGHT_PAREN
| lhsPatternBind
)
|
boolean |
mismatchIsMissingToken(org.antlr.runtime.TokenStream input,
int[] follow) |
boolean |
mismatchIsUnwantedToken(org.antlr.runtime.TokenStream input,
int ttype,
String text) |
void |
namedConsequence(RuleDescrBuilder rule)
namedConsequence := THEN LEFT_SQUARE ID RIGHT_SQUARE chunk
|
String |
packageStatement(PackageDescrBuilder pkg)
Parses a package statement and returns the name of the package
or null if none is defined.
|
String |
qualifiedIdentifier()
Matches a qualified identifier
qualifiedIdentifier := ID ( DOT ID )*
|
RuleDescr |
query(PackageDescrBuilder pkg)
query := annotation* QUERY stringId parameters?
|
protected org.antlr.runtime.Token |
recoverFromMismatchedToken(org.antlr.runtime.TokenStream input,
int ttype,
String text,
int[] follow)
Attempt to recover from a single missing or extra token.
|
RuleDescr |
rule(PackageDescrBuilder pkg)
rule := annotation* RULE stringId (EXTENDS stringId)?
|
BaseDescr |
statement(PackageDescrBuilder pkg)
statement := importStatement
| globalStatement
| declare
| rule
| ruleAttribute
| function
| query
;
|
String |
type()
Matches a type name
type := ID typeArguments?
|
String |
typeArgument()
Matches a type argument
typeArguments := QUESTION (( EXTENDS | SUPER ) type )?
|
String |
typeArguments()
Matches type arguments
typeArguments := LESS typeArgument (COMMA typeArgument)* GREATER
|
TypeDeclarationDescr |
typeDeclaration(DeclareDescrBuilder ddb,
boolean isTrait)
typeDeclaration := annotation* [TYPE] qualifiedIdentifier (EXTENDS qualifiedIdentifier)?
|
UnitDescr |
unitStatement(PackageDescrBuilder pkg)
unitStatement := UNIT qualifiedIdentifier SEMICOLON?
|
WindowDeclarationDescr |
windowDeclaration(DeclareDescrBuilder ddb)
windowDeclaration := annotation* WINDOW ID lhsPatternBind END
|
compilationUnit, compilationUnit, disableEditorInterface, enableEditorInterface, getEditorInterface, getErrorMessages, getErrors, getHelper, hasErrors, reportError, reportError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compilationUnit, compilationUnit, disableEditorInterface, enableEditorInterface, getEditorInterface, getErrorMessages, getErrors, hasErrors, reportError, reportError
protected org.kie.internal.builder.conf.LanguageLevelOption getLanguageLevel()
getLanguageLevel
in class AbstractDRLParser
protected final PackageDescr compilationUnit(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
compilationUnit
in class AbstractDRLParser
org.antlr.runtime.RecognitionException
public String packageStatement(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public UnitDescr unitStatement(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public BaseDescr statement(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public ImportDescr importStatement(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public GlobalDescr globalStatement(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public BaseDescr declare(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public EntryPointDeclarationDescr entryPointDeclaration(DeclareDescrBuilder ddb) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public WindowDeclarationDescr windowDeclaration(DeclareDescrBuilder ddb) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public EnumDeclarationDescr enumDeclaration(DeclareDescrBuilder ddb) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public TypeDeclarationDescr typeDeclaration(DeclareDescrBuilder ddb, boolean isTrait) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public FunctionDescr function(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public RuleDescr query(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public RuleDescr rule(PackageDescrBuilder pkg) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public AttributeDescr attribute(AttributeSupportBuilder<?> as)
protected BaseDescr lhsExists(CEDescrBuilder<?,?> ce, boolean allowOr) throws org.antlr.runtime.RecognitionException
ce
- org.antlr.runtime.RecognitionException
protected BaseDescr lhsNot(CEDescrBuilder<?,?> ce, boolean allowOr) throws org.antlr.runtime.RecognitionException
ce
- org.antlr.runtime.RecognitionException
protected BaseDescr lhsForall(CEDescrBuilder<?,?> ce) throws org.antlr.runtime.RecognitionException
ce
- org.antlr.runtime.RecognitionException
public void defaultConsequence(RuleDescrBuilder rule)
rule
- public void namedConsequence(RuleDescrBuilder rule)
rule
- protected String getConsequenceCode(int first)
public String type() throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public String typeArguments() throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public String typeArgument() throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public String qualifiedIdentifier() throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public String conditionalExpression() throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public String conditionalOrExpression() throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public String chunk(int leftDelimiter, int rightDelimiter, int location)
protected org.antlr.runtime.Token recoverFromMismatchedToken(org.antlr.runtime.TokenStream input, int ttype, String text, int[] follow) throws org.antlr.runtime.RecognitionException
org.antlr.runtime.RecognitionException
public boolean mismatchIsUnwantedToken(org.antlr.runtime.TokenStream input, int ttype, String text)
public boolean mismatchIsMissingToken(org.antlr.runtime.TokenStream input, int[] follow)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.