summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--txr.134
1 files changed, 34 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 4cf4b2fe..c2955ea7 100644
--- a/txr.1
+++ b/txr.1
@@ -2502,6 +2502,40 @@ is
.B not
equivalent to
.codn (R1%)R2 .
+Also note that
+.code A(XY%Z)B
+is equivalent to
+.codn AX(Y%Z)B .
+This is because the precedence of
+.code %
+is higher than that of catenation on its left side; this rule prevents the given
+syntax from expressing the
+.code XY
+catenation. The expression may be understood as:
+.code A(X(Y%Z))B
+where the inner parentheses clarify how the syntax surrounding the
+.code %
+operator is being parsed, and the outer parentheses are superfluous.
+The correct way to assert catenation of
+.code XY
+as the left operand of
+.code %
+is
+.codn A(XY)%ZB .
+To specify
+.code XY
+as the left operand, and limit the right operand to just
+.codn Z ,
+the correct syntax is
+.codn A((XY)%Z)B .
+By contrast, the expression
+.code A(X%YZ)B
+is not equivalent to
+.code A(X%Y)ZB
+because the precedence of
+.code %
+is lower than that of catenation on its right side. The operator is
+effectively "bi-precedential".
.coIP ~R
Match the opposite of the following expression
.codn R ;