Update of bug #66009 (group groff):
Summary: [troff] accepts `|` as operand delimiter, but should
not => [troff] accepts `|` and other ambiguous characters as operand
delimiters, but should not
_______________________________________________________
Follow-up Comment #5:
Apparently, almost exactly 1 year ago I intended to postpone resolution of
this ticket beyond the _groff_ 1.24 release.
Alas, ill-defined delimiter deviltry kept rearing its head and I did further
work on this problem anyway.
Our "NEWS" file says:
* GNU troff no longer accepts a newline as a delimiter for the
parameterized escape sequences `\A`, `\b`, `\o`, `\w`, `\X`, and
`\Z`.
* GNU troff no longer accepts `\0`, `\^`, and `\|` as escape sequence
delimiters; doing so inadvertently permitted the delimited `\h` escape
sequence to serve as delimiter to another delimited escape sequence.
(These items correspond to bug #63142 and bug #67744, respectively.)
GNU _troff_ now warns about `|` as an operand delimiter, but only when not in
compatibility mode. AT&T _troff_ had multiple sets of context-dependent
delimiters, a pain in the butt to simulate.
(The morbidly curious can set a bottle of cheap but strong booze on the desk
and peruse
[https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/src/roff/groff/tests/check-delimiter-validity.sh?id=3009f72b56d21899c5475edca728cd344ad5919e
our unit test for this stuff].)
Observe:
$ printf '.nr a \\w|hey, you|\n.pnr a\n' | ./build/test-groff -aww
troff:<standard input>:1: warning: using character '|' as an escape sequence
delimiter is deprecated
a 33640 +0 0
$ printf '.nr a \\w|hey, you|\n.do pnr a\n' | ./build/test-groff -Caww
a 33640 +0 0
So all that remains for this ticket is to actually "ban", when not in
compatibility mode, use of delimiters that are meaningful in numeric
expressions. And that will wait a couple of years after the _groff_ 1.24.0
release so that the rare document using ambiguous delimiters can migrate their
documents (or start formatting them in compatibility mode, if they're legacy
documents, for instance).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66009>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
