Re: bug report dispute resolution request
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:
> 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"?
I searched SuS for use of words with the substring "candidate", and only
found two uses -- both when talking about shell parsing in situations
where there are alternatives to be considered.
What am I missing?
--
Raul
Reply to: