commit bash-20170505 snapshot

This commit is contained in:
Chet Ramey
2017-05-08 10:53:50 -04:00
parent 2a39157723
commit af2a77fbbc
14 changed files with 125 additions and 30 deletions
+9 -4
View File
@@ -823,25 +823,25 @@ for_command: FOR WORD newline_list DO compound_list DONE
arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list DO compound_list DONE
{
$$ = make_arith_for_command ($2, $6, arith_for_lineno);
/* if ($$ == 0) YYERROR; */
if ($$ == 0) YYERROR;
if (word_top > 0) word_top--;
}
| FOR ARITH_FOR_EXPRS list_terminator newline_list '{' compound_list '}'
{
$$ = make_arith_for_command ($2, $6, arith_for_lineno);
/* if ($$ == 0) YYERROR; */
if ($$ == 0) YYERROR;
if (word_top > 0) word_top--;
}
| FOR ARITH_FOR_EXPRS DO compound_list DONE
{
$$ = make_arith_for_command ($2, $4, arith_for_lineno);
/* if ($$ == 0) YYERROR; */
if ($$ == 0) YYERROR;
if (word_top > 0) word_top--;
}
| FOR ARITH_FOR_EXPRS '{' compound_list '}'
{
$$ = make_arith_for_command ($2, $4, arith_for_lineno);
/* if ($$ == 0) YYERROR; */
if ($$ == 0) YYERROR;
if (word_top > 0) word_top--;
}
;
@@ -5217,6 +5217,11 @@ got_token:
/*itrace("read_token_word: returning REDIR_WORD for %s", the_word->word);*/
return (REDIR_WORD);
}
else
/* valid_array_reference can call the parser recursively; need to
make sure that yylval.word doesn't change if we are going to
return WORD or ASSIGNMENT_WORD */
yylval.word = the_word;
}
result = ((the_word->flags & (W_ASSIGNMENT|W_NOSPLIT)) == (W_ASSIGNMENT|W_NOSPLIT))