y.tab.c 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895
  1. #line 2 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  2. #include "cc.h"
  3. #line 4 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  4. typedef union {
  5. Node* node;
  6. Sym* sym;
  7. Type* type;
  8. struct
  9. {
  10. Type* t;
  11. char c;
  12. } tycl;
  13. struct
  14. {
  15. Type* t1;
  16. Type* t2;
  17. } tyty;
  18. struct
  19. {
  20. char* s;
  21. long l;
  22. } sval;
  23. long lval;
  24. double dval;
  25. vlong vval;
  26. } YYSTYPE;
  27. extern int yyerrflag;
  28. #ifndef YYMAXDEPTH
  29. #define YYMAXDEPTH 150
  30. #endif
  31. YYSTYPE yylval;
  32. YYSTYPE yyval;
  33. #define LPE 57346
  34. #define LME 57347
  35. #define LMLE 57348
  36. #define LDVE 57349
  37. #define LMDE 57350
  38. #define LRSHE 57351
  39. #define LLSHE 57352
  40. #define LANDE 57353
  41. #define LXORE 57354
  42. #define LORE 57355
  43. #define LOROR 57356
  44. #define LANDAND 57357
  45. #define LEQ 57358
  46. #define LNE 57359
  47. #define LLE 57360
  48. #define LGE 57361
  49. #define LLSH 57362
  50. #define LRSH 57363
  51. #define LMM 57364
  52. #define LPP 57365
  53. #define LMG 57366
  54. #define LNAME 57367
  55. #define LTYPE 57368
  56. #define LFCONST 57369
  57. #define LDCONST 57370
  58. #define LCONST 57371
  59. #define LLCONST 57372
  60. #define LUCONST 57373
  61. #define LULCONST 57374
  62. #define LVLCONST 57375
  63. #define LUVLCONST 57376
  64. #define LSTRING 57377
  65. #define LLSTRING 57378
  66. #define LAUTO 57379
  67. #define LBREAK 57380
  68. #define LCASE 57381
  69. #define LCHAR 57382
  70. #define LCONTINUE 57383
  71. #define LDEFAULT 57384
  72. #define LDO 57385
  73. #define LDOUBLE 57386
  74. #define LELSE 57387
  75. #define LEXTERN 57388
  76. #define LFLOAT 57389
  77. #define LFOR 57390
  78. #define LGOTO 57391
  79. #define LIF 57392
  80. #define LINT 57393
  81. #define LLONG 57394
  82. #define LREGISTER 57395
  83. #define LRETURN 57396
  84. #define LSHORT 57397
  85. #define LSIZEOF 57398
  86. #define LUSED 57399
  87. #define LSTATIC 57400
  88. #define LSTRUCT 57401
  89. #define LSWITCH 57402
  90. #define LTYPEDEF 57403
  91. #define LTYPESTR 57404
  92. #define LUNION 57405
  93. #define LUNSIGNED 57406
  94. #define LWHILE 57407
  95. #define LVOID 57408
  96. #define LENUM 57409
  97. #define LSIGNED 57410
  98. #define LCONSTNT 57411
  99. #define LVOLATILE 57412
  100. #define LSET 57413
  101. #define LSIGNOF 57414
  102. #define YYEOFCODE 1
  103. #define YYERRCODE 2
  104. #line 1158 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  105. short yyexca[] =
  106. {-1, 1,
  107. 1, -1,
  108. -2, 178,
  109. -1, 35,
  110. 4, 8,
  111. 5, 8,
  112. 6, 9,
  113. -2, 5,
  114. -1, 52,
  115. 93, 191,
  116. -2, 190,
  117. -1, 55,
  118. 93, 195,
  119. -2, 194,
  120. -1, 57,
  121. 93, 199,
  122. -2, 198,
  123. -1, 76,
  124. 6, 9,
  125. -2, 8,
  126. -1, 305,
  127. 4, 96,
  128. 93, 82,
  129. -2, 0,
  130. -1, 322,
  131. 6, 22,
  132. -2, 21,
  133. -1, 327,
  134. 93, 82,
  135. -2, 96,
  136. -1, 333,
  137. 4, 96,
  138. 93, 82,
  139. -2, 0,
  140. -1, 383,
  141. 4, 96,
  142. 93, 82,
  143. -2, 0,
  144. -1, 385,
  145. 4, 96,
  146. 93, 82,
  147. -2, 0,
  148. -1, 387,
  149. 4, 96,
  150. 93, 82,
  151. -2, 0,
  152. -1, 397,
  153. 4, 96,
  154. 93, 82,
  155. -2, 0,
  156. -1, 403,
  157. 4, 96,
  158. 93, 82,
  159. -2, 0,
  160. };
  161. #define YYNPROD 241
  162. #define YYPRIVATE 57344
  163. #define YYLAST 1206
  164. short yyact[] =
  165. {
  166. 175, 324, 256, 328, 209, 321, 203, 40, 207, 326,
  167. 87, 341, 38, 342, 266, 23, 205, 52, 55, 57,
  168. 89, 257, 46, 46, 85, 4, 5, 265, 79, 103,
  169. 210, 124, 90, 201, 133, 136, 201, 135, 86, 41,
  170. 42, 65, 140, 138, 41, 42, 268, 80, 41, 42,
  171. 35, 369, 277, 252, 204, 254, 123, 54, 310, 46,
  172. 140, 253, 308, 288, 46, 88, 46, 142, 403, 389,
  173. 252, 388, 316, 315, 309, 293, 290, 140, 253, 129,
  174. 287, 117, 131, 128, 117, 46, 66, 375, 118, 58,
  175. 397, 68, 217, 81, 195, 254, 254, 194, 54, 25,
  176. 26, 125, 5, 127, 254, 174, 254, 76, 254, 386,
  177. 217, 365, 116, 364, 182, 183, 184, 185, 186, 187,
  178. 188, 189, 303, 25, 26, 200, 82, 360, 34, 134,
  179. 136, 129, 41, 42, 190, 192, 357, 140, 138, 41,
  180. 42, 88, 295, 368, 221, 222, 223, 224, 225, 226,
  181. 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
  182. 237, 238, 81, 240, 241, 242, 243, 244, 245, 246,
  183. 247, 248, 249, 250, 206, 239, 218, 258, 214, 219,
  184. 213, 399, 387, 25, 26, 66, 260, 261, 44, 75,
  185. 385, 259, 383, 53, 255, 216, 215, 356, 121, 64,
  186. 63, 355, 43, 273, 56, 174, 37, 174, 251, 129,
  187. 48, 269, 88, 278, 39, 41, 42, 88, 173, 136,
  188. 283, 220, 282, 141, 270, 254, 140, 138, 41, 42,
  189. 117, 271, 67, 272, 7, 320, 367, 67, 289, 279,
  190. 37, 45, 45, 50, 285, 81, 371, 196, 39, 41,
  191. 42, 301, 284, 69, 6, 286, 347, 348, 67, 25,
  192. 26, 116, 252, 49, 119, 37, 122, 22, 292, 140,
  193. 253, 88, 281, 39, 41, 42, 51, 269, 45, 37,
  194. 202, 302, 78, 45, 254, 45, 307, 39, 41, 42,
  195. 311, 218, 298, 306, 291, 258, 300, 296, 297, 5,
  196. 304, 402, 88, 294, 45, 275, 276, 117, 59, 60,
  197. 33, 312, 319, 269, 129, 318, 314, 280, 262, 132,
  198. 263, 398, 346, 206, 396, 395, 24, 74, 384, 284,
  199. 143, 144, 145, 47, 47, 358, 354, 352, 359, 351,
  200. 37, 378, 376, 362, 366, 199, 363, 361, 39, 41,
  201. 42, 322, 353, 350, 370, 146, 147, 143, 144, 145,
  202. 373, 317, 299, 73, 72, 258, 258, 379, 380, 372,
  203. 47, 374, 129, 70, 377, 47, 382, 47, 181, 180,
  204. 178, 179, 177, 176, 71, 390, 329, 392, 391, 394,
  205. 264, 198, 120, 349, 62, 322, 47, 94, 126, 400,
  206. 393, 77, 401, 61, 3, 404, 95, 96, 93, 2,
  207. 1, 100, 99, 139, 137, 208, 91, 84, 12, 109,
  208. 108, 104, 105, 106, 107, 110, 111, 114, 115, 27,
  209. 267, 327, 13, 36, 113, 112, 20, 305, 29, 19,
  210. 274, 92, 325, 15, 16, 32, 8, 14, 101, 0,
  211. 28, 9, 0, 30, 31, 10, 18, 0, 21, 11,
  212. 17, 25, 26, 94, 102, 0, 0, 0, 0, 97,
  213. 98, 0, 95, 96, 93, 0, 0, 100, 99, 0,
  214. 0, 0, 91, 345, 0, 109, 108, 104, 105, 106,
  215. 107, 110, 111, 114, 115, 0, 336, 343, 0, 337,
  216. 344, 333, 0, 0, 0, 0, 331, 338, 330, 0,
  217. 325, 0, 334, 0, 101, 339, 0, 0, 335, 0,
  218. 0, 0, 0, 332, 0, 0, 0, 0, 0, 340,
  219. 102, 94, 0, 0, 323, 97, 98, 0, 0, 0,
  220. 95, 96, 93, 0, 0, 100, 99, 0, 0, 0,
  221. 91, 345, 0, 109, 108, 104, 105, 106, 107, 110,
  222. 111, 114, 115, 0, 336, 343, 0, 337, 344, 333,
  223. 0, 0, 0, 0, 331, 338, 330, 0, 0, 0,
  224. 334, 0, 101, 339, 0, 0, 335, 0, 0, 0,
  225. 0, 332, 0, 0, 0, 0, 94, 340, 102, 0,
  226. 0, 0, 0, 97, 98, 95, 96, 93, 0, 0,
  227. 100, 99, 0, 0, 0, 91, 345, 0, 109, 108,
  228. 104, 105, 106, 107, 110, 111, 114, 115, 0, 336,
  229. 343, 0, 337, 344, 333, 0, 0, 0, 0, 331,
  230. 338, 330, 0, 0, 0, 334, 0, 101, 339, 0,
  231. 0, 335, 0, 0, 0, 0, 332, 0, 0, 0,
  232. 0, 94, 340, 102, 0, 0, 0, 0, 97, 98,
  233. 95, 96, 93, 0, 0, 100, 99, 0, 212, 211,
  234. 91, 84, 0, 109, 108, 104, 105, 106, 107, 110,
  235. 111, 114, 115, 0, 94, 149, 148, 146, 147, 143,
  236. 144, 145, 0, 95, 96, 93, 0, 0, 100, 99,
  237. 0, 0, 101, 91, 84, 0, 109, 108, 104, 105,
  238. 106, 107, 110, 111, 114, 115, 0, 94, 102, 0,
  239. 0, 130, 0, 97, 98, 0, 95, 96, 93, 0,
  240. 0, 100, 99, 0, 0, 101, 91, 84, 0, 109,
  241. 108, 104, 105, 106, 107, 110, 111, 114, 115, 0,
  242. 94, 102, 0, 0, 130, 0, 97, 98, 0, 95,
  243. 96, 93, 0, 0, 100, 99, 0, 0, 101, 91,
  244. 84, 0, 109, 108, 104, 105, 106, 107, 110, 111,
  245. 114, 115, 0, 94, 102, 0, 0, 313, 0, 97,
  246. 98, 0, 95, 96, 93, 0, 0, 100, 99, 0,
  247. 0, 101, 193, 84, 0, 109, 108, 104, 105, 106,
  248. 107, 110, 111, 114, 115, 0, 94, 102, 0, 0,
  249. 0, 0, 97, 98, 0, 95, 96, 93, 0, 0,
  250. 100, 99, 0, 0, 101, 191, 84, 0, 109, 108,
  251. 104, 105, 106, 107, 110, 111, 114, 115, 0, 0,
  252. 102, 0, 0, 0, 0, 97, 98, 0, 0, 0,
  253. 0, 0, 0, 0, 0, 0, 12, 101, 0, 0,
  254. 0, 0, 0, 0, 0, 0, 0, 27, 0, 0,
  255. 13, 0, 0, 102, 20, 0, 29, 19, 97, 98,
  256. 0, 15, 16, 32, 0, 14, 0, 0, 28, 9,
  257. 0, 30, 31, 10, 18, 0, 21, 11, 17, 25,
  258. 26, 83, 0, 0, 84, 12, 197, 0, 0, 0,
  259. 0, 0, 0, 0, 0, 0, 27, 0, 0, 13,
  260. 0, 0, 0, 20, 0, 29, 19, 0, 0, 0,
  261. 15, 16, 32, 0, 14, 0, 0, 28, 9, 12,
  262. 30, 31, 10, 18, 0, 21, 11, 17, 25, 26,
  263. 27, 0, 0, 13, 0, 0, 0, 20, 0, 29,
  264. 19, 0, 0, 0, 15, 16, 32, 0, 14, 0,
  265. 0, 28, 9, 0, 30, 31, 10, 18, 0, 21,
  266. 11, 17, 25, 26, 27, 0, 0, 13, 0, 0,
  267. 0, 20, 0, 29, 19, 0, 0, 0, 15, 16,
  268. 32, 0, 14, 0, 0, 28, 0, 0, 30, 31,
  269. 0, 18, 0, 21, 0, 17, 25, 26, 162, 163,
  270. 164, 165, 166, 167, 169, 168, 170, 171, 172, 161,
  271. 381, 160, 159, 158, 157, 156, 154, 155, 150, 151,
  272. 152, 153, 149, 148, 146, 147, 143, 144, 145, 162,
  273. 163, 164, 165, 166, 167, 169, 168, 170, 171, 172,
  274. 161, 0, 160, 159, 158, 157, 156, 154, 155, 150,
  275. 151, 152, 153, 149, 148, 146, 147, 143, 144, 145,
  276. 161, 0, 160, 159, 158, 157, 156, 154, 155, 150,
  277. 151, 152, 153, 149, 148, 146, 147, 143, 144, 145,
  278. 159, 158, 157, 156, 154, 155, 150, 151, 152, 153,
  279. 149, 148, 146, 147, 143, 144, 145, 158, 157, 156,
  280. 154, 155, 150, 151, 152, 153, 149, 148, 146, 147,
  281. 143, 144, 145, 157, 156, 154, 155, 150, 151, 152,
  282. 153, 149, 148, 146, 147, 143, 144, 145, 156, 154,
  283. 155, 150, 151, 152, 153, 149, 148, 146, 147, 143,
  284. 144, 145, 154, 155, 150, 151, 152, 153, 149, 148,
  285. 146, 147, 143, 144, 145, 150, 151, 152, 153, 149,
  286. 148, 146, 147, 143, 144, 145
  287. };
  288. short yypact[] =
  289. {
  290. -1000, 915,-1000, 306,-1000,-1000, 949, 949, 915, 5,
  291. 5, -4,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
  292. -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
  293. -1000,-1000,-1000,-1000, 304,-1000, 158,-1000,-1000, 245,
  294. -1000,-1000,-1000, 949,-1000,-1000,-1000,-1000, 949,-1000,
  295. 949,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
  296. 245,-1000, 276, 881, 737, 172, -3,-1000, 12, 949,
  297. -36, 915, -36, -37, 58,-1000,-1000, 915, 671, -9,
  298. 314,-1000, 185, 183,-1000,-1000, -25,-1000,1063,-1000,
  299. -1000, 374, 341, 737, 737, 737, 737, 737, 737, 737,
  300. 737, 803, 770,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
  301. -1000,-1000, 44, 40,-1000,-1000,-1000,-1000,-1000,-1000,
  302. 832,-1000,-1000,-1000, 31, 274, -39, 245,-1000,1063,
  303. 638,-1000, 881,-1000,-1000,-1000,-1000, 154, 1,-1000,
  304. 737, 181,-1000, 737, 737, 737, 737, 737, 737, 737,
  305. 737, 737, 737, 737, 737, 737, 737, 737, 737, 737,
  306. 737, 737, 737, 737, 737, 737, 737, 737, 737, 737,
  307. 737, 737, 737, 228, 103,1063, 737, 737, 89, 89,
  308. -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
  309. -1000, 374,-1000, 374,-1000,-1000,-1000,-1000, 206, 58,
  310. -1000, 58, 737,-1000,-1000, 301,-1000, -42, 638, 312,
  311. 266, 737, 89,-1000, 96, 881, 737,-1000, -11, -29,
  312. -1000,-1000,-1000,-1000, 296, 296, 323, 323, 665, 665,
  313. 665, 665,1169,1169,1158,1145,1131,1116,1100, 220,
  314. 1063,1063,1063,1063,1063,1063,1063,1063,1063,1063,
  315. 1063, -15,-1000, 19, 737,-1000, -16, 298,1063, 50,
  316. -1000,-1000, 228, 228, 206, 358, 291,-1000,-1000, 233,
  317. 737, 28,-1000,1063, 915,-1000, 245,-1000, 281, 266,
  318. -1000,-1000, -30,-1000,-1000, -17, -34,-1000,-1000, 737,
  319. 704, 36,-1000,-1000, 737,-1000, -18, -19, 357,-1000,
  320. 206, 737,-1000,-1000, 231, 440,-1000,-1000,-1000,-1000,
  321. -1000,1083,-1000, 638,-1000,-1000,-1000,-1000,-1000,-1000,
  322. -1000, 252,-1000,-1000,-1000, 349,-1000, 573, 348, -39,
  323. 159, 155, 94, 508, 737, 85, 343, 339, 89, 71,
  324. 69,-1000, 279, 737, 218, 125, -43,-1000, 245, 240,
  325. -1000,-1000,-1000,-1000,-1000, 737, 737, 737, 4, 338,
  326. 737,-1000,-1000, 337, 737, 737,1032,-1000,-1000,-1000,
  327. -1000, 671, 101, 324, 99, 67,-1000, 91,-1000, -20,
  328. -22,-1000,-1000, 508, 737, 508, 737, 508, 321, 320,
  329. 27, 317,-1000, 90,-1000,-1000,-1000, 508, 737, 297,
  330. -1000, -23,-1000, 508,-1000
  331. };
  332. short yypgo[] =
  333. {
  334. 0, 7, 188, 267, 326, 15, 234, 202, 446, 41,
  335. 126, 193, 254, 24, 28, 47, 3, 29, 6, 1,
  336. 13, 0, 20, 441, 2, 21, 440, 437, 32, 435,
  337. 434, 46, 433, 431, 11, 9, 5, 430, 12, 30,
  338. 415, 34, 37, 414, 413, 38, 10, 4, 8, 410,
  339. 409, 404, 128, 403, 401, 398, 394, 25, 393, 16,
  340. 392, 391, 27, 390, 14, 386, 384, 373, 364, 363,
  341. 345, 31, 327
  342. };
  343. short yyr1[] =
  344. {
  345. 0, 49, 49, 50, 50, 53, 55, 50, 52, 56,
  346. 52, 52, 31, 31, 32, 32, 32, 32, 26, 26,
  347. 26, 36, 58, 36, 36, 54, 54, 59, 59, 61,
  348. 60, 63, 60, 62, 62, 64, 64, 37, 37, 37,
  349. 41, 41, 42, 42, 42, 43, 43, 43, 44, 44,
  350. 44, 47, 47, 39, 39, 39, 40, 40, 40, 40,
  351. 48, 48, 48, 14, 14, 15, 15, 15, 15, 15,
  352. 18, 27, 27, 33, 33, 34, 34, 34, 19, 19,
  353. 19, 35, 65, 35, 35, 35, 35, 35, 35, 35,
  354. 35, 35, 35, 35, 35, 35, 16, 16, 45, 45,
  355. 46, 20, 20, 21, 21, 21, 21, 21, 21, 21,
  356. 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
  357. 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
  358. 21, 21, 21, 21, 22, 22, 22, 28, 28, 28,
  359. 28, 28, 28, 28, 28, 28, 28, 28, 23, 23,
  360. 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
  361. 23, 23, 23, 23, 23, 23, 23, 23, 29, 29,
  362. 30, 30, 24, 24, 25, 25, 66, 11, 51, 51,
  363. 13, 13, 13, 13, 13, 13, 13, 13, 10, 57,
  364. 12, 67, 12, 12, 12, 68, 12, 12, 12, 69,
  365. 70, 12, 72, 12, 12, 7, 7, 9, 9, 2,
  366. 2, 2, 8, 8, 3, 3, 71, 71, 71, 71,
  367. 6, 6, 6, 6, 6, 6, 6, 6, 6, 4,
  368. 4, 4, 4, 4, 4, 5, 5, 17, 38, 1,
  369. 1
  370. };
  371. short yyr2[] =
  372. {
  373. 0, 0, 2, 2, 3, 0, 0, 6, 1, 0,
  374. 4, 3, 1, 3, 1, 3, 4, 4, 0, 3,
  375. 4, 1, 0, 4, 3, 0, 4, 1, 3, 0,
  376. 4, 0, 5, 0, 1, 1, 3, 1, 3, 2,
  377. 0, 1, 2, 3, 1, 1, 4, 4, 2, 3,
  378. 3, 1, 3, 3, 2, 2, 2, 3, 1, 2,
  379. 1, 1, 2, 0, 1, 1, 2, 2, 3, 3,
  380. 4, 0, 2, 1, 2, 3, 2, 2, 2, 1,
  381. 2, 2, 0, 2, 5, 7, 9, 5, 7, 3,
  382. 5, 2, 2, 3, 5, 5, 0, 1, 0, 1,
  383. 1, 1, 3, 1, 3, 3, 3, 3, 3, 3,
  384. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  385. 3, 3, 5, 3, 3, 3, 3, 3, 3, 3,
  386. 3, 3, 3, 3, 1, 5, 7, 1, 2, 2,
  387. 2, 2, 2, 2, 2, 2, 2, 2, 3, 5,
  388. 5, 4, 4, 3, 3, 2, 2, 1, 1, 1,
  389. 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
  390. 1, 2, 0, 1, 1, 3, 0, 4, 0, 1,
  391. 1, 1, 1, 2, 2, 3, 2, 3, 1, 1,
  392. 2, 0, 4, 2, 2, 0, 4, 2, 2, 0,
  393. 0, 7, 0, 5, 1, 1, 2, 0, 2, 1,
  394. 1, 1, 1, 2, 1, 1, 1, 3, 2, 3,
  395. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  396. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  397. 1
  398. };
  399. short yychk[] =
  400. {
  401. -1000, -49, -50, -51, -57, -13, -12, -6, -8, 77,
  402. 81, 85, 44, 58, 73, 69, 70, 86, 82, 65,
  403. 62, 84, -3, -5, -4, 87, 88, 55, 76, 64,
  404. 79, 80, 71, 4, -52, -31, -32, 34, -38, 42,
  405. -1, 43, 44, -7, -2, -6, -5, -4, -7, -12,
  406. -6, -3, -1, -11, 93, -1, -11, -1, 93, 4,
  407. 5, -53, -56, 42, 41, -9, -31, -2, -9, -7,
  408. -67, -66, -68, -69, -72, -52, -31, -54, 6, -14,
  409. -15, -17, -10, 40, 43, -13, -45, -46, -21, -22,
  410. -28, 42, -23, 34, 23, 32, 33, 95, 96, 38,
  411. 37, 74, 90, -17, 47, 48, 49, 50, 46, 45,
  412. 51, 52, -29, -30, 53, 54, -31, -5, 91, -11,
  413. -60, -10, -11, 93, -71, 43, -55, -57, -47, -21,
  414. 93, 91, 5, -41, -31, -42, 34, -43, 42, -44,
  415. 41, 40, 92, 34, 35, 36, 32, 33, 31, 30,
  416. 26, 27, 28, 29, 24, 25, 23, 22, 21, 20,
  417. 19, 17, 6, 7, 8, 9, 10, 11, 13, 12,
  418. 14, 15, 16, -10, -20, -21, 42, 41, 39, 40,
  419. 38, 37, -22, -22, -22, -22, -22, -22, -22, -22,
  420. -28, 42, -28, 42, 53, 54, -10, 94, -61, -70,
  421. 94, 5, 6, -18, 93, -59, -31, -48, -40, -47,
  422. -39, 41, 40, -15, -9, 42, 41, 91, -42, -45,
  423. 40, -21, -21, -21, -21, -21, -21, -21, -21, -21,
  424. -21, -21, -21, -21, -21, -21, -21, -21, -21, -20,
  425. -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
  426. -21, -41, 34, 42, 5, 91, -24, -25, -21, -20,
  427. -1, -1, -10, -10, -63, -62, -64, -37, -31, -38,
  428. 18, -71, -71, -21, -26, 4, 5, 94, -47, -39,
  429. 5, 6, -46, -1, -42, -14, -45, 91, 92, 18,
  430. 91, -9, -20, 91, 5, 92, -41, -41, -62, 4,
  431. 5, 18, -46, 94, -57, -27, -59, 5, 92, 91,
  432. 92, -21, -22, 93, -25, 91, 91, 4, -64, -46,
  433. 4, -36, -31, 94, -19, 2, -35, -33, -16, -65,
  434. 68, 66, 83, 61, 72, 78, 56, 59, 67, 75,
  435. 89, -34, -20, 57, 60, 43, -48, 4, 5, -58,
  436. 4, -34, -35, 4, -18, 42, 42, 42, -19, -16,
  437. 42, 4, 4, -1, 42, 42, -21, 18, 18, 94,
  438. -36, 6, -20, -16, -20, 83, 4, -20, 4, -24,
  439. -24, 18, -47, 91, 4, 91, 42, 91, 91, 91,
  440. -19, -16, -19, -20, -19, 4, 4, 63, 4, 91,
  441. -19, -16, 4, 91, -19
  442. };
  443. short yydef[] =
  444. {
  445. 1, -2, 2, 0, 179, 189, 180, 181, 182, 0,
  446. 0, 0, 204, 220, 221, 222, 223, 224, 225, 226,
  447. 227, 228, 212, 214, 215, 235, 236, 229, 230, 231,
  448. 232, 233, 234, 3, 0, -2, 12, 207, 14, 0,
  449. 238, 239, 240, 183, 205, 209, 210, 211, 184, 207,
  450. 186, 213, -2, 193, 176, -2, 197, -2, 202, 4,
  451. 0, 25, 0, 63, 98, 0, 0, 206, 185, 187,
  452. 0, 0, 0, 0, 0, 11, -2, 6, 0, 0,
  453. 64, 65, 40, 0, 237, 188, 0, 99, 100, 103,
  454. 134, 0, 137, 0, 0, 0, 0, 0, 0, 0,
  455. 0, 0, 0, 157, 158, 159, 160, 161, 162, 163,
  456. 164, 165, 166, 167, 168, 170, 13, 208, 15, 192,
  457. 0, 29, 196, 200, 0, 216, 0, 0, 10, 51,
  458. 0, 16, 0, 66, 67, 41, 207, 44, 0, 45,
  459. 98, 0, 17, 0, 0, 0, 0, 0, 0, 0,
  460. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  461. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  462. 0, 0, 0, 40, 0, 101, 172, 0, 0, 0,
  463. 155, 156, 138, 139, 140, 141, 142, 143, 144, 145,
  464. 146, 0, 147, 0, 169, 171, 31, 177, 33, 0,
  465. 203, 218, 0, 7, 18, 0, 27, 0, 60, 61,
  466. 58, 0, 0, 69, 42, 63, 98, 48, 0, 0,
  467. 68, 104, 105, 106, 107, 108, 109, 110, 111, 112,
  468. 113, 114, 115, 116, 117, 118, 119, 120, 121, 0,
  469. 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
  470. 133, 0, 207, 0, 0, 148, 0, 173, 174, 0,
  471. 153, 154, 40, 40, 33, 0, 34, 35, 37, 14,
  472. 0, 0, 219, 217, 71, 26, 0, 52, 62, 59,
  473. 56, 55, 0, 54, 43, 0, 0, 50, 49, 0,
  474. 0, 42, 102, 151, 0, 152, 0, 0, 0, 30,
  475. 0, 0, 39, 201, 0, -2, 28, 57, 53, 46,
  476. 47, 122, 135, 0, 175, 149, 150, 32, 36, 38,
  477. 19, 0, -2, 70, 72, 0, 79, -2, 0, 0,
  478. 0, 0, 0, -2, 96, 0, 0, 0, 0, 0,
  479. 0, 73, 97, 0, 0, 237, 0, 20, 0, 0,
  480. 78, 74, 80, 81, 83, 0, 96, 0, 0, 0,
  481. 0, 91, 92, 0, 172, 172, 0, 76, 77, 136,
  482. 24, 0, 0, 0, 0, 0, 89, 0, 93, 0,
  483. 0, 75, 23, -2, 96, -2, 0, -2, 0, 0,
  484. 84, 0, 87, 0, 90, 94, 95, -2, 96, 0,
  485. 85, 0, 88, -2, 86
  486. };
  487. short yytok1[] =
  488. {
  489. 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  490. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  491. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  492. 0, 0, 0, 95, 0, 0, 0, 36, 23, 0,
  493. 42, 91, 34, 32, 5, 33, 40, 35, 0, 0,
  494. 0, 0, 0, 0, 0, 0, 0, 0, 18, 4,
  495. 26, 6, 27, 17, 0, 0, 0, 0, 0, 0,
  496. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  497. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  498. 0, 41, 0, 92, 22, 0, 0, 0, 0, 0,
  499. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  500. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  501. 0, 0, 0, 93, 21, 94, 96
  502. };
  503. short yytok2[] =
  504. {
  505. 2, 3, 7, 8, 9, 10, 11, 12, 13, 14,
  506. 15, 16, 19, 20, 24, 25, 28, 29, 30, 31,
  507. 37, 38, 39, 43, 44, 45, 46, 47, 48, 49,
  508. 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
  509. 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
  510. 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
  511. 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
  512. 90
  513. };
  514. long yytok3[] =
  515. {
  516. 0
  517. };
  518. #define YYFLAG -1000
  519. #define yyclearin yychar = -1
  520. #define yyerrok yyerrflag = 0
  521. #ifdef yydebug
  522. #include "y.debug"
  523. #else
  524. #define yydebug 0
  525. char* yytoknames[1]; /* for debugging */
  526. char* yystates[1]; /* for debugging */
  527. #endif
  528. /* parser for yacc output */
  529. int yynerrs = 0; /* number of errors */
  530. int yyerrflag = 0; /* error recovery flag */
  531. extern int fprint(int, char*, ...);
  532. extern int sprint(char*, char*, ...);
  533. char*
  534. yytokname(int yyc)
  535. {
  536. static char x[10];
  537. if(yyc > 0 && yyc <= sizeof(yytoknames)/sizeof(yytoknames[0]))
  538. if(yytoknames[yyc-1])
  539. return yytoknames[yyc-1];
  540. sprint(x, "<%d>", yyc);
  541. return x;
  542. }
  543. char*
  544. yystatname(int yys)
  545. {
  546. static char x[10];
  547. if(yys >= 0 && yys < sizeof(yystates)/sizeof(yystates[0]))
  548. if(yystates[yys])
  549. return yystates[yys];
  550. sprint(x, "<%d>\n", yys);
  551. return x;
  552. }
  553. long
  554. yylex1(void)
  555. {
  556. long yychar;
  557. long *t3p;
  558. int c;
  559. yychar = yylex();
  560. if(yychar <= 0) {
  561. c = yytok1[0];
  562. goto out;
  563. }
  564. if(yychar < sizeof(yytok1)/sizeof(yytok1[0])) {
  565. c = yytok1[yychar];
  566. goto out;
  567. }
  568. if(yychar >= YYPRIVATE)
  569. if(yychar < YYPRIVATE+sizeof(yytok2)/sizeof(yytok2[0])) {
  570. c = yytok2[yychar-YYPRIVATE];
  571. goto out;
  572. }
  573. for(t3p=yytok3;; t3p+=2) {
  574. c = t3p[0];
  575. if(c == yychar) {
  576. c = t3p[1];
  577. goto out;
  578. }
  579. if(c == 0)
  580. break;
  581. }
  582. c = 0;
  583. out:
  584. if(c == 0)
  585. c = yytok2[1]; /* unknown char */
  586. if(yydebug >= 3)
  587. fprint(2, "lex %.4lux %s\n", yychar, yytokname(c));
  588. return c;
  589. }
  590. int
  591. yyparse(void)
  592. {
  593. struct
  594. {
  595. YYSTYPE yyv;
  596. int yys;
  597. } yys[YYMAXDEPTH], *yyp, *yypt;
  598. short *yyxi;
  599. int yyj, yym, yystate, yyn, yyg;
  600. long yychar;
  601. YYSTYPE save1, save2;
  602. int save3, save4;
  603. save1 = yylval;
  604. save2 = yyval;
  605. save3 = yynerrs;
  606. save4 = yyerrflag;
  607. yystate = 0;
  608. yychar = -1;
  609. yynerrs = 0;
  610. yyerrflag = 0;
  611. yyp = &yys[-1];
  612. goto yystack;
  613. ret0:
  614. yyn = 0;
  615. goto ret;
  616. ret1:
  617. yyn = 1;
  618. goto ret;
  619. ret:
  620. yylval = save1;
  621. yyval = save2;
  622. yynerrs = save3;
  623. yyerrflag = save4;
  624. return yyn;
  625. yystack:
  626. /* put a state and value onto the stack */
  627. if(yydebug >= 4)
  628. fprint(2, "char %s in %s", yytokname(yychar), yystatname(yystate));
  629. yyp++;
  630. if(yyp >= &yys[YYMAXDEPTH]) {
  631. yyerror("yacc stack overflow");
  632. goto ret1;
  633. }
  634. yyp->yys = yystate;
  635. yyp->yyv = yyval;
  636. yynewstate:
  637. yyn = yypact[yystate];
  638. if(yyn <= YYFLAG)
  639. goto yydefault; /* simple state */
  640. if(yychar < 0)
  641. yychar = yylex1();
  642. yyn += yychar;
  643. if(yyn < 0 || yyn >= YYLAST)
  644. goto yydefault;
  645. yyn = yyact[yyn];
  646. if(yychk[yyn] == yychar) { /* valid shift */
  647. yychar = -1;
  648. yyval = yylval;
  649. yystate = yyn;
  650. if(yyerrflag > 0)
  651. yyerrflag--;
  652. goto yystack;
  653. }
  654. yydefault:
  655. /* default state action */
  656. yyn = yydef[yystate];
  657. if(yyn == -2) {
  658. if(yychar < 0)
  659. yychar = yylex1();
  660. /* look through exception table */
  661. for(yyxi=yyexca;; yyxi+=2)
  662. if(yyxi[0] == -1 && yyxi[1] == yystate)
  663. break;
  664. for(yyxi += 2;; yyxi += 2) {
  665. yyn = yyxi[0];
  666. if(yyn < 0 || yyn == yychar)
  667. break;
  668. }
  669. yyn = yyxi[1];
  670. if(yyn < 0)
  671. goto ret0;
  672. }
  673. if(yyn == 0) {
  674. /* error ... attempt to resume parsing */
  675. switch(yyerrflag) {
  676. case 0: /* brand new error */
  677. yyerror("syntax error");
  678. yynerrs++;
  679. if(yydebug >= 1) {
  680. fprint(2, "%s", yystatname(yystate));
  681. fprint(2, "saw %s\n", yytokname(yychar));
  682. }
  683. case 1:
  684. case 2: /* incompletely recovered error ... try again */
  685. yyerrflag = 3;
  686. /* find a state where "error" is a legal shift action */
  687. while(yyp >= yys) {
  688. yyn = yypact[yyp->yys] + YYERRCODE;
  689. if(yyn >= 0 && yyn < YYLAST) {
  690. yystate = yyact[yyn]; /* simulate a shift of "error" */
  691. if(yychk[yystate] == YYERRCODE)
  692. goto yystack;
  693. }
  694. /* the current yyp has no shift onn "error", pop stack */
  695. if(yydebug >= 2)
  696. fprint(2, "error recovery pops state %d, uncovers %d\n",
  697. yyp->yys, (yyp-1)->yys );
  698. yyp--;
  699. }
  700. /* there is no state on the stack with an error shift ... abort */
  701. goto ret1;
  702. case 3: /* no shift yet; clobber input char */
  703. if(yydebug >= 2)
  704. fprint(2, "error recovery discards %s\n", yytokname(yychar));
  705. if(yychar == YYEOFCODE)
  706. goto ret1;
  707. yychar = -1;
  708. goto yynewstate; /* try again in the same state */
  709. }
  710. }
  711. /* reduction by production yyn */
  712. if(yydebug >= 2)
  713. fprint(2, "reduce %d in:\n\t%s", yyn, yystatname(yystate));
  714. yypt = yyp;
  715. yyp -= yyr2[yyn];
  716. yyval = (yyp+1)->yyv;
  717. yym = yyn;
  718. /* consult goto table to find next state */
  719. yyn = yyr1[yyn];
  720. yyg = yypgo[yyn];
  721. yyj = yyg + yyp->yys + 1;
  722. if(yyj >= YYLAST || yychk[yystate=yyact[yyj]] != -yyn)
  723. yystate = yyact[yyg];
  724. switch(yym) {
  725. case 3:
  726. #line 74 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  727. {
  728. dodecl(xdecl, lastclass, lasttype, Z);
  729. } break;
  730. case 5:
  731. #line 79 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  732. {
  733. lastdcl = T;
  734. firstarg = S;
  735. dodecl(xdecl, lastclass, lasttype, yypt[-0].yyv.node);
  736. if(lastdcl == T || lastdcl->etype != TFUNC) {
  737. diag(yypt[-0].yyv.node, "not a function");
  738. lastdcl = types[TFUNC];
  739. }
  740. thisfn = lastdcl;
  741. markdcl();
  742. firstdcl = dclstack;
  743. argmark(yypt[-0].yyv.node, 0);
  744. } break;
  745. case 6:
  746. #line 93 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  747. {
  748. argmark(yypt[-2].yyv.node, 1);
  749. } break;
  750. case 7:
  751. #line 97 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  752. {
  753. Node *n;
  754. n = revertdcl();
  755. if(n)
  756. yypt[-0].yyv.node = new(OLIST, n, yypt[-0].yyv.node);
  757. if(!debug['a'] && !debug['Z'])
  758. codgen(yypt[-0].yyv.node, yypt[-4].yyv.node);
  759. } break;
  760. case 8:
  761. #line 109 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  762. {
  763. dodecl(xdecl, lastclass, lasttype, yypt[-0].yyv.node);
  764. } break;
  765. case 9:
  766. #line 113 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  767. {
  768. yypt[-0].yyv.node = dodecl(xdecl, lastclass, lasttype, yypt[-0].yyv.node);
  769. } break;
  770. case 10:
  771. #line 117 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  772. {
  773. doinit(yypt[-3].yyv.node->sym, yypt[-3].yyv.node->type, 0L, yypt[-0].yyv.node);
  774. } break;
  775. case 13:
  776. #line 125 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  777. {
  778. yyval.node = new(OIND, yypt[-0].yyv.node, Z);
  779. yyval.node->garb = simpleg(yypt[-1].yyv.lval);
  780. } break;
  781. case 15:
  782. #line 133 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  783. {
  784. yyval.node = yypt[-1].yyv.node;
  785. } break;
  786. case 16:
  787. #line 137 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  788. {
  789. yyval.node = new(OFUNC, yypt[-3].yyv.node, yypt[-1].yyv.node);
  790. } break;
  791. case 17:
  792. #line 141 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  793. {
  794. yyval.node = new(OARRAY, yypt[-3].yyv.node, yypt[-1].yyv.node);
  795. } break;
  796. case 18:
  797. #line 149 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  798. {
  799. yyval.node = Z;
  800. } break;
  801. case 19:
  802. #line 153 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  803. {
  804. yyval.node = dodecl(adecl, lastclass, lasttype, Z);
  805. if(yypt[-2].yyv.node != Z)
  806. if(yyval.node != Z)
  807. yyval.node = new(OLIST, yypt[-2].yyv.node, yyval.node);
  808. else
  809. yyval.node = yypt[-2].yyv.node;
  810. } break;
  811. case 20:
  812. #line 162 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  813. {
  814. yyval.node = yypt[-3].yyv.node;
  815. if(yypt[-1].yyv.node != Z) {
  816. yyval.node = yypt[-1].yyv.node;
  817. if(yypt[-3].yyv.node != Z)
  818. yyval.node = new(OLIST, yypt[-3].yyv.node, yypt[-1].yyv.node);
  819. }
  820. } break;
  821. case 21:
  822. #line 173 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  823. {
  824. dodecl(adecl, lastclass, lasttype, yypt[-0].yyv.node);
  825. yyval.node = Z;
  826. } break;
  827. case 22:
  828. #line 178 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  829. {
  830. yypt[-0].yyv.node = dodecl(adecl, lastclass, lasttype, yypt[-0].yyv.node);
  831. } break;
  832. case 23:
  833. #line 182 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  834. {
  835. long w;
  836. w = yypt[-3].yyv.node->sym->type->width;
  837. yyval.node = doinit(yypt[-3].yyv.node->sym, yypt[-3].yyv.node->type, 0L, yypt[-0].yyv.node);
  838. yyval.node = contig(yypt[-3].yyv.node->sym, yyval.node, w);
  839. } break;
  840. case 24:
  841. #line 190 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  842. {
  843. yyval.node = yypt[-2].yyv.node;
  844. if(yypt[-0].yyv.node != Z) {
  845. yyval.node = yypt[-0].yyv.node;
  846. if(yypt[-2].yyv.node != Z)
  847. yyval.node = new(OLIST, yypt[-2].yyv.node, yypt[-0].yyv.node);
  848. }
  849. } break;
  850. case 27:
  851. #line 207 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  852. {
  853. dodecl(pdecl, lastclass, lasttype, yypt[-0].yyv.node);
  854. } break;
  855. case 29:
  856. #line 217 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  857. {
  858. lasttype = yypt[-0].yyv.type;
  859. } break;
  860. case 31:
  861. #line 222 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  862. {
  863. lasttype = yypt[-0].yyv.type;
  864. } break;
  865. case 33:
  866. #line 228 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  867. {
  868. lastfield = 0;
  869. edecl(CXXX, lasttype, S);
  870. } break;
  871. case 35:
  872. #line 236 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  873. {
  874. dodecl(edecl, CXXX, lasttype, yypt[-0].yyv.node);
  875. } break;
  876. case 37:
  877. #line 243 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  878. {
  879. lastbit = 0;
  880. firstbit = 1;
  881. } break;
  882. case 38:
  883. #line 248 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  884. {
  885. yyval.node = new(OBIT, yypt[-2].yyv.node, yypt[-0].yyv.node);
  886. } break;
  887. case 39:
  888. #line 252 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  889. {
  890. yyval.node = new(OBIT, Z, yypt[-0].yyv.node);
  891. } break;
  892. case 40:
  893. #line 260 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  894. {
  895. yyval.node = (Z);
  896. } break;
  897. case 42:
  898. #line 267 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  899. {
  900. yyval.node = new(OIND, (Z), Z);
  901. yyval.node->garb = simpleg(yypt[-0].yyv.lval);
  902. } break;
  903. case 43:
  904. #line 272 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  905. {
  906. yyval.node = new(OIND, yypt[-0].yyv.node, Z);
  907. yyval.node->garb = simpleg(yypt[-1].yyv.lval);
  908. } break;
  909. case 46:
  910. #line 281 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  911. {
  912. yyval.node = new(OFUNC, yypt[-3].yyv.node, yypt[-1].yyv.node);
  913. } break;
  914. case 47:
  915. #line 285 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  916. {
  917. yyval.node = new(OARRAY, yypt[-3].yyv.node, yypt[-1].yyv.node);
  918. } break;
  919. case 48:
  920. #line 291 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  921. {
  922. yyval.node = new(OFUNC, (Z), Z);
  923. } break;
  924. case 49:
  925. #line 295 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  926. {
  927. yyval.node = new(OARRAY, (Z), yypt[-1].yyv.node);
  928. } break;
  929. case 50:
  930. #line 299 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  931. {
  932. yyval.node = yypt[-1].yyv.node;
  933. } break;
  934. case 52:
  935. #line 306 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  936. {
  937. yyval.node = new(OINIT, invert(yypt[-1].yyv.node), Z);
  938. } break;
  939. case 53:
  940. #line 312 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  941. {
  942. yyval.node = new(OARRAY, yypt[-1].yyv.node, Z);
  943. } break;
  944. case 54:
  945. #line 316 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  946. {
  947. yyval.node = new(OELEM, Z, Z);
  948. yyval.node->sym = yypt[-0].yyv.sym;
  949. } break;
  950. case 57:
  951. #line 325 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  952. {
  953. yyval.node = new(OLIST, yypt[-2].yyv.node, yypt[-1].yyv.node);
  954. } break;
  955. case 59:
  956. #line 330 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  957. {
  958. yyval.node = new(OLIST, yypt[-1].yyv.node, yypt[-0].yyv.node);
  959. } break;
  960. case 62:
  961. #line 338 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  962. {
  963. yyval.node = new(OLIST, yypt[-1].yyv.node, yypt[-0].yyv.node);
  964. } break;
  965. case 63:
  966. #line 343 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  967. {
  968. yyval.node = Z;
  969. } break;
  970. case 64:
  971. #line 347 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  972. {
  973. yyval.node = invert(yypt[-0].yyv.node);
  974. } break;
  975. case 66:
  976. #line 355 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  977. {
  978. yyval.node = new(OPROTO, yypt[-0].yyv.node, Z);
  979. yyval.node->type = yypt[-1].yyv.type;
  980. } break;
  981. case 67:
  982. #line 360 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  983. {
  984. yyval.node = new(OPROTO, yypt[-0].yyv.node, Z);
  985. yyval.node->type = yypt[-1].yyv.type;
  986. } break;
  987. case 68:
  988. #line 365 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  989. {
  990. yyval.node = new(ODOTDOT, Z, Z);
  991. } break;
  992. case 69:
  993. #line 369 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  994. {
  995. yyval.node = new(OLIST, yypt[-2].yyv.node, yypt[-0].yyv.node);
  996. } break;
  997. case 70:
  998. #line 375 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  999. {
  1000. yyval.node = invert(yypt[-1].yyv.node);
  1001. if(yypt[-2].yyv.node != Z)
  1002. yyval.node = new(OLIST, yypt[-2].yyv.node, yyval.node);
  1003. if(yyval.node == Z)
  1004. yyval.node = new(OLIST, Z, Z);
  1005. } break;
  1006. case 71:
  1007. #line 384 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1008. {
  1009. yyval.node = Z;
  1010. } break;
  1011. case 72:
  1012. #line 388 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1013. {
  1014. yyval.node = new(OLIST, yypt[-1].yyv.node, yypt[-0].yyv.node);
  1015. } break;
  1016. case 74:
  1017. #line 395 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1018. {
  1019. yyval.node = new(OLIST, yypt[-1].yyv.node, yypt[-0].yyv.node);
  1020. } break;
  1021. case 75:
  1022. #line 401 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1023. {
  1024. yyval.node = new(OCASE, yypt[-1].yyv.node, Z);
  1025. } break;
  1026. case 76:
  1027. #line 405 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1028. {
  1029. yyval.node = new(OCASE, Z, Z);
  1030. } break;
  1031. case 77:
  1032. #line 409 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1033. {
  1034. yyval.node = new(OLABEL, dcllabel(yypt[-1].yyv.sym, 1), Z);
  1035. } break;
  1036. case 78:
  1037. #line 415 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1038. {
  1039. yyval.node = Z;
  1040. } break;
  1041. case 80:
  1042. #line 420 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1043. {
  1044. yyval.node = new(OLIST, yypt[-1].yyv.node, yypt[-0].yyv.node);
  1045. } break;
  1046. case 82:
  1047. #line 426 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1048. {
  1049. markdcl();
  1050. } break;
  1051. case 83:
  1052. #line 430 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1053. {
  1054. yyval.node = revertdcl();
  1055. if(yyval.node)
  1056. yyval.node = new(OLIST, yyval.node, yypt[-0].yyv.node);
  1057. else
  1058. yyval.node = yypt[-0].yyv.node;
  1059. } break;
  1060. case 84:
  1061. #line 438 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1062. {
  1063. yyval.node = new(OIF, yypt[-2].yyv.node, new(OLIST, yypt[-0].yyv.node, Z));
  1064. if(yypt[-0].yyv.node == Z)
  1065. warn(yypt[-2].yyv.node, "empty if body");
  1066. } break;
  1067. case 85:
  1068. #line 444 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1069. {
  1070. yyval.node = new(OIF, yypt[-4].yyv.node, new(OLIST, yypt[-2].yyv.node, yypt[-0].yyv.node));
  1071. if(yypt[-2].yyv.node == Z)
  1072. warn(yypt[-4].yyv.node, "empty if body");
  1073. if(yypt[-0].yyv.node == Z)
  1074. warn(yypt[-4].yyv.node, "empty else body");
  1075. } break;
  1076. case 86:
  1077. #line 452 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1078. {
  1079. yyval.node = new(OFOR, new(OLIST, yypt[-4].yyv.node, new(OLIST, yypt[-6].yyv.node, yypt[-2].yyv.node)), yypt[-0].yyv.node);
  1080. } break;
  1081. case 87:
  1082. #line 456 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1083. {
  1084. yyval.node = new(OWHILE, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1085. } break;
  1086. case 88:
  1087. #line 460 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1088. {
  1089. yyval.node = new(ODWHILE, yypt[-2].yyv.node, yypt[-5].yyv.node);
  1090. } break;
  1091. case 89:
  1092. #line 464 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1093. {
  1094. yyval.node = new(ORETURN, yypt[-1].yyv.node, Z);
  1095. yyval.node->type = thisfn->link;
  1096. } break;
  1097. case 90:
  1098. #line 469 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1099. {
  1100. yyval.node = new(OCONST, Z, Z);
  1101. yyval.node->vconst = 0;
  1102. yyval.node->type = types[TINT];
  1103. yypt[-2].yyv.node = new(OSUB, yyval.node, yypt[-2].yyv.node);
  1104. yyval.node = new(OCONST, Z, Z);
  1105. yyval.node->vconst = 0;
  1106. yyval.node->type = types[TINT];
  1107. yypt[-2].yyv.node = new(OSUB, yyval.node, yypt[-2].yyv.node);
  1108. yyval.node = new(OSWITCH, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1109. } break;
  1110. case 91:
  1111. #line 483 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1112. {
  1113. yyval.node = new(OBREAK, Z, Z);
  1114. } break;
  1115. case 92:
  1116. #line 487 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1117. {
  1118. yyval.node = new(OCONTINUE, Z, Z);
  1119. } break;
  1120. case 93:
  1121. #line 491 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1122. {
  1123. yyval.node = new(OGOTO, dcllabel(yypt[-1].yyv.sym, 0), Z);
  1124. } break;
  1125. case 94:
  1126. #line 495 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1127. {
  1128. yyval.node = new(OUSED, yypt[-2].yyv.node, Z);
  1129. } break;
  1130. case 95:
  1131. #line 499 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1132. {
  1133. yyval.node = new(OSET, yypt[-2].yyv.node, Z);
  1134. } break;
  1135. case 96:
  1136. #line 504 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1137. {
  1138. yyval.node = Z;
  1139. } break;
  1140. case 98:
  1141. #line 510 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1142. {
  1143. yyval.node = Z;
  1144. } break;
  1145. case 100:
  1146. #line 517 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1147. {
  1148. yyval.node = new(OCAST, yypt[-0].yyv.node, Z);
  1149. yyval.node->type = types[TLONG];
  1150. } break;
  1151. case 102:
  1152. #line 525 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1153. {
  1154. yyval.node = new(OCOMMA, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1155. } break;
  1156. case 104:
  1157. #line 532 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1158. {
  1159. yyval.node = new(OMUL, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1160. } break;
  1161. case 105:
  1162. #line 536 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1163. {
  1164. yyval.node = new(ODIV, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1165. } break;
  1166. case 106:
  1167. #line 540 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1168. {
  1169. yyval.node = new(OMOD, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1170. } break;
  1171. case 107:
  1172. #line 544 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1173. {
  1174. yyval.node = new(OADD, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1175. } break;
  1176. case 108:
  1177. #line 548 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1178. {
  1179. yyval.node = new(OSUB, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1180. } break;
  1181. case 109:
  1182. #line 552 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1183. {
  1184. yyval.node = new(OASHR, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1185. } break;
  1186. case 110:
  1187. #line 556 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1188. {
  1189. yyval.node = new(OASHL, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1190. } break;
  1191. case 111:
  1192. #line 560 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1193. {
  1194. yyval.node = new(OLT, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1195. } break;
  1196. case 112:
  1197. #line 564 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1198. {
  1199. yyval.node = new(OGT, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1200. } break;
  1201. case 113:
  1202. #line 568 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1203. {
  1204. yyval.node = new(OLE, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1205. } break;
  1206. case 114:
  1207. #line 572 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1208. {
  1209. yyval.node = new(OGE, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1210. } break;
  1211. case 115:
  1212. #line 576 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1213. {
  1214. yyval.node = new(OEQ, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1215. } break;
  1216. case 116:
  1217. #line 580 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1218. {
  1219. yyval.node = new(ONE, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1220. } break;
  1221. case 117:
  1222. #line 584 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1223. {
  1224. yyval.node = new(OAND, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1225. } break;
  1226. case 118:
  1227. #line 588 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1228. {
  1229. yyval.node = new(OXOR, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1230. } break;
  1231. case 119:
  1232. #line 592 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1233. {
  1234. yyval.node = new(OOR, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1235. } break;
  1236. case 120:
  1237. #line 596 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1238. {
  1239. yyval.node = new(OANDAND, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1240. } break;
  1241. case 121:
  1242. #line 600 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1243. {
  1244. yyval.node = new(OOROR, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1245. } break;
  1246. case 122:
  1247. #line 604 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1248. {
  1249. yyval.node = new(OCOND, yypt[-4].yyv.node, new(OLIST, yypt[-2].yyv.node, yypt[-0].yyv.node));
  1250. } break;
  1251. case 123:
  1252. #line 608 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1253. {
  1254. yyval.node = new(OAS, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1255. } break;
  1256. case 124:
  1257. #line 612 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1258. {
  1259. yyval.node = new(OASADD, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1260. } break;
  1261. case 125:
  1262. #line 616 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1263. {
  1264. yyval.node = new(OASSUB, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1265. } break;
  1266. case 126:
  1267. #line 620 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1268. {
  1269. yyval.node = new(OASMUL, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1270. } break;
  1271. case 127:
  1272. #line 624 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1273. {
  1274. yyval.node = new(OASDIV, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1275. } break;
  1276. case 128:
  1277. #line 628 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1278. {
  1279. yyval.node = new(OASMOD, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1280. } break;
  1281. case 129:
  1282. #line 632 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1283. {
  1284. yyval.node = new(OASASHL, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1285. } break;
  1286. case 130:
  1287. #line 636 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1288. {
  1289. yyval.node = new(OASASHR, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1290. } break;
  1291. case 131:
  1292. #line 640 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1293. {
  1294. yyval.node = new(OASAND, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1295. } break;
  1296. case 132:
  1297. #line 644 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1298. {
  1299. yyval.node = new(OASXOR, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1300. } break;
  1301. case 133:
  1302. #line 648 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1303. {
  1304. yyval.node = new(OASOR, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1305. } break;
  1306. case 135:
  1307. #line 655 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1308. {
  1309. yyval.node = new(OCAST, yypt[-0].yyv.node, Z);
  1310. dodecl(NODECL, CXXX, yypt[-3].yyv.type, yypt[-2].yyv.node);
  1311. yyval.node->type = lastdcl;
  1312. } break;
  1313. case 136:
  1314. #line 661 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1315. {
  1316. yyval.node = new(OSTRUCT, yypt[-1].yyv.node, Z);
  1317. dodecl(NODECL, CXXX, yypt[-5].yyv.type, yypt[-4].yyv.node);
  1318. yyval.node->type = lastdcl;
  1319. } break;
  1320. case 138:
  1321. #line 670 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1322. {
  1323. yyval.node = new(OIND, yypt[-0].yyv.node, Z);
  1324. } break;
  1325. case 139:
  1326. #line 674 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1327. {
  1328. yyval.node = new(OADDR, yypt[-0].yyv.node, Z);
  1329. } break;
  1330. case 140:
  1331. #line 678 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1332. {
  1333. yyval.node = new(OPOS, yypt[-0].yyv.node, Z);
  1334. } break;
  1335. case 141:
  1336. #line 682 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1337. {
  1338. yyval.node = new(ONEG, yypt[-0].yyv.node, Z);
  1339. } break;
  1340. case 142:
  1341. #line 686 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1342. {
  1343. yyval.node = new(ONOT, yypt[-0].yyv.node, Z);
  1344. } break;
  1345. case 143:
  1346. #line 690 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1347. {
  1348. yyval.node = new(OCOM, yypt[-0].yyv.node, Z);
  1349. } break;
  1350. case 144:
  1351. #line 694 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1352. {
  1353. yyval.node = new(OPREINC, yypt[-0].yyv.node, Z);
  1354. } break;
  1355. case 145:
  1356. #line 698 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1357. {
  1358. yyval.node = new(OPREDEC, yypt[-0].yyv.node, Z);
  1359. } break;
  1360. case 146:
  1361. #line 702 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1362. {
  1363. yyval.node = new(OSIZE, yypt[-0].yyv.node, Z);
  1364. } break;
  1365. case 147:
  1366. #line 706 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1367. {
  1368. yyval.node = new(OSIGN, yypt[-0].yyv.node, Z);
  1369. } break;
  1370. case 148:
  1371. #line 712 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1372. {
  1373. yyval.node = yypt[-1].yyv.node;
  1374. } break;
  1375. case 149:
  1376. #line 716 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1377. {
  1378. yyval.node = new(OSIZE, Z, Z);
  1379. dodecl(NODECL, CXXX, yypt[-2].yyv.type, yypt[-1].yyv.node);
  1380. yyval.node->type = lastdcl;
  1381. } break;
  1382. case 150:
  1383. #line 722 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1384. {
  1385. yyval.node = new(OSIGN, Z, Z);
  1386. dodecl(NODECL, CXXX, yypt[-2].yyv.type, yypt[-1].yyv.node);
  1387. yyval.node->type = lastdcl;
  1388. } break;
  1389. case 151:
  1390. #line 728 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1391. {
  1392. yyval.node = new(OFUNC, yypt[-3].yyv.node, Z);
  1393. if(yypt[-3].yyv.node->op == ONAME)
  1394. if(yypt[-3].yyv.node->type == T)
  1395. dodecl(xdecl, CXXX, types[TINT], yyval.node);
  1396. yyval.node->right = invert(yypt[-1].yyv.node);
  1397. } break;
  1398. case 152:
  1399. #line 736 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1400. {
  1401. yyval.node = new(OIND, new(OADD, yypt[-3].yyv.node, yypt[-1].yyv.node), Z);
  1402. } break;
  1403. case 153:
  1404. #line 740 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1405. {
  1406. yyval.node = new(ODOT, new(OIND, yypt[-2].yyv.node, Z), Z);
  1407. yyval.node->sym = yypt[-0].yyv.sym;
  1408. } break;
  1409. case 154:
  1410. #line 745 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1411. {
  1412. yyval.node = new(ODOT, yypt[-2].yyv.node, Z);
  1413. yyval.node->sym = yypt[-0].yyv.sym;
  1414. } break;
  1415. case 155:
  1416. #line 750 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1417. {
  1418. yyval.node = new(OPOSTINC, yypt[-1].yyv.node, Z);
  1419. } break;
  1420. case 156:
  1421. #line 754 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1422. {
  1423. yyval.node = new(OPOSTDEC, yypt[-1].yyv.node, Z);
  1424. } break;
  1425. case 158:
  1426. #line 759 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1427. {
  1428. yyval.node = new(OCONST, Z, Z);
  1429. yyval.node->type = types[TINT];
  1430. yyval.node->vconst = yypt[-0].yyv.vval;
  1431. } break;
  1432. case 159:
  1433. #line 765 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1434. {
  1435. yyval.node = new(OCONST, Z, Z);
  1436. yyval.node->type = types[TLONG];
  1437. yyval.node->vconst = yypt[-0].yyv.vval;
  1438. } break;
  1439. case 160:
  1440. #line 771 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1441. {
  1442. yyval.node = new(OCONST, Z, Z);
  1443. yyval.node->type = types[TUINT];
  1444. yyval.node->vconst = yypt[-0].yyv.vval;
  1445. } break;
  1446. case 161:
  1447. #line 777 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1448. {
  1449. yyval.node = new(OCONST, Z, Z);
  1450. yyval.node->type = types[TULONG];
  1451. yyval.node->vconst = yypt[-0].yyv.vval;
  1452. } break;
  1453. case 162:
  1454. #line 783 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1455. {
  1456. yyval.node = new(OCONST, Z, Z);
  1457. yyval.node->type = types[TDOUBLE];
  1458. yyval.node->fconst = yypt[-0].yyv.dval;
  1459. } break;
  1460. case 163:
  1461. #line 789 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1462. {
  1463. yyval.node = new(OCONST, Z, Z);
  1464. yyval.node->type = types[TFLOAT];
  1465. yyval.node->fconst = yypt[-0].yyv.dval;
  1466. } break;
  1467. case 164:
  1468. #line 795 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1469. {
  1470. yyval.node = new(OCONST, Z, Z);
  1471. yyval.node->type = types[TVLONG];
  1472. yyval.node->vconst = yypt[-0].yyv.vval;
  1473. } break;
  1474. case 165:
  1475. #line 801 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1476. {
  1477. yyval.node = new(OCONST, Z, Z);
  1478. yyval.node->type = types[TUVLONG];
  1479. yyval.node->vconst = yypt[-0].yyv.vval;
  1480. } break;
  1481. case 168:
  1482. #line 811 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1483. {
  1484. yyval.node = new(OSTRING, Z, Z);
  1485. yyval.node->type = typ(TARRAY, types[TCHAR]);
  1486. yyval.node->type->width = yypt[-0].yyv.sval.l + 1;
  1487. yyval.node->cstring = yypt[-0].yyv.sval.s;
  1488. yyval.node->sym = symstring;
  1489. yyval.node->etype = TARRAY;
  1490. yyval.node->class = CSTATIC;
  1491. } break;
  1492. case 169:
  1493. #line 821 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1494. {
  1495. char *s;
  1496. int n;
  1497. n = yypt[-1].yyv.node->type->width - 1;
  1498. s = alloc(n+yypt[-0].yyv.sval.l+MAXALIGN);
  1499. memcpy(s, yypt[-1].yyv.node->cstring, n);
  1500. memcpy(s+n, yypt[-0].yyv.sval.s, yypt[-0].yyv.sval.l);
  1501. s[n+yypt[-0].yyv.sval.l] = 0;
  1502. yyval.node = yypt[-1].yyv.node;
  1503. yyval.node->type->width += yypt[-0].yyv.sval.l;
  1504. yyval.node->cstring = s;
  1505. } break;
  1506. case 170:
  1507. #line 839 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1508. {
  1509. yyval.node = new(OLSTRING, Z, Z);
  1510. yyval.node->type = typ(TARRAY, types[TUSHORT]);
  1511. yyval.node->type->width = yypt[-0].yyv.sval.l + sizeof(ushort);
  1512. yyval.node->rstring = (ushort*)yypt[-0].yyv.sval.s;
  1513. yyval.node->sym = symstring;
  1514. yyval.node->etype = TARRAY;
  1515. yyval.node->class = CSTATIC;
  1516. } break;
  1517. case 171:
  1518. #line 849 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1519. {
  1520. char *s;
  1521. int n;
  1522. n = yypt[-1].yyv.node->type->width - sizeof(ushort);
  1523. s = alloc(n+yypt[-0].yyv.sval.l+MAXALIGN);
  1524. memcpy(s, yypt[-1].yyv.node->rstring, n);
  1525. memcpy(s+n, yypt[-0].yyv.sval.s, yypt[-0].yyv.sval.l);
  1526. *(ushort*)(s+n+yypt[-0].yyv.sval.l) = 0;
  1527. yyval.node = yypt[-1].yyv.node;
  1528. yyval.node->type->width += yypt[-0].yyv.sval.l;
  1529. yyval.node->rstring = (ushort*)s;
  1530. } break;
  1531. case 172:
  1532. #line 866 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1533. {
  1534. yyval.node = Z;
  1535. } break;
  1536. case 175:
  1537. #line 874 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1538. {
  1539. yyval.node = new(OLIST, yypt[-2].yyv.node, yypt[-0].yyv.node);
  1540. } break;
  1541. case 176:
  1542. #line 880 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1543. {
  1544. yyval.tyty.t1 = strf;
  1545. yyval.tyty.t2 = strl;
  1546. strf = T;
  1547. strl = T;
  1548. lastbit = 0;
  1549. firstbit = 1;
  1550. } break;
  1551. case 177:
  1552. #line 889 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1553. {
  1554. yyval.type = strf;
  1555. strf = yypt[-2].yyv.tyty.t1;
  1556. strl = yypt[-2].yyv.tyty.t2;
  1557. } break;
  1558. case 178:
  1559. #line 896 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1560. {
  1561. lastclass = CXXX;
  1562. lasttype = types[TINT];
  1563. } break;
  1564. case 180:
  1565. #line 904 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1566. {
  1567. yyval.tycl.t = yypt[-0].yyv.type;
  1568. yyval.tycl.c = CXXX;
  1569. } break;
  1570. case 181:
  1571. #line 909 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1572. {
  1573. yyval.tycl.t = simplet(yypt[-0].yyv.lval);
  1574. yyval.tycl.c = CXXX;
  1575. } break;
  1576. case 182:
  1577. #line 914 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1578. {
  1579. yyval.tycl.t = simplet(yypt[-0].yyv.lval);
  1580. yyval.tycl.c = simplec(yypt[-0].yyv.lval);
  1581. yyval.tycl.t = garbt(yyval.tycl.t, yypt[-0].yyv.lval);
  1582. } break;
  1583. case 183:
  1584. #line 920 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1585. {
  1586. yyval.tycl.t = yypt[-1].yyv.type;
  1587. yyval.tycl.c = simplec(yypt[-0].yyv.lval);
  1588. yyval.tycl.t = garbt(yyval.tycl.t, yypt[-0].yyv.lval);
  1589. if(yypt[-0].yyv.lval & ~BCLASS & ~BGARB)
  1590. diag(Z, "duplicate types given: %T and %Q", yypt[-1].yyv.type, yypt[-0].yyv.lval);
  1591. } break;
  1592. case 184:
  1593. #line 928 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1594. {
  1595. yyval.tycl.t = simplet(typebitor(yypt[-1].yyv.lval, yypt[-0].yyv.lval));
  1596. yyval.tycl.c = simplec(yypt[-0].yyv.lval);
  1597. yyval.tycl.t = garbt(yyval.tycl.t, yypt[-0].yyv.lval);
  1598. } break;
  1599. case 185:
  1600. #line 934 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1601. {
  1602. yyval.tycl.t = yypt[-1].yyv.type;
  1603. yyval.tycl.c = simplec(yypt[-2].yyv.lval);
  1604. yyval.tycl.t = garbt(yyval.tycl.t, yypt[-2].yyv.lval|yypt[-0].yyv.lval);
  1605. } break;
  1606. case 186:
  1607. #line 940 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1608. {
  1609. yyval.tycl.t = simplet(yypt[-0].yyv.lval);
  1610. yyval.tycl.c = simplec(yypt[-1].yyv.lval);
  1611. yyval.tycl.t = garbt(yyval.tycl.t, yypt[-1].yyv.lval);
  1612. } break;
  1613. case 187:
  1614. #line 946 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1615. {
  1616. yyval.tycl.t = simplet(typebitor(yypt[-1].yyv.lval, yypt[-0].yyv.lval));
  1617. yyval.tycl.c = simplec(yypt[-2].yyv.lval|yypt[-0].yyv.lval);
  1618. yyval.tycl.t = garbt(yyval.tycl.t, yypt[-2].yyv.lval|yypt[-0].yyv.lval);
  1619. } break;
  1620. case 188:
  1621. #line 954 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1622. {
  1623. yyval.type = yypt[-0].yyv.tycl.t;
  1624. if(yypt[-0].yyv.tycl.c != CXXX)
  1625. diag(Z, "illegal combination of class 4: %s", cnames[yypt[-0].yyv.tycl.c]);
  1626. } break;
  1627. case 189:
  1628. #line 962 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1629. {
  1630. lasttype = yypt[-0].yyv.tycl.t;
  1631. lastclass = yypt[-0].yyv.tycl.c;
  1632. } break;
  1633. case 190:
  1634. #line 969 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1635. {
  1636. dotag(yypt[-0].yyv.sym, TSTRUCT, 0);
  1637. yyval.type = yypt[-0].yyv.sym->suetag;
  1638. } break;
  1639. case 191:
  1640. #line 974 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1641. {
  1642. dotag(yypt[-0].yyv.sym, TSTRUCT, autobn);
  1643. } break;
  1644. case 192:
  1645. #line 978 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1646. {
  1647. yyval.type = yypt[-2].yyv.sym->suetag;
  1648. if(yyval.type->link != T)
  1649. diag(Z, "redeclare tag: %s", yypt[-2].yyv.sym->name);
  1650. yyval.type->link = yypt[-0].yyv.type;
  1651. suallign(yyval.type);
  1652. } break;
  1653. case 193:
  1654. #line 986 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1655. {
  1656. taggen++;
  1657. sprint(symb, "_%d_", taggen);
  1658. yyval.type = dotag(lookup(), TSTRUCT, autobn);
  1659. yyval.type->link = yypt[-0].yyv.type;
  1660. suallign(yyval.type);
  1661. } break;
  1662. case 194:
  1663. #line 994 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1664. {
  1665. dotag(yypt[-0].yyv.sym, TUNION, 0);
  1666. yyval.type = yypt[-0].yyv.sym->suetag;
  1667. } break;
  1668. case 195:
  1669. #line 999 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1670. {
  1671. dotag(yypt[-0].yyv.sym, TUNION, autobn);
  1672. } break;
  1673. case 196:
  1674. #line 1003 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1675. {
  1676. yyval.type = yypt[-2].yyv.sym->suetag;
  1677. if(yyval.type->link != T)
  1678. diag(Z, "redeclare tag: %s", yypt[-2].yyv.sym->name);
  1679. yyval.type->link = yypt[-0].yyv.type;
  1680. suallign(yyval.type);
  1681. } break;
  1682. case 197:
  1683. #line 1011 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1684. {
  1685. taggen++;
  1686. sprint(symb, "_%d_", taggen);
  1687. yyval.type = dotag(lookup(), TUNION, autobn);
  1688. yyval.type->link = yypt[-0].yyv.type;
  1689. suallign(yyval.type);
  1690. } break;
  1691. case 198:
  1692. #line 1019 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1693. {
  1694. dotag(yypt[-0].yyv.sym, TENUM, 0);
  1695. yyval.type = yypt[-0].yyv.sym->suetag;
  1696. if(yyval.type->link == T)
  1697. yyval.type->link = types[TINT];
  1698. yyval.type = yyval.type->link;
  1699. } break;
  1700. case 199:
  1701. #line 1027 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1702. {
  1703. dotag(yypt[-0].yyv.sym, TENUM, autobn);
  1704. } break;
  1705. case 200:
  1706. #line 1031 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1707. {
  1708. en.tenum = T;
  1709. en.cenum = T;
  1710. } break;
  1711. case 201:
  1712. #line 1036 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1713. {
  1714. yyval.type = yypt[-5].yyv.sym->suetag;
  1715. if(yyval.type->link != T)
  1716. diag(Z, "redeclare tag: %s", yypt[-5].yyv.sym->name);
  1717. if(en.tenum == T) {
  1718. diag(Z, "enum type ambiguous: %s", yypt[-5].yyv.sym->name);
  1719. en.tenum = types[TINT];
  1720. }
  1721. yyval.type->link = en.tenum;
  1722. yyval.type = en.tenum;
  1723. } break;
  1724. case 202:
  1725. #line 1048 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1726. {
  1727. en.tenum = T;
  1728. en.cenum = T;
  1729. } break;
  1730. case 203:
  1731. #line 1053 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1732. {
  1733. yyval.type = en.tenum;
  1734. } break;
  1735. case 204:
  1736. #line 1057 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1737. {
  1738. yyval.type = tcopy(yypt[-0].yyv.sym->type);
  1739. } break;
  1740. case 206:
  1741. #line 1064 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1742. {
  1743. yyval.lval = typebitor(yypt[-1].yyv.lval, yypt[-0].yyv.lval);
  1744. } break;
  1745. case 207:
  1746. #line 1069 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1747. {
  1748. yyval.lval = 0;
  1749. } break;
  1750. case 208:
  1751. #line 1073 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1752. {
  1753. yyval.lval = typebitor(yypt[-1].yyv.lval, yypt[-0].yyv.lval);
  1754. } break;
  1755. case 213:
  1756. #line 1085 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1757. {
  1758. yyval.lval = typebitor(yypt[-1].yyv.lval, yypt[-0].yyv.lval);
  1759. } break;
  1760. case 216:
  1761. #line 1095 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1762. {
  1763. doenum(yypt[-0].yyv.sym, Z);
  1764. } break;
  1765. case 217:
  1766. #line 1099 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1767. {
  1768. doenum(yypt[-2].yyv.sym, yypt[-0].yyv.node);
  1769. } break;
  1770. case 220:
  1771. #line 1106 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1772. { yyval.lval = BCHAR; } break;
  1773. case 221:
  1774. #line 1107 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1775. { yyval.lval = BSHORT; } break;
  1776. case 222:
  1777. #line 1108 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1778. { yyval.lval = BINT; } break;
  1779. case 223:
  1780. #line 1109 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1781. { yyval.lval = BLONG; } break;
  1782. case 224:
  1783. #line 1110 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1784. { yyval.lval = BSIGNED; } break;
  1785. case 225:
  1786. #line 1111 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1787. { yyval.lval = BUNSIGNED; } break;
  1788. case 226:
  1789. #line 1112 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1790. { yyval.lval = BFLOAT; } break;
  1791. case 227:
  1792. #line 1113 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1793. { yyval.lval = BDOUBLE; } break;
  1794. case 228:
  1795. #line 1114 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1796. { yyval.lval = BVOID; } break;
  1797. case 229:
  1798. #line 1117 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1799. { yyval.lval = BAUTO; } break;
  1800. case 230:
  1801. #line 1118 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1802. { yyval.lval = BSTATIC; } break;
  1803. case 231:
  1804. #line 1119 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1805. { yyval.lval = BEXTERN; } break;
  1806. case 232:
  1807. #line 1120 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1808. { yyval.lval = BTYPEDEF; } break;
  1809. case 233:
  1810. #line 1121 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1811. { yyval.lval = BTYPESTR; } break;
  1812. case 234:
  1813. #line 1122 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1814. { yyval.lval = BREGISTER; } break;
  1815. case 235:
  1816. #line 1125 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1817. { yyval.lval = BCONSTNT; } break;
  1818. case 236:
  1819. #line 1126 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1820. { yyval.lval = BVOLATILE; } break;
  1821. case 237:
  1822. #line 1130 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1823. {
  1824. yyval.node = new(ONAME, Z, Z);
  1825. if(yypt[-0].yyv.sym->class == CLOCAL)
  1826. yypt[-0].yyv.sym = mkstatic(yypt[-0].yyv.sym);
  1827. yyval.node->sym = yypt[-0].yyv.sym;
  1828. yyval.node->type = yypt[-0].yyv.sym->type;
  1829. yyval.node->etype = TVOID;
  1830. if(yyval.node->type != T)
  1831. yyval.node->etype = yyval.node->type->etype;
  1832. yyval.node->xoffset = yypt[-0].yyv.sym->offset;
  1833. yyval.node->class = yypt[-0].yyv.sym->class;
  1834. yypt[-0].yyv.sym->aused = 1;
  1835. } break;
  1836. case 238:
  1837. #line 1145 "/n/sources/plan9/sys/src/cmd/cc/cc.y"
  1838. {
  1839. yyval.node = new(ONAME, Z, Z);
  1840. yyval.node->sym = yypt[-0].yyv.sym;
  1841. yyval.node->type = yypt[-0].yyv.sym->type;
  1842. yyval.node->etype = TVOID;
  1843. if(yyval.node->type != T)
  1844. yyval.node->etype = yyval.node->type->etype;
  1845. yyval.node->xoffset = yypt[-0].yyv.sym->offset;
  1846. yyval.node->class = yypt[-0].yyv.sym->class;
  1847. } break;
  1848. }
  1849. goto yystack; /* stack new state and value */
  1850. }