[Top] [All Lists]

Re: {} in if/else

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

 TJS(_at_)ANDREW(_dot_)CMU(_dot_)EDU writes:

So can I change the grammar to require the braces around commands in an

That is,
        if true keep;

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


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 

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