diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-09-29 22:31:27 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-09-30 09:53:47 -0700 |
commit | 1057218015c2388a90bfbe9baa8cfb90820a6d8c (patch) | |
tree | 3eb04daa4e0ea7b1869bfd846ef5df212ccc656a /txr.1 | |
parent | 8c0902a00ad68bb3f830274342de608cd36f304d (diff) | |
download | txr-1057218015c2388a90bfbe9baa8cfb90820a6d8c.tar.gz txr-1057218015c2388a90bfbe9baa8cfb90820a6d8c.tar.bz2 txr-1057218015c2388a90bfbe9baa8cfb90820a6d8c.zip |
* parser.l: Implemented backslash continuations in SPECIAL
state, regexes and string literals.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -368,6 +368,27 @@ Control characters may be embedded directly in a query (with the exception of newline characters). An alternative to embedding is to use escape syntax. The following escapes are supported: +.IP @\e<newline> +A backslash immediately followed by a newline introduces a physical line +break without breaking up the logical line. Material following this sequence +continues to be interpreted as a continuation of the previous line, so +that indentation can be introduced to show the continuation without appearing +in the data. +.IP @\e<space> +A backslash followed by a space encodes a space. This is useful in line +continuations when it is necessary for leading spaces to be preserved. +For instance the two line sequence + + abcd@\ + @\ efg + +is equivalent to the line + + abcd efg + +The two spaces before the @\ in the second line are consumed. The +spaces after are preserved. + .IP @\ea Alert character (ASCII 7, BEL). .IP @\eb @@ -445,6 +466,17 @@ directive may be used, which has the following syntax: where the RE part enclosed in slashes represents regular expression syntax (described in the section Regular Expressions below). +Long regular expressions can be broken into multiple lines using a +backslash-newline sequence. Whitespace before the sequence or after the +sequence is not significant, so the following two are equivalent: + + @/reg \e + ular/ + + @/regular/ + +There may not be whitespace between the backslash and newline. + Whereas literal text simply represents itself, regular expression denotes a (potentially infinite) set of texts. The regular expression directive matches the longest piece of text (possibly empty) which belongs to the set |