parse.tab.c 85 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714
  1. /* A Bison parser, made from parse.y */
  2. #define IDENTIFIER 258
  3. #define TYPENAME 259
  4. #define SCSPEC 260
  5. #define TYPESPEC 261
  6. #define TYPEMOD 262
  7. #define CONSTANT 263
  8. #define STRING 264
  9. #define ELLIPSIS 265
  10. #define SIZEOF 266
  11. #define ENUM 267
  12. #define STRUCT 268
  13. #define UNION 269
  14. #define IF 270
  15. #define ELSE 271
  16. #define WHILE 272
  17. #define DO 273
  18. #define FOR 274
  19. #define SWITCH 275
  20. #define CASE 276
  21. #define DEFAULT 277
  22. #define BREAK 278
  23. #define CONTINUE 279
  24. #define RETURN 280
  25. #define GOTO 281
  26. #define ASM 282
  27. #define ASSIGN 283
  28. #define OROR 284
  29. #define ANDAND 285
  30. #define EQCOMPARE 286
  31. #define ARITHCOMPARE 287
  32. #define LSHIFT 288
  33. #define RSHIFT 289
  34. #define UNARY 290
  35. #define PLUSPLUS 291
  36. #define MINUSMINUS 292
  37. #define HYPERUNARY 293
  38. #define POINTSAT 294
  39. #line 25 "parse.y"
  40. #include "config.h"
  41. #include "tree.h"
  42. #include "parse.h"
  43. #include "c-tree.h"
  44. #line 34 "parse.y"
  45. typedef union {long itype; tree ttype; enum tree_code code} YYSTYPE;
  46. #line 108 "parse.y"
  47. /* the declaration found for the last IDENTIFIER token read in.
  48. yylex must look this up to detect typedefs, which get token type TYPENAME,
  49. so it is left around in case the identifier is not a typedef but is
  50. used in a context which makes it a reference to a variable. */
  51. static tree lastiddecl;
  52. tree current_function_decl, current_switch_stmt, current_block;
  53. tree current_continue_label, current_break_label;
  54. tree continue_label_stack, break_label_stack;
  55. static void pushbreak(), popbreak();
  56. static tree finish_compound_stmt();
  57. static tree make_pointer_declarator ();
  58. static tree combine_strings ();
  59. /* list of types and structure classes of the current declaration */
  60. tree current_declspecs;
  61. char *input_filename; /* file being read */
  62. #ifndef YYLTYPE
  63. typedef
  64. struct yyltype
  65. {
  66. int timestamp;
  67. int first_line;
  68. int first_column;
  69. int last_line;
  70. int last_column;
  71. char *text;
  72. }
  73. yyltype;
  74. #define YYLTYPE yyltype
  75. #endif
  76. #define YYACCEPT return(0)
  77. #define YYABORT return(1)
  78. #define YYERROR return(1)
  79. #include <stdio.h>
  80. #define YYFINAL 390
  81. #define YYFLAG -32768
  82. #define YYNTBASE 62
  83. #define YYTRANSLATE(x) (yytranslate[x])
  84. static char yytranslate[] = { 0,
  85. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  86. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  87. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  88. 2, 2, 57, 2, 2, 2, 45, 36, 2, 52,
  89. 53, 43, 41, 58, 42, 51, 44, 2, 2, 2,
  90. 2, 2, 2, 2, 2, 2, 2, 31, 54, 2,
  91. 29, 2, 30, 2, 2, 2, 2, 2, 2, 2,
  92. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  93. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  94. 59, 2, 60, 35, 2, 2, 2, 2, 2, 2,
  95. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  96. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  97. 2, 2, 61, 34, 55, 56, 2, 2, 2, 2,
  98. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  99. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  100. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  101. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  102. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  103. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  104. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  105. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  106. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  107. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  108. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  109. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  110. 2, 2, 2, 2, 2, 1, 2, 3, 4, 5,
  111. 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  112. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
  113. 26, 27, 28, 32, 33, 37, 38, 39, 40, 46,
  114. 47, 48, 49, 50
  115. };
  116. static short yyrline[] = { 0,
  117. 131, 139, 141, 141, 142, 144, 146, 147, 151, 153,
  118. 155, 157, 159, 161, 162, 163, 166, 171, 173, 174,
  119. 176, 180, 182, 183, 185, 189, 191, 192, 195, 197,
  120. 200, 202, 204, 206, 208, 210, 212, 216, 220, 223,
  121. 226, 229, 233, 235, 237, 239, 241, 243, 245, 247,
  122. 249, 251, 253, 255, 257, 259, 261, 263, 265, 267,
  123. 269, 271, 273, 275, 277, 283, 302, 303, 305, 307,
  124. 309, 311, 313, 315, 317, 319, 324, 326, 330, 332,
  125. 335, 337, 338, 339, 344, 348, 351, 353, 355, 361,
  126. 364, 366, 368, 370, 372, 378, 380, 386, 389, 391,
  127. 393, 397, 398, 399, 400, 403, 405, 408, 410, 413,
  128. 418, 419, 424, 429, 430, 435, 437, 439, 445, 448,
  129. 455, 457, 462, 465, 467, 469, 471, 473, 479, 482,
  130. 484, 486, 488, 490, 492, 494, 497, 500, 502, 504,
  131. 506, 508, 510, 512, 514, 516, 518, 522, 524, 525,
  132. 527, 530, 533, 537, 540, 541, 545, 548, 550, 559,
  133. 561, 563, 567, 570, 574, 579, 582, 585, 588, 592,
  134. 595, 597, 599, 601, 603, 605, 607, 609, 620, 622,
  135. 624, 627, 634, 642, 644, 647, 650, 654, 659, 660,
  136. 662, 664, 666, 668, 675, 677, 684, 686, 697, 704,
  137. 710, 722, 728, 737, 746, 748, 750, 752, 754, 756,
  138. 760, 763, 768, 770, 773, 777, 780, 784, 787, 792,
  139. 795
  140. };
  141. static char * yytname[] = { 0,
  142. "error","$illegal.","IDENTIFIER","TYPENAME","SCSPEC","TYPESPEC","TYPEMOD","CONSTANT","STRING","ELLIPSIS",
  143. "SIZEOF","ENUM","STRUCT","UNION","IF","ELSE","WHILE","DO","FOR","SWITCH",
  144. "CASE","DEFAULT","BREAK","CONTINUE","RETURN","GOTO","ASM","ASSIGN","'='","'?'",
  145. "':'","OROR","ANDAND","'|'","'^'","'&'","EQCOMPARE","ARITHCOMPARE","LSHIFT","RSHIFT",
  146. "'+'","'-'","'*'","'/'","'%'","UNARY","PLUSPLUS","MINUSMINUS","HYPERUNARY","POINTSAT",
  147. "'.'","'('","')'","';'","'}'","'~'","'!'","','","'['","']'",
  148. "'{'","program"
  149. };
  150. static short yyr1[] = { 0,
  151. 62, 64, 63, 65, 63, 66, 66, 66, 67, 67,
  152. 67, 67, 67, 67, 67, 67, 69, 70, 68, 68,
  153. 71, 72, 68, 68, 73, 74, 68, 68, 75, 75,
  154. 76, 76, 76, 76, 76, 76, 76, 77, 78, 78,
  155. 79, 79, 80, 80, 80, 80, 80, 80, 80, 80,
  156. 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
  157. 80, 80, 80, 80, 80, 81, 81, 81, 81, 81,
  158. 81, 81, 81, 81, 81, 81, 82, 82, 83, 83,
  159. 84, 84, 84, 84, 85, 86, 86, 86, 86, 87,
  160. 87, 87, 87, 87, 87, 88, 88, 89, 89, 89,
  161. 89, 90, 90, 90, 90, 91, 91, 92, 92, 94,
  162. 93, 93, 96, 95, 95, 97, 97, 97, 98, 98,
  163. 99, 99, 100, 100, 100, 100, 100, 100, 101, 101,
  164. 101, 101, 101, 101, 101, 101, 102, 102, 102, 102,
  165. 102, 102, 103, 102, 104, 102, 102, 105, 105, 105,
  166. 105, 106, 106, 107, 107, 107, 108, 108, 108, 109,
  167. 109, 109, 110, 110, 111, 112, 112, 113, 113, 114,
  168. 114, 114, 114, 114, 114, 114, 114, 114, 115, 115,
  169. 115, 116, 117, 118, 118, 118, 118, 118, 119, 119,
  170. 119, 119, 120, 119, 121, 119, 122, 119, 123, 119,
  171. 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
  172. 124, 124, 125, 125, 125, 126, 126, 127, 127, 128,
  173. 128
  174. };
  175. static short yyr2[] = { 0,
  176. 1, 0, 2, 0, 3, 1, 1, 5, 3, 4,
  177. 4, 2, 2, 2, 2, 1, 0, 0, 7, 4,
  178. 0, 0, 7, 4, 0, 0, 6, 3, 1, 1,
  179. 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
  180. 1, 3, 1, 2, 2, 4, 2, 4, 3, 3,
  181. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  182. 3, 3, 5, 3, 3, 1, 1, 1, 3, 3,
  183. 4, 4, 3, 3, 2, 2, 1, 2, 0, 1,
  184. 1, 1, 2, 2, 0, 4, 4, 2, 2, 1,
  185. 2, 2, 2, 2, 2, 1, 2, 1, 2, 2,
  186. 2, 1, 1, 1, 1, 1, 3, 1, 3, 0,
  187. 4, 1, 0, 4, 1, 1, 3, 4, 1, 3,
  188. 1, 1, 4, 4, 4, 4, 3, 1, 4, 4,
  189. 4, 3, 3, 4, 3, 1, 5, 4, 2, 5,
  190. 4, 2, 0, 6, 0, 5, 2, 0, 1, 3,
  191. 2, 3, 1, 0, 1, 3, 1, 3, 2, 1,
  192. 3, 2, 1, 3, 2, 0, 1, 0, 2, 3,
  193. 3, 2, 4, 4, 3, 3, 3, 2, 1, 2,
  194. 2, 2, 0, 2, 5, 4, 4, 4, 1, 2,
  195. 5, 7, 0, 6, 0, 8, 0, 10, 0, 6,
  196. 4, 3, 2, 2, 2, 3, 3, 5, 3, 1,
  197. 0, 1, 0, 1, 3, 1, 3, 2, 2, 1,
  198. 3
  199. };
  200. static short yydefact[] = { 2,
  201. 4, 0, 0, 0, 105, 96, 102, 103, 0, 0,
  202. 0, 0, 16, 3, 7, 6, 0, 85, 85, 90,
  203. 104, 5, 14, 15, 29, 30, 145, 147, 0, 139,
  204. 0, 142, 0, 136, 168, 0, 0, 108, 0, 95,
  205. 92, 93, 13, 0, 94, 97, 12, 0, 91, 0,
  206. 143, 153, 85, 98, 0, 149, 0, 0, 0, 0,
  207. 0, 0, 9, 0, 28, 113, 0, 0, 0, 128,
  208. 0, 106, 0, 121, 122, 0, 0, 163, 0, 160,
  209. 0, 99, 100, 154, 101, 0, 138, 0, 141, 0,
  210. 0, 169, 133, 132, 109, 112, 0, 0, 220, 166,
  211. 0, 214, 216, 0, 66, 67, 77, 0, 31, 33,
  212. 32, 0, 34, 35, 0, 36, 37, 135, 0, 0,
  213. 38, 41, 43, 68, 0, 26, 80, 0, 85, 85,
  214. 82, 11, 0, 20, 110, 0, 0, 0, 10, 24,
  215. 0, 0, 146, 162, 0, 0, 157, 152, 155, 150,
  216. 137, 140, 8, 0, 116, 114, 131, 168, 213, 0,
  217. 218, 219, 167, 129, 0, 130, 0, 0, 47, 44,
  218. 0, 0, 166, 0, 45, 134, 0, 0, 0, 0,
  219. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  220. 0, 0, 0, 0, 75, 76, 0, 0, 39, 0,
  221. 78, 182, 0, 83, 84, 88, 0, 89, 0, 107,
  222. 0, 18, 0, 0, 0, 127, 0, 22, 164, 161,
  223. 144, 159, 0, 0, 119, 0, 172, 0, 0, 178,
  224. 0, 213, 0, 215, 217, 221, 0, 70, 69, 168,
  225. 213, 165, 0, 42, 65, 64, 0, 62, 61, 59,
  226. 60, 58, 57, 56, 54, 55, 49, 50, 51, 52,
  227. 53, 74, 73, 0, 40, 0, 183, 27, 0, 0,
  228. 115, 111, 0, 125, 123, 124, 126, 0, 158, 156,
  229. 117, 0, 171, 170, 176, 177, 0, 175, 0, 48,
  230. 172, 46, 0, 71, 72, 184, 0, 86, 87, 19,
  231. 23, 118, 120, 173, 174, 63, 0, 66, 105, 0,
  232. 193, 195, 197, 0, 0, 0, 0, 0, 0, 0,
  233. 0, 210, 0, 0, 0, 0, 189, 179, 187, 0,
  234. 0, 0, 0, 0, 0, 0, 203, 204, 205, 0,
  235. 0, 0, 0, 190, 186, 0, 188, 181, 180, 0,
  236. 0, 0, 211, 0, 0, 202, 206, 207, 0, 209,
  237. 185, 0, 0, 0, 212, 0, 199, 201, 0, 191,
  238. 0, 0, 211, 0, 208, 0, 194, 0, 0, 200,
  239. 192, 0, 211, 196, 0, 0, 198, 0, 0, 0
  240. };
  241. static short yydefgoto[] = { 388,
  242. 1, 2, 3, 14, 15, 16, 136, 273, 141, 278,
  243. 69, 203, 323, 119, 324, 264, 121, 122, 123, 124,
  244. 126, 127, 17, 128, 129, 130, 100, 54, 71, 37,
  245. 72, 211, 38, 97, 156, 226, 96, 74, 75, 21,
  246. 81, 50, 55, 56, 148, 149, 79, 80, 174, 162,
  247. 61, 163, 326, 131, 297, 327, 328, 331, 332, 333,
  248. 374, 366, 229, 102, 103, 104
  249. };
  250. static short yypact[] = {-32768,
  251. 16, 1023, 1023, 156,-32768,-32768,-32768,-32768, 21, 30,
  252. 33, -30,-32768,-32768,-32768,-32768, 28, 653, 599,-32768,
  253. -32768,-32768,-32768,-32768,-32768,-32768,-32768, -33, 297, -21,
  254. 297, -5, 50,-32768,-32768, 28, 51,-32768, 174,-32768,
  255. -32768,-32768,-32768, 38,-32768,-32768,-32768, 28,-32768, 162,
  256. -32768,-32768, 347,-32768, 167,-32768, 297, 175, 297, 43,
  257. 58, 74,-32768, 38,-32768,-32768, 1048, 753, 211,-32768,
  258. 118,-32768, 556, -8, 5, 137, 233, 57, 14,-32768,
  259. 162,-32768,-32768, 23,-32768, 991,-32768, 187,-32768, 189,
  260. 63,-32768, 5,-32768,-32768, 95, 731, 83,-32768, 254,
  261. 85, 141,-32768, 84,-32768,-32768,-32768, 937,-32768,-32768,
  262. -32768, 966,-32768,-32768, 895,-32768,-32768,-32768, 966, 153,
  263. 161, 1054, 71, 218, 177,-32768, 464, 321, 1051, 1027,
  264. -32768,-32768, 38,-32768,-32768, 211, 1066, 782,-32768,-32768,
  265. 211, 966,-32768, 162, 149, 966, 205, 191,-32768,-32768,
  266. -32768,-32768,-32768, 731, 1054,-32768,-32768,-32768, 523, 808,
  267. -32768,-32768, 54,-32768, 580,-32768, 250, 895,-32768,-32768,
  268. 202, 236, 763, 237,-32768,-32768, 966, 966, 966, 966,
  269. 966, 966, 966, 966, 966, 966, 966, 966, 966, 966,
  270. 966, 966, 966, 966,-32768,-32768, 162, 162, 966, 966,
  271. -32768,-32768, 232,-32768,-32768,-32768, 38,-32768, 28,-32768,
  272. 731,-32768, 243, 246, 109,-32768, 240,-32768, 1054,-32768,
  273. -32768, 1054, 966, 23,-32768, 150, 40, 111, 249,-32768,
  274. 252, 863, 837,-32768,-32768,-32768, 262,-32768,-32768,-32768,
  275. 906,-32768, 966, 1054, 1054, 1054, 274, 1101, 239, 1071,
  276. 1111, 1120, 1128, 1135, 554, 554, 139, 139,-32768,-32768,
  277. -32768,-32768,-32768, 264, 161, 259, 265,-32768, 143, 144,
  278. -14,-32768, 232,-32768,-32768,-32768,-32768, 232, 1054,-32768,
  279. -32768, 702, 54,-32768,-32768,-32768, 278,-32768, 277, 363,
  280. 55,-32768, 966,-32768,-32768,-32768, 380,-32768,-32768,-32768,
  281. -32768,-32768,-32768,-32768,-32768, 1088, 197, 283, 290, 298,
  282. -32768,-32768,-32768, 303, 966, 318, 302, 304, 914, 162,
  283. 313,-32768, 336, 316, 621, 439,-32768,-32768,-32768, 966,
  284. 327, 676, 328, 966, 359, 676,-32768,-32768,-32768, 342,
  285. 354, 400, 676,-32768,-32768, 498,-32768,-32768,-32768, 360,
  286. 966, 395, 966, 361, 676,-32768,-32768,-32768, 364,-32768,
  287. -32768, 676, 365, 372,-32768, 371,-32768,-32768, 375, 410,
  288. 676, 966, 966, 676,-32768, 676,-32768, 377, 379,-32768,
  289. -32768, 381, 966,-32768, 378, 676,-32768, 438, 444,-32768
  290. };
  291. static short yypgoto[] = {-32768,
  292. -32768,-32768,-32768, 436,-32768,-32768,-32768,-32768,-32768,-32768,
  293. -32768,-32768, -4,-32768, -65,-32768, 247, -34,-32768,-32768,
  294. 49, 148, 2, -119, 261, 268, 1, -2, 242, -38,
  295. -45,-32768,-32768,-32768, -141,-32768, -32,-32768, -13, 0,
  296. -32768,-32768, 45, 366,-32768, 227, 374, 309, 299, 300,
  297. -147, -130, 147, -126,-32768, -189, 245,-32768,-32768,-32768,
  298. -32768, -334, -58,-32768, 314, 337
  299. };
  300. #define YYLAST 1180
  301. static short yytable[] = { 20,
  302. 20, 205, 120, 39, 28, 30, 32, 204, 101, 76,
  303. 227, 73, 225, 268, 66, -1, 49, 45, 95, 44,
  304. 48, 33, 62, 25, 26, 34, 70, 51, 228, 53,
  305. 34, 53, 25, 26, 77, 25, 26, 67, 379, 57,
  306. 34, 70, 34, 137, 68, 78, 92, 93, 385, 172,
  307. 138, 147, 85, 146, 84, 59, 67, 53, 60, 53,
  308. 34, 92, 155, 68, 92, 35, 20, 161, 143, 272,
  309. 35, 144, 217, 169, 36, 58, 78, 170, 214, 36,
  310. 35, 27, 158, 300, 175, 142, 53, 210, 301, 36,
  311. 29, 159, 291, 31, 231, 91, 283, 240, 160, 85,
  312. 35, 88, 172, 90, 63, 232, 241, 219, 64, 36,
  313. 228, 222, 233, 160, 247, 173, 153, 195, 196, 155,
  314. 197, 198, 199, 135, 20, 67, 94, 49, 45, 200,
  315. 207, 209, 68, 20, 266, 157, 166, 164, 20, 78,
  316. 303, 167, 244, 245, 246, 62, 248, 249, 250, 251,
  317. 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
  318. 283, 276, 232, 284, 25, 26, 167, 289, 173, 233,
  319. 270, 132, 85, 287, 65, 133, 155, -25, -25, -25,
  320. -25, 192, 193, 194, 212, -25, -25, -25, 279, 218,
  321. 139, 147, 262, 263, 64, 271, 298, 299, 165, 348,
  322. 133, 64, 66, 221, 281, 204, 144, 282, 292, 23,
  323. 24, 125, 176, 93, 5, 6, 7, 8, 177, 348,
  324. 86, 87, 9, 10, 11, 67, 201, -115, 86, 89,
  325. 202, -115, 68, 140, -25, 223, -21, -21, -21, -21,
  326. 86, 151, 86, 152, -21, -21, -21, 155, 224, 335,
  327. 202, 329, 236, 340, 238, 292, 34, 70, 306, 82,
  328. 83, 66, 18, 18, 350, 9, 10, 11, 354, 19,
  329. 19, -79, 183, 184, 185, 186, 187, 188, 189, 190,
  330. 191, 192, 193, 194, 67, 363, -115, 365, 239, 243,
  331. -115, 68, 267, -21, 20, 274, 158, 52, 275, 277,
  332. 5, 285, 7, 8, 293, 159, 378, 365, 9, 10,
  333. 11, 286, 160, -29, 290, 341, 294, 365, 295, 296,
  334. -30, 125, 20, -81, -81, -81, -81, -81, -81, -81,
  335. 304, -81, -81, -81, -81, -81, 305, -81, -81, -81,
  336. -81, -81, -81, -81, -81, -81, -81, -81, 336, 330,
  337. -148, -148, 82, 83, 334, 337, -81, 338, 9, 10,
  338. 11, -81, -81, -81, 342, 105, 343, -81, -81, 344,
  339. 106, 107, -81, 108, -81, -81, -81, -81, 351, 353,
  340. 307, -81, 308, 309, 6, 7, 8, 106, 107, 355,
  341. 108, 9, 10, 11, 310, 357, 311, 312, 313, 314,
  342. 315, 316, 317, 318, 319, 320, 321, 358, 359, 113,
  343. 114, 364, 362, 367, 115, 109, 369, 371, 116, 117,
  344. 110, 111, 112, 372, 373, 376, 113, 114, 375, 382,
  345. 386, 115, 383, 322, 384, 116, 117, 389, 22, 125,
  346. 267, 308, 26, 390, 325, 265, 106, 107, 269, 108,
  347. 280, 150, 220, 310, 145, 311, 312, 313, 314, 315,
  348. 316, 317, 318, 319, 320, 321, 237, 5, 6, 7,
  349. 8, 346, 242, 215, 109, 9, 10, 11, 235, 110,
  350. 111, 112, 0, 0, 0, 113, 114, 0, 0, 0,
  351. 115, 0, 322, 347, 116, 117, 0, 0, 125, 267,
  352. 308, 26, 0, 0, 0, 106, 107, 0, 108, 0,
  353. 0, 0, 310, 0, 311, 312, 313, 314, 315, 316,
  354. 317, 318, 319, 320, 321, 34, 5, 0, 7, 8,
  355. 0, 0, 0, 109, 9, 10, 11, 0, 110, 111,
  356. 112, 0, 0, 0, 113, 114, 0, 0, 0, 115,
  357. 0, 322, 361, 116, 117, 0, 134, 0, 267, -17,
  358. -17, -17, -17, 0, 0, 158, 0, -17, -17, -17,
  359. 349, 0, 0, 0, 159, 0, 352, 0, 0, 0,
  360. 356, 160, 0, 5, 135, 7, 8, 360, 0, 234,
  361. 349, 9, 10, 11, 190, 191, 192, 193, 194, 368,
  362. 0, 0, 5, 46, 7, 8, 370, 0, 0, -112,
  363. 9, 10, 11, -112, 0, 377, -17, 0, 380, 0,
  364. 381, 0, 0, 308, 309, 6, 7, 8, 106, 107,
  365. 387, 108, 9, 10, 11, 310, 0, 311, 312, 313,
  366. 314, 315, 316, 317, 318, 319, 320, 321, 0, 0,
  367. 0, 0, 47, 0, 0, 0, 109, 40, 41, 42,
  368. 0, 110, 111, 112, 9, 10, 11, 113, 114, 0,
  369. 0, 0, 115, 0, 322, 345, 116, 117, 308, 26,
  370. 0, 267, 0, 106, 107, 0, 108, 0, 0, 0,
  371. 310, 0, 311, 312, 313, 314, 315, 316, 317, 318,
  372. 319, 320, 321, 0, 105, 0, 43, 0, 0, 106,
  373. 107, 109, 108, 0, 0, 0, 110, 111, 112, 0,
  374. 0, 0, 113, 114, 0, 0, 0, 115, 0, 322,
  375. 0, 116, 117, 105, 0, 0, 267, 109, 106, 107,
  376. 0, 108, 110, 111, 112, 0, 0, 0, 113, 114,
  377. 0, 0, 0, 115, 0, 105, 302, 116, 117, 0,
  378. 106, 107, 154, 108, 0, 0, 109, 0, 82, 83,
  379. 0, 110, 111, 112, 9, 10, 11, 113, 114, 0,
  380. 0, 0, 115, 0, 105, 0, 116, 117, 109, 106,
  381. 107, 154, 108, 110, 111, 112, 0, 0, 0, 113,
  382. 114, 0, 0, 0, 115, 240, 0, 0, 116, 117,
  383. 105, 0, 118, 0, 241, 106, 107, 109, 108, 0,
  384. 0, 160, 110, 111, 112, 0, 0, 0, 113, 114,
  385. 0, 0, 0, 115, 0, 0, 0, 116, 117, 105,
  386. 0, 216, 0, 109, 106, 107, 0, 108, 110, 111,
  387. 112, 0, 0, 0, 113, 114, 0, 0, 0, 115,
  388. 0, 0, 0, 116, 117, 0, 5, 230, 7, 8,
  389. 0, 0, 109, 0, 9, 10, 11, 110, 111, 112,
  390. 0, 0, 0, 113, 114, 0, 0, 0, 115, 0,
  391. 0, 0, 116, 117, 0, 171, 288, 105, 5, 0,
  392. 7, 8, 106, 107, 0, 108, 9, 10, 11, 5,
  393. 0, 7, 8, 0, 0, 0, 105, 9, 10, 11,
  394. 0, 106, 107, 0, 108, 0, 0, 0, 0, 0,
  395. 109, 0, 0, 0, 0, 110, 111, 112, 0, 105,
  396. 0, 113, 114, 0, 106, 107, 115, 108, 240, 109,
  397. 116, 117, 0, 0, 110, 111, 112, 241, 0, 0,
  398. 113, 114, 0, 0, 160, 115, 0, 339, 105, 116,
  399. 117, 0, 109, 106, 107, 0, 108, 110, 111, 112,
  400. 0, 0, 0, 113, 114, 0, 0, 0, 168, 0,
  401. 0, 52, 116, 117, 5, 0, 7, 8, 0, 0,
  402. 0, 109, 9, 10, 11, 0, 110, 111, 112, 0,
  403. 0, 0, 113, 114, 0, 0, 0, 115, 0, 0,
  404. 0, 116, 117, 4, 0, -85, 5, 6, 7, 8,
  405. 5, 46, 7, 8, 9, 10, 11, 0, 9, 10,
  406. 11, 0, 0, 0, -151, -151, 0, 0, 98, 12,
  407. 99, 5, 0, 7, 8, 40, 41, 42, 0, 9,
  408. 10, 11, 9, 10, 11, -85, 213, 0, 99, 5,
  409. 0, 7, 8, 0, -85, 0, 13, 9, 10, 11,
  410. 208, 178, 179, 180, 0, 181, 182, 183, 184, 185,
  411. 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
  412. -213, 0, 0, 0, 206, 184, 185, 186, 187, 188,
  413. 189, 190, 191, 192, 193, 194, 0, 180, -213, 181,
  414. 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
  415. 192, 193, 194, 182, 183, 184, 185, 186, 187, 188,
  416. 189, 190, 191, 192, 193, 194, 185, 186, 187, 188,
  417. 189, 190, 191, 192, 193, 194, 186, 187, 188, 189,
  418. 190, 191, 192, 193, 194, 187, 188, 189, 190, 191,
  419. 192, 193, 194, 188, 189, 190, 191, 192, 193, 194
  420. };
  421. static short yycheck[] = { 2,
  422. 3, 128, 68, 17, 9, 10, 11, 127, 67, 48,
  423. 158, 44, 154, 203, 29, 0, 19, 18, 64, 18,
  424. 19, 52, 36, 3, 4, 3, 4, 61, 159, 29,
  425. 3, 31, 3, 4, 48, 3, 4, 52, 373, 61,
  426. 3, 4, 3, 52, 59, 50, 7, 61, 383, 115,
  427. 59, 84, 53, 31, 53, 61, 52, 57, 9, 59,
  428. 3, 7, 97, 59, 7, 43, 69, 100, 55, 211,
  429. 43, 58, 138, 108, 52, 31, 81, 112, 137, 52,
  430. 43, 61, 43, 273, 119, 29, 86, 133, 278, 52,
  431. 61, 52, 240, 61, 160, 53, 227, 43, 59, 100,
  432. 43, 57, 168, 59, 54, 52, 52, 142, 58, 52,
  433. 241, 146, 59, 59, 180, 115, 54, 47, 48, 154,
  434. 50, 51, 52, 29, 127, 52, 53, 130, 129, 59,
  435. 129, 130, 59, 136, 200, 53, 53, 53, 141, 144,
  436. 282, 58, 177, 178, 179, 159, 181, 182, 183, 184,
  437. 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
  438. 291, 53, 52, 53, 3, 4, 58, 233, 168, 59,
  439. 209, 54, 173, 232, 1, 58, 211, 4, 5, 6,
  440. 7, 43, 44, 45, 136, 12, 13, 14, 223, 141,
  441. 54, 224, 197, 198, 58, 209, 54, 54, 58, 326,
  442. 58, 58, 29, 55, 55, 325, 58, 58, 243, 54,
  443. 55, 1, 60, 227, 4, 5, 6, 7, 58, 346,
  444. 54, 55, 12, 13, 14, 52, 9, 54, 54, 55,
  445. 54, 58, 59, 1, 61, 31, 4, 5, 6, 7,
  446. 54, 55, 54, 55, 12, 13, 14, 282, 58, 315,
  447. 54, 55, 3, 319, 53, 290, 3, 4, 293, 6,
  448. 7, 29, 2, 3, 330, 12, 13, 14, 334, 2,
  449. 3, 61, 34, 35, 36, 37, 38, 39, 40, 41,
  450. 42, 43, 44, 45, 52, 351, 54, 353, 53, 53,
  451. 58, 59, 61, 61, 297, 53, 43, 1, 53, 60,
  452. 4, 53, 6, 7, 31, 52, 372, 373, 12, 13,
  453. 14, 60, 59, 31, 53, 320, 53, 383, 60, 55,
  454. 31, 1, 325, 3, 4, 5, 6, 7, 8, 9,
  455. 53, 11, 12, 13, 14, 15, 60, 17, 18, 19,
  456. 20, 21, 22, 23, 24, 25, 26, 27, 31, 52,
  457. 54, 55, 6, 7, 52, 54, 36, 54, 12, 13,
  458. 14, 41, 42, 43, 52, 3, 31, 47, 48, 54,
  459. 8, 9, 52, 11, 54, 55, 56, 57, 52, 52,
  460. 1, 61, 3, 4, 5, 6, 7, 8, 9, 31,
  461. 11, 12, 13, 14, 15, 54, 17, 18, 19, 20,
  462. 21, 22, 23, 24, 25, 26, 27, 54, 9, 47,
  463. 48, 17, 53, 53, 52, 36, 53, 53, 56, 57,
  464. 41, 42, 43, 52, 54, 16, 47, 48, 54, 53,
  465. 53, 52, 54, 54, 54, 56, 57, 0, 3, 1,
  466. 61, 3, 4, 0, 297, 199, 8, 9, 207, 11,
  467. 224, 86, 144, 15, 81, 17, 18, 19, 20, 21,
  468. 22, 23, 24, 25, 26, 27, 168, 4, 5, 6,
  469. 7, 325, 173, 137, 36, 12, 13, 14, 165, 41,
  470. 42, 43, -1, -1, -1, 47, 48, -1, -1, -1,
  471. 52, -1, 54, 55, 56, 57, -1, -1, 1, 61,
  472. 3, 4, -1, -1, -1, 8, 9, -1, 11, -1,
  473. -1, -1, 15, -1, 17, 18, 19, 20, 21, 22,
  474. 23, 24, 25, 26, 27, 3, 4, -1, 6, 7,
  475. -1, -1, -1, 36, 12, 13, 14, -1, 41, 42,
  476. 43, -1, -1, -1, 47, 48, -1, -1, -1, 52,
  477. -1, 54, 55, 56, 57, -1, 1, -1, 61, 4,
  478. 5, 6, 7, -1, -1, 43, -1, 12, 13, 14,
  479. 326, -1, -1, -1, 52, -1, 332, -1, -1, -1,
  480. 336, 59, -1, 4, 29, 6, 7, 343, -1, 10,
  481. 346, 12, 13, 14, 41, 42, 43, 44, 45, 355,
  482. -1, -1, 4, 5, 6, 7, 362, -1, -1, 54,
  483. 12, 13, 14, 58, -1, 371, 61, -1, 374, -1,
  484. 376, -1, -1, 3, 4, 5, 6, 7, 8, 9,
  485. 386, 11, 12, 13, 14, 15, -1, 17, 18, 19,
  486. 20, 21, 22, 23, 24, 25, 26, 27, -1, -1,
  487. -1, -1, 54, -1, -1, -1, 36, 5, 6, 7,
  488. -1, 41, 42, 43, 12, 13, 14, 47, 48, -1,
  489. -1, -1, 52, -1, 54, 55, 56, 57, 3, 4,
  490. -1, 61, -1, 8, 9, -1, 11, -1, -1, -1,
  491. 15, -1, 17, 18, 19, 20, 21, 22, 23, 24,
  492. 25, 26, 27, -1, 3, -1, 54, -1, -1, 8,
  493. 9, 36, 11, -1, -1, -1, 41, 42, 43, -1,
  494. -1, -1, 47, 48, -1, -1, -1, 52, -1, 54,
  495. -1, 56, 57, 3, -1, -1, 61, 36, 8, 9,
  496. -1, 11, 41, 42, 43, -1, -1, -1, 47, 48,
  497. -1, -1, -1, 52, -1, 3, 55, 56, 57, -1,
  498. 8, 9, 61, 11, -1, -1, 36, -1, 6, 7,
  499. -1, 41, 42, 43, 12, 13, 14, 47, 48, -1,
  500. -1, -1, 52, -1, 3, -1, 56, 57, 36, 8,
  501. 9, 61, 11, 41, 42, 43, -1, -1, -1, 47,
  502. 48, -1, -1, -1, 52, 43, -1, -1, 56, 57,
  503. 3, -1, 60, -1, 52, 8, 9, 36, 11, -1,
  504. -1, 59, 41, 42, 43, -1, -1, -1, 47, 48,
  505. -1, -1, -1, 52, -1, -1, -1, 56, 57, 3,
  506. -1, 60, -1, 36, 8, 9, -1, 11, 41, 42,
  507. 43, -1, -1, -1, 47, 48, -1, -1, -1, 52,
  508. -1, -1, -1, 56, 57, -1, 4, 60, 6, 7,
  509. -1, -1, 36, -1, 12, 13, 14, 41, 42, 43,
  510. -1, -1, -1, 47, 48, -1, -1, -1, 52, -1,
  511. -1, -1, 56, 57, -1, 1, 60, 3, 4, -1,
  512. 6, 7, 8, 9, -1, 11, 12, 13, 14, 4,
  513. -1, 6, 7, -1, -1, -1, 3, 12, 13, 14,
  514. -1, 8, 9, -1, 11, -1, -1, -1, -1, -1,
  515. 36, -1, -1, -1, -1, 41, 42, 43, -1, 3,
  516. -1, 47, 48, -1, 8, 9, 52, 11, 43, 36,
  517. 56, 57, -1, -1, 41, 42, 43, 52, -1, -1,
  518. 47, 48, -1, -1, 59, 52, -1, 54, 3, 56,
  519. 57, -1, 36, 8, 9, -1, 11, 41, 42, 43,
  520. -1, -1, -1, 47, 48, -1, -1, -1, 52, -1,
  521. -1, 1, 56, 57, 4, -1, 6, 7, -1, -1,
  522. -1, 36, 12, 13, 14, -1, 41, 42, 43, -1,
  523. -1, -1, 47, 48, -1, -1, -1, 52, -1, -1,
  524. -1, 56, 57, 1, -1, 3, 4, 5, 6, 7,
  525. 4, 5, 6, 7, 12, 13, 14, -1, 12, 13,
  526. 14, -1, -1, -1, 54, 55, -1, -1, 1, 27,
  527. 3, 4, -1, 6, 7, 5, 6, 7, -1, 12,
  528. 13, 14, 12, 13, 14, 43, 1, -1, 3, 4,
  529. -1, 6, 7, -1, 52, -1, 54, 12, 13, 14,
  530. 54, 28, 29, 30, -1, 32, 33, 34, 35, 36,
  531. 37, 38, 39, 40, 41, 42, 43, 44, 45, -1,
  532. 53, -1, -1, -1, 54, 35, 36, 37, 38, 39,
  533. 40, 41, 42, 43, 44, 45, -1, 30, 53, 32,
  534. 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
  535. 43, 44, 45, 33, 34, 35, 36, 37, 38, 39,
  536. 40, 41, 42, 43, 44, 45, 36, 37, 38, 39,
  537. 40, 41, 42, 43, 44, 45, 37, 38, 39, 40,
  538. 41, 42, 43, 44, 45, 38, 39, 40, 41, 42,
  539. 43, 44, 45, 39, 40, 41, 42, 43, 44, 45
  540. };
  541. #define YYPURE 1
  542. #line 2 "bison.simple"
  543. /* Skeleton output parser for bison,
  544. copyright (C) 1984 Bob Corbett and Richard Stallman
  545. Permission is granted to anyone to make or distribute verbatim copies of this program
  546. provided that the copyright notice and this permission notice are preserved;
  547. and provided that the recipient is not asked to waive or limit his right to
  548. redistribute copies as permitted by this permission notice;
  549. and provided that anyone possessing an executable copy
  550. is granted access to copy the source code, in machine-readable form,
  551. in some reasonable manner.
  552. Permission is granted to distribute derived works or enhanced versions of
  553. this program under the above conditions with the additional condition
  554. that the entire derivative or enhanced work
  555. must be covered by a permission notice identical to this one.
  556. Anything distributed as part of a package containing portions derived
  557. from this program, which cannot in current practice perform its function usefully
  558. in the absense of what was derived directly from this program,
  559. is to be considered as forming, together with the latter,
  560. a single work derived from this program,
  561. which must be entirely covered by a permission notice identical to this one
  562. in order for distribution of the package to be permitted.
  563. In other words, you are welcome to use, share and improve this program.
  564. You are forbidden to forbid anyone else to use, share and improve
  565. what you give them. Help stamp out software-hoarding! */
  566. /* This is the parser code that is written into each bison parser
  567. when the %semantic_parser declaration is not specified in the grammar.
  568. It was written by Richard Stallman by simplifying the hairy parser
  569. used when %semantic_parser is specified. */
  570. /* Note: there must be only one dollar sign in this file.
  571. It is replaced by the list of actions, each action
  572. as one case of the switch. */
  573. #define yyerrok (yyerrstatus = 0)
  574. #define yyclearin (yychar = YYEMPTY)
  575. #define YYEMPTY -2
  576. #define YYEOF 0
  577. #define YYFAIL goto yyerrlab;
  578. #define YYTERROR 1
  579. #ifndef YYIMPURE
  580. #define YYLEX yylex()
  581. #endif
  582. #ifndef YYPURE
  583. #define YYLEX yylex(&yylval, &yylloc)
  584. #endif
  585. /* If nonreentrant, generate the variables here */
  586. #ifndef YYIMPURE
  587. int yychar; /* the lookahead symbol */
  588. YYSTYPE yylval; /* the semantic value of the */
  589. /* lookahead symbol */
  590. YYLTYPE yylloc; /* location data for the lookahead */
  591. /* symbol */
  592. int yydebug = 0; /* nonzero means print parse trace */
  593. #endif /* YYIMPURE */
  594. /* YYMAXDEPTH indicates the initial size of the parser's stacks */
  595. #ifndef YYMAXDEPTH
  596. #define YYMAXDEPTH 200
  597. #endif
  598. /* YYMAXLIMIT is the maximum size the stacks can grow to
  599. (effective only if the built-in stack extension method is used). */
  600. #ifndef YYMAXLIMIT
  601. #define YYMAXLIMIT 10000
  602. #endif
  603. #line 87 "bison.simple"
  604. int
  605. yyparse()
  606. {
  607. register int yystate;
  608. register int yyn;
  609. register short *yyssp;
  610. register YYSTYPE *yyvsp;
  611. YYLTYPE *yylsp;
  612. int yyerrstatus; /* number of tokens to shift before error messages enabled */
  613. int yychar1; /* lookahead token as an internal (translated) token number */
  614. short yyssa[YYMAXDEPTH]; /* the state stack */
  615. YYSTYPE yyvsa[YYMAXDEPTH]; /* the semantic value stack */
  616. YYLTYPE yylsa[YYMAXDEPTH]; /* the location stack */
  617. short *yyss = yyssa; /* refer to the stacks thru separate pointers */
  618. YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
  619. YYLTYPE *yyls = yylsa;
  620. int yymaxdepth = YYMAXDEPTH;
  621. #ifndef YYPURE
  622. int yychar;
  623. YYSTYPE yylval;
  624. YYLTYPE yylloc;
  625. extern int yydebug;
  626. #endif
  627. YYSTYPE yyval; /* the variable used to return */
  628. /* semantic values from the action */
  629. /* routines */
  630. int yylen;
  631. if (yydebug)
  632. fprintf(stderr, "Starting parse\n");
  633. yystate = 0;
  634. yyerrstatus = 0;
  635. yychar = YYEMPTY; /* Cause a token to be read. */
  636. /* Initialize stack pointers.
  637. Waste one element of value and location stack
  638. so that they stay on the same level as the state stack. */
  639. yyssp = yyss - 1;
  640. yyvsp = yyvs;
  641. yylsp = yyls;
  642. /* Push a new state, which is found in yystate . */
  643. /* In all cases, when you get here, the value and location stacks
  644. have just been pushed. so pushing a state here evens the stacks. */
  645. yynewstate:
  646. *++yyssp = yystate;
  647. if (yyssp >= yyss + yymaxdepth - 1)
  648. {
  649. /* Give user a chance to reallocate the stack */
  650. /* Use copies of these so that the &'s don't force the real ones into memory. */
  651. YYSTYPE *yyvs1 = yyvs;
  652. YYLTYPE *yyls1 = yyls;
  653. short *yyss1 = yyss;
  654. /* Get the current used size of the three stacks, in elements. */
  655. int size = yyssp - yyss + 1;
  656. #ifdef yyoverflow
  657. /* Each stack pointer address is followed by the size of
  658. the data in use in that stack, in bytes. */
  659. yyoverflow("parser stack overflow",
  660. &yyss1, size * sizeof (*yyssp),
  661. &yyvs1, size * sizeof (*yyvsp),
  662. &yyls1, size * sizeof (*yylsp),
  663. &yymaxdepth);
  664. yyss = yyss1; yyvs = yyvs1; yyls = yyls1;
  665. #else /* no yyoverflow */
  666. /* Extend the stack our own way. */
  667. if (yymaxdepth >= YYMAXLIMIT)
  668. yyerror("parser stack overflow");
  669. yymaxdepth *= 2;
  670. if (yymaxdepth > YYMAXLIMIT)
  671. yymaxdepth = YYMAXLIMIT;
  672. yyss = (short *) alloca (yymaxdepth * sizeof (*yyssp));
  673. bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
  674. yyls = (YYLTYPE *) alloca (yymaxdepth * sizeof (*yylsp));
  675. bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
  676. yyvs = (YYSTYPE *) alloca (yymaxdepth * sizeof (*yyvsp));
  677. bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
  678. #endif /* no yyoverflow */
  679. yyssp = yyss + size - 1;
  680. yylsp = yyls + size - 1;
  681. yyvsp = yyvs + size - 1;
  682. if (yydebug)
  683. fprintf(stderr, "Stack size increased to %d\n", yymaxdepth);
  684. if (yyssp >= yyss + yymaxdepth - 1)
  685. YYERROR;
  686. }
  687. if (yydebug)
  688. fprintf(stderr, "Entering state %d\n", yystate);
  689. /* Do appropriate processing given the current state. */
  690. /* Read a lookahead token if we need one and don't already have one. */
  691. yyresume:
  692. /* First try to decide what to do without reference to lookahead token. */
  693. yyn = yypact[yystate];
  694. if (yyn == YYFLAG)
  695. goto yydefault;
  696. /* Not known => get a lookahead token if don't already have one. */
  697. /* yychar is either YYEMPTY or YYEOF
  698. or a valid token in external form. */
  699. if (yychar == YYEMPTY)
  700. {
  701. yychar = YYLEX;
  702. }
  703. /* Convert token to internal form (in yychar1) for indexing tables with */
  704. if (yychar <= 0) /* This means end of input. */
  705. {
  706. yychar1 = 0;
  707. yychar = YYEOF; /* Don't call YYLEX any more */
  708. if (yydebug)
  709. fprintf(stderr, "Now at end of input.\n");
  710. }
  711. else
  712. {
  713. yychar1 = YYTRANSLATE(yychar);
  714. if (yydebug)
  715. fprintf(stderr, "Parsing next token; it is %d (%s)\n", yychar, yytname[yychar1]);
  716. }
  717. yyn += yychar1;
  718. if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
  719. goto yydefault;
  720. yyn = yytable[yyn];
  721. /* yyn is what to do for this token type in this state.
  722. Negative => reduce, -yyn is rule number.
  723. Positive => shift, yyn is new state.
  724. New state is final state => don't bother to shift,
  725. just return success.
  726. 0, or most negative number => error. */
  727. if (yyn < 0)
  728. {
  729. if (yyn == YYFLAG)
  730. goto yyerrlab;
  731. yyn = -yyn;
  732. goto yyreduce;
  733. }
  734. else if (yyn == 0)
  735. goto yyerrlab;
  736. if (yyn == YYFINAL)
  737. YYACCEPT;
  738. /* Shift the lookahead token. */
  739. if (yydebug)
  740. fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
  741. /* Discard the token being shifted unless it is eof. */
  742. if (yychar != YYEOF)
  743. yychar = YYEMPTY;
  744. *++yyvsp = yylval;
  745. *++yylsp = yylloc;
  746. /* count tokens shifted since error; after three, turn off error status. */
  747. if (yyerrstatus) yyerrstatus--;
  748. yystate = yyn;
  749. goto yynewstate;
  750. /* Do the default action for the current state. */
  751. yydefault:
  752. yyn = yydefact[yystate];
  753. if (yyn == 0)
  754. goto yyerrlab;
  755. /* Do a reduction. yyn is the number of a rule to reduce with. */
  756. yyreduce:
  757. yylen = yyr2[yyn];
  758. yyval = yyvsp[1-yylen]; /* implement default value of the action */
  759. if (yydebug)
  760. {
  761. if (yylen == 1)
  762. fprintf (stderr, "Reducing 1 value via line %d, ",
  763. yyrline[yyn]);
  764. else
  765. fprintf (stderr, "Reducing %d values via line %d, ",
  766. yylen, yyrline[yyn]);
  767. }
  768. switch (yyn) {
  769. case 2:
  770. #line 140 "parse.y"
  771. {yyval.ttype = NULL_TREE;
  772. break;}
  773. case 4:
  774. #line 141 "parse.y"
  775. {yyval.ttype = NULL_TREE;
  776. break;}
  777. case 8:
  778. #line 148 "parse.y"
  779. { assemble_asm (yyvsp[-2].ttype); ;
  780. break;}
  781. case 10:
  782. #line 154 "parse.y"
  783. {;
  784. break;}
  785. case 11:
  786. #line 156 "parse.y"
  787. {;
  788. break;}
  789. case 12:
  790. #line 158 "parse.y"
  791. { yyerror ("empty declaration"); ;
  792. break;}
  793. case 13:
  794. #line 160 "parse.y"
  795. { shadow_tag (yyvsp[-1].ttype); ;
  796. break;}
  797. case 17:
  798. #line 168 "parse.y"
  799. { if (! start_function (yyvsp[-2].ttype, yyvsp[0].ttype))
  800. YYFAIL; ;
  801. break;}
  802. case 18:
  803. #line 171 "parse.y"
  804. { store_parm_decls (); ;
  805. break;}
  806. case 19:
  807. #line 173 "parse.y"
  808. { finish_function (input_filename, yylsp[0].first_line, yyvsp[0].ttype); ;
  809. break;}
  810. case 20:
  811. #line 175 "parse.y"
  812. { ;
  813. break;}
  814. case 21:
  815. #line 177 "parse.y"
  816. { if (! start_function (yyvsp[-2].ttype, yyvsp[0].ttype))
  817. YYFAIL; ;
  818. break;}
  819. case 22:
  820. #line 180 "parse.y"
  821. { store_parm_decls (); ;
  822. break;}
  823. case 23:
  824. #line 182 "parse.y"
  825. { finish_function (input_filename, yylsp[0].first_line, yyvsp[0].ttype); ;
  826. break;}
  827. case 24:
  828. #line 184 "parse.y"
  829. { ;
  830. break;}
  831. case 25:
  832. #line 186 "parse.y"
  833. { if (! start_function (0, yyvsp[0].ttype))
  834. YYFAIL; ;
  835. break;}
  836. case 26:
  837. #line 189 "parse.y"
  838. { store_parm_decls (); ;
  839. break;}
  840. case 27:
  841. #line 191 "parse.y"
  842. { finish_function (input_filename, yylsp[0].first_line, yyvsp[0].ttype); ;
  843. break;}
  844. case 31:
  845. #line 201 "parse.y"
  846. { yyval.code = ADDR_EXPR; ;
  847. break;}
  848. case 32:
  849. #line 203 "parse.y"
  850. { yyval.code = NEGATE_EXPR; ;
  851. break;}
  852. case 33:
  853. #line 205 "parse.y"
  854. { yyval.code = CONVERT_EXPR; ;
  855. break;}
  856. case 34:
  857. #line 207 "parse.y"
  858. { yyval.code = PREINCREMENT_EXPR; ;
  859. break;}
  860. case 35:
  861. #line 209 "parse.y"
  862. { yyval.code = PREDECREMENT_EXPR; ;
  863. break;}
  864. case 36:
  865. #line 211 "parse.y"
  866. { yyval.code = BIT_NOT_EXPR; ;
  867. break;}
  868. case 37:
  869. #line 213 "parse.y"
  870. { yyval.code = TRUTH_NOT_EXPR; ;
  871. break;}
  872. case 38:
  873. #line 217 "parse.y"
  874. { yyval.ttype = build_compound_expr(yyvsp[0].ttype); ;
  875. break;}
  876. case 39:
  877. #line 222 "parse.y"
  878. { yyval.ttype = NULL_TREE; ;
  879. break;}
  880. case 41:
  881. #line 228 "parse.y"
  882. { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
  883. break;}
  884. case 42:
  885. #line 230 "parse.y"
  886. { chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
  887. break;}
  888. case 44:
  889. #line 236 "parse.y"
  890. { yyval.ttype = build_indirect_ref (yyvsp[0].ttype); ;
  891. break;}
  892. case 45:
  893. #line 238 "parse.y"
  894. { yyval.ttype = build_unary_op (yyvsp[-1].code, yyvsp[0].ttype, 0); ;
  895. break;}
  896. case 46:
  897. #line 240 "parse.y"
  898. { yyval.ttype = build_c_cast (groktypename(yyvsp[-2].ttype), yyvsp[0].ttype); ;
  899. break;}
  900. case 47:
  901. #line 242 "parse.y"
  902. { yyval.ttype = c_sizeof (TREE_TYPE (yyvsp[0].ttype)); ;
  903. break;}
  904. case 48:
  905. #line 244 "parse.y"
  906. { yyval.ttype = c_sizeof (groktypename(yyvsp[-1].ttype)); ;
  907. break;}
  908. case 49:
  909. #line 246 "parse.y"
  910. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  911. break;}
  912. case 50:
  913. #line 248 "parse.y"
  914. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  915. break;}
  916. case 51:
  917. #line 250 "parse.y"
  918. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  919. break;}
  920. case 52:
  921. #line 252 "parse.y"
  922. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  923. break;}
  924. case 53:
  925. #line 254 "parse.y"
  926. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  927. break;}
  928. case 54:
  929. #line 256 "parse.y"
  930. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  931. break;}
  932. case 55:
  933. #line 258 "parse.y"
  934. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  935. break;}
  936. case 56:
  937. #line 260 "parse.y"
  938. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  939. break;}
  940. case 57:
  941. #line 262 "parse.y"
  942. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  943. break;}
  944. case 58:
  945. #line 264 "parse.y"
  946. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  947. break;}
  948. case 59:
  949. #line 266 "parse.y"
  950. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  951. break;}
  952. case 60:
  953. #line 268 "parse.y"
  954. { yyval.ttype = build_binary_op (yyvsp[-1].code, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  955. break;}
  956. case 61:
  957. #line 270 "parse.y"
  958. { yyval.ttype = build_binary_op (TRUTH_ANDIF_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  959. break;}
  960. case 62:
  961. #line 272 "parse.y"
  962. { yyval.ttype = build_binary_op (TRUTH_ORIF_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  963. break;}
  964. case 63:
  965. #line 274 "parse.y"
  966. { yyval.ttype = build_conditional_expr(yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ;
  967. break;}
  968. case 64:
  969. #line 276 "parse.y"
  970. { yyval.ttype = build_modify_expr(yyvsp[-2].ttype, yyvsp[0].ttype); ;
  971. break;}
  972. case 65:
  973. #line 278 "parse.y"
  974. { register tree tem
  975. = duplicate_reference (yyvsp[-2].ttype);
  976. yyval.ttype = build_modify_expr(tem, build_binary_op (yyvsp[-1].code, tem, yyvsp[0].ttype)); ;
  977. break;}
  978. case 66:
  979. #line 285 "parse.y"
  980. { yyval.ttype = lastiddecl;
  981. if (!yyval.ttype)
  982. {
  983. if (yychar == YYEMPTY)
  984. yychar = YYLEX;
  985. if (yychar == '(')
  986. yyval.ttype = implicitly_declare(yyvsp[0].ttype);
  987. else
  988. {
  989. yyerror("variable %s used but not declared",
  990. IDENTIFIER_POINTER (yyvsp[0].ttype));
  991. yyval.ttype = error_mark_node;
  992. }
  993. }
  994. if (TREE_CODE (yyval.ttype) == CONST_DECL)
  995. yyval.ttype = DECL_INITIAL (yyval.ttype);
  996. ;
  997. break;}
  998. case 68:
  999. #line 304 "parse.y"
  1000. { yyval.ttype = combine_strings (yyvsp[0].ttype); ;
  1001. break;}
  1002. case 69:
  1003. #line 306 "parse.y"
  1004. { yyval.ttype = yyvsp[-1].ttype; ;
  1005. break;}
  1006. case 70:
  1007. #line 308 "parse.y"
  1008. { yyval.ttype = error_mark_node; ;
  1009. break;}
  1010. case 71:
  1011. #line 310 "parse.y"
  1012. { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1013. break;}
  1014. case 72:
  1015. #line 312 "parse.y"
  1016. { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1017. break;}
  1018. case 73:
  1019. #line 314 "parse.y"
  1020. { yyval.ttype = build_component_ref(yyvsp[-2].ttype, yyvsp[0].ttype); ;
  1021. break;}
  1022. case 74:
  1023. #line 316 "parse.y"
  1024. { yyval.ttype = build_component_ref(build_indirect_ref (yyvsp[-2].ttype), yyvsp[0].ttype); ;
  1025. break;}
  1026. case 75:
  1027. #line 318 "parse.y"
  1028. { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ;
  1029. break;}
  1030. case 76:
  1031. #line 320 "parse.y"
  1032. { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ;
  1033. break;}
  1034. case 78:
  1035. #line 327 "parse.y"
  1036. { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ;
  1037. break;}
  1038. case 85:
  1039. #line 345 "parse.y"
  1040. { current_declspecs = yyvsp[0].ttype; ;
  1041. break;}
  1042. case 86:
  1043. #line 350 "parse.y"
  1044. {;
  1045. break;}
  1046. case 87:
  1047. #line 352 "parse.y"
  1048. {;
  1049. break;}
  1050. case 88:
  1051. #line 354 "parse.y"
  1052. { shadow_tag (yyvsp[-1].ttype); ;
  1053. break;}
  1054. case 89:
  1055. #line 356 "parse.y"
  1056. { warning ("empty declaration"); ;
  1057. break;}
  1058. case 90:
  1059. #line 363 "parse.y"
  1060. { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
  1061. break;}
  1062. case 91:
  1063. #line 365 "parse.y"
  1064. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1065. break;}
  1066. case 92:
  1067. #line 367 "parse.y"
  1068. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1069. break;}
  1070. case 93:
  1071. #line 369 "parse.y"
  1072. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1073. break;}
  1074. case 94:
  1075. #line 371 "parse.y"
  1076. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1077. break;}
  1078. case 95:
  1079. #line 373 "parse.y"
  1080. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1081. break;}
  1082. case 96:
  1083. #line 379 "parse.y"
  1084. { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
  1085. break;}
  1086. case 97:
  1087. #line 381 "parse.y"
  1088. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1089. break;}
  1090. case 98:
  1091. #line 388 "parse.y"
  1092. { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
  1093. break;}
  1094. case 99:
  1095. #line 390 "parse.y"
  1096. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1097. break;}
  1098. case 100:
  1099. #line 392 "parse.y"
  1100. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1101. break;}
  1102. case 101:
  1103. #line 394 "parse.y"
  1104. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1105. break;}
  1106. case 110:
  1107. #line 415 "parse.y"
  1108. { yyval.ttype = start_decl (yyvsp[-1].ttype, current_declspecs, 1); ;
  1109. break;}
  1110. case 111:
  1111. #line 418 "parse.y"
  1112. { finish_decl (input_filename, yylsp[-3].first_line, yyvsp[-1].ttype, yyvsp[0].ttype); ;
  1113. break;}
  1114. case 112:
  1115. #line 420 "parse.y"
  1116. { tree d = start_decl (yyvsp[0].ttype, current_declspecs, 0);
  1117. finish_decl (input_filename, yylsp[0].first_line, d, NULL_TREE); ;
  1118. break;}
  1119. case 113:
  1120. #line 426 "parse.y"
  1121. { yyval.ttype = start_decl (yyvsp[-1].ttype, current_declspecs, 1); ;
  1122. break;}
  1123. case 114:
  1124. #line 429 "parse.y"
  1125. { finish_decl (input_filename, yylsp[-3].first_line, yyvsp[-1].ttype, yyvsp[0].ttype); ;
  1126. break;}
  1127. case 115:
  1128. #line 431 "parse.y"
  1129. { tree d = start_decl (yyvsp[0].ttype, current_declspecs, 0);
  1130. finish_decl (input_filename, yylsp[0].first_line, d, NULL_TREE); ;
  1131. break;}
  1132. case 117:
  1133. #line 438 "parse.y"
  1134. { yyval.ttype = build1 (CONSTRUCTOR, nreverse (yyvsp[-1].ttype)); ;
  1135. break;}
  1136. case 118:
  1137. #line 440 "parse.y"
  1138. { yyval.ttype = build1 (CONSTRUCTOR, nreverse (yyvsp[-2].ttype)); ;
  1139. break;}
  1140. case 119:
  1141. #line 447 "parse.y"
  1142. { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
  1143. break;}
  1144. case 120:
  1145. #line 449 "parse.y"
  1146. { yyval.ttype = tree_cons (NULL, yyvsp[0].ttype, yyvsp[-2].ttype); ;
  1147. break;}
  1148. case 123:
  1149. #line 464 "parse.y"
  1150. { yyval.ttype = build2 (CALL_EXPR, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1151. break;}
  1152. case 124:
  1153. #line 466 "parse.y"
  1154. { yyval.ttype = build2 (CALL_EXPR, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1155. break;}
  1156. case 125:
  1157. #line 468 "parse.y"
  1158. { yyval.ttype = build2 (CALL_EXPR, yyvsp[-3].ttype, NULL_TREE); ;
  1159. break;}
  1160. case 126:
  1161. #line 470 "parse.y"
  1162. { yyval.ttype = build2 (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1163. break;}
  1164. case 127:
  1165. #line 472 "parse.y"
  1166. { yyval.ttype = build2 (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
  1167. break;}
  1168. case 129:
  1169. #line 481 "parse.y"
  1170. { yyval.ttype = build2 (CALL_EXPR, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1171. break;}
  1172. case 130:
  1173. #line 483 "parse.y"
  1174. { yyval.ttype = build2 (CALL_EXPR, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1175. break;}
  1176. case 131:
  1177. #line 485 "parse.y"
  1178. { yyval.ttype = build2 (CALL_EXPR, yyvsp[-3].ttype, NULL_TREE); ;
  1179. break;}
  1180. case 132:
  1181. #line 487 "parse.y"
  1182. { yyval.ttype = yyvsp[-1].ttype; ;
  1183. break;}
  1184. case 133:
  1185. #line 489 "parse.y"
  1186. { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
  1187. break;}
  1188. case 134:
  1189. #line 491 "parse.y"
  1190. { yyval.ttype = build2 (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1191. break;}
  1192. case 135:
  1193. #line 493 "parse.y"
  1194. { yyval.ttype = build2 (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
  1195. break;}
  1196. case 137:
  1197. #line 499 "parse.y"
  1198. { yyval.ttype = build_struct (RECORD_TYPE, input_filename, yylsp[-4].first_line, yyvsp[-3].ttype, yyvsp[-1].ttype, 0); ;
  1199. break;}
  1200. case 138:
  1201. #line 501 "parse.y"
  1202. { yyval.ttype = build_struct (RECORD_TYPE, input_filename, yylsp[-3].first_line, NULL_TREE, yyvsp[-1].ttype, 0); ;
  1203. break;}
  1204. case 139:
  1205. #line 503 "parse.y"
  1206. { yyval.ttype = build_struct (RECORD_TYPE, input_filename, yylsp[-1].first_line, yyvsp[0].ttype, NULL_TREE, 1); ;
  1207. break;}
  1208. case 140:
  1209. #line 505 "parse.y"
  1210. { yyval.ttype = build_struct (UNION_TYPE, input_filename, yylsp[-4].first_line, yyvsp[-3].ttype, yyvsp[-1].ttype, 0); ;
  1211. break;}
  1212. case 141:
  1213. #line 507 "parse.y"
  1214. { yyval.ttype = build_struct (UNION_TYPE, input_filename, yylsp[-3].first_line, NULL_TREE, yyvsp[-1].ttype, 0); ;
  1215. break;}
  1216. case 142:
  1217. #line 509 "parse.y"
  1218. { yyval.ttype = build_struct (UNION_TYPE, input_filename, yylsp[-1].first_line, yyvsp[0].ttype, NULL_TREE, 1); ;
  1219. break;}
  1220. case 143:
  1221. #line 511 "parse.y"
  1222. { yyval.ttype = start_enum (yyvsp[-1].ttype); ;
  1223. break;}
  1224. case 144:
  1225. #line 513 "parse.y"
  1226. { yyval.ttype = finish_enum (yyvsp[-2].ttype, nreverse (yyvsp[-1].ttype)); ;
  1227. break;}
  1228. case 145:
  1229. #line 515 "parse.y"
  1230. { yyval.ttype = start_enum (NULL_TREE); ;
  1231. break;}
  1232. case 146:
  1233. #line 517 "parse.y"
  1234. { yyval.ttype = finish_enum (yyvsp[-2].ttype, nreverse (yyvsp[-1].ttype)); ;
  1235. break;}
  1236. case 147:
  1237. #line 519 "parse.y"
  1238. { yyval.ttype = xref_enum (yyvsp[0].ttype); ;
  1239. break;}
  1240. case 148:
  1241. #line 523 "parse.y"
  1242. { yyval.ttype = NULL_TREE; ;
  1243. break;}
  1244. case 150:
  1245. #line 526 "parse.y"
  1246. { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;
  1247. break;}
  1248. case 152:
  1249. #line 532 "parse.y"
  1250. { yyval.ttype = yyvsp[0].ttype; ;
  1251. break;}
  1252. case 153:
  1253. #line 534 "parse.y"
  1254. { yyval.ttype == NULL_TREE; ;
  1255. break;}
  1256. case 154:
  1257. #line 539 "parse.y"
  1258. { yyval.ttype = NULL_TREE; ;
  1259. break;}
  1260. case 156:
  1261. #line 542 "parse.y"
  1262. { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ;
  1263. break;}
  1264. case 157:
  1265. #line 547 "parse.y"
  1266. { yyval.ttype = grokfield (input_filename, yylsp[0].first_line, yyvsp[0].ttype, current_declspecs, NULL_TREE); ;
  1267. break;}
  1268. case 158:
  1269. #line 549 "parse.y"
  1270. { yyval.ttype = grokfield (input_filename, yylsp[-2].first_line, yyvsp[-2].ttype, current_declspecs, yyvsp[0].ttype); ;
  1271. break;}
  1272. case 159:
  1273. #line 551 "parse.y"
  1274. { yyval.ttype = grokfield (input_filename, yylsp[-1].first_line, NULL_TREE, current_declspecs, yyvsp[0].ttype); ;
  1275. break;}
  1276. case 161:
  1277. #line 562 "parse.y"
  1278. { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ;
  1279. break;}
  1280. case 163:
  1281. #line 569 "parse.y"
  1282. { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ;
  1283. break;}
  1284. case 164:
  1285. #line 571 "parse.y"
  1286. { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ;
  1287. break;}
  1288. case 165:
  1289. #line 576 "parse.y"
  1290. { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
  1291. break;}
  1292. case 166:
  1293. #line 581 "parse.y"
  1294. { yyval.ttype = NULL_TREE; ;
  1295. break;}
  1296. case 168:
  1297. #line 587 "parse.y"
  1298. { yyval.ttype = NULL_TREE; ;
  1299. break;}
  1300. case 169:
  1301. #line 589 "parse.y"
  1302. { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1303. break;}
  1304. case 170:
  1305. #line 594 "parse.y"
  1306. { yyval.ttype = yyvsp[-1].ttype; ;
  1307. break;}
  1308. case 171:
  1309. #line 596 "parse.y"
  1310. { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
  1311. break;}
  1312. case 172:
  1313. #line 598 "parse.y"
  1314. { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ;
  1315. break;}
  1316. case 173:
  1317. #line 600 "parse.y"
  1318. { yyval.ttype = build2 (CALL_EXPR, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1319. break;}
  1320. case 174:
  1321. #line 602 "parse.y"
  1322. { yyval.ttype = build2 (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
  1323. break;}
  1324. case 175:
  1325. #line 604 "parse.y"
  1326. { yyval.ttype = build2 (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ;
  1327. break;}
  1328. case 176:
  1329. #line 606 "parse.y"
  1330. { yyval.ttype = build2 (CALL_EXPR, NULL_TREE, yyvsp[-1].ttype); ;
  1331. break;}
  1332. case 177:
  1333. #line 608 "parse.y"
  1334. { yyval.ttype = build2 (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ;
  1335. break;}
  1336. case 178:
  1337. #line 610 "parse.y"
  1338. { yyval.ttype = build2 (ARRAY_REF, NULL_TREE, NULL_TREE); ;
  1339. break;}
  1340. case 180:
  1341. #line 623 "parse.y"
  1342. { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); ;
  1343. break;}
  1344. case 183:
  1345. #line 635 "parse.y"
  1346. { pushlevel();
  1347. yyval.ttype = current_block;
  1348. current_block
  1349. = build_let (input_filename, 0, 0, 0, yyval.ttype, 0);
  1350. ;
  1351. break;}
  1352. case 184:
  1353. #line 643 "parse.y"
  1354. { yyval.ttype = build_compound (input_filename, yylsp[-1].first_line, 0); ;
  1355. break;}
  1356. case 185:
  1357. #line 645 "parse.y"
  1358. { yyval.ttype = finish_compound_stmt (current_block, nreverse (yyvsp[-1].ttype),
  1359. yyvsp[-3].ttype, yylsp[-4].first_line); ;
  1360. break;}
  1361. case 186:
  1362. #line 648 "parse.y"
  1363. { yyval.ttype = finish_compound_stmt (current_block, NULL_TREE,
  1364. yyvsp[-2].ttype, yylsp[-3].first_line); ;
  1365. break;}
  1366. case 187:
  1367. #line 651 "parse.y"
  1368. { yyval.ttype = error_mark_node;
  1369. current_block = yyvsp[-2].ttype;
  1370. poplevel(); ;
  1371. break;}
  1372. case 188:
  1373. #line 655 "parse.y"
  1374. { yyval.ttype = finish_compound_stmt (current_block, nreverse (yyvsp[-1].ttype), yyvsp[-2].ttype,
  1375. yylsp[-3].first_line); ;
  1376. break;}
  1377. case 190:
  1378. #line 661 "parse.y"
  1379. { yyval.ttype = build_expr_stmt (input_filename, yylsp[-1].first_line, yyvsp[-1].ttype); ;
  1380. break;}
  1381. case 191:
  1382. #line 663 "parse.y"
  1383. { yyval.ttype = build_if (input_filename, yylsp[-4].first_line, default_conversion (yyvsp[-2].ttype), yyvsp[0].ttype, 0); ;
  1384. break;}
  1385. case 192:
  1386. #line 665 "parse.y"
  1387. { yyval.ttype = build_if (input_filename, yylsp[-6].first_line, default_conversion (yyvsp[-4].ttype), yyvsp[-2].ttype, yyvsp[0].ttype); ;
  1388. break;}
  1389. case 193:
  1390. #line 667 "parse.y"
  1391. { pushbreak(1); ;
  1392. break;}
  1393. case 194:
  1394. #line 669 "parse.y"
  1395. { yyval.ttype = build_loop (input_filename, yylsp[-5].first_line,
  1396. chainon (build_exit (input_filename, yylsp[-2].first_line,
  1397. default_conversion (yyvsp[-2].ttype)),
  1398. chainon (yyvsp[0].ttype, current_continue_label)));
  1399. yyval.ttype = build_compound (input_filename, yylsp[-5].first_line, chainon (yyval.ttype, current_break_label));
  1400. popbreak(1); ;
  1401. break;}
  1402. case 195:
  1403. #line 676 "parse.y"
  1404. { pushbreak(1); ;
  1405. break;}
  1406. case 196:
  1407. #line 678 "parse.y"
  1408. { yyval.ttype = build_loop (input_filename, yylsp[-7].first_line,
  1409. chainon (yyvsp[-5].ttype, chainon(current_continue_label,
  1410. build_exit (input_filename, yylsp[-2].first_line,
  1411. default_conversion (yyvsp[-2].ttype)))));
  1412. yyval.ttype = build_compound (input_filename, yylsp[-7].first_line, chainon (yyval.ttype, current_break_label));
  1413. popbreak(1); ;
  1414. break;}
  1415. case 197:
  1416. #line 685 "parse.y"
  1417. { pushbreak(1); ;
  1418. break;}
  1419. case 198:
  1420. #line 687 "parse.y"
  1421. { yyval.ttype = build_compound (input_filename, yylsp[-9].first_line,
  1422. chainon (yyvsp[-6].ttype ? build_expr_stmt (input_filename, yylsp[-6].first_line, yyvsp[-6].ttype) : NULL_TREE,
  1423. build_loop (input_filename, yylsp[-9].first_line,
  1424. chainon (yyvsp[-4].ttype ? build_exit (input_filename, yylsp[-4].first_line,
  1425. default_conversion (yyvsp[-4].ttype))
  1426. : NULL_TREE,
  1427. chainon (chainon (yyvsp[0].ttype, current_continue_label),
  1428. yyvsp[-2].ttype ? build_expr_stmt (input_filename, yylsp[-2].first_line, yyvsp[-2].ttype) : NULL_TREE)))));
  1429. yyval.ttype = build_compound (input_filename, yylsp[-9].first_line, chainon (yyval.ttype, current_break_label));
  1430. popbreak(1); ;
  1431. break;}
  1432. case 199:
  1433. #line 698 "parse.y"
  1434. { yyval.ttype = current_switch_stmt;
  1435. pushbreak(0);
  1436. current_switch_stmt
  1437. = build_switch_stmt (input_filename, yylsp[-3].first_line,
  1438. default_conversion (yyvsp[-1].ttype)); ;
  1439. break;}
  1440. case 200:
  1441. #line 704 "parse.y"
  1442. { yyval.ttype = build_compound (input_filename, yylsp[-5].first_line,
  1443. chainon(current_switch_stmt,
  1444. chainon(yyvsp[0].ttype, current_break_label)));
  1445. finish_switch_stmt (current_switch_stmt, current_break_label);
  1446. popbreak (0);
  1447. current_switch_stmt = yyvsp[-1].ttype; ;
  1448. break;}
  1449. case 201:
  1450. #line 711 "parse.y"
  1451. { register tree value = fold(yyvsp[-2].ttype);
  1452. tree l = build_label (input_filename, yylsp[-3].first_line, NULL_TREE, current_block);
  1453. if (TREE_CODE (value) != INTEGER_CST)
  1454. {
  1455. yyerror("case label does not reduce to an integer constant");
  1456. value = error_mark_node;
  1457. }
  1458. pushcase(value, l);
  1459. yyval.ttype = build_compound (input_filename, yylsp[-3].first_line, chainon(l, yyvsp[0].ttype));
  1460. ;
  1461. break;}
  1462. case 202:
  1463. #line 723 "parse.y"
  1464. {
  1465. tree l = build_label (input_filename, yylsp[-2].first_line, 0, current_block);
  1466. pushcase(NULL_TREE, l);
  1467. yyval.ttype = build_compound (input_filename, yylsp[-2].first_line, chainon(l, yyvsp[0].ttype));
  1468. ;
  1469. break;}
  1470. case 203:
  1471. #line 729 "parse.y"
  1472. { if (current_break_label)
  1473. yyval.ttype = build_goto (input_filename, yylsp[-1].first_line, STMT_BODY (current_break_label));
  1474. else
  1475. {
  1476. yyerror("break statement not within a do, for, while or switch statement");
  1477. yyval.ttype = error_mark_node;
  1478. }
  1479. ;
  1480. break;}
  1481. case 204:
  1482. #line 738 "parse.y"
  1483. { if (current_continue_label)
  1484. yyval.ttype = build_goto (input_filename, yylsp[-1].first_line, STMT_BODY (current_continue_label));
  1485. else
  1486. {
  1487. yyerror("continue statement not within a do, for or while statement");
  1488. yyval.ttype = error_mark_node;
  1489. }
  1490. ;
  1491. break;}
  1492. case 205:
  1493. #line 747 "parse.y"
  1494. { yyval.ttype = build_return (input_filename, yylsp[-1].first_line, NULL_TREE); ;
  1495. break;}
  1496. case 206:
  1497. #line 749 "parse.y"
  1498. { yyval.ttype = build_return_stmt (input_filename, yylsp[-2].first_line, yyvsp[-1].ttype); ;
  1499. break;}
  1500. case 207:
  1501. #line 751 "parse.y"
  1502. { pushgoto(yyval.ttype = build_goto (input_filename, yylsp[-2].first_line, yyvsp[-1].ttype)); ;
  1503. break;}
  1504. case 208:
  1505. #line 753 "parse.y"
  1506. { yyval.ttype = build_asm_stmt (input_filename, yylsp[-4].first_line, yyvsp[-2].ttype); ;
  1507. break;}
  1508. case 209:
  1509. #line 755 "parse.y"
  1510. { yyval.ttype = build_compound (input_filename, yylsp[-2].first_line, chainon (build_label (input_filename, yylsp[-2].first_line, yyvsp[-2].ttype, current_block), yyvsp[0].ttype)); ;
  1511. break;}
  1512. case 210:
  1513. #line 757 "parse.y"
  1514. { yyval.ttype = build_compound (input_filename, yylsp[0].first_line, 0); ;
  1515. break;}
  1516. case 211:
  1517. #line 762 "parse.y"
  1518. { yyval.ttype = NULL_TREE; ;
  1519. break;}
  1520. case 213:
  1521. #line 769 "parse.y"
  1522. { yyval.ttype = NULL_TREE; ;
  1523. break;}
  1524. case 214:
  1525. #line 771 "parse.y"
  1526. { yyval.ttype = chainon (yyvsp[0].ttype, build_tree_list (NULL_TREE,
  1527. void_type_node)); ;
  1528. break;}
  1529. case 216:
  1530. #line 779 "parse.y"
  1531. { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
  1532. break;}
  1533. case 217:
  1534. #line 781 "parse.y"
  1535. { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
  1536. break;}
  1537. case 218:
  1538. #line 786 "parse.y"
  1539. { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype) ; ;
  1540. break;}
  1541. case 219:
  1542. #line 788 "parse.y"
  1543. { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ;
  1544. break;}
  1545. case 220:
  1546. #line 794 "parse.y"
  1547. { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ;
  1548. break;}
  1549. case 221:
  1550. #line 796 "parse.y"
  1551. { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
  1552. break;}
  1553. }
  1554. /* the action file gets copied in in place of this dollarsign */
  1555. #line 303 "bison.simple"
  1556. yyvsp -= yylen;
  1557. yylsp -= yylen;
  1558. yyssp -= yylen;
  1559. if (yydebug)
  1560. {
  1561. short *ssp1 = yyss - 1;
  1562. fprintf (stderr, "state stack now", yyssp-yyss);
  1563. while (ssp1 != yyssp)
  1564. fprintf (stderr, " %d", *++ssp1);
  1565. fprintf (stderr, "\n");
  1566. }
  1567. *++yyvsp = yyval;
  1568. yylsp++;
  1569. if (yylen == 0)
  1570. {
  1571. yylsp->first_line = yylloc.first_line;
  1572. yylsp->first_column = yylloc.first_column;
  1573. yylsp->last_line = (yylsp-1)->last_line;
  1574. yylsp->last_column = (yylsp-1)->last_column;
  1575. yylsp->text = 0;
  1576. }
  1577. else
  1578. {
  1579. yylsp->last_line = (yylsp+yylen-1)->last_line;
  1580. yylsp->last_column = (yylsp+yylen-1)->last_column;
  1581. }
  1582. /* Now "shift" the result of the reduction.
  1583. Determine what state that goes to,
  1584. based on the state we popped back to
  1585. and the rule number reduced by. */
  1586. yyn = yyr1[yyn];
  1587. yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  1588. if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1589. yystate = yytable[yystate];
  1590. else
  1591. yystate = yydefgoto[yyn - YYNTBASE];
  1592. goto yynewstate;
  1593. yyerrlab: /* here on detecting error */
  1594. if (! yyerrstatus)
  1595. /* If not already recovering from an error, report this error. */
  1596. {
  1597. yyerror("parse error");
  1598. }
  1599. if (yyerrstatus == 3)
  1600. {
  1601. /* if just tried and failed to reuse lookahead token after an error, discard it. */
  1602. /* return failure if at end of input */
  1603. if (yychar == YYEOF)
  1604. YYERROR;
  1605. if (yydebug)
  1606. fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
  1607. yychar = YYEMPTY;
  1608. }
  1609. /* Else will try to reuse lookahead token
  1610. after shifting the error token. */
  1611. yyerrstatus = 3; /* Each real token shifted decrements this */
  1612. goto yyerrhandle;
  1613. yyerrdefault: /* current state does not do anything special for the error token. */
  1614. yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
  1615. if (yyn) goto yydefault;
  1616. yyerrpop: /* pop the current state because it cannot handle the error token */
  1617. if (yyssp == yyss) YYERROR;
  1618. yyvsp--;
  1619. yylsp--;
  1620. yystate = *--yyssp;
  1621. if (yydebug)
  1622. {
  1623. short *ssp1 = yyss - 1;
  1624. fprintf (stderr, "Error: state stack now", yyssp-yyss);
  1625. while (ssp1 != yyssp)
  1626. fprintf (stderr, " %d", *++ssp1);
  1627. fprintf (stderr, "\n");
  1628. }
  1629. yyerrhandle:
  1630. yyn = yypact[yystate];
  1631. if (yyn == YYFLAG)
  1632. goto yyerrdefault;
  1633. yyn += YYTERROR;
  1634. if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
  1635. goto yyerrdefault;
  1636. yyn = yytable[yyn];
  1637. if (yyn < 0)
  1638. {
  1639. if (yyn == YYFLAG)
  1640. goto yyerrpop;
  1641. yyn = -yyn;
  1642. goto yyreduce;
  1643. }
  1644. else if (yyn == 0)
  1645. goto yyerrpop;
  1646. if (yyn == YYFINAL)
  1647. YYACCEPT;
  1648. if (yydebug)
  1649. fprintf(stderr, "Shifting error token, ");
  1650. *++yyvsp = yylval;
  1651. *++yylsp = yylloc;
  1652. yystate = yyn;
  1653. goto yynewstate;
  1654. }
  1655. #line 798 "parse.y"
  1656. static tree
  1657. finish_compound_stmt(block, stmts, outer_block, line)
  1658. tree block, stmts, outer_block;
  1659. int line;
  1660. {
  1661. register tree decls = getdecls();
  1662. register tree tags = gettags ();
  1663. if (decls || tags)
  1664. {
  1665. finish_block (block, decls, tags, stmts);
  1666. poplevel();
  1667. current_block = outer_block;
  1668. STMT_SOURCE_LINE (block) = line;
  1669. return block;
  1670. }
  1671. else
  1672. {
  1673. current_block = outer_block;
  1674. poplevel();
  1675. return build_compound (input_filename, line, stmts);
  1676. }
  1677. }
  1678. static void
  1679. pushbreak(a)
  1680. int a;
  1681. {
  1682. if (current_break_label)
  1683. TREE_CHAIN (current_break_label) = break_label_stack;
  1684. break_label_stack = current_break_label;
  1685. current_break_label = build_label (0, 0, NULL_TREE, current_block);
  1686. if (a)
  1687. {
  1688. if (current_continue_label)
  1689. TREE_CHAIN (current_continue_label) = continue_label_stack;
  1690. continue_label_stack = current_continue_label;
  1691. current_continue_label = build_label (0, 0, NULL_TREE, current_block);
  1692. }
  1693. }
  1694. static void
  1695. popbreak(a)
  1696. int a;
  1697. {
  1698. current_break_label = break_label_stack;
  1699. if (current_break_label)
  1700. break_label_stack = TREE_CHAIN (break_label_stack);
  1701. if (a)
  1702. {
  1703. current_continue_label = continue_label_stack;
  1704. if (current_continue_label)
  1705. continue_label_stack = TREE_CHAIN (continue_label_stack);
  1706. }
  1707. if (current_break_label)
  1708. TREE_CHAIN (current_break_label) = NULL;
  1709. if (current_continue_label)
  1710. TREE_CHAIN (current_continue_label) = NULL;
  1711. }
  1712. /* Return something to represent absolute declarators containing a *.
  1713. TARGET is the absolute declarator that the * contains.
  1714. TYPEMODS is a list of modifiers such as const or volatile
  1715. to apply to the pointer type, represented as identifiers.
  1716. We return an INDIRECT_REF whose "contents" are TARGET
  1717. and whose type is the modifier list. */
  1718. static tree
  1719. make_pointer_declarator (typemods, target)
  1720. tree typemods, target;
  1721. {
  1722. register tree t = build1 (INDIRECT_REF, target);
  1723. TREE_TYPE (t) = typemods;
  1724. return t;
  1725. }
  1726. /* Given a chain of STRING_CST nodes,
  1727. concatenate them into one STRING_CST
  1728. and then return an ADDR_EXPR for it. */
  1729. static tree
  1730. combine_strings (strings)
  1731. tree strings;
  1732. {
  1733. register tree value, t;
  1734. if (TREE_CHAIN (strings))
  1735. {
  1736. /* More than one in the chain, so concatenate. */
  1737. register char *p, *q;
  1738. register int length = 1;
  1739. /* Don't include the \0 at the end of each substring,
  1740. except for the last one. */
  1741. for (t = strings; t; t = TREE_CHAIN (t))
  1742. length += TREE_STRING_LENGTH (t) - 1;
  1743. p = (char *) oballoc (length);
  1744. q = p;
  1745. for (t = strings; t; t = TREE_CHAIN (t))
  1746. {
  1747. bcopy (TREE_STRING_POINTER (t), q, TREE_STRING_LENGTH (t) - 1);
  1748. q += TREE_STRING_LENGTH (t) - 1;
  1749. }
  1750. *q = 0;
  1751. value = make_node (STRING_CST);
  1752. TREE_TYPE (value) = TREE_TYPE (strings);
  1753. TREE_STRING_POINTER (value) = p;
  1754. TREE_STRING_LENGTH (value) = length;
  1755. TREE_LITERAL (value) = 1;
  1756. }
  1757. else
  1758. value = strings;
  1759. value = build1 (ADDR_EXPR, value);
  1760. TREE_TYPE (value) = string_type_node;
  1761. TREE_LITERAL (value) = 1;
  1762. return value;
  1763. }
  1764. int lineno; /* current line number in file being read */
  1765. FILE *finput; /* input file.
  1766. Normally a pipe from the preprocessor. */
  1767. /* lexical analyzer */
  1768. static int maxtoken; /* Current length of token buffer */
  1769. static char *token_buffer; /* Pointer to token buffer */
  1770. /* frw[i] is index in rw of the first word whose length is i. */
  1771. #define MAXRESERVED 9
  1772. static char frw[10] =
  1773. { 0, 0, 0, 2, 5, 13, 19, 27, 29, 33 };
  1774. static char *rw[] =
  1775. { "if", "do", "int", "for", "asm",
  1776. "case", "char", "auto", "goto", "else", "long", "void", "enum",
  1777. "float", "short", "union", "break", "while", "const",
  1778. "double", "static", "extern", "struct", "return", "sizeof", "switch", "signed",
  1779. "typedef", "default",
  1780. "unsigned", "continue", "register", "volatile" };
  1781. static short rtoken[] =
  1782. { IF, DO, TYPESPEC, FOR, ASM,
  1783. CASE, TYPESPEC, SCSPEC, GOTO, ELSE, TYPESPEC, TYPESPEC, ENUM,
  1784. TYPESPEC, TYPESPEC, UNION, BREAK, WHILE, TYPEMOD,
  1785. TYPESPEC, SCSPEC, SCSPEC, STRUCT, RETURN, SIZEOF, SWITCH, TYPESPEC,
  1786. SCSPEC, DEFAULT,
  1787. TYPESPEC, CONTINUE, SCSPEC, TYPEMOD };
  1788. /* This table corresponds to rw and rtoken.
  1789. Its element is an index in ridpointers */
  1790. #define NORID (enum rid) 0
  1791. static enum rid rid[] =
  1792. { NORID, NORID, RID_INT, NORID, NORID,
  1793. NORID, RID_CHAR, RID_AUTO, NORID, NORID, RID_LONG, RID_VOID, NORID,
  1794. RID_FLOAT, RID_SHORT, NORID, NORID, NORID, RID_CONST,
  1795. RID_DOUBLE, RID_STATIC, RID_EXTERN, NORID, NORID, NORID, NORID, RID_SIGNED,
  1796. RID_TYPEDEF, NORID,
  1797. RID_UNSIGNED, NORID, RID_REGISTER, RID_VOLATILE };
  1798. /* The elements of `ridpointers' are identifier nodes
  1799. for the reserved type names and storage classes. */
  1800. tree ridpointers[(int) RID_MAX];
  1801. static tree line_identifier; /* The identifier node named "line" */
  1802. void check_newline();
  1803. void
  1804. init_lex()
  1805. {
  1806. extern char *malloc();
  1807. /* Start it at 0, because check_newline is called atthe very beginning
  1808. and will increment it to 1. */
  1809. lineno = 0;
  1810. current_function_decl = NULL;
  1811. current_switch_stmt = NULL;
  1812. current_block = NULL;
  1813. current_break_label = NULL;
  1814. current_continue_label = NULL;
  1815. break_label_stack = NULL;
  1816. continue_label_stack = NULL;
  1817. line_identifier = get_identifier("line");
  1818. maxtoken = 40;
  1819. token_buffer = malloc((unsigned)(maxtoken+1));
  1820. ridpointers[(int) RID_INT] = get_identifier("int");
  1821. ridpointers[(int) RID_CHAR] = get_identifier("char");
  1822. ridpointers[(int) RID_VOID] = get_identifier("void");
  1823. ridpointers[(int) RID_FLOAT] = get_identifier("float");
  1824. ridpointers[(int) RID_DOUBLE] = get_identifier("double");
  1825. ridpointers[(int) RID_SHORT] = get_identifier("short");
  1826. ridpointers[(int) RID_LONG] = get_identifier("long");
  1827. ridpointers[(int) RID_UNSIGNED] = get_identifier("unsigned");
  1828. ridpointers[(int) RID_SIGNED] = get_identifier("signed");
  1829. ridpointers[(int) RID_CONST] = get_identifier("const");
  1830. ridpointers[(int) RID_VOLATILE] = get_identifier("volatile");
  1831. ridpointers[(int) RID_AUTO] = get_identifier("auto");
  1832. ridpointers[(int) RID_STATIC] = get_identifier("static");
  1833. ridpointers[(int) RID_EXTERN] = get_identifier("extern");
  1834. ridpointers[(int) RID_TYPEDEF] = get_identifier("typedef");
  1835. ridpointers[(int) RID_REGISTER] = get_identifier("register");
  1836. }
  1837. static int
  1838. skip_white_space()
  1839. {
  1840. register int c;
  1841. register int inside;
  1842. c = getc(finput);
  1843. for (;;)
  1844. {
  1845. switch (c)
  1846. {
  1847. case '/':
  1848. c = getc(finput);
  1849. if (c != '*')
  1850. {
  1851. ungetc(c, finput);
  1852. return '/';
  1853. }
  1854. c = getc(finput);
  1855. inside = 1;
  1856. while (inside)
  1857. {
  1858. if (c == '*')
  1859. {
  1860. while (c == '*')
  1861. c = getc(finput);
  1862. if (c == '/')
  1863. {
  1864. inside = 0;
  1865. c = getc(finput);
  1866. }
  1867. }
  1868. else if (c == '\n')
  1869. {
  1870. lineno++;
  1871. c = getc(finput);
  1872. }
  1873. else if (c == EOF)
  1874. yyerror("unterminated comment");
  1875. else
  1876. c = getc(finput);
  1877. }
  1878. break;
  1879. case '\n':
  1880. check_newline();
  1881. case ' ':
  1882. case '\t':
  1883. case '\f':
  1884. case '\r':
  1885. case '\b':
  1886. c = getc(finput);
  1887. break;
  1888. case '\\':
  1889. c = getc(finput);
  1890. if (c == '\n')
  1891. lineno++;
  1892. else
  1893. yyerror("stray '\\' in program");
  1894. c = getc(finput);
  1895. break;
  1896. default:
  1897. return (c);
  1898. }
  1899. }
  1900. }
  1901. /* make the token buffer longer, preserving the data in it.
  1902. p should point to just beyond the last valid character in the old buffer
  1903. and the value points to the corresponding place in the new one. */
  1904. static char *
  1905. extend_token_buffer(p)
  1906. char *p;
  1907. {
  1908. register char *newbuf;
  1909. register char *value;
  1910. int newlength = maxtoken * 2 + 10;
  1911. register char *p2, *p1;
  1912. extern char *malloc();
  1913. newbuf = malloc((unsigned)(newlength+1));
  1914. p2 = newbuf;
  1915. p1 = newbuf + newlength + 1;
  1916. while (p1 != p2) *p2++ = 0;
  1917. value = newbuf;
  1918. p2 = token_buffer;
  1919. while (p2 != p)
  1920. *value++ = *p2++;
  1921. token_buffer = newbuf;
  1922. maxtoken = newlength;
  1923. return (value);
  1924. }
  1925. /* At the beginning of a line,
  1926. increment the line number
  1927. and handle a #line directive immediately following */
  1928. void
  1929. check_newline ()
  1930. {
  1931. register int c;
  1932. register int token;
  1933. while (1)
  1934. {
  1935. c = getc (finput);
  1936. lineno++;
  1937. if (c != '#')
  1938. {
  1939. /* If no #, unread the character,
  1940. except don't bother if it is whitespace. */
  1941. if (c == ' ' || c == '\t')
  1942. return;
  1943. ungetc (c, finput);
  1944. return;
  1945. }
  1946. /* Skip whitespace after the #. */
  1947. while (1)
  1948. {
  1949. c = getc (finput);
  1950. if (! (c == ' ' || c == '\t'))
  1951. break;
  1952. }
  1953. /* If the # is the only nonwhite char on the line,
  1954. just ignore it. Check the new newline. */
  1955. if (c == '\n')
  1956. continue;
  1957. /* Something follows the #; read a token. */
  1958. ungetc (c, finput);
  1959. token = yylex ();
  1960. if (token == CONSTANT
  1961. && TREE_CODE (yylval.ttype) == INTEGER_CST)
  1962. {
  1963. /* subtract one, because it is the following line that
  1964. gets the specified number */
  1965. int l = TREE_INT_CST_LOW (yylval.ttype) - 1;
  1966. token = yylex ();
  1967. if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
  1968. yyerror ("invalid #line");
  1969. input_filename
  1970. = (char *) permalloc (TREE_STRING_LENGTH (yylval.ttype) + 1);
  1971. strcpy (input_filename, TREE_STRING_POINTER (yylval.ttype));
  1972. lineno = l;
  1973. }
  1974. else
  1975. yyerror ("undefined or invalid # directive");
  1976. /* skip the rest of this line. */
  1977. while ((c = getc (finput)) != '\n');
  1978. }
  1979. }
  1980. #define isalnum(char) ((char >= 'a' && char <= 'z') || (char >= 'A' && char <= 'Z') || (char >= '0' && char <= '9'))
  1981. #define isdigit(char) (char >= '0' && char <= '9')
  1982. #define ENDFILE -1 /* token that represents end-of-file */
  1983. static int
  1984. readescape ()
  1985. {
  1986. register int c = getc (finput);
  1987. register int count, code;
  1988. switch (c)
  1989. {
  1990. case 'x':
  1991. code = 0;
  1992. count = 0;
  1993. while (1)
  1994. {
  1995. c = getc (finput);
  1996. if (!(c >= 'a' && c <= 'f')
  1997. && !(c >= 'A' && c <= 'F')
  1998. && !(c >= '0' && c <= '9'))
  1999. {
  2000. ungetc (c, finput);
  2001. break;
  2002. }
  2003. if (c >= 'a' && c <= 'z')
  2004. c -= 'a' - 'A';
  2005. code *= 16;
  2006. if (c >= 'a' && c <= 'f')
  2007. code += c - 'a' + 10;
  2008. if (c >= 'A' && c <= 'F')
  2009. code += c - 'A' + 10;
  2010. if (c >= '0' && c <= '9')
  2011. code += c - '0';
  2012. count++;
  2013. if (count == 3)
  2014. break;
  2015. }
  2016. if (count == 0)
  2017. yyerror ("\\x used with no following hex digits");
  2018. return code;
  2019. case '0': case '1': case '2': case '3': case '4':
  2020. case '5': case '6': case '7':
  2021. code = 0;
  2022. count = 0;
  2023. while ((c <= '7') && (c >= '0') && (count++ < 3))
  2024. {
  2025. code = (code * 8) + (c - '0');
  2026. c = getc (finput);
  2027. }
  2028. ungetc (c, finput);
  2029. return code;
  2030. case '\\': case '\'': case '"':
  2031. return c;
  2032. case '\n':
  2033. lineno++;
  2034. return -1;
  2035. case 'n':
  2036. return TARGET_NEWLINE;
  2037. case 't':
  2038. return TARGET_TAB;
  2039. case 'r':
  2040. return TARGET_CR;
  2041. case 'f':
  2042. return TARGET_FF;
  2043. case 'b':
  2044. return TARGET_BS;
  2045. case 'a':
  2046. return TARGET_BELL;
  2047. case 'v':
  2048. return TARGET_VT;
  2049. }
  2050. return c;
  2051. }
  2052. static int
  2053. yylex()
  2054. {
  2055. register int c;
  2056. register char *p;
  2057. register int value;
  2058. c = skip_white_space();
  2059. yylloc.first_line = lineno;
  2060. switch (c)
  2061. {
  2062. case EOF:
  2063. value = ENDFILE; break;
  2064. case 'A': case 'B': case 'C': case 'D': case 'E':
  2065. case 'F': case 'G': case 'H': case 'I': case 'J':
  2066. case 'K': case 'L': case 'M': case 'N': case 'O':
  2067. case 'P': case 'Q': case 'R': case 'S': case 'T':
  2068. case 'U': case 'V': case 'W': case 'X': case 'Y':
  2069. case 'Z':
  2070. case 'a': case 'b': case 'c': case 'd': case 'e':
  2071. case 'f': case 'g': case 'h': case 'i': case 'j':
  2072. case 'k': case 'l': case 'm': case 'n': case 'o':
  2073. case 'p': case 'q': case 'r': case 's': case 't':
  2074. case 'u': case 'v': case 'w': case 'x': case 'y':
  2075. case 'z':
  2076. case '_':
  2077. p = token_buffer;
  2078. while (isalnum(c) || (c == '_'))
  2079. {
  2080. if (p >= token_buffer + maxtoken)
  2081. p = extend_token_buffer(p);
  2082. *p++ = c;
  2083. c = getc(finput);
  2084. }
  2085. *p = 0;
  2086. ungetc(c, finput);
  2087. value = IDENTIFIER;
  2088. yylval.itype = 0;
  2089. if (p - token_buffer <= MAXRESERVED)
  2090. {
  2091. register int lim = frw [p - token_buffer + 1];
  2092. register int i;
  2093. for (i = frw[p - token_buffer]; i < lim; i++)
  2094. if (rw[i][0] == token_buffer[0] && !strcmp(rw[i], token_buffer))
  2095. {
  2096. if (rid[i])
  2097. yylval.ttype = ridpointers[(int) rid[i]];
  2098. value = (int) rtoken[i];
  2099. break;
  2100. }
  2101. }
  2102. if (value == IDENTIFIER)
  2103. {
  2104. yylval.ttype = get_identifier(token_buffer);
  2105. lastiddecl = lookup_name (yylval.ttype);
  2106. if (lastiddecl != 0 && TREE_CODE (lastiddecl) == TYPE_DECL)
  2107. value = TYPENAME;
  2108. }
  2109. break;
  2110. case '0': case '1': case '2': case '3': case '4':
  2111. case '5': case '6': case '7': case '8': case '9':
  2112. case '.':
  2113. {
  2114. int base = 10;
  2115. int count = 0;
  2116. /* for multi-precision arithmetic, we store only 8 live bits in each short,
  2117. giving us 64 bits of reliable precision */
  2118. short shorts[8];
  2119. char *floatflag = NULL; /* set nonzero if we learn this is a floating constant */
  2120. /* in fact, it points to the first fractional digit. */
  2121. for (count = 0; count < 8; count++)
  2122. shorts[count] = 0;
  2123. p = token_buffer;
  2124. *p++ = c;
  2125. if (c == '0')
  2126. {
  2127. *p++ = (c = getc(finput));
  2128. if ((c == 'x') || (c == 'X'))
  2129. {
  2130. base = 16;
  2131. *p++ = (c = getc(finput));
  2132. }
  2133. else
  2134. {
  2135. base = 8;
  2136. }
  2137. }
  2138. while (c == '.'
  2139. || (isalnum (c) && (c != 'l') && (c != 'L')
  2140. && (c != 'u') && (c != 'U')))
  2141. {
  2142. if (c == '.')
  2143. {
  2144. floatflag = p - 1;
  2145. p[-1] = c = getc(finput); /* omit the decimal point from
  2146. the token buffer. */
  2147. /* Accept '.' as the start of a floating-point number
  2148. only when it is followed by a digit.
  2149. Otherwise, unread the following non-digit
  2150. and use the '.' as a structural token. */
  2151. if (floatflag == token_buffer && !isdigit (c))
  2152. {
  2153. if (c == '.')
  2154. {
  2155. c = getc (finput);
  2156. if (c == '.')
  2157. return ELLIPSIS;
  2158. yyerror ("syntax error");
  2159. }
  2160. ungetc (c, finput);
  2161. return '.';
  2162. }
  2163. }
  2164. else
  2165. {
  2166. if (isdigit(c))
  2167. {
  2168. c = c - '0';
  2169. }
  2170. else if (base <= 10)
  2171. {
  2172. if ((c&~040) == 'E')
  2173. {
  2174. if (floatflag == 0)
  2175. floatflag = p - 1;
  2176. break; /* start of exponent */
  2177. }
  2178. yyerror("nondigits in number and not hexadecimal");
  2179. c = 0;
  2180. }
  2181. else if (c >= 'a')
  2182. {
  2183. c = c - 'a' + 10;
  2184. }
  2185. else
  2186. {
  2187. c = c - 'A' + 10;
  2188. }
  2189. if (c >= base)
  2190. yyerror("numeric constant contains digits beyond the radix");
  2191. for (count = 0; count < 8; count++)
  2192. {
  2193. (shorts[count] *= base);
  2194. if (count)
  2195. {
  2196. shorts[count] += (shorts[count-1] >> 8);
  2197. shorts[count-1] &= (1<<8)-1;
  2198. }
  2199. else shorts[0] += c;
  2200. }
  2201. *p++ = (c = getc(finput));
  2202. }
  2203. }
  2204. /* Remove terminating char from the token buffer and delimit the string */
  2205. *--p = 0;
  2206. if (floatflag)
  2207. {
  2208. register ex = -(p - floatflag); /* exponent is minus # digits after decimal pt */
  2209. tree type = double_type_node;
  2210. /* read explicit exponent if any, and add into ex. */
  2211. if ((c == 'e') || (c == 'E'))
  2212. {
  2213. register int exval = 0;
  2214. register int exsign = 1;
  2215. c = getc(finput);
  2216. if ((c == '+') || (c == '-'))
  2217. {
  2218. if (c == '-') exsign = -1;
  2219. c = getc(finput);
  2220. }
  2221. while (isdigit(c))
  2222. {
  2223. exval *= 10;
  2224. exval += c - '0';
  2225. c = getc(finput);
  2226. }
  2227. ex += exsign*exval;
  2228. }
  2229. while (1)
  2230. {
  2231. if (c == 'f' || c == 'F')
  2232. type = float_type_node;
  2233. else if (c == 'l' || c == 'L')
  2234. type = long_double_type_node;
  2235. else break;
  2236. c = getc (finput);
  2237. }
  2238. ungetc(c, finput);
  2239. yylval.ttype = build_real_from_string (token_buffer, ex);
  2240. TREE_TYPE (yylval.ttype) = type;
  2241. }
  2242. else
  2243. {
  2244. tree type;
  2245. int spec_unsigned = 0;
  2246. int spec_long = 0;
  2247. while (1)
  2248. {
  2249. if (c == 'u' || c == 'U')
  2250. {
  2251. spec_unsigned = 1;
  2252. c = getc (finput);
  2253. }
  2254. else if (c == 'l' || c == 'L')
  2255. {
  2256. spec_long = 1;
  2257. c = getc (finput);
  2258. }
  2259. else break;
  2260. }
  2261. ungetc (c, finput);
  2262. /* This is simplified by the fact that our constant
  2263. is always positive. */
  2264. yylval.ttype
  2265. = build_int_2 ((shorts[3]<<24) + (shorts[2]<<16) + (shorts[1]<<8) + shorts[0],
  2266. (shorts[7]<<24) + (shorts[6]<<16) + (shorts[5]<<8) + shorts[4]);
  2267. if (!spec_long && !spec_unsigned
  2268. && int_fits_type_p (yylval.ttype, integer_type_node))
  2269. type = integer_type_node;
  2270. else if (!spec_long && base != 10
  2271. && int_fits_type_p (yylval.ttype, unsigned_type_node))
  2272. type = unsigned_type_node;
  2273. else if (!spec_unsigned
  2274. && int_fits_type_p (yylval.ttype, long_integer_type_node))
  2275. type = long_integer_type_node;
  2276. else
  2277. type = long_unsigned_type_node;
  2278. TREE_TYPE (yylval.ttype) = type;
  2279. }
  2280. value = CONSTANT; break;
  2281. }
  2282. case '\'':
  2283. c = getc(finput);
  2284. {
  2285. register int code = 0;
  2286. tryagain:
  2287. if (c == '\\')
  2288. {
  2289. c = readescape ();
  2290. if (c < 0)
  2291. goto tryagain;
  2292. }
  2293. code = c;
  2294. c = getc (finput);
  2295. if (c != '\'')
  2296. yyerror("malformatted character constant");
  2297. if (char_type_node == unsigned_char_type_node
  2298. || (c >> (BITS_PER_UNIT - 1)) == 0)
  2299. yylval.ttype = build_int_2 (code, 0);
  2300. else
  2301. yylval.ttype = build_int_2 (code | (1 << BITS_PER_UNIT), -1);
  2302. TREE_TYPE (yylval.ttype) = char_type_node;
  2303. value = CONSTANT; break;
  2304. }
  2305. case '"':
  2306. {
  2307. c = getc(finput);
  2308. p = token_buffer;
  2309. while (c != '"')
  2310. {
  2311. if (c == '\\')
  2312. {
  2313. c = readescape ();
  2314. if (c < 0)
  2315. goto skipnewline;
  2316. }
  2317. else if (c == '\n')
  2318. {
  2319. lineno++;
  2320. }
  2321. if (p == token_buffer + maxtoken)
  2322. p = extend_token_buffer(p);
  2323. *p++ = c;
  2324. skipnewline:
  2325. c = getc (finput);
  2326. }
  2327. *p++ = 0;
  2328. yylval.ttype = build_string (p - token_buffer, token_buffer);
  2329. TREE_TYPE (yylval.ttype) = char_array_type_node;
  2330. value = STRING; break;
  2331. }
  2332. case '+':
  2333. case '-':
  2334. case '&':
  2335. case '|':
  2336. case '<':
  2337. case '>':
  2338. case '*':
  2339. case '/':
  2340. case '%':
  2341. case '^':
  2342. case '!':
  2343. case '=':
  2344. {
  2345. register int c1;
  2346. combine:
  2347. switch (c)
  2348. {
  2349. case '+':
  2350. yylval.code = PLUS_EXPR; break;
  2351. case '-':
  2352. yylval.code = MINUS_EXPR; break;
  2353. case '&':
  2354. yylval.code = BIT_AND_EXPR; break;
  2355. case '|':
  2356. yylval.code = BIT_IOR_EXPR; break;
  2357. case '*':
  2358. yylval.code = MULT_EXPR; break;
  2359. case '/':
  2360. yylval.code = TRUNC_DIV_EXPR; break;
  2361. case '%':
  2362. yylval.code = TRUNC_MOD_EXPR; break;
  2363. case '^':
  2364. yylval.code = BIT_XOR_EXPR; break;
  2365. case LSHIFT:
  2366. yylval.code = LSHIFT_EXPR; break;
  2367. case RSHIFT:
  2368. yylval.code = RSHIFT_EXPR; break;
  2369. case '<':
  2370. yylval.code = LT_EXPR; break;
  2371. case '>':
  2372. yylval.code = GT_EXPR; break;
  2373. }
  2374. c1 = getc(finput);
  2375. if (c1 == '=')
  2376. {
  2377. switch (c)
  2378. {
  2379. case '<':
  2380. value = ARITHCOMPARE; yylval.code = LE_EXPR; goto done;
  2381. case '>':
  2382. value = ARITHCOMPARE; yylval.code = GE_EXPR; goto done;
  2383. case '!':
  2384. value = EQCOMPARE; yylval.code = NE_EXPR; goto done;
  2385. case '=':
  2386. value = EQCOMPARE; yylval.code = EQ_EXPR; goto done;
  2387. }
  2388. value = ASSIGN; goto done;
  2389. }
  2390. else if (c == c1)
  2391. switch (c)
  2392. {
  2393. case '+':
  2394. value = PLUSPLUS; goto done;
  2395. case '-':
  2396. value = MINUSMINUS; goto done;
  2397. case '&':
  2398. value = ANDAND; goto done;
  2399. case '|':
  2400. value = OROR; goto done;
  2401. case '<':
  2402. c = LSHIFT;
  2403. goto combine;
  2404. case '>':
  2405. c = RSHIFT;
  2406. goto combine;
  2407. }
  2408. else if ((c == '-') && (c1 == '>'))
  2409. { value = POINTSAT; goto done; }
  2410. ungetc (c1, finput);
  2411. if ((c == '<') || (c == '>'))
  2412. value = ARITHCOMPARE;
  2413. else value = c;
  2414. goto done;
  2415. }
  2416. default:
  2417. value = c;
  2418. }
  2419. done:
  2420. yylloc.last_line = lineno;
  2421. return (value);
  2422. }