123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389 |
- From 89380bfcda436c4602001f09d1777957304e1c41 Mon Sep 17 00:00:00 2001
- From: Phil Elwell <phil@raspberrypi.org>
- Date: Tue, 14 Jul 2015 17:00:18 +0100
- Subject: [PATCH 082/381] scripts/dtc: Add overlay support
- ---
- scripts/dtc/checks.c | 119 ++-
- scripts/dtc/dtc-lexer.l | 5 +
- scripts/dtc/dtc-lexer.lex.c_shipped | 490 ++++-----
- scripts/dtc/dtc-parser.tab.c_shipped | 1896 +++++++++++++++++++---------------
- scripts/dtc/dtc-parser.tab.h_shipped | 107 +-
- scripts/dtc/dtc-parser.y | 23 +-
- scripts/dtc/dtc.c | 9 +-
- scripts/dtc/dtc.h | 38 +
- scripts/dtc/flattree.c | 141 ++-
- scripts/dtc/version_gen.h | 2 +-
- 10 files changed, 1685 insertions(+), 1145 deletions(-)
- --- a/scripts/dtc/checks.c
- +++ b/scripts/dtc/checks.c
- @@ -458,21 +458,91 @@ static void fixup_phandle_references(str
- struct node *node, struct property *prop)
- {
- struct marker *m = prop->val.markers;
- + struct fixup *f, **fp;
- + struct fixup_entry *fe, **fep;
- struct node *refnode;
- cell_t phandle;
- + int has_phandle_refs;
- +
- + has_phandle_refs = 0;
- + for_each_marker_of_type(m, REF_PHANDLE) {
- + has_phandle_refs = 1;
- + break;
- + }
- +
- + if (!has_phandle_refs)
- + return;
-
- for_each_marker_of_type(m, REF_PHANDLE) {
- assert(m->offset + sizeof(cell_t) <= prop->val.len);
-
- refnode = get_node_by_ref(dt, m->ref);
- - if (! refnode) {
- + if (!refnode && !symbol_fixup_support) {
- FAIL(c, "Reference to non-existent node or label \"%s\"\n",
- - m->ref);
- + m->ref);
- continue;
- }
-
- - phandle = get_node_phandle(dt, refnode);
- - *((cell_t *)(prop->val.val + m->offset)) = cpu_to_fdt32(phandle);
- + if (!refnode) {
- + /* allocate fixup entry */
- + fe = xmalloc(sizeof(*fe));
- +
- + fe->node = node;
- + fe->prop = prop;
- + fe->offset = m->offset;
- + fe->next = NULL;
- +
- + /* search for an already existing fixup */
- + for_each_fixup(dt, f)
- + if (strcmp(f->ref, m->ref) == 0)
- + break;
- +
- + /* no fixup found, add new */
- + if (f == NULL) {
- + f = xmalloc(sizeof(*f));
- + f->ref = m->ref;
- + f->entries = NULL;
- + f->next = NULL;
- +
- + /* add it to the tree */
- + fp = &dt->fixups;
- + while (*fp)
- + fp = &(*fp)->next;
- + *fp = f;
- + }
- +
- + /* and now append fixup entry */
- + fep = &f->entries;
- + while (*fep)
- + fep = &(*fep)->next;
- + *fep = fe;
- +
- + /* mark the entry as unresolved */
- + phandle = 0xdeadbeef;
- + } else {
- + phandle = get_node_phandle(dt, refnode);
- +
- + /* if it's a plugin, we need to record it */
- + if (symbol_fixup_support && dt->is_plugin) {
- +
- + /* allocate a new local fixup entry */
- + fe = xmalloc(sizeof(*fe));
- +
- + fe->node = node;
- + fe->prop = prop;
- + fe->offset = m->offset;
- + fe->next = NULL;
- +
- + /* append it to the local fixups */
- + fep = &dt->local_fixups;
- + while (*fep)
- + fep = &(*fep)->next;
- + *fep = fe;
- + }
- + }
- +
- + *((cell_t *)(prop->val.val + m->offset)) =
- + cpu_to_fdt32(phandle);
- }
- }
- ERROR(phandle_references, NULL, NULL, fixup_phandle_references, NULL,
- @@ -652,6 +722,45 @@ static void check_obsolete_chosen_interr
- }
- TREE_WARNING(obsolete_chosen_interrupt_controller, NULL);
-
- +static void check_auto_label_phandles(struct check *c, struct node *dt,
- + struct node *node)
- +{
- + struct label *l;
- + struct symbol *s, **sp;
- + int has_label;
- +
- + if (!symbol_fixup_support)
- + return;
- +
- + has_label = 0;
- + for_each_label(node->labels, l) {
- + has_label = 1;
- + break;
- + }
- +
- + if (!has_label)
- + return;
- +
- + /* force allocation of a phandle for this node */
- + (void)get_node_phandle(dt, node);
- +
- + /* add the symbol */
- + for_each_label(node->labels, l) {
- +
- + s = xmalloc(sizeof(*s));
- + s->label = l;
- + s->node = node;
- + s->next = NULL;
- +
- + /* add it to the symbols list */
- + sp = &dt->symbols;
- + while (*sp)
- + sp = &((*sp)->next);
- + *sp = s;
- + }
- +}
- +NODE_WARNING(auto_label_phandles, NULL);
- +
- static struct check *check_table[] = {
- &duplicate_node_names, &duplicate_property_names,
- &node_name_chars, &node_name_format, &property_name_chars,
- @@ -670,6 +779,8 @@ static struct check *check_table[] = {
- &avoid_default_addr_size,
- &obsolete_chosen_interrupt_controller,
-
- + &auto_label_phandles,
- +
- &always_fail,
- };
-
- --- a/scripts/dtc/dtc-lexer.l
- +++ b/scripts/dtc/dtc-lexer.l
- @@ -113,6 +113,11 @@ static void lexical_error(const char *fm
- return DT_V1;
- }
-
- +<*>"/plugin/" {
- + DPRINT("Keyword: /plugin/\n");
- + return DT_PLUGIN;
- + }
- +
- <*>"/memreserve/" {
- DPRINT("Keyword: /memreserve/\n");
- BEGIN_DEFAULT();
- --- a/scripts/dtc/dtc-lexer.lex.c_shipped
- +++ b/scripts/dtc/dtc-lexer.lex.c_shipped
- @@ -9,7 +9,7 @@
- #define FLEX_SCANNER
- #define YY_FLEX_MAJOR_VERSION 2
- #define YY_FLEX_MINOR_VERSION 5
- -#define YY_FLEX_SUBMINOR_VERSION 39
- +#define YY_FLEX_SUBMINOR_VERSION 35
- #if YY_FLEX_SUBMINOR_VERSION > 0
- #define FLEX_BETA
- #endif
- @@ -162,12 +162,7 @@ typedef unsigned int flex_uint32_t;
- typedef struct yy_buffer_state *YY_BUFFER_STATE;
- #endif
-
- -#ifndef YY_TYPEDEF_YY_SIZE_T
- -#define YY_TYPEDEF_YY_SIZE_T
- -typedef size_t yy_size_t;
- -#endif
- -
- -extern yy_size_t yyleng;
- +extern int yyleng;
-
- extern FILE *yyin, *yyout;
-
- @@ -176,7 +171,6 @@ extern FILE *yyin, *yyout;
- #define EOB_ACT_LAST_MATCH 2
-
- #define YY_LESS_LINENO(n)
- - #define YY_LINENO_REWIND_TO(ptr)
-
- /* Return all but the first "n" matched characters back to the input stream. */
- #define yyless(n) \
- @@ -194,6 +188,11 @@ extern FILE *yyin, *yyout;
-
- #define unput(c) yyunput( c, (yytext_ptr) )
-
- +#ifndef YY_TYPEDEF_YY_SIZE_T
- +#define YY_TYPEDEF_YY_SIZE_T
- +typedef size_t yy_size_t;
- +#endif
- +
- #ifndef YY_STRUCT_YY_BUFFER_STATE
- #define YY_STRUCT_YY_BUFFER_STATE
- struct yy_buffer_state
- @@ -211,7 +210,7 @@ struct yy_buffer_state
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- - yy_size_t yy_n_chars;
- + int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- @@ -281,8 +280,8 @@ static YY_BUFFER_STATE * yy_buffer_stack
-
- /* yy_hold_char holds the character lost when yytext is formed. */
- static char yy_hold_char;
- -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
- -yy_size_t yyleng;
- +static int yy_n_chars; /* number of characters read into yy_ch_buf */
- +int yyleng;
-
- /* Points to current character in buffer. */
- static char *yy_c_buf_p = (char *) 0;
- @@ -310,7 +309,7 @@ static void yy_init_buffer (YY_BUFFER_ST
-
- YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
- YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
- -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
- +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
-
- void *yyalloc (yy_size_t );
- void *yyrealloc (void *,yy_size_t );
- @@ -342,7 +341,7 @@ void yyfree (void * );
-
- /* Begin user sect3 */
-
- -#define yywrap() 1
- +#define yywrap(n) 1
- #define YY_SKIP_YYWRAP
-
- typedef unsigned char YY_CHAR;
- @@ -373,8 +372,8 @@ static void yy_fatal_error (yyconst char
- *yy_cp = '\0'; \
- (yy_c_buf_p) = yy_cp;
-
- -#define YY_NUM_RULES 30
- -#define YY_END_OF_BUFFER 31
- +#define YY_NUM_RULES 31
- +#define YY_END_OF_BUFFER 32
- /* This struct is not used in this scanner,
- but its presence is necessary. */
- struct yy_trans_info
- @@ -382,25 +381,26 @@ struct yy_trans_info
- flex_int32_t yy_verify;
- flex_int32_t yy_nxt;
- };
- -static yyconst flex_int16_t yy_accept[159] =
- +static yyconst flex_int16_t yy_accept[166] =
- { 0,
- - 0, 0, 0, 0, 0, 0, 0, 0, 31, 29,
- - 18, 18, 29, 29, 29, 29, 29, 29, 29, 29,
- - 29, 29, 29, 29, 29, 29, 15, 16, 16, 29,
- - 16, 10, 10, 18, 26, 0, 3, 0, 27, 12,
- - 0, 0, 11, 0, 0, 0, 0, 0, 0, 0,
- - 21, 23, 25, 24, 22, 0, 9, 28, 0, 0,
- - 0, 14, 14, 16, 16, 16, 10, 10, 10, 0,
- - 12, 0, 11, 0, 0, 0, 20, 0, 0, 0,
- - 0, 0, 0, 0, 0, 16, 10, 10, 10, 0,
- - 13, 19, 0, 0, 0, 0, 0, 0, 0, 0,
- -
- - 0, 16, 0, 0, 0, 0, 0, 0, 0, 0,
- - 0, 16, 6, 0, 0, 0, 0, 0, 0, 2,
- - 0, 0, 0, 0, 0, 0, 0, 0, 4, 17,
- - 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
- - 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
- - 5, 8, 0, 0, 0, 0, 7, 0
- + 0, 0, 0, 0, 0, 0, 0, 0, 32, 30,
- + 19, 19, 30, 30, 30, 30, 30, 30, 30, 30,
- + 30, 30, 30, 30, 30, 30, 16, 17, 17, 30,
- + 17, 11, 11, 19, 27, 0, 3, 0, 28, 13,
- + 0, 0, 12, 0, 0, 0, 0, 0, 0, 0,
- + 0, 22, 24, 26, 25, 23, 0, 10, 29, 0,
- + 0, 0, 15, 15, 17, 17, 17, 11, 11, 11,
- + 0, 13, 0, 12, 0, 0, 0, 21, 0, 0,
- + 0, 0, 0, 0, 0, 0, 0, 17, 11, 11,
- + 11, 0, 14, 20, 0, 0, 0, 0, 0, 0,
- +
- + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0,
- + 0, 0, 0, 0, 0, 17, 7, 0, 0, 0,
- + 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
- + 0, 0, 0, 0, 4, 18, 0, 0, 5, 2,
- + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- + 0, 0, 1, 0, 0, 0, 0, 6, 9, 0,
- + 0, 0, 0, 8, 0
- } ;
-
- static yyconst flex_int32_t yy_ec[256] =
- @@ -416,9 +416,9 @@ static yyconst flex_int32_t yy_ec[256] =
- 22, 22, 22, 22, 24, 22, 22, 25, 22, 22,
- 1, 26, 27, 1, 22, 1, 21, 28, 29, 30,
-
- - 31, 21, 22, 22, 32, 22, 22, 33, 34, 35,
- - 36, 37, 22, 38, 39, 40, 41, 42, 22, 25,
- - 43, 22, 44, 45, 46, 1, 1, 1, 1, 1,
- + 31, 21, 32, 22, 33, 22, 22, 34, 35, 36,
- + 37, 38, 22, 39, 40, 41, 42, 43, 22, 25,
- + 44, 22, 45, 46, 47, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- @@ -435,163 +435,165 @@ static yyconst flex_int32_t yy_ec[256] =
- 1, 1, 1, 1, 1
- } ;
-
- -static yyconst flex_int32_t yy_meta[47] =
- +static yyconst flex_int32_t yy_meta[48] =
- { 0,
- 1, 1, 1, 1, 1, 1, 2, 3, 1, 2,
- 2, 2, 4, 5, 5, 5, 6, 1, 1, 1,
- 7, 8, 8, 8, 8, 1, 1, 7, 7, 7,
- 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- - 8, 8, 8, 3, 1, 4
- + 8, 8, 8, 8, 3, 1, 4
- } ;
-
- -static yyconst flex_int16_t yy_base[173] =
- +static yyconst flex_int16_t yy_base[180] =
- { 0,
- - 0, 383, 34, 382, 65, 381, 37, 105, 387, 391,
- - 54, 111, 367, 110, 109, 109, 112, 41, 366, 104,
- - 367, 338, 124, 117, 0, 144, 391, 0, 121, 0,
- - 135, 155, 140, 179, 391, 160, 391, 379, 391, 0,
- - 368, 141, 391, 167, 370, 376, 346, 103, 342, 345,
- - 391, 391, 391, 391, 391, 358, 391, 391, 175, 342,
- - 338, 391, 355, 0, 185, 339, 184, 347, 346, 0,
- - 0, 322, 175, 357, 175, 363, 352, 324, 330, 323,
- - 332, 326, 201, 324, 329, 322, 391, 333, 181, 309,
- - 391, 341, 340, 313, 320, 338, 178, 311, 146, 317,
- -
- - 314, 315, 335, 331, 303, 300, 309, 299, 308, 188,
- - 336, 335, 391, 305, 320, 281, 283, 271, 203, 288,
- - 281, 271, 266, 264, 245, 242, 208, 104, 391, 391,
- - 244, 218, 204, 219, 206, 224, 201, 212, 204, 229,
- - 215, 208, 207, 200, 219, 391, 233, 221, 200, 181,
- - 391, 391, 149, 122, 86, 41, 391, 391, 245, 251,
- - 259, 263, 267, 273, 280, 284, 292, 300, 304, 310,
- - 318, 326
- + 0, 393, 35, 392, 66, 391, 38, 107, 397, 401,
- + 55, 113, 377, 112, 111, 111, 114, 42, 376, 106,
- + 377, 347, 126, 120, 0, 147, 401, 0, 124, 0,
- + 137, 158, 170, 163, 401, 153, 401, 389, 401, 0,
- + 378, 120, 401, 131, 380, 386, 355, 139, 351, 355,
- + 351, 401, 401, 401, 401, 401, 367, 401, 401, 185,
- + 350, 346, 401, 364, 0, 185, 347, 189, 356, 355,
- + 0, 0, 330, 180, 366, 141, 372, 361, 332, 338,
- + 331, 341, 334, 326, 205, 331, 337, 329, 401, 341,
- + 167, 316, 401, 349, 348, 320, 328, 346, 180, 318,
- +
- + 324, 209, 324, 320, 322, 342, 338, 309, 306, 315,
- + 305, 315, 312, 192, 342, 341, 401, 293, 306, 282,
- + 268, 252, 255, 203, 285, 282, 272, 268, 252, 233,
- + 232, 239, 208, 107, 401, 401, 238, 211, 401, 211,
- + 212, 208, 228, 203, 215, 207, 233, 222, 212, 211,
- + 203, 227, 401, 237, 225, 204, 185, 401, 401, 149,
- + 128, 88, 42, 401, 401, 253, 259, 267, 271, 275,
- + 281, 288, 292, 300, 308, 312, 318, 326, 334
- } ;
-
- -static yyconst flex_int16_t yy_def[173] =
- +static yyconst flex_int16_t yy_def[180] =
- { 0,
- - 158, 1, 1, 3, 158, 5, 1, 1, 158, 158,
- - 158, 158, 158, 159, 160, 161, 158, 158, 158, 158,
- - 162, 158, 158, 158, 163, 162, 158, 164, 165, 164,
- - 164, 158, 158, 158, 158, 159, 158, 159, 158, 166,
- - 158, 161, 158, 161, 167, 168, 158, 158, 158, 158,
- - 158, 158, 158, 158, 158, 162, 158, 158, 158, 158,
- - 158, 158, 162, 164, 165, 164, 158, 158, 158, 169,
- - 166, 170, 161, 167, 167, 168, 158, 158, 158, 158,
- - 158, 158, 158, 158, 158, 164, 158, 158, 169, 170,
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- -
- - 158, 164, 158, 158, 158, 158, 158, 158, 158, 171,
- - 158, 164, 158, 158, 158, 158, 158, 158, 171, 158,
- - 171, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- - 172, 158, 158, 158, 172, 158, 172, 158, 158, 158,
- - 158, 158, 158, 158, 158, 158, 158, 0, 158, 158,
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- - 158, 158
- + 165, 1, 1, 3, 165, 5, 1, 1, 165, 165,
- + 165, 165, 165, 166, 167, 168, 165, 165, 165, 165,
- + 169, 165, 165, 165, 170, 169, 165, 171, 172, 171,
- + 171, 165, 165, 165, 165, 166, 165, 166, 165, 173,
- + 165, 168, 165, 168, 174, 175, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 169, 165, 165, 165,
- + 165, 165, 165, 169, 171, 172, 171, 165, 165, 165,
- + 176, 173, 177, 168, 174, 174, 175, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 171, 165, 165,
- + 176, 177, 165, 165, 165, 165, 165, 165, 165, 165,
- +
- + 165, 165, 165, 165, 171, 165, 165, 165, 165, 165,
- + 165, 165, 165, 178, 165, 171, 165, 165, 165, 165,
- + 165, 165, 165, 178, 165, 178, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 179, 165, 165,
- + 165, 179, 165, 179, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 0, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165, 165
- } ;
-
- -static yyconst flex_int16_t yy_nxt[438] =
- +static yyconst flex_int16_t yy_nxt[449] =
- { 0,
- 10, 11, 12, 11, 13, 14, 10, 15, 16, 10,
- 10, 10, 17, 10, 10, 10, 10, 18, 19, 20,
- 21, 21, 21, 21, 21, 10, 10, 21, 21, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- - 21, 21, 21, 10, 22, 10, 24, 25, 25, 25,
- - 32, 33, 33, 157, 26, 34, 34, 34, 51, 52,
- - 27, 26, 26, 26, 26, 10, 11, 12, 11, 13,
- - 14, 28, 15, 16, 28, 28, 28, 24, 28, 28,
- - 28, 10, 18, 19, 20, 29, 29, 29, 29, 29,
- - 30, 10, 29, 29, 29, 29, 29, 29, 29, 29,
- -
- - 29, 29, 29, 29, 29, 29, 29, 29, 10, 22,
- - 10, 23, 34, 34, 34, 37, 39, 43, 32, 33,
- - 33, 45, 54, 55, 46, 59, 45, 64, 156, 46,
- - 64, 64, 64, 79, 44, 38, 59, 57, 134, 47,
- - 135, 48, 80, 49, 47, 50, 48, 99, 61, 43,
- - 50, 110, 41, 67, 67, 67, 60, 63, 63, 63,
- - 57, 155, 68, 69, 63, 37, 44, 66, 67, 67,
- - 67, 63, 63, 63, 63, 73, 59, 68, 69, 70,
- - 34, 34, 34, 43, 75, 38, 154, 92, 83, 83,
- - 83, 64, 44, 120, 64, 64, 64, 67, 67, 67,
- -
- - 44, 57, 99, 68, 69, 107, 68, 69, 120, 127,
- - 108, 153, 152, 121, 83, 83, 83, 133, 133, 133,
- - 146, 133, 133, 133, 146, 140, 140, 140, 121, 141,
- - 140, 140, 140, 151, 141, 158, 150, 149, 148, 144,
- - 147, 143, 142, 139, 147, 36, 36, 36, 36, 36,
- - 36, 36, 36, 40, 138, 137, 136, 40, 40, 42,
- - 42, 42, 42, 42, 42, 42, 42, 56, 56, 56,
- - 56, 62, 132, 62, 64, 131, 130, 64, 129, 64,
- - 64, 65, 128, 158, 65, 65, 65, 65, 71, 127,
- - 71, 71, 74, 74, 74, 74, 74, 74, 74, 74,
- -
- - 76, 76, 76, 76, 76, 76, 76, 76, 89, 126,
- - 89, 90, 125, 90, 90, 124, 90, 90, 119, 119,
- - 119, 119, 119, 119, 119, 119, 145, 145, 145, 145,
- - 145, 145, 145, 145, 123, 122, 59, 59, 118, 117,
- - 116, 115, 114, 113, 45, 112, 108, 111, 109, 106,
- - 105, 104, 46, 103, 91, 87, 102, 101, 100, 98,
- - 97, 96, 95, 94, 93, 77, 75, 91, 88, 87,
- - 86, 57, 85, 84, 57, 82, 81, 78, 77, 75,
- - 72, 158, 58, 57, 53, 35, 158, 31, 23, 23,
- - 9, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- -
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- - 158, 158, 158, 158, 158, 158, 158
- + 21, 21, 21, 21, 10, 22, 10, 24, 25, 25,
- + 25, 32, 33, 33, 164, 26, 34, 34, 34, 52,
- + 53, 27, 26, 26, 26, 26, 10, 11, 12, 11,
- + 13, 14, 28, 15, 16, 28, 28, 28, 24, 28,
- + 28, 28, 10, 18, 19, 20, 29, 29, 29, 29,
- + 29, 30, 10, 29, 29, 29, 29, 29, 29, 29,
- +
- + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
- + 10, 22, 10, 23, 34, 34, 34, 37, 39, 43,
- + 32, 33, 33, 45, 55, 56, 46, 60, 43, 45,
- + 65, 163, 46, 65, 65, 65, 44, 38, 60, 74,
- + 58, 47, 141, 48, 142, 44, 49, 47, 50, 48,
- + 76, 51, 62, 94, 50, 41, 44, 51, 37, 61,
- + 64, 64, 64, 58, 34, 34, 34, 64, 162, 80,
- + 67, 68, 68, 68, 64, 64, 64, 64, 38, 81,
- + 69, 70, 71, 68, 68, 68, 60, 161, 43, 69,
- + 70, 65, 69, 70, 65, 65, 65, 125, 85, 85,
- +
- + 85, 58, 68, 68, 68, 44, 102, 110, 125, 133,
- + 102, 69, 70, 111, 114, 160, 159, 126, 85, 85,
- + 85, 140, 140, 140, 140, 140, 140, 153, 126, 147,
- + 147, 147, 153, 148, 147, 147, 147, 158, 148, 165,
- + 157, 156, 155, 151, 150, 149, 146, 154, 145, 144,
- + 143, 139, 154, 36, 36, 36, 36, 36, 36, 36,
- + 36, 40, 138, 137, 136, 40, 40, 42, 42, 42,
- + 42, 42, 42, 42, 42, 57, 57, 57, 57, 63,
- + 135, 63, 65, 134, 165, 65, 133, 65, 65, 66,
- + 132, 131, 66, 66, 66, 66, 72, 130, 72, 72,
- +
- + 75, 75, 75, 75, 75, 75, 75, 75, 77, 77,
- + 77, 77, 77, 77, 77, 77, 91, 129, 91, 92,
- + 128, 92, 92, 127, 92, 92, 124, 124, 124, 124,
- + 124, 124, 124, 124, 152, 152, 152, 152, 152, 152,
- + 152, 152, 60, 60, 123, 122, 121, 120, 119, 118,
- + 117, 45, 116, 111, 115, 113, 112, 109, 108, 107,
- + 46, 106, 93, 89, 105, 104, 103, 101, 100, 99,
- + 98, 97, 96, 95, 78, 76, 93, 90, 89, 88,
- + 58, 87, 86, 58, 84, 83, 82, 79, 78, 76,
- + 73, 165, 59, 58, 54, 35, 165, 31, 23, 23,
- +
- + 9, 165, 165, 165, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165
- } ;
-
- -static yyconst flex_int16_t yy_chk[438] =
- +static yyconst flex_int16_t yy_chk[449] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- - 1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
- - 7, 7, 7, 156, 3, 11, 11, 11, 18, 18,
- - 3, 3, 3, 3, 3, 5, 5, 5, 5, 5,
- + 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
- + 3, 7, 7, 7, 163, 3, 11, 11, 11, 18,
- + 18, 3, 3, 3, 3, 3, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
-
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- - 5, 8, 12, 12, 12, 14, 15, 16, 8, 8,
- - 8, 17, 20, 20, 17, 23, 24, 29, 155, 24,
- - 29, 29, 29, 48, 16, 14, 31, 29, 128, 17,
- - 128, 17, 48, 17, 24, 17, 24, 99, 24, 42,
- - 24, 99, 15, 33, 33, 33, 23, 26, 26, 26,
- - 26, 154, 33, 33, 26, 36, 42, 31, 32, 32,
- - 32, 26, 26, 26, 26, 44, 59, 32, 32, 32,
- - 34, 34, 34, 73, 75, 36, 153, 75, 59, 59,
- - 59, 65, 44, 110, 65, 65, 65, 67, 67, 67,
- -
- - 73, 65, 83, 89, 89, 97, 67, 67, 119, 127,
- - 97, 150, 149, 110, 83, 83, 83, 133, 133, 133,
- - 141, 127, 127, 127, 145, 136, 136, 136, 119, 136,
- - 140, 140, 140, 148, 140, 147, 144, 143, 142, 139,
- - 141, 138, 137, 135, 145, 159, 159, 159, 159, 159,
- - 159, 159, 159, 160, 134, 132, 131, 160, 160, 161,
- - 161, 161, 161, 161, 161, 161, 161, 162, 162, 162,
- - 162, 163, 126, 163, 164, 125, 124, 164, 123, 164,
- - 164, 165, 122, 121, 165, 165, 165, 165, 166, 120,
- - 166, 166, 167, 167, 167, 167, 167, 167, 167, 167,
- -
- - 168, 168, 168, 168, 168, 168, 168, 168, 169, 118,
- - 169, 170, 117, 170, 170, 116, 170, 170, 171, 171,
- - 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
- - 172, 172, 172, 172, 115, 114, 112, 111, 109, 108,
- - 107, 106, 105, 104, 103, 102, 101, 100, 98, 96,
- - 95, 94, 93, 92, 90, 88, 86, 85, 84, 82,
- - 81, 80, 79, 78, 77, 76, 74, 72, 69, 68,
- - 66, 63, 61, 60, 56, 50, 49, 47, 46, 45,
- + 5, 5, 5, 8, 12, 12, 12, 14, 15, 16,
- + 8, 8, 8, 17, 20, 20, 17, 23, 42, 24,
- + 29, 162, 24, 29, 29, 29, 16, 14, 31, 44,
- + 29, 17, 134, 17, 134, 42, 17, 24, 17, 24,
- + 76, 17, 24, 76, 24, 15, 44, 24, 36, 23,
- + 26, 26, 26, 26, 34, 34, 34, 26, 161, 48,
- + 31, 32, 32, 32, 26, 26, 26, 26, 36, 48,
- + 32, 32, 32, 33, 33, 33, 60, 160, 74, 91,
- + 91, 66, 33, 33, 66, 66, 66, 114, 60, 60,
- +
- + 60, 66, 68, 68, 68, 74, 85, 99, 124, 133,
- + 102, 68, 68, 99, 102, 157, 156, 114, 85, 85,
- + 85, 133, 133, 133, 140, 140, 140, 148, 124, 143,
- + 143, 143, 152, 143, 147, 147, 147, 155, 147, 154,
- + 151, 150, 149, 146, 145, 144, 142, 148, 141, 138,
- + 137, 132, 152, 166, 166, 166, 166, 166, 166, 166,
- + 166, 167, 131, 130, 129, 167, 167, 168, 168, 168,
- + 168, 168, 168, 168, 168, 169, 169, 169, 169, 170,
- + 128, 170, 171, 127, 126, 171, 125, 171, 171, 172,
- + 123, 122, 172, 172, 172, 172, 173, 121, 173, 173,
- +
- + 174, 174, 174, 174, 174, 174, 174, 174, 175, 175,
- + 175, 175, 175, 175, 175, 175, 176, 120, 176, 177,
- + 119, 177, 177, 118, 177, 177, 178, 178, 178, 178,
- + 178, 178, 178, 178, 179, 179, 179, 179, 179, 179,
- + 179, 179, 116, 115, 113, 112, 111, 110, 109, 108,
- + 107, 106, 105, 104, 103, 101, 100, 98, 97, 96,
- + 95, 94, 92, 90, 88, 87, 86, 84, 83, 82,
- + 81, 80, 79, 78, 77, 75, 73, 70, 69, 67,
- + 64, 62, 61, 57, 51, 50, 49, 47, 46, 45,
- 41, 38, 22, 21, 19, 13, 9, 6, 4, 2,
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
-
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
- - 158, 158, 158, 158, 158, 158, 158
- + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
- + 165, 165, 165, 165, 165, 165, 165, 165
- } ;
-
- static yy_state_type yy_last_accepting_state;
- @@ -662,7 +664,7 @@ static int dts_version = 1;
- static void push_input_file(const char *filename);
- static bool pop_input_file(void);
- static void lexical_error(const char *fmt, ...);
- -#line 666 "dtc-lexer.lex.c"
- +#line 668 "dtc-lexer.lex.c"
-
- #define INITIAL 0
- #define BYTESTRING 1
- @@ -704,7 +706,7 @@ FILE *yyget_out (void );
-
- void yyset_out (FILE * out_str );
-
- -yy_size_t yyget_leng (void );
- +int yyget_leng (void );
-
- char *yyget_text (void );
-
- @@ -853,6 +855,10 @@ YY_DECL
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
- +#line 68 "dtc-lexer.l"
- +
- +#line 861 "dtc-lexer.lex.c"
- +
- if ( !(yy_init) )
- {
- (yy_init) = 1;
- @@ -879,11 +885,6 @@ YY_DECL
- yy_load_buffer_state( );
- }
-
- - {
- -#line 68 "dtc-lexer.l"
- -
- -#line 886 "dtc-lexer.lex.c"
- -
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = (yy_c_buf_p);
- @@ -901,7 +902,7 @@ YY_DECL
- yy_match:
- do
- {
- - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
- + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] )
- {
- (yy_last_accepting_state) = yy_current_state;
- @@ -910,13 +911,13 @@ yy_match:
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- - if ( yy_current_state >= 159 )
- + if ( yy_current_state >= 166 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- ++yy_cp;
- }
- - while ( yy_current_state != 158 );
- + while ( yy_current_state != 165 );
- yy_cp = (yy_last_accepting_cpos);
- yy_current_state = (yy_last_accepting_state);
-
- @@ -1007,23 +1008,31 @@ case 5:
- YY_RULE_SETUP
- #line 116 "dtc-lexer.l"
- {
- + DPRINT("Keyword: /plugin/\n");
- + return DT_PLUGIN;
- + }
- + YY_BREAK
- +case 6:
- +YY_RULE_SETUP
- +#line 121 "dtc-lexer.l"
- +{
- DPRINT("Keyword: /memreserve/\n");
- BEGIN_DEFAULT();
- return DT_MEMRESERVE;
- }
- YY_BREAK
- -case 6:
- +case 7:
- YY_RULE_SETUP
- -#line 122 "dtc-lexer.l"
- +#line 127 "dtc-lexer.l"
- {
- DPRINT("Keyword: /bits/\n");
- BEGIN_DEFAULT();
- return DT_BITS;
- }
- YY_BREAK
- -case 7:
- +case 8:
- YY_RULE_SETUP
- -#line 128 "dtc-lexer.l"
- +#line 133 "dtc-lexer.l"
- {
- DPRINT("Keyword: /delete-property/\n");
- DPRINT("<PROPNODENAME>\n");
- @@ -1031,9 +1040,9 @@ YY_RULE_SETUP
- return DT_DEL_PROP;
- }
- YY_BREAK
- -case 8:
- +case 9:
- YY_RULE_SETUP
- -#line 135 "dtc-lexer.l"
- +#line 140 "dtc-lexer.l"
- {
- DPRINT("Keyword: /delete-node/\n");
- DPRINT("<PROPNODENAME>\n");
- @@ -1041,9 +1050,9 @@ YY_RULE_SETUP
- return DT_DEL_NODE;
- }
- YY_BREAK
- -case 9:
- +case 10:
- YY_RULE_SETUP
- -#line 142 "dtc-lexer.l"
- +#line 147 "dtc-lexer.l"
- {
- DPRINT("Label: %s\n", yytext);
- yylval.labelref = xstrdup(yytext);
- @@ -1051,9 +1060,9 @@ YY_RULE_SETUP
- return DT_LABEL;
- }
- YY_BREAK
- -case 10:
- +case 11:
- YY_RULE_SETUP
- -#line 149 "dtc-lexer.l"
- +#line 154 "dtc-lexer.l"
- {
- char *e;
- DPRINT("Integer Literal: '%s'\n", yytext);
- @@ -1073,10 +1082,10 @@ YY_RULE_SETUP
- return DT_LITERAL;
- }
- YY_BREAK
- -case 11:
- -/* rule 11 can match eol */
- +case 12:
- +/* rule 12 can match eol */
- YY_RULE_SETUP
- -#line 168 "dtc-lexer.l"
- +#line 173 "dtc-lexer.l"
- {
- struct data d;
- DPRINT("Character literal: %s\n", yytext);
- @@ -1098,18 +1107,18 @@ YY_RULE_SETUP
- return DT_CHAR_LITERAL;
- }
- YY_BREAK
- -case 12:
- +case 13:
- YY_RULE_SETUP
- -#line 189 "dtc-lexer.l"
- +#line 194 "dtc-lexer.l"
- { /* label reference */
- DPRINT("Ref: %s\n", yytext+1);
- yylval.labelref = xstrdup(yytext+1);
- return DT_REF;
- }
- YY_BREAK
- -case 13:
- +case 14:
- YY_RULE_SETUP
- -#line 195 "dtc-lexer.l"
- +#line 200 "dtc-lexer.l"
- { /* new-style path reference */
- yytext[yyleng-1] = '\0';
- DPRINT("Ref: %s\n", yytext+2);
- @@ -1117,27 +1126,27 @@ YY_RULE_SETUP
- return DT_REF;
- }
- YY_BREAK
- -case 14:
- +case 15:
- YY_RULE_SETUP
- -#line 202 "dtc-lexer.l"
- +#line 207 "dtc-lexer.l"
- {
- yylval.byte = strtol(yytext, NULL, 16);
- DPRINT("Byte: %02x\n", (int)yylval.byte);
- return DT_BYTE;
- }
- YY_BREAK
- -case 15:
- +case 16:
- YY_RULE_SETUP
- -#line 208 "dtc-lexer.l"
- +#line 213 "dtc-lexer.l"
- {
- DPRINT("/BYTESTRING\n");
- BEGIN_DEFAULT();
- return ']';
- }
- YY_BREAK
- -case 16:
- +case 17:
- YY_RULE_SETUP
- -#line 214 "dtc-lexer.l"
- +#line 219 "dtc-lexer.l"
- {
- DPRINT("PropNodeName: %s\n", yytext);
- yylval.propnodename = xstrdup((yytext[0] == '\\') ?
- @@ -1146,75 +1155,75 @@ YY_RULE_SETUP
- return DT_PROPNODENAME;
- }
- YY_BREAK
- -case 17:
- +case 18:
- YY_RULE_SETUP
- -#line 222 "dtc-lexer.l"
- +#line 227 "dtc-lexer.l"
- {
- DPRINT("Binary Include\n");
- return DT_INCBIN;
- }
- YY_BREAK
- -case 18:
- -/* rule 18 can match eol */
- -YY_RULE_SETUP
- -#line 227 "dtc-lexer.l"
- -/* eat whitespace */
- - YY_BREAK
- case 19:
- /* rule 19 can match eol */
- YY_RULE_SETUP
- -#line 228 "dtc-lexer.l"
- -/* eat C-style comments */
- +#line 232 "dtc-lexer.l"
- +/* eat whitespace */
- YY_BREAK
- case 20:
- /* rule 20 can match eol */
- YY_RULE_SETUP
- -#line 229 "dtc-lexer.l"
- -/* eat C++-style comments */
- +#line 233 "dtc-lexer.l"
- +/* eat C-style comments */
- YY_BREAK
- case 21:
- +/* rule 21 can match eol */
- YY_RULE_SETUP
- -#line 231 "dtc-lexer.l"
- -{ return DT_LSHIFT; };
- +#line 234 "dtc-lexer.l"
- +/* eat C++-style comments */
- YY_BREAK
- case 22:
- YY_RULE_SETUP
- -#line 232 "dtc-lexer.l"
- -{ return DT_RSHIFT; };
- +#line 236 "dtc-lexer.l"
- +{ return DT_LSHIFT; };
- YY_BREAK
- case 23:
- YY_RULE_SETUP
- -#line 233 "dtc-lexer.l"
- -{ return DT_LE; };
- +#line 237 "dtc-lexer.l"
- +{ return DT_RSHIFT; };
- YY_BREAK
- case 24:
- YY_RULE_SETUP
- -#line 234 "dtc-lexer.l"
- -{ return DT_GE; };
- +#line 238 "dtc-lexer.l"
- +{ return DT_LE; };
- YY_BREAK
- case 25:
- YY_RULE_SETUP
- -#line 235 "dtc-lexer.l"
- -{ return DT_EQ; };
- +#line 239 "dtc-lexer.l"
- +{ return DT_GE; };
- YY_BREAK
- case 26:
- YY_RULE_SETUP
- -#line 236 "dtc-lexer.l"
- -{ return DT_NE; };
- +#line 240 "dtc-lexer.l"
- +{ return DT_EQ; };
- YY_BREAK
- case 27:
- YY_RULE_SETUP
- -#line 237 "dtc-lexer.l"
- -{ return DT_AND; };
- +#line 241 "dtc-lexer.l"
- +{ return DT_NE; };
- YY_BREAK
- case 28:
- YY_RULE_SETUP
- -#line 238 "dtc-lexer.l"
- -{ return DT_OR; };
- +#line 242 "dtc-lexer.l"
- +{ return DT_AND; };
- YY_BREAK
- case 29:
- YY_RULE_SETUP
- -#line 240 "dtc-lexer.l"
- +#line 243 "dtc-lexer.l"
- +{ return DT_OR; };
- + YY_BREAK
- +case 30:
- +YY_RULE_SETUP
- +#line 245 "dtc-lexer.l"
- {
- DPRINT("Char: %c (\\x%02x)\n", yytext[0],
- (unsigned)yytext[0]);
- @@ -1230,12 +1239,12 @@ YY_RULE_SETUP
- return yytext[0];
- }
- YY_BREAK
- -case 30:
- +case 31:
- YY_RULE_SETUP
- -#line 255 "dtc-lexer.l"
- +#line 260 "dtc-lexer.l"
- ECHO;
- YY_BREAK
- -#line 1239 "dtc-lexer.lex.c"
- +#line 1248 "dtc-lexer.lex.c"
-
- case YY_END_OF_BUFFER:
- {
- @@ -1365,7 +1374,6 @@ ECHO;
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- - } /* end of user's declarations */
- } /* end of yylex */
-
- /* yy_get_next_buffer - try to read in a new buffer
- @@ -1421,21 +1429,21 @@ static int yy_get_next_buffer (void)
-
- else
- {
- - yy_size_t num_to_read =
- + int num_to_read =
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-
- /* just a shorter name for the current buffer */
- - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
- + YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
-
- int yy_c_buf_p_offset =
- (int) ((yy_c_buf_p) - b->yy_ch_buf);
-
- if ( b->yy_is_our_buffer )
- {
- - yy_size_t new_size = b->yy_buf_size * 2;
- + int new_size = b->yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->yy_buf_size += b->yy_buf_size / 8;
- @@ -1466,7 +1474,7 @@ static int yy_get_next_buffer (void)
-
- /* Read in more data. */
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- - (yy_n_chars), num_to_read );
- + (yy_n_chars), (size_t) num_to_read );
-
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
- }
- @@ -1528,7 +1536,7 @@ static int yy_get_next_buffer (void)
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- - if ( yy_current_state >= 159 )
- + if ( yy_current_state >= 166 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- @@ -1556,13 +1564,13 @@ static int yy_get_next_buffer (void)
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- - if ( yy_current_state >= 159 )
- + if ( yy_current_state >= 166 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- - yy_is_jam = (yy_current_state == 158);
- + yy_is_jam = (yy_current_state == 165);
-
- - return yy_is_jam ? 0 : yy_current_state;
- + return yy_is_jam ? 0 : yy_current_state;
- }
-
- #ifndef YY_NO_INPUT
- @@ -1589,7 +1597,7 @@ static int yy_get_next_buffer (void)
-
- else
- { /* need more input */
- - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
- + int offset = (yy_c_buf_p) - (yytext_ptr);
- ++(yy_c_buf_p);
-
- switch ( yy_get_next_buffer( ) )
- @@ -1863,7 +1871,7 @@ void yypop_buffer_state (void)
- */
- static void yyensure_buffer_stack (void)
- {
- - yy_size_t num_to_alloc;
- + int num_to_alloc;
-
- if (!(yy_buffer_stack)) {
-
- @@ -1960,12 +1968,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst
- *
- * @return the newly allocated buffer state object.
- */
- -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
- +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
- {
- YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- - yy_size_t i;
- + int i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- @@ -2047,7 +2055,7 @@ FILE *yyget_out (void)
- /** Get the length of the current token.
- *
- */
- -yy_size_t yyget_leng (void)
- +int yyget_leng (void)
- {
- return yyleng;
- }
- @@ -2195,7 +2203,7 @@ void yyfree (void * ptr )
-
- #define YYTABLES_NAME "yytables"
-
- -#line 254 "dtc-lexer.l"
- +#line 260 "dtc-lexer.l"
-
-
-
- --- a/scripts/dtc/dtc-parser.tab.c_shipped
- +++ b/scripts/dtc/dtc-parser.tab.c_shipped
- @@ -1,19 +1,19 @@
- -/* A Bison parser, made by GNU Bison 3.0.2. */
- +/* A Bison parser, made by GNU Bison 2.5. */
-
- /* Bison implementation for Yacc-like parsers in C
- -
- - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
- -
- +
- + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
- +
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- -
- +
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- -
- +
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
- @@ -26,7 +26,7 @@
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
- -
- +
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
- @@ -44,7 +44,7 @@
- #define YYBISON 1
-
- /* Bison version. */
- -#define YYBISON_VERSION "3.0.2"
- +#define YYBISON_VERSION "2.5"
-
- /* Skeleton name. */
- #define YYSKELETON_NAME "yacc.c"
- @@ -58,13 +58,18 @@
- /* Pull parsers. */
- #define YYPULL 1
-
- +/* Using locations. */
- +#define YYLSP_NEEDED 1
-
-
-
- /* Copy the first part of user declarations. */
- -#line 20 "dtc-parser.y" /* yacc.c:339 */
- +
- +/* Line 268 of yacc.c */
- +#line 20 "dtc-parser.y"
-
- #include <stdio.h>
- +#include <inttypes.h>
-
- #include "dtc.h"
- #include "srcpos.h"
- @@ -80,15 +85,14 @@ extern void yyerror(char const *s);
- extern struct boot_info *the_boot_info;
- extern bool treesource_error;
-
- -#line 84 "dtc-parser.tab.c" /* yacc.c:339 */
-
- -# ifndef YY_NULLPTR
- -# if defined __cplusplus && 201103L <= __cplusplus
- -# define YY_NULLPTR nullptr
- -# else
- -# define YY_NULLPTR 0
- -# endif
- -# endif
- +/* Line 268 of yacc.c */
- +#line 91 "dtc-parser.tab.c"
- +
- +/* Enabling traces. */
- +#ifndef YYDEBUG
- +# define YYDEBUG 0
- +#endif
-
- /* Enabling verbose error messages. */
- #ifdef YYERROR_VERBOSE
- @@ -98,53 +102,51 @@ extern bool treesource_error;
- # define YYERROR_VERBOSE 0
- #endif
-
- -/* In a future release of Bison, this section will be replaced
- - by #include "dtc-parser.tab.h". */
- -#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED
- -# define YY_YY_DTC_PARSER_TAB_H_INCLUDED
- -/* Debug traces. */
- -#ifndef YYDEBUG
- -# define YYDEBUG 0
- -#endif
- -#if YYDEBUG
- -extern int yydebug;
- +/* Enabling the token table. */
- +#ifndef YYTOKEN_TABLE
- +# define YYTOKEN_TABLE 0
- #endif
-
- -/* Token type. */
- +
- +/* Tokens. */
- #ifndef YYTOKENTYPE
- # define YYTOKENTYPE
- - enum yytokentype
- - {
- - DT_V1 = 258,
- - DT_MEMRESERVE = 259,
- - DT_LSHIFT = 260,
- - DT_RSHIFT = 261,
- - DT_LE = 262,
- - DT_GE = 263,
- - DT_EQ = 264,
- - DT_NE = 265,
- - DT_AND = 266,
- - DT_OR = 267,
- - DT_BITS = 268,
- - DT_DEL_PROP = 269,
- - DT_DEL_NODE = 270,
- - DT_PROPNODENAME = 271,
- - DT_LITERAL = 272,
- - DT_CHAR_LITERAL = 273,
- - DT_BYTE = 274,
- - DT_STRING = 275,
- - DT_LABEL = 276,
- - DT_REF = 277,
- - DT_INCBIN = 278
- - };
- + /* Put the tokens into the symbol table, so that GDB and other debuggers
- + know about them. */
- + enum yytokentype {
- + DT_V1 = 258,
- + DT_PLUGIN = 259,
- + DT_MEMRESERVE = 260,
- + DT_LSHIFT = 261,
- + DT_RSHIFT = 262,
- + DT_LE = 263,
- + DT_GE = 264,
- + DT_EQ = 265,
- + DT_NE = 266,
- + DT_AND = 267,
- + DT_OR = 268,
- + DT_BITS = 269,
- + DT_DEL_PROP = 270,
- + DT_DEL_NODE = 271,
- + DT_PROPNODENAME = 272,
- + DT_LITERAL = 273,
- + DT_CHAR_LITERAL = 274,
- + DT_BYTE = 275,
- + DT_STRING = 276,
- + DT_LABEL = 277,
- + DT_REF = 278,
- + DT_INCBIN = 279
- + };
- #endif
-
- -/* Value type. */
- +
- +
- #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
- -typedef union YYSTYPE YYSTYPE;
- -union YYSTYPE
- +typedef union YYSTYPE
- {
- -#line 38 "dtc-parser.y" /* yacc.c:355 */
- +
- +/* Line 293 of yacc.c */
- +#line 39 "dtc-parser.y"
-
- char *propnodename;
- char *labelref;
- @@ -162,37 +164,37 @@ union YYSTYPE
- struct node *nodelist;
- struct reserve_info *re;
- uint64_t integer;
- + int is_plugin;
-
- -#line 167 "dtc-parser.tab.c" /* yacc.c:355 */
- -};
- +
- +
- +/* Line 293 of yacc.c */
- +#line 173 "dtc-parser.tab.c"
- +} YYSTYPE;
- # define YYSTYPE_IS_TRIVIAL 1
- +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
- # define YYSTYPE_IS_DECLARED 1
- #endif
-
- -/* Location type. */
- #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
- -typedef struct YYLTYPE YYLTYPE;
- -struct YYLTYPE
- +typedef struct YYLTYPE
- {
- int first_line;
- int first_column;
- int last_line;
- int last_column;
- -};
- +} YYLTYPE;
- +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
- # define YYLTYPE_IS_DECLARED 1
- # define YYLTYPE_IS_TRIVIAL 1
- #endif
-
-
- -extern YYSTYPE yylval;
- -extern YYLTYPE yylloc;
- -int yyparse (void);
- -
- -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */
- -
- /* Copy the second part of user declarations. */
-
- -#line 196 "dtc-parser.tab.c" /* yacc.c:358 */
- +
- +/* Line 343 of yacc.c */
- +#line 198 "dtc-parser.tab.c"
-
- #ifdef short
- # undef short
- @@ -206,8 +208,11 @@ typedef unsigned char yytype_uint8;
-
- #ifdef YYTYPE_INT8
- typedef YYTYPE_INT8 yytype_int8;
- -#else
- +#elif (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- typedef signed char yytype_int8;
- +#else
- +typedef short int yytype_int8;
- #endif
-
- #ifdef YYTYPE_UINT16
- @@ -227,7 +232,8 @@ typedef short int yytype_int16;
- # define YYSIZE_T __SIZE_TYPE__
- # elif defined size_t
- # define YYSIZE_T size_t
- -# elif ! defined YYSIZE_T
- +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
- # define YYSIZE_T size_t
- # else
- @@ -241,68 +247,39 @@ typedef short int yytype_int16;
- # if defined YYENABLE_NLS && YYENABLE_NLS
- # if ENABLE_NLS
- # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
- -# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
- +# define YY_(msgid) dgettext ("bison-runtime", msgid)
- # endif
- # endif
- # ifndef YY_
- -# define YY_(Msgid) Msgid
- -# endif
- -#endif
- -
- -#ifndef YY_ATTRIBUTE
- -# if (defined __GNUC__ \
- - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
- - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
- -# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
- -# else
- -# define YY_ATTRIBUTE(Spec) /* empty */
- -# endif
- -#endif
- -
- -#ifndef YY_ATTRIBUTE_PURE
- -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
- -#endif
- -
- -#ifndef YY_ATTRIBUTE_UNUSED
- -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
- -#endif
- -
- -#if !defined _Noreturn \
- - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
- -# if defined _MSC_VER && 1200 <= _MSC_VER
- -# define _Noreturn __declspec (noreturn)
- -# else
- -# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
- +# define YY_(msgid) msgid
- # endif
- #endif
-
- /* Suppress unused-variable warnings by "using" E. */
- #if ! defined lint || defined __GNUC__
- -# define YYUSE(E) ((void) (E))
- +# define YYUSE(e) ((void) (e))
- #else
- -# define YYUSE(E) /* empty */
- +# define YYUSE(e) /* empty */
- #endif
-
- -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
- -/* Suppress an incorrect diagnostic about yylval being uninitialized. */
- -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- - _Pragma ("GCC diagnostic push") \
- - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
- - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
- -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
- - _Pragma ("GCC diagnostic pop")
- +/* Identity function, used to suppress warnings about constant conditions. */
- +#ifndef lint
- +# define YYID(n) (n)
- #else
- -# define YY_INITIAL_VALUE(Value) Value
- -#endif
- -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- -# define YY_IGNORE_MAYBE_UNINITIALIZED_END
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- +static int
- +YYID (int yyi)
- +#else
- +static int
- +YYID (yyi)
- + int yyi;
- #endif
- -#ifndef YY_INITIAL_VALUE
- -# define YY_INITIAL_VALUE(Value) /* Nothing. */
- +{
- + return yyi;
- +}
- #endif
-
- -
- #if ! defined yyoverflow || YYERROR_VERBOSE
-
- /* The parser invokes alloca or malloc; define the necessary symbols. */
- @@ -320,9 +297,9 @@ typedef short int yytype_int16;
- # define alloca _alloca
- # else
- # define YYSTACK_ALLOC alloca
- -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
- +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- - /* Use EXIT_SUCCESS as a witness for stdlib.h. */
- # ifndef EXIT_SUCCESS
- # define EXIT_SUCCESS 0
- # endif
- @@ -332,8 +309,8 @@ typedef short int yytype_int16;
- # endif
-
- # ifdef YYSTACK_ALLOC
- - /* Pacify GCC's 'empty if-body' warning. */
- -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
- + /* Pacify GCC's `empty if-body' warning. */
- +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
- # ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- @@ -349,7 +326,7 @@ typedef short int yytype_int16;
- # endif
- # if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined malloc) \
- - && (defined YYFREE || defined free)))
- + && (defined YYFREE || defined free)))
- # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- # ifndef EXIT_SUCCESS
- # define EXIT_SUCCESS 0
- @@ -357,13 +334,15 @@ typedef short int yytype_int16;
- # endif
- # ifndef YYMALLOC
- # define YYMALLOC malloc
- -# if ! defined malloc && ! defined EXIT_SUCCESS
- +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
- # endif
- # endif
- # ifndef YYFREE
- # define YYFREE free
- -# if ! defined free && ! defined EXIT_SUCCESS
- +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- void free (void *); /* INFRINGES ON USER NAME SPACE */
- # endif
- # endif
- @@ -373,8 +352,8 @@ void free (void *); /* INFRINGES ON USER
-
- #if (! defined yyoverflow \
- && (! defined __cplusplus \
- - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
- - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
- + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
- + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
- /* A type that is properly aligned for any stack member. */
- union yyalloc
- @@ -400,35 +379,35 @@ union yyalloc
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
- -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- - do \
- - { \
- - YYSIZE_T yynewbytes; \
- - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- - Stack = &yyptr->Stack_alloc; \
- - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- - yyptr += yynewbytes / sizeof (*yyptr); \
- - } \
- - while (0)
- +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- + do \
- + { \
- + YYSIZE_T yynewbytes; \
- + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- + Stack = &yyptr->Stack_alloc; \
- + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- + yyptr += yynewbytes / sizeof (*yyptr); \
- + } \
- + while (YYID (0))
-
- #endif
-
- #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
- -/* Copy COUNT objects from SRC to DST. The source and destination do
- +/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
- # ifndef YYCOPY
- # if defined __GNUC__ && 1 < __GNUC__
- -# define YYCOPY(Dst, Src, Count) \
- - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
- +# define YYCOPY(To, From, Count) \
- + __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
- # else
- -# define YYCOPY(Dst, Src, Count) \
- - do \
- - { \
- - YYSIZE_T yyi; \
- - for (yyi = 0; yyi < (Count); yyi++) \
- - (Dst)[yyi] = (Src)[yyi]; \
- - } \
- - while (0)
- +# define YYCOPY(To, From, Count) \
- + do \
- + { \
- + YYSIZE_T yyi; \
- + for (yyi = 0; yyi < (Count); yyi++) \
- + (To)[yyi] = (From)[yyi]; \
- + } \
- + while (YYID (0))
- # endif
- # endif
- #endif /* !YYCOPY_NEEDED */
- @@ -439,39 +418,37 @@ union yyalloc
- #define YYLAST 136
-
- /* YYNTOKENS -- Number of terminals. */
- -#define YYNTOKENS 47
- +#define YYNTOKENS 48
- /* YYNNTS -- Number of nonterminals. */
- -#define YYNNTS 28
- +#define YYNNTS 29
- /* YYNRULES -- Number of rules. */
- -#define YYNRULES 80
- -/* YYNSTATES -- Number of states. */
- -#define YYNSTATES 144
- +#define YYNRULES 82
- +/* YYNRULES -- Number of states. */
- +#define YYNSTATES 147
-
- -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
- - by yylex, with out-of-bounds checking. */
- +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
- #define YYUNDEFTOK 2
- -#define YYMAXUTOK 278
- +#define YYMAXUTOK 279
-
- -#define YYTRANSLATE(YYX) \
- +#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
- -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- - as returned by yylex, without out-of-bounds checking. */
- +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
- static const yytype_uint8 yytranslate[] =
- {
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- - 2, 2, 2, 46, 2, 2, 2, 44, 40, 2,
- - 32, 34, 43, 41, 33, 42, 2, 25, 2, 2,
- - 2, 2, 2, 2, 2, 2, 2, 2, 37, 24,
- - 35, 28, 29, 36, 2, 2, 2, 2, 2, 2,
- + 2, 2, 2, 47, 2, 2, 2, 45, 41, 2,
- + 33, 35, 44, 42, 34, 43, 2, 26, 2, 2,
- + 2, 2, 2, 2, 2, 2, 2, 2, 38, 25,
- + 36, 29, 30, 37, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- - 2, 30, 2, 31, 39, 2, 2, 2, 2, 2,
- + 2, 31, 2, 32, 40, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- - 2, 2, 2, 26, 38, 27, 45, 2, 2, 2,
- + 2, 2, 2, 27, 39, 28, 46, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- @@ -486,292 +463,335 @@ static const yytype_uint8 yytranslate[]
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- - 15, 16, 17, 18, 19, 20, 21, 22, 23
- + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
- };
-
- #if YYDEBUG
- - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
- +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- + YYRHS. */
- +static const yytype_uint16 yyprhs[] =
- +{
- + 0, 0, 3, 9, 10, 13, 14, 17, 22, 25,
- + 28, 32, 37, 41, 46, 52, 53, 56, 61, 64,
- + 68, 71, 74, 78, 83, 86, 96, 102, 105, 106,
- + 109, 112, 116, 118, 121, 124, 127, 129, 131, 135,
- + 137, 139, 145, 147, 151, 153, 157, 159, 163, 165,
- + 169, 171, 175, 177, 181, 185, 187, 191, 195, 199,
- + 203, 207, 211, 213, 217, 221, 223, 227, 231, 235,
- + 237, 239, 242, 245, 248, 249, 252, 255, 256, 259,
- + 262, 265, 269
- +};
- +
- +/* YYRHS -- A `-1'-separated list of the rules' RHS. */
- +static const yytype_int8 yyrhs[] =
- +{
- + 49, 0, -1, 3, 25, 50, 51, 53, -1, -1,
- + 4, 25, -1, -1, 52, 51, -1, 5, 60, 60,
- + 25, -1, 22, 52, -1, 26, 54, -1, 53, 26,
- + 54, -1, 53, 22, 23, 54, -1, 53, 23, 54,
- + -1, 53, 16, 23, 25, -1, 27, 55, 75, 28,
- + 25, -1, -1, 55, 56, -1, 17, 29, 57, 25,
- + -1, 17, 25, -1, 15, 17, 25, -1, 22, 56,
- + -1, 58, 21, -1, 58, 59, 30, -1, 58, 31,
- + 74, 32, -1, 58, 23, -1, 58, 24, 33, 21,
- + 34, 60, 34, 60, 35, -1, 58, 24, 33, 21,
- + 35, -1, 57, 22, -1, -1, 57, 34, -1, 58,
- + 22, -1, 14, 18, 36, -1, 36, -1, 59, 60,
- + -1, 59, 23, -1, 59, 22, -1, 18, -1, 19,
- + -1, 33, 61, 35, -1, 62, -1, 63, -1, 63,
- + 37, 61, 38, 62, -1, 64, -1, 63, 13, 64,
- + -1, 65, -1, 64, 12, 65, -1, 66, -1, 65,
- + 39, 66, -1, 67, -1, 66, 40, 67, -1, 68,
- + -1, 67, 41, 68, -1, 69, -1, 68, 10, 69,
- + -1, 68, 11, 69, -1, 70, -1, 69, 36, 70,
- + -1, 69, 30, 70, -1, 69, 8, 70, -1, 69,
- + 9, 70, -1, 70, 6, 71, -1, 70, 7, 71,
- + -1, 71, -1, 71, 42, 72, -1, 71, 43, 72,
- + -1, 72, -1, 72, 44, 73, -1, 72, 26, 73,
- + -1, 72, 45, 73, -1, 73, -1, 60, -1, 43,
- + 73, -1, 46, 73, -1, 47, 73, -1, -1, 74,
- + 20, -1, 74, 22, -1, -1, 76, 75, -1, 76,
- + 56, -1, 17, 54, -1, 16, 17, 25, -1, 22,
- + 76, -1
- +};
- +
- +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
- static const yytype_uint16 yyrline[] =
- {
- - 0, 104, 104, 113, 116, 123, 127, 135, 139, 144,
- - 155, 165, 180, 188, 191, 198, 202, 206, 210, 218,
- - 222, 226, 230, 234, 250, 260, 268, 271, 275, 282,
- - 298, 303, 322, 336, 343, 344, 345, 352, 356, 357,
- - 361, 362, 366, 367, 371, 372, 376, 377, 381, 382,
- - 386, 387, 388, 392, 393, 394, 395, 396, 400, 401,
- - 402, 406, 407, 408, 412, 413, 414, 415, 419, 420,
- - 421, 422, 427, 430, 434, 442, 445, 449, 457, 461,
- - 465
- + 0, 108, 108, 119, 122, 130, 133, 140, 144, 152,
- + 156, 161, 172, 182, 197, 205, 208, 215, 219, 223,
- + 227, 235, 239, 243, 247, 251, 267, 277, 285, 288,
- + 292, 299, 315, 320, 339, 353, 360, 361, 362, 369,
- + 373, 374, 378, 379, 383, 384, 388, 389, 393, 394,
- + 398, 399, 403, 404, 405, 409, 410, 411, 412, 413,
- + 417, 418, 419, 423, 424, 425, 429, 430, 431, 432,
- + 436, 437, 438, 439, 444, 447, 451, 459, 462, 466,
- + 474, 478, 482
- };
- #endif
-
- -#if YYDEBUG || YYERROR_VERBOSE || 0
- +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
- /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
- static const char *const yytname[] =
- {
- - "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE", "DT_LSHIFT",
- - "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND", "DT_OR",
- - "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME", "DT_LITERAL",
- - "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF",
- - "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['", "']'",
- - "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'", "'+'",
- - "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
- - "memreserves", "memreserve", "devicetree", "nodedef", "proplist",
- - "propdef", "propdata", "propdataprefix", "arrayprefix", "integer_prim",
- - "integer_expr", "integer_trinary", "integer_or", "integer_and",
- - "integer_bitor", "integer_bitxor", "integer_bitand", "integer_eq",
- - "integer_rela", "integer_shift", "integer_add", "integer_mul",
- - "integer_unary", "bytestring", "subnodes", "subnode", YY_NULLPTR
- + "$end", "error", "$undefined", "DT_V1", "DT_PLUGIN", "DT_MEMRESERVE",
- + "DT_LSHIFT", "DT_RSHIFT", "DT_LE", "DT_GE", "DT_EQ", "DT_NE", "DT_AND",
- + "DT_OR", "DT_BITS", "DT_DEL_PROP", "DT_DEL_NODE", "DT_PROPNODENAME",
- + "DT_LITERAL", "DT_CHAR_LITERAL", "DT_BYTE", "DT_STRING", "DT_LABEL",
- + "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='", "'>'", "'['",
- + "']'", "'('", "','", "')'", "'<'", "'?'", "':'", "'|'", "'^'", "'&'",
- + "'+'", "'-'", "'*'", "'%'", "'~'", "'!'", "$accept", "sourcefile",
- + "plugindecl", "memreserves", "memreserve", "devicetree", "nodedef",
- + "proplist", "propdef", "propdata", "propdataprefix", "arrayprefix",
- + "integer_prim", "integer_expr", "integer_trinary", "integer_or",
- + "integer_and", "integer_bitor", "integer_bitxor", "integer_bitand",
- + "integer_eq", "integer_rela", "integer_shift", "integer_add",
- + "integer_mul", "integer_unary", "bytestring", "subnodes", "subnode", 0
- };
- #endif
-
- # ifdef YYPRINT
- -/* YYTOKNUM[NUM] -- (External) token number corresponding to the
- - (internal) symbol number NUM (which must be that of a token). */
- +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- + token YYLEX-NUM. */
- static const yytype_uint16 yytoknum[] =
- {
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- - 275, 276, 277, 278, 59, 47, 123, 125, 61, 62,
- - 91, 93, 40, 44, 41, 60, 63, 58, 124, 94,
- - 38, 43, 45, 42, 37, 126, 33
- + 275, 276, 277, 278, 279, 59, 47, 123, 125, 61,
- + 62, 91, 93, 40, 44, 41, 60, 63, 58, 124,
- + 94, 38, 43, 45, 42, 37, 126, 33
- };
- # endif
-
- -#define YYPACT_NINF -81
- -
- -#define yypact_value_is_default(Yystate) \
- - (!!((Yystate) == (-81)))
- -
- -#define YYTABLE_NINF -1
- -
- -#define yytable_value_is_error(Yytable_value) \
- - 0
- -
- - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- - STATE-NUM. */
- -static const yytype_int8 yypact[] =
- +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
- +static const yytype_uint8 yyr1[] =
- {
- - 16, -11, 21, 10, -81, 25, 10, 19, 10, -81,
- - -81, -9, 25, -81, 2, 51, -81, -9, -9, -9,
- - -81, 1, -81, -6, 50, 14, 28, 29, 36, 3,
- - 58, 44, -3, -81, 47, -81, -81, 65, 68, 2,
- - 2, -81, -81, -81, -81, -9, -9, -9, -9, -9,
- - -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
- - -9, -9, -9, -9, -81, 63, 69, 2, -81, -81,
- - 50, 57, 14, 28, 29, 36, 3, 3, 58, 58,
- - 58, 58, 44, 44, -3, -3, -81, -81, -81, 79,
- - 80, -8, 63, -81, 72, 63, -81, -81, -9, 76,
- - 77, -81, -81, -81, -81, -81, 78, -81, -81, -81,
- - -81, -81, 35, 4, -81, -81, -81, -81, 86, -81,
- - -81, -81, 73, -81, -81, 33, 71, 84, 39, -81,
- - -81, -81, -81, -81, 41, -81, -81, -81, 25, -81,
- - 74, 25, 75, -81
- + 0, 48, 49, 50, 50, 51, 51, 52, 52, 53,
- + 53, 53, 53, 53, 54, 55, 55, 56, 56, 56,
- + 56, 57, 57, 57, 57, 57, 57, 57, 58, 58,
- + 58, 59, 59, 59, 59, 59, 60, 60, 60, 61,
- + 62, 62, 63, 63, 64, 64, 65, 65, 66, 66,
- + 67, 67, 68, 68, 68, 69, 69, 69, 69, 69,
- + 70, 70, 70, 71, 71, 71, 72, 72, 72, 72,
- + 73, 73, 73, 73, 74, 74, 74, 75, 75, 75,
- + 76, 76, 76
- };
-
- - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
- - Performed when YYTABLE does not specify something else to do. Zero
- - means the default is an error. */
- -static const yytype_uint8 yydefact[] =
- +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
- +static const yytype_uint8 yyr2[] =
- {
- - 0, 0, 0, 3, 1, 0, 0, 0, 3, 34,
- - 35, 0, 0, 6, 0, 2, 4, 0, 0, 0,
- - 68, 0, 37, 38, 40, 42, 44, 46, 48, 50,
- - 53, 60, 63, 67, 0, 13, 7, 0, 0, 0,
- - 0, 69, 70, 71, 36, 0, 0, 0, 0, 0,
- - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- - 0, 0, 0, 0, 5, 75, 0, 0, 10, 8,
- - 41, 0, 43, 45, 47, 49, 51, 52, 56, 57,
- - 55, 54, 58, 59, 61, 62, 65, 64, 66, 0,
- - 0, 0, 0, 14, 0, 75, 11, 9, 0, 0,
- - 0, 16, 26, 78, 18, 80, 0, 77, 76, 39,
- - 17, 79, 0, 0, 12, 25, 15, 27, 0, 19,
- - 28, 22, 0, 72, 30, 0, 0, 0, 0, 33,
- - 32, 20, 31, 29, 0, 73, 74, 21, 0, 24,
- - 0, 0, 0, 23
- + 0, 2, 5, 0, 2, 0, 2, 4, 2, 2,
- + 3, 4, 3, 4, 5, 0, 2, 4, 2, 3,
- + 2, 2, 3, 4, 2, 9, 5, 2, 0, 2,
- + 2, 3, 1, 2, 2, 2, 1, 1, 3, 1,
- + 1, 5, 1, 3, 1, 3, 1, 3, 1, 3,
- + 1, 3, 1, 3, 3, 1, 3, 3, 3, 3,
- + 3, 3, 1, 3, 3, 1, 3, 3, 3, 1,
- + 1, 2, 2, 2, 0, 2, 2, 0, 2, 2,
- + 2, 3, 2
- };
-
- - /* YYPGOTO[NTERM-NUM]. */
- -static const yytype_int8 yypgoto[] =
- +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- + Performed when YYTABLE doesn't specify something else to do. Zero
- + means the default is an error. */
- +static const yytype_uint8 yydefact[] =
- {
- - -81, -81, 100, 104, -81, -38, -81, -80, -81, -81,
- - -81, -5, 66, 13, -81, 70, 67, 81, 64, 82,
- - 37, 27, 34, 38, -14, -81, 22, 24
- + 0, 0, 0, 3, 1, 0, 5, 4, 0, 0,
- + 0, 5, 36, 37, 0, 0, 8, 0, 2, 6,
- + 0, 0, 0, 70, 0, 39, 40, 42, 44, 46,
- + 48, 50, 52, 55, 62, 65, 69, 0, 15, 9,
- + 0, 0, 0, 0, 71, 72, 73, 38, 0, 0,
- + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- + 0, 0, 0, 0, 0, 0, 0, 7, 77, 0,
- + 0, 12, 10, 43, 0, 45, 47, 49, 51, 53,
- + 54, 58, 59, 57, 56, 60, 61, 63, 64, 67,
- + 66, 68, 0, 0, 0, 0, 16, 0, 77, 13,
- + 11, 0, 0, 0, 18, 28, 80, 20, 82, 0,
- + 79, 78, 41, 19, 81, 0, 0, 14, 27, 17,
- + 29, 0, 21, 30, 24, 0, 74, 32, 0, 0,
- + 0, 0, 35, 34, 22, 33, 31, 0, 75, 76,
- + 23, 0, 26, 0, 0, 0, 25
- };
-
- - /* YYDEFGOTO[NTERM-NUM]. */
- +/* YYDEFGOTO[NTERM-NUM]. */
- static const yytype_int16 yydefgoto[] =
- {
- - -1, 2, 7, 8, 15, 36, 65, 93, 112, 113,
- - 125, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- - 29, 30, 31, 32, 33, 128, 94, 95
- + -1, 2, 6, 10, 11, 18, 39, 68, 96, 115,
- + 116, 128, 23, 24, 25, 26, 27, 28, 29, 30,
- + 31, 32, 33, 34, 35, 36, 131, 97, 98
- };
-
- - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
- - positive, shift that token. If negative, reduce the rule whose
- - number is the opposite. If YYTABLE_NINF, syntax error. */
- -static const yytype_uint8 yytable[] =
- +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- + STATE-NUM. */
- +#define YYPACT_NINF -84
- +static const yytype_int8 yypact[] =
- {
- - 12, 68, 69, 41, 42, 43, 45, 34, 9, 10,
- - 53, 54, 104, 3, 5, 107, 101, 118, 35, 1,
- - 102, 4, 61, 11, 119, 120, 121, 122, 35, 97,
- - 46, 6, 55, 17, 123, 44, 18, 19, 56, 124,
- - 62, 63, 9, 10, 14, 51, 52, 86, 87, 88,
- - 9, 10, 48, 103, 129, 130, 115, 11, 135, 116,
- - 136, 47, 131, 57, 58, 11, 37, 49, 117, 50,
- - 137, 64, 38, 39, 138, 139, 40, 89, 90, 91,
- - 78, 79, 80, 81, 92, 59, 60, 66, 76, 77,
- - 67, 82, 83, 96, 98, 99, 100, 84, 85, 106,
- - 110, 111, 114, 126, 134, 127, 133, 141, 16, 143,
- - 13, 109, 71, 74, 72, 70, 105, 108, 0, 0,
- - 132, 0, 0, 0, 0, 0, 0, 0, 0, 73,
- - 0, 0, 75, 140, 0, 0, 142
- + 15, -12, 35, 42, -84, 27, 9, -84, 24, 9,
- + 43, 9, -84, -84, -10, 24, -84, 60, 44, -84,
- + -10, -10, -10, -84, 55, -84, -7, 52, 53, 51,
- + 54, 10, 2, 38, 37, -4, -84, 68, -84, -84,
- + 71, 73, 60, 60, -84, -84, -84, -84, -10, -10,
- + -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
- + -10, -10, -10, -10, -10, -10, -10, -84, 56, 72,
- + 60, -84, -84, 52, 61, 53, 51, 54, 10, 2,
- + 2, 38, 38, 38, 38, 37, 37, -4, -4, -84,
- + -84, -84, 81, 83, 34, 56, -84, 74, 56, -84,
- + -84, -10, 76, 78, -84, -84, -84, -84, -84, 79,
- + -84, -84, -84, -84, -84, -6, 3, -84, -84, -84,
- + -84, 87, -84, -84, -84, 75, -84, -84, 32, 70,
- + 86, 36, -84, -84, -84, -84, -84, 47, -84, -84,
- + -84, 24, -84, 77, 24, 80, -84
- };
-
- -static const yytype_int16 yycheck[] =
- +/* YYPGOTO[NTERM-NUM]. */
- +static const yytype_int8 yypgoto[] =
- {
- - 5, 39, 40, 17, 18, 19, 12, 12, 17, 18,
- - 7, 8, 92, 24, 4, 95, 24, 13, 26, 3,
- - 28, 0, 25, 32, 20, 21, 22, 23, 26, 67,
- - 36, 21, 29, 42, 30, 34, 45, 46, 35, 35,
- - 43, 44, 17, 18, 25, 9, 10, 61, 62, 63,
- - 17, 18, 38, 91, 21, 22, 21, 32, 19, 24,
- - 21, 11, 29, 5, 6, 32, 15, 39, 33, 40,
- - 31, 24, 21, 22, 33, 34, 25, 14, 15, 16,
- - 53, 54, 55, 56, 21, 41, 42, 22, 51, 52,
- - 22, 57, 58, 24, 37, 16, 16, 59, 60, 27,
- - 24, 24, 24, 17, 20, 32, 35, 33, 8, 34,
- - 6, 98, 46, 49, 47, 45, 92, 95, -1, -1,
- - 125, -1, -1, -1, -1, -1, -1, -1, -1, 48,
- - -1, -1, 50, 138, -1, -1, 141
- + -84, -84, -84, 98, 101, -84, -41, -84, -83, -84,
- + -84, -84, -8, 63, 12, -84, 66, 67, 65, 69,
- + 82, 29, 18, 25, 26, -17, -84, 20, 28
- };
-
- - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- - symbol of state STATE-NUM. */
- -static const yytype_uint8 yystos[] =
- +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- + positive, shift that token. If negative, reduce the rule which
- + number is the opposite. If YYTABLE_NINF, syntax error. */
- +#define YYTABLE_NINF -1
- +static const yytype_uint8 yytable[] =
- {
- - 0, 3, 48, 24, 0, 4, 21, 49, 50, 17,
- - 18, 32, 58, 50, 25, 51, 49, 42, 45, 46,
- - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
- - 68, 69, 70, 71, 58, 26, 52, 15, 21, 22,
- - 25, 71, 71, 71, 34, 12, 36, 11, 38, 39,
- - 40, 9, 10, 7, 8, 29, 35, 5, 6, 41,
- - 42, 25, 43, 44, 24, 53, 22, 22, 52, 52,
- - 62, 59, 63, 64, 65, 66, 67, 67, 68, 68,
- - 68, 68, 69, 69, 70, 70, 71, 71, 71, 14,
- - 15, 16, 21, 54, 73, 74, 24, 52, 37, 16,
- - 16, 24, 28, 52, 54, 74, 27, 54, 73, 60,
- - 24, 24, 55, 56, 24, 21, 24, 33, 13, 20,
- - 21, 22, 23, 30, 35, 57, 17, 32, 72, 21,
- - 22, 29, 58, 35, 20, 19, 21, 31, 33, 34,
- - 58, 33, 58, 34
- + 15, 71, 72, 44, 45, 46, 48, 37, 12, 13,
- + 56, 57, 107, 3, 8, 110, 118, 121, 1, 119,
- + 54, 55, 64, 14, 122, 123, 124, 125, 120, 100,
- + 49, 9, 58, 20, 126, 4, 21, 22, 59, 127,
- + 65, 66, 12, 13, 60, 61, 5, 89, 90, 91,
- + 12, 13, 7, 106, 132, 133, 138, 14, 139, 104,
- + 40, 38, 134, 105, 50, 14, 41, 42, 140, 17,
- + 43, 92, 93, 94, 81, 82, 83, 84, 95, 62,
- + 63, 141, 142, 79, 80, 85, 86, 38, 87, 88,
- + 47, 52, 51, 67, 69, 53, 70, 99, 102, 101,
- + 103, 113, 109, 114, 117, 129, 136, 137, 130, 19,
- + 16, 144, 74, 112, 73, 146, 76, 75, 111, 0,
- + 135, 77, 0, 108, 0, 0, 0, 0, 0, 0,
- + 0, 0, 0, 143, 0, 78, 145
- };
-
- - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
- -static const yytype_uint8 yyr1[] =
- +#define yypact_value_is_default(yystate) \
- + ((yystate) == (-84))
- +
- +#define yytable_value_is_error(yytable_value) \
- + YYID (0)
- +
- +static const yytype_int16 yycheck[] =
- {
- - 0, 47, 48, 49, 49, 50, 50, 51, 51, 51,
- - 51, 51, 52, 53, 53, 54, 54, 54, 54, 55,
- - 55, 55, 55, 55, 55, 55, 56, 56, 56, 57,
- - 57, 57, 57, 57, 58, 58, 58, 59, 60, 60,
- - 61, 61, 62, 62, 63, 63, 64, 64, 65, 65,
- - 66, 66, 66, 67, 67, 67, 67, 67, 68, 68,
- - 68, 69, 69, 69, 70, 70, 70, 70, 71, 71,
- - 71, 71, 72, 72, 72, 73, 73, 73, 74, 74,
- - 74
- + 8, 42, 43, 20, 21, 22, 13, 15, 18, 19,
- + 8, 9, 95, 25, 5, 98, 22, 14, 3, 25,
- + 10, 11, 26, 33, 21, 22, 23, 24, 34, 70,
- + 37, 22, 30, 43, 31, 0, 46, 47, 36, 36,
- + 44, 45, 18, 19, 6, 7, 4, 64, 65, 66,
- + 18, 19, 25, 94, 22, 23, 20, 33, 22, 25,
- + 16, 27, 30, 29, 12, 33, 22, 23, 32, 26,
- + 26, 15, 16, 17, 56, 57, 58, 59, 22, 42,
- + 43, 34, 35, 54, 55, 60, 61, 27, 62, 63,
- + 35, 40, 39, 25, 23, 41, 23, 25, 17, 38,
- + 17, 25, 28, 25, 25, 18, 36, 21, 33, 11,
- + 9, 34, 49, 101, 48, 35, 51, 50, 98, -1,
- + 128, 52, -1, 95, -1, -1, -1, -1, -1, -1,
- + -1, -1, -1, 141, -1, 53, 144
- };
-
- - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
- -static const yytype_uint8 yyr2[] =
- +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- + symbol of state STATE-NUM. */
- +static const yytype_uint8 yystos[] =
- {
- - 0, 2, 4, 0, 2, 4, 2, 2, 3, 4,
- - 3, 4, 5, 0, 2, 4, 2, 3, 2, 2,
- - 3, 4, 2, 9, 5, 2, 0, 2, 2, 3,
- - 1, 2, 2, 2, 1, 1, 3, 1, 1, 5,
- - 1, 3, 1, 3, 1, 3, 1, 3, 1, 3,
- - 1, 3, 3, 1, 3, 3, 3, 3, 3, 3,
- - 1, 3, 3, 1, 3, 3, 3, 1, 1, 2,
- - 2, 2, 0, 2, 2, 0, 2, 2, 2, 3,
- - 2
- + 0, 3, 49, 25, 0, 4, 50, 25, 5, 22,
- + 51, 52, 18, 19, 33, 60, 52, 26, 53, 51,
- + 43, 46, 47, 60, 61, 62, 63, 64, 65, 66,
- + 67, 68, 69, 70, 71, 72, 73, 60, 27, 54,
- + 16, 22, 23, 26, 73, 73, 73, 35, 13, 37,
- + 12, 39, 40, 41, 10, 11, 8, 9, 30, 36,
- + 6, 7, 42, 43, 26, 44, 45, 25, 55, 23,
- + 23, 54, 54, 64, 61, 65, 66, 67, 68, 69,
- + 69, 70, 70, 70, 70, 71, 71, 72, 72, 73,
- + 73, 73, 15, 16, 17, 22, 56, 75, 76, 25,
- + 54, 38, 17, 17, 25, 29, 54, 56, 76, 28,
- + 56, 75, 62, 25, 25, 57, 58, 25, 22, 25,
- + 34, 14, 21, 22, 23, 24, 31, 36, 59, 18,
- + 33, 74, 22, 23, 30, 60, 36, 21, 20, 22,
- + 32, 34, 35, 60, 34, 60, 35
- };
-
- -
- -#define yyerrok (yyerrstatus = 0)
- -#define yyclearin (yychar = YYEMPTY)
- -#define YYEMPTY (-2)
- -#define YYEOF 0
- -
- -#define YYACCEPT goto yyacceptlab
- -#define YYABORT goto yyabortlab
- -#define YYERROR goto yyerrorlab
- -
- +#define yyerrok (yyerrstatus = 0)
- +#define yyclearin (yychar = YYEMPTY)
- +#define YYEMPTY (-2)
- +#define YYEOF 0
- +
- +#define YYACCEPT goto yyacceptlab
- +#define YYABORT goto yyabortlab
- +#define YYERROR goto yyerrorlab
- +
- +
- +/* Like YYERROR except do call yyerror. This remains here temporarily
- + to ease the transition to the new meaning of YYERROR, for GCC.
- + Once GCC version 2 has supplanted version 1, this can go. However,
- + YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- + in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- + discussed. */
- +
- +#define YYFAIL goto yyerrlab
- +#if defined YYFAIL
- + /* This is here to suppress warnings from the GCC cpp's
- + -Wunused-macros. Normally we don't worry about that warning, but
- + some users do, and we want to make it easy for users to remove
- + YYFAIL uses, which will produce warnings from Bison 2.5. */
- +#endif
-
- #define YYRECOVERING() (!!yyerrstatus)
-
- -#define YYBACKUP(Token, Value) \
- -do \
- - if (yychar == YYEMPTY) \
- - { \
- - yychar = (Token); \
- - yylval = (Value); \
- - YYPOPSTACK (yylen); \
- - yystate = *yyssp; \
- - goto yybackup; \
- - } \
- - else \
- - { \
- +#define YYBACKUP(Token, Value) \
- +do \
- + if (yychar == YYEMPTY && yylen == 1) \
- + { \
- + yychar = (Token); \
- + yylval = (Value); \
- + YYPOPSTACK (1); \
- + goto yybackup; \
- + } \
- + else \
- + { \
- yyerror (YY_("syntax error: cannot back up")); \
- - YYERROR; \
- - } \
- -while (0)
- -
- -/* Error token number */
- -#define YYTERROR 1
- -#define YYERRCODE 256
- + YYERROR; \
- + } \
- +while (YYID (0))
- +
- +
- +#define YYTERROR 1
- +#define YYERRCODE 256
-
-
- /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
- +#define YYRHSLOC(Rhs, K) ((Rhs)[K])
- #ifndef YYLLOC_DEFAULT
- -# define YYLLOC_DEFAULT(Current, Rhs, N) \
- - do \
- - if (N) \
- - { \
- - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- - } \
- - else \
- - { \
- - (Current).first_line = (Current).last_line = \
- - YYRHSLOC (Rhs, 0).last_line; \
- - (Current).first_column = (Current).last_column = \
- - YYRHSLOC (Rhs, 0).last_column; \
- - } \
- - while (0)
- +# define YYLLOC_DEFAULT(Current, Rhs, N) \
- + do \
- + if (YYID (N)) \
- + { \
- + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- + } \
- + else \
- + { \
- + (Current).first_line = (Current).last_line = \
- + YYRHSLOC (Rhs, 0).last_line; \
- + (Current).first_column = (Current).last_column = \
- + YYRHSLOC (Rhs, 0).last_column; \
- + } \
- + while (YYID (0))
- #endif
-
- -#define YYRHSLOC(Rhs, K) ((Rhs)[K])
- -
- -
- -/* Enable debugging if requested. */
- -#if YYDEBUG
- -
- -# ifndef YYFPRINTF
- -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
- -# define YYFPRINTF fprintf
- -# endif
- -
- -# define YYDPRINTF(Args) \
- -do { \
- - if (yydebug) \
- - YYFPRINTF Args; \
- -} while (0)
- -
-
- /* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- @@ -779,73 +799,82 @@ do {
-
- #ifndef YY_LOCATION_PRINT
- # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
- -
- -/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
- -
- -YY_ATTRIBUTE_UNUSED
- -static unsigned
- -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
- -{
- - unsigned res = 0;
- - int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
- - if (0 <= yylocp->first_line)
- - {
- - res += YYFPRINTF (yyo, "%d", yylocp->first_line);
- - if (0 <= yylocp->first_column)
- - res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
- - }
- - if (0 <= yylocp->last_line)
- - {
- - if (yylocp->first_line < yylocp->last_line)
- - {
- - res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
- - if (0 <= end_col)
- - res += YYFPRINTF (yyo, ".%d", end_col);
- - }
- - else if (0 <= end_col && yylocp->first_column < end_col)
- - res += YYFPRINTF (yyo, "-%d", end_col);
- - }
- - return res;
- - }
- -
- -# define YY_LOCATION_PRINT(File, Loc) \
- - yy_location_print_ (File, &(Loc))
- -
- +# define YY_LOCATION_PRINT(File, Loc) \
- + fprintf (File, "%d.%d-%d.%d", \
- + (Loc).first_line, (Loc).first_column, \
- + (Loc).last_line, (Loc).last_column)
- # else
- # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
- # endif
- #endif
-
-
- -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
- -do { \
- - if (yydebug) \
- - { \
- - YYFPRINTF (stderr, "%s ", Title); \
- - yy_symbol_print (stderr, \
- - Type, Value, Location); \
- - YYFPRINTF (stderr, "\n"); \
- - } \
- -} while (0)
- +/* YYLEX -- calling `yylex' with the right arguments. */
-
- +#ifdef YYLEX_PARAM
- +# define YYLEX yylex (YYLEX_PARAM)
- +#else
- +# define YYLEX yylex ()
- +#endif
-
- -/*----------------------------------------.
- -| Print this symbol's value on YYOUTPUT. |
- -`----------------------------------------*/
- +/* Enable debugging if requested. */
- +#if YYDEBUG
-
- +# ifndef YYFPRINTF
- +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
- +# define YYFPRINTF fprintf
- +# endif
- +
- +# define YYDPRINTF(Args) \
- +do { \
- + if (yydebug) \
- + YYFPRINTF Args; \
- +} while (YYID (0))
- +
- +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
- +do { \
- + if (yydebug) \
- + { \
- + YYFPRINTF (stderr, "%s ", Title); \
- + yy_symbol_print (stderr, \
- + Type, Value, Location); \
- + YYFPRINTF (stderr, "\n"); \
- + } \
- +} while (YYID (0))
- +
- +
- +/*--------------------------------.
- +| Print this symbol on YYOUTPUT. |
- +`--------------------------------*/
- +
- +/*ARGSUSED*/
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- static void
- yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
- +#else
- +static void
- +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
- + FILE *yyoutput;
- + int yytype;
- + YYSTYPE const * const yyvaluep;
- + YYLTYPE const * const yylocationp;
- +#endif
- {
- - FILE *yyo = yyoutput;
- - YYUSE (yyo);
- - YYUSE (yylocationp);
- if (!yyvaluep)
- return;
- + YYUSE (yylocationp);
- # ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
- +# else
- + YYUSE (yyoutput);
- # endif
- - YYUSE (yytype);
- + switch (yytype)
- + {
- + default:
- + break;
- + }
- }
-
-
- @@ -853,11 +882,23 @@ yy_symbol_value_print (FILE *yyoutput, i
- | Print this symbol on YYOUTPUT. |
- `--------------------------------*/
-
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- static void
- yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
- +#else
- +static void
- +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
- + FILE *yyoutput;
- + int yytype;
- + YYSTYPE const * const yyvaluep;
- + YYLTYPE const * const yylocationp;
- +#endif
- {
- - YYFPRINTF (yyoutput, "%s %s (",
- - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
- + if (yytype < YYNTOKENS)
- + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- + else
- + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- YY_LOCATION_PRINT (yyoutput, *yylocationp);
- YYFPRINTF (yyoutput, ": ");
- @@ -870,8 +911,16 @@ yy_symbol_print (FILE *yyoutput, int yyt
- | TOP (included). |
- `------------------------------------------------------------------*/
-
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- static void
- yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
- +#else
- +static void
- +yy_stack_print (yybottom, yytop)
- + yytype_int16 *yybottom;
- + yytype_int16 *yytop;
- +#endif
- {
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- @@ -882,42 +931,50 @@ yy_stack_print (yytype_int16 *yybottom,
- YYFPRINTF (stderr, "\n");
- }
-
- -# define YY_STACK_PRINT(Bottom, Top) \
- -do { \
- - if (yydebug) \
- - yy_stack_print ((Bottom), (Top)); \
- -} while (0)
- +# define YY_STACK_PRINT(Bottom, Top) \
- +do { \
- + if (yydebug) \
- + yy_stack_print ((Bottom), (Top)); \
- +} while (YYID (0))
-
-
- /*------------------------------------------------.
- | Report that the YYRULE is going to be reduced. |
- `------------------------------------------------*/
-
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- +static void
- +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
- +#else
- static void
- -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
- +yy_reduce_print (yyvsp, yylsp, yyrule)
- + YYSTYPE *yyvsp;
- + YYLTYPE *yylsp;
- + int yyrule;
- +#endif
- {
- - unsigned long int yylno = yyrline[yyrule];
- int yynrhs = yyr2[yyrule];
- int yyi;
- + unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- - yyrule - 1, yylno);
- + yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- - yy_symbol_print (stderr,
- - yystos[yyssp[yyi + 1 - yynrhs]],
- - &(yyvsp[(yyi + 1) - (yynrhs)])
- - , &(yylsp[(yyi + 1) - (yynrhs)]) );
- + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- + &(yyvsp[(yyi + 1) - (yynrhs)])
- + , &(yylsp[(yyi + 1) - (yynrhs)]) );
- YYFPRINTF (stderr, "\n");
- }
- }
-
- -# define YY_REDUCE_PRINT(Rule) \
- -do { \
- - if (yydebug) \
- - yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \
- -} while (0)
- +# define YY_REDUCE_PRINT(Rule) \
- +do { \
- + if (yydebug) \
- + yy_reduce_print (yyvsp, yylsp, Rule); \
- +} while (YYID (0))
-
- /* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
- @@ -931,7 +988,7 @@ int yydebug;
-
-
- /* YYINITDEPTH -- initial size of the parser's stacks. */
- -#ifndef YYINITDEPTH
- +#ifndef YYINITDEPTH
- # define YYINITDEPTH 200
- #endif
-
- @@ -954,8 +1011,15 @@ int yydebug;
- # define yystrlen strlen
- # else
- /* Return the length of YYSTR. */
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- static YYSIZE_T
- yystrlen (const char *yystr)
- +#else
- +static YYSIZE_T
- +yystrlen (yystr)
- + const char *yystr;
- +#endif
- {
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- @@ -971,8 +1035,16 @@ yystrlen (const char *yystr)
- # else
- /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- static char *
- yystpcpy (char *yydest, const char *yysrc)
- +#else
- +static char *
- +yystpcpy (yydest, yysrc)
- + char *yydest;
- + const char *yysrc;
- +#endif
- {
- char *yyd = yydest;
- const char *yys = yysrc;
- @@ -1002,27 +1074,27 @@ yytnamerr (char *yyres, const char *yyst
- char const *yyp = yystr;
-
- for (;;)
- - switch (*++yyp)
- - {
- - case '\'':
- - case ',':
- - goto do_not_strip_quotes;
- -
- - case '\\':
- - if (*++yyp != '\\')
- - goto do_not_strip_quotes;
- - /* Fall through. */
- - default:
- - if (yyres)
- - yyres[yyn] = *yyp;
- - yyn++;
- - break;
- -
- - case '"':
- - if (yyres)
- - yyres[yyn] = '\0';
- - return yyn;
- - }
- + switch (*++yyp)
- + {
- + case '\'':
- + case ',':
- + goto do_not_strip_quotes;
- +
- + case '\\':
- + if (*++yyp != '\\')
- + goto do_not_strip_quotes;
- + /* Fall through. */
- + default:
- + if (yyres)
- + yyres[yyn] = *yyp;
- + yyn++;
- + break;
- +
- + case '"':
- + if (yyres)
- + yyres[yyn] = '\0';
- + return yyn;
- + }
- do_not_strip_quotes: ;
- }
-
- @@ -1045,11 +1117,12 @@ static int
- yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
- {
- - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
- + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- + YYSIZE_T yysize1;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- - const char *yyformat = YY_NULLPTR;
- + const char *yyformat = 0;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- @@ -1057,6 +1130,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- + - Assume YYFAIL is not used. It's too flawed to consider. See
- + <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- + for details. YYERROR is fine as it does not invoke this
- + function.
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- @@ -1105,13 +1182,11 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- - {
- - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
- - if (! (yysize <= yysize1
- - && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- - return 2;
- - yysize = yysize1;
- - }
- + yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- + if (! (yysize <= yysize1
- + && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- + return 2;
- + yysize = yysize1;
- }
- }
- }
- @@ -1131,12 +1206,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
- # undef YYCASE_
- }
-
- - {
- - YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
- - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- - return 2;
- - yysize = yysize1;
- - }
- + yysize1 = yysize + yystrlen (yyformat);
- + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- + return 2;
- + yysize = yysize1;
-
- if (*yymsg_alloc < yysize)
- {
- @@ -1173,21 +1246,50 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, c
- | Release the memory associated to this symbol. |
- `-----------------------------------------------*/
-
- +/*ARGSUSED*/
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- static void
- yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
- +#else
- +static void
- +yydestruct (yymsg, yytype, yyvaluep, yylocationp)
- + const char *yymsg;
- + int yytype;
- + YYSTYPE *yyvaluep;
- + YYLTYPE *yylocationp;
- +#endif
- {
- YYUSE (yyvaluep);
- YYUSE (yylocationp);
- +
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- - YYUSE (yytype);
- - YY_IGNORE_MAYBE_UNINITIALIZED_END
- + switch (yytype)
- + {
- +
- + default:
- + break;
- + }
- }
-
-
- +/* Prevent warnings from -Wmissing-prototypes. */
- +#ifdef YYPARSE_PARAM
- +#if defined __STDC__ || defined __cplusplus
- +int yyparse (void *YYPARSE_PARAM);
- +#else
- +int yyparse ();
- +#endif
- +#else /* ! YYPARSE_PARAM */
- +#if defined __STDC__ || defined __cplusplus
- +int yyparse (void);
- +#else
- +int yyparse ();
- +#endif
- +#endif /* ! YYPARSE_PARAM */
-
-
- /* The lookahead symbol. */
- @@ -1195,12 +1297,10 @@ int yychar;
-
- /* The semantic value of the lookahead symbol. */
- YYSTYPE yylval;
- +
- /* Location data for the lookahead symbol. */
- -YYLTYPE yylloc
- -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
- - = { 1, 1, 1, 1 }
- -# endif
- -;
- +YYLTYPE yylloc;
- +
- /* Number of syntax errors so far. */
- int yynerrs;
-
- @@ -1209,19 +1309,38 @@ int yynerrs;
- | yyparse. |
- `----------*/
-
- +#ifdef YYPARSE_PARAM
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- +int
- +yyparse (void *YYPARSE_PARAM)
- +#else
- +int
- +yyparse (YYPARSE_PARAM)
- + void *YYPARSE_PARAM;
- +#endif
- +#else /* ! YYPARSE_PARAM */
- +#if (defined __STDC__ || defined __C99__FUNC__ \
- + || defined __cplusplus || defined _MSC_VER)
- int
- yyparse (void)
- +#else
- +int
- +yyparse ()
- +
- +#endif
- +#endif
- {
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- - 'yyss': related to states.
- - 'yyvs': related to semantic values.
- - 'yyls': related to locations.
- + `yyss': related to states.
- + `yyvs': related to semantic values.
- + `yyls': related to locations.
-
- - Refer to the stacks through separate pointers, to allow yyoverflow
- + Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- @@ -1247,7 +1366,7 @@ yyparse (void)
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- - int yytoken = 0;
- + int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
- @@ -1266,9 +1385,10 @@ yyparse (void)
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- - yyssp = yyss = yyssa;
- - yyvsp = yyvs = yyvsa;
- - yylsp = yyls = yylsa;
- + yytoken = 0;
- + yyss = yyssa;
- + yyvs = yyvsa;
- + yyls = yylsa;
- yystacksize = YYINITDEPTH;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
- @@ -1277,7 +1397,21 @@ yyparse (void)
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
- - yylsp[0] = yylloc;
- +
- + /* Initialize stack pointers.
- + Waste one element of value and location stack
- + so that they stay on the same level as the state stack.
- + The wasted elements are never initialized. */
- + yyssp = yyss;
- + yyvsp = yyvs;
- + yylsp = yyls;
- +
- +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
- + /* Initialize the default location before parsing starts. */
- + yylloc.first_line = yylloc.last_line = 1;
- + yylloc.first_column = yylloc.last_column = 1;
- +#endif
- +
- goto yysetstate;
-
- /*------------------------------------------------------------.
- @@ -1298,26 +1432,26 @@ yyparse (void)
-
- #ifdef yyoverflow
- {
- - /* Give user a chance to reallocate the stack. Use copies of
- - these so that the &'s don't force the real ones into
- - memory. */
- - YYSTYPE *yyvs1 = yyvs;
- - yytype_int16 *yyss1 = yyss;
- - YYLTYPE *yyls1 = yyls;
- -
- - /* Each stack pointer address is followed by the size of the
- - data in use in that stack, in bytes. This used to be a
- - conditional around just the two extra args, but that might
- - be undefined if yyoverflow is a macro. */
- - yyoverflow (YY_("memory exhausted"),
- - &yyss1, yysize * sizeof (*yyssp),
- - &yyvs1, yysize * sizeof (*yyvsp),
- - &yyls1, yysize * sizeof (*yylsp),
- - &yystacksize);
- -
- - yyls = yyls1;
- - yyss = yyss1;
- - yyvs = yyvs1;
- + /* Give user a chance to reallocate the stack. Use copies of
- + these so that the &'s don't force the real ones into
- + memory. */
- + YYSTYPE *yyvs1 = yyvs;
- + yytype_int16 *yyss1 = yyss;
- + YYLTYPE *yyls1 = yyls;
- +
- + /* Each stack pointer address is followed by the size of the
- + data in use in that stack, in bytes. This used to be a
- + conditional around just the two extra args, but that might
- + be undefined if yyoverflow is a macro. */
- + yyoverflow (YY_("memory exhausted"),
- + &yyss1, yysize * sizeof (*yyssp),
- + &yyvs1, yysize * sizeof (*yyvsp),
- + &yyls1, yysize * sizeof (*yylsp),
- + &yystacksize);
- +
- + yyls = yyls1;
- + yyss = yyss1;
- + yyvs = yyvs1;
- }
- #else /* no yyoverflow */
- # ifndef YYSTACK_RELOCATE
- @@ -1325,23 +1459,23 @@ yyparse (void)
- # else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- - goto yyexhaustedlab;
- + goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- - yystacksize = YYMAXDEPTH;
- + yystacksize = YYMAXDEPTH;
-
- {
- - yytype_int16 *yyss1 = yyss;
- - union yyalloc *yyptr =
- - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- - if (! yyptr)
- - goto yyexhaustedlab;
- - YYSTACK_RELOCATE (yyss_alloc, yyss);
- - YYSTACK_RELOCATE (yyvs_alloc, yyvs);
- - YYSTACK_RELOCATE (yyls_alloc, yyls);
- + yytype_int16 *yyss1 = yyss;
- + union yyalloc *yyptr =
- + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- + if (! yyptr)
- + goto yyexhaustedlab;
- + YYSTACK_RELOCATE (yyss_alloc, yyss);
- + YYSTACK_RELOCATE (yyvs_alloc, yyvs);
- + YYSTACK_RELOCATE (yyls_alloc, yyls);
- # undef YYSTACK_RELOCATE
- - if (yyss1 != yyssa)
- - YYSTACK_FREE (yyss1);
- + if (yyss1 != yyssa)
- + YYSTACK_FREE (yyss1);
- }
- # endif
- #endif /* no yyoverflow */
- @@ -1351,10 +1485,10 @@ yyparse (void)
- yylsp = yyls + yysize - 1;
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- - (unsigned long int) yystacksize));
- + (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- - YYABORT;
- + YYABORT;
- }
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- @@ -1383,7 +1517,7 @@ yybackup:
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- - yychar = yylex ();
- + yychar = YYLEX;
- }
-
- if (yychar <= YYEOF)
- @@ -1423,9 +1557,7 @@ yybackup:
- yychar = YYEMPTY;
-
- yystate = yyn;
- - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- - YY_IGNORE_MAYBE_UNINITIALIZED_END
- *++yylsp = yylloc;
- goto yynewstate;
-
- @@ -1448,7 +1580,7 @@ yyreduce:
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- - '$$ = $1'.
- + `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- @@ -1463,273 +1595,322 @@ yyreduce:
- switch (yyn)
- {
- case 2:
- -#line 105 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 109 "dtc-parser.y"
- {
- - the_boot_info = build_boot_info((yyvsp[-1].re), (yyvsp[0].node),
- - guess_boot_cpuid((yyvsp[0].node)));
- + (yyvsp[(5) - (5)].node)->is_plugin = (yyvsp[(3) - (5)].is_plugin);
- + (yyvsp[(5) - (5)].node)->is_root = 1;
- + the_boot_info = build_boot_info((yyvsp[(4) - (5)].re), (yyvsp[(5) - (5)].node),
- + guess_boot_cpuid((yyvsp[(5) - (5)].node)));
- }
- -#line 1472 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 3:
- -#line 113 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 119 "dtc-parser.y"
- {
- - (yyval.re) = NULL;
- + (yyval.is_plugin) = 0;
- }
- -#line 1480 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 4:
- -#line 117 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 123 "dtc-parser.y"
- {
- - (yyval.re) = chain_reserve_entry((yyvsp[-1].re), (yyvsp[0].re));
- + (yyval.is_plugin) = 1;
- }
- -#line 1488 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 5:
- -#line 124 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 130 "dtc-parser.y"
- {
- - (yyval.re) = build_reserve_entry((yyvsp[-2].integer), (yyvsp[-1].integer));
- + (yyval.re) = NULL;
- }
- -#line 1496 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 6:
- -#line 128 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 134 "dtc-parser.y"
- {
- - add_label(&(yyvsp[0].re)->labels, (yyvsp[-1].labelref));
- - (yyval.re) = (yyvsp[0].re);
- + (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
- }
- -#line 1505 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 7:
- -#line 136 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 141 "dtc-parser.y"
- {
- - (yyval.node) = name_node((yyvsp[0].node), "");
- + (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].integer), (yyvsp[(3) - (4)].integer));
- }
- -#line 1513 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 8:
- -#line 140 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 145 "dtc-parser.y"
- {
- - (yyval.node) = merge_nodes((yyvsp[-2].node), (yyvsp[0].node));
- + add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
- + (yyval.re) = (yyvsp[(2) - (2)].re);
- }
- -#line 1521 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 9:
- -#line 145 "dtc-parser.y" /* yacc.c:1646 */
- - {
- - struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
-
- - add_label(&target->labels, (yyvsp[-2].labelref));
- - if (target)
- - merge_nodes(target, (yyvsp[0].node));
- - else
- - ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
- - (yyval.node) = (yyvsp[-3].node);
- +/* Line 1806 of yacc.c */
- +#line 153 "dtc-parser.y"
- + {
- + (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
- }
- -#line 1536 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 10:
- -#line 156 "dtc-parser.y" /* yacc.c:1646 */
- - {
- - struct node *target = get_node_by_ref((yyvsp[-2].node), (yyvsp[-1].labelref));
-
- - if (target)
- - merge_nodes(target, (yyvsp[0].node));
- - else
- - ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
- - (yyval.node) = (yyvsp[-2].node);
- +/* Line 1806 of yacc.c */
- +#line 157 "dtc-parser.y"
- + {
- + (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
- }
- -#line 1550 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 11:
- -#line 166 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 162 "dtc-parser.y"
- {
- - struct node *target = get_node_by_ref((yyvsp[-3].node), (yyvsp[-1].labelref));
- + struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
-
- + add_label(&target->labels, (yyvsp[(2) - (4)].labelref));
- if (target)
- - delete_node(target);
- + merge_nodes(target, (yyvsp[(4) - (4)].node));
- else
- - ERROR(&(yylsp[-1]), "Label or path %s not found", (yyvsp[-1].labelref));
- -
- -
- - (yyval.node) = (yyvsp[-3].node);
- + ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref));
- + (yyval.node) = (yyvsp[(1) - (4)].node);
- }
- -#line 1566 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 12:
- -#line 181 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 173 "dtc-parser.y"
- {
- - (yyval.node) = build_node((yyvsp[-3].proplist), (yyvsp[-2].nodelist));
- + struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
- +
- + if (target)
- + merge_nodes(target, (yyvsp[(3) - (3)].node));
- + else
- + ERROR(&(yylsp[(2) - (3)]), "Label or path %s not found", (yyvsp[(2) - (3)].labelref));
- + (yyval.node) = (yyvsp[(1) - (3)].node);
- }
- -#line 1574 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 13:
- -#line 188 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 183 "dtc-parser.y"
- {
- - (yyval.proplist) = NULL;
- + struct node *target = get_node_by_ref((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].labelref));
- +
- + if (target)
- + delete_node(target);
- + else
- + ERROR(&(yylsp[(3) - (4)]), "Label or path %s not found", (yyvsp[(3) - (4)].labelref));
- +
- +
- + (yyval.node) = (yyvsp[(1) - (4)].node);
- }
- -#line 1582 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 14:
- -#line 192 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 198 "dtc-parser.y"
- {
- - (yyval.proplist) = chain_property((yyvsp[0].prop), (yyvsp[-1].proplist));
- + (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
- }
- -#line 1590 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 15:
- -#line 199 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 205 "dtc-parser.y"
- {
- - (yyval.prop) = build_property((yyvsp[-3].propnodename), (yyvsp[-1].data));
- + (yyval.proplist) = NULL;
- }
- -#line 1598 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 16:
- -#line 203 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 209 "dtc-parser.y"
- {
- - (yyval.prop) = build_property((yyvsp[-1].propnodename), empty_data);
- + (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
- }
- -#line 1606 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 17:
- -#line 207 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 216 "dtc-parser.y"
- {
- - (yyval.prop) = build_property_delete((yyvsp[-1].propnodename));
- + (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
- }
- -#line 1614 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 18:
- -#line 211 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 220 "dtc-parser.y"
- {
- - add_label(&(yyvsp[0].prop)->labels, (yyvsp[-1].labelref));
- - (yyval.prop) = (yyvsp[0].prop);
- + (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
- }
- -#line 1623 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 19:
- -#line 219 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 224 "dtc-parser.y"
- {
- - (yyval.data) = data_merge((yyvsp[-1].data), (yyvsp[0].data));
- + (yyval.prop) = build_property_delete((yyvsp[(2) - (3)].propnodename));
- }
- -#line 1631 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 20:
- -#line 223 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 228 "dtc-parser.y"
- {
- - (yyval.data) = data_merge((yyvsp[-2].data), (yyvsp[-1].array).data);
- + add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
- + (yyval.prop) = (yyvsp[(2) - (2)].prop);
- }
- -#line 1639 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 21:
- -#line 227 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 236 "dtc-parser.y"
- {
- - (yyval.data) = data_merge((yyvsp[-3].data), (yyvsp[-1].data));
- + (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
- }
- -#line 1647 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 22:
- -#line 231 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 240 "dtc-parser.y"
- {
- - (yyval.data) = data_add_marker((yyvsp[-1].data), REF_PATH, (yyvsp[0].labelref));
- + (yyval.data) = data_merge((yyvsp[(1) - (3)].data), (yyvsp[(2) - (3)].array).data);
- }
- -#line 1655 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 23:
- -#line 235 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 244 "dtc-parser.y"
- + {
- + (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
- + }
- + break;
- +
- + case 24:
- +
- +/* Line 1806 of yacc.c */
- +#line 248 "dtc-parser.y"
- + {
- + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
- + }
- + break;
- +
- + case 25:
- +
- +/* Line 1806 of yacc.c */
- +#line 252 "dtc-parser.y"
- {
- - FILE *f = srcfile_relative_open((yyvsp[-5].data).val, NULL);
- + FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
- struct data d;
-
- - if ((yyvsp[-3].integer) != 0)
- - if (fseek(f, (yyvsp[-3].integer), SEEK_SET) != 0)
- + if ((yyvsp[(6) - (9)].integer) != 0)
- + if (fseek(f, (yyvsp[(6) - (9)].integer), SEEK_SET) != 0)
- die("Couldn't seek to offset %llu in \"%s\": %s",
- - (unsigned long long)(yyvsp[-3].integer), (yyvsp[-5].data).val,
- + (unsigned long long)(yyvsp[(6) - (9)].integer), (yyvsp[(4) - (9)].data).val,
- strerror(errno));
-
- - d = data_copy_file(f, (yyvsp[-1].integer));
- + d = data_copy_file(f, (yyvsp[(8) - (9)].integer));
-
- - (yyval.data) = data_merge((yyvsp[-8].data), d);
- + (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);
- fclose(f);
- }
- -#line 1675 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 24:
- -#line 251 "dtc-parser.y" /* yacc.c:1646 */
- + case 26:
- +
- +/* Line 1806 of yacc.c */
- +#line 268 "dtc-parser.y"
- {
- - FILE *f = srcfile_relative_open((yyvsp[-1].data).val, NULL);
- + FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
- struct data d = empty_data;
-
- d = data_copy_file(f, -1);
-
- - (yyval.data) = data_merge((yyvsp[-4].data), d);
- + (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);
- fclose(f);
- }
- -#line 1689 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 25:
- -#line 261 "dtc-parser.y" /* yacc.c:1646 */
- + case 27:
- +
- +/* Line 1806 of yacc.c */
- +#line 278 "dtc-parser.y"
- {
- - (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
- + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
- }
- -#line 1697 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 26:
- -#line 268 "dtc-parser.y" /* yacc.c:1646 */
- + case 28:
- +
- +/* Line 1806 of yacc.c */
- +#line 285 "dtc-parser.y"
- {
- (yyval.data) = empty_data;
- }
- -#line 1705 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 27:
- -#line 272 "dtc-parser.y" /* yacc.c:1646 */
- + case 29:
- +
- +/* Line 1806 of yacc.c */
- +#line 289 "dtc-parser.y"
- {
- - (yyval.data) = (yyvsp[-1].data);
- + (yyval.data) = (yyvsp[(1) - (2)].data);
- }
- -#line 1713 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 28:
- -#line 276 "dtc-parser.y" /* yacc.c:1646 */
- + case 30:
- +
- +/* Line 1806 of yacc.c */
- +#line 293 "dtc-parser.y"
- {
- - (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
- + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
- }
- -#line 1721 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 29:
- -#line 283 "dtc-parser.y" /* yacc.c:1646 */
- + case 31:
- +
- +/* Line 1806 of yacc.c */
- +#line 300 "dtc-parser.y"
- {
- unsigned long long bits;
-
- - bits = (yyvsp[-1].integer);
- + bits = (yyvsp[(2) - (3)].integer);
-
- if ((bits != 8) && (bits != 16) &&
- (bits != 32) && (bits != 64)) {
- - ERROR(&(yylsp[-1]), "Array elements must be"
- + ERROR(&(yylsp[(2) - (3)]), "Array elements must be"
- " 8, 16, 32 or 64-bits");
- bits = 32;
- }
- @@ -1737,23 +1918,25 @@ yyreduce:
- (yyval.array).data = empty_data;
- (yyval.array).bits = bits;
- }
- -#line 1741 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 30:
- -#line 299 "dtc-parser.y" /* yacc.c:1646 */
- + case 32:
- +
- +/* Line 1806 of yacc.c */
- +#line 316 "dtc-parser.y"
- {
- (yyval.array).data = empty_data;
- (yyval.array).bits = 32;
- }
- -#line 1750 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 31:
- -#line 304 "dtc-parser.y" /* yacc.c:1646 */
- + case 33:
- +
- +/* Line 1806 of yacc.c */
- +#line 321 "dtc-parser.y"
- {
- - if ((yyvsp[-1].array).bits < 64) {
- - uint64_t mask = (1ULL << (yyvsp[-1].array).bits) - 1;
- + if ((yyvsp[(1) - (2)].array).bits < 64) {
- + uint64_t mask = (1ULL << (yyvsp[(1) - (2)].array).bits) - 1;
- /*
- * Bits above mask must either be all zero
- * (positive within range of mask) or all one
- @@ -1762,258 +1945,293 @@ yyreduce:
- * within the mask to one (i.e. | in the
- * mask), all bits are one.
- */
- - if (((yyvsp[0].integer) > mask) && (((yyvsp[0].integer) | mask) != -1ULL))
- - ERROR(&(yylsp[0]), "Value out of range for"
- - " %d-bit array element", (yyvsp[-1].array).bits);
- + if (((yyvsp[(2) - (2)].integer) > mask) && (((yyvsp[(2) - (2)].integer) | mask) != -1ULL))
- + ERROR(&(yylsp[(2) - (2)]), "Value out of range for"
- + " %d-bit array element", (yyvsp[(1) - (2)].array).bits);
- }
-
- - (yyval.array).data = data_append_integer((yyvsp[-1].array).data, (yyvsp[0].integer), (yyvsp[-1].array).bits);
- + (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, (yyvsp[(2) - (2)].integer), (yyvsp[(1) - (2)].array).bits);
- }
- -#line 1773 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 32:
- -#line 323 "dtc-parser.y" /* yacc.c:1646 */
- + case 34:
- +
- +/* Line 1806 of yacc.c */
- +#line 340 "dtc-parser.y"
- {
- - uint64_t val = ~0ULL >> (64 - (yyvsp[-1].array).bits);
- + uint64_t val = ~0ULL >> (64 - (yyvsp[(1) - (2)].array).bits);
-
- - if ((yyvsp[-1].array).bits == 32)
- - (yyvsp[-1].array).data = data_add_marker((yyvsp[-1].array).data,
- + if ((yyvsp[(1) - (2)].array).bits == 32)
- + (yyvsp[(1) - (2)].array).data = data_add_marker((yyvsp[(1) - (2)].array).data,
- REF_PHANDLE,
- - (yyvsp[0].labelref));
- + (yyvsp[(2) - (2)].labelref));
- else
- - ERROR(&(yylsp[0]), "References are only allowed in "
- + ERROR(&(yylsp[(2) - (2)]), "References are only allowed in "
- "arrays with 32-bit elements.");
-
- - (yyval.array).data = data_append_integer((yyvsp[-1].array).data, val, (yyvsp[-1].array).bits);
- + (yyval.array).data = data_append_integer((yyvsp[(1) - (2)].array).data, val, (yyvsp[(1) - (2)].array).bits);
- }
- -#line 1791 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 33:
- -#line 337 "dtc-parser.y" /* yacc.c:1646 */
- + case 35:
- +
- +/* Line 1806 of yacc.c */
- +#line 354 "dtc-parser.y"
- {
- - (yyval.array).data = data_add_marker((yyvsp[-1].array).data, LABEL, (yyvsp[0].labelref));
- + (yyval.array).data = data_add_marker((yyvsp[(1) - (2)].array).data, LABEL, (yyvsp[(2) - (2)].labelref));
- }
- -#line 1799 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- - case 36:
- -#line 346 "dtc-parser.y" /* yacc.c:1646 */
- + case 38:
- +
- +/* Line 1806 of yacc.c */
- +#line 363 "dtc-parser.y"
- {
- - (yyval.integer) = (yyvsp[-1].integer);
- + (yyval.integer) = (yyvsp[(2) - (3)].integer);
- }
- -#line 1807 "dtc-parser.tab.c" /* yacc.c:1646 */
- - break;
- -
- - case 39:
- -#line 357 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-4].integer) ? (yyvsp[-2].integer) : (yyvsp[0].integer); }
- -#line 1813 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 41:
- -#line 362 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) || (yyvsp[0].integer); }
- -#line 1819 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 374 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (5)].integer) ? (yyvsp[(3) - (5)].integer) : (yyvsp[(5) - (5)].integer); }
- break;
-
- case 43:
- -#line 367 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) && (yyvsp[0].integer); }
- -#line 1825 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 379 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) || (yyvsp[(3) - (3)].integer); }
- break;
-
- case 45:
- -#line 372 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) | (yyvsp[0].integer); }
- -#line 1831 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 384 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) && (yyvsp[(3) - (3)].integer); }
- break;
-
- case 47:
- -#line 377 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) ^ (yyvsp[0].integer); }
- -#line 1837 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 389 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) | (yyvsp[(3) - (3)].integer); }
- break;
-
- case 49:
- -#line 382 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) & (yyvsp[0].integer); }
- -#line 1843 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 394 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) ^ (yyvsp[(3) - (3)].integer); }
- break;
-
- case 51:
- -#line 387 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) == (yyvsp[0].integer); }
- -#line 1849 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 399 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) & (yyvsp[(3) - (3)].integer); }
- break;
-
- - case 52:
- -#line 388 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) != (yyvsp[0].integer); }
- -#line 1855 "dtc-parser.tab.c" /* yacc.c:1646 */
- + case 53:
- +
- +/* Line 1806 of yacc.c */
- +#line 404 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) == (yyvsp[(3) - (3)].integer); }
- break;
-
- case 54:
- -#line 393 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) < (yyvsp[0].integer); }
- -#line 1861 "dtc-parser.tab.c" /* yacc.c:1646 */
- - break;
-
- - case 55:
- -#line 394 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) > (yyvsp[0].integer); }
- -#line 1867 "dtc-parser.tab.c" /* yacc.c:1646 */
- +/* Line 1806 of yacc.c */
- +#line 405 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) != (yyvsp[(3) - (3)].integer); }
- break;
-
- case 56:
- -#line 395 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) <= (yyvsp[0].integer); }
- -#line 1873 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 410 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) < (yyvsp[(3) - (3)].integer); }
- break;
-
- case 57:
- -#line 396 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) >= (yyvsp[0].integer); }
- -#line 1879 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 411 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) > (yyvsp[(3) - (3)].integer); }
- break;
-
- case 58:
- -#line 400 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) << (yyvsp[0].integer); }
- -#line 1885 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 412 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) <= (yyvsp[(3) - (3)].integer); }
- break;
-
- case 59:
- -#line 401 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) >> (yyvsp[0].integer); }
- -#line 1891 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 413 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >= (yyvsp[(3) - (3)].integer); }
- + break;
- +
- + case 60:
- +
- +/* Line 1806 of yacc.c */
- +#line 417 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) << (yyvsp[(3) - (3)].integer); }
- break;
-
- case 61:
- -#line 406 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) + (yyvsp[0].integer); }
- -#line 1897 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 418 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) >> (yyvsp[(3) - (3)].integer); }
- break;
-
- - case 62:
- -#line 407 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) - (yyvsp[0].integer); }
- -#line 1903 "dtc-parser.tab.c" /* yacc.c:1646 */
- + case 63:
- +
- +/* Line 1806 of yacc.c */
- +#line 423 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) + (yyvsp[(3) - (3)].integer); }
- break;
-
- case 64:
- -#line 412 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) * (yyvsp[0].integer); }
- -#line 1909 "dtc-parser.tab.c" /* yacc.c:1646 */
- - break;
-
- - case 65:
- -#line 413 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) / (yyvsp[0].integer); }
- -#line 1915 "dtc-parser.tab.c" /* yacc.c:1646 */
- +/* Line 1806 of yacc.c */
- +#line 424 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) - (yyvsp[(3) - (3)].integer); }
- break;
-
- case 66:
- -#line 414 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = (yyvsp[-2].integer) % (yyvsp[0].integer); }
- -#line 1921 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 429 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) * (yyvsp[(3) - (3)].integer); }
- break;
-
- - case 69:
- -#line 420 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = -(yyvsp[0].integer); }
- -#line 1927 "dtc-parser.tab.c" /* yacc.c:1646 */
- + case 67:
- +
- +/* Line 1806 of yacc.c */
- +#line 430 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) / (yyvsp[(3) - (3)].integer); }
- break;
-
- - case 70:
- -#line 421 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = ~(yyvsp[0].integer); }
- -#line 1933 "dtc-parser.tab.c" /* yacc.c:1646 */
- + case 68:
- +
- +/* Line 1806 of yacc.c */
- +#line 431 "dtc-parser.y"
- + { (yyval.integer) = (yyvsp[(1) - (3)].integer) % (yyvsp[(3) - (3)].integer); }
- break;
-
- case 71:
- -#line 422 "dtc-parser.y" /* yacc.c:1646 */
- - { (yyval.integer) = !(yyvsp[0].integer); }
- -#line 1939 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 437 "dtc-parser.y"
- + { (yyval.integer) = -(yyvsp[(2) - (2)].integer); }
- break;
-
- case 72:
- -#line 427 "dtc-parser.y" /* yacc.c:1646 */
- - {
- - (yyval.data) = empty_data;
- - }
- -#line 1947 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 438 "dtc-parser.y"
- + { (yyval.integer) = ~(yyvsp[(2) - (2)].integer); }
- break;
-
- case 73:
- -#line 431 "dtc-parser.y" /* yacc.c:1646 */
- - {
- - (yyval.data) = data_append_byte((yyvsp[-1].data), (yyvsp[0].byte));
- - }
- -#line 1955 "dtc-parser.tab.c" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 439 "dtc-parser.y"
- + { (yyval.integer) = !(yyvsp[(2) - (2)].integer); }
- break;
-
- case 74:
- -#line 435 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 444 "dtc-parser.y"
- {
- - (yyval.data) = data_add_marker((yyvsp[-1].data), LABEL, (yyvsp[0].labelref));
- + (yyval.data) = empty_data;
- }
- -#line 1963 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 75:
- -#line 442 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 448 "dtc-parser.y"
- {
- - (yyval.nodelist) = NULL;
- + (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
- }
- -#line 1971 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 76:
- -#line 446 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 452 "dtc-parser.y"
- {
- - (yyval.nodelist) = chain_node((yyvsp[-1].node), (yyvsp[0].nodelist));
- + (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
- }
- -#line 1979 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 77:
- -#line 450 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 459 "dtc-parser.y"
- {
- - ERROR(&(yylsp[0]), "Properties must precede subnodes");
- - YYERROR;
- + (yyval.nodelist) = NULL;
- }
- -#line 1988 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 78:
- -#line 458 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 463 "dtc-parser.y"
- {
- - (yyval.node) = name_node((yyvsp[0].node), (yyvsp[-1].propnodename));
- + (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
- }
- -#line 1996 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 79:
- -#line 462 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 467 "dtc-parser.y"
- {
- - (yyval.node) = name_node(build_node_delete(), (yyvsp[-1].propnodename));
- + ERROR(&(yylsp[(2) - (2)]), "Properties must precede subnodes");
- + YYERROR;
- }
- -#line 2004 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- case 80:
- -#line 466 "dtc-parser.y" /* yacc.c:1646 */
- +
- +/* Line 1806 of yacc.c */
- +#line 475 "dtc-parser.y"
- {
- - add_label(&(yyvsp[0].node)->labels, (yyvsp[-1].labelref));
- - (yyval.node) = (yyvsp[0].node);
- + (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
- }
- -#line 2013 "dtc-parser.tab.c" /* yacc.c:1646 */
- break;
-
- + case 81:
-
- -#line 2017 "dtc-parser.tab.c" /* yacc.c:1646 */
- +/* Line 1806 of yacc.c */
- +#line 479 "dtc-parser.y"
- + {
- + (yyval.node) = name_node(build_node_delete(), (yyvsp[(2) - (3)].propnodename));
- + }
- + break;
- +
- + case 82:
- +
- +/* Line 1806 of yacc.c */
- +#line 483 "dtc-parser.y"
- + {
- + add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
- + (yyval.node) = (yyvsp[(2) - (2)].node);
- + }
- + break;
- +
- +
- +
- +/* Line 1806 of yacc.c */
- +#line 2235 "dtc-parser.tab.c"
- default: break;
- }
- /* User semantic actions sometimes alter yychar, and that requires
- @@ -2036,7 +2254,7 @@ yyreduce:
- *++yyvsp = yyval;
- *++yylsp = yyloc;
-
- - /* Now 'shift' the result of the reduction. Determine what state
- + /* Now `shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
-
- @@ -2051,9 +2269,9 @@ yyreduce:
- goto yynewstate;
-
-
- -/*--------------------------------------.
- -| yyerrlab -- here on detecting error. |
- -`--------------------------------------*/
- +/*------------------------------------.
- +| yyerrlab -- here on detecting error |
- +`------------------------------------*/
- yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- @@ -2104,20 +2322,20 @@ yyerrlab:
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- - error, discard it. */
- + error, discard it. */
-
- if (yychar <= YYEOF)
- - {
- - /* Return failure if at end of input. */
- - if (yychar == YYEOF)
- - YYABORT;
- - }
- + {
- + /* Return failure if at end of input. */
- + if (yychar == YYEOF)
- + YYABORT;
- + }
- else
- - {
- - yydestruct ("Error: discarding",
- - yytoken, &yylval, &yylloc);
- - yychar = YYEMPTY;
- - }
- + {
- + yydestruct ("Error: discarding",
- + yytoken, &yylval, &yylloc);
- + yychar = YYEMPTY;
- + }
- }
-
- /* Else will try to reuse lookahead token after shifting the error
- @@ -2137,7 +2355,7 @@ yyerrorlab:
- goto yyerrorlab;
-
- yyerror_range[1] = yylsp[1-yylen];
- - /* Do not reclaim the symbols of the rule whose action triggered
- + /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- @@ -2150,37 +2368,35 @@ yyerrorlab:
- | yyerrlab1 -- common code for both syntax error and YYERROR. |
- `-------------------------------------------------------------*/
- yyerrlab1:
- - yyerrstatus = 3; /* Each real token shifted decrements this. */
- + yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- - {
- - yyn += YYTERROR;
- - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- - {
- - yyn = yytable[yyn];
- - if (0 < yyn)
- - break;
- - }
- - }
- + {
- + yyn += YYTERROR;
- + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- + {
- + yyn = yytable[yyn];
- + if (0 < yyn)
- + break;
- + }
- + }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- - YYABORT;
- + YYABORT;
-
- yyerror_range[1] = *yylsp;
- yydestruct ("Error: popping",
- - yystos[yystate], yyvsp, yylsp);
- + yystos[yystate], yyvsp, yylsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- - YY_IGNORE_MAYBE_UNINITIALIZED_END
-
- yyerror_range[2] = yylloc;
- /* Using YYLLOC is tempting, but would change the location of
- @@ -2209,7 +2425,7 @@ yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
- -#if !defined yyoverflow || YYERROR_VERBOSE
- +#if !defined(yyoverflow) || YYERROR_VERBOSE
- /*-------------------------------------------------.
- | yyexhaustedlab -- memory exhaustion comes here. |
- `-------------------------------------------------*/
- @@ -2228,14 +2444,14 @@ yyreturn:
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval, &yylloc);
- }
- - /* Do not reclaim the symbols of the rule whose action triggered
- + /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- - yystos[*yyssp], yyvsp, yylsp);
- + yystos[*yyssp], yyvsp, yylsp);
- YYPOPSTACK (1);
- }
- #ifndef yyoverflow
- @@ -2246,12 +2462,18 @@ yyreturn:
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- #endif
- - return yyresult;
- + /* Make sure YYID is used. */
- + return YYID (yyresult);
- }
- -#line 472 "dtc-parser.y" /* yacc.c:1906 */
- +
- +
- +
- +/* Line 2067 of yacc.c */
- +#line 489 "dtc-parser.y"
-
-
- void yyerror(char const *s)
- {
- ERROR(&yylloc, "%s", s);
- }
- +
- --- a/scripts/dtc/dtc-parser.tab.h_shipped
- +++ b/scripts/dtc/dtc-parser.tab.h_shipped
- @@ -1,19 +1,19 @@
- -/* A Bison parser, made by GNU Bison 3.0.2. */
- +/* A Bison parser, made by GNU Bison 2.5. */
-
- /* Bison interface for Yacc-like parsers in C
- -
- - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
- -
- +
- + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
- +
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- -
- +
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- -
- +
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
- @@ -26,55 +26,50 @@
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
- -
- +
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
- -#ifndef YY_YY_DTC_PARSER_TAB_H_INCLUDED
- -# define YY_YY_DTC_PARSER_TAB_H_INCLUDED
- -/* Debug traces. */
- -#ifndef YYDEBUG
- -# define YYDEBUG 0
- -#endif
- -#if YYDEBUG
- -extern int yydebug;
- -#endif
-
- -/* Token type. */
- +/* Tokens. */
- #ifndef YYTOKENTYPE
- # define YYTOKENTYPE
- - enum yytokentype
- - {
- - DT_V1 = 258,
- - DT_MEMRESERVE = 259,
- - DT_LSHIFT = 260,
- - DT_RSHIFT = 261,
- - DT_LE = 262,
- - DT_GE = 263,
- - DT_EQ = 264,
- - DT_NE = 265,
- - DT_AND = 266,
- - DT_OR = 267,
- - DT_BITS = 268,
- - DT_DEL_PROP = 269,
- - DT_DEL_NODE = 270,
- - DT_PROPNODENAME = 271,
- - DT_LITERAL = 272,
- - DT_CHAR_LITERAL = 273,
- - DT_BYTE = 274,
- - DT_STRING = 275,
- - DT_LABEL = 276,
- - DT_REF = 277,
- - DT_INCBIN = 278
- - };
- + /* Put the tokens into the symbol table, so that GDB and other debuggers
- + know about them. */
- + enum yytokentype {
- + DT_V1 = 258,
- + DT_PLUGIN = 259,
- + DT_MEMRESERVE = 260,
- + DT_LSHIFT = 261,
- + DT_RSHIFT = 262,
- + DT_LE = 263,
- + DT_GE = 264,
- + DT_EQ = 265,
- + DT_NE = 266,
- + DT_AND = 267,
- + DT_OR = 268,
- + DT_BITS = 269,
- + DT_DEL_PROP = 270,
- + DT_DEL_NODE = 271,
- + DT_PROPNODENAME = 272,
- + DT_LITERAL = 273,
- + DT_CHAR_LITERAL = 274,
- + DT_BYTE = 275,
- + DT_STRING = 276,
- + DT_LABEL = 277,
- + DT_REF = 278,
- + DT_INCBIN = 279
- + };
- #endif
-
- -/* Value type. */
- +
- +
- #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
- -typedef union YYSTYPE YYSTYPE;
- -union YYSTYPE
- +typedef union YYSTYPE
- {
- -#line 38 "dtc-parser.y" /* yacc.c:1909 */
- +
- +/* Line 2068 of yacc.c */
- +#line 39 "dtc-parser.y"
-
- char *propnodename;
- char *labelref;
- @@ -92,30 +87,32 @@ union YYSTYPE
- struct node *nodelist;
- struct reserve_info *re;
- uint64_t integer;
- + int is_plugin;
- +
- +
-
- -#line 97 "dtc-parser.tab.h" /* yacc.c:1909 */
- -};
- +/* Line 2068 of yacc.c */
- +#line 96 "dtc-parser.tab.h"
- +} YYSTYPE;
- # define YYSTYPE_IS_TRIVIAL 1
- +# define yystype YYSTYPE /* obsolescent; will be withdrawn */
- # define YYSTYPE_IS_DECLARED 1
- #endif
-
- -/* Location type. */
- +extern YYSTYPE yylval;
- +
- #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
- -typedef struct YYLTYPE YYLTYPE;
- -struct YYLTYPE
- +typedef struct YYLTYPE
- {
- int first_line;
- int first_column;
- int last_line;
- int last_column;
- -};
- +} YYLTYPE;
- +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
- # define YYLTYPE_IS_DECLARED 1
- # define YYLTYPE_IS_TRIVIAL 1
- #endif
-
- -
- -extern YYSTYPE yylval;
- extern YYLTYPE yylloc;
- -int yyparse (void);
-
- -#endif /* !YY_YY_DTC_PARSER_TAB_H_INCLUDED */
- --- a/scripts/dtc/dtc-parser.y
- +++ b/scripts/dtc/dtc-parser.y
- @@ -19,6 +19,7 @@
- */
- %{
- #include <stdio.h>
- +#include <inttypes.h>
-
- #include "dtc.h"
- #include "srcpos.h"
- @@ -52,9 +53,11 @@ extern bool treesource_error;
- struct node *nodelist;
- struct reserve_info *re;
- uint64_t integer;
- + int is_plugin;
- }
-
- %token DT_V1
- +%token DT_PLUGIN
- %token DT_MEMRESERVE
- %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR
- %token DT_BITS
- @@ -71,6 +74,7 @@ extern bool treesource_error;
-
- %type <data> propdata
- %type <data> propdataprefix
- +%type <is_plugin> plugindecl
- %type <re> memreserve
- %type <re> memreserves
- %type <array> arrayprefix
- @@ -101,10 +105,23 @@ extern bool treesource_error;
- %%
-
- sourcefile:
- - DT_V1 ';' memreserves devicetree
- + DT_V1 ';' plugindecl memreserves devicetree
- {
- - the_boot_info = build_boot_info($3, $4,
- - guess_boot_cpuid($4));
- + $5->is_plugin = $3;
- + $5->is_root = 1;
- + the_boot_info = build_boot_info($4, $5,
- + guess_boot_cpuid($5));
- + }
- + ;
- +
- +plugindecl:
- + /* empty */
- + {
- + $$ = 0;
- + }
- + | DT_PLUGIN ';'
- + {
- + $$ = 1;
- }
- ;
-
- --- a/scripts/dtc/dtc.c
- +++ b/scripts/dtc/dtc.c
- @@ -29,6 +29,7 @@ int reservenum; /* Number of memory res
- int minsize; /* Minimum blob size */
- int padsize; /* Additional padding to blob */
- int phandle_format = PHANDLE_BOTH; /* Use linux,phandle or phandle properties */
- +int symbol_fixup_support = 0;
-
- static void fill_fullpaths(struct node *tree, const char *prefix)
- {
- @@ -51,7 +52,7 @@ static void fill_fullpaths(struct node *
- #define FDT_VERSION(version) _FDT_VERSION(version)
- #define _FDT_VERSION(version) #version
- static const char usage_synopsis[] = "dtc [options] <input file>";
- -static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv";
- +static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv@";
- static struct option const usage_long_opts[] = {
- {"quiet", no_argument, NULL, 'q'},
- {"in-format", a_argument, NULL, 'I'},
- @@ -69,6 +70,7 @@ static struct option const usage_long_op
- {"phandle", a_argument, NULL, 'H'},
- {"warning", a_argument, NULL, 'W'},
- {"error", a_argument, NULL, 'E'},
- + {"symbols", a_argument, NULL, '@'},
- {"help", no_argument, NULL, 'h'},
- {"version", no_argument, NULL, 'v'},
- {NULL, no_argument, NULL, 0x0},
- @@ -99,6 +101,7 @@ static const char * const usage_opts_hel
- "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties",
- "\n\tEnable/disable warnings (prefix with \"no-\")",
- "\n\tEnable/disable errors (prefix with \"no-\")",
- + "\n\tSymbols and Fixups support",
- "\n\tPrint this help and exit",
- "\n\tPrint version and exit",
- NULL,
- @@ -186,7 +189,9 @@ int main(int argc, char *argv[])
- case 'E':
- parse_checks_option(false, true, optarg);
- break;
- -
- + case '@':
- + symbol_fixup_support = 1;
- + break;
- case 'h':
- usage(NULL);
- default:
- --- a/scripts/dtc/dtc.h
- +++ b/scripts/dtc/dtc.h
- @@ -54,6 +54,7 @@ extern int reservenum; /* Number of mem
- extern int minsize; /* Minimum blob size */
- extern int padsize; /* Additional padding to blob */
- extern int phandle_format; /* Use linux,phandle or phandle properties */
- +extern int symbol_fixup_support;/* enable symbols & fixup support */
-
- #define PHANDLE_LEGACY 0x1
- #define PHANDLE_EPAPR 0x2
- @@ -132,6 +133,25 @@ struct label {
- struct label *next;
- };
-
- +struct fixup_entry {
- + int offset;
- + struct node *node;
- + struct property *prop;
- + struct fixup_entry *next;
- +};
- +
- +struct fixup {
- + char *ref;
- + struct fixup_entry *entries;
- + struct fixup *next;
- +};
- +
- +struct symbol {
- + struct label *label;
- + struct node *node;
- + struct symbol *next;
- +};
- +
- struct property {
- bool deleted;
- char *name;
- @@ -158,6 +178,12 @@ struct node {
- int addr_cells, size_cells;
-
- struct label *labels;
- +
- + int is_root;
- + int is_plugin;
- + struct fixup *fixups;
- + struct symbol *symbols;
- + struct fixup_entry *local_fixups;
- };
-
- #define for_each_label_withdel(l0, l) \
- @@ -181,6 +207,18 @@ struct node {
- for_each_child_withdel(n, c) \
- if (!(c)->deleted)
-
- +#define for_each_fixup(n, f) \
- + for ((f) = (n)->fixups; (f); (f) = (f)->next)
- +
- +#define for_each_fixup_entry(f, fe) \
- + for ((fe) = (f)->entries; (fe); (fe) = (fe)->next)
- +
- +#define for_each_symbol(n, s) \
- + for ((s) = (n)->symbols; (s); (s) = (s)->next)
- +
- +#define for_each_local_fixup_entry(n, fe) \
- + for ((fe) = (n)->local_fixups; (fe); (fe) = (fe)->next)
- +
- void add_label(struct label **labels, char *label);
- void delete_labels(struct label **labels);
-
- --- a/scripts/dtc/flattree.c
- +++ b/scripts/dtc/flattree.c
- @@ -262,6 +262,12 @@ static void flatten_tree(struct node *tr
- struct property *prop;
- struct node *child;
- bool seen_name_prop = false;
- + struct symbol *sym;
- + struct fixup *f;
- + struct fixup_entry *fe;
- + char *name, *s;
- + const char *fullpath;
- + int namesz, nameoff, vallen;
-
- if (tree->deleted)
- return;
- @@ -276,8 +282,6 @@ static void flatten_tree(struct node *tr
- emit->align(etarget, sizeof(cell_t));
-
- for_each_property(tree, prop) {
- - int nameoff;
- -
- if (streq(prop->name, "name"))
- seen_name_prop = true;
-
- @@ -310,6 +314,139 @@ static void flatten_tree(struct node *tr
- flatten_tree(child, emit, etarget, strbuf, vi);
- }
-
- + if (!symbol_fixup_support)
- + goto no_symbols;
- +
- + /* add the symbol nodes (if any) */
- + if (tree->symbols) {
- +
- + emit->beginnode(etarget, NULL);
- + emit->string(etarget, "__symbols__", 0);
- + emit->align(etarget, sizeof(cell_t));
- +
- + for_each_symbol(tree, sym) {
- +
- + vallen = strlen(sym->node->fullpath);
- +
- + nameoff = stringtable_insert(strbuf, sym->label->label);
- +
- + emit->property(etarget, NULL);
- + emit->cell(etarget, vallen + 1);
- + emit->cell(etarget, nameoff);
- +
- + if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
- + emit->align(etarget, 8);
- +
- + emit->string(etarget, sym->node->fullpath,
- + strlen(sym->node->fullpath));
- + emit->align(etarget, sizeof(cell_t));
- + }
- +
- + emit->endnode(etarget, NULL);
- + }
- +
- + /* add the fixup nodes */
- + if (tree->fixups) {
- +
- + /* emit the external fixups */
- + emit->beginnode(etarget, NULL);
- + emit->string(etarget, "__fixups__", 0);
- + emit->align(etarget, sizeof(cell_t));
- +
- + for_each_fixup(tree, f) {
- +
- + namesz = 0;
- + for_each_fixup_entry(f, fe) {
- + fullpath = fe->node->fullpath;
- + if (fullpath[0] == '\0')
- + fullpath = "/";
- + namesz += strlen(fullpath) + 1;
- + namesz += strlen(fe->prop->name) + 1;
- + namesz += 32; /* space for :<number> + '\0' */
- + }
- +
- + name = xmalloc(namesz);
- +
- + s = name;
- + for_each_fixup_entry(f, fe) {
- + fullpath = fe->node->fullpath;
- + if (fullpath[0] == '\0')
- + fullpath = "/";
- + snprintf(s, name + namesz - s, "%s:%s:%d",
- + fullpath,
- + fe->prop->name, fe->offset);
- + s += strlen(s) + 1;
- + }
- +
- + nameoff = stringtable_insert(strbuf, f->ref);
- + vallen = s - name - 1;
- +
- + emit->property(etarget, NULL);
- + emit->cell(etarget, vallen + 1);
- + emit->cell(etarget, nameoff);
- +
- + if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
- + emit->align(etarget, 8);
- +
- + emit->string(etarget, name, vallen);
- + emit->align(etarget, sizeof(cell_t));
- +
- + free(name);
- + }
- +
- + emit->endnode(etarget, tree->labels);
- + }
- +
- + /* add the local fixup property */
- + if (tree->local_fixups) {
- +
- + /* emit the external fixups */
- + emit->beginnode(etarget, NULL);
- + emit->string(etarget, "__local_fixups__", 0);
- + emit->align(etarget, sizeof(cell_t));
- +
- + namesz = 0;
- + for_each_local_fixup_entry(tree, fe) {
- + fullpath = fe->node->fullpath;
- + if (fullpath[0] == '\0')
- + fullpath = "/";
- + namesz += strlen(fullpath) + 1;
- + namesz += strlen(fe->prop->name) + 1;
- + namesz += 32; /* space for :<number> + '\0' */
- + }
- +
- + name = xmalloc(namesz);
- +
- + s = name;
- + for_each_local_fixup_entry(tree, fe) {
- + fullpath = fe->node->fullpath;
- + if (fullpath[0] == '\0')
- + fullpath = "/";
- + snprintf(s, name + namesz - s, "%s:%s:%d",
- + fullpath, fe->prop->name,
- + fe->offset);
- + s += strlen(s) + 1;
- + }
- +
- + nameoff = stringtable_insert(strbuf, "fixup");
- + vallen = s - name - 1;
- +
- + emit->property(etarget, NULL);
- + emit->cell(etarget, vallen + 1);
- + emit->cell(etarget, nameoff);
- +
- + if ((vi->flags & FTF_VARALIGN) && vallen >= 8)
- + emit->align(etarget, 8);
- +
- + emit->string(etarget, name, vallen);
- + emit->align(etarget, sizeof(cell_t));
- +
- + free(name);
- +
- + emit->endnode(etarget, tree->labels);
- + }
- +
- +no_symbols:
- emit->endnode(etarget, tree->labels);
- }
-
- --- a/scripts/dtc/version_gen.h
- +++ b/scripts/dtc/version_gen.h
- @@ -1 +1 @@
- -#define DTC_VERSION "DTC 1.4.1-g9d3649bd"
- +#define DTC_VERSION "DTC 1.4.1-g9d3649bd-dirty"
|