[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] X in \A'X' isn't ignored - bug report?

From: Steffen Nurpmeso
Subject: Re: [Groff] X in \A'X' isn't ignored - bug report?
Date: Fri, 24 Apr 2015 11:51:34 +0200
User-agent: s-nail v14.7.11-374-g8ff52d4


Werner LEMBERG <address@hidden> wrote:
 |>   <standard input>:5: missing `]'
 |>   <standard input>:5: invalid component `a' in composite glyph name
 |Well, the parsing for `\[...]' happens before feeding the data to
 |\A'...', IIRC.
 |> Is this a general parser problem, i haven't looked yet..
 |I wouldn't call it a `general parser problem'.  Basically, you can't
 |generate `\[' programmatically, as far as I can see.  If you ever get
 |this warning, it's an error in the input.

Well exactly that was however the initial problem: while testing
the manual of the MUA i maintain i got three occurrences of
similar errors for \A'' on the result of a ".substring 0 1".
A terrible mess is needed to circumvent it:

  .   \" Otherwise we need to find a different way.  Use the length,
  .   length mx#sd#n \$2
  .   \" and furtherly subdivide (necessary, think mdoc(7) manual..)
  .   \" by using the first two letters (not one, ditto).
  .   \" Circumvent the ".substring returns anything" problem via \A'',
  .   \" be aware that groff(1) expands x in \A'x' during parse, so that,
  .   \" e.g, \[, from ".substring 0 1" results in parse errors!!
  .   ds mx#sd#s1 \$2
  .   ds mx#sd#s2 \$2
  .   substring mx#sd#s1 0 0
  .   substring mx#sd#s2 1 1
  .   ie \A'\*[mx#sd#s1]=\*[mx#sd#s2]' \

Note how you cannot even say \A'\*[a]\*[b]', since the result seems
to get expanded on the fly and breaks \A'' if that ends up as "\[".
So this is anything but robust and as such defeats the sole
purpose of \A''.

 |> Should i open a bug report?

Sorry for cross-posting.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]