0082-scripts-dtc-Add-overlay-support.patch 143 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389
  1. From 546cd6ad07064b850fe069f84e28da11526cbc3f Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Tue, 14 Jul 2015 17:00:18 +0100
  4. Subject: [PATCH] scripts/dtc: Add overlay support
  5. ---
  6. scripts/dtc/checks.c | 119 ++-
  7. scripts/dtc/dtc-lexer.l | 5 +
  8. scripts/dtc/dtc-lexer.lex.c_shipped | 490 ++++-----
  9. scripts/dtc/dtc-parser.tab.c_shipped | 1896 +++++++++++++++++++---------------
  10. scripts/dtc/dtc-parser.tab.h_shipped | 107 +-
  11. scripts/dtc/dtc-parser.y | 23 +-
  12. scripts/dtc/dtc.c | 9 +-
  13. scripts/dtc/dtc.h | 38 +
  14. scripts/dtc/flattree.c | 141 ++-
  15. scripts/dtc/version_gen.h | 2 +-
  16. 10 files changed, 1685 insertions(+), 1145 deletions(-)
  17. --- a/scripts/dtc/checks.c
  18. +++ b/scripts/dtc/checks.c
  19. @@ -458,21 +458,91 @@ static void fixup_phandle_references(str
  20. struct node *node, struct property *prop)
  21. {
  22. struct marker *m = prop->val.markers;
  23. + struct fixup *f, **fp;
  24. + struct fixup_entry *fe, **fep;
  25. struct node *refnode;
  26. cell_t phandle;
  27. + int has_phandle_refs;
  28. +
  29. + has_phandle_refs = 0;
  30. + for_each_marker_of_type(m, REF_PHANDLE) {
  31. + has_phandle_refs = 1;
  32. + break;
  33. + }
  34. +
  35. + if (!has_phandle_refs)
  36. + return;
  37. for_each_marker_of_type(m, REF_PHANDLE) {
  38. assert(m->offset + sizeof(cell_t) <= prop->val.len);
  39. refnode = get_node_by_ref(dt, m->ref);
  40. - if (! refnode) {
  41. + if (!refnode && !symbol_fixup_support) {
  42. FAIL(c, "Reference to non-existent node or label \"%s\"\n",
  43. - m->ref);
  44. + m->ref);
  45. continue;
  46. }
  47. - phandle = get_node_phandle(dt, refnode);
  48. - *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle);
  49. + if (!refnode) {
  50. + /* allocate fixup entry */
  51. + fe = xmalloc(sizeof(*fe));
  52. +
  53. + fe->node = node;
  54. + fe->prop = prop;
  55. + fe->offset = m->offset;
  56. + fe->next = NULL;
  57. +
  58. + /* search for an already existing fixup */
  59. + for_each_fixup(dt, f)
  60. + if (strcmp(f->ref, m->ref) == 0)
  61. + break;
  62. +
  63. + /* no fixup found, add new */
  64. + if (f == NULL) {
  65. + f = xmalloc(sizeof(*f));
  66. + f->ref = m->ref;
  67. + f->entries = NULL;
  68. + f->next = NULL;
  69. +
  70. + /* add it to the tree */
  71. + fp = &dt->fixups;
  72. + while (*fp)
  73. + fp = &(*fp)->next;
  74. + *fp = f;
  75. + }
  76. +
  77. + /* and now append fixup entry */
  78. + fep = &f->entries;
  79. + while (*fep)
  80. + fep = &(*fep)->next;
  81. + *fep = fe;
  82. +
  83. + /* mark the entry as unresolved */
  84. + phandle = 0xdeadbeef;
  85. + } else {
  86. + phandle = get_node_phandle(dt, refnode);
  87. +
  88. + /* if it's a plugin, we need to record it */
  89. + if (symbol_fixup_support && dt->is_plugin) {
  90. +
  91. + /* allocate a new local fixup entry */
  92. + fe = xmalloc(sizeof(*fe));
  93. +
  94. + fe->node = node;
  95. + fe->prop = prop;
  96. + fe->offset = m->offset;
  97. + fe->next = NULL;
  98. +
  99. + /* append it to the local fixups */
  100. + fep = &dt->local_fixups;
  101. + while (*fep)
  102. + fep = &(*fep)->next;
  103. + *fep = fe;
  104. + }
  105. + }
  106. +
  107. + *((cell_t *)(prop->val.val + m->offset)) =
  108. + cpu_to_fdt32(phandle);
  109. }
  110. }
  111. ERROR(phandle_references, NULL, NULL, fixup_phandle_references, NULL,
  112. @@ -652,6 +722,45 @@ static void check_obsolete_chosen_interr
  113. }
  114. TREE_WARNING(obsolete_chosen_interrupt_controller, NULL);
  115. +static void check_auto_label_phandles(struct check *c, struct node *dt,
  116. + struct node *node)
  117. +{
  118. + struct label *l;
  119. + struct symbol *s, **sp;
  120. + int has_label;
  121. +
  122. + if (!symbol_fixup_support)
  123. + return;
  124. +
  125. + has_label = 0;
  126. + for_each_label(node->labels, l) {
  127. + has_label = 1;
  128. + break;
  129. + }
  130. +
  131. + if (!has_label)
  132. + return;
  133. +
  134. + /* force allocation of a phandle for this node */
  135. + (void)get_node_phandle(dt, node);
  136. +
  137. + /* add the symbol */
  138. + for_each_label(node->labels, l) {
  139. +
  140. + s = xmalloc(sizeof(*s));
  141. + s->label = l;
  142. + s->node = node;
  143. + s->next = NULL;
  144. +
  145. + /* add it to the symbols list */
  146. + sp = &dt->symbols;
  147. + while (*sp)
  148. + sp = &((*sp)->next);
  149. + *sp = s;
  150. + }
  151. +}
  152. +NODE_WARNING(auto_label_phandles, NULL);
  153. +
  154. static struct check *check_table[] = {
  155. &duplicate_node_names, &duplicate_property_names,
  156. &node_name_chars, &node_name_format, &property_name_chars,
  157. @@ -670,6 +779,8 @@ static struct check *check_table[] = {
  158. &avoid_default_addr_size,
  159. &obsolete_chosen_interrupt_controller,
  160. + &auto_label_phandles,
  161. +
  162. &always_fail,
  163. };
  164. --- a/scripts/dtc/dtc-lexer.l
  165. +++ b/scripts/dtc/dtc-lexer.l
  166. @@ -113,6 +113,11 @@ static void lexical_error(const char *fm
  167. return DT_V1;
  168. }
  169. +<*>"/plugin/" {
  170. + DPRINT("Keyword: /plugin/\n");
  171. + return DT_PLUGIN;
  172. + }
  173. +
  174. <*>"/memreserve/" {
  175. DPRINT("Keyword: /memreserve/\n");
  176. BEGIN_DEFAULT();
  177. --- a/scripts/dtc/dtc-lexer.lex.c_shipped
  178. +++ b/scripts/dtc/dtc-lexer.lex.c_shipped
  179. @@ -9,7 +9,7 @@
  180. #define FLEX_SCANNER
  181. #define YY_FLEX_MAJOR_VERSION 2
  182. #define YY_FLEX_MINOR_VERSION 5
  183. -#define YY_FLEX_SUBMINOR_VERSION 39
  184. +#define YY_FLEX_SUBMINOR_VERSION 35
  185. #if YY_FLEX_SUBMINOR_VERSION > 0
  186. #define FLEX_BETA
  187. #endif
  188. @@ -162,12 +162,7 @@ typedef unsigned int flex_uint32_t;
  189. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  190. #endif
  191. -#ifndef YY_TYPEDEF_YY_SIZE_T
  192. -#define YY_TYPEDEF_YY_SIZE_T
  193. -typedef size_t yy_size_t;
  194. -#endif
  195. -
  196. -extern yy_size_t yyleng;
  197. +extern int yyleng;
  198. extern FILE *yyin, *yyout;
  199. @@ -176,7 +171,6 @@ extern FILE *yyin, *yyout;
  200. #define EOB_ACT_LAST_MATCH 2
  201. #define YY_LESS_LINENO(n)
  202. - #define YY_LINENO_REWIND_TO(ptr)
  203. /* Return all but the first "n" matched characters back to the input stream. */
  204. #define yyless(n) \
  205. @@ -194,6 +188,11 @@ extern FILE *yyin, *yyout;
  206. #define unput(c) yyunput( c, (yytext_ptr) )
  207. +#ifndef YY_TYPEDEF_YY_SIZE_T
  208. +#define YY_TYPEDEF_YY_SIZE_T
  209. +typedef size_t yy_size_t;
  210. +#endif
  211. +
  212. #ifndef YY_STRUCT_YY_BUFFER_STATE
  213. #define YY_STRUCT_YY_BUFFER_STATE
  214. struct yy_buffer_state
  215. @@ -211,7 +210,7 @@ struct yy_buffer_state
  216. /* Number of characters read into yy_ch_buf, not including EOB
  217. * characters.
  218. */
  219. - yy_size_t yy_n_chars;
  220. + int yy_n_chars;
  221. /* Whether we "own" the buffer - i.e., we know we created it,
  222. * and can realloc() it to grow it, and should free() it to
  223. @@ -281,8 +280,8 @@ static YY_BUFFER_STATE * yy_buffer_stack
  224. /* yy_hold_char holds the character lost when yytext is formed. */
  225. static char yy_hold_char;
  226. -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
  227. -yy_size_t yyleng;
  228. +static int yy_n_chars; /* number of characters read into yy_ch_buf */
  229. +int yyleng;
  230. /* Points to current character in buffer. */
  231. static char *yy_c_buf_p = (char *) 0;
  232. @@ -310,7 +309,7 @@ static void yy_init_buffer (YY_BUFFER_ST
  233. YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
  234. YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
  235. -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
  236. +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
  237. void *yyalloc (yy_size_t );
  238. void *yyrealloc (void *,yy_size_t );
  239. @@ -342,7 +341,7 @@ void yyfree (void * );
  240. /* Begin user sect3 */
  241. -#define yywrap() 1
  242. +#define yywrap(n) 1
  243. #define YY_SKIP_YYWRAP
  244. typedef unsigned char YY_CHAR;
  245. @@ -373,8 +372,8 @@ static void yy_fatal_error (yyconst char
  246. *yy_cp = '\0'; \
  247. (yy_c_buf_p) = yy_cp;
  248. -#define YY_NUM_RULES 30
  249. -#define YY_END_OF_BUFFER 31
  250. +#define YY_NUM_RULES 31
  251. +#define YY_END_OF_BUFFER 32
  252. /* This struct is not used in this scanner,
  253. but its presence is necessary. */
  254. struct yy_trans_info
  255. @@ -382,25 +381,26 @@ struct yy_trans_info
  256. flex_int32_t yy_verify;
  257. flex_int32_t yy_nxt;
  258. };
  259. -static yyconst flex_int16_t yy_accept[159] =
  260. +static yyconst flex_int16_t yy_accept[166] =
  261. { 0,
  262. - 0, 0, 0, 0, 0, 0, 0, 0, 31, 29,
  263. - 18, 18, 29, 29, 29, 29, 29, 29, 29, 29,
  264. - 29, 29, 29, 29, 29, 29, 15, 16, 16, 29,
  265. - 16, 10, 10, 18, 26, 0, 3, 0, 27, 12,
  266. - 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,
  267. - 21, 23, 25, 24, 22, 0, 9, 28, 0, 0,
  268. - 0, 14, 14, 16, 16, 16, 10, 10, 10, 0,
  269. - 12, 0, 11, 0, 0, 0, 20, 0, 0, 0,
  270. - 0, 0, 0, 0, 0, 16, 10, 10, 10, 0,
  271. - 13, 19, 0, 0, 0, 0, 0, 0, 0, 0,
  272. -
  273. - 0, 16, 0, 0, 0, 0, 0, 0, 0, 0,
  274. - 0, 16, 6, 0, 0, 0, 0, 0, 0, 2,
  275. - 0, 0, 0, 0, 0, 0, 0, 0, 4, 17,
  276. - 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
  277. - 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
  278. - 5, 8, 0, 0, 0, 0, 7, 0
  279. + 0, 0, 0, 0, 0, 0, 0, 0, 32, 30,
  280. + 19, 19, 30, 30, 30, 30, 30, 30, 30, 30,
  281. + 30, 30, 30, 30, 30, 30, 16, 17, 17, 30,
  282. + 17, 11, 11, 19, 27, 0, 3, 0, 28, 13,
  283. + 0, 0, 12, 0, 0, 0, 0, 0, 0, 0,
  284. + 0, 22, 24, 26, 25, 23, 0, 10, 29, 0,
  285. + 0, 0, 15, 15, 17, 17, 17, 11, 11, 11,
  286. + 0, 13, 0, 12, 0, 0, 0, 21, 0, 0,
  287. + 0, 0, 0, 0, 0, 0, 0, 17, 11, 11,
  288. + 11, 0, 14, 20, 0, 0, 0, 0, 0, 0,
  289. +
  290. + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0,
  291. + 0, 0, 0, 0, 0, 17, 7, 0, 0, 0,
  292. + 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
  293. + 0, 0, 0, 0, 4, 18, 0, 0, 5, 2,
  294. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  295. + 0, 0, 1, 0, 0, 0, 0, 6, 9, 0,
  296. + 0, 0, 0, 8, 0
  297. } ;
  298. static yyconst flex_int32_t yy_ec[256] =
  299. @@ -416,9 +416,9 @@ static yyconst flex_int32_t yy_ec[256] =
  300. 22, 22, 22, 22, 24, 22, 22, 25, 22, 22,
  301. 1, 26, 27, 1, 22, 1, 21, 28, 29, 30,
  302. - 31, 21, 22, 22, 32, 22, 22, 33, 34, 35,
  303. - 36, 37, 22, 38, 39, 40, 41, 42, 22, 25,
  304. - 43, 22, 44, 45, 46, 1, 1, 1, 1, 1,
  305. + 31, 21, 32, 22, 33, 22, 22, 34, 35, 36,
  306. + 37, 38, 22, 39, 40, 41, 42, 43, 22, 25,
  307. + 44, 22, 45, 46, 47, 1, 1, 1, 1, 1,
  308. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  309. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  310. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  311. @@ -435,163 +435,165 @@ static yyconst flex_int32_t yy_ec[256] =
  312. 1, 1, 1, 1, 1
  313. } ;
  314. -static yyconst flex_int32_t yy_meta[47] =
  315. +static yyconst flex_int32_t yy_meta[48] =
  316. { 0,
  317. 1, 1, 1, 1, 1, 1, 2, 3, 1, 2,
  318. 2, 2, 4, 5, 5, 5, 6, 1, 1, 1,
  319. 7, 8, 8, 8, 8, 1, 1, 7, 7, 7,
  320. 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  321. - 8, 8, 8, 3, 1, 4
  322. + 8, 8, 8, 8, 3, 1, 4
  323. } ;
  324. -static yyconst flex_int16_t yy_base[173] =
  325. +static yyconst flex_int16_t yy_base[180] =
  326. { 0,
  327. - 0, 383, 34, 382, 65, 381, 37, 105, 387, 391,
  328. - 54, 111, 367, 110, 109, 109, 112, 41, 366, 104,
  329. - 367, 338, 124, 117, 0, 144, 391, 0, 121, 0,
  330. - 135, 155, 140, 179, 391, 160, 391, 379, 391, 0,
  331. - 368, 141, 391, 167, 370, 376, 346, 103, 342, 345,
  332. - 391, 391, 391, 391, 391, 358, 391, 391, 175, 342,
  333. - 338, 391, 355, 0, 185, 339, 184, 347, 346, 0,
  334. - 0, 322, 175, 357, 175, 363, 352, 324, 330, 323,
  335. - 332, 326, 201, 324, 329, 322, 391, 333, 181, 309,
  336. - 391, 341, 340, 313, 320, 338, 178, 311, 146, 317,
  337. -
  338. - 314, 315, 335, 331, 303, 300, 309, 299, 308, 188,
  339. - 336, 335, 391, 305, 320, 281, 283, 271, 203, 288,
  340. - 281, 271, 266, 264, 245, 242, 208, 104, 391, 391,
  341. - 244, 218, 204, 219, 206, 224, 201, 212, 204, 229,
  342. - 215, 208, 207, 200, 219, 391, 233, 221, 200, 181,
  343. - 391, 391, 149, 122, 86, 41, 391, 391, 245, 251,
  344. - 259, 263, 267, 273, 280, 284, 292, 300, 304, 310,
  345. - 318, 326
  346. + 0, 393, 35, 392, 66, 391, 38, 107, 397, 401,
  347. + 55, 113, 377, 112, 111, 111, 114, 42, 376, 106,
  348. + 377, 347, 126, 120, 0, 147, 401, 0, 124, 0,
  349. + 137, 158, 170, 163, 401, 153, 401, 389, 401, 0,
  350. + 378, 120, 401, 131, 380, 386, 355, 139, 351, 355,
  351. + 351, 401, 401, 401, 401, 401, 367, 401, 401, 185,
  352. + 350, 346, 401, 364, 0, 185, 347, 189, 356, 355,
  353. + 0, 0, 330, 180, 366, 141, 372, 361, 332, 338,
  354. + 331, 341, 334, 326, 205, 331, 337, 329, 401, 341,
  355. + 167, 316, 401, 349, 348, 320, 328, 346, 180, 318,
  356. +
  357. + 324, 209, 324, 320, 322, 342, 338, 309, 306, 315,
  358. + 305, 315, 312, 192, 342, 341, 401, 293, 306, 282,
  359. + 268, 252, 255, 203, 285, 282, 272, 268, 252, 233,
  360. + 232, 239, 208, 107, 401, 401, 238, 211, 401, 211,
  361. + 212, 208, 228, 203, 215, 207, 233, 222, 212, 211,
  362. + 203, 227, 401, 237, 225, 204, 185, 401, 401, 149,
  363. + 128, 88, 42, 401, 401, 253, 259, 267, 271, 275,
  364. + 281, 288, 292, 300, 308, 312, 318, 326, 334
  365. } ;
  366. -static yyconst flex_int16_t yy_def[173] =
  367. +static yyconst flex_int16_t yy_def[180] =
  368. { 0,
  369. - 158, 1, 1, 3, 158, 5, 1, 1, 158, 158,
  370. - 158, 158, 158, 159, 160, 161, 158, 158, 158, 158,
  371. - 162, 158, 158, 158, 163, 162, 158, 164, 165, 164,
  372. - 164, 158, 158, 158, 158, 159, 158, 159, 158, 166,
  373. - 158, 161, 158, 161, 167, 168, 158, 158, 158, 158,
  374. - 158, 158, 158, 158, 158, 162, 158, 158, 158, 158,
  375. - 158, 158, 162, 164, 165, 164, 158, 158, 158, 169,
  376. - 166, 170, 161, 167, 167, 168, 158, 158, 158, 158,
  377. - 158, 158, 158, 158, 158, 164, 158, 158, 169, 170,
  378. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  379. -
  380. - 158, 164, 158, 158, 158, 158, 158, 158, 158, 171,
  381. - 158, 164, 158, 158, 158, 158, 158, 158, 171, 158,
  382. - 171, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  383. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  384. - 172, 158, 158, 158, 172, 158, 172, 158, 158, 158,
  385. - 158, 158, 158, 158, 158, 158, 158, 0, 158, 158,
  386. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  387. - 158, 158
  388. + 165, 1, 1, 3, 165, 5, 1, 1, 165, 165,
  389. + 165, 165, 165, 166, 167, 168, 165, 165, 165, 165,
  390. + 169, 165, 165, 165, 170, 169, 165, 171, 172, 171,
  391. + 171, 165, 165, 165, 165, 166, 165, 166, 165, 173,
  392. + 165, 168, 165, 168, 174, 175, 165, 165, 165, 165,
  393. + 165, 165, 165, 165, 165, 165, 169, 165, 165, 165,
  394. + 165, 165, 165, 169, 171, 172, 171, 165, 165, 165,
  395. + 176, 173, 177, 168, 174, 174, 175, 165, 165, 165,
  396. + 165, 165, 165, 165, 165, 165, 165, 171, 165, 165,
  397. + 176, 177, 165, 165, 165, 165, 165, 165, 165, 165,
  398. +
  399. + 165, 165, 165, 165, 171, 165, 165, 165, 165, 165,
  400. + 165, 165, 165, 178, 165, 171, 165, 165, 165, 165,
  401. + 165, 165, 165, 178, 165, 178, 165, 165, 165, 165,
  402. + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
  403. + 165, 165, 165, 165, 165, 165, 165, 179, 165, 165,
  404. + 165, 179, 165, 179, 165, 165, 165, 165, 165, 165,
  405. + 165, 165, 165, 165, 0, 165, 165, 165, 165, 165,
  406. + 165, 165, 165, 165, 165, 165, 165, 165, 165
  407. } ;
  408. -static yyconst flex_int16_t yy_nxt[438] =
  409. +static yyconst flex_int16_t yy_nxt[449] =
  410. { 0,
  411. 10, 11, 12, 11, 13, 14, 10, 15, 16, 10,
  412. 10, 10, 17, 10, 10, 10, 10, 18, 19, 20,
  413. 21, 21, 21, 21, 21, 10, 10, 21, 21, 21,
  414. 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
  415. - 21, 21, 21, 10, 22, 10, 24, 25, 25, 25,
  416. - 32, 33, 33, 157, 26, 34, 34, 34, 51, 52,
  417. - 27, 26, 26, 26, 26, 10, 11, 12, 11, 13,
  418. - 14, 28, 15, 16, 28, 28, 28, 24, 28, 28,
  419. - 28, 10, 18, 19, 20, 29, 29, 29, 29, 29,
  420. - 30, 10, 29, 29, 29, 29, 29, 29, 29, 29,
  421. -
  422. - 29, 29, 29, 29, 29, 29, 29, 29, 10, 22,
  423. - 10, 23, 34, 34, 34, 37, 39, 43, 32, 33,
  424. - 33, 45, 54, 55, 46, 59, 45, 64, 156, 46,
  425. - 64, 64, 64, 79, 44, 38, 59, 57, 134, 47,
  426. - 135, 48, 80, 49, 47, 50, 48, 99, 61, 43,
  427. - 50, 110, 41, 67, 67, 67, 60, 63, 63, 63,
  428. - 57, 155, 68, 69, 63, 37, 44, 66, 67, 67,
  429. - 67, 63, 63, 63, 63, 73, 59, 68, 69, 70,
  430. - 34, 34, 34, 43, 75, 38, 154, 92, 83, 83,
  431. - 83, 64, 44, 120, 64, 64, 64, 67, 67, 67,
  432. -
  433. - 44, 57, 99, 68, 69, 107, 68, 69, 120, 127,
  434. - 108, 153, 152, 121, 83, 83, 83, 133, 133, 133,
  435. - 146, 133, 133, 133, 146, 140, 140, 140, 121, 141,
  436. - 140, 140, 140, 151, 141, 158, 150, 149, 148, 144,
  437. - 147, 143, 142, 139, 147, 36, 36, 36, 36, 36,
  438. - 36, 36, 36, 40, 138, 137, 136, 40, 40, 42,
  439. - 42, 42, 42, 42, 42, 42, 42, 56, 56, 56,
  440. - 56, 62, 132, 62, 64, 131, 130, 64, 129, 64,
  441. - 64, 65, 128, 158, 65, 65, 65, 65, 71, 127,
  442. - 71, 71, 74, 74, 74, 74, 74, 74, 74, 74,
  443. -
  444. - 76, 76, 76, 76, 76, 76, 76, 76, 89, 126,
  445. - 89, 90, 125, 90, 90, 124, 90, 90, 119, 119,
  446. - 119, 119, 119, 119, 119, 119, 145, 145, 145, 145,
  447. - 145, 145, 145, 145, 123, 122, 59, 59, 118, 117,
  448. - 116, 115, 114, 113, 45, 112, 108, 111, 109, 106,
  449. - 105, 104, 46, 103, 91, 87, 102, 101, 100, 98,
  450. - 97, 96, 95, 94, 93, 77, 75, 91, 88, 87,
  451. - 86, 57, 85, 84, 57, 82, 81, 78, 77, 75,
  452. - 72, 158, 58, 57, 53, 35, 158, 31, 23, 23,
  453. - 9, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  454. -
  455. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  456. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  457. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  458. - 158, 158, 158, 158, 158, 158, 158
  459. + 21, 21, 21, 21, 10, 22, 10, 24, 25, 25,
  460. + 25, 32, 33, 33, 164, 26, 34, 34, 34, 52,
  461. + 53, 27, 26, 26, 26, 26, 10, 11, 12, 11,
  462. + 13, 14, 28, 15, 16, 28, 28, 28, 24, 28,
  463. + 28, 28, 10, 18, 19, 20, 29, 29, 29, 29,
  464. + 29, 30, 10, 29, 29, 29, 29, 29, 29, 29,
  465. +
  466. + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
  467. + 10, 22, 10, 23, 34, 34, 34, 37, 39, 43,
  468. + 32, 33, 33, 45, 55, 56, 46, 60, 43, 45,
  469. + 65, 163, 46, 65, 65, 65, 44, 38, 60, 74,
  470. + 58, 47, 141, 48, 142, 44, 49, 47, 50, 48,
  471. + 76, 51, 62, 94, 50, 41, 44, 51, 37, 61,
  472. + 64, 64, 64, 58, 34, 34, 34, 64, 162, 80,
  473. + 67, 68, 68, 68, 64, 64, 64, 64, 38, 81,
  474. + 69, 70, 71, 68, 68, 68, 60, 161, 43, 69,
  475. + 70, 65, 69, 70, 65, 65, 65, 125, 85, 85,
  476. +
  477. + 85, 58, 68, 68, 68, 44, 102, 110, 125, 133,
  478. + 102, 69, 70, 111, 114, 160, 159, 126, 85, 85,
  479. + 85, 140, 140, 140, 140, 140, 140, 153, 126, 147,
  480. + 147, 147, 153, 148, 147, 147, 147, 158, 148, 165,
  481. + 157, 156, 155, 151, 150, 149, 146, 154, 145, 144,
  482. + 143, 139, 154, 36, 36, 36, 36, 36, 36, 36,
  483. + 36, 40, 138, 137, 136, 40, 40, 42, 42, 42,
  484. + 42, 42, 42, 42, 42, 57, 57, 57, 57, 63,
  485. + 135, 63, 65, 134, 165, 65, 133, 65, 65, 66,
  486. + 132, 131, 66, 66, 66, 66, 72, 130, 72, 72,
  487. +
  488. + 75, 75, 75, 75, 75, 75, 75, 75, 77, 77,
  489. + 77, 77, 77, 77, 77, 77, 91, 129, 91, 92,
  490. + 128, 92, 92, 127, 92, 92, 124, 124, 124, 124,
  491. + 124, 124, 124, 124, 152, 152, 152, 152, 152, 152,
  492. + 152, 152, 60, 60, 123, 122, 121, 120, 119, 118,
  493. + 117, 45, 116, 111, 115, 113, 112, 109, 108, 107,
  494. + 46, 106, 93, 89, 105, 104, 103, 101, 100, 99,
  495. + 98, 97, 96, 95, 78, 76, 93, 90, 89, 88,
  496. + 58, 87, 86, 58, 84, 83, 82, 79, 78, 76,
  497. + 73, 165, 59, 58, 54, 35, 165, 31, 23, 23,
  498. +
  499. + 9, 165, 165, 165, 165, 165, 165, 165, 165, 165,
  500. + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
  501. + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
  502. + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
  503. + 165, 165, 165, 165, 165, 165, 165, 165
  504. } ;
  505. -static yyconst flex_int16_t yy_chk[438] =
  506. +static yyconst flex_int16_t yy_chk[449] =
  507. { 0,
  508. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  509. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  510. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  511. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  512. - 1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
  513. - 7, 7, 7, 156, 3, 11, 11, 11, 18, 18,
  514. - 3, 3, 3, 3, 3, 5, 5, 5, 5, 5,
  515. + 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
  516. + 3, 7, 7, 7, 163, 3, 11, 11, 11, 18,
  517. + 18, 3, 3, 3, 3, 3, 5, 5, 5, 5,
  518. 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  519. 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  520. 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  521. 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  522. - 5, 8, 12, 12, 12, 14, 15, 16, 8, 8,
  523. - 8, 17, 20, 20, 17, 23, 24, 29, 155, 24,
  524. - 29, 29, 29, 48, 16, 14, 31, 29, 128, 17,
  525. - 128, 17, 48, 17, 24, 17, 24, 99, 24, 42,
  526. - 24, 99, 15, 33, 33, 33, 23, 26, 26, 26,
  527. - 26, 154, 33, 33, 26, 36, 42, 31, 32, 32,
  528. - 32, 26, 26, 26, 26, 44, 59, 32, 32, 32,
  529. - 34, 34, 34, 73, 75, 36, 153, 75, 59, 59,
  530. - 59, 65, 44, 110, 65, 65, 65, 67, 67, 67,
  531. -
  532. - 73, 65, 83, 89, 89, 97, 67, 67, 119, 127,
  533. - 97, 150, 149, 110, 83, 83, 83, 133, 133, 133,
  534. - 141, 127, 127, 127, 145, 136, 136, 136, 119, 136,
  535. - 140, 140, 140, 148, 140, 147, 144, 143, 142, 139,
  536. - 141, 138, 137, 135, 145, 159, 159, 159, 159, 159,
  537. - 159, 159, 159, 160, 134, 132, 131, 160, 160, 161,
  538. - 161, 161, 161, 161, 161, 161, 161, 162, 162, 162,
  539. - 162, 163, 126, 163, 164, 125, 124, 164, 123, 164,
  540. - 164, 165, 122, 121, 165, 165, 165, 165, 166, 120,
  541. - 166, 166, 167, 167, 167, 167, 167, 167, 167, 167,
  542. -
  543. - 168, 168, 168, 168, 168, 168, 168, 168, 169, 118,
  544. - 169, 170, 117, 170, 170, 116, 170, 170, 171, 171,
  545. - 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
  546. - 172, 172, 172, 172, 115, 114, 112, 111, 109, 108,
  547. - 107, 106, 105, 104, 103, 102, 101, 100, 98, 96,
  548. - 95, 94, 93, 92, 90, 88, 86, 85, 84, 82,
  549. - 81, 80, 79, 78, 77, 76, 74, 72, 69, 68,
  550. - 66, 63, 61, 60, 56, 50, 49, 47, 46, 45,
  551. + 5, 5, 5, 8, 12, 12, 12, 14, 15, 16,
  552. + 8, 8, 8, 17, 20, 20, 17, 23, 42, 24,
  553. + 29, 162, 24, 29, 29, 29, 16, 14, 31, 44,
  554. + 29, 17, 134, 17, 134, 42, 17, 24, 17, 24,
  555. + 76, 17, 24, 76, 24, 15, 44, 24, 36, 23,
  556. + 26, 26, 26, 26, 34, 34, 34, 26, 161, 48,
  557. + 31, 32, 32, 32, 26, 26, 26, 26, 36, 48,
  558. + 32, 32, 32, 33, 33, 33, 60, 160, 74, 91,
  559. + 91, 66, 33, 33, 66, 66, 66, 114, 60, 60,
  560. +
  561. + 60, 66, 68, 68, 68, 74, 85, 99, 124, 133,
  562. + 102, 68, 68, 99, 102, 157, 156, 114, 85, 85,
  563. + 85, 133, 133, 133, 140, 140, 140, 148, 124, 143,
  564. + 143, 143, 152, 143, 147, 147, 147, 155, 147, 154,
  565. + 151, 150, 149, 146, 145, 144, 142, 148, 141, 138,
  566. + 137, 132, 152, 166, 166, 166, 166, 166, 166, 166,
  567. + 166, 167, 131, 130, 129, 167, 167, 168, 168, 168,
  568. + 168, 168, 168, 168, 168, 169, 169, 169, 169, 170,
  569. + 128, 170, 171, 127, 126, 171, 125, 171, 171, 172,
  570. + 123, 122, 172, 172, 172, 172, 173, 121, 173, 173,
  571. +
  572. + 174, 174, 174, 174, 174, 174, 174, 174, 175, 175,
  573. + 175, 175, 175, 175, 175, 175, 176, 120, 176, 177,
  574. + 119, 177, 177, 118, 177, 177, 178, 178, 178, 178,
  575. + 178, 178, 178, 178, 179, 179, 179, 179, 179, 179,
  576. + 179, 179, 116, 115, 113, 112, 111, 110, 109, 108,
  577. + 107, 106, 105, 104, 103, 101, 100, 98, 97, 96,
  578. + 95, 94, 92, 90, 88, 87, 86, 84, 83, 82,
  579. + 81, 80, 79, 78, 77, 75, 73, 70, 69, 67,
  580. + 64, 62, 61, 57, 51, 50, 49, 47, 46, 45,
  581. 41, 38, 22, 21, 19, 13, 9, 6, 4, 2,
  582. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  583. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  584. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  585. - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
  586. - 158, 158, 158, 158, 158, 158, 158
  587. + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
  588. + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
  589. + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
  590. + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
  591. + 165, 165, 165, 165, 165, 165, 165, 165
  592. } ;
  593. static yy_state_type yy_last_accepting_state;
  594. @@ -662,7 +664,7 @@ static int dts_version = 1;
  595. static void push_input_file(const char *filename);
  596. static bool pop_input_file(void);
  597. static void lexical_error(const char *fmt, ...);
  598. -#line 666 "dtc-lexer.lex.c"
  599. +#line 668 "dtc-lexer.lex.c"
  600. #define INITIAL 0
  601. #define BYTESTRING 1
  602. @@ -704,7 +706,7 @@ FILE *yyget_out (void );
  603. void yyset_out (FILE * out_str );
  604. -yy_size_t yyget_leng (void );
  605. +int yyget_leng (void );
  606. char *yyget_text (void );
  607. @@ -853,6 +855,10 @@ YY_DECL
  608. register char *yy_cp, *yy_bp;
  609. register int yy_act;
  610. +#line 68 "dtc-lexer.l"
  611. +
  612. +#line 861 "dtc-lexer.lex.c"
  613. +
  614. if ( !(yy_init) )
  615. {
  616. (yy_init) = 1;
  617. @@ -879,11 +885,6 @@ YY_DECL
  618. yy_load_buffer_state( );
  619. }
  620. - {
  621. -#line 68 "dtc-lexer.l"
  622. -
  623. -#line 886 "dtc-lexer.lex.c"
  624. -
  625. while ( 1 ) /* loops until end-of-file is reached */
  626. {
  627. yy_cp = (yy_c_buf_p);
  628. @@ -901,7 +902,7 @@ YY_DECL
  629. yy_match:
  630. do
  631. {
  632. - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
  633. + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  634. if ( yy_accept[yy_current_state] )
  635. {
  636. (yy_last_accepting_state) = yy_current_state;
  637. @@ -910,13 +911,13 @@ yy_match:
  638. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  639. {
  640. yy_current_state = (int) yy_def[yy_current_state];
  641. - if ( yy_current_state >= 159 )
  642. + if ( yy_current_state >= 166 )
  643. yy_c = yy_meta[(unsigned int) yy_c];
  644. }
  645. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  646. ++yy_cp;
  647. }
  648. - while ( yy_current_state != 158 );
  649. + while ( yy_current_state != 165 );
  650. yy_cp = (yy_last_accepting_cpos);
  651. yy_current_state = (yy_last_accepting_state);
  652. @@ -1007,23 +1008,31 @@ case 5:
  653. YY_RULE_SETUP
  654. #line 116 "dtc-lexer.l"
  655. {
  656. + DPRINT("Keyword: /plugin/\n");
  657. + return DT_PLUGIN;
  658. + }
  659. + YY_BREAK
  660. +case 6:
  661. +YY_RULE_SETUP
  662. +#line 121 "dtc-lexer.l"
  663. +{
  664. DPRINT("Keyword: /memreserve/\n");
  665. BEGIN_DEFAULT();
  666. return DT_MEMRESERVE;
  667. }
  668. YY_BREAK
  669. -case 6:
  670. +case 7:
  671. YY_RULE_SETUP
  672. -#line 122 "dtc-lexer.l"
  673. +#line 127 "dtc-lexer.l"
  674. {
  675. DPRINT("Keyword: /bits/\n");
  676. BEGIN_DEFAULT();
  677. return DT_BITS;
  678. }
  679. YY_BREAK
  680. -case 7:
  681. +case 8:
  682. YY_RULE_SETUP
  683. -#line 128 "dtc-lexer.l"
  684. +#line 133 "dtc-lexer.l"
  685. {
  686. DPRINT("Keyword: /delete-property/\n");
  687. DPRINT("<PROPNODENAME>\n");
  688. @@ -1031,9 +1040,9 @@ YY_RULE_SETUP
  689. return DT_DEL_PROP;
  690. }
  691. YY_BREAK
  692. -case 8:
  693. +case 9:
  694. YY_RULE_SETUP
  695. -#line 135 "dtc-lexer.l"
  696. +#line 140 "dtc-lexer.l"
  697. {
  698. DPRINT("Keyword: /delete-node/\n");
  699. DPRINT("<PROPNODENAME>\n");
  700. @@ -1041,9 +1050,9 @@ YY_RULE_SETUP
  701. return DT_DEL_NODE;
  702. }
  703. YY_BREAK
  704. -case 9:
  705. +case 10:
  706. YY_RULE_SETUP
  707. -#line 142 "dtc-lexer.l"
  708. +#line 147 "dtc-lexer.l"
  709. {
  710. DPRINT("Label: %s\n", yytext);
  711. yylval.labelref = xstrdup(yytext);
  712. @@ -1051,9 +1060,9 @@ YY_RULE_SETUP
  713. return DT_LABEL;
  714. }
  715. YY_BREAK
  716. -case 10:
  717. +case 11:
  718. YY_RULE_SETUP
  719. -#line 149 "dtc-lexer.l"
  720. +#line 154 "dtc-lexer.l"
  721. {
  722. char *e;
  723. DPRINT("Integer Literal: '%s'\n", yytext);
  724. @@ -1073,10 +1082,10 @@ YY_RULE_SETUP
  725. return DT_LITERAL;
  726. }
  727. YY_BREAK
  728. -case 11:
  729. -/* rule 11 can match eol */
  730. +case 12:
  731. +/* rule 12 can match eol */
  732. YY_RULE_SETUP
  733. -#line 168 "dtc-lexer.l"
  734. +#line 173 "dtc-lexer.l"
  735. {
  736. struct data d;
  737. DPRINT("Character literal: %s\n", yytext);
  738. @@ -1098,18 +1107,18 @@ YY_RULE_SETUP
  739. return DT_CHAR_LITERAL;
  740. }
  741. YY_BREAK
  742. -case 12:
  743. +case 13:
  744. YY_RULE_SETUP
  745. -#line 189 "dtc-lexer.l"
  746. +#line 194 "dtc-lexer.l"
  747. { /* label reference */
  748. DPRINT("Ref: %s\n", yytext+1);
  749. yylval.labelref = xstrdup(yytext+1);
  750. return DT_REF;
  751. }
  752. YY_BREAK
  753. -case 13:
  754. +case 14:
  755. YY_RULE_SETUP
  756. -#line 195 "dtc-lexer.l"
  757. +#line 200 "dtc-lexer.l"
  758. { /* new-style path reference */
  759. yytext[yyleng-1] = '\0';
  760. DPRINT("Ref: %s\n", yytext+2);
  761. @@ -1117,27 +1126,27 @@ YY_RULE_SETUP
  762. return DT_REF;
  763. }
  764. YY_BREAK
  765. -case 14:
  766. +case 15:
  767. YY_RULE_SETUP
  768. -#line 202 "dtc-lexer.l"
  769. +#line 207 "dtc-lexer.l"
  770. {
  771. yylval.byte = strtol(yytext, NULL, 16);
  772. DPRINT("Byte: %02x\n", (int)yylval.byte);
  773. return DT_BYTE;
  774. }
  775. YY_BREAK
  776. -case 15:
  777. +case 16:
  778. YY_RULE_SETUP
  779. -#line 208 "dtc-lexer.l"
  780. +#line 213 "dtc-lexer.l"
  781. {
  782. DPRINT("/BYTESTRING\n");
  783. BEGIN_DEFAULT();
  784. return ']';
  785. }
  786. YY_BREAK
  787. -case 16:
  788. +case 17:
  789. YY_RULE_SETUP
  790. -#line 214 "dtc-lexer.l"
  791. +#line 219 "dtc-lexer.l"
  792. {
  793. DPRINT("PropNodeName: %s\n", yytext);
  794. yylval.propnodename = xstrdup((yytext[0] == '\\') ?
  795. @@ -1146,75 +1155,75 @@ YY_RULE_SETUP
  796. return DT_PROPNODENAME;
  797. }
  798. YY_BREAK
  799. -case 17:
  800. +case 18:
  801. YY_RULE_SETUP
  802. -#line 222 "dtc-lexer.l"
  803. +#line 227 "dtc-lexer.l"
  804. {
  805. DPRINT("Binary Include\n");
  806. return DT_INCBIN;
  807. }
  808. YY_BREAK
  809. -case 18:
  810. -/* rule 18 can match eol */
  811. -YY_RULE_SETUP
  812. -#line 227 "dtc-lexer.l"
  813. -/* eat whitespace */
  814. - YY_BREAK
  815. case 19:
  816. /* rule 19 can match eol */
  817. YY_RULE_SETUP
  818. -#line 228 "dtc-lexer.l"
  819. -/* eat C-style comments */
  820. +#line 232 "dtc-lexer.l"
  821. +/* eat whitespace */
  822. YY_BREAK
  823. case 20:
  824. /* rule 20 can match eol */
  825. YY_RULE_SETUP
  826. -#line 229 "dtc-lexer.l"
  827. -/* eat C++-style comments */
  828. +#line 233 "dtc-lexer.l"
  829. +/* eat C-style comments */
  830. YY_BREAK
  831. case 21:
  832. +/* rule 21 can match eol */
  833. YY_RULE_SETUP
  834. -#line 231 "dtc-lexer.l"
  835. -{ return DT_LSHIFT; };
  836. +#line 234 "dtc-lexer.l"
  837. +/* eat C++-style comments */
  838. YY_BREAK
  839. case 22:
  840. YY_RULE_SETUP
  841. -#line 232 "dtc-lexer.l"
  842. -{ return DT_RSHIFT; };
  843. +#line 236 "dtc-lexer.l"
  844. +{ return DT_LSHIFT; };
  845. YY_BREAK
  846. case 23:
  847. YY_RULE_SETUP
  848. -#line 233 "dtc-lexer.l"
  849. -{ return DT_LE; };
  850. +#line 237 "dtc-lexer.l"
  851. +{ return DT_RSHIFT; };
  852. YY_BREAK
  853. case 24:
  854. YY_RULE_SETUP
  855. -#line 234 "dtc-lexer.l"
  856. -{ return DT_GE; };
  857. +#line 238 "dtc-lexer.l"
  858. +{ return DT_LE; };
  859. YY_BREAK
  860. case 25:
  861. YY_RULE_SETUP
  862. -#line 235 "dtc-lexer.l"
  863. -{ return DT_EQ; };
  864. +#line 239 "dtc-lexer.l"
  865. +{ return DT_GE; };
  866. YY_BREAK
  867. case 26:
  868. YY_RULE_SETUP
  869. -#line 236 "dtc-lexer.l"
  870. -{ return DT_NE; };
  871. +#line 240 "dtc-lexer.l"
  872. +{ return DT_EQ; };
  873. YY_BREAK
  874. case 27:
  875. YY_RULE_SETUP
  876. -#line 237 "dtc-lexer.l"
  877. -{ return DT_AND; };
  878. +#line 241 "dtc-lexer.l"
  879. +{ return DT_NE; };
  880. YY_BREAK
  881. case 28:
  882. YY_RULE_SETUP
  883. -#line 238 "dtc-lexer.l"
  884. -{ return DT_OR; };
  885. +#line 242 "dtc-lexer.l"
  886. +{ return DT_AND; };
  887. YY_BREAK
  888. case 29:
  889. YY_RULE_SETUP
  890. -#line 240 "dtc-lexer.l"
  891. +#line 243 "dtc-lexer.l"
  892. +{ return DT_OR; };
  893. + YY_BREAK
  894. +case 30:
  895. +YY_RULE_SETUP
  896. +#line 245 "dtc-lexer.l"
  897. {
  898. DPRINT("Char: %c (\\x%02x)\n", yytext[0],
  899. (unsigned)yytext[0]);
  900. @@ -1230,12 +1239,12 @@ YY_RULE_SETUP
  901. return yytext[0];
  902. }
  903. YY_BREAK
  904. -case 30:
  905. +case 31:
  906. YY_RULE_SETUP
  907. -#line 255 "dtc-lexer.l"
  908. +#line 260 "dtc-lexer.l"
  909. ECHO;
  910. YY_BREAK
  911. -#line 1239 "dtc-lexer.lex.c"
  912. +#line 1248 "dtc-lexer.lex.c"
  913. case YY_END_OF_BUFFER:
  914. {
  915. @@ -1365,7 +1374,6 @@ ECHO;
  916. "fatal flex scanner internal error--no action found" );
  917. } /* end of action switch */
  918. } /* end of scanning one token */
  919. - } /* end of user's declarations */
  920. } /* end of yylex */
  921. /* yy_get_next_buffer - try to read in a new buffer
  922. @@ -1421,21 +1429,21 @@ static int yy_get_next_buffer (void)
  923. else
  924. {
  925. - yy_size_t num_to_read =
  926. + int num_to_read =
  927. YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  928. while ( num_to_read <= 0 )
  929. { /* Not enough room in the buffer - grow it. */
  930. /* just a shorter name for the current buffer */
  931. - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
  932. + YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
  933. int yy_c_buf_p_offset =
  934. (int) ((yy_c_buf_p) - b->yy_ch_buf);
  935. if ( b->yy_is_our_buffer )
  936. {
  937. - yy_size_t new_size = b->yy_buf_size * 2;
  938. + int new_size = b->yy_buf_size * 2;
  939. if ( new_size <= 0 )
  940. b->yy_buf_size += b->yy_buf_size / 8;
  941. @@ -1466,7 +1474,7 @@ static int yy_get_next_buffer (void)
  942. /* Read in more data. */
  943. YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  944. - (yy_n_chars), num_to_read );
  945. + (yy_n_chars), (size_t) num_to_read );
  946. YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  947. }
  948. @@ -1528,7 +1536,7 @@ static int yy_get_next_buffer (void)
  949. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  950. {
  951. yy_current_state = (int) yy_def[yy_current_state];
  952. - if ( yy_current_state >= 159 )
  953. + if ( yy_current_state >= 166 )
  954. yy_c = yy_meta[(unsigned int) yy_c];
  955. }
  956. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  957. @@ -1556,13 +1564,13 @@ static int yy_get_next_buffer (void)
  958. while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  959. {
  960. yy_current_state = (int) yy_def[yy_current_state];
  961. - if ( yy_current_state >= 159 )
  962. + if ( yy_current_state >= 166 )
  963. yy_c = yy_meta[(unsigned int) yy_c];
  964. }
  965. yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  966. - yy_is_jam = (yy_current_state == 158);
  967. + yy_is_jam = (yy_current_state == 165);
  968. - return yy_is_jam ? 0 : yy_current_state;
  969. + return yy_is_jam ? 0 : yy_current_state;
  970. }
  971. #ifndef YY_NO_INPUT
  972. @@ -1589,7 +1597,7 @@ static int yy_get_next_buffer (void)
  973. else
  974. { /* need more input */
  975. - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
  976. + int offset = (yy_c_buf_p) - (yytext_ptr);
  977. ++(yy_c_buf_p);
  978. switch ( yy_get_next_buffer( ) )
  979. @@ -1863,7 +1871,7 @@ void yypop_buffer_state (void)
  980. */
  981. static void yyensure_buffer_stack (void)
  982. {
  983. - yy_size_t num_to_alloc;
  984. + int num_to_alloc;
  985. if (!(yy_buffer_stack)) {
  986. @@ -1960,12 +1968,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst
  987. *
  988. * @return the newly allocated buffer state object.
  989. */
  990. -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
  991. +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
  992. {
  993. YY_BUFFER_STATE b;
  994. char *buf;
  995. yy_size_t n;
  996. - yy_size_t i;
  997. + int i;
  998. /* Get memory for full buffer, including space for trailing EOB's. */
  999. n = _yybytes_len + 2;
  1000. @@ -2047,7 +2055,7 @@ FILE *yyget_out (void)
  1001. /** Get the length of the current token.
  1002. *
  1003. */
  1004. -yy_size_t yyget_leng (void)
  1005. +int yyget_leng (void)
  1006. {
  1007. return yyleng;
  1008. }
  1009. @@ -2195,7 +2203,7 @@ void yyfree (void * ptr )
  1010. #define YYTABLES_NAME "yytables"
  1011. -#line 254 "dtc-lexer.l"
  1012. +#line 260 "dtc-lexer.l"
  1013. --- a/scripts/dtc/dtc-parser.tab.c_shipped
  1014. +++ b/scripts/dtc/dtc-parser.tab.c_shipped
  1015. @@ -1,19 +1,19 @@
  1016. -/* A Bison parser, made by GNU Bison 3.0.2. */
  1017. +/* A Bison parser, made by GNU Bison 2.5. */
  1018. /* Bison implementation for Yacc-like parsers in C
  1019. -
  1020. - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
  1021. -
  1022. +
  1023. + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
  1024. +
  1025. This program is free software: you can redistribute it and/or modify
  1026. it under the terms of the GNU General Public License as published by
  1027. the Free Software Foundation, either version 3 of the License, or
  1028. (at your option) any later version.
  1029. -
  1030. +
  1031. This program is distributed in the hope that it will be useful,
  1032. but WITHOUT ANY WARRANTY; without even the implied warranty of
  1033. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1034. GNU General Public License for more details.
  1035. -
  1036. +
  1037. You should have received a copy of the GNU General Public License
  1038. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  1039. @@ -26,7 +26,7 @@
  1040. special exception, which will cause the skeleton and the resulting
  1041. Bison output files to be licensed under the GNU General Public
  1042. License without this special exception.
  1043. -
  1044. +
  1045. This special exception was added by the Free Software Foundation in
  1046. version 2.2 of Bison. */
  1047. @@ -44,7 +44,7 @@
  1048. #define YYBISON 1
  1049. /* Bison version. */
  1050. -#define YYBISON_VERSION "3.0.2"
  1051. +#define YYBISON_VERSION "2.5"
  1052. /* Skeleton name. */
  1053. #define YYSKELETON_NAME "yacc.c"
  1054. @@ -58,13 +58,18 @@
  1055. /* Pull parsers. */
  1056. #define YYPULL 1
  1057. +/* Using locations. */
  1058. +#define YYLSP_NEEDED 1
  1059. /* Copy the first part of user declarations. */
  1060. -#line 20 "dtc-parser.y" /* yacc.c:339 */
  1061. +
  1062. +/* Line 268 of yacc.c */
  1063. +#line 20 "dtc-parser.y"
  1064. #include <stdio.h>
  1065. +#include <inttypes.h>
  1066. #include "dtc.h"
  1067. #include "srcpos.h"
  1068. @@ -80,15 +85,14 @@ extern void yyerror(char const *s);
  1069. extern struct boot_info *the_boot_info;
  1070. extern bool treesource_error;
  1071. -#line 84 "dtc-parser.tab.c" /* yacc.c:339 */
  1072. -# ifndef YY_NULLPTR
  1073. -# if defined __cplusplus && 201103L <= __cplusplus
  1074. -# define YY_NULLPTR nullptr
  1075. -# else
  1076. -# define YY_NULLPTR 0
  1077. -# endif
  1078. -# endif
  1079. +/* Line 268 of yacc.c */
  1080. +#line 91 "dtc-parser.tab.c"
  1081. +
  1082. +/* Enabling traces. */
  1083. +#ifndef YYDEBUG
  1084. +# define YYDEBUG 0
  1085. +#endif
  1086. /* Enabling verbose error messages. */
  1087. #ifdef YYERROR_VERBOSE
  1088. @@ -98,53 +102,51 @@ extern bool treesource_error;
  1089. # define YYERROR_VERBOSE 0
  1090. #endif
  1091. -/* In a future release of Bison, this section will be replaced
  1092. - by #include "dtc-parser.tab.h". */
  1093. -#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED
  1094. -# define YY_YY_DTC_PARSER_TAB_H_INCLUDED
  1095. -/* Debug traces. */
  1096. -#ifndef YYDEBUG
  1097. -# define YYDEBUG 0
  1098. -#endif
  1099. -#if YYDEBUG
  1100. -extern int yydebug;
  1101. +/* Enabling the token table. */
  1102. +#ifndef YYTOKEN_TABLE
  1103. +# define YYTOKEN_TABLE 0
  1104. #endif
  1105. -/* Token type. */
  1106. +
  1107. +/* Tokens. */
  1108. #ifndef YYTOKENTYPE
  1109. # define YYTOKENTYPE
  1110. - enum yytokentype
  1111. - {
  1112. - DT_V1 = 258,
  1113. - DT_MEMRESERVE = 259,
  1114. - DT_LSHIFT = 260,
  1115. - DT_RSHIFT = 261,
  1116. - DT_LE = 262,
  1117. - DT_GE = 263,
  1118. - DT_EQ = 264,
  1119. - DT_NE = 265,
  1120. - DT_AND = 266,
  1121. - DT_OR = 267,
  1122. - DT_BITS = 268,
  1123. - DT_DEL_PROP = 269,
  1124. - DT_DEL_NODE = 270,
  1125. - DT_PROPNODENAME = 271,
  1126. - DT_LITERAL = 272,
  1127. - DT_CHAR_LITERAL = 273,
  1128. - DT_BYTE = 274,
  1129. - DT_STRING = 275,
  1130. - DT_LABEL = 276,
  1131. - DT_REF = 277,
  1132. - DT_INCBIN = 278
  1133. - };
  1134. + /* Put the tokens into the symbol table, so that GDB and other debuggers
  1135. + know about them. */
  1136. + enum yytokentype {
  1137. + DT_V1 = 258,
  1138. + DT_PLUGIN = 259,
  1139. + DT_MEMRESERVE = 260,
  1140. + DT_LSHIFT = 261,
  1141. + DT_RSHIFT = 262,
  1142. + DT_LE = 263,
  1143. + DT_GE = 264,
  1144. + DT_EQ = 265,
  1145. + DT_NE = 266,
  1146. + DT_AND = 267,
  1147. + DT_OR = 268,
  1148. + DT_BITS = 269,
  1149. + DT_DEL_PROP = 270,
  1150. + DT_DEL_NODE = 271,
  1151. + DT_PROPNODENAME = 272,
  1152. + DT_LITERAL = 273,
  1153. + DT_CHAR_LITERAL = 274,
  1154. + DT_BYTE = 275,
  1155. + DT_STRING = 276,
  1156. + DT_LABEL = 277,
  1157. + DT_REF = 278,
  1158. + DT_INCBIN = 279
  1159. + };
  1160. #endif
  1161. -/* Value type. */
  1162. +
  1163. +
  1164. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  1165. -typedef union YYSTYPE YYSTYPE;
  1166. -union YYSTYPE
  1167. +typedef union YYSTYPE
  1168. {
  1169. -#line 38 "dtc-parser.y" /* yacc.c:355 */
  1170. +
  1171. +/* Line 293 of yacc.c */
  1172. +#line 39 "dtc-parser.y"
  1173. char *propnodename;
  1174. char *labelref;
  1175. @@ -162,37 +164,37 @@ union YYSTYPE
  1176. struct node *nodelist;
  1177. struct reserve_info *re;
  1178. uint64_t integer;
  1179. + int is_plugin;
  1180. -#line 167 "dtc-parser.tab.c" /* yacc.c:355 */
  1181. -};
  1182. +
  1183. +
  1184. +/* Line 293 of yacc.c */
  1185. +#line 173 "dtc-parser.tab.c"
  1186. +} YYSTYPE;
  1187. # define YYSTYPE_IS_TRIVIAL 1
  1188. +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
  1189. # define YYSTYPE_IS_DECLARED 1
  1190. #endif
  1191. -/* Location type. */
  1192. #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
  1193. -typedef struct YYLTYPE YYLTYPE;
  1194. -struct YYLTYPE
  1195. +typedef struct YYLTYPE
  1196. {
  1197. int first_line;
  1198. int first_column;
  1199. int last_line;
  1200. int last_column;
  1201. -};
  1202. +} YYLTYPE;
  1203. +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
  1204. # define YYLTYPE_IS_DECLARED 1
  1205. # define YYLTYPE_IS_TRIVIAL 1
  1206. #endif
  1207. -extern YYSTYPE yylval;
  1208. -extern YYLTYPE yylloc;
  1209. -int yyparse (void);
  1210. -
  1211. -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */
  1212. -
  1213. /* Copy the second part of user declarations. */
  1214. -#line 196 "dtc-parser.tab.c" /* yacc.c:358 */
  1215. +
  1216. +/* Line 343 of yacc.c */
  1217. +#line 198 "dtc-parser.tab.c"
  1218. #ifdef short
  1219. # undef short
  1220. @@ -206,8 +208,11 @@ typedef unsigned char yytype_uint8;
  1221. #ifdef YYTYPE_INT8
  1222. typedef YYTYPE_INT8 yytype_int8;
  1223. -#else
  1224. +#elif (defined __STDC__ || defined __C99__FUNC__ \
  1225. + || defined __cplusplus || defined _MSC_VER)
  1226. typedef signed char yytype_int8;
  1227. +#else
  1228. +typedef short int yytype_int8;
  1229. #endif
  1230. #ifdef YYTYPE_UINT16
  1231. @@ -227,7 +232,8 @@ typedef short int yytype_int16;
  1232. # define YYSIZE_T __SIZE_TYPE__
  1233. # elif defined size_t
  1234. # define YYSIZE_T size_t
  1235. -# elif ! defined YYSIZE_T
  1236. +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
  1237. + || defined __cplusplus || defined _MSC_VER)
  1238. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  1239. # define YYSIZE_T size_t
  1240. # else
  1241. @@ -241,68 +247,39 @@ typedef short int yytype_int16;
  1242. # if defined YYENABLE_NLS && YYENABLE_NLS
  1243. # if ENABLE_NLS
  1244. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  1245. -# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
  1246. +# define YY_(msgid) dgettext ("bison-runtime", msgid)
  1247. # endif
  1248. # endif
  1249. # ifndef YY_
  1250. -# define YY_(Msgid) Msgid
  1251. -# endif
  1252. -#endif
  1253. -
  1254. -#ifndef YY_ATTRIBUTE
  1255. -# if (defined __GNUC__ \
  1256. - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
  1257. - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
  1258. -# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
  1259. -# else
  1260. -# define YY_ATTRIBUTE(Spec) /* empty */
  1261. -# endif
  1262. -#endif
  1263. -
  1264. -#ifndef YY_ATTRIBUTE_PURE
  1265. -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
  1266. -#endif
  1267. -
  1268. -#ifndef YY_ATTRIBUTE_UNUSED
  1269. -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
  1270. -#endif
  1271. -
  1272. -#if !defined _Noreturn \
  1273. - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
  1274. -# if defined _MSC_VER && 1200 <= _MSC_VER
  1275. -# define _Noreturn __declspec (noreturn)
  1276. -# else
  1277. -# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
  1278. +# define YY_(msgid) msgid
  1279. # endif
  1280. #endif
  1281. /* Suppress unused-variable warnings by "using" E. */
  1282. #if ! defined lint || defined __GNUC__
  1283. -# define YYUSE(E) ((void) (E))
  1284. +# define YYUSE(e) ((void) (e))
  1285. #else
  1286. -# define YYUSE(E) /* empty */
  1287. +# define YYUSE(e) /* empty */
  1288. #endif
  1289. -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
  1290. -/* Suppress an incorrect diagnostic about yylval being uninitialized. */
  1291. -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  1292. - _Pragma ("GCC diagnostic push") \
  1293. - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
  1294. - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  1295. -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
  1296. - _Pragma ("GCC diagnostic pop")
  1297. +/* Identity function, used to suppress warnings about constant conditions. */
  1298. +#ifndef lint
  1299. +# define YYID(n) (n)
  1300. #else
  1301. -# define YY_INITIAL_VALUE(Value) Value
  1302. -#endif
  1303. -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1304. -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1305. -# define YY_IGNORE_MAYBE_UNINITIALIZED_END
  1306. +#if (defined __STDC__ || defined __C99__FUNC__ \
  1307. + || defined __cplusplus || defined _MSC_VER)
  1308. +static int
  1309. +YYID (int yyi)
  1310. +#else
  1311. +static int
  1312. +YYID (yyi)
  1313. + int yyi;
  1314. #endif
  1315. -#ifndef YY_INITIAL_VALUE
  1316. -# define YY_INITIAL_VALUE(Value) /* Nothing. */
  1317. +{
  1318. + return yyi;
  1319. +}
  1320. #endif
  1321. -
  1322. #if ! defined yyoverflow || YYERROR_VERBOSE
  1323. /* The parser invokes alloca or malloc; define the necessary symbols. */
  1324. @@ -320,9 +297,9 @@ typedef short int yytype_int16;
  1325. # define alloca _alloca
  1326. # else
  1327. # define YYSTACK_ALLOC alloca
  1328. -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
  1329. +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
  1330. + || defined __cplusplus || defined _MSC_VER)
  1331. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  1332. - /* Use EXIT_SUCCESS as a witness for stdlib.h. */
  1333. # ifndef EXIT_SUCCESS
  1334. # define EXIT_SUCCESS 0
  1335. # endif
  1336. @@ -332,8 +309,8 @@ typedef short int yytype_int16;
  1337. # endif
  1338. # ifdef YYSTACK_ALLOC
  1339. - /* Pacify GCC's 'empty if-body' warning. */
  1340. -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  1341. + /* Pacify GCC's `empty if-body' warning. */
  1342. +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
  1343. # ifndef YYSTACK_ALLOC_MAXIMUM
  1344. /* The OS might guarantee only one guard page at the bottom of the stack,
  1345. and a page size can be as small as 4096 bytes. So we cannot safely
  1346. @@ -349,7 +326,7 @@ typedef short int yytype_int16;
  1347. # endif
  1348. # if (defined __cplusplus && ! defined EXIT_SUCCESS \
  1349. && ! ((defined YYMALLOC || defined malloc) \
  1350. - && (defined YYFREE || defined free)))
  1351. + && (defined YYFREE || defined free)))
  1352. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  1353. # ifndef EXIT_SUCCESS
  1354. # define EXIT_SUCCESS 0
  1355. @@ -357,13 +334,15 @@ typedef short int yytype_int16;
  1356. # endif
  1357. # ifndef YYMALLOC
  1358. # define YYMALLOC malloc
  1359. -# if ! defined malloc && ! defined EXIT_SUCCESS
  1360. +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
  1361. + || defined __cplusplus || defined _MSC_VER)
  1362. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  1363. # endif
  1364. # endif
  1365. # ifndef YYFREE
  1366. # define YYFREE free
  1367. -# if ! defined free && ! defined EXIT_SUCCESS
  1368. +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
  1369. + || defined __cplusplus || defined _MSC_VER)
  1370. void free (void *); /* INFRINGES ON USER NAME SPACE */
  1371. # endif
  1372. # endif
  1373. @@ -373,8 +352,8 @@ void free (void *); /* INFRINGES ON USER
  1374. #if (! defined yyoverflow \
  1375. && (! defined __cplusplus \
  1376. - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
  1377. - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  1378. + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
  1379. + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  1380. /* A type that is properly aligned for any stack member. */
  1381. union yyalloc
  1382. @@ -400,35 +379,35 @@ union yyalloc
  1383. elements in the stack, and YYPTR gives the new location of the
  1384. stack. Advance YYPTR to a properly aligned location for the next
  1385. stack. */
  1386. -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  1387. - do \
  1388. - { \
  1389. - YYSIZE_T yynewbytes; \
  1390. - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  1391. - Stack = &yyptr->Stack_alloc; \
  1392. - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  1393. - yyptr += yynewbytes / sizeof (*yyptr); \
  1394. - } \
  1395. - while (0)
  1396. +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  1397. + do \
  1398. + { \
  1399. + YYSIZE_T yynewbytes; \
  1400. + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  1401. + Stack = &yyptr->Stack_alloc; \
  1402. + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  1403. + yyptr += yynewbytes / sizeof (*yyptr); \
  1404. + } \
  1405. + while (YYID (0))
  1406. #endif
  1407. #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
  1408. -/* Copy COUNT objects from SRC to DST. The source and destination do
  1409. +/* Copy COUNT objects from FROM to TO. The source and destination do
  1410. not overlap. */
  1411. # ifndef YYCOPY
  1412. # if defined __GNUC__ && 1 < __GNUC__
  1413. -# define YYCOPY(Dst, Src, Count) \
  1414. - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
  1415. +# define YYCOPY(To, From, Count) \
  1416. + __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
  1417. # else
  1418. -# define YYCOPY(Dst, Src, Count) \
  1419. - do \
  1420. - { \
  1421. - YYSIZE_T yyi; \
  1422. - for (yyi = 0; yyi < (Count); yyi++) \
  1423. - (Dst)[yyi] = (Src)[yyi]; \
  1424. - } \
  1425. - while (0)
  1426. +# define YYCOPY(To, From, Count) \
  1427. + do \
  1428. + { \
  1429. + YYSIZE_T yyi; \
  1430. + for (yyi = 0; yyi < (Count); yyi++) \
  1431. + (To)[yyi] = (From)[yyi]; \
  1432. + } \
  1433. + while (YYID (0))
  1434. # endif
  1435. # endif
  1436. #endif /* !YYCOPY_NEEDED */
  1437. @@ -439,39 +418,37 @@ union yyalloc
  1438. #define YYLAST 136
  1439. /* YYNTOKENS -- Number of terminals. */
  1440. -#define YYNTOKENS 47
  1441. +#define YYNTOKENS 48
  1442. /* YYNNTS -- Number of nonterminals. */
  1443. -#define YYNNTS 28
  1444. +#define YYNNTS 29
  1445. /* YYNRULES -- Number of rules. */
  1446. -#define YYNRULES 80
  1447. -/* YYNSTATES -- Number of states. */
  1448. -#define YYNSTATES 144
  1449. +#define YYNRULES 82
  1450. +/* YYNRULES -- Number of states. */
  1451. +#define YYNSTATES 147
  1452. -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
  1453. - by yylex, with out-of-bounds checking. */
  1454. +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
  1455. #define YYUNDEFTOK 2
  1456. -#define YYMAXUTOK 278
  1457. +#define YYMAXUTOK 279
  1458. -#define YYTRANSLATE(YYX) \
  1459. +#define YYTRANSLATE(YYX) \
  1460. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  1461. -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
  1462. - as returned by yylex, without out-of-bounds checking. */
  1463. +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
  1464. static const yytype_uint8 yytranslate[] =
  1465. {
  1466. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1467. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1468. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1469. - 2, 2, 2, 46, 2, 2, 2, 44, 40, 2,
  1470. - 32, 34, 43, 41, 33, 42, 2, 25, 2, 2,
  1471. - 2, 2, 2, 2, 2, 2, 2, 2, 37, 24,
  1472. - 35, 28, 29, 36, 2, 2, 2, 2, 2, 2,
  1473. + 2, 2, 2, 47, 2, 2, 2, 45, 41, 2,
  1474. + 33, 35, 44, 42, 34, 43, 2, 26, 2, 2,
  1475. + 2, 2, 2, 2, 2, 2, 2, 2, 38, 25,
  1476. + 36, 29, 30, 37, 2, 2, 2, 2, 2, 2,
  1477. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1478. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1479. - 2, 30, 2, 31, 39, 2, 2, 2, 2, 2,
  1480. + 2, 31, 2, 32, 40, 2, 2, 2, 2, 2,
  1481. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1482. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1483. - 2, 2, 2, 26, 38, 27, 45, 2, 2, 2,
  1484. + 2, 2, 2, 27, 39, 28, 46, 2, 2, 2,
  1485. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1486. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1487. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1488. @@ -486,292 +463,335 @@ static const yytype_uint8 yytranslate[]
  1489. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1490. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  1491. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  1492. - 15, 16, 17, 18, 19, 20, 21, 22, 23
  1493. + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
  1494. };
  1495. #if YYDEBUG
  1496. - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
  1497. +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
  1498. + YYRHS. */
  1499. +static const yytype_uint16 yyprhs[] =
  1500. +{
  1501. + 0, 0, 3, 9, 10, 13, 14, 17, 22, 25,
  1502. + 28, 32, 37, 41, 46, 52, 53, 56, 61, 64,
  1503. + 68, 71, 74, 78, 83, 86, 96, 102, 105, 106,
  1504. + 109, 112, 116, 118, 121, 124, 127, 129, 131, 135,
  1505. + 137, 139, 145, 147, 151, 153, 157, 159, 163, 165,
  1506. + 169, 171, 175, 177, 181, 185, 187, 191, 195, 199,
  1507. + 203, 207, 211, 213, 217, 221, 223, 227, 231, 235,
  1508. + 237, 239, 242, 245, 248, 249, 252, 255, 256, 259,
  1509. + 262, 265, 269
  1510. +};
  1511. +
  1512. +/* YYRHS -- A `-1'-separated list of the rules' RHS. */
  1513. +static const yytype_int8 yyrhs[] =
  1514. +{
  1515. + 49, 0, -1, 3, 25, 50, 51, 53, -1, -1,
  1516. + 4, 25, -1, -1, 52, 51, -1, 5, 60, 60,
  1517. + 25, -1, 22, 52, -1, 26, 54, -1, 53, 26,
  1518. + 54, -1, 53, 22, 23, 54, -1, 53, 23, 54,
  1519. + -1, 53, 16, 23, 25, -1, 27, 55, 75, 28,
  1520. + 25, -1, -1, 55, 56, -1, 17, 29, 57, 25,
  1521. + -1, 17, 25, -1, 15, 17, 25, -1, 22, 56,
  1522. + -1, 58, 21, -1, 58, 59, 30, -1, 58, 31,
  1523. + 74, 32, -1, 58, 23, -1, 58, 24, 33, 21,
  1524. + 34, 60, 34, 60, 35, -1, 58, 24, 33, 21,
  1525. + 35, -1, 57, 22, -1, -1, 57, 34, -1, 58,
  1526. + 22, -1, 14, 18, 36, -1, 36, -1, 59, 60,
  1527. + -1, 59, 23, -1, 59, 22, -1, 18, -1, 19,
  1528. + -1, 33, 61, 35, -1, 62, -1, 63, -1, 63,
  1529. + 37, 61, 38, 62, -1, 64, -1, 63, 13, 64,
  1530. + -1, 65, -1, 64, 12, 65, -1, 66, -1, 65,
  1531. + 39, 66, -1, 67, -1, 66, 40, 67, -1, 68,
  1532. + -1, 67, 41, 68, -1, 69, -1, 68, 10, 69,
  1533. + -1, 68, 11, 69, -1, 70, -1, 69, 36, 70,
  1534. + -1, 69, 30, 70, -1, 69, 8, 70, -1, 69,
  1535. + 9, 70, -1, 70, 6, 71, -1, 70, 7, 71,
  1536. + -1, 71, -1, 71, 42, 72, -1, 71, 43, 72,
  1537. + -1, 72, -1, 72, 44, 73, -1, 72, 26, 73,
  1538. + -1, 72, 45, 73, -1, 73, -1, 60, -1, 43,
  1539. + 73, -1, 46, 73, -1, 47, 73, -1, -1, 74,
  1540. + 20, -1, 74, 22, -1, -1, 76, 75, -1, 76,
  1541. + 56, -1, 17, 54, -1, 16, 17, 25, -1, 22,
  1542. + 76, -1
  1543. +};
  1544. +
  1545. +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  1546. static const yytype_uint16 yyrline[] =
  1547. {
  1548. - 0, 104, 104, 113, 116, 123, 127, 135, 139, 144,
  1549. - 155, 165, 180, 188, 191, 198, 202, 206, 210, 218,
  1550. - 222, 226, 230, 234, 250, 260, 268, 271, 275, 282,
  1551. - 298, 303, 322, 336, 343, 344, 345, 352, 356, 357,
  1552. - 361, 362, 366, 367, 371, 372, 376, 377, 381, 382,
  1553. - 386, 387, 388, 392, 393, 394, 395, 396, 400, 401,
  1554. - 402, 406, 407, 408, 412, 413, 414, 415, 419, 420,
  1555. - 421, 422, 427, 430, 434, 442, 445, 449, 457, 461,
  1556. - 465
  1557. + 0, 108, 108, 119, 122, 130, 133, 140, 144, 152,
  1558. + 156, 161, 172, 182, 197, 205, 208, 215, 219, 223,
  1559. + 227, 235, 239, 243, 247, 251, 267, 277, 285, 288,
  1560. + 292, 299, 315, 320, 339, 353, 360, 361, 362, 369,
  1561. + 373, 374, 378, 379, 383, 384, 388, 389, 393, 394,
  1562. + 398, 399, 403, 404, 405, 409, 410, 411, 412, 413,
  1563. + 417, 418, 419, 423, 424, 425, 429, 430, 431, 432,
  1564. + 436, 437, 438, 439, 444, 447, 451, 459, 462, 466,
  1565. + 474, 478, 482
  1566. };
  1567. #endif
  1568. -#if YYDEBUG || YYERROR_VERBOSE || 0
  1569. +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
  1570. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  1571. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  1572. static const char *const yytname[] =
  1573. {
  1574. - "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT",
  1575. - "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR",
  1576. - "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL",
  1577. - "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF",
  1578. - "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", "']'",
  1579. - "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", "'+'",
  1580. - "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
  1581. - "memreserves", "memreserve", "devicetree", "nodedef", "proplist",
  1582. - "propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim",
  1583. - "integer_expr", "integer_trinary", "integer_or", "integer_and",
  1584. - "integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq",
  1585. - "integer_rela", "integer_shift", "integer_add", "integer_mul",
  1586. - "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR
  1587. + "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "DT_MEMRESERVE",
  1588. + "DT_LSHIFT", "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND",
  1589. + "DT_OR", "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME",
  1590. + "DT_LITERAL", "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL",
  1591. + "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['",
  1592. + "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'",
  1593. + "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
  1594. + "plugindecl", "memreserves", "memreserve", "devicetree", "nodedef",
  1595. + "proplist", "propdef", "propdata", "propdataprefix", "arrayprefix",
  1596. + "integer_prim", "integer_expr", "integer_trinary", "integer_or",
  1597. + "integer_and", "integer_bitor", "integer_bitxor", "integer_bitand",
  1598. + "integer_eq", "integer_rela", "integer_shift", "integer_add",
  1599. + "integer_mul", "integer_unary", "bytestring", "subnodes", "subnode", 0
  1600. };
  1601. #endif
  1602. # ifdef YYPRINT
  1603. -/* YYTOKNUM[NUM] -- (External) token number corresponding to the
  1604. - (internal) symbol number NUM (which must be that of a token). */
  1605. +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
  1606. + token YYLEX-NUM. */
  1607. static const yytype_uint16 yytoknum[] =
  1608. {
  1609. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  1610. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  1611. - 275, 276, 277, 278, 59, 47, 123, 125, 61, 62,
  1612. - 91, 93, 40, 44, 41, 60, 63, 58, 124, 94,
  1613. - 38, 43, 45, 42, 37, 126, 33
  1614. + 275, 276, 277, 278, 279, 59, 47, 123, 125, 61,
  1615. + 62, 91, 93, 40, 44, 41, 60, 63, 58, 124,
  1616. + 94, 38, 43, 45, 42, 37, 126, 33
  1617. };
  1618. # endif
  1619. -#define YYPACT_NINF -81
  1620. -
  1621. -#define yypact_value_is_default(Yystate) \
  1622. - (!!((Yystate) == (-81)))
  1623. -
  1624. -#define YYTABLE_NINF -1
  1625. -
  1626. -#define yytable_value_is_error(Yytable_value) \
  1627. - 0
  1628. -
  1629. - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  1630. - STATE-NUM. */
  1631. -static const yytype_int8 yypact[] =
  1632. +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  1633. +static const yytype_uint8 yyr1[] =
  1634. {
  1635. - 16, -11, 21, 10, -81, 25, 10, 19, 10, -81,
  1636. - -81, -9, 25, -81, 2, 51, -81, -9, -9, -9,
  1637. - -81, 1, -81, -6, 50, 14, 28, 29, 36, 3,
  1638. - 58, 44, -3, -81, 47, -81, -81, 65, 68, 2,
  1639. - 2, -81, -81, -81, -81, -9, -9, -9, -9, -9,
  1640. - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
  1641. - -9, -9, -9, -9, -81, 63, 69, 2, -81, -81,
  1642. - 50, 57, 14, 28, 29, 36, 3, 3, 58, 58,
  1643. - 58, 58, 44, 44, -3, -3, -81, -81, -81, 79,
  1644. - 80, -8, 63, -81, 72, 63, -81, -81, -9, 76,
  1645. - 77, -81, -81, -81, -81, -81, 78, -81, -81, -81,
  1646. - -81, -81, 35, 4, -81, -81, -81, -81, 86, -81,
  1647. - -81, -81, 73, -81, -81, 33, 71, 84, 39, -81,
  1648. - -81, -81, -81, -81, 41, -81, -81, -81, 25, -81,
  1649. - 74, 25, 75, -81
  1650. + 0, 48, 49, 50, 50, 51, 51, 52, 52, 53,
  1651. + 53, 53, 53, 53, 54, 55, 55, 56, 56, 56,
  1652. + 56, 57, 57, 57, 57, 57, 57, 57, 58, 58,
  1653. + 58, 59, 59, 59, 59, 59, 60, 60, 60, 61,
  1654. + 62, 62, 63, 63, 64, 64, 65, 65, 66, 66,
  1655. + 67, 67, 68, 68, 68, 69, 69, 69, 69, 69,
  1656. + 70, 70, 70, 71, 71, 71, 72, 72, 72, 72,
  1657. + 73, 73, 73, 73, 74, 74, 74, 75, 75, 75,
  1658. + 76, 76, 76
  1659. };
  1660. - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  1661. - Performed when YYTABLE does not specify something else to do. Zero
  1662. - means the default is an error. */
  1663. -static const yytype_uint8 yydefact[] =
  1664. +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  1665. +static const yytype_uint8 yyr2[] =
  1666. {
  1667. - 0, 0, 0, 3, 1, 0, 0, 0, 3, 34,
  1668. - 35, 0, 0, 6, 0, 2, 4, 0, 0, 0,
  1669. - 68, 0, 37, 38, 40, 42, 44, 46, 48, 50,
  1670. - 53, 60, 63, 67, 0, 13, 7, 0, 0, 0,
  1671. - 0, 69, 70, 71, 36, 0, 0, 0, 0, 0,
  1672. - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1673. - 0, 0, 0, 0, 5, 75, 0, 0, 10, 8,
  1674. - 41, 0, 43, 45, 47, 49, 51, 52, 56, 57,
  1675. - 55, 54, 58, 59, 61, 62, 65, 64, 66, 0,
  1676. - 0, 0, 0, 14, 0, 75, 11, 9, 0, 0,
  1677. - 0, 16, 26, 78, 18, 80, 0, 77, 76, 39,
  1678. - 17, 79, 0, 0, 12, 25, 15, 27, 0, 19,
  1679. - 28, 22, 0, 72, 30, 0, 0, 0, 0, 33,
  1680. - 32, 20, 31, 29, 0, 73, 74, 21, 0, 24,
  1681. - 0, 0, 0, 23
  1682. + 0, 2, 5, 0, 2, 0, 2, 4, 2, 2,
  1683. + 3, 4, 3, 4, 5, 0, 2, 4, 2, 3,
  1684. + 2, 2, 3, 4, 2, 9, 5, 2, 0, 2,
  1685. + 2, 3, 1, 2, 2, 2, 1, 1, 3, 1,
  1686. + 1, 5, 1, 3, 1, 3, 1, 3, 1, 3,
  1687. + 1, 3, 1, 3, 3, 1, 3, 3, 3, 3,
  1688. + 3, 3, 1, 3, 3, 1, 3, 3, 3, 1,
  1689. + 1, 2, 2, 2, 0, 2, 2, 0, 2, 2,
  1690. + 2, 3, 2
  1691. };
  1692. - /* YYPGOTO[NTERM-NUM]. */
  1693. -static const yytype_int8 yypgoto[] =
  1694. +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
  1695. + Performed when YYTABLE doesn't specify something else to do. Zero
  1696. + means the default is an error. */
  1697. +static const yytype_uint8 yydefact[] =
  1698. {
  1699. - -81, -81, 100, 104, -81, -38, -81, -80, -81, -81,
  1700. - -81, -5, 66, 13, -81, 70, 67, 81, 64, 82,
  1701. - 37, 27, 34, 38, -14, -81, 22, 24
  1702. + 0, 0, 0, 3, 1, 0, 5, 4, 0, 0,
  1703. + 0, 5, 36, 37, 0, 0, 8, 0, 2, 6,
  1704. + 0, 0, 0, 70, 0, 39, 40, 42, 44, 46,
  1705. + 48, 50, 52, 55, 62, 65, 69, 0, 15, 9,
  1706. + 0, 0, 0, 0, 71, 72, 73, 38, 0, 0,
  1707. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1708. + 0, 0, 0, 0, 0, 0, 0, 7, 77, 0,
  1709. + 0, 12, 10, 43, 0, 45, 47, 49, 51, 53,
  1710. + 54, 58, 59, 57, 56, 60, 61, 63, 64, 67,
  1711. + 66, 68, 0, 0, 0, 0, 16, 0, 77, 13,
  1712. + 11, 0, 0, 0, 18, 28, 80, 20, 82, 0,
  1713. + 79, 78, 41, 19, 81, 0, 0, 14, 27, 17,
  1714. + 29, 0, 21, 30, 24, 0, 74, 32, 0, 0,
  1715. + 0, 0, 35, 34, 22, 33, 31, 0, 75, 76,
  1716. + 23, 0, 26, 0, 0, 0, 25
  1717. };
  1718. - /* YYDEFGOTO[NTERM-NUM]. */
  1719. +/* YYDEFGOTO[NTERM-NUM]. */
  1720. static const yytype_int16 yydefgoto[] =
  1721. {
  1722. - -1, 2, 7, 8, 15, 36, 65, 93, 112, 113,
  1723. - 125, 20, 21, 22, 23, 24, 25, 26, 27, 28,
  1724. - 29, 30, 31, 32, 33, 128, 94, 95
  1725. + -1, 2, 6, 10, 11, 18, 39, 68, 96, 115,
  1726. + 116, 128, 23, 24, 25, 26, 27, 28, 29, 30,
  1727. + 31, 32, 33, 34, 35, 36, 131, 97, 98
  1728. };
  1729. - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
  1730. - positive, shift that token. If negative, reduce the rule whose
  1731. - number is the opposite. If YYTABLE_NINF, syntax error. */
  1732. -static const yytype_uint8 yytable[] =
  1733. +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  1734. + STATE-NUM. */
  1735. +#define YYPACT_NINF -84
  1736. +static const yytype_int8 yypact[] =
  1737. {
  1738. - 12, 68, 69, 41, 42, 43, 45, 34, 9, 10,
  1739. - 53, 54, 104, 3, 5, 107, 101, 118, 35, 1,
  1740. - 102, 4, 61, 11, 119, 120, 121, 122, 35, 97,
  1741. - 46, 6, 55, 17, 123, 44, 18, 19, 56, 124,
  1742. - 62, 63, 9, 10, 14, 51, 52, 86, 87, 88,
  1743. - 9, 10, 48, 103, 129, 130, 115, 11, 135, 116,
  1744. - 136, 47, 131, 57, 58, 11, 37, 49, 117, 50,
  1745. - 137, 64, 38, 39, 138, 139, 40, 89, 90, 91,
  1746. - 78, 79, 80, 81, 92, 59, 60, 66, 76, 77,
  1747. - 67, 82, 83, 96, 98, 99, 100, 84, 85, 106,
  1748. - 110, 111, 114, 126, 134, 127, 133, 141, 16, 143,
  1749. - 13, 109, 71, 74, 72, 70, 105, 108, 0, 0,
  1750. - 132, 0, 0, 0, 0, 0, 0, 0, 0, 73,
  1751. - 0, 0, 75, 140, 0, 0, 142
  1752. + 15, -12, 35, 42, -84, 27, 9, -84, 24, 9,
  1753. + 43, 9, -84, -84, -10, 24, -84, 60, 44, -84,
  1754. + -10, -10, -10, -84, 55, -84, -7, 52, 53, 51,
  1755. + 54, 10, 2, 38, 37, -4, -84, 68, -84, -84,
  1756. + 71, 73, 60, 60, -84, -84, -84, -84, -10, -10,
  1757. + -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
  1758. + -10, -10, -10, -10, -10, -10, -10, -84, 56, 72,
  1759. + 60, -84, -84, 52, 61, 53, 51, 54, 10, 2,
  1760. + 2, 38, 38, 38, 38, 37, 37, -4, -4, -84,
  1761. + -84, -84, 81, 83, 34, 56, -84, 74, 56, -84,
  1762. + -84, -10, 76, 78, -84, -84, -84, -84, -84, 79,
  1763. + -84, -84, -84, -84, -84, -6, 3, -84, -84, -84,
  1764. + -84, 87, -84, -84, -84, 75, -84, -84, 32, 70,
  1765. + 86, 36, -84, -84, -84, -84, -84, 47, -84, -84,
  1766. + -84, 24, -84, 77, 24, 80, -84
  1767. };
  1768. -static const yytype_int16 yycheck[] =
  1769. +/* YYPGOTO[NTERM-NUM]. */
  1770. +static const yytype_int8 yypgoto[] =
  1771. {
  1772. - 5, 39, 40, 17, 18, 19, 12, 12, 17, 18,
  1773. - 7, 8, 92, 24, 4, 95, 24, 13, 26, 3,
  1774. - 28, 0, 25, 32, 20, 21, 22, 23, 26, 67,
  1775. - 36, 21, 29, 42, 30, 34, 45, 46, 35, 35,
  1776. - 43, 44, 17, 18, 25, 9, 10, 61, 62, 63,
  1777. - 17, 18, 38, 91, 21, 22, 21, 32, 19, 24,
  1778. - 21, 11, 29, 5, 6, 32, 15, 39, 33, 40,
  1779. - 31, 24, 21, 22, 33, 34, 25, 14, 15, 16,
  1780. - 53, 54, 55, 56, 21, 41, 42, 22, 51, 52,
  1781. - 22, 57, 58, 24, 37, 16, 16, 59, 60, 27,
  1782. - 24, 24, 24, 17, 20, 32, 35, 33, 8, 34,
  1783. - 6, 98, 46, 49, 47, 45, 92, 95, -1, -1,
  1784. - 125, -1, -1, -1, -1, -1, -1, -1, -1, 48,
  1785. - -1, -1, 50, 138, -1, -1, 141
  1786. + -84, -84, -84, 98, 101, -84, -41, -84, -83, -84,
  1787. + -84, -84, -8, 63, 12, -84, 66, 67, 65, 69,
  1788. + 82, 29, 18, 25, 26, -17, -84, 20, 28
  1789. };
  1790. - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  1791. - symbol of state STATE-NUM. */
  1792. -static const yytype_uint8 yystos[] =
  1793. +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  1794. + positive, shift that token. If negative, reduce the rule which
  1795. + number is the opposite. If YYTABLE_NINF, syntax error. */
  1796. +#define YYTABLE_NINF -1
  1797. +static const yytype_uint8 yytable[] =
  1798. {
  1799. - 0, 3, 48, 24, 0, 4, 21, 49, 50, 17,
  1800. - 18, 32, 58, 50, 25, 51, 49, 42, 45, 46,
  1801. - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
  1802. - 68, 69, 70, 71, 58, 26, 52, 15, 21, 22,
  1803. - 25, 71, 71, 71, 34, 12, 36, 11, 38, 39,
  1804. - 40, 9, 10, 7, 8, 29, 35, 5, 6, 41,
  1805. - 42, 25, 43, 44, 24, 53, 22, 22, 52, 52,
  1806. - 62, 59, 63, 64, 65, 66, 67, 67, 68, 68,
  1807. - 68, 68, 69, 69, 70, 70, 71, 71, 71, 14,
  1808. - 15, 16, 21, 54, 73, 74, 24, 52, 37, 16,
  1809. - 16, 24, 28, 52, 54, 74, 27, 54, 73, 60,
  1810. - 24, 24, 55, 56, 24, 21, 24, 33, 13, 20,
  1811. - 21, 22, 23, 30, 35, 57, 17, 32, 72, 21,
  1812. - 22, 29, 58, 35, 20, 19, 21, 31, 33, 34,
  1813. - 58, 33, 58, 34
  1814. + 15, 71, 72, 44, 45, 46, 48, 37, 12, 13,
  1815. + 56, 57, 107, 3, 8, 110, 118, 121, 1, 119,
  1816. + 54, 55, 64, 14, 122, 123, 124, 125, 120, 100,
  1817. + 49, 9, 58, 20, 126, 4, 21, 22, 59, 127,
  1818. + 65, 66, 12, 13, 60, 61, 5, 89, 90, 91,
  1819. + 12, 13, 7, 106, 132, 133, 138, 14, 139, 104,
  1820. + 40, 38, 134, 105, 50, 14, 41, 42, 140, 17,
  1821. + 43, 92, 93, 94, 81, 82, 83, 84, 95, 62,
  1822. + 63, 141, 142, 79, 80, 85, 86, 38, 87, 88,
  1823. + 47, 52, 51, 67, 69, 53, 70, 99, 102, 101,
  1824. + 103, 113, 109, 114, 117, 129, 136, 137, 130, 19,
  1825. + 16, 144, 74, 112, 73, 146, 76, 75, 111, 0,
  1826. + 135, 77, 0, 108, 0, 0, 0, 0, 0, 0,
  1827. + 0, 0, 0, 143, 0, 78, 145
  1828. };
  1829. - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  1830. -static const yytype_uint8 yyr1[] =
  1831. +#define yypact_value_is_default(yystate) \
  1832. + ((yystate) == (-84))
  1833. +
  1834. +#define yytable_value_is_error(yytable_value) \
  1835. + YYID (0)
  1836. +
  1837. +static const yytype_int16 yycheck[] =
  1838. {
  1839. - 0, 47, 48, 49, 49, 50, 50, 51, 51, 51,
  1840. - 51, 51, 52, 53, 53, 54, 54, 54, 54, 55,
  1841. - 55, 55, 55, 55, 55, 55, 56, 56, 56, 57,
  1842. - 57, 57, 57, 57, 58, 58, 58, 59, 60, 60,
  1843. - 61, 61, 62, 62, 63, 63, 64, 64, 65, 65,
  1844. - 66, 66, 66, 67, 67, 67, 67, 67, 68, 68,
  1845. - 68, 69, 69, 69, 70, 70, 70, 70, 71, 71,
  1846. - 71, 71, 72, 72, 72, 73, 73, 73, 74, 74,
  1847. - 74
  1848. + 8, 42, 43, 20, 21, 22, 13, 15, 18, 19,
  1849. + 8, 9, 95, 25, 5, 98, 22, 14, 3, 25,
  1850. + 10, 11, 26, 33, 21, 22, 23, 24, 34, 70,
  1851. + 37, 22, 30, 43, 31, 0, 46, 47, 36, 36,
  1852. + 44, 45, 18, 19, 6, 7, 4, 64, 65, 66,
  1853. + 18, 19, 25, 94, 22, 23, 20, 33, 22, 25,
  1854. + 16, 27, 30, 29, 12, 33, 22, 23, 32, 26,
  1855. + 26, 15, 16, 17, 56, 57, 58, 59, 22, 42,
  1856. + 43, 34, 35, 54, 55, 60, 61, 27, 62, 63,
  1857. + 35, 40, 39, 25, 23, 41, 23, 25, 17, 38,
  1858. + 17, 25, 28, 25, 25, 18, 36, 21, 33, 11,
  1859. + 9, 34, 49, 101, 48, 35, 51, 50, 98, -1,
  1860. + 128, 52, -1, 95, -1, -1, -1, -1, -1, -1,
  1861. + -1, -1, -1, 141, -1, 53, 144
  1862. };
  1863. - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
  1864. -static const yytype_uint8 yyr2[] =
  1865. +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  1866. + symbol of state STATE-NUM. */
  1867. +static const yytype_uint8 yystos[] =
  1868. {
  1869. - 0, 2, 4, 0, 2, 4, 2, 2, 3, 4,
  1870. - 3, 4, 5, 0, 2, 4, 2, 3, 2, 2,
  1871. - 3, 4, 2, 9, 5, 2, 0, 2, 2, 3,
  1872. - 1, 2, 2, 2, 1, 1, 3, 1, 1, 5,
  1873. - 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
  1874. - 1, 3, 3, 1, 3, 3, 3, 3, 3, 3,
  1875. - 1, 3, 3, 1, 3, 3, 3, 1, 1, 2,
  1876. - 2, 2, 0, 2, 2, 0, 2, 2, 2, 3,
  1877. - 2
  1878. + 0, 3, 49, 25, 0, 4, 50, 25, 5, 22,
  1879. + 51, 52, 18, 19, 33, 60, 52, 26, 53, 51,
  1880. + 43, 46, 47, 60, 61, 62, 63, 64, 65, 66,
  1881. + 67, 68, 69, 70, 71, 72, 73, 60, 27, 54,
  1882. + 16, 22, 23, 26, 73, 73, 73, 35, 13, 37,
  1883. + 12, 39, 40, 41, 10, 11, 8, 9, 30, 36,
  1884. + 6, 7, 42, 43, 26, 44, 45, 25, 55, 23,
  1885. + 23, 54, 54, 64, 61, 65, 66, 67, 68, 69,
  1886. + 69, 70, 70, 70, 70, 71, 71, 72, 72, 73,
  1887. + 73, 73, 15, 16, 17, 22, 56, 75, 76, 25,
  1888. + 54, 38, 17, 17, 25, 29, 54, 56, 76, 28,
  1889. + 56, 75, 62, 25, 25, 57, 58, 25, 22, 25,
  1890. + 34, 14, 21, 22, 23, 24, 31, 36, 59, 18,
  1891. + 33, 74, 22, 23, 30, 60, 36, 21, 20, 22,
  1892. + 32, 34, 35, 60, 34, 60, 35
  1893. };
  1894. -
  1895. -#define yyerrok (yyerrstatus = 0)
  1896. -#define yyclearin (yychar = YYEMPTY)
  1897. -#define YYEMPTY (-2)
  1898. -#define YYEOF 0
  1899. -
  1900. -#define YYACCEPT goto yyacceptlab
  1901. -#define YYABORT goto yyabortlab
  1902. -#define YYERROR goto yyerrorlab
  1903. -
  1904. +#define yyerrok (yyerrstatus = 0)
  1905. +#define yyclearin (yychar = YYEMPTY)
  1906. +#define YYEMPTY (-2)
  1907. +#define YYEOF 0
  1908. +
  1909. +#define YYACCEPT goto yyacceptlab
  1910. +#define YYABORT goto yyabortlab
  1911. +#define YYERROR goto yyerrorlab
  1912. +
  1913. +
  1914. +/* Like YYERROR except do call yyerror. This remains here temporarily
  1915. + to ease the transition to the new meaning of YYERROR, for GCC.
  1916. + Once GCC version 2 has supplanted version 1, this can go. However,
  1917. + YYFAIL appears to be in use. Nevertheless, it is formally deprecated
  1918. + in Bison 2.4.2's NEWS entry, where a plan to phase it out is
  1919. + discussed. */
  1920. +
  1921. +#define YYFAIL goto yyerrlab
  1922. +#if defined YYFAIL
  1923. + /* This is here to suppress warnings from the GCC cpp's
  1924. + -Wunused-macros. Normally we don't worry about that warning, but
  1925. + some users do, and we want to make it easy for users to remove
  1926. + YYFAIL uses, which will produce warnings from Bison 2.5. */
  1927. +#endif
  1928. #define YYRECOVERING() (!!yyerrstatus)
  1929. -#define YYBACKUP(Token, Value) \
  1930. -do \
  1931. - if (yychar == YYEMPTY) \
  1932. - { \
  1933. - yychar = (Token); \
  1934. - yylval = (Value); \
  1935. - YYPOPSTACK (yylen); \
  1936. - yystate = *yyssp; \
  1937. - goto yybackup; \
  1938. - } \
  1939. - else \
  1940. - { \
  1941. +#define YYBACKUP(Token, Value) \
  1942. +do \
  1943. + if (yychar == YYEMPTY && yylen == 1) \
  1944. + { \
  1945. + yychar = (Token); \
  1946. + yylval = (Value); \
  1947. + YYPOPSTACK (1); \
  1948. + goto yybackup; \
  1949. + } \
  1950. + else \
  1951. + { \
  1952. yyerror (YY_("syntax error: cannot back up")); \
  1953. - YYERROR; \
  1954. - } \
  1955. -while (0)
  1956. -
  1957. -/* Error token number */
  1958. -#define YYTERROR 1
  1959. -#define YYERRCODE 256
  1960. + YYERROR; \
  1961. + } \
  1962. +while (YYID (0))
  1963. +
  1964. +
  1965. +#define YYTERROR 1
  1966. +#define YYERRCODE 256
  1967. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  1968. If N is 0, then set CURRENT to the empty location which ends
  1969. the previous symbol: RHS[0] (always defined). */
  1970. +#define YYRHSLOC(Rhs, K) ((Rhs)[K])
  1971. #ifndef YYLLOC_DEFAULT
  1972. -# define YYLLOC_DEFAULT(Current, Rhs, N) \
  1973. - do \
  1974. - if (N) \
  1975. - { \
  1976. - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  1977. - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  1978. - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  1979. - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  1980. - } \
  1981. - else \
  1982. - { \
  1983. - (Current).first_line = (Current).last_line = \
  1984. - YYRHSLOC (Rhs, 0).last_line; \
  1985. - (Current).first_column = (Current).last_column = \
  1986. - YYRHSLOC (Rhs, 0).last_column; \
  1987. - } \
  1988. - while (0)
  1989. +# define YYLLOC_DEFAULT(Current, Rhs, N) \
  1990. + do \
  1991. + if (YYID (N)) \
  1992. + { \
  1993. + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  1994. + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  1995. + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  1996. + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  1997. + } \
  1998. + else \
  1999. + { \
  2000. + (Current).first_line = (Current).last_line = \
  2001. + YYRHSLOC (Rhs, 0).last_line; \
  2002. + (Current).first_column = (Current).last_column = \
  2003. + YYRHSLOC (Rhs, 0).last_column; \
  2004. + } \
  2005. + while (YYID (0))
  2006. #endif
  2007. -#define YYRHSLOC(Rhs, K) ((Rhs)[K])
  2008. -
  2009. -
  2010. -/* Enable debugging if requested. */
  2011. -#if YYDEBUG
  2012. -
  2013. -# ifndef YYFPRINTF
  2014. -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  2015. -# define YYFPRINTF fprintf
  2016. -# endif
  2017. -
  2018. -# define YYDPRINTF(Args) \
  2019. -do { \
  2020. - if (yydebug) \
  2021. - YYFPRINTF Args; \
  2022. -} while (0)
  2023. -
  2024. /* YY_LOCATION_PRINT -- Print the location on the stream.
  2025. This macro was not mandated originally: define only if we know
  2026. @@ -779,73 +799,82 @@ do {
  2027. #ifndef YY_LOCATION_PRINT
  2028. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  2029. -
  2030. -/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
  2031. -
  2032. -YY_ATTRIBUTE_UNUSED
  2033. -static unsigned
  2034. -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
  2035. -{
  2036. - unsigned res = 0;
  2037. - int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  2038. - if (0 <= yylocp->first_line)
  2039. - {
  2040. - res += YYFPRINTF (yyo, "%d", yylocp->first_line);
  2041. - if (0 <= yylocp->first_column)
  2042. - res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
  2043. - }
  2044. - if (0 <= yylocp->last_line)
  2045. - {
  2046. - if (yylocp->first_line < yylocp->last_line)
  2047. - {
  2048. - res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
  2049. - if (0 <= end_col)
  2050. - res += YYFPRINTF (yyo, ".%d", end_col);
  2051. - }
  2052. - else if (0 <= end_col && yylocp->first_column < end_col)
  2053. - res += YYFPRINTF (yyo, "-%d", end_col);
  2054. - }
  2055. - return res;
  2056. - }
  2057. -
  2058. -# define YY_LOCATION_PRINT(File, Loc) \
  2059. - yy_location_print_ (File, &(Loc))
  2060. -
  2061. +# define YY_LOCATION_PRINT(File, Loc) \
  2062. + fprintf (File, "%d.%d-%d.%d", \
  2063. + (Loc).first_line, (Loc).first_column, \
  2064. + (Loc).last_line, (Loc).last_column)
  2065. # else
  2066. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  2067. # endif
  2068. #endif
  2069. -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  2070. -do { \
  2071. - if (yydebug) \
  2072. - { \
  2073. - YYFPRINTF (stderr, "%s ", Title); \
  2074. - yy_symbol_print (stderr, \
  2075. - Type, Value, Location); \
  2076. - YYFPRINTF (stderr, "\n"); \
  2077. - } \
  2078. -} while (0)
  2079. +/* YYLEX -- calling `yylex' with the right arguments. */
  2080. +#ifdef YYLEX_PARAM
  2081. +# define YYLEX yylex (YYLEX_PARAM)
  2082. +#else
  2083. +# define YYLEX yylex ()
  2084. +#endif
  2085. -/*----------------------------------------.
  2086. -| Print this symbol's value on YYOUTPUT. |
  2087. -`----------------------------------------*/
  2088. +/* Enable debugging if requested. */
  2089. +#if YYDEBUG
  2090. +# ifndef YYFPRINTF
  2091. +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  2092. +# define YYFPRINTF fprintf
  2093. +# endif
  2094. +
  2095. +# define YYDPRINTF(Args) \
  2096. +do { \
  2097. + if (yydebug) \
  2098. + YYFPRINTF Args; \
  2099. +} while (YYID (0))
  2100. +
  2101. +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  2102. +do { \
  2103. + if (yydebug) \
  2104. + { \
  2105. + YYFPRINTF (stderr, "%s ", Title); \
  2106. + yy_symbol_print (stderr, \
  2107. + Type, Value, Location); \
  2108. + YYFPRINTF (stderr, "\n"); \
  2109. + } \
  2110. +} while (YYID (0))
  2111. +
  2112. +
  2113. +/*--------------------------------.
  2114. +| Print this symbol on YYOUTPUT. |
  2115. +`--------------------------------*/
  2116. +
  2117. +/*ARGSUSED*/
  2118. +#if (defined __STDC__ || defined __C99__FUNC__ \
  2119. + || defined __cplusplus || defined _MSC_VER)
  2120. static void
  2121. yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
  2122. +#else
  2123. +static void
  2124. +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
  2125. + FILE *yyoutput;
  2126. + int yytype;
  2127. + YYSTYPE const * const yyvaluep;
  2128. + YYLTYPE const * const yylocationp;
  2129. +#endif
  2130. {
  2131. - FILE *yyo = yyoutput;
  2132. - YYUSE (yyo);
  2133. - YYUSE (yylocationp);
  2134. if (!yyvaluep)
  2135. return;
  2136. + YYUSE (yylocationp);
  2137. # ifdef YYPRINT
  2138. if (yytype < YYNTOKENS)
  2139. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  2140. +# else
  2141. + YYUSE (yyoutput);
  2142. # endif
  2143. - YYUSE (yytype);
  2144. + switch (yytype)
  2145. + {
  2146. + default:
  2147. + break;
  2148. + }
  2149. }
  2150. @@ -853,11 +882,23 @@ yy_symbol_value_print (FILE *yyoutput, i
  2151. | Print this symbol on YYOUTPUT. |
  2152. `--------------------------------*/
  2153. +#if (defined __STDC__ || defined __C99__FUNC__ \
  2154. + || defined __cplusplus || defined _MSC_VER)
  2155. static void
  2156. yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
  2157. +#else
  2158. +static void
  2159. +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
  2160. + FILE *yyoutput;
  2161. + int yytype;
  2162. + YYSTYPE const * const yyvaluep;
  2163. + YYLTYPE const * const yylocationp;
  2164. +#endif
  2165. {
  2166. - YYFPRINTF (yyoutput, "%s %s (",
  2167. - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
  2168. + if (yytype < YYNTOKENS)
  2169. + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  2170. + else
  2171. + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
  2172. YY_LOCATION_PRINT (yyoutput, *yylocationp);
  2173. YYFPRINTF (yyoutput, ": ");
  2174. @@ -870,8 +911,16 @@ yy_symbol_print (FILE *yyoutput, int yyt
  2175. | TOP (included). |
  2176. `------------------------------------------------------------------*/
  2177. +#if (defined __STDC__ || defined __C99__FUNC__ \
  2178. + || defined __cplusplus || defined _MSC_VER)
  2179. static void
  2180. yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
  2181. +#else
  2182. +static void
  2183. +yy_stack_print (yybottom, yytop)
  2184. + yytype_int16 *yybottom;
  2185. + yytype_int16 *yytop;
  2186. +#endif
  2187. {
  2188. YYFPRINTF (stderr, "Stack now");
  2189. for (; yybottom <= yytop; yybottom++)
  2190. @@ -882,42 +931,50 @@ yy_stack_print (yytype_int16 *yybottom,
  2191. YYFPRINTF (stderr, "\n");
  2192. }
  2193. -# define YY_STACK_PRINT(Bottom, Top) \
  2194. -do { \
  2195. - if (yydebug) \
  2196. - yy_stack_print ((Bottom), (Top)); \
  2197. -} while (0)
  2198. +# define YY_STACK_PRINT(Bottom, Top) \
  2199. +do { \
  2200. + if (yydebug) \
  2201. + yy_stack_print ((Bottom), (Top)); \
  2202. +} while (YYID (0))
  2203. /*------------------------------------------------.
  2204. | Report that the YYRULE is going to be reduced. |
  2205. `------------------------------------------------*/
  2206. +#if (defined __STDC__ || defined __C99__FUNC__ \
  2207. + || defined __cplusplus || defined _MSC_VER)
  2208. +static void
  2209. +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
  2210. +#else
  2211. static void
  2212. -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
  2213. +yy_reduce_print (yyvsp, yylsp, yyrule)
  2214. + YYSTYPE *yyvsp;
  2215. + YYLTYPE *yylsp;
  2216. + int yyrule;
  2217. +#endif
  2218. {
  2219. - unsigned long int yylno = yyrline[yyrule];
  2220. int yynrhs = yyr2[yyrule];
  2221. int yyi;
  2222. + unsigned long int yylno = yyrline[yyrule];
  2223. YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
  2224. - yyrule - 1, yylno);
  2225. + yyrule - 1, yylno);
  2226. /* The symbols being reduced. */
  2227. for (yyi = 0; yyi < yynrhs; yyi++)
  2228. {
  2229. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  2230. - yy_symbol_print (stderr,
  2231. - yystos[yyssp[yyi + 1 - yynrhs]],
  2232. - &(yyvsp[(yyi + 1) - (yynrhs)])
  2233. - , &(yylsp[(yyi + 1) - (yynrhs)]) );
  2234. + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
  2235. + &(yyvsp[(yyi + 1) - (yynrhs)])
  2236. + , &(yylsp[(yyi + 1) - (yynrhs)]) );
  2237. YYFPRINTF (stderr, "\n");
  2238. }
  2239. }
  2240. -# define YY_REDUCE_PRINT(Rule) \
  2241. -do { \
  2242. - if (yydebug) \
  2243. - yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
  2244. -} while (0)
  2245. +# define YY_REDUCE_PRINT(Rule) \
  2246. +do { \
  2247. + if (yydebug) \
  2248. + yy_reduce_print (yyvsp, yylsp, Rule); \
  2249. +} while (YYID (0))
  2250. /* Nonzero means print parse trace. It is left uninitialized so that
  2251. multiple parsers can coexist. */
  2252. @@ -931,7 +988,7 @@ int yydebug;
  2253. /* YYINITDEPTH -- initial size of the parser's stacks. */
  2254. -#ifndef YYINITDEPTH
  2255. +#ifndef YYINITDEPTH
  2256. # define YYINITDEPTH 200
  2257. #endif
  2258. @@ -954,8 +1011,15 @@ int yydebug;
  2259. # define yystrlen strlen
  2260. # else
  2261. /* Return the length of YYSTR. */
  2262. +#if (defined __STDC__ || defined __C99__FUNC__ \
  2263. + || defined __cplusplus || defined _MSC_VER)
  2264. static YYSIZE_T
  2265. yystrlen (const char *yystr)
  2266. +#else
  2267. +static YYSIZE_T
  2268. +yystrlen (yystr)
  2269. + const char *yystr;
  2270. +#endif
  2271. {
  2272. YYSIZE_T yylen;
  2273. for (yylen = 0; yystr[yylen]; yylen++)
  2274. @@ -971,8 +1035,16 @@ yystrlen (const char *yystr)
  2275. # else
  2276. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  2277. YYDEST. */
  2278. +#if (defined __STDC__ || defined __C99__FUNC__ \
  2279. + || defined __cplusplus || defined _MSC_VER)
  2280. static char *
  2281. yystpcpy (char *yydest, const char *yysrc)
  2282. +#else
  2283. +static char *
  2284. +yystpcpy (yydest, yysrc)
  2285. + char *yydest;
  2286. + const char *yysrc;
  2287. +#endif
  2288. {
  2289. char *yyd = yydest;
  2290. const char *yys = yysrc;
  2291. @@ -1002,27 +1074,27 @@ yytnamerr (char *yyres, const char *yyst
  2292. char const *yyp = yystr;
  2293. for (;;)
  2294. - switch (*++yyp)
  2295. - {
  2296. - case '\'':
  2297. - case ',':
  2298. - goto do_not_strip_quotes;
  2299. -
  2300. - case '\\':
  2301. - if (*++yyp != '\\')
  2302. - goto do_not_strip_quotes;
  2303. - /* Fall through. */
  2304. - default:
  2305. - if (yyres)
  2306. - yyres[yyn] = *yyp;
  2307. - yyn++;
  2308. - break;
  2309. -
  2310. - case '"':
  2311. - if (yyres)
  2312. - yyres[yyn] = '\0';
  2313. - return yyn;
  2314. - }
  2315. + switch (*++yyp)
  2316. + {
  2317. + case '\'':
  2318. + case ',':
  2319. + goto do_not_strip_quotes;
  2320. +
  2321. + case '\\':
  2322. + if (*++yyp != '\\')
  2323. + goto do_not_strip_quotes;
  2324. + /* Fall through. */
  2325. + default:
  2326. + if (yyres)
  2327. + yyres[yyn] = *yyp;
  2328. + yyn++;
  2329. + break;
  2330. +
  2331. + case '"':
  2332. + if (yyres)
  2333. + yyres[yyn] = '\0';
  2334. + return yyn;
  2335. + }
  2336. do_not_strip_quotes: ;
  2337. }
  2338. @@ -1045,11 +1117,12 @@ static int
  2339. yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
  2340. yytype_int16 *yyssp, int yytoken)
  2341. {
  2342. - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
  2343. + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
  2344. YYSIZE_T yysize = yysize0;
  2345. + YYSIZE_T yysize1;
  2346. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  2347. /* Internationalized format string. */
  2348. - const char *yyformat = YY_NULLPTR;
  2349. + const char *yyformat = 0;
  2350. /* Arguments of yyformat. */
  2351. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  2352. /* Number of reported tokens (one for the "unexpected", one per
  2353. @@ -1057,6 +1130,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
  2354. int yycount = 0;
  2355. /* There are many possibilities here to consider:
  2356. + - Assume YYFAIL is not used. It's too flawed to consider. See
  2357. + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
  2358. + for details. YYERROR is fine as it does not invoke this
  2359. + function.
  2360. - If this state is a consistent state with a default action, then
  2361. the only way this function was invoked is if the default action
  2362. is an error action. In that case, don't check for expected
  2363. @@ -1105,13 +1182,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
  2364. break;
  2365. }
  2366. yyarg[yycount++] = yytname[yyx];
  2367. - {
  2368. - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
  2369. - if (! (yysize <= yysize1
  2370. - && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  2371. - return 2;
  2372. - yysize = yysize1;
  2373. - }
  2374. + yysize1 = yysize + yytnamerr (0, yytname[yyx]);
  2375. + if (! (yysize <= yysize1
  2376. + && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  2377. + return 2;
  2378. + yysize = yysize1;
  2379. }
  2380. }
  2381. }
  2382. @@ -1131,12 +1206,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
  2383. # undef YYCASE_
  2384. }
  2385. - {
  2386. - YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
  2387. - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  2388. - return 2;
  2389. - yysize = yysize1;
  2390. - }
  2391. + yysize1 = yysize + yystrlen (yyformat);
  2392. + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  2393. + return 2;
  2394. + yysize = yysize1;
  2395. if (*yymsg_alloc < yysize)
  2396. {
  2397. @@ -1173,21 +1246,50 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
  2398. | Release the memory associated to this symbol. |
  2399. `-----------------------------------------------*/
  2400. +/*ARGSUSED*/
  2401. +#if (defined __STDC__ || defined __C99__FUNC__ \
  2402. + || defined __cplusplus || defined _MSC_VER)
  2403. static void
  2404. yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
  2405. +#else
  2406. +static void
  2407. +yydestruct (yymsg, yytype, yyvaluep, yylocationp)
  2408. + const char *yymsg;
  2409. + int yytype;
  2410. + YYSTYPE *yyvaluep;
  2411. + YYLTYPE *yylocationp;
  2412. +#endif
  2413. {
  2414. YYUSE (yyvaluep);
  2415. YYUSE (yylocationp);
  2416. +
  2417. if (!yymsg)
  2418. yymsg = "Deleting";
  2419. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  2420. - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  2421. - YYUSE (yytype);
  2422. - YY_IGNORE_MAYBE_UNINITIALIZED_END
  2423. + switch (yytype)
  2424. + {
  2425. +
  2426. + default:
  2427. + break;
  2428. + }
  2429. }
  2430. +/* Prevent warnings from -Wmissing-prototypes. */
  2431. +#ifdef YYPARSE_PARAM
  2432. +#if defined __STDC__ || defined __cplusplus
  2433. +int yyparse (void *YYPARSE_PARAM);
  2434. +#else
  2435. +int yyparse ();
  2436. +#endif
  2437. +#else /* ! YYPARSE_PARAM */
  2438. +#if defined __STDC__ || defined __cplusplus
  2439. +int yyparse (void);
  2440. +#else
  2441. +int yyparse ();
  2442. +#endif
  2443. +#endif /* ! YYPARSE_PARAM */
  2444. /* The lookahead symbol. */
  2445. @@ -1195,12 +1297,10 @@ int yychar;
  2446. /* The semantic value of the lookahead symbol. */
  2447. YYSTYPE yylval;
  2448. +
  2449. /* Location data for the lookahead symbol. */
  2450. -YYLTYPE yylloc
  2451. -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  2452. - = { 1, 1, 1, 1 }
  2453. -# endif
  2454. -;
  2455. +YYLTYPE yylloc;
  2456. +
  2457. /* Number of syntax errors so far. */
  2458. int yynerrs;
  2459. @@ -1209,19 +1309,38 @@ int yynerrs;
  2460. | yyparse. |
  2461. `----------*/
  2462. +#ifdef YYPARSE_PARAM
  2463. +#if (defined __STDC__ || defined __C99__FUNC__ \
  2464. + || defined __cplusplus || defined _MSC_VER)
  2465. +int
  2466. +yyparse (void *YYPARSE_PARAM)
  2467. +#else
  2468. +int
  2469. +yyparse (YYPARSE_PARAM)
  2470. + void *YYPARSE_PARAM;
  2471. +#endif
  2472. +#else /* ! YYPARSE_PARAM */
  2473. +#if (defined __STDC__ || defined __C99__FUNC__ \
  2474. + || defined __cplusplus || defined _MSC_VER)
  2475. int
  2476. yyparse (void)
  2477. +#else
  2478. +int
  2479. +yyparse ()
  2480. +
  2481. +#endif
  2482. +#endif
  2483. {
  2484. int yystate;
  2485. /* Number of tokens to shift before error messages enabled. */
  2486. int yyerrstatus;
  2487. /* The stacks and their tools:
  2488. - 'yyss': related to states.
  2489. - 'yyvs': related to semantic values.
  2490. - 'yyls': related to locations.
  2491. + `yyss': related to states.
  2492. + `yyvs': related to semantic values.
  2493. + `yyls': related to locations.
  2494. - Refer to the stacks through separate pointers, to allow yyoverflow
  2495. + Refer to the stacks thru separate pointers, to allow yyoverflow
  2496. to reallocate them elsewhere. */
  2497. /* The state stack. */
  2498. @@ -1247,7 +1366,7 @@ yyparse (void)
  2499. int yyn;
  2500. int yyresult;
  2501. /* Lookahead token as an internal (translated) token number. */
  2502. - int yytoken = 0;
  2503. + int yytoken;
  2504. /* The variables used to return semantic value and location from the
  2505. action routines. */
  2506. YYSTYPE yyval;
  2507. @@ -1266,9 +1385,10 @@ yyparse (void)
  2508. Keep to zero when no symbol should be popped. */
  2509. int yylen = 0;
  2510. - yyssp = yyss = yyssa;
  2511. - yyvsp = yyvs = yyvsa;
  2512. - yylsp = yyls = yylsa;
  2513. + yytoken = 0;
  2514. + yyss = yyssa;
  2515. + yyvs = yyvsa;
  2516. + yyls = yylsa;
  2517. yystacksize = YYINITDEPTH;
  2518. YYDPRINTF ((stderr, "Starting parse\n"));
  2519. @@ -1277,7 +1397,21 @@ yyparse (void)
  2520. yyerrstatus = 0;
  2521. yynerrs = 0;
  2522. yychar = YYEMPTY; /* Cause a token to be read. */
  2523. - yylsp[0] = yylloc;
  2524. +
  2525. + /* Initialize stack pointers.
  2526. + Waste one element of value and location stack
  2527. + so that they stay on the same level as the state stack.
  2528. + The wasted elements are never initialized. */
  2529. + yyssp = yyss;
  2530. + yyvsp = yyvs;
  2531. + yylsp = yyls;
  2532. +
  2533. +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  2534. + /* Initialize the default location before parsing starts. */
  2535. + yylloc.first_line = yylloc.last_line = 1;
  2536. + yylloc.first_column = yylloc.last_column = 1;
  2537. +#endif
  2538. +
  2539. goto yysetstate;
  2540. /*------------------------------------------------------------.
  2541. @@ -1298,26 +1432,26 @@ yyparse (void)
  2542. #ifdef yyoverflow
  2543. {
  2544. - /* Give user a chance to reallocate the stack. Use copies of
  2545. - these so that the &'s don't force the real ones into
  2546. - memory. */
  2547. - YYSTYPE *yyvs1 = yyvs;
  2548. - yytype_int16 *yyss1 = yyss;
  2549. - YYLTYPE *yyls1 = yyls;
  2550. -
  2551. - /* Each stack pointer address is followed by the size of the
  2552. - data in use in that stack, in bytes. This used to be a
  2553. - conditional around just the two extra args, but that might
  2554. - be undefined if yyoverflow is a macro. */
  2555. - yyoverflow (YY_("memory exhausted"),
  2556. - &yyss1, yysize * sizeof (*yyssp),
  2557. - &yyvs1, yysize * sizeof (*yyvsp),
  2558. - &yyls1, yysize * sizeof (*yylsp),
  2559. - &yystacksize);
  2560. -
  2561. - yyls = yyls1;
  2562. - yyss = yyss1;
  2563. - yyvs = yyvs1;
  2564. + /* Give user a chance to reallocate the stack. Use copies of
  2565. + these so that the &'s don't force the real ones into
  2566. + memory. */
  2567. + YYSTYPE *yyvs1 = yyvs;
  2568. + yytype_int16 *yyss1 = yyss;
  2569. + YYLTYPE *yyls1 = yyls;
  2570. +
  2571. + /* Each stack pointer address is followed by the size of the
  2572. + data in use in that stack, in bytes. This used to be a
  2573. + conditional around just the two extra args, but that might
  2574. + be undefined if yyoverflow is a macro. */
  2575. + yyoverflow (YY_("memory exhausted"),
  2576. + &yyss1, yysize * sizeof (*yyssp),
  2577. + &yyvs1, yysize * sizeof (*yyvsp),
  2578. + &yyls1, yysize * sizeof (*yylsp),
  2579. + &yystacksize);
  2580. +
  2581. + yyls = yyls1;
  2582. + yyss = yyss1;
  2583. + yyvs = yyvs1;
  2584. }
  2585. #else /* no yyoverflow */
  2586. # ifndef YYSTACK_RELOCATE
  2587. @@ -1325,23 +1459,23 @@ yyparse (void)
  2588. # else
  2589. /* Extend the stack our own way. */
  2590. if (YYMAXDEPTH <= yystacksize)
  2591. - goto yyexhaustedlab;
  2592. + goto yyexhaustedlab;
  2593. yystacksize *= 2;
  2594. if (YYMAXDEPTH < yystacksize)
  2595. - yystacksize = YYMAXDEPTH;
  2596. + yystacksize = YYMAXDEPTH;
  2597. {
  2598. - yytype_int16 *yyss1 = yyss;
  2599. - union yyalloc *yyptr =
  2600. - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  2601. - if (! yyptr)
  2602. - goto yyexhaustedlab;
  2603. - YYSTACK_RELOCATE (yyss_alloc, yyss);
  2604. - YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  2605. - YYSTACK_RELOCATE (yyls_alloc, yyls);
  2606. + yytype_int16 *yyss1 = yyss;
  2607. + union yyalloc *yyptr =
  2608. + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  2609. + if (! yyptr)
  2610. + goto yyexhaustedlab;
  2611. + YYSTACK_RELOCATE (yyss_alloc, yyss);
  2612. + YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  2613. + YYSTACK_RELOCATE (yyls_alloc, yyls);
  2614. # undef YYSTACK_RELOCATE
  2615. - if (yyss1 != yyssa)
  2616. - YYSTACK_FREE (yyss1);
  2617. + if (yyss1 != yyssa)
  2618. + YYSTACK_FREE (yyss1);
  2619. }
  2620. # endif
  2621. #endif /* no yyoverflow */
  2622. @@ -1351,10 +1485,10 @@ yyparse (void)
  2623. yylsp = yyls + yysize - 1;
  2624. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  2625. - (unsigned long int) yystacksize));
  2626. + (unsigned long int) yystacksize));
  2627. if (yyss + yystacksize - 1 <= yyssp)
  2628. - YYABORT;
  2629. + YYABORT;
  2630. }
  2631. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  2632. @@ -1383,7 +1517,7 @@ yybackup:
  2633. if (yychar == YYEMPTY)
  2634. {
  2635. YYDPRINTF ((stderr, "Reading a token: "));
  2636. - yychar = yylex ();
  2637. + yychar = YYLEX;
  2638. }
  2639. if (yychar <= YYEOF)
  2640. @@ -1423,9 +1557,7 @@ yybackup:
  2641. yychar = YYEMPTY;
  2642. yystate = yyn;
  2643. - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  2644. *++yyvsp = yylval;
  2645. - YY_IGNORE_MAYBE_UNINITIALIZED_END
  2646. *++yylsp = yylloc;
  2647. goto yynewstate;
  2648. @@ -1448,7 +1580,7 @@ yyreduce:
  2649. yylen = yyr2[yyn];
  2650. /* If YYLEN is nonzero, implement the default value of the action:
  2651. - '$$ = $1'.
  2652. + `$$ = $1'.
  2653. Otherwise, the following line sets YYVAL to garbage.
  2654. This behavior is undocumented and Bison
  2655. @@ -1463,273 +1595,322 @@ yyreduce:
  2656. switch (yyn)
  2657. {
  2658. case 2:
  2659. -#line 105 "dtc-parser.y" /* yacc.c:1646 */
  2660. +
  2661. +/* Line 1806 of yacc.c */
  2662. +#line 109 "dtc-parser.y"
  2663. {
  2664. - the_boot_info = build_boot_info((yyvsp[-1].re), (yyvsp[0].node),
  2665. - guess_boot_cpuid((yyvsp[0].node)));
  2666. + (yyvsp[(5) - (5)].node)->is_plugin = (yyvsp[(3) - (5)].is_plugin);
  2667. + (yyvsp[(5) - (5)].node)->is_root = 1;
  2668. + the_boot_info = build_boot_info((yyvsp[(4) - (5)].re), (yyvsp[(5) - (5)].node),
  2669. + guess_boot_cpuid((yyvsp[(5) - (5)].node)));
  2670. }
  2671. -#line 1472 "dtc-parser.tab.c" /* yacc.c:1646 */
  2672. break;
  2673. case 3:
  2674. -#line 113 "dtc-parser.y" /* yacc.c:1646 */
  2675. +
  2676. +/* Line 1806 of yacc.c */
  2677. +#line 119 "dtc-parser.y"
  2678. {
  2679. - (yyval.re) = NULL;
  2680. + (yyval.is_plugin) = 0;
  2681. }
  2682. -#line 1480 "dtc-parser.tab.c" /* yacc.c:1646 */
  2683. break;
  2684. case 4:
  2685. -#line 117 "dtc-parser.y" /* yacc.c:1646 */
  2686. +
  2687. +/* Line 1806 of yacc.c */
  2688. +#line 123 "dtc-parser.y"
  2689. {
  2690. - (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re));
  2691. + (yyval.is_plugin) = 1;
  2692. }
  2693. -#line 1488 "dtc-parser.tab.c" /* yacc.c:1646 */
  2694. break;
  2695. case 5:
  2696. -#line 124 "dtc-parser.y" /* yacc.c:1646 */
  2697. +
  2698. +/* Line 1806 of yacc.c */
  2699. +#line 130 "dtc-parser.y"
  2700. {
  2701. - (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer));
  2702. + (yyval.re) = NULL;
  2703. }
  2704. -#line 1496 "dtc-parser.tab.c" /* yacc.c:1646 */
  2705. break;
  2706. case 6:
  2707. -#line 128 "dtc-parser.y" /* yacc.c:1646 */
  2708. +
  2709. +/* Line 1806 of yacc.c */
  2710. +#line 134 "dtc-parser.y"
  2711. {
  2712. - add_label(&(yyvsp[0].re)->labels, (yyvsp[-1].labelref));
  2713. - (yyval.re) = (yyvsp[0].re);
  2714. + (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
  2715. }
  2716. -#line 1505 "dtc-parser.tab.c" /* yacc.c:1646 */
  2717. break;
  2718. case 7:
  2719. -#line 136 "dtc-parser.y" /* yacc.c:1646 */
  2720. +
  2721. +/* Line 1806 of yacc.c */
  2722. +#line 141 "dtc-parser.y"
  2723. {
  2724. - (yyval.node) = name_node((yyvsp[0].node), "");
  2725. + (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
  2726. }
  2727. -#line 1513 "dtc-parser.tab.c" /* yacc.c:1646 */
  2728. break;
  2729. case 8:
  2730. -#line 140 "dtc-parser.y" /* yacc.c:1646 */
  2731. +
  2732. +/* Line 1806 of yacc.c */
  2733. +#line 145 "dtc-parser.y"
  2734. {
  2735. - (yyval.node) = merge_nodes((yyvsp[-2].node), (yyvsp[0].node));
  2736. + add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
  2737. + (yyval.re) = (yyvsp[(2) - (2)].re);
  2738. }
  2739. -#line 1521 "dtc-parser.tab.c" /* yacc.c:1646 */
  2740. break;
  2741. case 9:
  2742. -#line 145 "dtc-parser.y" /* yacc.c:1646 */
  2743. - {
  2744. - struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
  2745. - add_label(&target->labels, (yyvsp[-2].labelref));
  2746. - if (target)
  2747. - merge_nodes(target, (yyvsp[0].node));
  2748. - else
  2749. - ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
  2750. - (yyval.node) = (yyvsp[-3].node);
  2751. +/* Line 1806 of yacc.c */
  2752. +#line 153 "dtc-parser.y"
  2753. + {
  2754. + (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
  2755. }
  2756. -#line 1536 "dtc-parser.tab.c" /* yacc.c:1646 */
  2757. break;
  2758. case 10:
  2759. -#line 156 "dtc-parser.y" /* yacc.c:1646 */
  2760. - {
  2761. - struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref));
  2762. - if (target)
  2763. - merge_nodes(target, (yyvsp[0].node));
  2764. - else
  2765. - ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
  2766. - (yyval.node) = (yyvsp[-2].node);
  2767. +/* Line 1806 of yacc.c */
  2768. +#line 157 "dtc-parser.y"
  2769. + {
  2770. + (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
  2771. }
  2772. -#line 1550 "dtc-parser.tab.c" /* yacc.c:1646 */
  2773. break;
  2774. case 11:
  2775. -#line 166 "dtc-parser.y" /* yacc.c:1646 */
  2776. +
  2777. +/* Line 1806 of yacc.c */
  2778. +#line 162 "dtc-parser.y"
  2779. {
  2780. - struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
  2781. + struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
  2782. + add_label(&target->labels, (yyvsp[(2) - (4)].labelref));
  2783. if (target)
  2784. - delete_node(target);
  2785. + merge_nodes(target, (yyvsp[(4) - (4)].node));
  2786. else
  2787. - ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
  2788. -
  2789. -
  2790. - (yyval.node) = (yyvsp[-3].node);
  2791. + ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref));
  2792. + (yyval.node) = (yyvsp[(1) - (4)].node);
  2793. }
  2794. -#line 1566 "dtc-parser.tab.c" /* yacc.c:1646 */
  2795. break;
  2796. case 12:
  2797. -#line 181 "dtc-parser.y" /* yacc.c:1646 */
  2798. +
  2799. +/* Line 1806 of yacc.c */
  2800. +#line 173 "dtc-parser.y"
  2801. {
  2802. - (yyval.node) = build_node((yyvsp[-3].proplist), (yyvsp[-2].nodelist));
  2803. + struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
  2804. +
  2805. + if (target)
  2806. + merge_nodes(target, (yyvsp[(3) - (3)].node));
  2807. + else
  2808. + ERROR(&(yylsp[(2) - (3)]), "Label or path %s not found", (yyvsp[(2) - (3)].labelref));
  2809. + (yyval.node) = (yyvsp[(1) - (3)].node);
  2810. }
  2811. -#line 1574 "dtc-parser.tab.c" /* yacc.c:1646 */
  2812. break;
  2813. case 13:
  2814. -#line 188 "dtc-parser.y" /* yacc.c:1646 */
  2815. +
  2816. +/* Line 1806 of yacc.c */
  2817. +#line 183 "dtc-parser.y"
  2818. {
  2819. - (yyval.proplist) = NULL;
  2820. + struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
  2821. +
  2822. + if (target)
  2823. + delete_node(target);
  2824. + else
  2825. + ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref));
  2826. +
  2827. +
  2828. + (yyval.node) = (yyvsp[(1) - (4)].node);
  2829. }
  2830. -#line 1582 "dtc-parser.tab.c" /* yacc.c:1646 */
  2831. break;
  2832. case 14:
  2833. -#line 192 "dtc-parser.y" /* yacc.c:1646 */
  2834. +
  2835. +/* Line 1806 of yacc.c */
  2836. +#line 198 "dtc-parser.y"
  2837. {
  2838. - (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist));
  2839. + (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
  2840. }
  2841. -#line 1590 "dtc-parser.tab.c" /* yacc.c:1646 */
  2842. break;
  2843. case 15:
  2844. -#line 199 "dtc-parser.y" /* yacc.c:1646 */
  2845. +
  2846. +/* Line 1806 of yacc.c */
  2847. +#line 205 "dtc-parser.y"
  2848. {
  2849. - (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data));
  2850. + (yyval.proplist) = NULL;
  2851. }
  2852. -#line 1598 "dtc-parser.tab.c" /* yacc.c:1646 */
  2853. break;
  2854. case 16:
  2855. -#line 203 "dtc-parser.y" /* yacc.c:1646 */
  2856. +
  2857. +/* Line 1806 of yacc.c */
  2858. +#line 209 "dtc-parser.y"
  2859. {
  2860. - (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data);
  2861. + (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
  2862. }
  2863. -#line 1606 "dtc-parser.tab.c" /* yacc.c:1646 */
  2864. break;
  2865. case 17:
  2866. -#line 207 "dtc-parser.y" /* yacc.c:1646 */
  2867. +
  2868. +/* Line 1806 of yacc.c */
  2869. +#line 216 "dtc-parser.y"
  2870. {
  2871. - (yyval.prop) = build_property_delete((yyvsp[-1].propnodename));
  2872. + (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
  2873. }
  2874. -#line 1614 "dtc-parser.tab.c" /* yacc.c:1646 */
  2875. break;
  2876. case 18:
  2877. -#line 211 "dtc-parser.y" /* yacc.c:1646 */
  2878. +
  2879. +/* Line 1806 of yacc.c */
  2880. +#line 220 "dtc-parser.y"
  2881. {
  2882. - add_label(&(yyvsp[0].prop)->labels, (yyvsp[-1].labelref));
  2883. - (yyval.prop) = (yyvsp[0].prop);
  2884. + (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
  2885. }
  2886. -#line 1623 "dtc-parser.tab.c" /* yacc.c:1646 */
  2887. break;
  2888. case 19:
  2889. -#line 219 "dtc-parser.y" /* yacc.c:1646 */
  2890. +
  2891. +/* Line 1806 of yacc.c */
  2892. +#line 224 "dtc-parser.y"
  2893. {
  2894. - (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data));
  2895. + (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));
  2896. }
  2897. -#line 1631 "dtc-parser.tab.c" /* yacc.c:1646 */
  2898. break;
  2899. case 20:
  2900. -#line 223 "dtc-parser.y" /* yacc.c:1646 */
  2901. +
  2902. +/* Line 1806 of yacc.c */
  2903. +#line 228 "dtc-parser.y"
  2904. {
  2905. - (yyval.data) = data_merge((yyvsp[-2].data), (yyvsp[-1].array).data);
  2906. + add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
  2907. + (yyval.prop) = (yyvsp[(2) - (2)].prop);
  2908. }
  2909. -#line 1639 "dtc-parser.tab.c" /* yacc.c:1646 */
  2910. break;
  2911. case 21:
  2912. -#line 227 "dtc-parser.y" /* yacc.c:1646 */
  2913. +
  2914. +/* Line 1806 of yacc.c */
  2915. +#line 236 "dtc-parser.y"
  2916. {
  2917. - (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data));
  2918. + (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
  2919. }
  2920. -#line 1647 "dtc-parser.tab.c" /* yacc.c:1646 */
  2921. break;
  2922. case 22:
  2923. -#line 231 "dtc-parser.y" /* yacc.c:1646 */
  2924. +
  2925. +/* Line 1806 of yacc.c */
  2926. +#line 240 "dtc-parser.y"
  2927. {
  2928. - (yyval.data) = data_add_marker((yyvsp[-1].data), REF_PATH, (yyvsp[0].labelref));
  2929. + (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data);
  2930. }
  2931. -#line 1655 "dtc-parser.tab.c" /* yacc.c:1646 */
  2932. break;
  2933. case 23:
  2934. -#line 235 "dtc-parser.y" /* yacc.c:1646 */
  2935. +
  2936. +/* Line 1806 of yacc.c */
  2937. +#line 244 "dtc-parser.y"
  2938. + {
  2939. + (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
  2940. + }
  2941. + break;
  2942. +
  2943. + case 24:
  2944. +
  2945. +/* Line 1806 of yacc.c */
  2946. +#line 248 "dtc-parser.y"
  2947. + {
  2948. + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
  2949. + }
  2950. + break;
  2951. +
  2952. + case 25:
  2953. +
  2954. +/* Line 1806 of yacc.c */
  2955. +#line 252 "dtc-parser.y"
  2956. {
  2957. - FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL);
  2958. + FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
  2959. struct data d;
  2960. - if ((yyvsp[-3].integer) != 0)
  2961. - if (fseek(f, (yyvsp[-3].integer), SEEK_SET) != 0)
  2962. + if ((yyvsp[(6) - (9)].integer) != 0)
  2963. + if (fseek(f, (yyvsp[(6) - (9)].integer), SEEK_SET) != 0)
  2964. die("Couldn't seek to offset %llu in \"%s\": %s",
  2965. - (unsigned long long)(yyvsp[-3].integer), (yyvsp[-5].data).val,
  2966. + (unsigned long long)(yyvsp[(6) - (9)].integer), (yyvsp[(4) - (9)].data).val,
  2967. strerror(errno));
  2968. - d = data_copy_file(f, (yyvsp[-1].integer));
  2969. + d = data_copy_file(f, (yyvsp[(8) - (9)].integer));
  2970. - (yyval.data) = data_merge((yyvsp[-8].data), d);
  2971. + (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);
  2972. fclose(f);
  2973. }
  2974. -#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */
  2975. break;
  2976. - case 24:
  2977. -#line 251 "dtc-parser.y" /* yacc.c:1646 */
  2978. + case 26:
  2979. +
  2980. +/* Line 1806 of yacc.c */
  2981. +#line 268 "dtc-parser.y"
  2982. {
  2983. - FILE *f = srcfile_relative_open((yyvsp[-1].data).val, NULL);
  2984. + FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
  2985. struct data d = empty_data;
  2986. d = data_copy_file(f, -1);
  2987. - (yyval.data) = data_merge((yyvsp[-4].data), d);
  2988. + (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);
  2989. fclose(f);
  2990. }
  2991. -#line 1689 "dtc-parser.tab.c" /* yacc.c:1646 */
  2992. break;
  2993. - case 25:
  2994. -#line 261 "dtc-parser.y" /* yacc.c:1646 */
  2995. + case 27:
  2996. +
  2997. +/* Line 1806 of yacc.c */
  2998. +#line 278 "dtc-parser.y"
  2999. {
  3000. - (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
  3001. + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
  3002. }
  3003. -#line 1697 "dtc-parser.tab.c" /* yacc.c:1646 */
  3004. break;
  3005. - case 26:
  3006. -#line 268 "dtc-parser.y" /* yacc.c:1646 */
  3007. + case 28:
  3008. +
  3009. +/* Line 1806 of yacc.c */
  3010. +#line 285 "dtc-parser.y"
  3011. {
  3012. (yyval.data) = empty_data;
  3013. }
  3014. -#line 1705 "dtc-parser.tab.c" /* yacc.c:1646 */
  3015. break;
  3016. - case 27:
  3017. -#line 272 "dtc-parser.y" /* yacc.c:1646 */
  3018. + case 29:
  3019. +
  3020. +/* Line 1806 of yacc.c */
  3021. +#line 289 "dtc-parser.y"
  3022. {
  3023. - (yyval.data) = (yyvsp[-1].data);
  3024. + (yyval.data) = (yyvsp[(1) - (2)].data);
  3025. }
  3026. -#line 1713 "dtc-parser.tab.c" /* yacc.c:1646 */
  3027. break;
  3028. - case 28:
  3029. -#line 276 "dtc-parser.y" /* yacc.c:1646 */
  3030. + case 30:
  3031. +
  3032. +/* Line 1806 of yacc.c */
  3033. +#line 293 "dtc-parser.y"
  3034. {
  3035. - (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
  3036. + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
  3037. }
  3038. -#line 1721 "dtc-parser.tab.c" /* yacc.c:1646 */
  3039. break;
  3040. - case 29:
  3041. -#line 283 "dtc-parser.y" /* yacc.c:1646 */
  3042. + case 31:
  3043. +
  3044. +/* Line 1806 of yacc.c */
  3045. +#line 300 "dtc-parser.y"
  3046. {
  3047. unsigned long long bits;
  3048. - bits = (yyvsp[-1].integer);
  3049. + bits = (yyvsp[(2) - (3)].integer);
  3050. if ((bits != 8) && (bits != 16) &&
  3051. (bits != 32) && (bits != 64)) {
  3052. - ERROR(&(yylsp[-1]), "Array elements must be"
  3053. + ERROR(&(yylsp[(2) - (3)]), "Array elements must be"
  3054. " 8, 16, 32 or 64-bits");
  3055. bits = 32;
  3056. }
  3057. @@ -1737,23 +1918,25 @@ yyreduce:
  3058. (yyval.array).data = empty_data;
  3059. (yyval.array).bits = bits;
  3060. }
  3061. -#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */
  3062. break;
  3063. - case 30:
  3064. -#line 299 "dtc-parser.y" /* yacc.c:1646 */
  3065. + case 32:
  3066. +
  3067. +/* Line 1806 of yacc.c */
  3068. +#line 316 "dtc-parser.y"
  3069. {
  3070. (yyval.array).data = empty_data;
  3071. (yyval.array).bits = 32;
  3072. }
  3073. -#line 1750 "dtc-parser.tab.c" /* yacc.c:1646 */
  3074. break;
  3075. - case 31:
  3076. -#line 304 "dtc-parser.y" /* yacc.c:1646 */
  3077. + case 33:
  3078. +
  3079. +/* Line 1806 of yacc.c */
  3080. +#line 321 "dtc-parser.y"
  3081. {
  3082. - if ((yyvsp[-1].array).bits < 64) {
  3083. - uint64_t mask = (1ULL << (yyvsp[-1].array).bits) - 1;
  3084. + if ((yyvsp[(1) - (2)].array).bits < 64) {
  3085. + uint64_t mask = (1ULL << (yyvsp[(1) - (2)].array).bits) - 1;
  3086. /*
  3087. * Bits above mask must either be all zero
  3088. * (positive within range of mask) or all one
  3089. @@ -1762,258 +1945,293 @@ yyreduce:
  3090. * within the mask to one (i.e. | in the
  3091. * mask), all bits are one.
  3092. */
  3093. - if (((yyvsp[0].integer) > mask) && (((yyvsp[0].integer) | mask) != -1ULL))
  3094. - ERROR(&(yylsp[0]), "Value out of range for"
  3095. - " %d-bit array element", (yyvsp[-1].array).bits);
  3096. + if (((yyvsp[(2) - (2)].integer) > mask) && (((yyvsp[(2) - (2)].integer) | mask) != -1ULL))
  3097. + ERROR(&(yylsp[(2) - (2)]), "Value out of range for"
  3098. + " %d-bit array element", (yyvsp[(1) - (2)].array).bits);
  3099. }
  3100. - (yyval.array).data = data_append_integer((yyvsp[-1].array).data, (yyvsp[0].integer), (yyvsp[-1].array).bits);
  3101. + (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits);
  3102. }
  3103. -#line 1773 "dtc-parser.tab.c" /* yacc.c:1646 */
  3104. break;
  3105. - case 32:
  3106. -#line 323 "dtc-parser.y" /* yacc.c:1646 */
  3107. + case 34:
  3108. +
  3109. +/* Line 1806 of yacc.c */
  3110. +#line 340 "dtc-parser.y"
  3111. {
  3112. - uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits);
  3113. + uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);
  3114. - if ((yyvsp[-1].array).bits == 32)
  3115. - (yyvsp[-1].array).data = data_add_marker((yyvsp[-1].array).data,
  3116. + if ((yyvsp[(1) - (2)].array).bits == 32)
  3117. + (yyvsp[(1) - (2)].array).data = data_add_marker((yyvsp[(1) - (2)].array).data,
  3118. REF_PHANDLE,
  3119. - (yyvsp[0].labelref));
  3120. + (yyvsp[(2) - (2)].labelref));
  3121. else
  3122. - ERROR(&(yylsp[0]), "References are only allowed in "
  3123. + ERROR(&(yylsp[(2) - (2)]), "References are only allowed in "
  3124. "arrays with 32-bit elements.");
  3125. - (yyval.array).data = data_append_integer((yyvsp[-1].array).data, val, (yyvsp[-1].array).bits);
  3126. + (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits);
  3127. }
  3128. -#line 1791 "dtc-parser.tab.c" /* yacc.c:1646 */
  3129. break;
  3130. - case 33:
  3131. -#line 337 "dtc-parser.y" /* yacc.c:1646 */
  3132. + case 35:
  3133. +
  3134. +/* Line 1806 of yacc.c */
  3135. +#line 354 "dtc-parser.y"
  3136. {
  3137. - (yyval.array).data = data_add_marker((yyvsp[-1].array).data, LABEL, (yyvsp[0].labelref));
  3138. + (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref));
  3139. }
  3140. -#line 1799 "dtc-parser.tab.c" /* yacc.c:1646 */
  3141. break;
  3142. - case 36:
  3143. -#line 346 "dtc-parser.y" /* yacc.c:1646 */
  3144. + case 38:
  3145. +
  3146. +/* Line 1806 of yacc.c */
  3147. +#line 363 "dtc-parser.y"
  3148. {
  3149. - (yyval.integer) = (yyvsp[-1].integer);
  3150. + (yyval.integer) = (yyvsp[(2) - (3)].integer);
  3151. }
  3152. -#line 1807 "dtc-parser.tab.c" /* yacc.c:1646 */
  3153. - break;
  3154. -
  3155. - case 39:
  3156. -#line 357 "dtc-parser.y" /* yacc.c:1646 */
  3157. - { (yyval.integer) = (yyvsp[-4].integer) ? (yyvsp[-2].integer) : (yyvsp[0].integer); }
  3158. -#line 1813 "dtc-parser.tab.c" /* yacc.c:1646 */
  3159. break;
  3160. case 41:
  3161. -#line 362 "dtc-parser.y" /* yacc.c:1646 */
  3162. - { (yyval.integer) = (yyvsp[-2].integer) || (yyvsp[0].integer); }
  3163. -#line 1819 "dtc-parser.tab.c" /* yacc.c:1646 */
  3164. +
  3165. +/* Line 1806 of yacc.c */
  3166. +#line 374 "dtc-parser.y"
  3167. + { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); }
  3168. break;
  3169. case 43:
  3170. -#line 367 "dtc-parser.y" /* yacc.c:1646 */
  3171. - { (yyval.integer) = (yyvsp[-2].integer) && (yyvsp[0].integer); }
  3172. -#line 1825 "dtc-parser.tab.c" /* yacc.c:1646 */
  3173. +
  3174. +/* Line 1806 of yacc.c */
  3175. +#line 379 "dtc-parser.y"
  3176. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); }
  3177. break;
  3178. case 45:
  3179. -#line 372 "dtc-parser.y" /* yacc.c:1646 */
  3180. - { (yyval.integer) = (yyvsp[-2].integer) | (yyvsp[0].integer); }
  3181. -#line 1831 "dtc-parser.tab.c" /* yacc.c:1646 */
  3182. +
  3183. +/* Line 1806 of yacc.c */
  3184. +#line 384 "dtc-parser.y"
  3185. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); }
  3186. break;
  3187. case 47:
  3188. -#line 377 "dtc-parser.y" /* yacc.c:1646 */
  3189. - { (yyval.integer) = (yyvsp[-2].integer) ^ (yyvsp[0].integer); }
  3190. -#line 1837 "dtc-parser.tab.c" /* yacc.c:1646 */
  3191. +
  3192. +/* Line 1806 of yacc.c */
  3193. +#line 389 "dtc-parser.y"
  3194. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); }
  3195. break;
  3196. case 49:
  3197. -#line 382 "dtc-parser.y" /* yacc.c:1646 */
  3198. - { (yyval.integer) = (yyvsp[-2].integer) & (yyvsp[0].integer); }
  3199. -#line 1843 "dtc-parser.tab.c" /* yacc.c:1646 */
  3200. +
  3201. +/* Line 1806 of yacc.c */
  3202. +#line 394 "dtc-parser.y"
  3203. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); }
  3204. break;
  3205. case 51:
  3206. -#line 387 "dtc-parser.y" /* yacc.c:1646 */
  3207. - { (yyval.integer) = (yyvsp[-2].integer) == (yyvsp[0].integer); }
  3208. -#line 1849 "dtc-parser.tab.c" /* yacc.c:1646 */
  3209. +
  3210. +/* Line 1806 of yacc.c */
  3211. +#line 399 "dtc-parser.y"
  3212. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); }
  3213. break;
  3214. - case 52:
  3215. -#line 388 "dtc-parser.y" /* yacc.c:1646 */
  3216. - { (yyval.integer) = (yyvsp[-2].integer) != (yyvsp[0].integer); }
  3217. -#line 1855 "dtc-parser.tab.c" /* yacc.c:1646 */
  3218. + case 53:
  3219. +
  3220. +/* Line 1806 of yacc.c */
  3221. +#line 404 "dtc-parser.y"
  3222. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); }
  3223. break;
  3224. case 54:
  3225. -#line 393 "dtc-parser.y" /* yacc.c:1646 */
  3226. - { (yyval.integer) = (yyvsp[-2].integer) < (yyvsp[0].integer); }
  3227. -#line 1861 "dtc-parser.tab.c" /* yacc.c:1646 */
  3228. - break;
  3229. - case 55:
  3230. -#line 394 "dtc-parser.y" /* yacc.c:1646 */
  3231. - { (yyval.integer) = (yyvsp[-2].integer) > (yyvsp[0].integer); }
  3232. -#line 1867 "dtc-parser.tab.c" /* yacc.c:1646 */
  3233. +/* Line 1806 of yacc.c */
  3234. +#line 405 "dtc-parser.y"
  3235. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); }
  3236. break;
  3237. case 56:
  3238. -#line 395 "dtc-parser.y" /* yacc.c:1646 */
  3239. - { (yyval.integer) = (yyvsp[-2].integer) <= (yyvsp[0].integer); }
  3240. -#line 1873 "dtc-parser.tab.c" /* yacc.c:1646 */
  3241. +
  3242. +/* Line 1806 of yacc.c */
  3243. +#line 410 "dtc-parser.y"
  3244. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); }
  3245. break;
  3246. case 57:
  3247. -#line 396 "dtc-parser.y" /* yacc.c:1646 */
  3248. - { (yyval.integer) = (yyvsp[-2].integer) >= (yyvsp[0].integer); }
  3249. -#line 1879 "dtc-parser.tab.c" /* yacc.c:1646 */
  3250. +
  3251. +/* Line 1806 of yacc.c */
  3252. +#line 411 "dtc-parser.y"
  3253. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); }
  3254. break;
  3255. case 58:
  3256. -#line 400 "dtc-parser.y" /* yacc.c:1646 */
  3257. - { (yyval.integer) = (yyvsp[-2].integer) << (yyvsp[0].integer); }
  3258. -#line 1885 "dtc-parser.tab.c" /* yacc.c:1646 */
  3259. +
  3260. +/* Line 1806 of yacc.c */
  3261. +#line 412 "dtc-parser.y"
  3262. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); }
  3263. break;
  3264. case 59:
  3265. -#line 401 "dtc-parser.y" /* yacc.c:1646 */
  3266. - { (yyval.integer) = (yyvsp[-2].integer) >> (yyvsp[0].integer); }
  3267. -#line 1891 "dtc-parser.tab.c" /* yacc.c:1646 */
  3268. +
  3269. +/* Line 1806 of yacc.c */
  3270. +#line 413 "dtc-parser.y"
  3271. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); }
  3272. + break;
  3273. +
  3274. + case 60:
  3275. +
  3276. +/* Line 1806 of yacc.c */
  3277. +#line 417 "dtc-parser.y"
  3278. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); }
  3279. break;
  3280. case 61:
  3281. -#line 406 "dtc-parser.y" /* yacc.c:1646 */
  3282. - { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); }
  3283. -#line 1897 "dtc-parser.tab.c" /* yacc.c:1646 */
  3284. +
  3285. +/* Line 1806 of yacc.c */
  3286. +#line 418 "dtc-parser.y"
  3287. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); }
  3288. break;
  3289. - case 62:
  3290. -#line 407 "dtc-parser.y" /* yacc.c:1646 */
  3291. - { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); }
  3292. -#line 1903 "dtc-parser.tab.c" /* yacc.c:1646 */
  3293. + case 63:
  3294. +
  3295. +/* Line 1806 of yacc.c */
  3296. +#line 423 "dtc-parser.y"
  3297. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); }
  3298. break;
  3299. case 64:
  3300. -#line 412 "dtc-parser.y" /* yacc.c:1646 */
  3301. - { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); }
  3302. -#line 1909 "dtc-parser.tab.c" /* yacc.c:1646 */
  3303. - break;
  3304. - case 65:
  3305. -#line 413 "dtc-parser.y" /* yacc.c:1646 */
  3306. - { (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer); }
  3307. -#line 1915 "dtc-parser.tab.c" /* yacc.c:1646 */
  3308. +/* Line 1806 of yacc.c */
  3309. +#line 424 "dtc-parser.y"
  3310. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); }
  3311. break;
  3312. case 66:
  3313. -#line 414 "dtc-parser.y" /* yacc.c:1646 */
  3314. - { (yyval.integer) = (yyvsp[-2].integer) % (yyvsp[0].integer); }
  3315. -#line 1921 "dtc-parser.tab.c" /* yacc.c:1646 */
  3316. +
  3317. +/* Line 1806 of yacc.c */
  3318. +#line 429 "dtc-parser.y"
  3319. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); }
  3320. break;
  3321. - case 69:
  3322. -#line 420 "dtc-parser.y" /* yacc.c:1646 */
  3323. - { (yyval.integer) = -(yyvsp[0].integer); }
  3324. -#line 1927 "dtc-parser.tab.c" /* yacc.c:1646 */
  3325. + case 67:
  3326. +
  3327. +/* Line 1806 of yacc.c */
  3328. +#line 430 "dtc-parser.y"
  3329. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); }
  3330. break;
  3331. - case 70:
  3332. -#line 421 "dtc-parser.y" /* yacc.c:1646 */
  3333. - { (yyval.integer) = ~(yyvsp[0].integer); }
  3334. -#line 1933 "dtc-parser.tab.c" /* yacc.c:1646 */
  3335. + case 68:
  3336. +
  3337. +/* Line 1806 of yacc.c */
  3338. +#line 431 "dtc-parser.y"
  3339. + { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); }
  3340. break;
  3341. case 71:
  3342. -#line 422 "dtc-parser.y" /* yacc.c:1646 */
  3343. - { (yyval.integer) = !(yyvsp[0].integer); }
  3344. -#line 1939 "dtc-parser.tab.c" /* yacc.c:1646 */
  3345. +
  3346. +/* Line 1806 of yacc.c */
  3347. +#line 437 "dtc-parser.y"
  3348. + { (yyval.integer) = -(yyvsp[(2) - (2)].integer); }
  3349. break;
  3350. case 72:
  3351. -#line 427 "dtc-parser.y" /* yacc.c:1646 */
  3352. - {
  3353. - (yyval.data) = empty_data;
  3354. - }
  3355. -#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */
  3356. +
  3357. +/* Line 1806 of yacc.c */
  3358. +#line 438 "dtc-parser.y"
  3359. + { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); }
  3360. break;
  3361. case 73:
  3362. -#line 431 "dtc-parser.y" /* yacc.c:1646 */
  3363. - {
  3364. - (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte));
  3365. - }
  3366. -#line 1955 "dtc-parser.tab.c" /* yacc.c:1646 */
  3367. +
  3368. +/* Line 1806 of yacc.c */
  3369. +#line 439 "dtc-parser.y"
  3370. + { (yyval.integer) = !(yyvsp[(2) - (2)].integer); }
  3371. break;
  3372. case 74:
  3373. -#line 435 "dtc-parser.y" /* yacc.c:1646 */
  3374. +
  3375. +/* Line 1806 of yacc.c */
  3376. +#line 444 "dtc-parser.y"
  3377. {
  3378. - (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
  3379. + (yyval.data) = empty_data;
  3380. }
  3381. -#line 1963 "dtc-parser.tab.c" /* yacc.c:1646 */
  3382. break;
  3383. case 75:
  3384. -#line 442 "dtc-parser.y" /* yacc.c:1646 */
  3385. +
  3386. +/* Line 1806 of yacc.c */
  3387. +#line 448 "dtc-parser.y"
  3388. {
  3389. - (yyval.nodelist) = NULL;
  3390. + (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
  3391. }
  3392. -#line 1971 "dtc-parser.tab.c" /* yacc.c:1646 */
  3393. break;
  3394. case 76:
  3395. -#line 446 "dtc-parser.y" /* yacc.c:1646 */
  3396. +
  3397. +/* Line 1806 of yacc.c */
  3398. +#line 452 "dtc-parser.y"
  3399. {
  3400. - (yyval.nodelist) = chain_node((yyvsp[-1].node), (yyvsp[0].nodelist));
  3401. + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
  3402. }
  3403. -#line 1979 "dtc-parser.tab.c" /* yacc.c:1646 */
  3404. break;
  3405. case 77:
  3406. -#line 450 "dtc-parser.y" /* yacc.c:1646 */
  3407. +
  3408. +/* Line 1806 of yacc.c */
  3409. +#line 459 "dtc-parser.y"
  3410. {
  3411. - ERROR(&(yylsp[0]), "Properties must precede subnodes");
  3412. - YYERROR;
  3413. + (yyval.nodelist) = NULL;
  3414. }
  3415. -#line 1988 "dtc-parser.tab.c" /* yacc.c:1646 */
  3416. break;
  3417. case 78:
  3418. -#line 458 "dtc-parser.y" /* yacc.c:1646 */
  3419. +
  3420. +/* Line 1806 of yacc.c */
  3421. +#line 463 "dtc-parser.y"
  3422. {
  3423. - (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename));
  3424. + (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
  3425. }
  3426. -#line 1996 "dtc-parser.tab.c" /* yacc.c:1646 */
  3427. break;
  3428. case 79:
  3429. -#line 462 "dtc-parser.y" /* yacc.c:1646 */
  3430. +
  3431. +/* Line 1806 of yacc.c */
  3432. +#line 467 "dtc-parser.y"
  3433. {
  3434. - (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename));
  3435. + ERROR(&(yylsp[(2) - (2)]), "Properties must precede subnodes");
  3436. + YYERROR;
  3437. }
  3438. -#line 2004 "dtc-parser.tab.c" /* yacc.c:1646 */
  3439. break;
  3440. case 80:
  3441. -#line 466 "dtc-parser.y" /* yacc.c:1646 */
  3442. +
  3443. +/* Line 1806 of yacc.c */
  3444. +#line 475 "dtc-parser.y"
  3445. {
  3446. - add_label(&(yyvsp[0].node)->labels, (yyvsp[-1].labelref));
  3447. - (yyval.node) = (yyvsp[0].node);
  3448. + (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
  3449. }
  3450. -#line 2013 "dtc-parser.tab.c" /* yacc.c:1646 */
  3451. break;
  3452. + case 81:
  3453. -#line 2017 "dtc-parser.tab.c" /* yacc.c:1646 */
  3454. +/* Line 1806 of yacc.c */
  3455. +#line 479 "dtc-parser.y"
  3456. + {
  3457. + (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));
  3458. + }
  3459. + break;
  3460. +
  3461. + case 82:
  3462. +
  3463. +/* Line 1806 of yacc.c */
  3464. +#line 483 "dtc-parser.y"
  3465. + {
  3466. + add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
  3467. + (yyval.node) = (yyvsp[(2) - (2)].node);
  3468. + }
  3469. + break;
  3470. +
  3471. +
  3472. +
  3473. +/* Line 1806 of yacc.c */
  3474. +#line 2235 "dtc-parser.tab.c"
  3475. default: break;
  3476. }
  3477. /* User semantic actions sometimes alter yychar, and that requires
  3478. @@ -2036,7 +2254,7 @@ yyreduce:
  3479. *++yyvsp = yyval;
  3480. *++yylsp = yyloc;
  3481. - /* Now 'shift' the result of the reduction. Determine what state
  3482. + /* Now `shift' the result of the reduction. Determine what state
  3483. that goes to, based on the state we popped back to and the rule
  3484. number reduced by. */
  3485. @@ -2051,9 +2269,9 @@ yyreduce:
  3486. goto yynewstate;
  3487. -/*--------------------------------------.
  3488. -| yyerrlab -- here on detecting error. |
  3489. -`--------------------------------------*/
  3490. +/*------------------------------------.
  3491. +| yyerrlab -- here on detecting error |
  3492. +`------------------------------------*/
  3493. yyerrlab:
  3494. /* Make sure we have latest lookahead translation. See comments at
  3495. user semantic actions for why this is necessary. */
  3496. @@ -2104,20 +2322,20 @@ yyerrlab:
  3497. if (yyerrstatus == 3)
  3498. {
  3499. /* If just tried and failed to reuse lookahead token after an
  3500. - error, discard it. */
  3501. + error, discard it. */
  3502. if (yychar <= YYEOF)
  3503. - {
  3504. - /* Return failure if at end of input. */
  3505. - if (yychar == YYEOF)
  3506. - YYABORT;
  3507. - }
  3508. + {
  3509. + /* Return failure if at end of input. */
  3510. + if (yychar == YYEOF)
  3511. + YYABORT;
  3512. + }
  3513. else
  3514. - {
  3515. - yydestruct ("Error: discarding",
  3516. - yytoken, &yylval, &yylloc);
  3517. - yychar = YYEMPTY;
  3518. - }
  3519. + {
  3520. + yydestruct ("Error: discarding",
  3521. + yytoken, &yylval, &yylloc);
  3522. + yychar = YYEMPTY;
  3523. + }
  3524. }
  3525. /* Else will try to reuse lookahead token after shifting the error
  3526. @@ -2137,7 +2355,7 @@ yyerrorlab:
  3527. goto yyerrorlab;
  3528. yyerror_range[1] = yylsp[1-yylen];
  3529. - /* Do not reclaim the symbols of the rule whose action triggered
  3530. + /* Do not reclaim the symbols of the rule which action triggered
  3531. this YYERROR. */
  3532. YYPOPSTACK (yylen);
  3533. yylen = 0;
  3534. @@ -2150,37 +2368,35 @@ yyerrorlab:
  3535. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  3536. `-------------------------------------------------------------*/
  3537. yyerrlab1:
  3538. - yyerrstatus = 3; /* Each real token shifted decrements this. */
  3539. + yyerrstatus = 3; /* Each real token shifted decrements this. */
  3540. for (;;)
  3541. {
  3542. yyn = yypact[yystate];
  3543. if (!yypact_value_is_default (yyn))
  3544. - {
  3545. - yyn += YYTERROR;
  3546. - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  3547. - {
  3548. - yyn = yytable[yyn];
  3549. - if (0 < yyn)
  3550. - break;
  3551. - }
  3552. - }
  3553. + {
  3554. + yyn += YYTERROR;
  3555. + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  3556. + {
  3557. + yyn = yytable[yyn];
  3558. + if (0 < yyn)
  3559. + break;
  3560. + }
  3561. + }
  3562. /* Pop the current state because it cannot handle the error token. */
  3563. if (yyssp == yyss)
  3564. - YYABORT;
  3565. + YYABORT;
  3566. yyerror_range[1] = *yylsp;
  3567. yydestruct ("Error: popping",
  3568. - yystos[yystate], yyvsp, yylsp);
  3569. + yystos[yystate], yyvsp, yylsp);
  3570. YYPOPSTACK (1);
  3571. yystate = *yyssp;
  3572. YY_STACK_PRINT (yyss, yyssp);
  3573. }
  3574. - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  3575. *++yyvsp = yylval;
  3576. - YY_IGNORE_MAYBE_UNINITIALIZED_END
  3577. yyerror_range[2] = yylloc;
  3578. /* Using YYLLOC is tempting, but would change the location of
  3579. @@ -2209,7 +2425,7 @@ yyabortlab:
  3580. yyresult = 1;
  3581. goto yyreturn;
  3582. -#if !defined yyoverflow || YYERROR_VERBOSE
  3583. +#if !defined(yyoverflow) || YYERROR_VERBOSE
  3584. /*-------------------------------------------------.
  3585. | yyexhaustedlab -- memory exhaustion comes here. |
  3586. `-------------------------------------------------*/
  3587. @@ -2228,14 +2444,14 @@ yyreturn:
  3588. yydestruct ("Cleanup: discarding lookahead",
  3589. yytoken, &yylval, &yylloc);
  3590. }
  3591. - /* Do not reclaim the symbols of the rule whose action triggered
  3592. + /* Do not reclaim the symbols of the rule which action triggered
  3593. this YYABORT or YYACCEPT. */
  3594. YYPOPSTACK (yylen);
  3595. YY_STACK_PRINT (yyss, yyssp);
  3596. while (yyssp != yyss)
  3597. {
  3598. yydestruct ("Cleanup: popping",
  3599. - yystos[*yyssp], yyvsp, yylsp);
  3600. + yystos[*yyssp], yyvsp, yylsp);
  3601. YYPOPSTACK (1);
  3602. }
  3603. #ifndef yyoverflow
  3604. @@ -2246,12 +2462,18 @@ yyreturn:
  3605. if (yymsg != yymsgbuf)
  3606. YYSTACK_FREE (yymsg);
  3607. #endif
  3608. - return yyresult;
  3609. + /* Make sure YYID is used. */
  3610. + return YYID (yyresult);
  3611. }
  3612. -#line 472 "dtc-parser.y" /* yacc.c:1906 */
  3613. +
  3614. +
  3615. +
  3616. +/* Line 2067 of yacc.c */
  3617. +#line 489 "dtc-parser.y"
  3618. void yyerror(char const *s)
  3619. {
  3620. ERROR(&yylloc, "%s", s);
  3621. }
  3622. +
  3623. --- a/scripts/dtc/dtc-parser.tab.h_shipped
  3624. +++ b/scripts/dtc/dtc-parser.tab.h_shipped
  3625. @@ -1,19 +1,19 @@
  3626. -/* A Bison parser, made by GNU Bison 3.0.2. */
  3627. +/* A Bison parser, made by GNU Bison 2.5. */
  3628. /* Bison interface for Yacc-like parsers in C
  3629. -
  3630. - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
  3631. -
  3632. +
  3633. + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
  3634. +
  3635. This program is free software: you can redistribute it and/or modify
  3636. it under the terms of the GNU General Public License as published by
  3637. the Free Software Foundation, either version 3 of the License, or
  3638. (at your option) any later version.
  3639. -
  3640. +
  3641. This program is distributed in the hope that it will be useful,
  3642. but WITHOUT ANY WARRANTY; without even the implied warranty of
  3643. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  3644. GNU General Public License for more details.
  3645. -
  3646. +
  3647. You should have received a copy of the GNU General Public License
  3648. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  3649. @@ -26,55 +26,50 @@
  3650. special exception, which will cause the skeleton and the resulting
  3651. Bison output files to be licensed under the GNU General Public
  3652. License without this special exception.
  3653. -
  3654. +
  3655. This special exception was added by the Free Software Foundation in
  3656. version 2.2 of Bison. */
  3657. -#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED
  3658. -# define YY_YY_DTC_PARSER_TAB_H_INCLUDED
  3659. -/* Debug traces. */
  3660. -#ifndef YYDEBUG
  3661. -# define YYDEBUG 0
  3662. -#endif
  3663. -#if YYDEBUG
  3664. -extern int yydebug;
  3665. -#endif
  3666. -/* Token type. */
  3667. +/* Tokens. */
  3668. #ifndef YYTOKENTYPE
  3669. # define YYTOKENTYPE
  3670. - enum yytokentype
  3671. - {
  3672. - DT_V1 = 258,
  3673. - DT_MEMRESERVE = 259,
  3674. - DT_LSHIFT = 260,
  3675. - DT_RSHIFT = 261,
  3676. - DT_LE = 262,
  3677. - DT_GE = 263,
  3678. - DT_EQ = 264,
  3679. - DT_NE = 265,
  3680. - DT_AND = 266,
  3681. - DT_OR = 267,
  3682. - DT_BITS = 268,
  3683. - DT_DEL_PROP = 269,
  3684. - DT_DEL_NODE = 270,
  3685. - DT_PROPNODENAME = 271,
  3686. - DT_LITERAL = 272,
  3687. - DT_CHAR_LITERAL = 273,
  3688. - DT_BYTE = 274,
  3689. - DT_STRING = 275,
  3690. - DT_LABEL = 276,
  3691. - DT_REF = 277,
  3692. - DT_INCBIN = 278
  3693. - };
  3694. + /* Put the tokens into the symbol table, so that GDB and other debuggers
  3695. + know about them. */
  3696. + enum yytokentype {
  3697. + DT_V1 = 258,
  3698. + DT_PLUGIN = 259,
  3699. + DT_MEMRESERVE = 260,
  3700. + DT_LSHIFT = 261,
  3701. + DT_RSHIFT = 262,
  3702. + DT_LE = 263,
  3703. + DT_GE = 264,
  3704. + DT_EQ = 265,
  3705. + DT_NE = 266,
  3706. + DT_AND = 267,
  3707. + DT_OR = 268,
  3708. + DT_BITS = 269,
  3709. + DT_DEL_PROP = 270,
  3710. + DT_DEL_NODE = 271,
  3711. + DT_PROPNODENAME = 272,
  3712. + DT_LITERAL = 273,
  3713. + DT_CHAR_LITERAL = 274,
  3714. + DT_BYTE = 275,
  3715. + DT_STRING = 276,
  3716. + DT_LABEL = 277,
  3717. + DT_REF = 278,
  3718. + DT_INCBIN = 279
  3719. + };
  3720. #endif
  3721. -/* Value type. */
  3722. +
  3723. +
  3724. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  3725. -typedef union YYSTYPE YYSTYPE;
  3726. -union YYSTYPE
  3727. +typedef union YYSTYPE
  3728. {
  3729. -#line 38 "dtc-parser.y" /* yacc.c:1909 */
  3730. +
  3731. +/* Line 2068 of yacc.c */
  3732. +#line 39 "dtc-parser.y"
  3733. char *propnodename;
  3734. char *labelref;
  3735. @@ -92,30 +87,32 @@ union YYSTYPE
  3736. struct node *nodelist;
  3737. struct reserve_info *re;
  3738. uint64_t integer;
  3739. + int is_plugin;
  3740. +
  3741. +
  3742. -#line 97 "dtc-parser.tab.h" /* yacc.c:1909 */
  3743. -};
  3744. +/* Line 2068 of yacc.c */
  3745. +#line 96 "dtc-parser.tab.h"
  3746. +} YYSTYPE;
  3747. # define YYSTYPE_IS_TRIVIAL 1
  3748. +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
  3749. # define YYSTYPE_IS_DECLARED 1
  3750. #endif
  3751. -/* Location type. */
  3752. +extern YYSTYPE yylval;
  3753. +
  3754. #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
  3755. -typedef struct YYLTYPE YYLTYPE;
  3756. -struct YYLTYPE
  3757. +typedef struct YYLTYPE
  3758. {
  3759. int first_line;
  3760. int first_column;
  3761. int last_line;
  3762. int last_column;
  3763. -};
  3764. +} YYLTYPE;
  3765. +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
  3766. # define YYLTYPE_IS_DECLARED 1
  3767. # define YYLTYPE_IS_TRIVIAL 1
  3768. #endif
  3769. -
  3770. -extern YYSTYPE yylval;
  3771. extern YYLTYPE yylloc;
  3772. -int yyparse (void);
  3773. -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */
  3774. --- a/scripts/dtc/dtc-parser.y
  3775. +++ b/scripts/dtc/dtc-parser.y
  3776. @@ -19,6 +19,7 @@
  3777. */
  3778. %{
  3779. #include <stdio.h>
  3780. +#include <inttypes.h>
  3781. #include "dtc.h"
  3782. #include "srcpos.h"
  3783. @@ -52,9 +53,11 @@ extern bool treesource_error;
  3784. struct node *nodelist;
  3785. struct reserve_info *re;
  3786. uint64_t integer;
  3787. + int is_plugin;
  3788. }
  3789. %token DT_V1
  3790. +%token DT_PLUGIN
  3791. %token DT_MEMRESERVE
  3792. %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR
  3793. %token DT_BITS
  3794. @@ -71,6 +74,7 @@ extern bool treesource_error;
  3795. %type <data> propdata
  3796. %type <data> propdataprefix
  3797. +%type <is_plugin> plugindecl
  3798. %type <re> memreserve
  3799. %type <re> memreserves
  3800. %type <array> arrayprefix
  3801. @@ -101,10 +105,23 @@ extern bool treesource_error;
  3802. %%
  3803. sourcefile:
  3804. - DT_V1 ';' memreserves devicetree
  3805. + DT_V1 ';' plugindecl memreserves devicetree
  3806. {
  3807. - the_boot_info = build_boot_info($3, $4,
  3808. - guess_boot_cpuid($4));
  3809. + $5->is_plugin = $3;
  3810. + $5->is_root = 1;
  3811. + the_boot_info = build_boot_info($4, $5,
  3812. + guess_boot_cpuid($5));
  3813. + }
  3814. + ;
  3815. +
  3816. +plugindecl:
  3817. + /* empty */
  3818. + {
  3819. + $$ = 0;
  3820. + }
  3821. + | DT_PLUGIN ';'
  3822. + {
  3823. + $$ = 1;
  3824. }
  3825. ;
  3826. --- a/scripts/dtc/dtc.c
  3827. +++ b/scripts/dtc/dtc.c
  3828. @@ -29,6 +29,7 @@ int reservenum; /* Number of memory res
  3829. int minsize; /* Minimum blob size */
  3830. int padsize; /* Additional padding to blob */
  3831. int phandle_format = PHANDLE_BOTH; /* Use linux,phandle or phandle properties */
  3832. +int symbol_fixup_support = 0;
  3833. static void fill_fullpaths(struct node *tree, const char *prefix)
  3834. {
  3835. @@ -51,7 +52,7 @@ static void fill_fullpaths(struct node *
  3836. #define FDT_VERSION(version) _FDT_VERSION(version)
  3837. #define _FDT_VERSION(version) #version
  3838. static const char usage_synopsis[] = "dtc [options] <input file>";
  3839. -static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv";
  3840. +static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv@";
  3841. static struct option const usage_long_opts[] = {
  3842. {"quiet", no_argument, NULL, 'q'},
  3843. {"in-format", a_argument, NULL, 'I'},
  3844. @@ -69,6 +70,7 @@ static struct option const usage_long_op
  3845. {"phandle", a_argument, NULL, 'H'},
  3846. {"warning", a_argument, NULL, 'W'},
  3847. {"error", a_argument, NULL, 'E'},
  3848. + {"symbols", a_argument, NULL, '@'},
  3849. {"help", no_argument, NULL, 'h'},
  3850. {"version", no_argument, NULL, 'v'},
  3851. {NULL, no_argument, NULL, 0x0},
  3852. @@ -99,6 +101,7 @@ static const char * const usage_opts_hel
  3853. "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties",
  3854. "\n\tEnable/disable warnings (prefix with \"no-\")",
  3855. "\n\tEnable/disable errors (prefix with \"no-\")",
  3856. + "\n\tSymbols and Fixups support",
  3857. "\n\tPrint this help and exit",
  3858. "\n\tPrint version and exit",
  3859. NULL,
  3860. @@ -186,7 +189,9 @@ int main(int argc, char *argv[])
  3861. case 'E':
  3862. parse_checks_option(false, true, optarg);
  3863. break;
  3864. -
  3865. + case '@':
  3866. + symbol_fixup_support = 1;
  3867. + break;
  3868. case 'h':
  3869. usage(NULL);
  3870. default:
  3871. --- a/scripts/dtc/dtc.h
  3872. +++ b/scripts/dtc/dtc.h
  3873. @@ -54,6 +54,7 @@ extern int reservenum; /* Number of mem
  3874. extern int minsize; /* Minimum blob size */
  3875. extern int padsize; /* Additional padding to blob */
  3876. extern int phandle_format; /* Use linux,phandle or phandle properties */
  3877. +extern int symbol_fixup_support;/* enable symbols & fixup support */
  3878. #define PHANDLE_LEGACY 0x1
  3879. #define PHANDLE_EPAPR 0x2
  3880. @@ -132,6 +133,25 @@ struct label {
  3881. struct label *next;
  3882. };
  3883. +struct fixup_entry {
  3884. + int offset;
  3885. + struct node *node;
  3886. + struct property *prop;
  3887. + struct fixup_entry *next;
  3888. +};
  3889. +
  3890. +struct fixup {
  3891. + char *ref;
  3892. + struct fixup_entry *entries;
  3893. + struct fixup *next;
  3894. +};
  3895. +
  3896. +struct symbol {
  3897. + struct label *label;
  3898. + struct node *node;
  3899. + struct symbol *next;
  3900. +};
  3901. +
  3902. struct property {
  3903. bool deleted;
  3904. char *name;
  3905. @@ -158,6 +178,12 @@ struct node {
  3906. int addr_cells, size_cells;
  3907. struct label *labels;
  3908. +
  3909. + int is_root;
  3910. + int is_plugin;
  3911. + struct fixup *fixups;
  3912. + struct symbol *symbols;
  3913. + struct fixup_entry *local_fixups;
  3914. };
  3915. #define for_each_label_withdel(l0, l) \
  3916. @@ -181,6 +207,18 @@ struct node {
  3917. for_each_child_withdel(n, c) \
  3918. if (!(c)->deleted)
  3919. +#define for_each_fixup(n, f) \
  3920. + for ((f) = (n)->fixups; (f); (f) = (f)->next)
  3921. +
  3922. +#define for_each_fixup_entry(f, fe) \
  3923. + for ((fe) = (f)->entries; (fe); (fe) = (fe)->next)
  3924. +
  3925. +#define for_each_symbol(n, s) \
  3926. + for ((s) = (n)->symbols; (s); (s) = (s)->next)
  3927. +
  3928. +#define for_each_local_fixup_entry(n, fe) \
  3929. + for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next)
  3930. +
  3931. void add_label(struct label **labels, char *label);
  3932. void delete_labels(struct label **labels);
  3933. --- a/scripts/dtc/flattree.c
  3934. +++ b/scripts/dtc/flattree.c
  3935. @@ -262,6 +262,12 @@ static void flatten_tree(struct node *tr
  3936. struct property *prop;
  3937. struct node *child;
  3938. bool seen_name_prop = false;
  3939. + struct symbol *sym;
  3940. + struct fixup *f;
  3941. + struct fixup_entry *fe;
  3942. + char *name, *s;
  3943. + const char *fullpath;
  3944. + int namesz, nameoff, vallen;
  3945. if (tree->deleted)
  3946. return;
  3947. @@ -276,8 +282,6 @@ static void flatten_tree(struct node *tr
  3948. emit->align(etarget, sizeof(cell_t));
  3949. for_each_property(tree, prop) {
  3950. - int nameoff;
  3951. -
  3952. if (streq(prop->name, "name"))
  3953. seen_name_prop = true;
  3954. @@ -310,6 +314,139 @@ static void flatten_tree(struct node *tr
  3955. flatten_tree(child, emit, etarget, strbuf, vi);
  3956. }
  3957. + if (!symbol_fixup_support)
  3958. + goto no_symbols;
  3959. +
  3960. + /* add the symbol nodes (if any) */
  3961. + if (tree->symbols) {
  3962. +
  3963. + emit->beginnode(etarget, NULL);
  3964. + emit->string(etarget, "__symbols__", 0);
  3965. + emit->align(etarget, sizeof(cell_t));
  3966. +
  3967. + for_each_symbol(tree, sym) {
  3968. +
  3969. + vallen = strlen(sym->node->fullpath);
  3970. +
  3971. + nameoff = stringtable_insert(strbuf, sym->label->label);
  3972. +
  3973. + emit->property(etarget, NULL);
  3974. + emit->cell(etarget, vallen + 1);
  3975. + emit->cell(etarget, nameoff);
  3976. +
  3977. + if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
  3978. + emit->align(etarget, 8);
  3979. +
  3980. + emit->string(etarget, sym->node->fullpath,
  3981. + strlen(sym->node->fullpath));
  3982. + emit->align(etarget, sizeof(cell_t));
  3983. + }
  3984. +
  3985. + emit->endnode(etarget, NULL);
  3986. + }
  3987. +
  3988. + /* add the fixup nodes */
  3989. + if (tree->fixups) {
  3990. +
  3991. + /* emit the external fixups */
  3992. + emit->beginnode(etarget, NULL);
  3993. + emit->string(etarget, "__fixups__", 0);
  3994. + emit->align(etarget, sizeof(cell_t));
  3995. +
  3996. + for_each_fixup(tree, f) {
  3997. +
  3998. + namesz = 0;
  3999. + for_each_fixup_entry(f, fe) {
  4000. + fullpath = fe->node->fullpath;
  4001. + if (fullpath[0] == '\0')
  4002. + fullpath = "/";
  4003. + namesz += strlen(fullpath) + 1;
  4004. + namesz += strlen(fe->prop->name) + 1;
  4005. + namesz += 32; /* space for :<number> + '\0' */
  4006. + }
  4007. +
  4008. + name = xmalloc(namesz);
  4009. +
  4010. + s = name;
  4011. + for_each_fixup_entry(f, fe) {
  4012. + fullpath = fe->node->fullpath;
  4013. + if (fullpath[0] == '\0')
  4014. + fullpath = "/";
  4015. + snprintf(s, name + namesz - s, "%s:%s:%d",
  4016. + fullpath,
  4017. + fe->prop->name, fe->offset);
  4018. + s += strlen(s) + 1;
  4019. + }
  4020. +
  4021. + nameoff = stringtable_insert(strbuf, f->ref);
  4022. + vallen = s - name - 1;
  4023. +
  4024. + emit->property(etarget, NULL);
  4025. + emit->cell(etarget, vallen + 1);
  4026. + emit->cell(etarget, nameoff);
  4027. +
  4028. + if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
  4029. + emit->align(etarget, 8);
  4030. +
  4031. + emit->string(etarget, name, vallen);
  4032. + emit->align(etarget, sizeof(cell_t));
  4033. +
  4034. + free(name);
  4035. + }
  4036. +
  4037. + emit->endnode(etarget, tree->labels);
  4038. + }
  4039. +
  4040. + /* add the local fixup property */
  4041. + if (tree->local_fixups) {
  4042. +
  4043. + /* emit the external fixups */
  4044. + emit->beginnode(etarget, NULL);
  4045. + emit->string(etarget, "__local_fixups__", 0);
  4046. + emit->align(etarget, sizeof(cell_t));
  4047. +
  4048. + namesz = 0;
  4049. + for_each_local_fixup_entry(tree, fe) {
  4050. + fullpath = fe->node->fullpath;
  4051. + if (fullpath[0] == '\0')
  4052. + fullpath = "/";
  4053. + namesz += strlen(fullpath) + 1;
  4054. + namesz += strlen(fe->prop->name) + 1;
  4055. + namesz += 32; /* space for :<number> + '\0' */
  4056. + }
  4057. +
  4058. + name = xmalloc(namesz);
  4059. +
  4060. + s = name;
  4061. + for_each_local_fixup_entry(tree, fe) {
  4062. + fullpath = fe->node->fullpath;
  4063. + if (fullpath[0] == '\0')
  4064. + fullpath = "/";
  4065. + snprintf(s, name + namesz - s, "%s:%s:%d",
  4066. + fullpath, fe->prop->name,
  4067. + fe->offset);
  4068. + s += strlen(s) + 1;
  4069. + }
  4070. +
  4071. + nameoff = stringtable_insert(strbuf, "fixup");
  4072. + vallen = s - name - 1;
  4073. +
  4074. + emit->property(etarget, NULL);
  4075. + emit->cell(etarget, vallen + 1);
  4076. + emit->cell(etarget, nameoff);
  4077. +
  4078. + if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
  4079. + emit->align(etarget, 8);
  4080. +
  4081. + emit->string(etarget, name, vallen);
  4082. + emit->align(etarget, sizeof(cell_t));
  4083. +
  4084. + free(name);
  4085. +
  4086. + emit->endnode(etarget, tree->labels);
  4087. + }
  4088. +
  4089. +no_symbols:
  4090. emit->endnode(etarget, tree->labels);
  4091. }
  4092. --- a/scripts/dtc/version_gen.h
  4093. +++ b/scripts/dtc/version_gen.h
  4094. @@ -1 +1 @@
  4095. -#define DTC_VERSION "DTC 1.4.1-g9d3649bd"
  4096. +#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty"