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: Fri, 14 Nov 2014 10:17:29 +0100 (CET)

Hi Ralph,

> If study shows that old valid expressions can't be interpreted
> differently under the new parsing rules, then fine.  But I'd assume they
> could be.

Why should they when they don't contain errors or use side effects?  The
current rules for numerical expressions and the conditional statement are
very restricted, so the probability should be low that there are problems.

I suggest to bring something from troff manual § 16 into § 1.4:

N := c | 'string1'string2' | !N

also regular expressions could be added:

N := re'string'literal_string'

And make & and : true AND and OR for any case.

Then the condition in § 16 could just be

.if N anything

The overall syntax would not change.

groff could *additional* implement that (Ex; expr) feature, but if the above
doesn't cause problems it would also be a valuable improvement with minimum
syntax changes (if it doesn't case problems with *correct* existing documents
Heirloom would go that way).

Carsten



reply via email to

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