Class ConditionGrammar

java.lang.Object
ai.badmonkey.agentspaces.constraints.ConditionGrammar

public final class ConditionGrammar extends Object
The condition grammar (ISSUE-Constraints FR-5, ยง9.2): a FieldFilter guard over one type's fields and tags plus four key-level predicates, joined by and, or, not, with parentheses.
condition := term (("and" | "or") term)* | "not" term | "(" condition ")"
term      := "exists(" T guard? ")" | "count(" T guard? ")" op integer | "newest(" T ")." field op literal
           | "age(" T ")" ">" duration
guard     := "where" clause ("," clause)*
Parsing is total: malformed text is refused with the text in the message.