bug-bash
[Top][All Lists]
Advanced

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

Re: grammar error: 'case' inside $( ... ) collect


From: John Reiser
Subject: Re: grammar error: 'case' inside $( ... ) collect
Date: Thu, 05 Jul 2001 07:43:49 -0700

Chet Ramey wrote:
> 
> > Machine Type: i586-pc-linux-gnu
> >
> > Bash Version: 2.05
> > Patch Level: 0
> > Release Status: release
> >
> > Description:
> > Using "case ... esac" inside a $( ... ) collect does not work
> > because bash-2.05 interprets the ')' of the first 'case' pattern
> > as the closing parenthesis of the $( ... ) collect.
> > The shell's parsing is incorrect.
> 
> This is very hard to do with a yacc-based parser.  That's why bash
> (and POSIX.2) allow a leading paren before a case pattern list -- so
> the parens match.

But the 'info' file does not document the optional leading '(' before
a case pattern list.  Please add it to Node: Conditional Constructs.
It would be helpful to explain, "to avoid parsing problems in $(...)".

-- 
John Reiser, address@hidden



reply via email to

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