diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-07-02 19:56:58 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-07-02 19:56:58 -0700 |
commit | 9aaeb2fc604feee26a72a672fd846b4e70c6c1aa (patch) | |
tree | 04b94e178dbd26e177524894bef9a24d0dda2176 /txr.1 | |
parent | 7e13dd271df070671f9ef59969307d1bfb045ffb (diff) | |
download | txr-9aaeb2fc604feee26a72a672fd846b4e70c6c1aa.tar.gz txr-9aaeb2fc604feee26a72a672fd846b4e70c6c1aa.tar.bz2 txr-9aaeb2fc604feee26a72a672fd846b4e70c6c1aa.zip |
Support trailing semicolon after hex/octal characters.
* parser.l (%option): Remove nounput option since we need
yyunput.
(grammar): Rule for matching hex and octal escape in SPECIAL
state recognizes optional semicolon. In 109 compatibility,
this is pushed back into the stream, otherwise consumed.
* txr.1: Updated documentation, including compat notes.
* genvim.txr (txr_char): Include optional semicolon in
match. Corrected some errors where 8 and 9 were being
included as matches for octal digits.
(txr_error): Default match for \x or \o not followed
by digits.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1155,7 +1155,9 @@ A immediately followed by a sequence of hex digits is interpreted as a hexadecimal numeric character code. For instance .code @\ex41 -is the ASCII character A. +is the ASCII character A. If a semicolon character immediately follows the +hex digits, it is consumed, and characters which follow are not considered +part of the hex escape even if they are hex digits. .meIP @\e < octal-digits A @@ -1165,6 +1167,9 @@ as an octal character code. For instance .code @\e010 is character 8, same as .codn @\eb . +If a semicolon character immediately follows the octal digits, it is consumed, +and subsequent characters are not treated as part of the octal escape, +even if they are octal digits. .PP Note that if a newline is embedded into a query line with @@ -30636,6 +30641,16 @@ is given an argument which is equal or lower. For instance .code -C 103 selects the behaviors described below for version 105, but not those for 102. +.IP 109 +The optional trailing semicolon on hex and octal codes in the \*(TX +pattern language was introduced in 110. The feature is disabled +with 109 or lower compatibility, so that +.code @\ex21;a +encodes +.code !;a +rather than the current behavior of encoding +.codn !a . + .IP 107 Up through \*(TX 107, by accident, there was a function called .code flip |