Follow-up Comment #27, bug #67372 (group groff): In commit 18ed47436c (see comment #25), I managed to replace our documentation's existing BS with some of my own. Fortunately the situation is not as constrained as I thought. (My next push will fix the remarks in question.)
I think I've come up with a more elegant way to solve the problem.
There's no constraint on the quantity of token types as there is to the input
character encoding space for non-literal characters (where we're restricted to
the C0 and C1 space, and even some C0 controls must be left for the user).
Moreover there's no reason to employ the input character encoding space for
the purpose I have in mind.
I therefore think I will do two things:
1. Add a `TOKEN_DELIMITED_HORIZONTAL_MOTION` token type. This will be how we
tokenize `\h` escape sequences, which at present coalesce with `\0`, `\|`, and
`\^` as `TOKEN_HORIZONTAL_SPACE` (which should be renamed to
`TOKEN_HORIZONTAL_MOTION` anyway as these tokens don't behave as spaces; they
are never breakable, discardable, or adjustable). Making this change will
recover _groff_ 1.23.0 and earlier's ability to recognize `\0`, `\|`, and `\^`
as escape sequence delimiters without also permitting `\h`.
2. Add a `TOKEN_DELIMITED_SPECIAL_CHARACTER` token type. This will be how we
tokenize `\C` escape sequences, which at present coalesce with `\[xxx]` and
`\(xx` as `TOKEN_SPECIAL_CHARACTER`. Making this change will permit us to ban
use of the delimited `\C` escape sequence as an escape sequence delimiter.
Because of the coalescence, I can't ban them at present, or I'd break GNU
_tbl_ and _eqn_ (see item 2 of comment #24).
Recalling the summary of this ticket, none of this necessarily means that any
particular _mandoc_(1) regression test will un-regress. That's not my goal;
my goal is to have a *documented* and *rationalizable*, and moreover
*explicable*, syntax for delimited escape sequences.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67372>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
