Re: Parse error with consecutive case statements inside $()

2016-04-01 Thread Chet Ramey
On 4/1/16 4:21 AM, Piotr Grzybowski wrote: > Hello! > > I firmly believe that the attached patch fixes the problem at hand; what > it breaks I have no idea. Kindly requesting a review. It breaks the test suite. It tries to do a little bit too much: it should not add the character to the return

Re: Parse error with consecutive case statements inside $()

2016-04-01 Thread Piotr Grzybowski
Hello! I firmly believe that the attached patch fixes the problem at hand; what it breaks I have no idea. Kindly requesting a review. cheers, pg P.S. it also fixes others of the similar type, e.g.: x=$(case 1 in 1) echo 1;; esac; case 2 in 2) echo 2;; esac;) echo $x P.P.S. vim :syntax notic

Re: Parse error with consecutive case statements inside $()

2016-03-31 Thread Piotr Grzybowski
Hello Christian, Hi all, confirmed. this is due to the fact, that the second case does not get tflags |= LEX_INCASE; in parse_comsub which returns prematurely. when I give up on trying to fix that I will let you know :) cheers, pg On Tue, Mar 29, 2016 at 7:43 PM, Christian Franke < christian.

Parse error with consecutive case statements inside $()

2016-03-29 Thread Christian Franke
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: cygwin Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'