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: Brian J. Fox
Subject: Re: grammar error: 'case' inside $( ... ) collect
Date: Thu, 05 Jul 2001 08:53:27 -0700

   Date: Thu, 05 Jul 2001 07:43:49 -0700
   From: John Reiser <address@hidden>

   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 $(...)".

Also, it is hard, but not impossible.

Is there a reason not to implement this, other than time?  If the
reason is time, perhaps someone else would like to implement it.

If no-one steps forward, I could implement it, but I'm not sure when
I'll have the 2-4 hours it could take.

brian
== The Difference Between Cultures: ==
    Einigkeit und Recht und Freiheit
    Liberte', E'galite', Fraternite'
    Sex, drugs and rock'n'roll



reply via email to

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