128-upstream-bash43-028.patch 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.3
  4. Patch-ID: bash43-028
  5. Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
  6. Bug-Reference-ID:
  7. Bug-Reference-URL:
  8. Bug-Description:
  9. There are two local buffer overflows in parse.y that can cause the shell
  10. to dump core when given many here-documents attached to a single command
  11. or many nested loops.
  12. Patch (apply with `patch -p0'):
  13. --- a/parse.y
  14. +++ b/parse.y
  15. @@ -168,6 +168,9 @@ static char *read_a_line __P((int));
  16. static int reserved_word_acceptable __P((int));
  17. static int yylex __P((void));
  18. +
  19. +static void push_heredoc __P((REDIRECT *));
  20. +static char *mk_alexpansion __P((char *));
  21. static int alias_expand_token __P((char *));
  22. static int time_command_acceptable __P((void));
  23. static int special_case_tokens __P((char *));
  24. @@ -265,7 +268,9 @@ int parser_state;
  25. /* Variables to manage the task of reading here documents, because we need to
  26. defer the reading until after a complete command has been collected. */
  27. -static REDIRECT *redir_stack[10];
  28. +#define HEREDOC_MAX 16
  29. +
  30. +static REDIRECT *redir_stack[HEREDOC_MAX];
  31. int need_here_doc;
  32. /* Where shell input comes from. History expansion is performed on each
  33. @@ -307,7 +312,7 @@ static int global_extglob;
  34. or `for WORD' begins. This is a nested command maximum, since the array
  35. index is decremented after a case, select, or for command is parsed. */
  36. #define MAX_CASE_NEST 128
  37. -static int word_lineno[MAX_CASE_NEST];
  38. +static int word_lineno[MAX_CASE_NEST+1];
  39. static int word_top = -1;
  40. /* If non-zero, it is the token that we want read_token to return
  41. @@ -520,42 +525,42 @@ redirection: '>' WORD
  42. source.dest = 0;
  43. redir.filename = $2;
  44. $$ = make_redirection (source, r_reading_until, redir, 0);
  45. - redir_stack[need_here_doc++] = $$;
  46. + push_heredoc ($$);
  47. }
  48. | NUMBER LESS_LESS WORD
  49. {
  50. source.dest = $1;
  51. redir.filename = $3;
  52. $$ = make_redirection (source, r_reading_until, redir, 0);
  53. - redir_stack[need_here_doc++] = $$;
  54. + push_heredoc ($$);
  55. }
  56. | REDIR_WORD LESS_LESS WORD
  57. {
  58. source.filename = $1;
  59. redir.filename = $3;
  60. $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
  61. - redir_stack[need_here_doc++] = $$;
  62. + push_heredoc ($$);
  63. }
  64. | LESS_LESS_MINUS WORD
  65. {
  66. source.dest = 0;
  67. redir.filename = $2;
  68. $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
  69. - redir_stack[need_here_doc++] = $$;
  70. + push_heredoc ($$);
  71. }
  72. | NUMBER LESS_LESS_MINUS WORD
  73. {
  74. source.dest = $1;
  75. redir.filename = $3;
  76. $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
  77. - redir_stack[need_here_doc++] = $$;
  78. + push_heredoc ($$);
  79. }
  80. | REDIR_WORD LESS_LESS_MINUS WORD
  81. {
  82. source.filename = $1;
  83. redir.filename = $3;
  84. $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
  85. - redir_stack[need_here_doc++] = $$;
  86. + push_heredoc ($$);
  87. }
  88. | LESS_LESS_LESS WORD
  89. {
  90. @@ -2636,6 +2641,21 @@ yylex ()
  91. which allow ESAC to be the next one read. */
  92. static int esacs_needed_count;
  93. +static void
  94. +push_heredoc (r)
  95. + REDIRECT *r;
  96. +{
  97. + if (need_here_doc >= HEREDOC_MAX)
  98. + {
  99. + last_command_exit_value = EX_BADUSAGE;
  100. + need_here_doc = 0;
  101. + report_syntax_error (_("maximum here-document count exceeded"));
  102. + reset_parser ();
  103. + exit_shell (last_command_exit_value);
  104. + }
  105. + redir_stack[need_here_doc++] = r;
  106. +}
  107. +
  108. void
  109. gather_here_documents ()
  110. {
  111. --- a/y.tab.c
  112. +++ b/y.tab.c
  113. @@ -168,7 +168,7 @@
  114. /* Copy the first part of user declarations. */
  115. -#line 21 "/usr/homes/chet/src/bash/src/parse.y"
  116. +#line 21 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  117. #include "config.h"
  118. @@ -319,6 +319,9 @@ static char *read_a_line __P((int));
  119. static int reserved_word_acceptable __P((int));
  120. static int yylex __P((void));
  121. +
  122. +static void push_heredoc __P((REDIRECT *));
  123. +static char *mk_alexpansion __P((char *));
  124. static int alias_expand_token __P((char *));
  125. static int time_command_acceptable __P((void));
  126. static int special_case_tokens __P((char *));
  127. @@ -416,7 +419,9 @@ int parser_state;
  128. /* Variables to manage the task of reading here documents, because we need to
  129. defer the reading until after a complete command has been collected. */
  130. -static REDIRECT *redir_stack[10];
  131. +#define HEREDOC_MAX 16
  132. +
  133. +static REDIRECT *redir_stack[HEREDOC_MAX];
  134. int need_here_doc;
  135. /* Where shell input comes from. History expansion is performed on each
  136. @@ -458,7 +463,7 @@ static int global_extglob;
  137. or `for WORD' begins. This is a nested command maximum, since the array
  138. index is decremented after a case, select, or for command is parsed. */
  139. #define MAX_CASE_NEST 128
  140. -static int word_lineno[MAX_CASE_NEST];
  141. +static int word_lineno[MAX_CASE_NEST+1];
  142. static int word_top = -1;
  143. /* If non-zero, it is the token that we want read_token to return
  144. @@ -492,7 +497,7 @@ static REDIRECTEE redir;
  145. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  146. typedef union YYSTYPE
  147. -#line 324 "/usr/homes/chet/src/bash/src/parse.y"
  148. +#line 329 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  149. {
  150. WORD_DESC *word; /* the word that we read. */
  151. int number; /* the number that we read. */
  152. @@ -503,7 +508,7 @@ typedef union YYSTYPE
  153. PATTERN_LIST *pattern;
  154. }
  155. /* Line 193 of yacc.c. */
  156. -#line 507 "y.tab.c"
  157. +#line 512 "y.tab.c"
  158. YYSTYPE;
  159. # define yystype YYSTYPE /* obsolescent; will be withdrawn */
  160. # define YYSTYPE_IS_DECLARED 1
  161. @@ -516,7 +521,7 @@ typedef union YYSTYPE
  162. /* Line 216 of yacc.c. */
  163. -#line 520 "y.tab.c"
  164. +#line 525 "y.tab.c"
  165. #ifdef short
  166. # undef short
  167. @@ -886,23 +891,23 @@ static const yytype_int8 yyrhs[] =
  168. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  169. static const yytype_uint16 yyrline[] =
  170. {
  171. - 0, 377, 377, 388, 397, 412, 422, 424, 428, 434,
  172. - 440, 446, 452, 458, 464, 470, 476, 482, 488, 494,
  173. - 500, 506, 512, 518, 525, 532, 539, 546, 553, 560,
  174. - 566, 572, 578, 584, 590, 596, 602, 608, 614, 620,
  175. - 626, 632, 638, 644, 650, 656, 662, 668, 674, 680,
  176. - 686, 692, 700, 702, 704, 708, 712, 723, 725, 729,
  177. - 731, 733, 749, 751, 755, 757, 759, 761, 763, 765,
  178. - 767, 769, 771, 773, 775, 779, 784, 789, 794, 799,
  179. - 804, 809, 814, 821, 826, 831, 836, 843, 848, 853,
  180. - 858, 863, 868, 875, 880, 885, 892, 895, 898, 902,
  181. - 904, 935, 942, 947, 964, 969, 986, 993, 995, 997,
  182. - 1002, 1006, 1010, 1014, 1016, 1018, 1022, 1023, 1027, 1029,
  183. - 1031, 1033, 1037, 1039, 1041, 1043, 1045, 1047, 1051, 1053,
  184. - 1062, 1070, 1071, 1077, 1078, 1085, 1089, 1091, 1093, 1100,
  185. - 1102, 1104, 1108, 1109, 1112, 1114, 1116, 1120, 1121, 1130,
  186. - 1143, 1159, 1174, 1176, 1178, 1185, 1188, 1192, 1194, 1200,
  187. - 1206, 1223, 1243, 1245, 1268, 1272, 1274, 1276
  188. + 0, 382, 382, 393, 402, 417, 427, 429, 433, 439,
  189. + 445, 451, 457, 463, 469, 475, 481, 487, 493, 499,
  190. + 505, 511, 517, 523, 530, 537, 544, 551, 558, 565,
  191. + 571, 577, 583, 589, 595, 601, 607, 613, 619, 625,
  192. + 631, 637, 643, 649, 655, 661, 667, 673, 679, 685,
  193. + 691, 697, 705, 707, 709, 713, 717, 728, 730, 734,
  194. + 736, 738, 754, 756, 760, 762, 764, 766, 768, 770,
  195. + 772, 774, 776, 778, 780, 784, 789, 794, 799, 804,
  196. + 809, 814, 819, 826, 831, 836, 841, 848, 853, 858,
  197. + 863, 868, 873, 880, 885, 890, 897, 900, 903, 907,
  198. + 909, 940, 947, 952, 969, 974, 991, 998, 1000, 1002,
  199. + 1007, 1011, 1015, 1019, 1021, 1023, 1027, 1028, 1032, 1034,
  200. + 1036, 1038, 1042, 1044, 1046, 1048, 1050, 1052, 1056, 1058,
  201. + 1067, 1075, 1076, 1082, 1083, 1090, 1094, 1096, 1098, 1105,
  202. + 1107, 1109, 1113, 1114, 1117, 1119, 1121, 1125, 1126, 1135,
  203. + 1148, 1164, 1179, 1181, 1183, 1190, 1193, 1197, 1199, 1205,
  204. + 1211, 1228, 1248, 1250, 1273, 1277, 1279, 1281
  205. };
  206. #endif
  207. @@ -2093,7 +2098,7 @@ yyreduce:
  208. switch (yyn)
  209. {
  210. case 2:
  211. -#line 378 "/usr/homes/chet/src/bash/src/parse.y"
  212. +#line 383 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  213. {
  214. /* Case of regular command. Discard the error
  215. safety net,and return the command just parsed. */
  216. @@ -2107,7 +2112,7 @@ yyreduce:
  217. break;
  218. case 3:
  219. -#line 389 "/usr/homes/chet/src/bash/src/parse.y"
  220. +#line 394 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  221. {
  222. /* Case of regular command, but not a very
  223. interesting one. Return a NULL command. */
  224. @@ -2119,7 +2124,7 @@ yyreduce:
  225. break;
  226. case 4:
  227. -#line 398 "/usr/homes/chet/src/bash/src/parse.y"
  228. +#line 403 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  229. {
  230. /* Error during parsing. Return NULL command. */
  231. global_command = (COMMAND *)NULL;
  232. @@ -2137,7 +2142,7 @@ yyreduce:
  233. break;
  234. case 5:
  235. -#line 413 "/usr/homes/chet/src/bash/src/parse.y"
  236. +#line 418 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  237. {
  238. /* Case of EOF seen by itself. Do ignoreeof or
  239. not. */
  240. @@ -2148,17 +2153,17 @@ yyreduce:
  241. break;
  242. case 6:
  243. -#line 423 "/usr/homes/chet/src/bash/src/parse.y"
  244. +#line 428 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  245. { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
  246. break;
  247. case 7:
  248. -#line 425 "/usr/homes/chet/src/bash/src/parse.y"
  249. +#line 430 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  250. { (yyval.word_list) = make_word_list ((yyvsp[(2) - (2)].word), (yyvsp[(1) - (2)].word_list)); }
  251. break;
  252. case 8:
  253. -#line 429 "/usr/homes/chet/src/bash/src/parse.y"
  254. +#line 434 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  255. {
  256. source.dest = 1;
  257. redir.filename = (yyvsp[(2) - (2)].word);
  258. @@ -2167,7 +2172,7 @@ yyreduce:
  259. break;
  260. case 9:
  261. -#line 435 "/usr/homes/chet/src/bash/src/parse.y"
  262. +#line 440 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  263. {
  264. source.dest = 0;
  265. redir.filename = (yyvsp[(2) - (2)].word);
  266. @@ -2176,7 +2181,7 @@ yyreduce:
  267. break;
  268. case 10:
  269. -#line 441 "/usr/homes/chet/src/bash/src/parse.y"
  270. +#line 446 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  271. {
  272. source.dest = (yyvsp[(1) - (3)].number);
  273. redir.filename = (yyvsp[(3) - (3)].word);
  274. @@ -2185,7 +2190,7 @@ yyreduce:
  275. break;
  276. case 11:
  277. -#line 447 "/usr/homes/chet/src/bash/src/parse.y"
  278. +#line 452 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  279. {
  280. source.dest = (yyvsp[(1) - (3)].number);
  281. redir.filename = (yyvsp[(3) - (3)].word);
  282. @@ -2194,7 +2199,7 @@ yyreduce:
  283. break;
  284. case 12:
  285. -#line 453 "/usr/homes/chet/src/bash/src/parse.y"
  286. +#line 458 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  287. {
  288. source.filename = (yyvsp[(1) - (3)].word);
  289. redir.filename = (yyvsp[(3) - (3)].word);
  290. @@ -2203,7 +2208,7 @@ yyreduce:
  291. break;
  292. case 13:
  293. -#line 459 "/usr/homes/chet/src/bash/src/parse.y"
  294. +#line 464 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  295. {
  296. source.filename = (yyvsp[(1) - (3)].word);
  297. redir.filename = (yyvsp[(3) - (3)].word);
  298. @@ -2212,7 +2217,7 @@ yyreduce:
  299. break;
  300. case 14:
  301. -#line 465 "/usr/homes/chet/src/bash/src/parse.y"
  302. +#line 470 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  303. {
  304. source.dest = 1;
  305. redir.filename = (yyvsp[(2) - (2)].word);
  306. @@ -2221,7 +2226,7 @@ yyreduce:
  307. break;
  308. case 15:
  309. -#line 471 "/usr/homes/chet/src/bash/src/parse.y"
  310. +#line 476 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  311. {
  312. source.dest = (yyvsp[(1) - (3)].number);
  313. redir.filename = (yyvsp[(3) - (3)].word);
  314. @@ -2230,7 +2235,7 @@ yyreduce:
  315. break;
  316. case 16:
  317. -#line 477 "/usr/homes/chet/src/bash/src/parse.y"
  318. +#line 482 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  319. {
  320. source.filename = (yyvsp[(1) - (3)].word);
  321. redir.filename = (yyvsp[(3) - (3)].word);
  322. @@ -2239,7 +2244,7 @@ yyreduce:
  323. break;
  324. case 17:
  325. -#line 483 "/usr/homes/chet/src/bash/src/parse.y"
  326. +#line 488 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  327. {
  328. source.dest = 1;
  329. redir.filename = (yyvsp[(2) - (2)].word);
  330. @@ -2248,7 +2253,7 @@ yyreduce:
  331. break;
  332. case 18:
  333. -#line 489 "/usr/homes/chet/src/bash/src/parse.y"
  334. +#line 494 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  335. {
  336. source.dest = (yyvsp[(1) - (3)].number);
  337. redir.filename = (yyvsp[(3) - (3)].word);
  338. @@ -2257,7 +2262,7 @@ yyreduce:
  339. break;
  340. case 19:
  341. -#line 495 "/usr/homes/chet/src/bash/src/parse.y"
  342. +#line 500 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  343. {
  344. source.filename = (yyvsp[(1) - (3)].word);
  345. redir.filename = (yyvsp[(3) - (3)].word);
  346. @@ -2266,7 +2271,7 @@ yyreduce:
  347. break;
  348. case 20:
  349. -#line 501 "/usr/homes/chet/src/bash/src/parse.y"
  350. +#line 506 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  351. {
  352. source.dest = 0;
  353. redir.filename = (yyvsp[(2) - (2)].word);
  354. @@ -2275,7 +2280,7 @@ yyreduce:
  355. break;
  356. case 21:
  357. -#line 507 "/usr/homes/chet/src/bash/src/parse.y"
  358. +#line 512 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  359. {
  360. source.dest = (yyvsp[(1) - (3)].number);
  361. redir.filename = (yyvsp[(3) - (3)].word);
  362. @@ -2284,7 +2289,7 @@ yyreduce:
  363. break;
  364. case 22:
  365. -#line 513 "/usr/homes/chet/src/bash/src/parse.y"
  366. +#line 518 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  367. {
  368. source.filename = (yyvsp[(1) - (3)].word);
  369. redir.filename = (yyvsp[(3) - (3)].word);
  370. @@ -2293,67 +2298,67 @@ yyreduce:
  371. break;
  372. case 23:
  373. -#line 519 "/usr/homes/chet/src/bash/src/parse.y"
  374. +#line 524 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  375. {
  376. source.dest = 0;
  377. redir.filename = (yyvsp[(2) - (2)].word);
  378. (yyval.redirect) = make_redirection (source, r_reading_until, redir, 0);
  379. - redir_stack[need_here_doc++] = (yyval.redirect);
  380. + push_heredoc ((yyval.redirect));
  381. }
  382. break;
  383. case 24:
  384. -#line 526 "/usr/homes/chet/src/bash/src/parse.y"
  385. +#line 531 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  386. {
  387. source.dest = (yyvsp[(1) - (3)].number);
  388. redir.filename = (yyvsp[(3) - (3)].word);
  389. (yyval.redirect) = make_redirection (source, r_reading_until, redir, 0);
  390. - redir_stack[need_here_doc++] = (yyval.redirect);
  391. + push_heredoc ((yyval.redirect));
  392. }
  393. break;
  394. case 25:
  395. -#line 533 "/usr/homes/chet/src/bash/src/parse.y"
  396. +#line 538 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  397. {
  398. source.filename = (yyvsp[(1) - (3)].word);
  399. redir.filename = (yyvsp[(3) - (3)].word);
  400. (yyval.redirect) = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
  401. - redir_stack[need_here_doc++] = (yyval.redirect);
  402. + push_heredoc ((yyval.redirect));
  403. }
  404. break;
  405. case 26:
  406. -#line 540 "/usr/homes/chet/src/bash/src/parse.y"
  407. +#line 545 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  408. {
  409. source.dest = 0;
  410. redir.filename = (yyvsp[(2) - (2)].word);
  411. (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, 0);
  412. - redir_stack[need_here_doc++] = (yyval.redirect);
  413. + push_heredoc ((yyval.redirect));
  414. }
  415. break;
  416. case 27:
  417. -#line 547 "/usr/homes/chet/src/bash/src/parse.y"
  418. +#line 552 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  419. {
  420. source.dest = (yyvsp[(1) - (3)].number);
  421. redir.filename = (yyvsp[(3) - (3)].word);
  422. (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, 0);
  423. - redir_stack[need_here_doc++] = (yyval.redirect);
  424. + push_heredoc ((yyval.redirect));
  425. }
  426. break;
  427. case 28:
  428. -#line 554 "/usr/homes/chet/src/bash/src/parse.y"
  429. +#line 559 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  430. {
  431. source.filename = (yyvsp[(1) - (3)].word);
  432. redir.filename = (yyvsp[(3) - (3)].word);
  433. (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
  434. - redir_stack[need_here_doc++] = (yyval.redirect);
  435. + push_heredoc ((yyval.redirect));
  436. }
  437. break;
  438. case 29:
  439. -#line 561 "/usr/homes/chet/src/bash/src/parse.y"
  440. +#line 566 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  441. {
  442. source.dest = 0;
  443. redir.filename = (yyvsp[(2) - (2)].word);
  444. @@ -2362,7 +2367,7 @@ yyreduce:
  445. break;
  446. case 30:
  447. -#line 567 "/usr/homes/chet/src/bash/src/parse.y"
  448. +#line 572 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  449. {
  450. source.dest = (yyvsp[(1) - (3)].number);
  451. redir.filename = (yyvsp[(3) - (3)].word);
  452. @@ -2371,7 +2376,7 @@ yyreduce:
  453. break;
  454. case 31:
  455. -#line 573 "/usr/homes/chet/src/bash/src/parse.y"
  456. +#line 578 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  457. {
  458. source.filename = (yyvsp[(1) - (3)].word);
  459. redir.filename = (yyvsp[(3) - (3)].word);
  460. @@ -2380,7 +2385,7 @@ yyreduce:
  461. break;
  462. case 32:
  463. -#line 579 "/usr/homes/chet/src/bash/src/parse.y"
  464. +#line 584 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  465. {
  466. source.dest = 0;
  467. redir.dest = (yyvsp[(2) - (2)].number);
  468. @@ -2389,7 +2394,7 @@ yyreduce:
  469. break;
  470. case 33:
  471. -#line 585 "/usr/homes/chet/src/bash/src/parse.y"
  472. +#line 590 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  473. {
  474. source.dest = (yyvsp[(1) - (3)].number);
  475. redir.dest = (yyvsp[(3) - (3)].number);
  476. @@ -2398,7 +2403,7 @@ yyreduce:
  477. break;
  478. case 34:
  479. -#line 591 "/usr/homes/chet/src/bash/src/parse.y"
  480. +#line 596 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  481. {
  482. source.filename = (yyvsp[(1) - (3)].word);
  483. redir.dest = (yyvsp[(3) - (3)].number);
  484. @@ -2407,7 +2412,7 @@ yyreduce:
  485. break;
  486. case 35:
  487. -#line 597 "/usr/homes/chet/src/bash/src/parse.y"
  488. +#line 602 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  489. {
  490. source.dest = 1;
  491. redir.dest = (yyvsp[(2) - (2)].number);
  492. @@ -2416,7 +2421,7 @@ yyreduce:
  493. break;
  494. case 36:
  495. -#line 603 "/usr/homes/chet/src/bash/src/parse.y"
  496. +#line 608 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  497. {
  498. source.dest = (yyvsp[(1) - (3)].number);
  499. redir.dest = (yyvsp[(3) - (3)].number);
  500. @@ -2425,7 +2430,7 @@ yyreduce:
  501. break;
  502. case 37:
  503. -#line 609 "/usr/homes/chet/src/bash/src/parse.y"
  504. +#line 614 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  505. {
  506. source.filename = (yyvsp[(1) - (3)].word);
  507. redir.dest = (yyvsp[(3) - (3)].number);
  508. @@ -2434,7 +2439,7 @@ yyreduce:
  509. break;
  510. case 38:
  511. -#line 615 "/usr/homes/chet/src/bash/src/parse.y"
  512. +#line 620 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  513. {
  514. source.dest = 0;
  515. redir.filename = (yyvsp[(2) - (2)].word);
  516. @@ -2443,7 +2448,7 @@ yyreduce:
  517. break;
  518. case 39:
  519. -#line 621 "/usr/homes/chet/src/bash/src/parse.y"
  520. +#line 626 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  521. {
  522. source.dest = (yyvsp[(1) - (3)].number);
  523. redir.filename = (yyvsp[(3) - (3)].word);
  524. @@ -2452,7 +2457,7 @@ yyreduce:
  525. break;
  526. case 40:
  527. -#line 627 "/usr/homes/chet/src/bash/src/parse.y"
  528. +#line 632 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  529. {
  530. source.filename = (yyvsp[(1) - (3)].word);
  531. redir.filename = (yyvsp[(3) - (3)].word);
  532. @@ -2461,7 +2466,7 @@ yyreduce:
  533. break;
  534. case 41:
  535. -#line 633 "/usr/homes/chet/src/bash/src/parse.y"
  536. +#line 638 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  537. {
  538. source.dest = 1;
  539. redir.filename = (yyvsp[(2) - (2)].word);
  540. @@ -2470,7 +2475,7 @@ yyreduce:
  541. break;
  542. case 42:
  543. -#line 639 "/usr/homes/chet/src/bash/src/parse.y"
  544. +#line 644 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  545. {
  546. source.dest = (yyvsp[(1) - (3)].number);
  547. redir.filename = (yyvsp[(3) - (3)].word);
  548. @@ -2479,7 +2484,7 @@ yyreduce:
  549. break;
  550. case 43:
  551. -#line 645 "/usr/homes/chet/src/bash/src/parse.y"
  552. +#line 650 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  553. {
  554. source.filename = (yyvsp[(1) - (3)].word);
  555. redir.filename = (yyvsp[(3) - (3)].word);
  556. @@ -2488,7 +2493,7 @@ yyreduce:
  557. break;
  558. case 44:
  559. -#line 651 "/usr/homes/chet/src/bash/src/parse.y"
  560. +#line 656 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  561. {
  562. source.dest = 1;
  563. redir.dest = 0;
  564. @@ -2497,7 +2502,7 @@ yyreduce:
  565. break;
  566. case 45:
  567. -#line 657 "/usr/homes/chet/src/bash/src/parse.y"
  568. +#line 662 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  569. {
  570. source.dest = (yyvsp[(1) - (3)].number);
  571. redir.dest = 0;
  572. @@ -2506,7 +2511,7 @@ yyreduce:
  573. break;
  574. case 46:
  575. -#line 663 "/usr/homes/chet/src/bash/src/parse.y"
  576. +#line 668 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  577. {
  578. source.filename = (yyvsp[(1) - (3)].word);
  579. redir.dest = 0;
  580. @@ -2515,7 +2520,7 @@ yyreduce:
  581. break;
  582. case 47:
  583. -#line 669 "/usr/homes/chet/src/bash/src/parse.y"
  584. +#line 674 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  585. {
  586. source.dest = 0;
  587. redir.dest = 0;
  588. @@ -2524,7 +2529,7 @@ yyreduce:
  589. break;
  590. case 48:
  591. -#line 675 "/usr/homes/chet/src/bash/src/parse.y"
  592. +#line 680 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  593. {
  594. source.dest = (yyvsp[(1) - (3)].number);
  595. redir.dest = 0;
  596. @@ -2533,7 +2538,7 @@ yyreduce:
  597. break;
  598. case 49:
  599. -#line 681 "/usr/homes/chet/src/bash/src/parse.y"
  600. +#line 686 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  601. {
  602. source.filename = (yyvsp[(1) - (3)].word);
  603. redir.dest = 0;
  604. @@ -2542,7 +2547,7 @@ yyreduce:
  605. break;
  606. case 50:
  607. -#line 687 "/usr/homes/chet/src/bash/src/parse.y"
  608. +#line 692 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  609. {
  610. source.dest = 1;
  611. redir.filename = (yyvsp[(2) - (2)].word);
  612. @@ -2551,7 +2556,7 @@ yyreduce:
  613. break;
  614. case 51:
  615. -#line 693 "/usr/homes/chet/src/bash/src/parse.y"
  616. +#line 698 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  617. {
  618. source.dest = 1;
  619. redir.filename = (yyvsp[(2) - (2)].word);
  620. @@ -2560,29 +2565,29 @@ yyreduce:
  621. break;
  622. case 52:
  623. -#line 701 "/usr/homes/chet/src/bash/src/parse.y"
  624. +#line 706 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  625. { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
  626. break;
  627. case 53:
  628. -#line 703 "/usr/homes/chet/src/bash/src/parse.y"
  629. +#line 708 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  630. { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
  631. break;
  632. case 54:
  633. -#line 705 "/usr/homes/chet/src/bash/src/parse.y"
  634. +#line 710 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  635. { (yyval.element).redirect = (yyvsp[(1) - (1)].redirect); (yyval.element).word = 0; }
  636. break;
  637. case 55:
  638. -#line 709 "/usr/homes/chet/src/bash/src/parse.y"
  639. +#line 714 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  640. {
  641. (yyval.redirect) = (yyvsp[(1) - (1)].redirect);
  642. }
  643. break;
  644. case 56:
  645. -#line 713 "/usr/homes/chet/src/bash/src/parse.y"
  646. +#line 718 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  647. {
  648. register REDIRECT *t;
  649. @@ -2594,27 +2599,27 @@ yyreduce:
  650. break;
  651. case 57:
  652. -#line 724 "/usr/homes/chet/src/bash/src/parse.y"
  653. +#line 729 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  654. { (yyval.command) = make_simple_command ((yyvsp[(1) - (1)].element), (COMMAND *)NULL); }
  655. break;
  656. case 58:
  657. -#line 726 "/usr/homes/chet/src/bash/src/parse.y"
  658. +#line 731 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  659. { (yyval.command) = make_simple_command ((yyvsp[(2) - (2)].element), (yyvsp[(1) - (2)].command)); }
  660. break;
  661. case 59:
  662. -#line 730 "/usr/homes/chet/src/bash/src/parse.y"
  663. +#line 735 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  664. { (yyval.command) = clean_simple_command ((yyvsp[(1) - (1)].command)); }
  665. break;
  666. case 60:
  667. -#line 732 "/usr/homes/chet/src/bash/src/parse.y"
  668. +#line 737 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  669. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  670. break;
  671. case 61:
  672. -#line 734 "/usr/homes/chet/src/bash/src/parse.y"
  673. +#line 739 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  674. {
  675. COMMAND *tc;
  676. @@ -2633,72 +2638,72 @@ yyreduce:
  677. break;
  678. case 62:
  679. -#line 750 "/usr/homes/chet/src/bash/src/parse.y"
  680. +#line 755 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  681. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  682. break;
  683. case 63:
  684. -#line 752 "/usr/homes/chet/src/bash/src/parse.y"
  685. +#line 757 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  686. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  687. break;
  688. case 64:
  689. -#line 756 "/usr/homes/chet/src/bash/src/parse.y"
  690. +#line 761 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  691. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  692. break;
  693. case 65:
  694. -#line 758 "/usr/homes/chet/src/bash/src/parse.y"
  695. +#line 763 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  696. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  697. break;
  698. case 66:
  699. -#line 760 "/usr/homes/chet/src/bash/src/parse.y"
  700. +#line 765 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  701. { (yyval.command) = make_while_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
  702. break;
  703. case 67:
  704. -#line 762 "/usr/homes/chet/src/bash/src/parse.y"
  705. +#line 767 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  706. { (yyval.command) = make_until_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
  707. break;
  708. case 68:
  709. -#line 764 "/usr/homes/chet/src/bash/src/parse.y"
  710. +#line 769 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  711. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  712. break;
  713. case 69:
  714. -#line 766 "/usr/homes/chet/src/bash/src/parse.y"
  715. +#line 771 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  716. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  717. break;
  718. case 70:
  719. -#line 768 "/usr/homes/chet/src/bash/src/parse.y"
  720. +#line 773 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  721. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  722. break;
  723. case 71:
  724. -#line 770 "/usr/homes/chet/src/bash/src/parse.y"
  725. +#line 775 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  726. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  727. break;
  728. case 72:
  729. -#line 772 "/usr/homes/chet/src/bash/src/parse.y"
  730. +#line 777 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  731. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  732. break;
  733. case 73:
  734. -#line 774 "/usr/homes/chet/src/bash/src/parse.y"
  735. +#line 779 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  736. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  737. break;
  738. case 74:
  739. -#line 776 "/usr/homes/chet/src/bash/src/parse.y"
  740. +#line 781 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  741. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  742. break;
  743. case 75:
  744. -#line 780 "/usr/homes/chet/src/bash/src/parse.y"
  745. +#line 785 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  746. {
  747. (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
  748. if (word_top > 0) word_top--;
  749. @@ -2706,7 +2711,7 @@ yyreduce:
  750. break;
  751. case 76:
  752. -#line 785 "/usr/homes/chet/src/bash/src/parse.y"
  753. +#line 790 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  754. {
  755. (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
  756. if (word_top > 0) word_top--;
  757. @@ -2714,7 +2719,7 @@ yyreduce:
  758. break;
  759. case 77:
  760. -#line 790 "/usr/homes/chet/src/bash/src/parse.y"
  761. +#line 795 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  762. {
  763. (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
  764. if (word_top > 0) word_top--;
  765. @@ -2722,7 +2727,7 @@ yyreduce:
  766. break;
  767. case 78:
  768. -#line 795 "/usr/homes/chet/src/bash/src/parse.y"
  769. +#line 800 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  770. {
  771. (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
  772. if (word_top > 0) word_top--;
  773. @@ -2730,7 +2735,7 @@ yyreduce:
  774. break;
  775. case 79:
  776. -#line 800 "/usr/homes/chet/src/bash/src/parse.y"
  777. +#line 805 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  778. {
  779. (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
  780. if (word_top > 0) word_top--;
  781. @@ -2738,7 +2743,7 @@ yyreduce:
  782. break;
  783. case 80:
  784. -#line 805 "/usr/homes/chet/src/bash/src/parse.y"
  785. +#line 810 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  786. {
  787. (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
  788. if (word_top > 0) word_top--;
  789. @@ -2746,7 +2751,7 @@ yyreduce:
  790. break;
  791. case 81:
  792. -#line 810 "/usr/homes/chet/src/bash/src/parse.y"
  793. +#line 815 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  794. {
  795. (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
  796. if (word_top > 0) word_top--;
  797. @@ -2754,7 +2759,7 @@ yyreduce:
  798. break;
  799. case 82:
  800. -#line 815 "/usr/homes/chet/src/bash/src/parse.y"
  801. +#line 820 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  802. {
  803. (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
  804. if (word_top > 0) word_top--;
  805. @@ -2762,7 +2767,7 @@ yyreduce:
  806. break;
  807. case 83:
  808. -#line 822 "/usr/homes/chet/src/bash/src/parse.y"
  809. +#line 827 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  810. {
  811. (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
  812. if (word_top > 0) word_top--;
  813. @@ -2770,7 +2775,7 @@ yyreduce:
  814. break;
  815. case 84:
  816. -#line 827 "/usr/homes/chet/src/bash/src/parse.y"
  817. +#line 832 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  818. {
  819. (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
  820. if (word_top > 0) word_top--;
  821. @@ -2778,7 +2783,7 @@ yyreduce:
  822. break;
  823. case 85:
  824. -#line 832 "/usr/homes/chet/src/bash/src/parse.y"
  825. +#line 837 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  826. {
  827. (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
  828. if (word_top > 0) word_top--;
  829. @@ -2786,7 +2791,7 @@ yyreduce:
  830. break;
  831. case 86:
  832. -#line 837 "/usr/homes/chet/src/bash/src/parse.y"
  833. +#line 842 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  834. {
  835. (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
  836. if (word_top > 0) word_top--;
  837. @@ -2794,7 +2799,7 @@ yyreduce:
  838. break;
  839. case 87:
  840. -#line 844 "/usr/homes/chet/src/bash/src/parse.y"
  841. +#line 849 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  842. {
  843. (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
  844. if (word_top > 0) word_top--;
  845. @@ -2802,7 +2807,7 @@ yyreduce:
  846. break;
  847. case 88:
  848. -#line 849 "/usr/homes/chet/src/bash/src/parse.y"
  849. +#line 854 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  850. {
  851. (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
  852. if (word_top > 0) word_top--;
  853. @@ -2810,7 +2815,7 @@ yyreduce:
  854. break;
  855. case 89:
  856. -#line 854 "/usr/homes/chet/src/bash/src/parse.y"
  857. +#line 859 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  858. {
  859. (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
  860. if (word_top > 0) word_top--;
  861. @@ -2818,7 +2823,7 @@ yyreduce:
  862. break;
  863. case 90:
  864. -#line 859 "/usr/homes/chet/src/bash/src/parse.y"
  865. +#line 864 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  866. {
  867. (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
  868. if (word_top > 0) word_top--;
  869. @@ -2826,7 +2831,7 @@ yyreduce:
  870. break;
  871. case 91:
  872. -#line 864 "/usr/homes/chet/src/bash/src/parse.y"
  873. +#line 869 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  874. {
  875. (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
  876. if (word_top > 0) word_top--;
  877. @@ -2834,7 +2839,7 @@ yyreduce:
  878. break;
  879. case 92:
  880. -#line 869 "/usr/homes/chet/src/bash/src/parse.y"
  881. +#line 874 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  882. {
  883. (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
  884. if (word_top > 0) word_top--;
  885. @@ -2842,7 +2847,7 @@ yyreduce:
  886. break;
  887. case 93:
  888. -#line 876 "/usr/homes/chet/src/bash/src/parse.y"
  889. +#line 881 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  890. {
  891. (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (PATTERN_LIST *)NULL, word_lineno[word_top]);
  892. if (word_top > 0) word_top--;
  893. @@ -2850,7 +2855,7 @@ yyreduce:
  894. break;
  895. case 94:
  896. -#line 881 "/usr/homes/chet/src/bash/src/parse.y"
  897. +#line 886 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  898. {
  899. (yyval.command) = make_case_command ((yyvsp[(2) - (7)].word), (yyvsp[(5) - (7)].pattern), word_lineno[word_top]);
  900. if (word_top > 0) word_top--;
  901. @@ -2858,7 +2863,7 @@ yyreduce:
  902. break;
  903. case 95:
  904. -#line 886 "/usr/homes/chet/src/bash/src/parse.y"
  905. +#line 891 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  906. {
  907. (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (yyvsp[(5) - (6)].pattern), word_lineno[word_top]);
  908. if (word_top > 0) word_top--;
  909. @@ -2866,27 +2871,27 @@ yyreduce:
  910. break;
  911. case 96:
  912. -#line 893 "/usr/homes/chet/src/bash/src/parse.y"
  913. +#line 898 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  914. { (yyval.command) = make_function_def ((yyvsp[(1) - (5)].word), (yyvsp[(5) - (5)].command), function_dstart, function_bstart); }
  915. break;
  916. case 97:
  917. -#line 896 "/usr/homes/chet/src/bash/src/parse.y"
  918. +#line 901 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  919. { (yyval.command) = make_function_def ((yyvsp[(2) - (6)].word), (yyvsp[(6) - (6)].command), function_dstart, function_bstart); }
  920. break;
  921. case 98:
  922. -#line 899 "/usr/homes/chet/src/bash/src/parse.y"
  923. +#line 904 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  924. { (yyval.command) = make_function_def ((yyvsp[(2) - (4)].word), (yyvsp[(4) - (4)].command), function_dstart, function_bstart); }
  925. break;
  926. case 99:
  927. -#line 903 "/usr/homes/chet/src/bash/src/parse.y"
  928. +#line 908 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  929. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  930. break;
  931. case 100:
  932. -#line 905 "/usr/homes/chet/src/bash/src/parse.y"
  933. +#line 910 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  934. {
  935. COMMAND *tc;
  936. @@ -2918,7 +2923,7 @@ yyreduce:
  937. break;
  938. case 101:
  939. -#line 936 "/usr/homes/chet/src/bash/src/parse.y"
  940. +#line 941 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  941. {
  942. (yyval.command) = make_subshell_command ((yyvsp[(2) - (3)].command));
  943. (yyval.command)->flags |= CMD_WANT_SUBSHELL;
  944. @@ -2926,7 +2931,7 @@ yyreduce:
  945. break;
  946. case 102:
  947. -#line 943 "/usr/homes/chet/src/bash/src/parse.y"
  948. +#line 948 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  949. {
  950. (yyval.command) = make_coproc_command ("COPROC", (yyvsp[(2) - (2)].command));
  951. (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
  952. @@ -2934,7 +2939,7 @@ yyreduce:
  953. break;
  954. case 103:
  955. -#line 948 "/usr/homes/chet/src/bash/src/parse.y"
  956. +#line 953 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  957. {
  958. COMMAND *tc;
  959. @@ -2954,7 +2959,7 @@ yyreduce:
  960. break;
  961. case 104:
  962. -#line 965 "/usr/homes/chet/src/bash/src/parse.y"
  963. +#line 970 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  964. {
  965. (yyval.command) = make_coproc_command ((yyvsp[(2) - (3)].word)->word, (yyvsp[(3) - (3)].command));
  966. (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
  967. @@ -2962,7 +2967,7 @@ yyreduce:
  968. break;
  969. case 105:
  970. -#line 970 "/usr/homes/chet/src/bash/src/parse.y"
  971. +#line 975 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  972. {
  973. COMMAND *tc;
  974. @@ -2982,7 +2987,7 @@ yyreduce:
  975. break;
  976. case 106:
  977. -#line 987 "/usr/homes/chet/src/bash/src/parse.y"
  978. +#line 992 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  979. {
  980. (yyval.command) = make_coproc_command ("COPROC", clean_simple_command ((yyvsp[(2) - (2)].command)));
  981. (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
  982. @@ -2990,117 +2995,117 @@ yyreduce:
  983. break;
  984. case 107:
  985. -#line 994 "/usr/homes/chet/src/bash/src/parse.y"
  986. +#line 999 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  987. { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (COMMAND *)NULL); }
  988. break;
  989. case 108:
  990. -#line 996 "/usr/homes/chet/src/bash/src/parse.y"
  991. +#line 1001 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  992. { (yyval.command) = make_if_command ((yyvsp[(2) - (7)].command), (yyvsp[(4) - (7)].command), (yyvsp[(6) - (7)].command)); }
  993. break;
  994. case 109:
  995. -#line 998 "/usr/homes/chet/src/bash/src/parse.y"
  996. +#line 1003 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  997. { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(5) - (6)].command)); }
  998. break;
  999. case 110:
  1000. -#line 1003 "/usr/homes/chet/src/bash/src/parse.y"
  1001. +#line 1008 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1002. { (yyval.command) = make_group_command ((yyvsp[(2) - (3)].command)); }
  1003. break;
  1004. case 111:
  1005. -#line 1007 "/usr/homes/chet/src/bash/src/parse.y"
  1006. +#line 1012 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1007. { (yyval.command) = make_arith_command ((yyvsp[(1) - (1)].word_list)); }
  1008. break;
  1009. case 112:
  1010. -#line 1011 "/usr/homes/chet/src/bash/src/parse.y"
  1011. +#line 1016 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1012. { (yyval.command) = (yyvsp[(2) - (3)].command); }
  1013. break;
  1014. case 113:
  1015. -#line 1015 "/usr/homes/chet/src/bash/src/parse.y"
  1016. +#line 1020 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1017. { (yyval.command) = make_if_command ((yyvsp[(2) - (4)].command), (yyvsp[(4) - (4)].command), (COMMAND *)NULL); }
  1018. break;
  1019. case 114:
  1020. -#line 1017 "/usr/homes/chet/src/bash/src/parse.y"
  1021. +#line 1022 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1022. { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(6) - (6)].command)); }
  1023. break;
  1024. case 115:
  1025. -#line 1019 "/usr/homes/chet/src/bash/src/parse.y"
  1026. +#line 1024 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1027. { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (yyvsp[(5) - (5)].command)); }
  1028. break;
  1029. case 117:
  1030. -#line 1024 "/usr/homes/chet/src/bash/src/parse.y"
  1031. +#line 1029 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1032. { (yyvsp[(2) - (2)].pattern)->next = (yyvsp[(1) - (2)].pattern); (yyval.pattern) = (yyvsp[(2) - (2)].pattern); }
  1033. break;
  1034. case 118:
  1035. -#line 1028 "/usr/homes/chet/src/bash/src/parse.y"
  1036. +#line 1033 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1037. { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (yyvsp[(4) - (4)].command)); }
  1038. break;
  1039. case 119:
  1040. -#line 1030 "/usr/homes/chet/src/bash/src/parse.y"
  1041. +#line 1035 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1042. { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (COMMAND *)NULL); }
  1043. break;
  1044. case 120:
  1045. -#line 1032 "/usr/homes/chet/src/bash/src/parse.y"
  1046. +#line 1037 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1047. { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (yyvsp[(5) - (5)].command)); }
  1048. break;
  1049. case 121:
  1050. -#line 1034 "/usr/homes/chet/src/bash/src/parse.y"
  1051. +#line 1039 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1052. { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (COMMAND *)NULL); }
  1053. break;
  1054. case 122:
  1055. -#line 1038 "/usr/homes/chet/src/bash/src/parse.y"
  1056. +#line 1043 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1057. { (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
  1058. break;
  1059. case 123:
  1060. -#line 1040 "/usr/homes/chet/src/bash/src/parse.y"
  1061. +#line 1045 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1062. { (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
  1063. break;
  1064. case 124:
  1065. -#line 1042 "/usr/homes/chet/src/bash/src/parse.y"
  1066. +#line 1047 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1067. { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
  1068. break;
  1069. case 125:
  1070. -#line 1044 "/usr/homes/chet/src/bash/src/parse.y"
  1071. +#line 1049 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1072. { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
  1073. break;
  1074. case 126:
  1075. -#line 1046 "/usr/homes/chet/src/bash/src/parse.y"
  1076. +#line 1051 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1077. { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_TESTNEXT; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
  1078. break;
  1079. case 127:
  1080. -#line 1048 "/usr/homes/chet/src/bash/src/parse.y"
  1081. +#line 1053 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1082. { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_TESTNEXT; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
  1083. break;
  1084. case 128:
  1085. -#line 1052 "/usr/homes/chet/src/bash/src/parse.y"
  1086. +#line 1057 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1087. { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
  1088. break;
  1089. case 129:
  1090. -#line 1054 "/usr/homes/chet/src/bash/src/parse.y"
  1091. +#line 1059 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1092. { (yyval.word_list) = make_word_list ((yyvsp[(3) - (3)].word), (yyvsp[(1) - (3)].word_list)); }
  1093. break;
  1094. case 130:
  1095. -#line 1063 "/usr/homes/chet/src/bash/src/parse.y"
  1096. +#line 1068 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1097. {
  1098. (yyval.command) = (yyvsp[(2) - (2)].command);
  1099. if (need_here_doc)
  1100. @@ -3109,14 +3114,14 @@ yyreduce:
  1101. break;
  1102. case 132:
  1103. -#line 1072 "/usr/homes/chet/src/bash/src/parse.y"
  1104. +#line 1077 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1105. {
  1106. (yyval.command) = (yyvsp[(2) - (2)].command);
  1107. }
  1108. break;
  1109. case 134:
  1110. -#line 1079 "/usr/homes/chet/src/bash/src/parse.y"
  1111. +#line 1084 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1112. {
  1113. if ((yyvsp[(1) - (3)].command)->type == cm_connection)
  1114. (yyval.command) = connect_async_list ((yyvsp[(1) - (3)].command), (COMMAND *)NULL, '&');
  1115. @@ -3126,17 +3131,17 @@ yyreduce:
  1116. break;
  1117. case 136:
  1118. -#line 1090 "/usr/homes/chet/src/bash/src/parse.y"
  1119. +#line 1095 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1120. { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
  1121. break;
  1122. case 137:
  1123. -#line 1092 "/usr/homes/chet/src/bash/src/parse.y"
  1124. +#line 1097 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1125. { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
  1126. break;
  1127. case 138:
  1128. -#line 1094 "/usr/homes/chet/src/bash/src/parse.y"
  1129. +#line 1099 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1130. {
  1131. if ((yyvsp[(1) - (4)].command)->type == cm_connection)
  1132. (yyval.command) = connect_async_list ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '&');
  1133. @@ -3146,37 +3151,37 @@ yyreduce:
  1134. break;
  1135. case 139:
  1136. -#line 1101 "/usr/homes/chet/src/bash/src/parse.y"
  1137. +#line 1106 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1138. { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
  1139. break;
  1140. case 140:
  1141. -#line 1103 "/usr/homes/chet/src/bash/src/parse.y"
  1142. +#line 1108 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1143. { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
  1144. break;
  1145. case 141:
  1146. -#line 1105 "/usr/homes/chet/src/bash/src/parse.y"
  1147. +#line 1110 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1148. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  1149. break;
  1150. case 144:
  1151. -#line 1113 "/usr/homes/chet/src/bash/src/parse.y"
  1152. +#line 1118 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1153. { (yyval.number) = '\n'; }
  1154. break;
  1155. case 145:
  1156. -#line 1115 "/usr/homes/chet/src/bash/src/parse.y"
  1157. +#line 1120 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1158. { (yyval.number) = ';'; }
  1159. break;
  1160. case 146:
  1161. -#line 1117 "/usr/homes/chet/src/bash/src/parse.y"
  1162. +#line 1122 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1163. { (yyval.number) = yacc_EOF; }
  1164. break;
  1165. case 149:
  1166. -#line 1131 "/usr/homes/chet/src/bash/src/parse.y"
  1167. +#line 1136 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1168. {
  1169. (yyval.command) = (yyvsp[(1) - (1)].command);
  1170. if (need_here_doc)
  1171. @@ -3192,7 +3197,7 @@ yyreduce:
  1172. break;
  1173. case 150:
  1174. -#line 1144 "/usr/homes/chet/src/bash/src/parse.y"
  1175. +#line 1149 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1176. {
  1177. if ((yyvsp[(1) - (2)].command)->type == cm_connection)
  1178. (yyval.command) = connect_async_list ((yyvsp[(1) - (2)].command), (COMMAND *)NULL, '&');
  1179. @@ -3211,7 +3216,7 @@ yyreduce:
  1180. break;
  1181. case 151:
  1182. -#line 1160 "/usr/homes/chet/src/bash/src/parse.y"
  1183. +#line 1165 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1184. {
  1185. (yyval.command) = (yyvsp[(1) - (2)].command);
  1186. if (need_here_doc)
  1187. @@ -3227,17 +3232,17 @@ yyreduce:
  1188. break;
  1189. case 152:
  1190. -#line 1175 "/usr/homes/chet/src/bash/src/parse.y"
  1191. +#line 1180 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1192. { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
  1193. break;
  1194. case 153:
  1195. -#line 1177 "/usr/homes/chet/src/bash/src/parse.y"
  1196. +#line 1182 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1197. { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
  1198. break;
  1199. case 154:
  1200. -#line 1179 "/usr/homes/chet/src/bash/src/parse.y"
  1201. +#line 1184 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1202. {
  1203. if ((yyvsp[(1) - (3)].command)->type == cm_connection)
  1204. (yyval.command) = connect_async_list ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), '&');
  1205. @@ -3247,22 +3252,22 @@ yyreduce:
  1206. break;
  1207. case 155:
  1208. -#line 1186 "/usr/homes/chet/src/bash/src/parse.y"
  1209. +#line 1191 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1210. { (yyval.command) = command_connect ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), ';'); }
  1211. break;
  1212. case 156:
  1213. -#line 1189 "/usr/homes/chet/src/bash/src/parse.y"
  1214. +#line 1194 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1215. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  1216. break;
  1217. case 157:
  1218. -#line 1193 "/usr/homes/chet/src/bash/src/parse.y"
  1219. +#line 1198 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1220. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  1221. break;
  1222. case 158:
  1223. -#line 1195 "/usr/homes/chet/src/bash/src/parse.y"
  1224. +#line 1200 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1225. {
  1226. if ((yyvsp[(2) - (2)].command))
  1227. (yyvsp[(2) - (2)].command)->flags ^= CMD_INVERT_RETURN; /* toggle */
  1228. @@ -3271,7 +3276,7 @@ yyreduce:
  1229. break;
  1230. case 159:
  1231. -#line 1201 "/usr/homes/chet/src/bash/src/parse.y"
  1232. +#line 1206 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1233. {
  1234. if ((yyvsp[(2) - (2)].command))
  1235. (yyvsp[(2) - (2)].command)->flags |= (yyvsp[(1) - (2)].number);
  1236. @@ -3280,7 +3285,7 @@ yyreduce:
  1237. break;
  1238. case 160:
  1239. -#line 1207 "/usr/homes/chet/src/bash/src/parse.y"
  1240. +#line 1212 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1241. {
  1242. ELEMENT x;
  1243. @@ -3300,7 +3305,7 @@ yyreduce:
  1244. break;
  1245. case 161:
  1246. -#line 1224 "/usr/homes/chet/src/bash/src/parse.y"
  1247. +#line 1229 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1248. {
  1249. ELEMENT x;
  1250. @@ -3321,12 +3326,12 @@ yyreduce:
  1251. break;
  1252. case 162:
  1253. -#line 1244 "/usr/homes/chet/src/bash/src/parse.y"
  1254. +#line 1249 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1255. { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '|'); }
  1256. break;
  1257. case 163:
  1258. -#line 1246 "/usr/homes/chet/src/bash/src/parse.y"
  1259. +#line 1251 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1260. {
  1261. /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
  1262. COMMAND *tc;
  1263. @@ -3352,28 +3357,28 @@ yyreduce:
  1264. break;
  1265. case 164:
  1266. -#line 1269 "/usr/homes/chet/src/bash/src/parse.y"
  1267. +#line 1274 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1268. { (yyval.command) = (yyvsp[(1) - (1)].command); }
  1269. break;
  1270. case 165:
  1271. -#line 1273 "/usr/homes/chet/src/bash/src/parse.y"
  1272. +#line 1278 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1273. { (yyval.number) = CMD_TIME_PIPELINE; }
  1274. break;
  1275. case 166:
  1276. -#line 1275 "/usr/homes/chet/src/bash/src/parse.y"
  1277. +#line 1280 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1278. { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
  1279. break;
  1280. case 167:
  1281. -#line 1277 "/usr/homes/chet/src/bash/src/parse.y"
  1282. +#line 1282 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1283. { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
  1284. break;
  1285. /* Line 1267 of yacc.c. */
  1286. -#line 3377 "y.tab.c"
  1287. +#line 3382 "y.tab.c"
  1288. default: break;
  1289. }
  1290. YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
  1291. @@ -3587,7 +3592,7 @@ yyreturn:
  1292. }
  1293. -#line 1279 "/usr/homes/chet/src/bash/src/parse.y"
  1294. +#line 1284 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
  1295. /* Initial size to allocate for tokens, and the
  1296. @@ -4948,6 +4953,21 @@ yylex ()
  1297. which allow ESAC to be the next one read. */
  1298. static int esacs_needed_count;
  1299. +static void
  1300. +push_heredoc (r)
  1301. + REDIRECT *r;
  1302. +{
  1303. + if (need_here_doc >= HEREDOC_MAX)
  1304. + {
  1305. + last_command_exit_value = EX_BADUSAGE;
  1306. + need_here_doc = 0;
  1307. + report_syntax_error (_("maximum here-document count exceeded"));
  1308. + reset_parser ();
  1309. + exit_shell (last_command_exit_value);
  1310. + }
  1311. + redir_stack[need_here_doc++] = r;
  1312. +}
  1313. +
  1314. void
  1315. gather_here_documents ()
  1316. {
  1317. @@ -8541,3 +8561,4 @@ set_line_mbstate ()
  1318. }
  1319. }
  1320. #endif /* HANDLE_MULTIBYTE */
  1321. +
  1322. --- a/patchlevel.h
  1323. +++ b/patchlevel.h
  1324. @@ -25,6 +25,6 @@
  1325. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  1326. looks for to find the patch level (for the sccs version string). */
  1327. -#define PATCHLEVEL 27
  1328. +#define PATCHLEVEL 28
  1329. #endif /* _PATCHLEVEL_H_ */