Update of bug #68445 (group groff):
Summary: [troff] Incorrect warning using 2 arg .bd => [troff]
spurious warning when using `.bd TR 500` followed by space or tab
_______________________________________________________
Follow-up Comment #3:
On the other hand I think the request *did* count arguments correctly.
Maybe.
https://www.gnu.org/software/groff/manual/groff.html.node/Comments.html
> One possibly irritating idiosyncrasy is that tabs should not be used to
> vertically align comments in the source document. Tab characters are not
> treated as separators between a request name and its first argument, nor
> between arguments.
So either a space or a tab after the integer causes the argument count to be
3.
But why a tab, if tabs don't separate arguments in any troff other than Plan
9's?
https://www.gnu.org/software/groff/manual/groff.html.node/Invoking-Requests.html
> There is no inherent limit on argument length or quantity. Most requests take
> one or more arguments, and ignore any they do not expect. A request may be
> separated from its arguments by tabs or spaces, but only spaces can separate
> an argument from its successor. Only one between arguments is necessary; any
> excess is ignored. GNU troff does not interpret tabs as argument separators.
> Generally, a space within a request argument is not relevant, not meaningful,
> or is supported by bespoke provisions, as with the tl request’s delimiters
> (see Page Layout). Some requests, like ds, interpret the remainder of the
> control line as a single argument. ...
At the same time, the numeric expression evaluator, which is implicated
here--I'll check, but I suspect we're using `read_integer()`--bails out as
soon as it hits a character that is not valid in a numeric expression.
Whether that's an error condition is up to the caller, of which there are
many.
As far as I know, such a bailout can't corrupt the request's _argument_ count,
so possibly I have an inappropriate conditional governing the issue of the
diagnostic.
Will advise.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68445>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
