home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / games / volume16 / nethack31 / patch3r < prev    next >
Internet Message Format  |  1993-07-22  |  30KB

  1. Path: uunet!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v18i051:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch3r/18
  5. Date: 20 Jul 1993 22:33:50 GMT
  6. Organization: Tektronix, Inc, Redmond, OR, USA
  7. Lines: 1162
  8. Approved: billr@saab.CNA.TEK.COM
  9. Message-ID: <22hrse$9rm@ying.cna.tek.com>
  10. NNTP-Posting-Host: saab.cna.tek.com
  11. Xref: uunet comp.sources.games:1851
  12.  
  13. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  14. Posting-number: Volume 18, Issue 51
  15. Archive-name: nethack31/patch3r
  16. Patch-To: nethack31: Volume 16, Issue 1-116
  17. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  18.  
  19.  
  20.  
  21. #! /bin/sh
  22. # This is a shell archive.  Remove anything before this line, then unpack
  23. # it by saving it into a file and typing "sh file".  To overwrite existing
  24. # files, type "sh file -c".  You can also feed this as standard input via
  25. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  26. # will see the following message at the end:
  27. #        "End of archive 18 (of 18)."
  28. # Contents:  sys/share/lev_yacc.c2
  29. # Wrapped by billr@saab on Tue Jul 20 14:57:24 1993
  30. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  31. if test -f 'sys/share/lev_yacc.c2' -a "${1}" != "-c" ; then 
  32.   echo shar: Renaming existing file \"'sys/share/lev_yacc.c2'\" to \"'sys/share/lev_yacc.c2.orig'\"
  33.   mv -f 'sys/share/lev_yacc.c2' 'sys/share/lev_yacc.c2.orig'
  34. fi
  35. echo shar: Extracting \"'sys/share/lev_yacc.c2'\" \(26478 characters\)
  36. sed "s/^X//" >'sys/share/lev_yacc.c2' <<'END_OF_FILE'
  37. X            init_lev.lit = yyvsp[-2].i;
  38. X            init_lev.walled = yyvsp[0].i;
  39. X            yyval.i = 1;
  40. X          }
  41. Xbreak;
  42. Xcase 14:
  43. X{
  44. X            yyval.i = 0;
  45. X          }
  46. Xbreak;
  47. Xcase 15:
  48. X{
  49. X            yyval.i = lev_flags;
  50. X            lev_flags = 0;    /* clear for next user */
  51. X          }
  52. Xbreak;
  53. Xcase 16:
  54. X{
  55. X            lev_flags |= yyvsp[-2].i;
  56. X          }
  57. Xbreak;
  58. Xcase 17:
  59. X{
  60. X            lev_flags |= yyvsp[0].i;
  61. X          }
  62. Xbreak;
  63. Xcase 20:
  64. X{
  65. X            int i, j;
  66. X
  67. X            i = strlen(yyvsp[0].map) + 1;
  68. X            j = tmpmessage[0] ? strlen(tmpmessage) : 0;
  69. X            if(i+j > 255) {
  70. X               yyerror("Message string too long (>256 characters)");
  71. X            } else {
  72. X                if(j) tmpmessage[j++] = '\n';
  73. X                strncpy(tmpmessage+j, yyvsp[0].map, i-1);
  74. X                tmpmessage[j+i-1] = 0;
  75. X            }
  76. X          }
  77. Xbreak;
  78. Xcase 23:
  79. X{
  80. X            if(special_lev.nrobjects) {
  81. X                yyerror("Object registers already initialized!");
  82. X            } else {
  83. X                special_lev.nrobjects = n_olist;
  84. X                special_lev.robjects = (char *) alloc(n_olist);
  85. X                (void) memcpy((genericptr_t)special_lev.robjects,
  86. X                      (genericptr_t)olist, n_olist);
  87. X            }
  88. X          }
  89. Xbreak;
  90. Xcase 24:
  91. X{
  92. X            if(special_lev.nrmonst) {
  93. X                yyerror("Monster registers already initialized!");
  94. X            } else {
  95. X                special_lev.nrmonst = n_mlist;
  96. X                special_lev.rmonst = (char *) alloc(n_mlist);
  97. X                (void) memcpy((genericptr_t)special_lev.rmonst,
  98. X                      (genericptr_t)mlist, n_mlist);
  99. X              }
  100. X          }
  101. Xbreak;
  102. Xcase 25:
  103. X{
  104. X            tmproom[nrooms] = New(room);
  105. X            (void) memset((genericptr_t) tmproom[nrooms], 0,
  106. X                    sizeof *tmproom[nrooms]);
  107. X            tmproom[nrooms]->name = (char *) 0;
  108. X            tmproom[nrooms]->parent = (char *) 0;
  109. X            tmproom[nrooms]->rtype = 0;
  110. X            tmproom[nrooms]->rlit = 0;
  111. X            tmproom[nrooms]->xalign = ERR;
  112. X            tmproom[nrooms]->yalign = ERR;
  113. X            tmproom[nrooms]->x = 0;
  114. X            tmproom[nrooms]->y = 0;
  115. X            tmproom[nrooms]->w = 2;
  116. X            tmproom[nrooms]->h = 2;
  117. X            in_room = 1;
  118. X          }
  119. Xbreak;
  120. Xcase 31:
  121. X{
  122. X            tmpcor[0] = New(corridor);
  123. X            tmpcor[0]->src.room = -1;
  124. X            ncorridor = 1;
  125. X          }
  126. Xbreak;
  127. Xcase 34:
  128. X{
  129. X            tmpcor[ncorridor] = New(corridor);
  130. X            tmpcor[ncorridor]->src.room = yyvsp[-2].corpos.room;
  131. X            tmpcor[ncorridor]->src.wall = yyvsp[-2].corpos.wall;
  132. X            tmpcor[ncorridor]->src.door = yyvsp[-2].corpos.door;
  133. X            tmpcor[ncorridor]->dest.room = yyvsp[0].corpos.room;
  134. X            tmpcor[ncorridor]->dest.wall = yyvsp[0].corpos.wall;
  135. X            tmpcor[ncorridor]->dest.door = yyvsp[0].corpos.door;
  136. X            ncorridor++;
  137. X          }
  138. Xbreak;
  139. Xcase 35:
  140. X{
  141. X            tmpcor[ncorridor]->src.room = yyvsp[-2].corpos.room;
  142. X            tmpcor[ncorridor]->src.wall = yyvsp[-2].corpos.wall;
  143. X            tmpcor[ncorridor]->src.door = yyvsp[-2].corpos.door;
  144. X            tmpcor[ncorridor]->dest.room = -1;
  145. X            tmpcor[ncorridor]->dest.wall = yyvsp[0].i;
  146. X            ncorridor++;
  147. X          }
  148. Xbreak;
  149. Xcase 36:
  150. X{
  151. X            if (yyvsp[-5].i >= nrooms)
  152. X                yyerror("Wrong room number!");
  153. X            yyval.corpos.room = yyvsp[-5].i;
  154. X            yyval.corpos.wall = yyvsp[-3].i;
  155. X            yyval.corpos.door = yyvsp[-1].i;
  156. X          }
  157. Xbreak;
  158. Xcase 37:
  159. X{
  160. X            store_room();
  161. X          }
  162. Xbreak;
  163. Xcase 38:
  164. X{
  165. X            store_room();
  166. X          }
  167. Xbreak;
  168. Xcase 39:
  169. X{
  170. X            tmproom[nrooms] = New(room);
  171. X            (void) memset((genericptr_t) tmproom[nrooms], 0,
  172. X                    sizeof *tmproom[nrooms]);
  173. X            tmproom[nrooms]->parent = dup_string(yyvsp[-1].map);
  174. X            tmproom[nrooms]->name = (char *) 0;
  175. X            tmproom[nrooms]->rtype = yyvsp[-9].i;
  176. X            tmproom[nrooms]->rlit = yyvsp[-7].i;
  177. X            tmproom[nrooms]->filled = yyvsp[0].i;
  178. X            tmproom[nrooms]->xalign = ERR;
  179. X            tmproom[nrooms]->yalign = ERR;
  180. X            tmproom[nrooms]->x = current_coord.x;
  181. X            tmproom[nrooms]->y = current_coord.y;
  182. X            tmproom[nrooms]->w = current_size.width;
  183. X            tmproom[nrooms]->h = current_size.height;
  184. X            in_room = 1;
  185. X          }
  186. Xbreak;
  187. Xcase 40:
  188. X{
  189. X            tmproom[nrooms] = New(room);
  190. X            (void) memset((genericptr_t) tmproom[nrooms], 0,
  191. X                    sizeof *tmproom[nrooms]);
  192. X            tmproom[nrooms]->name = (char *) 0;
  193. X            tmproom[nrooms]->parent = (char *) 0;
  194. X            tmproom[nrooms]->rtype = yyvsp[-9].i;
  195. X            tmproom[nrooms]->rlit = yyvsp[-7].i;
  196. X            tmproom[nrooms]->filled = yyvsp[0].i;
  197. X            tmproom[nrooms]->xalign = current_align.x;
  198. X            tmproom[nrooms]->yalign = current_align.y;
  199. X            tmproom[nrooms]->x = current_coord.x;
  200. X            tmproom[nrooms]->y = current_coord.y;
  201. X            tmproom[nrooms]->w = current_size.width;
  202. X            tmproom[nrooms]->h = current_size.height;
  203. X            in_room = 1;
  204. X          }
  205. Xbreak;
  206. Xcase 41:
  207. X{
  208. X            yyval.i = 1;
  209. X          }
  210. Xbreak;
  211. Xcase 42:
  212. X{
  213. X            yyval.i = yyvsp[0].i;
  214. X          }
  215. Xbreak;
  216. Xcase 43:
  217. X{
  218. X            if ( yyvsp[-3].i < 1 || yyvsp[-3].i > 5 ||
  219. X                yyvsp[-1].i < 1 || yyvsp[-1].i > 5 ) {
  220. X                yyerror("Room position should be between 1 & 5!");
  221. X            } else {
  222. X                current_coord.x = yyvsp[-3].i;
  223. X                current_coord.y = yyvsp[-1].i;
  224. X            }
  225. X          }
  226. Xbreak;
  227. Xcase 44:
  228. X{
  229. X            current_coord.x = current_coord.y = ERR;
  230. X          }
  231. Xbreak;
  232. Xcase 45:
  233. X{
  234. X            if ( yyvsp[-3].i < 0 || yyvsp[-1].i < 0) {
  235. X                yyerror("Invalid subroom position !");
  236. X            } else {
  237. X                current_coord.x = yyvsp[-3].i;
  238. X                current_coord.y = yyvsp[-1].i;
  239. X            }
  240. X          }
  241. Xbreak;
  242. Xcase 46:
  243. X{
  244. X            current_coord.x = current_coord.y = ERR;
  245. X          }
  246. Xbreak;
  247. Xcase 47:
  248. X{
  249. X            current_align.x = yyvsp[-3].i;
  250. X            current_align.y = yyvsp[-1].i;
  251. X          }
  252. Xbreak;
  253. Xcase 48:
  254. X{
  255. X            current_align.x = current_align.y = ERR;
  256. X          }
  257. Xbreak;
  258. Xcase 49:
  259. X{
  260. X            current_size.width = yyvsp[-3].i;
  261. X            current_size.height = yyvsp[-1].i;
  262. X          }
  263. Xbreak;
  264. Xcase 50:
  265. X{
  266. X            current_size.height = current_size.width = ERR;
  267. X          }
  268. Xbreak;
  269. Xcase 66:
  270. X{
  271. X            if (tmproom[nrooms]->name)
  272. X                yyerror("This room already has a name!");
  273. X            else
  274. X                tmproom[nrooms]->name = dup_string(yyvsp[0].map);
  275. X          }
  276. Xbreak;
  277. Xcase 67:
  278. X{
  279. X            if (tmproom[nrooms]->chance)
  280. X                yyerror("This room already assigned a chance!");
  281. X            else if (tmproom[nrooms]->rtype == OROOM)
  282. X                yyerror("Only typed rooms can have a chance!");
  283. X            else if (yyvsp[0].i < 1 || yyvsp[0].i > 99)
  284. X                yyerror("The chance is supposed to be precentile.");
  285. X            else
  286. X                tmproom[nrooms]->chance = yyvsp[0].i;
  287. X           }
  288. Xbreak;
  289. Xcase 68:
  290. X{
  291. X            /* ERR means random here */
  292. X            if (yyvsp[-2].i == ERR && yyvsp[0].i != ERR) {
  293. X             yyerror("If the door wall is random, so must be its pos!");
  294. X            } else {
  295. X                tmprdoor[ndoor] = New(room_door);
  296. X                tmprdoor[ndoor]->secret = yyvsp[-6].i;
  297. X                tmprdoor[ndoor]->mask = yyvsp[-4].i;
  298. X                tmprdoor[ndoor]->wall = yyvsp[-2].i;
  299. X                tmprdoor[ndoor]->pos = yyvsp[0].i;
  300. X                ndoor++;
  301. X            }
  302. X          }
  303. Xbreak;
  304. Xcase 75:
  305. X{
  306. X            maze.filling = yyvsp[0].i;
  307. X            if (index(yyvsp[-2].map, '.'))
  308. X                yyerror("Invalid dot ('.') in level name.");
  309. X            if (strlen(yyvsp[-2].map) > 8)
  310. X                yyerror("Level names limited to 8 characters.");
  311. X            yyval.map = yyvsp[-2].map;
  312. X            in_room = 0;
  313. X          }
  314. Xbreak;
  315. Xcase 76:
  316. X{
  317. X            yyval.i = get_floor_type((char)yyvsp[0].i);
  318. X          }
  319. Xbreak;
  320. Xcase 77:
  321. X{
  322. X            yyval.i = -1;
  323. X          }
  324. Xbreak;
  325. Xcase 80:
  326. X{
  327. X            store_part();
  328. X          }
  329. Xbreak;
  330. Xcase 81:
  331. X{
  332. X            tmppart[npart] = New(mazepart);
  333. X            tmppart[npart]->halign = 1;
  334. X            tmppart[npart]->valign = 1;
  335. X            tmppart[npart]->nrobjects = 0;
  336. X            tmppart[npart]->nloc = 0;
  337. X            tmppart[npart]->nrmonst = 0;
  338. X            tmppart[npart]->xsize = 1;
  339. X            tmppart[npart]->ysize = 1;
  340. X            tmppart[npart]->map = (char **) alloc(sizeof(char *));
  341. X            tmppart[npart]->map[0] = (char *) alloc(1);
  342. X            tmppart[npart]->map[0][0] = STONE;
  343. X            max_x_map = COLNO-1;
  344. X            max_y_map = ROWNO;
  345. X          }
  346. Xbreak;
  347. Xcase 82:
  348. X{
  349. X            tmppart[npart] = New(mazepart);
  350. X            tmppart[npart]->halign = yyvsp[-1].i % 10;
  351. X            tmppart[npart]->valign = yyvsp[-1].i / 10;
  352. X            tmppart[npart]->nrobjects = 0;
  353. X            tmppart[npart]->nloc = 0;
  354. X            tmppart[npart]->nrmonst = 0;
  355. X            scan_map(yyvsp[0].map);
  356. X          }
  357. Xbreak;
  358. Xcase 83:
  359. X{
  360. X            yyval.i = yyvsp[-2].i + (yyvsp[0].i * 10);
  361. X          }
  362. Xbreak;
  363. Xcase 90:
  364. X{
  365. X            if (tmppart[npart]->nrobjects) {
  366. X                yyerror("Object registers already initialized!");
  367. X            } else {
  368. X                tmppart[npart]->robjects = (char *)alloc(n_olist);
  369. X                (void) memcpy((genericptr_t)tmppart[npart]->robjects,
  370. X                      (genericptr_t)olist, n_olist);
  371. X                tmppart[npart]->nrobjects = n_olist;
  372. X            }
  373. X          }
  374. Xbreak;
  375. Xcase 91:
  376. X{
  377. X            if (tmppart[npart]->nloc) {
  378. X                yyerror("Location registers already initialized!");
  379. X            } else {
  380. X                register int i;
  381. X                tmppart[npart]->rloc_x = (char *) alloc(n_plist);
  382. X                tmppart[npart]->rloc_y = (char *) alloc(n_plist);
  383. X                for(i=0;i<n_plist;i++) {
  384. X                tmppart[npart]->rloc_x[i] = plist[i].x;
  385. X                tmppart[npart]->rloc_y[i] = plist[i].y;
  386. X                }
  387. X                tmppart[npart]->nloc = n_plist;
  388. X            }
  389. X          }
  390. Xbreak;
  391. Xcase 92:
  392. X{
  393. X            if (tmppart[npart]->nrmonst) {
  394. X                yyerror("Monster registers already initialized!");
  395. X            } else {
  396. X                tmppart[npart]->rmonst = (char *) alloc(n_mlist);
  397. X                (void) memcpy((genericptr_t)tmppart[npart]->rmonst,
  398. X                      (genericptr_t)mlist, n_mlist);
  399. X                tmppart[npart]->nrmonst = n_mlist;
  400. X            }
  401. X          }
  402. Xbreak;
  403. Xcase 93:
  404. X{
  405. X            if (n_olist < MAX_REGISTERS)
  406. X                olist[n_olist++] = yyvsp[0].i;
  407. X            else
  408. X                yyerror("Object list too long!");
  409. X          }
  410. Xbreak;
  411. Xcase 94:
  412. X{
  413. X            if (n_olist < MAX_REGISTERS)
  414. X                olist[n_olist++] = yyvsp[-2].i;
  415. X            else
  416. X                yyerror("Object list too long!");
  417. X          }
  418. Xbreak;
  419. Xcase 95:
  420. X{
  421. X            if (n_mlist < MAX_REGISTERS)
  422. X                mlist[n_mlist++] = yyvsp[0].i;
  423. X            else
  424. X                yyerror("Monster list too long!");
  425. X          }
  426. Xbreak;
  427. Xcase 96:
  428. X{
  429. X            if (n_mlist < MAX_REGISTERS)
  430. X                mlist[n_mlist++] = yyvsp[-2].i;
  431. X            else
  432. X                yyerror("Monster list too long!");
  433. X          }
  434. Xbreak;
  435. Xcase 97:
  436. X{
  437. X            if (n_plist < MAX_REGISTERS)
  438. X                plist[n_plist++] = current_coord;
  439. X            else
  440. X                yyerror("Location list too long!");
  441. X          }
  442. Xbreak;
  443. Xcase 98:
  444. X{
  445. X            if (n_plist < MAX_REGISTERS)
  446. X                plist[n_plist++] = current_coord;
  447. X            else
  448. X                yyerror("Location list too long!");
  449. X          }
  450. Xbreak;
  451. Xcase 122:
  452. X{
  453. X            tmpmonst[nmons] = New(monster);
  454. X            tmpmonst[nmons]->x = current_coord.x;
  455. X            tmpmonst[nmons]->y = current_coord.y;
  456. X            tmpmonst[nmons]->class = yyvsp[-4].i;
  457. X            tmpmonst[nmons]->peaceful = -1; /* no override */
  458. X            tmpmonst[nmons]->asleep = -1;
  459. X            tmpmonst[nmons]->align = - MAX_REGISTERS - 2;
  460. X            tmpmonst[nmons]->name = (char *) 0;
  461. X            tmpmonst[nmons]->appear = 0;
  462. X            tmpmonst[nmons]->appear_as = (char *) 0;
  463. X            if (!in_room)
  464. X                check_coord(current_coord.x, current_coord.y,
  465. X                    "Monster");
  466. X            if (!yyvsp[-2].map)
  467. X                tmpmonst[nmons]->id = -1;
  468. X            else {
  469. X                int token = get_monster_id(yyvsp[-2].map, (char) yyvsp[-4].i);
  470. X                if (token == ERR) {
  471. X                    yywarning("Illegal monster name!  Making random monster.");
  472. X                    tmpmonst[nmons]->id = -1;
  473. X                } else
  474. X                    tmpmonst[nmons]->id = token;
  475. X            }
  476. X          }
  477. Xbreak;
  478. Xcase 123:
  479. X{
  480. X            nmons++;
  481. X          }
  482. Xbreak;
  483. Xcase 126:
  484. X{
  485. X            tmpmonst[nmons]->name = dup_string(yyvsp[0].map);
  486. X          }
  487. Xbreak;
  488. Xcase 127:
  489. X{
  490. X            tmpmonst[nmons]->peaceful = yyvsp[0].i;
  491. X          }
  492. Xbreak;
  493. Xcase 128:
  494. X{
  495. X            tmpmonst[nmons]->asleep = yyvsp[0].i;
  496. X          }
  497. Xbreak;
  498. Xcase 129:
  499. X{
  500. X            tmpmonst[nmons]->align = yyvsp[0].i;
  501. X          }
  502. Xbreak;
  503. Xcase 130:
  504. X{
  505. X            tmpmonst[nmons]->appear = yyvsp[-1].i;
  506. X            tmpmonst[nmons]->appear_as = dup_string(yyvsp[0].map);
  507. X          }
  508. Xbreak;
  509. Xcase 131:
  510. X{
  511. X            tmpobj[nobj] = New(object);
  512. X            tmpobj[nobj]->x = current_coord.x;
  513. X            tmpobj[nobj]->y = current_coord.y;
  514. X            tmpobj[nobj]->class = yyvsp[-4].i;
  515. X            tmpobj[nobj]->corpsenm = -1;    /* init as none */
  516. X            tmpobj[nobj]->curse_state = -1;
  517. X            tmpobj[nobj]->name = (char *) 0;
  518. X            if (!in_room)
  519. X                check_coord(current_coord.x, current_coord.y,
  520. X                    "Object");
  521. X            if (!yyvsp[-2].map)
  522. X                tmpobj[nobj]->id = -1;
  523. X            else {
  524. X                int token = get_object_id(yyvsp[-2].map);
  525. X                if (token == ERR) {
  526. X                    yywarning("Illegal object name!  Making random object.");
  527. X                    tmpobj[nobj]->id = -1;
  528. X                } else
  529. X                    tmpobj[nobj]->id = token;
  530. X            }
  531. X          }
  532. Xbreak;
  533. Xcase 132:
  534. X{
  535. X            nobj++;
  536. X          }
  537. Xbreak;
  538. Xcase 133:
  539. X{
  540. X            tmpobj[nobj]->spe = -127;
  541. X          }
  542. Xbreak;
  543. Xcase 134:
  544. X{
  545. X            int token = get_monster_id(yyvsp[-2].map, (char)0);
  546. X            if (token == ERR)    /* "random" */
  547. X                tmpobj[nobj]->corpsenm = -2;
  548. X            else
  549. X                tmpobj[nobj]->corpsenm = token;
  550. X            tmpobj[nobj]->spe = yyvsp[0].i;
  551. X          }
  552. Xbreak;
  553. Xcase 135:
  554. X{
  555. X            tmpobj[nobj]->curse_state = yyvsp[-4].i;
  556. X            tmpobj[nobj]->spe = yyvsp[-2].i;
  557. X            if (yyvsp[0].map)
  558. X                tmpobj[nobj]->name = dup_string(yyvsp[0].map);
  559. X            else
  560. X                tmpobj[nobj]->name = (char *) 0;
  561. X          }
  562. Xbreak;
  563. Xcase 139:
  564. X{
  565. X            yyval.i = -127;
  566. X          }
  567. Xbreak;
  568. Xcase 140:
  569. X{
  570. X            tmpdoor[ndoor] = New(door);
  571. X            tmpdoor[ndoor]->x = current_coord.x;
  572. X            tmpdoor[ndoor]->y = current_coord.y;
  573. X            tmpdoor[ndoor]->mask = yyvsp[-2].i;
  574. X            if(current_coord.x >= 0 && current_coord.y >= 0 &&
  575. X               tmpmap[current_coord.y][current_coord.x] != DOOR &&
  576. X               tmpmap[current_coord.y][current_coord.x] != SDOOR)
  577. X                yyerror("Door decl doesn't match the map");
  578. X            ndoor++;
  579. X          }
  580. Xbreak;
  581. Xcase 141:
  582. X{
  583. X            tmptrap[ntrap] = New(trap);
  584. X            tmptrap[ntrap]->x = current_coord.x;
  585. X            tmptrap[ntrap]->y = current_coord.y;
  586. X            tmptrap[ntrap]->type = yyvsp[-2].i;
  587. X            if (!in_room)
  588. X                check_coord(current_coord.x, current_coord.y,
  589. X                    "Trap");
  590. X            ntrap++;
  591. X          }
  592. Xbreak;
  593. Xcase 142:
  594. X{
  595. X                int x, y, dir;
  596. X
  597. X            tmpdb[ndb] = New(drawbridge);
  598. X            x = tmpdb[ndb]->x = current_coord.x;
  599. X            y = tmpdb[ndb]->y = current_coord.y;
  600. X            /* convert dir from a DIRECTION to a DB_DIR */
  601. X            dir = yyvsp[-2].i;
  602. X            switch(dir) {
  603. X            case W_NORTH: dir = DB_NORTH; y--; break;
  604. X            case W_SOUTH: dir = DB_SOUTH; y++; break;
  605. X            case W_EAST:  dir = DB_EAST;  x++; break;
  606. X            case W_WEST:  dir = DB_WEST;  x--; break;
  607. X            default:
  608. X                yyerror("Invalid drawbridge direction");
  609. X                break;
  610. X            }
  611. X            tmpdb[ndb]->dir = dir;
  612. X            if (current_coord.x >= 0 && current_coord.y >= 0 &&
  613. X                !IS_WALL(tmpmap[y][x])) {
  614. X                char ebuf[60];
  615. X                Sprintf(ebuf,
  616. X                    "Wall needed for drawbridge (%02d, %02d)",
  617. X                    current_coord.x, current_coord.y);
  618. X                yyerror(ebuf);
  619. X            }
  620. X
  621. X            if ( yyvsp[0].i == D_ISOPEN )
  622. X                tmpdb[ndb]->db_open = 1;
  623. X            else if ( yyvsp[0].i == D_CLOSED )
  624. X                tmpdb[ndb]->db_open = 0;
  625. X            else
  626. X                yyerror("A drawbridge can only be open or closed!");
  627. X            ndb++;
  628. X           }
  629. Xbreak;
  630. Xcase 143:
  631. X{
  632. X            tmpwalk[nwalk] = New(walk);
  633. X            tmpwalk[nwalk]->x = current_coord.x;
  634. X            tmpwalk[nwalk]->y = current_coord.y;
  635. X            tmpwalk[nwalk]->dir = yyvsp[0].i;
  636. X            nwalk++;
  637. X          }
  638. Xbreak;
  639. Xcase 144:
  640. X{
  641. X            wallify_map();
  642. X          }
  643. Xbreak;
  644. Xcase 145:
  645. X{
  646. X            tmplad[nlad] = New(lad);
  647. X            tmplad[nlad]->x = current_coord.x;
  648. X            tmplad[nlad]->y = current_coord.y;
  649. X            tmplad[nlad]->up = yyvsp[0].i;
  650. X            if (!in_room)
  651. X                check_coord(current_coord.x, current_coord.y,
  652. X                    "Ladder");
  653. X            nlad++;
  654. X          }
  655. Xbreak;
  656. Xcase 146:
  657. X{
  658. X            tmpstair[nstair] = New(stair);
  659. X            tmpstair[nstair]->x = current_coord.x;
  660. X            tmpstair[nstair]->y = current_coord.y;
  661. X            tmpstair[nstair]->up = yyvsp[0].i;
  662. X            if (!in_room)
  663. X                check_coord(current_coord.x, current_coord.y,
  664. X                    "Stairway");
  665. X            nstair++;
  666. X          }
  667. Xbreak;
  668. Xcase 147:
  669. X{
  670. X            tmplreg[nlreg] = New(lev_region);
  671. X            tmplreg[nlreg]->in_islev = yyvsp[0].i;
  672. X            tmplreg[nlreg]->inarea.x1 = current_region.x1;
  673. X            tmplreg[nlreg]->inarea.y1 = current_region.y1;
  674. X            tmplreg[nlreg]->inarea.x2 = current_region.x2;
  675. X            tmplreg[nlreg]->inarea.y2 = current_region.y2;
  676. X          }
  677. Xbreak;
  678. Xcase 148:
  679. X{
  680. X            tmplreg[nlreg]->del_islev = yyvsp[-2].i;
  681. X            tmplreg[nlreg]->delarea.x1 = current_region.x1;
  682. X            tmplreg[nlreg]->delarea.y1 = current_region.y1;
  683. X            tmplreg[nlreg]->delarea.x2 = current_region.x2;
  684. X            tmplreg[nlreg]->delarea.y2 = current_region.y2;
  685. X            if(yyvsp[0].i)
  686. X                tmplreg[nlreg]->rtype = LR_UPSTAIR;
  687. X            else
  688. X                tmplreg[nlreg]->rtype = LR_DOWNSTAIR;
  689. X            tmplreg[nlreg]->rname = 0;
  690. X            nlreg++;
  691. X          }
  692. Xbreak;
  693. Xcase 149:
  694. X{
  695. X            tmplreg[nlreg] = New(lev_region);
  696. X            tmplreg[nlreg]->in_islev = yyvsp[0].i;
  697. X            tmplreg[nlreg]->inarea.x1 = current_region.x1;
  698. X            tmplreg[nlreg]->inarea.y1 = current_region.y1;
  699. X            tmplreg[nlreg]->inarea.x2 = current_region.x2;
  700. X            tmplreg[nlreg]->inarea.y2 = current_region.y2;
  701. X          }
  702. Xbreak;
  703. Xcase 150:
  704. X{
  705. X            tmplreg[nlreg]->del_islev = yyvsp[-2].i;
  706. X            tmplreg[nlreg]->delarea.x1 = current_region.x1;
  707. X            tmplreg[nlreg]->delarea.y1 = current_region.y1;
  708. X            tmplreg[nlreg]->delarea.x2 = current_region.x2;
  709. X            tmplreg[nlreg]->delarea.y2 = current_region.y2;
  710. X            tmplreg[nlreg]->rtype = LR_PORTAL;
  711. X            tmplreg[nlreg]->rname = yyvsp[0].map;
  712. X            nlreg++;
  713. X          }
  714. Xbreak;
  715. Xcase 151:
  716. X{
  717. X            tmplreg[nlreg] = New(lev_region);
  718. X            tmplreg[nlreg]->in_islev = yyvsp[0].i;
  719. X            tmplreg[nlreg]->inarea.x1 = current_region.x1;
  720. X            tmplreg[nlreg]->inarea.y1 = current_region.y1;
  721. X            tmplreg[nlreg]->inarea.x2 = current_region.x2;
  722. X            tmplreg[nlreg]->inarea.y2 = current_region.y2;
  723. X          }
  724. Xbreak;
  725. Xcase 152:
  726. X{
  727. X            tmplreg[nlreg]->del_islev = yyvsp[0].i;
  728. X            tmplreg[nlreg]->delarea.x1 = current_region.x1;
  729. X            tmplreg[nlreg]->delarea.y1 = current_region.y1;
  730. X            tmplreg[nlreg]->delarea.x2 = current_region.x2;
  731. X            tmplreg[nlreg]->delarea.y2 = current_region.y2;
  732. X          }
  733. Xbreak;
  734. Xcase 153:
  735. X{
  736. X            switch(yyvsp[0].i) {
  737. X            case -1: tmplreg[nlreg]->rtype = LR_TELE; break;
  738. X            case 0: tmplreg[nlreg]->rtype = LR_DOWNTELE; break;
  739. X            case 1: tmplreg[nlreg]->rtype = LR_UPTELE; break;
  740. X            }
  741. X            tmplreg[nlreg]->rname = 0;
  742. X            nlreg++;
  743. X          }
  744. Xbreak;
  745. Xcase 154:
  746. X{
  747. X            tmplreg[nlreg] = New(lev_region);
  748. X            tmplreg[nlreg]->in_islev = yyvsp[0].i;
  749. X            tmplreg[nlreg]->inarea.x1 = current_region.x1;
  750. X            tmplreg[nlreg]->inarea.y1 = current_region.y1;
  751. X            tmplreg[nlreg]->inarea.x2 = current_region.x2;
  752. X            tmplreg[nlreg]->inarea.y2 = current_region.y2;
  753. X          }
  754. Xbreak;
  755. Xcase 155:
  756. X{
  757. X            tmplreg[nlreg]->del_islev = yyvsp[0].i;
  758. X            tmplreg[nlreg]->delarea.x1 = current_region.x1;
  759. X            tmplreg[nlreg]->delarea.y1 = current_region.y1;
  760. X            tmplreg[nlreg]->delarea.x2 = current_region.x2;
  761. X            tmplreg[nlreg]->delarea.y2 = current_region.y2;
  762. X            tmplreg[nlreg]->rtype = LR_BRANCH;
  763. X            tmplreg[nlreg]->rname = 0;
  764. X            nlreg++;
  765. X          }
  766. Xbreak;
  767. Xcase 156:
  768. X{
  769. X            yyval.i = -1;
  770. X          }
  771. Xbreak;
  772. Xcase 157:
  773. X{
  774. X            yyval.i = yyvsp[0].i;
  775. X          }
  776. Xbreak;
  777. Xcase 158:
  778. X{
  779. X            yyval.i = 0;
  780. X          }
  781. Xbreak;
  782. Xcase 159:
  783. X{
  784. X/* This series of if statements is a hack for MSC 5.1.  It seems that its
  785. X   tiny little brain cannot compile if these are all one big if statement. */
  786. X            if (yyvsp[-7].i <= 0 || yyvsp[-7].i >= COLNO)
  787. X                yyerror("Region out of level range!");
  788. X            else if (yyvsp[-5].i < 0 || yyvsp[-5].i >= ROWNO)
  789. X                yyerror("Region out of level range!");
  790. X            else if (yyvsp[-3].i <= 0 || yyvsp[-3].i >= COLNO)
  791. X                yyerror("Region out of level range!");
  792. X            else if (yyvsp[-1].i < 0 || yyvsp[-1].i >= ROWNO)
  793. X                yyerror("Region out of level range!");
  794. X            current_region.x1 = yyvsp[-7].i;
  795. X            current_region.y1 = yyvsp[-5].i;
  796. X            current_region.x2 = yyvsp[-3].i;
  797. X            current_region.y2 = yyvsp[-1].i;
  798. X            yyval.i = 1;
  799. X          }
  800. Xbreak;
  801. Xcase 160:
  802. X{
  803. X            tmpfountain[nfountain] = New(fountain);
  804. X            tmpfountain[nfountain]->x = current_coord.x;
  805. X            tmpfountain[nfountain]->y = current_coord.y;
  806. X            if (!in_room)
  807. X                check_coord(current_coord.x, current_coord.y,
  808. X                    "Fountain");
  809. X            nfountain++;
  810. X          }
  811. Xbreak;
  812. Xcase 161:
  813. X{
  814. X            tmpsink[nsink] = New(sink);
  815. X            tmpsink[nsink]->x = current_coord.x;
  816. X            tmpsink[nsink]->y = current_coord.y;
  817. X            nsink++;
  818. X          }
  819. Xbreak;
  820. Xcase 162:
  821. X{
  822. X            tmppool[npool] = New(pool);
  823. X            tmppool[npool]->x = current_coord.x;
  824. X            tmppool[npool]->y = current_coord.y;
  825. X            npool++;
  826. X          }
  827. Xbreak;
  828. Xcase 163:
  829. X{
  830. X            tmpdig[ndig] = New(digpos);
  831. X            tmpdig[ndig]->x1 = current_region.x1;
  832. X            tmpdig[ndig]->y1 = current_region.y1;
  833. X            tmpdig[ndig]->x2 = current_region.x2;
  834. X            tmpdig[ndig]->y2 = current_region.y2;
  835. X            ndig++;
  836. X          }
  837. Xbreak;
  838. Xcase 164:
  839. X{
  840. X            tmppass[npass] = New(digpos);
  841. X            tmppass[npass]->x1 = current_region.x1;
  842. X            tmppass[npass]->y1 = current_region.y1;
  843. X            tmppass[npass]->x2 = current_region.x2;
  844. X            tmppass[npass]->y2 = current_region.y2;
  845. X            npass++;
  846. X          }
  847. Xbreak;
  848. Xcase 165:
  849. X{
  850. X            tmpreg[nreg] = New(region);
  851. X            tmpreg[nreg]->x1 = current_region.x1;
  852. X            tmpreg[nreg]->y1 = current_region.y1;
  853. X            tmpreg[nreg]->x2 = current_region.x2;
  854. X            tmpreg[nreg]->y2 = current_region.y2;
  855. X            tmpreg[nreg]->rlit = yyvsp[-3].i;
  856. X            tmpreg[nreg]->rtype = yyvsp[-1].i;
  857. X            if(yyvsp[0].i & 1) tmpreg[nreg]->rtype += MAXRTYPE+1;
  858. X            tmpreg[nreg]->rirreg = ((yyvsp[0].i & 2) != 0);
  859. X            if(current_region.x1 > current_region.x2 ||
  860. X               current_region.y1 > current_region.y2)
  861. X               yyerror("Region start > end!");
  862. X            if(tmpreg[nreg]->rtype == VAULT &&
  863. X               (tmpreg[nreg]->rirreg ||
  864. X                (tmpreg[nreg]->x2 - tmpreg[nreg]->x1 != 1) ||
  865. X                (tmpreg[nreg]->y2 - tmpreg[nreg]->y1 != 1)))
  866. X                yyerror("Vaults must be exactly 2x2!");
  867. X            if(want_warnings && !tmpreg[nreg]->rirreg &&
  868. X               current_region.x1 > 0 && current_region.y1 > 0 &&
  869. X               current_region.x2 < max_x_map &&
  870. X               current_region.y2 < max_y_map) {
  871. X                /* check for walls in the room */
  872. X                char ebuf[60];
  873. X                register int x, y, nrock = 0;
  874. X
  875. X                for(y=current_region.y1; y<=current_region.y2; y++)
  876. X                for(x=current_region.x1;
  877. X                    x<=current_region.x2; x++)
  878. X                    if(IS_ROCK(tmpmap[y][x]) ||
  879. X                       IS_DOOR(tmpmap[y][x])) nrock++;
  880. X                if(nrock) {
  881. X                Sprintf(ebuf,
  882. X                    "Rock in room (%02d,%02d,%02d,%02d)?!",
  883. X                    current_region.x1, current_region.y1,
  884. X                    current_region.x2, current_region.y2);
  885. X                yywarning(ebuf);
  886. X                }
  887. X                if (
  888. X        !IS_ROCK(tmpmap[current_region.y1-1][current_region.x1-1]) ||
  889. X        !IS_ROCK(tmpmap[current_region.y2+1][current_region.x1-1]) ||
  890. X        !IS_ROCK(tmpmap[current_region.y1-1][current_region.x2+1]) ||
  891. X        !IS_ROCK(tmpmap[current_region.y2+1][current_region.x2+1])) {
  892. X                Sprintf(ebuf,
  893. X                "NonRock edge in room (%02d,%02d,%02d,%02d)?!",
  894. X                    current_region.x1, current_region.y1,
  895. X                    current_region.x2, current_region.y2);
  896. X                yywarning(ebuf);
  897. X                }
  898. X            } else if(tmpreg[nreg]->rirreg &&
  899. X        !IS_ROOM(tmpmap[current_region.y1][current_region.x1])) {
  900. X                char ebuf[60];
  901. X                Sprintf(ebuf,
  902. X                    "Rock in irregular room (%02d,%02d)?!",
  903. X                    current_region.x1, current_region.y1);
  904. X                yyerror(ebuf);
  905. X            }
  906. X            nreg++;
  907. X          }
  908. Xbreak;
  909. Xcase 166:
  910. X{
  911. X            tmpaltar[naltar] = New(altar);
  912. X            tmpaltar[naltar]->x = current_coord.x;
  913. X            tmpaltar[naltar]->y = current_coord.y;
  914. X            tmpaltar[naltar]->align = yyvsp[-2].i;
  915. X            tmpaltar[naltar]->shrine = yyvsp[0].i;
  916. X            if (!in_room)
  917. X                check_coord(current_coord.x, current_coord.y,
  918. X                    "Altar");
  919. X            naltar++;
  920. X          }
  921. Xbreak;
  922. Xcase 167:
  923. X{
  924. X            tmpgold[ngold] = New(gold);
  925. X            tmpgold[ngold]->x = current_coord.x;
  926. X            tmpgold[ngold]->y = current_coord.y;
  927. X            tmpgold[ngold]->amount = yyvsp[-2].i;
  928. X            if (!in_room)
  929. X                check_coord(current_coord.x, current_coord.y,
  930. X                    "Gold");
  931. X            ngold++;
  932. X          }
  933. Xbreak;
  934. Xcase 168:
  935. X{
  936. X            tmpengraving[nengraving] = New(engraving);
  937. X            tmpengraving[nengraving]->x = current_coord.x;
  938. X            tmpengraving[nengraving]->y = current_coord.y;
  939. X            tmpengraving[nengraving]->e.text = yyvsp[0].map;
  940. X            tmpengraving[nengraving]->etype = yyvsp[-2].i;
  941. X            if (!in_room)
  942. X                check_coord(current_coord.x, current_coord.y,
  943. X                    "Engraving");
  944. X            nengraving++;
  945. X          }
  946. Xbreak;
  947. Xcase 170:
  948. X{
  949. X            yyval.i = - MAX_REGISTERS - 1;
  950. X          }
  951. Xbreak;
  952. Xcase 173:
  953. X{
  954. X            yyval.i = - MAX_REGISTERS - 1;
  955. X          }
  956. Xbreak;
  957. Xcase 176:
  958. X{
  959. X            yyval.map = (char *) 0;
  960. X          }
  961. Xbreak;
  962. Xcase 178:
  963. X{
  964. X            yyval.map = (char *) 0;
  965. X          }
  966. Xbreak;
  967. Xcase 179:
  968. X{
  969. X            int token = get_trap_type(yyvsp[0].map);
  970. X            if (token == ERR)
  971. X                yyerror("Unknown trap type!");
  972. X            yyval.i = token;
  973. X          }
  974. Xbreak;
  975. Xcase 181:
  976. X{
  977. X            int token = get_room_type(yyvsp[0].map);
  978. X            if (token == ERR) {
  979. X                yywarning("Unknown room type!  Making ordinary room...");
  980. X                yyval.i = OROOM;
  981. X            } else
  982. X                yyval.i = token;
  983. X          }
  984. Xbreak;
  985. Xcase 183:
  986. X{
  987. X            yyval.i = 0;
  988. X          }
  989. Xbreak;
  990. Xcase 184:
  991. X{
  992. X            yyval.i = yyvsp[0].i;
  993. X          }
  994. Xbreak;
  995. Xcase 185:
  996. X{
  997. X            yyval.i = yyvsp[-2].i + (yyvsp[0].i << 1);
  998. X          }
  999. Xbreak;
  1000. Xcase 188:
  1001. X{
  1002. X            current_coord.x = current_coord.y = -MAX_REGISTERS-1;
  1003. X          }
  1004. Xbreak;
  1005. Xcase 195:
  1006. X{
  1007. X            yyval.i = - MAX_REGISTERS - 1;
  1008. X          }
  1009. Xbreak;
  1010. Xcase 198:
  1011. X{
  1012. X            if ( yyvsp[-1].i >= MAX_REGISTERS )
  1013. X                yyerror("Register Index overflow!");
  1014. X            else
  1015. X                current_coord.x = current_coord.y = - yyvsp[-1].i - 1;
  1016. X          }
  1017. Xbreak;
  1018. Xcase 199:
  1019. X{
  1020. X            if ( yyvsp[-1].i >= MAX_REGISTERS )
  1021. X                yyerror("Register Index overflow!");
  1022. X            else
  1023. X                yyval.i = - yyvsp[-1].i - 1;
  1024. X          }
  1025. Xbreak;
  1026. Xcase 200:
  1027. X{
  1028. X            if ( yyvsp[-1].i >= MAX_REGISTERS )
  1029. X                yyerror("Register Index overflow!");
  1030. X            else
  1031. X                yyval.i = - yyvsp[-1].i - 1;
  1032. X          }
  1033. Xbreak;
  1034. Xcase 201:
  1035. X{
  1036. X            if ( yyvsp[-1].i >= 3 )
  1037. X                yyerror("Register Index overflow!");
  1038. X            else
  1039. X                yyval.i = - yyvsp[-1].i - 1;
  1040. X          }
  1041. Xbreak;
  1042. Xcase 203:
  1043. X{
  1044. X            if (check_monster_char((char) yyvsp[0].i))
  1045. X                yyval.i = yyvsp[0].i ;
  1046. X            else {
  1047. X                yyerror("Unknown monster class!");
  1048. X                yyval.i = ERR;
  1049. X            }
  1050. X          }
  1051. Xbreak;
  1052. Xcase 204:
  1053. X{
  1054. X            char c = yyvsp[0].i;
  1055. X            if (check_object_char(c))
  1056. X                yyval.i = c;
  1057. X            else {
  1058. X                yyerror("Unknown char class!");
  1059. X                yyval.i = ERR;
  1060. X            }
  1061. X          }
  1062. Xbreak;
  1063. Xcase 207:
  1064. X{
  1065. X            yyval.map = (char *) 0;
  1066. X          }
  1067. Xbreak;
  1068. Xcase 212:
  1069. X{
  1070. X            if (!in_room && !init_lev.init_present &&
  1071. X                (yyvsp[-3].i < 0 || yyvsp[-3].i > max_x_map ||
  1072. X                 yyvsp[-1].i < 0 || yyvsp[-1].i > max_y_map))
  1073. X                yyerror("Coordinates out of map range!");
  1074. X            current_coord.x = yyvsp[-3].i;
  1075. X            current_coord.y = yyvsp[-1].i;
  1076. X          }
  1077. Xbreak;
  1078. Xcase 213:
  1079. X{
  1080. X/* This series of if statements is a hack for MSC 5.1.  It seems that its
  1081. X   tiny little brain cannot compile if these are all one big if statement. */
  1082. X            if (yyvsp[-7].i < 0 || yyvsp[-7].i > max_x_map)
  1083. X                yyerror("Region out of map range!");
  1084. X            else if (yyvsp[-5].i < 0 || yyvsp[-5].i > max_y_map)
  1085. X                yyerror("Region out of map range!");
  1086. X            else if (yyvsp[-3].i < 0 || yyvsp[-3].i > max_x_map)
  1087. X                yyerror("Region out of map range!");
  1088. X            else if (yyvsp[-1].i < 0 || yyvsp[-1].i > max_y_map)
  1089. X                yyerror("Region out of map range!");
  1090. X            current_region.x1 = yyvsp[-7].i;
  1091. X            current_region.y1 = yyvsp[-5].i;
  1092. X            current_region.x2 = yyvsp[-3].i;
  1093. X            current_region.y2 = yyvsp[-1].i;
  1094. X          }
  1095. Xbreak;
  1096. X    }
  1097. X    yyssp -= yym;
  1098. X    yystate = *yyssp;
  1099. X    yyvsp -= yym;
  1100. X    yym = yylhs[yyn];
  1101. X    if (yystate == 0 && yym == 0)
  1102. X    {
  1103. X#if YYDEBUG
  1104. X        if (yydebug)
  1105. X            printf("%sdebug: after reduction, shifting from state 0 to\
  1106. X state %d\n", YYPREFIX, YYFINAL);
  1107. X#endif
  1108. X        yystate = YYFINAL;
  1109. X        *++yyssp = YYFINAL;
  1110. X        *++yyvsp = yyval;
  1111. X        if (yychar < 0)
  1112. X        {
  1113. X            if ((yychar = yylex()) < 0) yychar = 0;
  1114. X#if YYDEBUG
  1115. X            if (yydebug)
  1116. X            {
  1117. X                yys = 0;
  1118. X                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
  1119. X                if (!yys) yys = "illegal-symbol";
  1120. X                printf("%sdebug: state %d, reading %d (%s)\n",
  1121. X                        YYPREFIX, YYFINAL, yychar, yys);
  1122. X            }
  1123. X#endif
  1124. X        }
  1125. X        if (yychar == 0) goto yyaccept;
  1126. X        goto yyloop;
  1127. X    }
  1128. X    if ((yyn = yygindex[yym]) != 0 && (yyn += yystate) >= 0 &&
  1129. X            yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
  1130. X        yystate = yytable[yyn];
  1131. X    else
  1132. X        yystate = yydgoto[yym];
  1133. X#if YYDEBUG
  1134. X    if (yydebug)
  1135. X        printf("%sdebug: after reduction, shifting from state %d \
  1136. Xto state %d\n", YYPREFIX, *yyssp, yystate);
  1137. X#endif
  1138. X    if (yyssp >= yyss + yystacksize - 1)
  1139. X    {
  1140. X        goto yyoverflow;
  1141. X    }
  1142. X    *++yyssp = yystate;
  1143. X    *++yyvsp = yyval;
  1144. X    goto yyloop;
  1145. Xyyoverflow:
  1146. X    yyerror("yacc stack overflow");
  1147. Xyyabort:
  1148. X    return (1);
  1149. Xyyaccept:
  1150. X    return (0);
  1151. X}
  1152. END_OF_FILE
  1153. if test 26478 -ne `wc -c <'sys/share/lev_yacc.c2'`; then
  1154.     echo shar: \"'sys/share/lev_yacc.c2'\" unpacked with wrong size!
  1155. fi
  1156. # end of 'sys/share/lev_yacc.c2'
  1157. echo shar: End of archive 18 \(of 18\).
  1158. cp /dev/null ark18isdone
  1159. MISSING=""
  1160. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do
  1161.     if test ! -f ark${I}isdone ; then
  1162.     MISSING="${MISSING} ${I}"
  1163.     fi
  1164. done
  1165. if test "${MISSING}" = "" ; then
  1166.     echo You have unpacked all 18 archives.
  1167.     echo "Now execute ./patchit3.sh"
  1168.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1169. else
  1170.     echo You still need to unpack the following archives:
  1171.     echo "        " ${MISSING}
  1172. fi
  1173. ##  End of shell archive.
  1174. exit 0
  1175.