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: Chet Ramey
Subject: Re: grammar error: 'case' inside $( ... ) collect
Date: Thu, 5 Jul 2001 08:51:02 -0400

> 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.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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