Email List: Xaustin-group-lX
[All Lists]

Re: Re: compound commands with subshells/braces

To: austin-group-l@xxxxxxxxxxxxx, dcragun@xxxxxxxxx
Subject: Re: Re: compound commands with subshells/braces
From: David Korn <dgk@xxxxxxxxxxxxxxxx>
Date: Tue, 26 May 2009 10:40:51 -0400
cc:  austin-group-l@opengroup.org
Subject: Re: Re: compound commands with subshells/braces
--------

> 6.      brace_group => Lbrace compound_list Rbrace
>                 (matching the '{' and '}'
> 

I think the issue is whether at this point you get the token '{'
or the literal {.

The KornShell book says explicitly that { is a reserved word after the )
whereas this statement is not in the standard.

The standard does say that it is a token if it is the first
word of a command, so the question is how do you determine when
the first word of a command is.

For example,
        if true ;then ;fi date
date is not considered the first word of the command even though it follows
a complete command.

Note that the standard clearly requires the following to be recognized.
        { if true;then :; fi }
since the } follows the reserved word fi.


As I result, I think that the standard is not correct.
        

David Korn
dgk@research.att.com

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