Re: bug report dispute resolution request
On Wed, Dec 13, 2000 at 06:59:54AM -0500, Raul Miller wrote:
> On Wed, Dec 13, 2000 at 07:46:22PM +1100, Herbert Xu wrote:
> > Here is what the SuS says (AFAIK POSIX says the same thing):
> >
> > Token Recognition
> >
> > ...
> >
> > 5.If the current character is an unquoted "$" or `, the shell
> > will identify the start of any candidates for parameter
> > expansion, command substitution, or arithmetic expansion
> > from their introductory unquoted character sequences: "$"
> > or ${, $( or `, and $((, respectively. The shell will read
> > sufficient input to determine the end of the unit to be
> > expanded (as explained in the cited sections).
>
> Looks to me as if SuS indicates that the above is suppose to happen
> before:
Well, there is no way to identify the end of the unit unless you recurse
as you read the characters. For example, in
$( echo $(( 3 + 3 )) )
You have to recurse when you reach $(( or you will wrongly consider the first
) to be the end of the command substitution.
> > While processing the characters, if instances of expansions
> > or quoting are found nested within the substitution,
> > the shell will recursively process them in the manner
> > specified for the construct that is found. The characters
> > found from the beginning of the substitution to its end,
> > allowing for any recursion necessary to recognise embedded
> > constructs, will be included unmodified in the result token,
> > including any embedded or enclosing substitution operators
> > or quotes. The token will not be delimited by the end of the
> > substitution.
>
> Otherwise, why use the word "candidates"?
The word is only used as a placeholder here and has no particular bearing
on the issue at hand.
--
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Reply to: