summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.141
1 files changed, 41 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index a2c1ee32..2954fc4b 100644
--- a/txr.1
+++ b/txr.1
@@ -9181,6 +9181,47 @@ or an atom
as
.codn "(. sym)" .
+.NP* Referencing Dot
+
+A dot token which is flanked by expressions on both sides, without any
+intervening whitespace, is the referencing dot, and not the consing dot.
+The referencing dot is a syntactic sugar which translated to the
+.code qref
+syntax ("quoted ref"), which currently has no assigned meaning and is reserved
+for a future language extension. The referencing dot obeys these
+correspondences:
+
+.cblk
+ ;; a.b may be almost any expressions
+ a.b <--> (qref a b)
+ a.b.c <--> (qref a b c)
+ a.(qref b c) <--> (qref a b c)
+ (qref a b).c <--> (qref (qref a b) c)
+.cble
+
+That is to say, this dot operator constructs a
+.code qref
+expression out of its left and right arguments. If the right argument
+of the dot is already a qref expression (whether produced by another instance
+of the dot operator, or expressed directly) it is merged. And the qref dot
+operator is right-to-left associative, so that
+.code a.b.c
+first produces
+.code (qref b c)
+via the right dot, and then
+.code a
+is adjoined into the syntax via the right dot.
+
+Integer tokens cannot be involved in this syntax, because they
+form floating-point constants when juxtaposed with a dot.
+Such ambiguous uses of floating-point tokens are diagnosed as syntax errors:
+
+.cblk
+ (a.4) ;; error: cramped floating-point literal
+ (a .4) ;; good: a followed by 0.4
+.cble
+
+
.NP* Quote and Quasiquote
.meIP >> ' expr