bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash-4 breaks $(<command>) syntax on FreeBSD


From: Chet Ramey
Subject: Re: Bash-4 breaks $(<command>) syntax on FreeBSD
Date: Thu, 12 Mar 2009 21:48:24 -0400
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Gerard wrote:
> On Thu, 12 Mar 2009 16:17:45 -0400
> Chet Ramey <chet.ramey@case.edu> wrote:
> 
> [snip]
> 
> It is now believed that the problem has to do with Yacc on FreeBSD.
> There is an experimental patch just issued that substitutes 'bison' for
> 'yacc'. It is being tested right now by some users.

Bash-4.0 parses the contents of command substitutions before executing
them.  This is what Posix requires.  Previous versions deferred parsing
to the subshell spawned to execute the command.

(This part works best if you're looking at the yacc grammar.)

BSD yacc will not reduce a simple_list1 to a simple_list when the
lookahead token is `)'.  Bison will.  It's that simple.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]