Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Parser fix



zsh -c 'echo foo ; & echo bar' should give parse error.

Zoltan


*** Src/parse.c	1996/07/22 18:32:51	2.23
--- Src/parse.c	1996/07/29 02:13:25
***************
*** 159,166 ****
  	    l->type = (tok == SEPER) ? Z_SYNC :
  		(tok == AMPER) ? Z_ASYNC : Z_ASYNC | Z_DISOWN;
  	    incmdpos = 1;
! 	    while (tok == SEPER || tok == AMPER || tok == AMPERBANG)
  		yylex();
  	    l->right = par_list();
  	} else {
  	    l = (List) make_list();
--- 159,167 ----
  	    l->type = (tok == SEPER) ? Z_SYNC :
  		(tok == AMPER) ? Z_ASYNC : Z_ASYNC | Z_DISOWN;
  	    incmdpos = 1;
! 	    do {
  		yylex();
+ 	    } while (tok == SEPER);
  	    l->right = par_list();
  	} else {
  	    l = (List) make_list();



Messages sorted by: Reverse Date, Date, Thread, Author