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: Carsten Kunze
Subject: Re: [Groff] condition: OR of two string comparisons
Date: Thu, 13 Nov 2014 21:28:05 +0100 (CET)

Ralph Corderoy <address@hidden> wrote:

>     $ nroff | grep .
>     .if 'a'a'b'c'
>     b?c?
>     $
> 
> However, a new syntax is needed.  I'd guess something at the start that
> is currently invalid would indicate a whole new style of expression is
> present, one with typical precedence, and more string matching
> possibilities.

But why not as a first step keep the old syntax and make & a real AND and : ar 
real OR so that

.if (\\n(AB>5:"\\$1"foo")&(!\\n(.$=2) ...

is possible?
(Also allowing "!=" and "!" inside expressions.)  That would make everything 
possible.  Better syntax and precedence is then just "nice to have" for the 
second improvement step.

Steffens

.if re "foo"bar" ...

could be an extension to that.

Carsten



reply via email to

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