From d734796cd312e6eea196f2a6b9c31e59b3a934c0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 26 Jun 2015 19:21:57 -0700 Subject: Third round of quasiliteral-related fixes. * parser.l (char_esc): Recognize \@ escape. (grammar): Add a rule for a \@ escape in quasiliterals, and quasi word list literals. * txr.1: Document \@, and remove the lie that @@ encodes for a single @ in quasiliterals. --- txr.1 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 8d2e2f8d..8992a257 100644 --- a/txr.1 +++ b/txr.1 @@ -2481,13 +2481,18 @@ the quasiliteral represents the string .strn "one apple and two bananas" . A backquote escaped by a backslash represents -itself, and two consecutive +itself. Unlike in directive syntax, two consecutive .code @ -characters code for a literal -.codn @ . -There is no +characters do not code for a literal +.codn @ , +but cause a syntax error. The reason for this is that compounding of the +.code @ +syntax is meaningful. +Instead, there is a .code \e@ -escape. Quasiliterals support the full output variable +escape for encoding a literal +.code @ +character. Quasiliterals support the full output variable syntax. Expressions within variables substitutions follow the evaluation rules of \*(TL when the quasiliteral occurs in \*(TL, and the rules of the \*(TX pattern language when the quasiliteral occurs in the pattern language. -- cgit v1.2.3