ietf-mta-filters
[Top] [All Lists]

Re: {} in if/else

1997-11-05 23:29:29
On Wed, 5 Nov 1997, Chris Bartram wrote:

 In 
<Pine(_dot_)SOL(_dot_)3(_dot_)95L(_dot_)971105160232(_dot_)27664f-100000(_at_)nil(_dot_)andrew(_dot_)cmu(_dot_)edu>
 TJS(_at_)ANDREW(_dot_)CMU(_dot_)EDU writes:

So can I change the grammar to require the braces around commands in an
if/else?

That is,
        if true keep;

wouldn't be legal; you'd need
        if true { keep; }

Why???

Because it's slightly easier to parse.

Actually, I need to deal with an ambiguity in the grammar with regards to
this.  What happens in this script --

if false keep; else if false fileinto "foo"; else trash


Also, there are two similar looking lists -- a list of tests, which is
comma-seperated like "(true, false)" and a list of strings, which looks like
("a string" "another string" "yet another string").  I had been told to get
rid of one of them.  Any opinions on this?

-- 
                                           Tim Showalter 
tjs(_at_)andrew(_dot_)cmu(_dot_)edu


<Prev in Thread] Current Thread [Next in Thread>