Skip to content

Commit

Permalink
- drop infix doubleAmpersand and doublePipe
Browse files Browse the repository at this point in the history
  • Loading branch information
tkobayas committed Jan 23, 2025
1 parent 76f8c98 commit 9765715
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ nbproject
*.ipr
*.iws
*.iml
build.log

# generated files
dependency-reduced-pom.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5140,6 +5140,7 @@ void accumulateEmptyChunks() {
assertThat(accumulateDescr.getResultCode()).isEqualTo("null");
}

@DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true")
@Test
void doublePipeInfixOr() {
final String text =
Expand All @@ -5161,6 +5162,7 @@ void doublePipeInfixOr() {
});
}

@DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true")
@Test
void doubleAmpersandInfixAnd() {
final String text =
Expand All @@ -5180,6 +5182,7 @@ void doubleAmpersandInfixAnd() {
});
}

@DisabledIfSystemProperty(named = "drools.drl.antlr4.parser.enabled", matches = "true")
@Test
void doubleAmpersandInfixAndInAccumulate() {
final String text =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ queryLhs : lhsExpression* ;

lhsExpression : LPAREN lhsExpression RPAREN #lhsExpressionEnclosed
| DRL_OR drlAnnotation* lhsExpression+ #lhsOr
| lhsExpression ((DRL_OR|OR) drlAnnotation* lhsExpression)+ #lhsOr
| lhsExpression ((DRL_OR) drlAnnotation* lhsExpression)+ #lhsOr
| DRL_AND drlAnnotation* lhsExpression+ #lhsAnd
| lhsExpression ((DRL_AND|AND) drlAnnotation* lhsExpression)+ #lhsAnd
| lhsExpression ((DRL_AND) drlAnnotation* lhsExpression)+ #lhsAnd
| lhsUnary #lhsUnarySingle
;

// lhsAnd is used as a label in lhsExpression rule. But some other rules explicitly use the def, so lhsAndDef is declared.
lhsAndDef : LPAREN lhsAndDef RPAREN
| lhsUnary ((DRL_AND|AND) lhsUnary)*
| lhsUnary ((DRL_AND) lhsUnary)*
| LPAREN DRL_AND lhsUnary+ RPAREN
;

Expand Down

0 comments on commit 9765715

Please sign in to comment.