groff
[Top][All Lists]
Advanced

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

Re: [Groff] condition: OR of two string comparisons


From: Steffen Nurpmeso
Subject: Re: [Groff] condition: OR of two string comparisons
Date: Fri, 14 Nov 2014 14:57:43 +0100
User-agent: s-nail v14.7.8-70-g9310369

Hey, Ralph,

Ralph Corderoy <address@hidden> wrote:
 |> Yes!  Ralph likes it!
 |> (Good not to hear any technical objection!)
 |
 |That's the wrong conclusion to draw.  :-)  I just didn't see the point
 |in picking over the syntax for a string-OR given what I think is the
 |bigger issue.

The good news is that "(" then is simply not handled by
do_if_request() but results in a get_number() which then manages
to gobble anything off.  As an in fact complete subparser.  Nice.
Therefore this entire syntax seems to be taboo and sealed!?.

I think i'll keep the $'a'b'c'a'$ syntax for S-roff, since it's
anyway a pretty performant case-switch-alike thing, and cheaply
implemented.
But what do you think of simply extending this $-prefix extension,
now that it is in the world?  As in, e.g.

  .if $($'a'b'c'd'a$ || 'a'a')

or (to be even)

  .if $($'a'b'c'd'a$ || 'a'a')$

I'm of course speculating on "||" (and why since there is & and
:), and not that i really like (it is not C in the end), but it
seems to be possible without creating a coded nightmare and it
wouldn't change behaviour of existing documents, because of
requiring the trigger character.

I'd be willing to implement the outcome of a discussion of this
(after mdocmx, and i really want to get S-roff working before
that, too)

--steffen



reply via email to

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