-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
QueryUtils.parseAndVisit() currently cannot handle rule conditions that combine AND and OR operators with parentheses to define precedence. When both are present, the generated QueryVisitor includes simple, AND, and OR queries at the same level, causing the evaluation logic to always prioritize simple queries.
Example of a problematic condition:
java.annotation is 'org.springframework.boot.autoconfigure.SpringBootApplication' AND
(java.annotation is 'org.springframework.web.bind.annotation.RestController' OR
java.annotation is 'org.springframework.stereotype.Service')
Expected
- Parentheses and operator precedence should be properly parsed.
- The resulting structure should represent the logical tree of the condition (nested AND/OR).
- The evaluation logic in
scan()should correctly combine results according to that tree.
Tasks
- Extend the grammar (
Query.g4) to support nested logical expressions. - Update
QueryUtils.parseAndVisit()to build a hierarchical query tree. - Adjust
QueryVisitorand related evaluation logic to process nested AND/OR combinations.
Metadata
Metadata
Assignees
Labels
No labels