Class BinaryExpressions
expression alternative for the phase-1 operand-parentheses checks -
E08269 (CoalescingOperandParenthesesOrError), E08273 (NotOperandParenthesesOrError) and E08274
(DoubleNegationOrError). Use its parts for any further rule over an operator's operand rather than another
private copy; hold the ones a check needs.
A binary expression is any alternative with both a left and a right operand
(IsBinaryExpression; its operator BinaryOperatorOf). A prefix expression is one of the symbol/word
prefix alternatives of EK9.g4 (PREFIX_OPERATORS) with no left (IsPrefixExpression;
its operand PrefixOperandOf). Word not is a prefix too, but it is the loose negation and is read on
its own (IsWordNot). A negation - word not, ~ or unary - - is
IsNegation, what it negates NegatedOperandOf, the negation an operand is under
NegationApplyingTo, and a literal spelt with a sign IsSignedLiteral. A parenthesised operand is a
primary, so it is never a binary or prefix expression here (WithoutParentheses looks through it).
The source of an operand as written is support.SourceText.
This class keeps only the prefix operator set and the signpost; its parts were its static methods until no-statics lane P1 (2026-10-29).
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe prefix operators ofexpressionother than wordnot, exactly asEK9.g4lists them:$$(TOJSON),$(DOLLAR),#^(PROMOTE),length [of],#<(PREFIX),#>(SUFFIX),#?(HASHCODE),abs [of],sqrt [of],~(TILDE) and unary-(SUB with no left operand). -
Method Summary
-
Field Details
-
PREFIX_OPERATORS
The prefix operators ofexpressionother than wordnot, exactly asEK9.g4lists them:$$(TOJSON),$(DOLLAR),#^(PROMOTE),length [of],#<(PREFIX),#>(SUFFIX),#?(HASHCODE),abs [of],sqrt [of],~(TILDE) and unary-(SUB with no left operand). Pinned against the grammar byBinaryExpressionsTest.
-