summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.19
1 files changed, 6 insertions, 3 deletions
diff --git a/txr.1 b/txr.1
index 33f21df7..cd30c208 100644
--- a/txr.1
+++ b/txr.1
@@ -3564,9 +3564,10 @@ This directive's syntax is illustrated in this example:
The deffilter symbol must be followed by the name of the filter to be defined,
-followed by tuples of strings. Each tuple specifies one or more texts
-which are mapped to a replacement text. For instance, the following specifies
-a telephone keypad mapping from upper case letters to digits.
+followed by tuples of forms which evaluate to strings. Each tuple specifies one
+or more texts which are mapped to a replacement text. For instance, the
+following specifies a telephone keypad mapping from upper case letters to
+digits. Quasiliterals may be used.
@(deffilter alpha_to_phone ("E" "0")
("J" "N" "Q" "1")
@@ -3579,6 +3580,8 @@ a telephone keypad mapping from upper case letters to digits.
("L" "O" "P" "8")
("G" "H" "Z" "9"))
+ @(deffilter foo (`@a` `@b`) ("c" `->@d`))
+
Filtering works using a longest match algorithm. The input is scanned from left
to right, and the longest piece of text is identified at every character
position which matches a string on the left hand side, and that text is