From 8258846ec3da81b4a748d46a34e8571967db6030 Mon Sep 17 00:00:00 2001 From: dermagen Date: Sun, 28 Jul 2024 21:50:52 -0400 Subject: [PATCH] Update syntax-rules.md --- misc/syntax-rules.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/misc/syntax-rules.md b/misc/syntax-rules.md index 10394cc..15186e4 100644 --- a/misc/syntax-rules.md +++ b/misc/syntax-rules.md @@ -8,7 +8,7 @@ Boxes, as defined by SRFI-111 and the future `(scheme box)` library, are support ## Simple pattern escape -A pattern of the form `( )`, where `` is the current ellipsis, is interpreted as if it were ``, but ellipses and underscores in `` lose their special meaning, e.g.: +A pattern of the form `( )` where `` is the current ellipsis is interpreted as if it were ``, but ellipses and underscores in `` lose their special meaning; e.g.: ```scheme (define-syntax underscored @@ -18,7 +18,7 @@ A pattern of the form `( )`, where `` is the curren (underscored 1 2) ; => (2 1) ``` -Note that R7RS prescribes special treatment of keyword identifier at the beginning of the pattern in a ``: it is matched automatically with the head of the use form, but is not considered a pattern variable. SKINT's pattern escape extension drops this positional restriction, and matches its sub-pattern in a normal way, e.g.: +Note that R7RS prescribes special treatment of the keyword identifier at the beginning of the pattern in a ``: it is matched automatically with the head of the use form, but is not considered a pattern variable. SKINT's pattern escape extension drops this positional restriction and matches its sub-pattern in a normal way; e.g.: ```scheme ; in R7RS, x is not a pattern variable here due to its head position: @@ -35,11 +35,11 @@ Note that R7RS prescribes special treatment of keyword identifier at the beginni ; => (ttt 123) ``` -The importance of this feature will be clear when we get to circumventing hygiene part below. +The importance of this feature will be clear when we get to circumventing hygiene below. ## Named pattern escapes -A pattern of the form `( )` where `` is the current ellipsis is interpreted as if it were ``, with additional constraint that the S-expression it matches should also satisfy the constraint specified by ``. Predicate names are compared to predefined symbols according to `free-identifier=?` rules. The following named pattern escapes are supported: +A pattern of the form `( )`, where `` is the current ellipsis, is interpreted as if it were `` as long as the matching S-expression satisfies the constraint specified by ``. Predicate names are compared to predefined symbols according to `free-identifier=?` rules. The following named pattern escapes are supported: * `(... number? )` * `(... exact-integer? )` @@ -68,7 +68,7 @@ Example (also uses box templates): ## Named template escapes -A template of the form `( )` where `` is the current ellipsis is interpreted as follows. First, `` (which can be any nonempty sequence of `