lexer.c 730 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029
  1. /* Generated by Cython 3.2.2 */
  2. /* BEGIN: Cython Metadata
  3. {
  4. "distutils": {
  5. "name": "fontTools.feaLib.lexer",
  6. "sources": [
  7. "Lib/fontTools/feaLib/lexer.py"
  8. ]
  9. },
  10. "module_name": "fontTools.feaLib.lexer"
  11. }
  12. END: Cython Metadata */
  13. #ifndef PY_SSIZE_T_CLEAN
  14. #define PY_SSIZE_T_CLEAN
  15. #endif /* PY_SSIZE_T_CLEAN */
  16. /* InitLimitedAPI */
  17. #if defined(Py_LIMITED_API)
  18. #if !defined(CYTHON_LIMITED_API)
  19. #define CYTHON_LIMITED_API 1
  20. #endif
  21. #elif defined(CYTHON_LIMITED_API)
  22. #ifdef _MSC_VER
  23. #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  24. #else
  25. #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  26. #endif
  27. #endif
  28. #include "Python.h"
  29. #ifndef Py_PYTHON_H
  30. #error Python headers needed to compile C extensions, please install development version of Python.
  31. #elif PY_VERSION_HEX < 0x03080000
  32. #error Cython requires Python 3.8+.
  33. #else
  34. #define __PYX_ABI_VERSION "3_2_2"
  35. #define CYTHON_HEX_VERSION 0x030202F0
  36. #define CYTHON_FUTURE_DIVISION 1
  37. /* CModulePreamble */
  38. #include <stddef.h>
  39. #ifndef offsetof
  40. #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
  41. #endif
  42. #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  43. #ifndef __stdcall
  44. #define __stdcall
  45. #endif
  46. #ifndef __cdecl
  47. #define __cdecl
  48. #endif
  49. #ifndef __fastcall
  50. #define __fastcall
  51. #endif
  52. #endif
  53. #ifndef DL_IMPORT
  54. #define DL_IMPORT(t) t
  55. #endif
  56. #ifndef DL_EXPORT
  57. #define DL_EXPORT(t) t
  58. #endif
  59. #define __PYX_COMMA ,
  60. #ifndef PY_LONG_LONG
  61. #define PY_LONG_LONG LONG_LONG
  62. #endif
  63. #ifndef Py_HUGE_VAL
  64. #define Py_HUGE_VAL HUGE_VAL
  65. #endif
  66. #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
  67. #if defined(GRAALVM_PYTHON)
  68. /* For very preliminary testing purposes. Most variables are set the same as PyPy.
  69. The existence of this section does not imply that anything works or is even tested */
  70. #define CYTHON_COMPILING_IN_PYPY 0
  71. #define CYTHON_COMPILING_IN_CPYTHON 0
  72. #define CYTHON_COMPILING_IN_LIMITED_API 0
  73. #define CYTHON_COMPILING_IN_GRAAL 1
  74. #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  75. #undef CYTHON_USE_TYPE_SLOTS
  76. #define CYTHON_USE_TYPE_SLOTS 0
  77. #undef CYTHON_USE_TYPE_SPECS
  78. #define CYTHON_USE_TYPE_SPECS 0
  79. #undef CYTHON_USE_PYTYPE_LOOKUP
  80. #define CYTHON_USE_PYTYPE_LOOKUP 0
  81. #undef CYTHON_USE_PYLIST_INTERNALS
  82. #define CYTHON_USE_PYLIST_INTERNALS 0
  83. #undef CYTHON_USE_UNICODE_INTERNALS
  84. #define CYTHON_USE_UNICODE_INTERNALS 0
  85. #undef CYTHON_USE_UNICODE_WRITER
  86. #define CYTHON_USE_UNICODE_WRITER 0
  87. #undef CYTHON_USE_PYLONG_INTERNALS
  88. #define CYTHON_USE_PYLONG_INTERNALS 0
  89. #undef CYTHON_AVOID_BORROWED_REFS
  90. #define CYTHON_AVOID_BORROWED_REFS 1
  91. #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  92. #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  93. #undef CYTHON_ASSUME_SAFE_MACROS
  94. #define CYTHON_ASSUME_SAFE_MACROS 0
  95. #undef CYTHON_ASSUME_SAFE_SIZE
  96. #define CYTHON_ASSUME_SAFE_SIZE 0
  97. #undef CYTHON_UNPACK_METHODS
  98. #define CYTHON_UNPACK_METHODS 0
  99. #undef CYTHON_FAST_THREAD_STATE
  100. #define CYTHON_FAST_THREAD_STATE 0
  101. #undef CYTHON_FAST_GIL
  102. #define CYTHON_FAST_GIL 0
  103. #undef CYTHON_METH_FASTCALL
  104. #define CYTHON_METH_FASTCALL 0
  105. #undef CYTHON_FAST_PYCALL
  106. #define CYTHON_FAST_PYCALL 0
  107. #ifndef CYTHON_PEP487_INIT_SUBCLASS
  108. #define CYTHON_PEP487_INIT_SUBCLASS 1
  109. #endif
  110. #undef CYTHON_PEP489_MULTI_PHASE_INIT
  111. #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  112. #undef CYTHON_USE_MODULE_STATE
  113. #define CYTHON_USE_MODULE_STATE 0
  114. #undef CYTHON_USE_SYS_MONITORING
  115. #define CYTHON_USE_SYS_MONITORING 0
  116. #undef CYTHON_USE_TP_FINALIZE
  117. #define CYTHON_USE_TP_FINALIZE 0
  118. #undef CYTHON_USE_AM_SEND
  119. #define CYTHON_USE_AM_SEND 0
  120. #undef CYTHON_USE_DICT_VERSIONS
  121. #define CYTHON_USE_DICT_VERSIONS 0
  122. #undef CYTHON_USE_EXC_INFO_STACK
  123. #define CYTHON_USE_EXC_INFO_STACK 1
  124. #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
  125. #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  126. #endif
  127. #undef CYTHON_USE_FREELISTS
  128. #define CYTHON_USE_FREELISTS 0
  129. #undef CYTHON_IMMORTAL_CONSTANTS
  130. #define CYTHON_IMMORTAL_CONSTANTS 0
  131. #elif defined(PYPY_VERSION)
  132. #define CYTHON_COMPILING_IN_PYPY 1
  133. #define CYTHON_COMPILING_IN_CPYTHON 0
  134. #define CYTHON_COMPILING_IN_LIMITED_API 0
  135. #define CYTHON_COMPILING_IN_GRAAL 0
  136. #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  137. #undef CYTHON_USE_TYPE_SLOTS
  138. #define CYTHON_USE_TYPE_SLOTS 1
  139. #ifndef CYTHON_USE_TYPE_SPECS
  140. #define CYTHON_USE_TYPE_SPECS 0
  141. #endif
  142. #undef CYTHON_USE_PYTYPE_LOOKUP
  143. #define CYTHON_USE_PYTYPE_LOOKUP 0
  144. #undef CYTHON_USE_PYLIST_INTERNALS
  145. #define CYTHON_USE_PYLIST_INTERNALS 0
  146. #undef CYTHON_USE_UNICODE_INTERNALS
  147. #define CYTHON_USE_UNICODE_INTERNALS 0
  148. #undef CYTHON_USE_UNICODE_WRITER
  149. #define CYTHON_USE_UNICODE_WRITER 0
  150. #undef CYTHON_USE_PYLONG_INTERNALS
  151. #define CYTHON_USE_PYLONG_INTERNALS 0
  152. #undef CYTHON_AVOID_BORROWED_REFS
  153. #define CYTHON_AVOID_BORROWED_REFS 1
  154. #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  155. #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  156. #undef CYTHON_ASSUME_SAFE_MACROS
  157. #define CYTHON_ASSUME_SAFE_MACROS 0
  158. #ifndef CYTHON_ASSUME_SAFE_SIZE
  159. #define CYTHON_ASSUME_SAFE_SIZE 1
  160. #endif
  161. #undef CYTHON_UNPACK_METHODS
  162. #define CYTHON_UNPACK_METHODS 0
  163. #undef CYTHON_FAST_THREAD_STATE
  164. #define CYTHON_FAST_THREAD_STATE 0
  165. #undef CYTHON_FAST_GIL
  166. #define CYTHON_FAST_GIL 0
  167. #undef CYTHON_METH_FASTCALL
  168. #define CYTHON_METH_FASTCALL 0
  169. #undef CYTHON_FAST_PYCALL
  170. #define CYTHON_FAST_PYCALL 0
  171. #ifndef CYTHON_PEP487_INIT_SUBCLASS
  172. #define CYTHON_PEP487_INIT_SUBCLASS 1
  173. #endif
  174. #if PY_VERSION_HEX < 0x03090000
  175. #undef CYTHON_PEP489_MULTI_PHASE_INIT
  176. #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  177. #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
  178. #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  179. #endif
  180. #undef CYTHON_USE_MODULE_STATE
  181. #define CYTHON_USE_MODULE_STATE 0
  182. #undef CYTHON_USE_SYS_MONITORING
  183. #define CYTHON_USE_SYS_MONITORING 0
  184. #ifndef CYTHON_USE_TP_FINALIZE
  185. #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  186. #endif
  187. #undef CYTHON_USE_AM_SEND
  188. #define CYTHON_USE_AM_SEND 0
  189. #undef CYTHON_USE_DICT_VERSIONS
  190. #define CYTHON_USE_DICT_VERSIONS 0
  191. #undef CYTHON_USE_EXC_INFO_STACK
  192. #define CYTHON_USE_EXC_INFO_STACK 0
  193. #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
  194. #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
  195. #endif
  196. #undef CYTHON_USE_FREELISTS
  197. #define CYTHON_USE_FREELISTS 0
  198. #undef CYTHON_IMMORTAL_CONSTANTS
  199. #define CYTHON_IMMORTAL_CONSTANTS 0
  200. #elif defined(CYTHON_LIMITED_API)
  201. #ifdef Py_LIMITED_API
  202. #undef __PYX_LIMITED_VERSION_HEX
  203. #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  204. #endif
  205. #define CYTHON_COMPILING_IN_PYPY 0
  206. #define CYTHON_COMPILING_IN_CPYTHON 0
  207. #define CYTHON_COMPILING_IN_LIMITED_API 1
  208. #define CYTHON_COMPILING_IN_GRAAL 0
  209. #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  210. #undef CYTHON_USE_TYPE_SLOTS
  211. #define CYTHON_USE_TYPE_SLOTS 0
  212. #undef CYTHON_USE_TYPE_SPECS
  213. #define CYTHON_USE_TYPE_SPECS 1
  214. #undef CYTHON_USE_PYTYPE_LOOKUP
  215. #define CYTHON_USE_PYTYPE_LOOKUP 0
  216. #undef CYTHON_USE_PYLIST_INTERNALS
  217. #define CYTHON_USE_PYLIST_INTERNALS 0
  218. #undef CYTHON_USE_UNICODE_INTERNALS
  219. #define CYTHON_USE_UNICODE_INTERNALS 0
  220. #ifndef CYTHON_USE_UNICODE_WRITER
  221. #define CYTHON_USE_UNICODE_WRITER 0
  222. #endif
  223. #undef CYTHON_USE_PYLONG_INTERNALS
  224. #define CYTHON_USE_PYLONG_INTERNALS 0
  225. #ifndef CYTHON_AVOID_BORROWED_REFS
  226. #define CYTHON_AVOID_BORROWED_REFS 0
  227. #endif
  228. #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  229. #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  230. #endif
  231. #undef CYTHON_ASSUME_SAFE_MACROS
  232. #define CYTHON_ASSUME_SAFE_MACROS 0
  233. #undef CYTHON_ASSUME_SAFE_SIZE
  234. #define CYTHON_ASSUME_SAFE_SIZE 0
  235. #undef CYTHON_UNPACK_METHODS
  236. #define CYTHON_UNPACK_METHODS 0
  237. #undef CYTHON_FAST_THREAD_STATE
  238. #define CYTHON_FAST_THREAD_STATE 0
  239. #undef CYTHON_FAST_GIL
  240. #define CYTHON_FAST_GIL 0
  241. #undef CYTHON_METH_FASTCALL
  242. #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  243. #undef CYTHON_FAST_PYCALL
  244. #define CYTHON_FAST_PYCALL 0
  245. #ifndef CYTHON_PEP487_INIT_SUBCLASS
  246. #define CYTHON_PEP487_INIT_SUBCLASS 1
  247. #endif
  248. #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
  249. #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  250. #endif
  251. #ifndef CYTHON_USE_MODULE_STATE
  252. #define CYTHON_USE_MODULE_STATE 0
  253. #endif
  254. #undef CYTHON_USE_SYS_MONITORING
  255. #define CYTHON_USE_SYS_MONITORING 0
  256. #ifndef CYTHON_USE_TP_FINALIZE
  257. #define CYTHON_USE_TP_FINALIZE 0
  258. #endif
  259. #ifndef CYTHON_USE_AM_SEND
  260. #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  261. #endif
  262. #undef CYTHON_USE_DICT_VERSIONS
  263. #define CYTHON_USE_DICT_VERSIONS 0
  264. #undef CYTHON_USE_EXC_INFO_STACK
  265. #define CYTHON_USE_EXC_INFO_STACK 0
  266. #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
  267. #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  268. #endif
  269. #ifndef CYTHON_USE_FREELISTS
  270. #define CYTHON_USE_FREELISTS 1
  271. #endif
  272. #undef CYTHON_IMMORTAL_CONSTANTS
  273. #define CYTHON_IMMORTAL_CONSTANTS 0
  274. #else
  275. #define CYTHON_COMPILING_IN_PYPY 0
  276. #define CYTHON_COMPILING_IN_CPYTHON 1
  277. #define CYTHON_COMPILING_IN_LIMITED_API 0
  278. #define CYTHON_COMPILING_IN_GRAAL 0
  279. #ifdef Py_GIL_DISABLED
  280. #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  281. #else
  282. #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  283. #endif
  284. #if PY_VERSION_HEX < 0x030A0000
  285. #undef CYTHON_USE_TYPE_SLOTS
  286. #define CYTHON_USE_TYPE_SLOTS 1
  287. #elif !defined(CYTHON_USE_TYPE_SLOTS)
  288. #define CYTHON_USE_TYPE_SLOTS 1
  289. #endif
  290. #ifndef CYTHON_USE_TYPE_SPECS
  291. #define CYTHON_USE_TYPE_SPECS 0
  292. #endif
  293. #ifndef CYTHON_USE_PYTYPE_LOOKUP
  294. #define CYTHON_USE_PYTYPE_LOOKUP 1
  295. #endif
  296. #ifndef CYTHON_USE_PYLONG_INTERNALS
  297. #define CYTHON_USE_PYLONG_INTERNALS 1
  298. #endif
  299. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  300. #undef CYTHON_USE_PYLIST_INTERNALS
  301. #define CYTHON_USE_PYLIST_INTERNALS 0
  302. #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
  303. #define CYTHON_USE_PYLIST_INTERNALS 1
  304. #endif
  305. #ifndef CYTHON_USE_UNICODE_INTERNALS
  306. #define CYTHON_USE_UNICODE_INTERNALS 1
  307. #endif
  308. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
  309. #undef CYTHON_USE_UNICODE_WRITER
  310. #define CYTHON_USE_UNICODE_WRITER 0
  311. #elif !defined(CYTHON_USE_UNICODE_WRITER)
  312. #define CYTHON_USE_UNICODE_WRITER 1
  313. #endif
  314. #ifndef CYTHON_AVOID_BORROWED_REFS
  315. #define CYTHON_AVOID_BORROWED_REFS 0
  316. #endif
  317. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  318. #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  319. #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  320. #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
  321. #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  322. #endif
  323. #ifndef CYTHON_ASSUME_SAFE_MACROS
  324. #define CYTHON_ASSUME_SAFE_MACROS 1
  325. #endif
  326. #ifndef CYTHON_ASSUME_SAFE_SIZE
  327. #define CYTHON_ASSUME_SAFE_SIZE 1
  328. #endif
  329. #ifndef CYTHON_UNPACK_METHODS
  330. #define CYTHON_UNPACK_METHODS 1
  331. #endif
  332. #ifndef CYTHON_FAST_THREAD_STATE
  333. #define CYTHON_FAST_THREAD_STATE 1
  334. #endif
  335. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  336. #undef CYTHON_FAST_GIL
  337. #define CYTHON_FAST_GIL 0
  338. #elif !defined(CYTHON_FAST_GIL)
  339. #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  340. #endif
  341. #ifndef CYTHON_METH_FASTCALL
  342. #define CYTHON_METH_FASTCALL 1
  343. #endif
  344. #ifndef CYTHON_FAST_PYCALL
  345. #define CYTHON_FAST_PYCALL 1
  346. #endif
  347. #ifndef CYTHON_PEP487_INIT_SUBCLASS
  348. #define CYTHON_PEP487_INIT_SUBCLASS 1
  349. #endif
  350. #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
  351. #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  352. #endif
  353. #ifndef CYTHON_USE_MODULE_STATE
  354. #define CYTHON_USE_MODULE_STATE 0
  355. #endif
  356. #ifndef CYTHON_USE_SYS_MONITORING
  357. #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  358. #endif
  359. #ifndef CYTHON_USE_TP_FINALIZE
  360. #define CYTHON_USE_TP_FINALIZE 1
  361. #endif
  362. #ifndef CYTHON_USE_AM_SEND
  363. #define CYTHON_USE_AM_SEND 1
  364. #endif
  365. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  366. #undef CYTHON_USE_DICT_VERSIONS
  367. #define CYTHON_USE_DICT_VERSIONS 0
  368. #elif !defined(CYTHON_USE_DICT_VERSIONS)
  369. #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  370. #endif
  371. #ifndef CYTHON_USE_EXC_INFO_STACK
  372. #define CYTHON_USE_EXC_INFO_STACK 1
  373. #endif
  374. #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
  375. #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  376. #endif
  377. #ifndef CYTHON_USE_FREELISTS
  378. #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  379. #endif
  380. #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
  381. #undef CYTHON_IMMORTAL_CONSTANTS
  382. #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work
  383. #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
  384. #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  385. #endif
  386. #endif
  387. #ifndef CYTHON_COMPRESS_STRINGS
  388. #define CYTHON_COMPRESS_STRINGS 1
  389. #endif
  390. #ifndef CYTHON_FAST_PYCCALL
  391. #define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL
  392. #endif
  393. #ifndef CYTHON_VECTORCALL
  394. #if CYTHON_COMPILING_IN_LIMITED_API
  395. #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  396. #else
  397. #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL)
  398. #endif
  399. #endif
  400. #if CYTHON_USE_PYLONG_INTERNALS
  401. #undef SHIFT
  402. #undef BASE
  403. #undef MASK
  404. #ifdef SIZEOF_VOID_P
  405. enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  406. #endif
  407. #endif
  408. #ifndef __has_attribute
  409. #define __has_attribute(x) 0
  410. #endif
  411. #ifndef __has_cpp_attribute
  412. #define __has_cpp_attribute(x) 0
  413. #endif
  414. #ifndef CYTHON_RESTRICT
  415. #if defined(__GNUC__)
  416. #define CYTHON_RESTRICT __restrict__
  417. #elif defined(_MSC_VER) && _MSC_VER >= 1400
  418. #define CYTHON_RESTRICT __restrict
  419. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  420. #define CYTHON_RESTRICT restrict
  421. #else
  422. #define CYTHON_RESTRICT
  423. #endif
  424. #endif
  425. #ifndef CYTHON_UNUSED
  426. #if defined(__cplusplus)
  427. /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
  428. * but leads to warnings with -pedantic, since it is a C++17 feature */
  429. #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
  430. #if __has_cpp_attribute(maybe_unused)
  431. #define CYTHON_UNUSED [[maybe_unused]]
  432. #endif
  433. #endif
  434. #endif
  435. #endif
  436. #ifndef CYTHON_UNUSED
  437. # if defined(__GNUC__)
  438. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  439. # define CYTHON_UNUSED __attribute__ ((__unused__))
  440. # else
  441. # define CYTHON_UNUSED
  442. # endif
  443. # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
  444. # define CYTHON_UNUSED __attribute__ ((__unused__))
  445. # else
  446. # define CYTHON_UNUSED
  447. # endif
  448. #endif
  449. #ifndef CYTHON_UNUSED_VAR
  450. # if defined(__cplusplus)
  451. template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
  452. # else
  453. # define CYTHON_UNUSED_VAR(x) (void)(x)
  454. # endif
  455. #endif
  456. #ifndef CYTHON_MAYBE_UNUSED_VAR
  457. #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
  458. #endif
  459. #ifndef CYTHON_NCP_UNUSED
  460. # if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  461. # define CYTHON_NCP_UNUSED
  462. # else
  463. # define CYTHON_NCP_UNUSED CYTHON_UNUSED
  464. # endif
  465. #endif
  466. #ifndef CYTHON_USE_CPP_STD_MOVE
  467. #if defined(__cplusplus) && (\
  468. __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
  469. #define CYTHON_USE_CPP_STD_MOVE 1
  470. #else
  471. #define CYTHON_USE_CPP_STD_MOVE 0
  472. #endif
  473. #endif
  474. #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
  475. #include <stdint.h>
  476. typedef uintptr_t __pyx_uintptr_t;
  477. #ifndef CYTHON_FALLTHROUGH
  478. #if defined(__cplusplus)
  479. /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
  480. * but leads to warnings with -pedantic, since it is a C++17 feature */
  481. #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
  482. #if __has_cpp_attribute(fallthrough)
  483. #define CYTHON_FALLTHROUGH [[fallthrough]]
  484. #endif
  485. #endif
  486. #ifndef CYTHON_FALLTHROUGH
  487. #if __has_cpp_attribute(clang::fallthrough)
  488. #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
  489. #elif __has_cpp_attribute(gnu::fallthrough)
  490. #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
  491. #endif
  492. #endif
  493. #endif
  494. #ifndef CYTHON_FALLTHROUGH
  495. #if __has_attribute(fallthrough)
  496. #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
  497. #else
  498. #define CYTHON_FALLTHROUGH
  499. #endif
  500. #endif
  501. #if defined(__clang__) && defined(__apple_build_version__)
  502. #if __apple_build_version__ < 7000000
  503. #undef CYTHON_FALLTHROUGH
  504. #define CYTHON_FALLTHROUGH
  505. #endif
  506. #endif
  507. #endif
  508. #ifndef Py_UNREACHABLE
  509. #define Py_UNREACHABLE() assert(0); abort()
  510. #endif
  511. #ifdef __cplusplus
  512. template <typename T>
  513. struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  514. #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
  515. #else
  516. #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
  517. #endif
  518. #if CYTHON_COMPILING_IN_PYPY == 1
  519. #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000)
  520. #else
  521. #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000)
  522. #endif
  523. #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
  524. /* CInitCode */
  525. #ifndef CYTHON_INLINE
  526. #if defined(__clang__)
  527. #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  528. #elif defined(__GNUC__)
  529. #define CYTHON_INLINE __inline__
  530. #elif defined(_MSC_VER)
  531. #define CYTHON_INLINE __inline
  532. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  533. #define CYTHON_INLINE inline
  534. #else
  535. #define CYTHON_INLINE
  536. #endif
  537. #endif
  538. /* PythonCompatibility */
  539. #define __PYX_BUILD_PY_SSIZE_T "n"
  540. #define CYTHON_FORMAT_SSIZE_T "z"
  541. #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  542. #define __Pyx_DefaultClassType PyType_Type
  543. #if CYTHON_COMPILING_IN_LIMITED_API
  544. #ifndef CO_OPTIMIZED
  545. static int CO_OPTIMIZED;
  546. #endif
  547. #ifndef CO_NEWLOCALS
  548. static int CO_NEWLOCALS;
  549. #endif
  550. #ifndef CO_VARARGS
  551. static int CO_VARARGS;
  552. #endif
  553. #ifndef CO_VARKEYWORDS
  554. static int CO_VARKEYWORDS;
  555. #endif
  556. #ifndef CO_ASYNC_GENERATOR
  557. static int CO_ASYNC_GENERATOR;
  558. #endif
  559. #ifndef CO_GENERATOR
  560. static int CO_GENERATOR;
  561. #endif
  562. #ifndef CO_COROUTINE
  563. static int CO_COROUTINE;
  564. #endif
  565. #else
  566. #ifndef CO_COROUTINE
  567. #define CO_COROUTINE 0x80
  568. #endif
  569. #ifndef CO_ASYNC_GENERATOR
  570. #define CO_ASYNC_GENERATOR 0x200
  571. #endif
  572. #endif
  573. static int __Pyx_init_co_variables(void);
  574. #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  575. #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
  576. #else
  577. #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
  578. #endif
  579. #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  580. #define __Pyx_Py_Is(x, y) Py_Is(x, y)
  581. #else
  582. #define __Pyx_Py_Is(x, y) ((x) == (y))
  583. #endif
  584. #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  585. #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
  586. #else
  587. #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
  588. #endif
  589. #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  590. #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
  591. #else
  592. #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
  593. #endif
  594. #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  595. #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
  596. #else
  597. #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
  598. #endif
  599. #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
  600. #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  601. #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
  602. #else
  603. #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
  604. #endif
  605. #ifndef Py_TPFLAGS_CHECKTYPES
  606. #define Py_TPFLAGS_CHECKTYPES 0
  607. #endif
  608. #ifndef Py_TPFLAGS_HAVE_INDEX
  609. #define Py_TPFLAGS_HAVE_INDEX 0
  610. #endif
  611. #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  612. #define Py_TPFLAGS_HAVE_NEWBUFFER 0
  613. #endif
  614. #ifndef Py_TPFLAGS_HAVE_FINALIZE
  615. #define Py_TPFLAGS_HAVE_FINALIZE 0
  616. #endif
  617. #ifndef Py_TPFLAGS_SEQUENCE
  618. #define Py_TPFLAGS_SEQUENCE 0
  619. #endif
  620. #ifndef Py_TPFLAGS_MAPPING
  621. #define Py_TPFLAGS_MAPPING 0
  622. #endif
  623. #ifndef Py_TPFLAGS_IMMUTABLETYPE
  624. #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
  625. #endif
  626. #ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  627. #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
  628. #endif
  629. #ifndef METH_STACKLESS
  630. #define METH_STACKLESS 0
  631. #endif
  632. #ifndef METH_FASTCALL
  633. #ifndef METH_FASTCALL
  634. #define METH_FASTCALL 0x80
  635. #endif
  636. typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  637. typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
  638. Py_ssize_t nargs, PyObject *kwnames);
  639. #else
  640. #if PY_VERSION_HEX >= 0x030d00A4
  641. # define __Pyx_PyCFunctionFast PyCFunctionFast
  642. # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  643. #else
  644. # define __Pyx_PyCFunctionFast _PyCFunctionFast
  645. # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  646. #endif
  647. #endif
  648. #if CYTHON_METH_FASTCALL
  649. #define __Pyx_METH_FASTCALL METH_FASTCALL
  650. #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  651. #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
  652. #else
  653. #define __Pyx_METH_FASTCALL METH_VARARGS
  654. #define __Pyx_PyCFunction_FastCall PyCFunction
  655. #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
  656. #endif
  657. #if CYTHON_VECTORCALL
  658. #define __pyx_vectorcallfunc vectorcallfunc
  659. #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
  660. #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
  661. #else
  662. #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
  663. #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
  664. #endif
  665. #if PY_VERSION_HEX >= 0x030900B1
  666. #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
  667. #else
  668. #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func)
  669. #endif
  670. #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
  671. #if CYTHON_COMPILING_IN_CPYTHON
  672. #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
  673. #elif !CYTHON_COMPILING_IN_LIMITED_API
  674. #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
  675. #endif
  676. #if CYTHON_COMPILING_IN_CPYTHON
  677. #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
  678. static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
  679. return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
  680. }
  681. #endif
  682. static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
  683. #if CYTHON_COMPILING_IN_LIMITED_API
  684. return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
  685. #else
  686. return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
  687. #endif
  688. }
  689. #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
  690. #if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  691. #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
  692. typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
  693. #else
  694. #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
  695. #define __Pyx_PyCMethod PyCMethod
  696. #endif
  697. #ifndef METH_METHOD
  698. #define METH_METHOD 0x200
  699. #endif
  700. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  701. #define PyObject_Malloc(s) PyMem_Malloc(s)
  702. #define PyObject_Free(p) PyMem_Free(p)
  703. #define PyObject_Realloc(p) PyMem_Realloc(p)
  704. #endif
  705. #if CYTHON_COMPILING_IN_LIMITED_API
  706. #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
  707. #elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  708. #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
  709. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
  710. #elif CYTHON_COMPILING_IN_GRAAL
  711. #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
  712. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
  713. #else
  714. #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
  715. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
  716. #endif
  717. #if CYTHON_COMPILING_IN_LIMITED_API
  718. #define __Pyx_PyThreadState_Current PyThreadState_Get()
  719. #elif !CYTHON_FAST_THREAD_STATE
  720. #define __Pyx_PyThreadState_Current PyThreadState_GET()
  721. #elif PY_VERSION_HEX >= 0x030d00A1
  722. #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
  723. #else
  724. #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
  725. #endif
  726. #if CYTHON_USE_MODULE_STATE
  727. static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
  728. {
  729. void *result;
  730. result = PyModule_GetState(op);
  731. if (!result)
  732. Py_FatalError("Couldn't find the module state");
  733. return result;
  734. }
  735. #define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
  736. #else
  737. #define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
  738. #endif
  739. #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
  740. #define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
  741. #define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
  742. #define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
  743. #if CYTHON_USE_TYPE_SLOTS
  744. #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
  745. #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  746. #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  747. #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
  748. #else
  749. #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
  750. #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
  751. ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
  752. (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
  753. __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  754. #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  755. #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
  756. #endif
  757. #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
  758. #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
  759. #else
  760. #define __Pyx_PyDict_NewPresized(n) PyDict_New()
  761. #endif
  762. #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
  763. #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
  764. #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
  765. #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
  766. static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
  767. PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
  768. if (res == NULL) PyErr_Clear();
  769. return res;
  770. }
  771. #elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
  772. #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
  773. #define __Pyx_PyDict_GetItemStr PyDict_GetItem
  774. #else
  775. static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
  776. #if CYTHON_COMPILING_IN_PYPY
  777. return PyDict_GetItem(dict, name);
  778. #else
  779. PyDictEntry *ep;
  780. PyDictObject *mp = (PyDictObject*) dict;
  781. long hash = ((PyStringObject *) name)->ob_shash;
  782. assert(hash != -1);
  783. ep = (mp->ma_lookup)(mp, name, hash);
  784. if (ep == NULL) {
  785. return NULL;
  786. }
  787. return ep->me_value;
  788. #endif
  789. }
  790. #define __Pyx_PyDict_GetItemStr PyDict_GetItem
  791. #endif
  792. #if CYTHON_USE_TYPE_SLOTS
  793. #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
  794. #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  795. #else
  796. #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
  797. #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
  798. #endif
  799. #define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
  800. #if CYTHON_USE_TYPE_SPECS
  801. #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
  802. PyTypeObject *type = Py_TYPE((PyObject*)obj);\
  803. assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
  804. PyObject_GC_Del(obj);\
  805. Py_DECREF(type);\
  806. }
  807. #else
  808. #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
  809. #endif
  810. #if CYTHON_COMPILING_IN_LIMITED_API
  811. #define __Pyx_PyUnicode_READY(op) (0)
  812. #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  813. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
  814. #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
  815. #define __Pyx_PyUnicode_DATA(u) ((void*)u)
  816. #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  817. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
  818. #else
  819. #if PY_VERSION_HEX >= 0x030C0000
  820. #define __Pyx_PyUnicode_READY(op) (0)
  821. #else
  822. #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
  823. 0 : _PyUnicode_Ready((PyObject *)(op)))
  824. #endif
  825. #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  826. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
  827. #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
  828. #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
  829. #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
  830. #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  831. #if PY_VERSION_HEX >= 0x030C0000
  832. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
  833. #else
  834. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
  835. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
  836. #else
  837. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  838. #endif
  839. #endif
  840. #endif
  841. #if CYTHON_COMPILING_IN_PYPY
  842. #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
  843. #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
  844. #else
  845. #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
  846. #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
  847. PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
  848. #endif
  849. #if CYTHON_COMPILING_IN_PYPY
  850. #if !defined(PyUnicode_DecodeUnicodeEscape)
  851. #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
  852. #endif
  853. #if !defined(PyUnicode_Contains)
  854. #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
  855. #endif
  856. #if !defined(PyByteArray_Check)
  857. #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
  858. #endif
  859. #if !defined(PyObject_Format)
  860. #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
  861. #endif
  862. #endif
  863. #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
  864. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  865. #define __Pyx_PySequence_ListKeepNew(obj)\
  866. (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
  867. #elif CYTHON_COMPILING_IN_CPYTHON
  868. #define __Pyx_PySequence_ListKeepNew(obj)\
  869. (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
  870. #else
  871. #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
  872. #endif
  873. #ifndef PySet_CheckExact
  874. #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type)
  875. #endif
  876. #if PY_VERSION_HEX >= 0x030900A4
  877. #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  878. #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
  879. #else
  880. #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  881. #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
  882. #endif
  883. enum __Pyx_ReferenceSharing {
  884. __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  885. __Pyx_ReferenceSharing_OwnStrongReference,
  886. __Pyx_ReferenceSharing_FunctionArgument,
  887. __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
  888. };
  889. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
  890. #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
  891. (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
  892. (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
  893. (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
  894. #elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
  895. #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
  896. #else
  897. #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
  898. #endif
  899. #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  900. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  901. #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  902. #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  903. #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  904. #else
  905. #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  906. #endif
  907. #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  908. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  909. #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  910. #else
  911. #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  912. #endif
  913. #else
  914. #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
  915. #endif
  916. #if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  917. #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
  918. __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
  919. #else
  920. #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
  921. #endif
  922. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  923. #define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
  924. #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  925. static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  926. *result = PyObject_GetItem(dict, key);
  927. if (*result == NULL) {
  928. if (PyErr_ExceptionMatches(PyExc_KeyError)) {
  929. PyErr_Clear();
  930. return 0;
  931. }
  932. return -1;
  933. }
  934. return 1;
  935. }
  936. #else
  937. static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  938. *result = PyDict_GetItemWithError(dict, key);
  939. if (*result == NULL) {
  940. return PyErr_Occurred() ? -1 : 0;
  941. }
  942. Py_INCREF(*result);
  943. return 1;
  944. }
  945. #endif
  946. #if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  947. #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj)
  948. #else
  949. #define __Pyx_VISIT_CONST(obj)
  950. #endif
  951. #if CYTHON_ASSUME_SAFE_MACROS
  952. #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  953. #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
  954. #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  955. #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  956. #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  957. #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
  958. #else
  959. #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  960. #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
  961. #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  962. #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  963. #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  964. #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
  965. #endif
  966. #if CYTHON_ASSUME_SAFE_SIZE
  967. #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  968. #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  969. #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  970. #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  971. #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  972. #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
  973. #else
  974. #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  975. #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  976. #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  977. #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  978. #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  979. #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
  980. #endif
  981. #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  982. #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  983. #endif
  984. #define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
  985. #define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t
  986. #if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
  987. #define __Pyx_PySendResult PySendResult
  988. #else
  989. typedef enum {
  990. PYGEN_RETURN = 0,
  991. PYGEN_ERROR = -1,
  992. PYGEN_NEXT = 1,
  993. } __Pyx_PySendResult;
  994. #endif
  995. #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  996. typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
  997. #else
  998. #define __Pyx_pyiter_sendfunc sendfunc
  999. #endif
  1000. #if !CYTHON_USE_AM_SEND
  1001. #define __PYX_HAS_PY_AM_SEND 0
  1002. #elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
  1003. #define __PYX_HAS_PY_AM_SEND 1
  1004. #else
  1005. #define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation
  1006. #endif
  1007. #if __PYX_HAS_PY_AM_SEND < 2
  1008. #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
  1009. #else
  1010. typedef struct {
  1011. unaryfunc am_await;
  1012. unaryfunc am_aiter;
  1013. unaryfunc am_anext;
  1014. __Pyx_pyiter_sendfunc am_send;
  1015. } __Pyx_PyAsyncMethodsStruct;
  1016. #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
  1017. #endif
  1018. #if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
  1019. #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
  1020. #else
  1021. #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
  1022. #endif
  1023. #if PY_VERSION_HEX >= 0x03090000
  1024. #define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
  1025. #else
  1026. #define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
  1027. #endif
  1028. #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
  1029. #ifdef __cplusplus
  1030. extern "C"
  1031. #endif
  1032. PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
  1033. #endif
  1034. #if CYTHON_COMPILING_IN_LIMITED_API
  1035. static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
  1036. int value;
  1037. PyObject *py_value = PyObject_GetAttrString(inspect, name);
  1038. if (!py_value) return 0;
  1039. value = (int) PyLong_AsLong(py_value);
  1040. Py_DECREF(py_value);
  1041. *write_to = value;
  1042. return value != -1 || !PyErr_Occurred();
  1043. }
  1044. static int __Pyx_init_co_variables(void) {
  1045. PyObject *inspect;
  1046. int result;
  1047. inspect = PyImport_ImportModule("inspect");
  1048. result =
  1049. #if !defined(CO_OPTIMIZED)
  1050. __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
  1051. #endif
  1052. #if !defined(CO_NEWLOCALS)
  1053. __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
  1054. #endif
  1055. #if !defined(CO_VARARGS)
  1056. __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
  1057. #endif
  1058. #if !defined(CO_VARKEYWORDS)
  1059. __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
  1060. #endif
  1061. #if !defined(CO_ASYNC_GENERATOR)
  1062. __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
  1063. #endif
  1064. #if !defined(CO_GENERATOR)
  1065. __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
  1066. #endif
  1067. #if !defined(CO_COROUTINE)
  1068. __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
  1069. #endif
  1070. 1;
  1071. Py_DECREF(inspect);
  1072. return result ? 0 : -1;
  1073. }
  1074. #else
  1075. static int __Pyx_init_co_variables(void) {
  1076. return 0; // It's a limited API-only feature
  1077. }
  1078. #endif
  1079. /* MathInitCode */
  1080. #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  1081. #ifndef _USE_MATH_DEFINES
  1082. #define _USE_MATH_DEFINES
  1083. #endif
  1084. #endif
  1085. #include <math.h>
  1086. #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
  1087. #define __Pyx_truncl trunc
  1088. #else
  1089. #define __Pyx_truncl truncl
  1090. #endif
  1091. #ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
  1092. #define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
  1093. #endif
  1094. #ifndef CYTHON_CLINE_IN_TRACEBACK
  1095. #define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
  1096. #endif
  1097. #if CYTHON_CLINE_IN_TRACEBACK
  1098. #define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
  1099. #else
  1100. #define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
  1101. #endif
  1102. #define __PYX_ERR(f_index, lineno, Ln_error) \
  1103. { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
  1104. #ifdef CYTHON_EXTERN_C
  1105. #undef __PYX_EXTERN_C
  1106. #define __PYX_EXTERN_C CYTHON_EXTERN_C
  1107. #elif defined(__PYX_EXTERN_C)
  1108. #ifdef _MSC_VER
  1109. #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
  1110. #else
  1111. #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
  1112. #endif
  1113. #else
  1114. #ifdef __cplusplus
  1115. #define __PYX_EXTERN_C extern "C"
  1116. #else
  1117. #define __PYX_EXTERN_C extern
  1118. #endif
  1119. #endif
  1120. #define __PYX_HAVE__fontTools__feaLib__lexer
  1121. #define __PYX_HAVE_API__fontTools__feaLib__lexer
  1122. /* Early includes */
  1123. #ifdef _OPENMP
  1124. #include <omp.h>
  1125. #endif /* _OPENMP */
  1126. #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
  1127. #define CYTHON_WITHOUT_ASSERTIONS
  1128. #endif
  1129. #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
  1130. #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
  1131. #define __PYX_DEFAULT_STRING_ENCODING ""
  1132. #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
  1133. #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  1134. #define __Pyx_uchar_cast(c) ((unsigned char)c)
  1135. #define __Pyx_long_cast(x) ((long)x)
  1136. #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
  1137. (sizeof(type) < sizeof(Py_ssize_t)) ||\
  1138. (sizeof(type) > sizeof(Py_ssize_t) &&\
  1139. likely(v < (type)PY_SSIZE_T_MAX ||\
  1140. v == (type)PY_SSIZE_T_MAX) &&\
  1141. (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
  1142. v == (type)PY_SSIZE_T_MIN))) ||\
  1143. (sizeof(type) == sizeof(Py_ssize_t) &&\
  1144. (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
  1145. v == (type)PY_SSIZE_T_MAX))) )
  1146. static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
  1147. return (size_t) i < (size_t) limit;
  1148. }
  1149. #if defined (__cplusplus) && __cplusplus >= 201103L
  1150. #include <cstdlib>
  1151. #define __Pyx_sst_abs(value) std::abs(value)
  1152. #elif SIZEOF_INT >= SIZEOF_SIZE_T
  1153. #define __Pyx_sst_abs(value) abs(value)
  1154. #elif SIZEOF_LONG >= SIZEOF_SIZE_T
  1155. #define __Pyx_sst_abs(value) labs(value)
  1156. #elif defined (_MSC_VER)
  1157. #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
  1158. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  1159. #define __Pyx_sst_abs(value) llabs(value)
  1160. #elif defined (__GNUC__)
  1161. #define __Pyx_sst_abs(value) __builtin_llabs(value)
  1162. #else
  1163. #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
  1164. #endif
  1165. static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
  1166. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
  1167. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
  1168. static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
  1169. #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
  1170. #define __Pyx_PyBytes_FromString PyBytes_FromString
  1171. #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
  1172. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
  1173. #if CYTHON_ASSUME_SAFE_MACROS
  1174. #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
  1175. #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
  1176. #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
  1177. #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
  1178. #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
  1179. #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
  1180. #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
  1181. #else
  1182. #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s))
  1183. #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s))
  1184. #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s))
  1185. #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s))
  1186. #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s))
  1187. #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s))
  1188. #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
  1189. #endif
  1190. #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
  1191. #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
  1192. #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
  1193. #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
  1194. #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
  1195. #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
  1196. #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
  1197. #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
  1198. #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
  1199. #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
  1200. #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
  1201. static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
  1202. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
  1203. return Py_NewRef(obj);
  1204. #else
  1205. Py_INCREF(obj);
  1206. return obj;
  1207. #endif
  1208. }
  1209. static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
  1210. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
  1211. return Py_XNewRef(obj);
  1212. #else
  1213. Py_XINCREF(obj);
  1214. return obj;
  1215. #endif
  1216. }
  1217. static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
  1218. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
  1219. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
  1220. static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
  1221. static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
  1222. #define __Pyx_PySequence_Tuple(obj)\
  1223. (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
  1224. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
  1225. static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
  1226. static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
  1227. #if CYTHON_ASSUME_SAFE_MACROS
  1228. #define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
  1229. #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
  1230. #else
  1231. #define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
  1232. #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
  1233. #endif
  1234. #define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
  1235. #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
  1236. #if CYTHON_USE_PYLONG_INTERNALS
  1237. #if PY_VERSION_HEX >= 0x030C00A7
  1238. #ifndef _PyLong_SIGN_MASK
  1239. #define _PyLong_SIGN_MASK 3
  1240. #endif
  1241. #ifndef _PyLong_NON_SIZE_BITS
  1242. #define _PyLong_NON_SIZE_BITS 3
  1243. #endif
  1244. #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  1245. #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
  1246. #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
  1247. #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
  1248. #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
  1249. #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
  1250. #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  1251. #define __Pyx_PyLong_SignedDigitCount(x)\
  1252. ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  1253. #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
  1254. #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
  1255. #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
  1256. #else
  1257. #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
  1258. #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  1259. #endif
  1260. typedef Py_ssize_t __Pyx_compact_pylong;
  1261. typedef size_t __Pyx_compact_upylong;
  1262. #else
  1263. #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
  1264. #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
  1265. #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
  1266. #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
  1267. #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  1268. #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
  1269. #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
  1270. #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  1271. #define __Pyx_PyLong_CompactValue(x)\
  1272. ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  1273. typedef sdigit __Pyx_compact_pylong;
  1274. typedef digit __Pyx_compact_upylong;
  1275. #endif
  1276. #if PY_VERSION_HEX >= 0x030C00A5
  1277. #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
  1278. #else
  1279. #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
  1280. #endif
  1281. #endif
  1282. #if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  1283. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
  1284. #elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  1285. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
  1286. #else
  1287. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
  1288. #endif
  1289. /* Test for GCC > 2.95 */
  1290. #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  1291. #define likely(x) __builtin_expect(!!(x), 1)
  1292. #define unlikely(x) __builtin_expect(!!(x), 0)
  1293. #else /* !__GNUC__ or GCC < 2.95 */
  1294. #define likely(x) (x)
  1295. #define unlikely(x) (x)
  1296. #endif /* __GNUC__ */
  1297. /* PretendToInitialize */
  1298. #ifdef __cplusplus
  1299. #if __cplusplus > 201103L
  1300. #include <type_traits>
  1301. #endif
  1302. template <typename T>
  1303. static void __Pyx_pretend_to_initialize(T* ptr) {
  1304. #if __cplusplus > 201103L
  1305. if ((std::is_trivially_default_constructible<T>::value))
  1306. #endif
  1307. *ptr = T();
  1308. (void)ptr;
  1309. }
  1310. #else
  1311. static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
  1312. #endif
  1313. #if !CYTHON_USE_MODULE_STATE
  1314. static PyObject *__pyx_m = NULL;
  1315. #endif
  1316. static int __pyx_lineno;
  1317. static int __pyx_clineno = 0;
  1318. static const char * const __pyx_cfilenm = __FILE__;
  1319. static const char *__pyx_filename;
  1320. /* #### Code section: filename_table ### */
  1321. static const char* const __pyx_f[] = {
  1322. "Lib/fontTools/feaLib/lexer.py",
  1323. };
  1324. /* #### Code section: utility_code_proto_before_types ### */
  1325. /* Atomics.proto (used by UnpackUnboundCMethod) */
  1326. #include <pythread.h>
  1327. #ifndef CYTHON_ATOMICS
  1328. #define CYTHON_ATOMICS 1
  1329. #endif
  1330. #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
  1331. #define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  1332. #define __pyx_atomic_int_type int
  1333. #define __pyx_nonatomic_int_type int
  1334. #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
  1335. (__STDC_VERSION__ >= 201112L) &&\
  1336. !defined(__STDC_NO_ATOMICS__))
  1337. #include <stdatomic.h>
  1338. #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
  1339. (__cplusplus >= 201103L) ||\
  1340. (defined(_MSC_VER) && _MSC_VER >= 1700)))
  1341. #include <atomic>
  1342. #endif
  1343. #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
  1344. (__STDC_VERSION__ >= 201112L) &&\
  1345. !defined(__STDC_NO_ATOMICS__) &&\
  1346. ATOMIC_INT_LOCK_FREE == 2)
  1347. #undef __pyx_atomic_int_type
  1348. #define __pyx_atomic_int_type atomic_int
  1349. #define __pyx_atomic_ptr_type atomic_uintptr_t
  1350. #define __pyx_nonatomic_ptr_type uintptr_t
  1351. #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
  1352. #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
  1353. #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
  1354. #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
  1355. #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
  1356. #define __pyx_atomic_load(value) atomic_load(value)
  1357. #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
  1358. #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
  1359. #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
  1360. #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
  1361. #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
  1362. #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
  1363. #pragma message ("Using standard C atomics")
  1364. #elif defined(__PYX_DEBUG_ATOMICS)
  1365. #warning "Using standard C atomics"
  1366. #endif
  1367. #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
  1368. (__cplusplus >= 201103L) ||\
  1369. \
  1370. (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
  1371. ATOMIC_INT_LOCK_FREE == 2)
  1372. #undef __pyx_atomic_int_type
  1373. #define __pyx_atomic_int_type std::atomic_int
  1374. #define __pyx_atomic_ptr_type std::atomic_uintptr_t
  1375. #define __pyx_nonatomic_ptr_type uintptr_t
  1376. #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
  1377. #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
  1378. #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
  1379. #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
  1380. #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
  1381. #define __pyx_atomic_load(value) std::atomic_load(value)
  1382. #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
  1383. #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
  1384. #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
  1385. #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
  1386. #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
  1387. #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
  1388. #pragma message ("Using standard C++ atomics")
  1389. #elif defined(__PYX_DEBUG_ATOMICS)
  1390. #warning "Using standard C++ atomics"
  1391. #endif
  1392. #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
  1393. (__GNUC_MINOR__ > 1 ||\
  1394. (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
  1395. #define __pyx_atomic_ptr_type void*
  1396. #define __pyx_nonatomic_ptr_type void*
  1397. #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
  1398. #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
  1399. #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
  1400. #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
  1401. static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
  1402. __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
  1403. int result = old == *expected;
  1404. *expected = old;
  1405. return result;
  1406. }
  1407. #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
  1408. #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
  1409. #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
  1410. #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
  1411. #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
  1412. static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
  1413. __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
  1414. int result = old == *expected;
  1415. *expected = old;
  1416. return result;
  1417. }
  1418. #ifdef __PYX_DEBUG_ATOMICS
  1419. #warning "Using GNU atomics"
  1420. #endif
  1421. #elif CYTHON_ATOMICS && defined(_MSC_VER)
  1422. #include <intrin.h>
  1423. #undef __pyx_atomic_int_type
  1424. #define __pyx_atomic_int_type long
  1425. #define __pyx_atomic_ptr_type void*
  1426. #undef __pyx_nonatomic_int_type
  1427. #define __pyx_nonatomic_int_type long
  1428. #define __pyx_nonatomic_ptr_type void*
  1429. #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
  1430. #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
  1431. #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
  1432. #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
  1433. #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
  1434. static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
  1435. __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
  1436. int result = old == *expected;
  1437. *expected = old;
  1438. return result;
  1439. }
  1440. #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
  1441. #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
  1442. #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
  1443. #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
  1444. #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
  1445. static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
  1446. __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
  1447. int result = old == *expected;
  1448. *expected = old;
  1449. return result;
  1450. }
  1451. #ifdef __PYX_DEBUG_ATOMICS
  1452. #pragma message ("Using MSVC atomics")
  1453. #endif
  1454. #else
  1455. #undef CYTHON_ATOMICS
  1456. #define CYTHON_ATOMICS 0
  1457. #ifdef __PYX_DEBUG_ATOMICS
  1458. #warning "Not using atomics"
  1459. #endif
  1460. #endif
  1461. /* CriticalSectionsDefinition.proto (used by CriticalSections) */
  1462. #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  1463. #define __Pyx_PyCriticalSection void*
  1464. #define __Pyx_PyCriticalSection2 void*
  1465. #define __Pyx_PyCriticalSection_End(cs)
  1466. #define __Pyx_PyCriticalSection2_End(cs)
  1467. #else
  1468. #define __Pyx_PyCriticalSection PyCriticalSection
  1469. #define __Pyx_PyCriticalSection2 PyCriticalSection2
  1470. #define __Pyx_PyCriticalSection_End PyCriticalSection_End
  1471. #define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
  1472. #endif
  1473. /* CriticalSections.proto (used by ParseKeywordsImpl) */
  1474. #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  1475. #define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
  1476. #define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
  1477. #else
  1478. #define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
  1479. #define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
  1480. #endif
  1481. #if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
  1482. #define __Pyx_BEGIN_CRITICAL_SECTION(o) {
  1483. #define __Pyx_END_CRITICAL_SECTION() }
  1484. #else
  1485. #define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
  1486. #define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
  1487. #endif
  1488. /* IncludeStructmemberH.proto (used by FixUpExtensionType) */
  1489. #include <structmember.h>
  1490. /* #### Code section: numeric_typedefs ### */
  1491. /* #### Code section: complex_type_declarations ### */
  1492. /* #### Code section: type_declarations ### */
  1493. /*--- Type declarations ---*/
  1494. /* #### Code section: utility_code_proto ### */
  1495. /* --- Runtime support code (head) --- */
  1496. /* Refnanny.proto */
  1497. #ifndef CYTHON_REFNANNY
  1498. #define CYTHON_REFNANNY 0
  1499. #endif
  1500. #if CYTHON_REFNANNY
  1501. typedef struct {
  1502. void (*INCREF)(void*, PyObject*, Py_ssize_t);
  1503. void (*DECREF)(void*, PyObject*, Py_ssize_t);
  1504. void (*GOTREF)(void*, PyObject*, Py_ssize_t);
  1505. void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
  1506. void* (*SetupContext)(const char*, Py_ssize_t, const char*);
  1507. void (*FinishContext)(void**);
  1508. } __Pyx_RefNannyAPIStruct;
  1509. static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  1510. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  1511. #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  1512. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  1513. if (acquire_gil) {\
  1514. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  1515. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
  1516. PyGILState_Release(__pyx_gilstate_save);\
  1517. } else {\
  1518. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
  1519. }
  1520. #define __Pyx_RefNannyFinishContextNogil() {\
  1521. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  1522. __Pyx_RefNannyFinishContext();\
  1523. PyGILState_Release(__pyx_gilstate_save);\
  1524. }
  1525. #define __Pyx_RefNannyFinishContextNogil() {\
  1526. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  1527. __Pyx_RefNannyFinishContext();\
  1528. PyGILState_Release(__pyx_gilstate_save);\
  1529. }
  1530. #define __Pyx_RefNannyFinishContext()\
  1531. __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  1532. #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  1533. #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  1534. #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  1535. #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  1536. #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
  1537. #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  1538. #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  1539. #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
  1540. #else
  1541. #define __Pyx_RefNannyDeclarations
  1542. #define __Pyx_RefNannySetupContext(name, acquire_gil)
  1543. #define __Pyx_RefNannyFinishContextNogil()
  1544. #define __Pyx_RefNannyFinishContext()
  1545. #define __Pyx_INCREF(r) Py_INCREF(r)
  1546. #define __Pyx_DECREF(r) Py_DECREF(r)
  1547. #define __Pyx_GOTREF(r)
  1548. #define __Pyx_GIVEREF(r)
  1549. #define __Pyx_XINCREF(r) Py_XINCREF(r)
  1550. #define __Pyx_XDECREF(r) Py_XDECREF(r)
  1551. #define __Pyx_XGOTREF(r)
  1552. #define __Pyx_XGIVEREF(r)
  1553. #endif
  1554. #define __Pyx_Py_XDECREF_SET(r, v) do {\
  1555. PyObject *tmp = (PyObject *) r;\
  1556. r = v; Py_XDECREF(tmp);\
  1557. } while (0)
  1558. #define __Pyx_XDECREF_SET(r, v) do {\
  1559. PyObject *tmp = (PyObject *) r;\
  1560. r = v; __Pyx_XDECREF(tmp);\
  1561. } while (0)
  1562. #define __Pyx_DECREF_SET(r, v) do {\
  1563. PyObject *tmp = (PyObject *) r;\
  1564. r = v; __Pyx_DECREF(tmp);\
  1565. } while (0)
  1566. #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
  1567. #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
  1568. /* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */
  1569. #if CYTHON_FAST_THREAD_STATE
  1570. #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
  1571. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
  1572. #else
  1573. #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
  1574. #endif
  1575. /* PyThreadStateGet.proto (used by PyErrFetchRestore) */
  1576. #if CYTHON_FAST_THREAD_STATE
  1577. #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
  1578. #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
  1579. #if PY_VERSION_HEX >= 0x030C00A6
  1580. #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
  1581. #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
  1582. #else
  1583. #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
  1584. #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
  1585. #endif
  1586. #else
  1587. #define __Pyx_PyThreadState_declare
  1588. #define __Pyx_PyThreadState_assign
  1589. #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
  1590. #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
  1591. #endif
  1592. /* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */
  1593. #if CYTHON_FAST_THREAD_STATE
  1594. #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
  1595. #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
  1596. #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
  1597. #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
  1598. #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
  1599. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  1600. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  1601. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
  1602. #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
  1603. #else
  1604. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  1605. #endif
  1606. #else
  1607. #define __Pyx_PyErr_Clear() PyErr_Clear()
  1608. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  1609. #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
  1610. #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
  1611. #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
  1612. #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
  1613. #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
  1614. #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
  1615. #endif
  1616. /* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */
  1617. #if CYTHON_USE_TYPE_SLOTS
  1618. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
  1619. #else
  1620. #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
  1621. #endif
  1622. /* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
  1623. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
  1624. /* GetBuiltinName.proto */
  1625. static PyObject *__Pyx_GetBuiltinName(PyObject *name);
  1626. /* TupleAndListFromArray.proto (used by fastcall) */
  1627. #if CYTHON_COMPILING_IN_CPYTHON
  1628. static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
  1629. #endif
  1630. #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
  1631. static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
  1632. #endif
  1633. /* IncludeStringH.proto (used by BytesEquals) */
  1634. #include <string.h>
  1635. /* BytesEquals.proto (used by UnicodeEquals) */
  1636. static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
  1637. /* UnicodeEquals.proto (used by fastcall) */
  1638. static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
  1639. /* fastcall.proto */
  1640. #if CYTHON_AVOID_BORROWED_REFS
  1641. #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
  1642. #elif CYTHON_ASSUME_SAFE_MACROS
  1643. #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
  1644. #else
  1645. #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
  1646. #endif
  1647. #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
  1648. #define __Pyx_KwValues_VARARGS(args, nargs) NULL
  1649. #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
  1650. #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
  1651. #if CYTHON_METH_FASTCALL
  1652. #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
  1653. #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
  1654. #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
  1655. static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  1656. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
  1657. CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  1658. #else
  1659. #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  1660. #endif
  1661. #else
  1662. #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
  1663. #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
  1664. #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
  1665. #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
  1666. #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
  1667. #endif
  1668. #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
  1669. #if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
  1670. #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
  1671. #else
  1672. #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
  1673. #endif
  1674. /* py_dict_items.proto (used by OwnedDictNext) */
  1675. static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
  1676. /* CallCFunction.proto (used by CallUnboundCMethod0) */
  1677. #define __Pyx_CallCFunction(cfunc, self, args)\
  1678. ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
  1679. #define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
  1680. ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
  1681. #define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
  1682. ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
  1683. #define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
  1684. ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)
  1685. /* PyObjectCall.proto (used by PyObjectFastCall) */
  1686. #if CYTHON_COMPILING_IN_CPYTHON
  1687. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
  1688. #else
  1689. #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
  1690. #endif
  1691. /* PyObjectCallMethO.proto (used by PyObjectFastCall) */
  1692. #if CYTHON_COMPILING_IN_CPYTHON
  1693. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
  1694. #endif
  1695. /* PyObjectFastCall.proto (used by PyObjectCallOneArg) */
  1696. #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
  1697. static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);
  1698. /* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */
  1699. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
  1700. /* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
  1701. typedef struct {
  1702. PyObject *type;
  1703. PyObject **method_name;
  1704. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
  1705. __pyx_atomic_int_type initialized;
  1706. #endif
  1707. PyCFunction func;
  1708. PyObject *method;
  1709. int flag;
  1710. } __Pyx_CachedCFunction;
  1711. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  1712. static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
  1713. #if !CYTHON_ATOMICS
  1714. return 1;
  1715. #else
  1716. __pyx_nonatomic_int_type expected = 0;
  1717. if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
  1718. return 0;
  1719. }
  1720. return expected;
  1721. #endif
  1722. }
  1723. static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
  1724. #if CYTHON_ATOMICS
  1725. __pyx_atomic_store(&cfunc->initialized, 2);
  1726. #endif
  1727. }
  1728. #else
  1729. #define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
  1730. #define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
  1731. #endif
  1732. /* CallUnboundCMethod0.proto */
  1733. CYTHON_UNUSED
  1734. static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
  1735. #if CYTHON_COMPILING_IN_CPYTHON
  1736. static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
  1737. #else
  1738. #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
  1739. #endif
  1740. /* py_dict_values.proto (used by OwnedDictNext) */
  1741. static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
  1742. /* OwnedDictNext.proto (used by ParseKeywordsImpl) */
  1743. #if CYTHON_AVOID_BORROWED_REFS
  1744. static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
  1745. #else
  1746. CYTHON_INLINE
  1747. static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
  1748. #endif
  1749. /* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
  1750. static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
  1751. /* ParseKeywordsImpl.export */
  1752. static int __Pyx_ParseKeywordsTuple(
  1753. PyObject *kwds,
  1754. PyObject * const *kwvalues,
  1755. PyObject ** const argnames[],
  1756. PyObject *kwds2,
  1757. PyObject *values[],
  1758. Py_ssize_t num_pos_args,
  1759. Py_ssize_t num_kwargs,
  1760. const char* function_name,
  1761. int ignore_unknown_kwargs
  1762. );
  1763. static int __Pyx_ParseKeywordDictToDict(
  1764. PyObject *kwds,
  1765. PyObject ** const argnames[],
  1766. PyObject *kwds2,
  1767. PyObject *values[],
  1768. Py_ssize_t num_pos_args,
  1769. const char* function_name
  1770. );
  1771. static int __Pyx_ParseKeywordDict(
  1772. PyObject *kwds,
  1773. PyObject ** const argnames[],
  1774. PyObject *values[],
  1775. Py_ssize_t num_pos_args,
  1776. Py_ssize_t num_kwargs,
  1777. const char* function_name,
  1778. int ignore_unknown_kwargs
  1779. );
  1780. /* CallUnboundCMethod2.proto */
  1781. CYTHON_UNUSED
  1782. static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
  1783. #if CYTHON_COMPILING_IN_CPYTHON
  1784. static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
  1785. #else
  1786. #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
  1787. #endif
  1788. /* ParseKeywords.proto */
  1789. static CYTHON_INLINE int __Pyx_ParseKeywords(
  1790. PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
  1791. PyObject *kwds2, PyObject *values[],
  1792. Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
  1793. const char* function_name,
  1794. int ignore_unknown_kwargs
  1795. );
  1796. /* RaiseArgTupleInvalid.proto */
  1797. static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
  1798. Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
  1799. /* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */
  1800. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
  1801. #define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL)
  1802. #else
  1803. #define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n)
  1804. #endif
  1805. /* PyObjectSetAttrStr.proto */
  1806. #if CYTHON_USE_TYPE_SLOTS
  1807. #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
  1808. static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
  1809. #else
  1810. #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n)
  1811. #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
  1812. #endif
  1813. /* PyDictVersioning.proto (used by GetModuleGlobalName) */
  1814. #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
  1815. #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
  1816. #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
  1817. #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
  1818. (version_var) = __PYX_GET_DICT_VERSION(dict);\
  1819. (cache_var) = (value);
  1820. #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
  1821. static PY_UINT64_T __pyx_dict_version = 0;\
  1822. static PyObject *__pyx_dict_cached_value = NULL;\
  1823. if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
  1824. (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
  1825. } else {\
  1826. (VAR) = __pyx_dict_cached_value = (LOOKUP);\
  1827. __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
  1828. }\
  1829. }
  1830. static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
  1831. static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
  1832. static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
  1833. #else
  1834. #define __PYX_GET_DICT_VERSION(dict) (0)
  1835. #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
  1836. #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
  1837. #endif
  1838. /* GetModuleGlobalName.proto */
  1839. #if CYTHON_USE_DICT_VERSIONS
  1840. #define __Pyx_GetModuleGlobalName(var, name) do {\
  1841. static PY_UINT64_T __pyx_dict_version = 0;\
  1842. static PyObject *__pyx_dict_cached_value = NULL;\
  1843. (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
  1844. (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
  1845. __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
  1846. } while(0)
  1847. #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
  1848. PY_UINT64_T __pyx_dict_version;\
  1849. PyObject *__pyx_dict_cached_value;\
  1850. (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
  1851. } while(0)
  1852. static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
  1853. #else
  1854. #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
  1855. #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
  1856. static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
  1857. #endif
  1858. /* PyObjectFastCallMethod.proto */
  1859. #if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
  1860. #define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
  1861. #else
  1862. static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
  1863. #endif
  1864. /* RaiseTooManyValuesToUnpack.proto */
  1865. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
  1866. /* RaiseNeedMoreValuesToUnpack.proto */
  1867. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
  1868. /* IterFinish.proto */
  1869. static CYTHON_INLINE int __Pyx_IterFinish(void);
  1870. /* UnpackItemEndCheck.proto */
  1871. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
  1872. /* PyLongBinop.proto */
  1873. #if !CYTHON_COMPILING_IN_PYPY
  1874. static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
  1875. #else
  1876. #define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
  1877. (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
  1878. #endif
  1879. /* PyStopIteration_Check.proto */
  1880. #define __Pyx_PyExc_StopIteration_Check(obj) __Pyx_TypeCheck(obj, PyExc_StopIteration)
  1881. /* RaiseException.export */
  1882. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
  1883. /* GetItemInt.proto */
  1884. #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
  1885. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1886. __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\
  1887. (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
  1888. __Pyx_GetItemInt_Generic(o, to_py_func(i))))
  1889. #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
  1890. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1891. __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
  1892. (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  1893. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  1894. int wraparound, int boundscheck, int unsafe_shared);
  1895. #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
  1896. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1897. __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
  1898. (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
  1899. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  1900. int wraparound, int boundscheck, int unsafe_shared);
  1901. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
  1902. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
  1903. int is_list, int wraparound, int boundscheck, int unsafe_shared);
  1904. /* ObjectGetItem.proto */
  1905. #if CYTHON_USE_TYPE_SLOTS
  1906. static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
  1907. #else
  1908. #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
  1909. #endif
  1910. /* SliceObject.proto */
  1911. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
  1912. PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
  1913. PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
  1914. int has_cstart, int has_cstop, int wraparound);
  1915. /* PyLongBinop.proto */
  1916. #if !CYTHON_COMPILING_IN_PYPY
  1917. static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
  1918. #else
  1919. #define __Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
  1920. (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
  1921. #endif
  1922. /* PySequenceContains.proto */
  1923. static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
  1924. int result = PySequence_Contains(seq, item);
  1925. return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
  1926. }
  1927. /* PyUnicodeContains.proto */
  1928. static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
  1929. int result = PyUnicode_Contains(text, substring);
  1930. return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
  1931. }
  1932. /* pybytes_as_double.proto (used by pynumber_float) */
  1933. static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
  1934. static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
  1935. static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
  1936. char* as_c_string;
  1937. Py_ssize_t size;
  1938. #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  1939. as_c_string = PyBytes_AS_STRING(obj);
  1940. size = PyBytes_GET_SIZE(obj);
  1941. #else
  1942. if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) {
  1943. return (double)-1;
  1944. }
  1945. #endif
  1946. return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
  1947. }
  1948. static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
  1949. char* as_c_string;
  1950. Py_ssize_t size;
  1951. #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  1952. as_c_string = PyByteArray_AS_STRING(obj);
  1953. size = PyByteArray_GET_SIZE(obj);
  1954. #else
  1955. as_c_string = PyByteArray_AsString(obj);
  1956. if (as_c_string == NULL) {
  1957. return (double)-1;
  1958. }
  1959. size = PyByteArray_Size(obj);
  1960. #endif
  1961. return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
  1962. }
  1963. /* pyunicode_as_double.proto (used by pynumber_float) */
  1964. #if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
  1965. static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
  1966. int last_was_punctuation;
  1967. Py_ssize_t i;
  1968. last_was_punctuation = 1;
  1969. for (i=start; i <= end; i++) {
  1970. Py_UCS4 chr = PyUnicode_READ(kind, data, i);
  1971. int is_punctuation = (chr == '_') | (chr == '.');
  1972. *buffer = (char)chr;
  1973. buffer += (chr != '_');
  1974. if (unlikely(chr > 127)) goto parse_failure;
  1975. if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
  1976. last_was_punctuation = is_punctuation;
  1977. }
  1978. if (unlikely(last_was_punctuation)) goto parse_failure;
  1979. *buffer = '\0';
  1980. return buffer;
  1981. parse_failure:
  1982. return NULL;
  1983. }
  1984. static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
  1985. int matches = 1;
  1986. Py_UCS4 chr;
  1987. Py_UCS4 sign = PyUnicode_READ(kind, data, start);
  1988. int is_signed = (sign == '-') | (sign == '+');
  1989. start += is_signed;
  1990. length -= is_signed;
  1991. switch (PyUnicode_READ(kind, data, start)) {
  1992. #ifdef Py_NAN
  1993. case 'n':
  1994. case 'N':
  1995. if (unlikely(length != 3)) goto parse_failure;
  1996. chr = PyUnicode_READ(kind, data, start+1);
  1997. matches &= (chr == 'a') | (chr == 'A');
  1998. chr = PyUnicode_READ(kind, data, start+2);
  1999. matches &= (chr == 'n') | (chr == 'N');
  2000. if (unlikely(!matches)) goto parse_failure;
  2001. return (sign == '-') ? -Py_NAN : Py_NAN;
  2002. #endif
  2003. case 'i':
  2004. case 'I':
  2005. if (unlikely(length < 3)) goto parse_failure;
  2006. chr = PyUnicode_READ(kind, data, start+1);
  2007. matches &= (chr == 'n') | (chr == 'N');
  2008. chr = PyUnicode_READ(kind, data, start+2);
  2009. matches &= (chr == 'f') | (chr == 'F');
  2010. if (likely(length == 3 && matches))
  2011. return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
  2012. if (unlikely(length != 8)) goto parse_failure;
  2013. chr = PyUnicode_READ(kind, data, start+3);
  2014. matches &= (chr == 'i') | (chr == 'I');
  2015. chr = PyUnicode_READ(kind, data, start+4);
  2016. matches &= (chr == 'n') | (chr == 'N');
  2017. chr = PyUnicode_READ(kind, data, start+5);
  2018. matches &= (chr == 'i') | (chr == 'I');
  2019. chr = PyUnicode_READ(kind, data, start+6);
  2020. matches &= (chr == 't') | (chr == 'T');
  2021. chr = PyUnicode_READ(kind, data, start+7);
  2022. matches &= (chr == 'y') | (chr == 'Y');
  2023. if (unlikely(!matches)) goto parse_failure;
  2024. return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
  2025. case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
  2026. break;
  2027. default:
  2028. goto parse_failure;
  2029. }
  2030. return 0.0;
  2031. parse_failure:
  2032. return -1.0;
  2033. }
  2034. static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
  2035. double value;
  2036. const char *last;
  2037. char *end;
  2038. Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
  2039. const int kind = PyUnicode_KIND(obj);
  2040. const void* data = PyUnicode_DATA(obj);
  2041. start = 0;
  2042. while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
  2043. start++;
  2044. while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
  2045. length--;
  2046. length -= start;
  2047. if (unlikely(length <= 0)) goto fallback;
  2048. value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
  2049. if (unlikely(value == -1.0)) goto fallback;
  2050. if (value != 0.0) return value;
  2051. if (length < 40) {
  2052. char number[40];
  2053. last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
  2054. if (unlikely(!last)) goto fallback;
  2055. value = PyOS_string_to_double(number, &end, NULL);
  2056. } else {
  2057. char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
  2058. if (unlikely(!number)) goto fallback;
  2059. last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
  2060. if (unlikely(!last)) {
  2061. PyMem_Free(number);
  2062. goto fallback;
  2063. }
  2064. value = PyOS_string_to_double(number, &end, NULL);
  2065. PyMem_Free(number);
  2066. }
  2067. if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
  2068. return value;
  2069. }
  2070. fallback:
  2071. return __Pyx_SlowPyString_AsDouble(obj);
  2072. }
  2073. #endif
  2074. static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
  2075. #if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
  2076. if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
  2077. return (double)-1;
  2078. if (likely(PyUnicode_IS_ASCII(obj))) {
  2079. const char *s;
  2080. Py_ssize_t length;
  2081. s = PyUnicode_AsUTF8AndSize(obj, &length);
  2082. return __Pyx__PyBytes_AsDouble(obj, s, length);
  2083. }
  2084. return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
  2085. #else
  2086. return __Pyx_SlowPyString_AsDouble(obj);
  2087. #endif
  2088. }
  2089. /* pynumber_float.proto */
  2090. static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj);
  2091. #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x))
  2092. /* PyObjectVectorCallKwBuilder.proto */
  2093. CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
  2094. #if CYTHON_VECTORCALL
  2095. #if PY_VERSION_HEX >= 0x03090000
  2096. #define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
  2097. #else
  2098. #define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
  2099. #endif
  2100. #define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
  2101. static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
  2102. static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
  2103. #else
  2104. #define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
  2105. #define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
  2106. #define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
  2107. #define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
  2108. #endif
  2109. /* PyFileNotFoundError_Check.proto */
  2110. #define __Pyx_PyExc_FileNotFoundError_Check(obj) __Pyx_TypeCheck(obj, PyExc_FileNotFoundError)
  2111. /* IterNextPlain.proto (used by IterNext) */
  2112. static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator);
  2113. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  2114. static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void);
  2115. #endif
  2116. /* IterNext.proto */
  2117. #define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
  2118. static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);
  2119. /* GetTopmostException.proto (used by SaveResetException) */
  2120. #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
  2121. static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
  2122. #endif
  2123. /* SaveResetException.proto */
  2124. #if CYTHON_FAST_THREAD_STATE
  2125. #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
  2126. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  2127. #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
  2128. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  2129. #else
  2130. #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
  2131. #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
  2132. #endif
  2133. /* GetException.proto */
  2134. #if CYTHON_FAST_THREAD_STATE
  2135. #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
  2136. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  2137. #else
  2138. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
  2139. #endif
  2140. /* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */
  2141. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
  2142. /* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */
  2143. #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
  2144. static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
  2145. #endif
  2146. /* PyObjectCallMethod0.proto (used by pop) */
  2147. static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
  2148. /* pop.proto */
  2149. static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L);
  2150. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  2151. static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L);
  2152. #define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ?\
  2153. __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L))
  2154. #else
  2155. #define __Pyx_PyList_Pop(L) __Pyx__PyObject_Pop(L)
  2156. #define __Pyx_PyObject_Pop(L) __Pyx__PyObject_Pop(L)
  2157. #endif
  2158. /* ListAppend.proto (used by append) */
  2159. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  2160. static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
  2161. PyListObject* L = (PyListObject*) list;
  2162. Py_ssize_t len = Py_SIZE(list);
  2163. if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
  2164. Py_INCREF(x);
  2165. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
  2166. L->ob_item[len] = x;
  2167. #else
  2168. PyList_SET_ITEM(list, len, x);
  2169. #endif
  2170. __Pyx_SET_SIZE(list, len + 1);
  2171. return 0;
  2172. }
  2173. return PyList_Append(list, x);
  2174. }
  2175. #else
  2176. #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
  2177. #endif
  2178. /* PyObjectCall2Args.proto (used by PyObjectCallMethod1) */
  2179. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
  2180. /* PyObjectCallMethod1.proto (used by append) */
  2181. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
  2182. /* append.proto */
  2183. static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
  2184. /* SwapException.proto */
  2185. #if CYTHON_FAST_THREAD_STATE
  2186. #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
  2187. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  2188. #else
  2189. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
  2190. #endif
  2191. /* HasAttr.proto */
  2192. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  2193. #define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
  2194. #else
  2195. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
  2196. #endif
  2197. /* GetAttr3.proto */
  2198. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
  2199. /* ImportImpl.export */
  2200. static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);
  2201. /* Import.proto */
  2202. static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);
  2203. /* ImportFrom.proto */
  2204. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
  2205. /* Py3UpdateBases.proto */
  2206. static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);
  2207. /* CalculateMetaclass.proto */
  2208. static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
  2209. /* SetNameInClass.proto */
  2210. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
  2211. #define __Pyx_SetNameInClass(ns, name, value)\
  2212. (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
  2213. #elif CYTHON_COMPILING_IN_CPYTHON
  2214. #define __Pyx_SetNameInClass(ns, name, value)\
  2215. (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
  2216. #else
  2217. #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
  2218. #endif
  2219. /* dict_setdefault.proto (used by FetchCommonType) */
  2220. static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
  2221. /* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
  2222. #if CYTHON_COMPILING_IN_LIMITED_API
  2223. static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
  2224. #endif
  2225. /* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
  2226. static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
  2227. #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)
  2228. /* FixUpExtensionType.proto (used by FetchCommonType) */
  2229. static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
  2230. /* AddModuleRef.proto (used by FetchSharedCythonModule) */
  2231. #if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
  2232. __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  2233. static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
  2234. #else
  2235. #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
  2236. #endif
  2237. /* FetchSharedCythonModule.proto (used by FetchCommonType) */
  2238. static PyObject *__Pyx_FetchSharedCythonABIModule(void);
  2239. /* FetchCommonType.proto (used by CommonTypesMetaclass) */
  2240. static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
  2241. /* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
  2242. static int __pyx_CommonTypesMetaclass_init(PyObject *module);
  2243. #define __Pyx_CommonTypesMetaclass_USED
  2244. /* CallTypeTraverse.proto (used by CythonFunctionShared) */
  2245. #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
  2246. #define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
  2247. #else
  2248. static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
  2249. #endif
  2250. /* PyMethodNew.proto (used by CythonFunctionShared) */
  2251. static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
  2252. /* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
  2253. #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
  2254. static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
  2255. #endif
  2256. /* CythonFunctionShared.proto (used by CythonFunction) */
  2257. #define __Pyx_CyFunction_USED
  2258. #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
  2259. #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
  2260. #define __Pyx_CYFUNCTION_CCLASS 0x04
  2261. #define __Pyx_CYFUNCTION_COROUTINE 0x08
  2262. #define __Pyx_CyFunction_GetClosure(f)\
  2263. (((__pyx_CyFunctionObject *) (f))->func_closure)
  2264. #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  2265. #define __Pyx_CyFunction_GetClassObj(f)\
  2266. (((__pyx_CyFunctionObject *) (f))->func_classobj)
  2267. #else
  2268. #define __Pyx_CyFunction_GetClassObj(f)\
  2269. ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
  2270. #endif
  2271. #define __Pyx_CyFunction_SetClassObj(f, classobj)\
  2272. __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
  2273. #define __Pyx_CyFunction_Defaults(type, f)\
  2274. ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
  2275. #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
  2276. ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
  2277. typedef struct {
  2278. #if CYTHON_COMPILING_IN_LIMITED_API
  2279. PyObject_HEAD
  2280. PyObject *func;
  2281. #elif PY_VERSION_HEX < 0x030900B1
  2282. PyCFunctionObject func;
  2283. #else
  2284. PyCMethodObject func;
  2285. #endif
  2286. #if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
  2287. __pyx_vectorcallfunc func_vectorcall;
  2288. #endif
  2289. #if CYTHON_COMPILING_IN_LIMITED_API
  2290. PyObject *func_weakreflist;
  2291. #endif
  2292. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  2293. PyObject *func_dict;
  2294. #endif
  2295. PyObject *func_name;
  2296. PyObject *func_qualname;
  2297. PyObject *func_doc;
  2298. PyObject *func_globals;
  2299. PyObject *func_code;
  2300. PyObject *func_closure;
  2301. #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  2302. PyObject *func_classobj;
  2303. #endif
  2304. PyObject *defaults;
  2305. int flags;
  2306. PyObject *defaults_tuple;
  2307. PyObject *defaults_kwdict;
  2308. PyObject *(*defaults_getter)(PyObject *);
  2309. PyObject *func_annotations;
  2310. PyObject *func_is_coroutine;
  2311. } __pyx_CyFunctionObject;
  2312. #undef __Pyx_CyOrPyCFunction_Check
  2313. #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
  2314. #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
  2315. #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
  2316. static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
  2317. #undef __Pyx_IsSameCFunction
  2318. #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
  2319. static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
  2320. int flags, PyObject* qualname,
  2321. PyObject *closure,
  2322. PyObject *module, PyObject *globals,
  2323. PyObject* code);
  2324. static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
  2325. static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
  2326. PyTypeObject *defaults_type);
  2327. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
  2328. PyObject *tuple);
  2329. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
  2330. PyObject *dict);
  2331. static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
  2332. PyObject *dict);
  2333. static int __pyx_CyFunction_init(PyObject *module);
  2334. #if CYTHON_METH_FASTCALL
  2335. static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
  2336. static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
  2337. static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
  2338. static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
  2339. #if CYTHON_COMPILING_IN_LIMITED_API
  2340. #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
  2341. #else
  2342. #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
  2343. #endif
  2344. #endif
  2345. /* CythonFunction.proto */
  2346. static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
  2347. int flags, PyObject* qualname,
  2348. PyObject *closure,
  2349. PyObject *module, PyObject *globals,
  2350. PyObject* code);
  2351. /* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */
  2352. #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
  2353. #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
  2354. #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
  2355. static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
  2356. #else
  2357. #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
  2358. #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
  2359. #endif
  2360. /* Py3ClassCreate.proto */
  2361. static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
  2362. PyObject *mkw, PyObject *modname, PyObject *doc);
  2363. static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
  2364. PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
  2365. /* CLineInTraceback.proto (used by AddTraceback) */
  2366. #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
  2367. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
  2368. #else
  2369. #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
  2370. #endif
  2371. /* CodeObjectCache.proto (used by AddTraceback) */
  2372. #if CYTHON_COMPILING_IN_LIMITED_API
  2373. typedef PyObject __Pyx_CachedCodeObjectType;
  2374. #else
  2375. typedef PyCodeObject __Pyx_CachedCodeObjectType;
  2376. #endif
  2377. typedef struct {
  2378. __Pyx_CachedCodeObjectType* code_object;
  2379. int code_line;
  2380. } __Pyx_CodeObjectCacheEntry;
  2381. struct __Pyx_CodeObjectCache {
  2382. int count;
  2383. int max_count;
  2384. __Pyx_CodeObjectCacheEntry* entries;
  2385. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  2386. __pyx_atomic_int_type accessor_count;
  2387. #endif
  2388. };
  2389. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
  2390. static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
  2391. static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);
  2392. /* AddTraceback.proto */
  2393. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  2394. int py_line, const char *filename);
  2395. /* GCCDiagnostics.proto */
  2396. #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  2397. #define __Pyx_HAS_GCC_DIAGNOSTIC
  2398. #endif
  2399. /* CIntToPy.proto */
  2400. static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);
  2401. /* FormatTypeName.proto */
  2402. #if CYTHON_COMPILING_IN_LIMITED_API
  2403. typedef PyObject *__Pyx_TypeName;
  2404. #define __Pyx_FMT_TYPENAME "%U"
  2405. #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
  2406. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  2407. #define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
  2408. #else
  2409. static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
  2410. #endif
  2411. #else // !LIMITED_API
  2412. typedef const char *__Pyx_TypeName;
  2413. #define __Pyx_FMT_TYPENAME "%.200s"
  2414. #define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
  2415. #define __Pyx_DECREF_TypeName(obj)
  2416. #endif
  2417. /* CIntFromPy.proto */
  2418. static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);
  2419. /* CIntFromPy.proto */
  2420. static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);
  2421. /* FastTypeChecks.proto */
  2422. #if CYTHON_COMPILING_IN_CPYTHON
  2423. #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
  2424. #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
  2425. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
  2426. static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
  2427. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
  2428. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
  2429. #else
  2430. #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
  2431. #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
  2432. #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
  2433. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
  2434. return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
  2435. }
  2436. #endif
  2437. #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
  2438. #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
  2439. #ifdef PyExceptionInstance_Check
  2440. #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
  2441. #else
  2442. #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
  2443. #endif
  2444. /* GetRuntimeVersion.proto */
  2445. #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  2446. static unsigned long __Pyx_cached_runtime_version = 0;
  2447. static void __Pyx_init_runtime_version(void);
  2448. #else
  2449. #define __Pyx_init_runtime_version()
  2450. #endif
  2451. static unsigned long __Pyx_get_runtime_version(void);
  2452. /* CheckBinaryVersion.proto */
  2453. static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
  2454. /* DecompressString.proto */
  2455. static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);
  2456. /* MultiPhaseInitModuleState.proto */
  2457. #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
  2458. static PyObject *__Pyx_State_FindModule(void*);
  2459. static int __Pyx_State_AddModule(PyObject* module, void*);
  2460. static int __Pyx_State_RemoveModule(void*);
  2461. #elif CYTHON_USE_MODULE_STATE
  2462. #define __Pyx_State_FindModule PyState_FindModule
  2463. #define __Pyx_State_AddModule PyState_AddModule
  2464. #define __Pyx_State_RemoveModule PyState_RemoveModule
  2465. #endif
  2466. /* #### Code section: module_declarations ### */
  2467. /* CythonABIVersion.proto */
  2468. #if CYTHON_COMPILING_IN_LIMITED_API
  2469. #if CYTHON_METH_FASTCALL
  2470. #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall"
  2471. #else
  2472. #define __PYX_FASTCALL_ABI_SUFFIX
  2473. #endif
  2474. #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
  2475. #else
  2476. #define __PYX_LIMITED_ABI_SUFFIX
  2477. #endif
  2478. #if __PYX_HAS_PY_AM_SEND == 1
  2479. #define __PYX_AM_SEND_ABI_SUFFIX
  2480. #elif __PYX_HAS_PY_AM_SEND == 2
  2481. #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
  2482. #else
  2483. #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
  2484. #endif
  2485. #ifndef __PYX_MONITORING_ABI_SUFFIX
  2486. #define __PYX_MONITORING_ABI_SUFFIX
  2487. #endif
  2488. #if CYTHON_USE_TP_FINALIZE
  2489. #define __PYX_TP_FINALIZE_ABI_SUFFIX
  2490. #else
  2491. #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
  2492. #endif
  2493. #if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
  2494. #define __PYX_FREELISTS_ABI_SUFFIX
  2495. #else
  2496. #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
  2497. #endif
  2498. #define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
  2499. #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
  2500. #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
  2501. /* Module declarations from "cython" */
  2502. /* Module declarations from "fontTools.feaLib.lexer" */
  2503. /* #### Code section: typeinfo ### */
  2504. /* #### Code section: before_global_var ### */
  2505. #define __Pyx_MODULE_NAME "fontTools.feaLib.lexer"
  2506. extern int __pyx_module_is_main_fontTools__feaLib__lexer;
  2507. int __pyx_module_is_main_fontTools__feaLib__lexer = 0;
  2508. /* Implementation of "fontTools.feaLib.lexer" */
  2509. /* #### Code section: global_var ### */
  2510. static PyObject *__pyx_builtin_object;
  2511. static PyObject *__pyx_builtin_staticmethod;
  2512. static PyObject *__pyx_builtin_open;
  2513. /* #### Code section: string_decls ### */
  2514. /* #### Code section: decls ### */
  2515. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_text, PyObject *__pyx_v_filename); /* proto */
  2516. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2517. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2518. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2519. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_8location_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2520. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_10next_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2521. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_valid); /* proto */
  2522. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stop_at); /* proto */
  2523. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
  2524. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_featurefile, PyObject *__pyx_v_includeDir); /* proto */
  2525. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2526. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2527. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2528. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_or_path); /* proto */
  2529. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
  2530. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2531. /* #### Code section: late_includes ### */
  2532. /* #### Code section: module_state ### */
  2533. /* SmallCodeConfig */
  2534. #ifndef CYTHON_SMALL_CODE
  2535. #if defined(__clang__)
  2536. #define CYTHON_SMALL_CODE
  2537. #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
  2538. #define CYTHON_SMALL_CODE __attribute__((cold))
  2539. #else
  2540. #define CYTHON_SMALL_CODE
  2541. #endif
  2542. #endif
  2543. typedef struct {
  2544. PyObject *__pyx_d;
  2545. PyObject *__pyx_b;
  2546. PyObject *__pyx_cython_runtime;
  2547. PyObject *__pyx_empty_tuple;
  2548. PyObject *__pyx_empty_bytes;
  2549. PyObject *__pyx_empty_unicode;
  2550. __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  2551. __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  2552. __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  2553. __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop;
  2554. PyObject *__pyx_tuple[4];
  2555. PyObject *__pyx_codeobj_tab[16];
  2556. PyObject *__pyx_string_tab[197];
  2557. PyObject *__pyx_number_tab[6];
  2558. /* #### Code section: module_state_contents ### */
  2559. /* IterNextPlain.module_state_decls */
  2560. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  2561. PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache;
  2562. #endif
  2563. /* CommonTypesMetaclass.module_state_decls */
  2564. PyTypeObject *__pyx_CommonTypesMetaclassType;
  2565. /* CachedMethodType.module_state_decls */
  2566. #if CYTHON_COMPILING_IN_LIMITED_API
  2567. PyObject *__Pyx_CachedMethodType;
  2568. #endif
  2569. /* CythonFunctionShared.module_state_decls */
  2570. PyTypeObject *__pyx_CyFunctionType;
  2571. /* CodeObjectCache.module_state_decls */
  2572. struct __Pyx_CodeObjectCache __pyx_code_cache;
  2573. /* #### Code section: module_state_end ### */
  2574. } __pyx_mstatetype;
  2575. #if CYTHON_USE_MODULE_STATE
  2576. #ifdef __cplusplus
  2577. namespace {
  2578. extern struct PyModuleDef __pyx_moduledef;
  2579. } /* anonymous namespace */
  2580. #else
  2581. static struct PyModuleDef __pyx_moduledef;
  2582. #endif
  2583. #define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
  2584. #define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
  2585. #else
  2586. static __pyx_mstatetype __pyx_mstate_global_static =
  2587. #ifdef __cplusplus
  2588. {};
  2589. #else
  2590. {0};
  2591. #endif
  2592. static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
  2593. #endif
  2594. /* #### Code section: constant_name_defines ### */
  2595. #define __pyx_kp_u_ __pyx_string_tab[0]
  2596. #define __pyx_kp_u_0 __pyx_string_tab[1]
  2597. #define __pyx_kp_u_0123456789 __pyx_string_tab[2]
  2598. #define __pyx_kp_u_0123456789ABCDEFabcdef __pyx_string_tab[3]
  2599. #define __pyx_kp_u_A_Lexer_that_follows_include_sta __pyx_string_tab[4]
  2600. #define __pyx_kp_u_A_Za_z_0_9 __pyx_string_tab[5]
  2601. #define __pyx_kp_u_Expected_after_file_name __pyx_string_tab[6]
  2602. #define __pyx_kp_u_Expected_before_file_name __pyx_string_tab[7]
  2603. #define __pyx_kp_u_Expected_file_name __pyx_string_tab[8]
  2604. #define __pyx_kp_u_Expected_glyph_class_name __pyx_string_tab[9]
  2605. #define __pyx_kp_u_Expected_s_to_terminate_anonymou __pyx_string_tab[10]
  2606. #define __pyx_kp_u_Expected_to_terminate_string __pyx_string_tab[11]
  2607. #define __pyx_kp_u_Glyph_class_names_must_consist_o __pyx_string_tab[12]
  2608. #define __pyx_kp_u_Lexer_that_does_not_follow_inclu __pyx_string_tab[13]
  2609. #define __pyx_kp_u_Lib_fontTools_feaLib_lexer_py __pyx_string_tab[14]
  2610. #define __pyx_kp_u_Too_many_recursive_includes __pyx_string_tab[15]
  2611. #define __pyx_kp_u_Unexpected_character_r __pyx_string_tab[16]
  2612. #define __pyx_kp_u__10 __pyx_string_tab[17]
  2613. #define __pyx_kp_u__11 __pyx_string_tab[18]
  2614. #define __pyx_kp_u__12 __pyx_string_tab[19]
  2615. #define __pyx_kp_u__13 __pyx_string_tab[20]
  2616. #define __pyx_kp_u__14 __pyx_string_tab[21]
  2617. #define __pyx_kp_u__15 __pyx_string_tab[22]
  2618. #define __pyx_kp_u__16 __pyx_string_tab[23]
  2619. #define __pyx_kp_u__17 __pyx_string_tab[24]
  2620. #define __pyx_kp_u__18 __pyx_string_tab[25]
  2621. #define __pyx_kp_u__2 __pyx_string_tab[26]
  2622. #define __pyx_kp_u__3 __pyx_string_tab[27]
  2623. #define __pyx_kp_u__4 __pyx_string_tab[28]
  2624. #define __pyx_kp_u__5 __pyx_string_tab[29]
  2625. #define __pyx_kp_u__6 __pyx_string_tab[30]
  2626. #define __pyx_kp_u__7 __pyx_string_tab[31]
  2627. #define __pyx_kp_u__8 __pyx_string_tab[32]
  2628. #define __pyx_kp_u__9 __pyx_string_tab[33]
  2629. #define __pyx_kp_u_features __pyx_string_tab[34]
  2630. #define __pyx_kp_u_s __pyx_string_tab[35]
  2631. #define __pyx_kp_u_s_2 __pyx_string_tab[36]
  2632. #define __pyx_kp_u_utf_8_sig __pyx_string_tab[37]
  2633. #define __pyx_n_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef __pyx_string_tab[38]
  2634. #define __pyx_n_u_ANONYMOUS_BLOCK __pyx_string_tab[39]
  2635. #define __pyx_n_u_CHAR_DIGIT __pyx_string_tab[40]
  2636. #define __pyx_n_u_CHAR_HEXDIGIT __pyx_string_tab[41]
  2637. #define __pyx_n_u_CHAR_LETTER __pyx_string_tab[42]
  2638. #define __pyx_n_u_CHAR_NAME_CONTINUATION __pyx_string_tab[43]
  2639. #define __pyx_n_u_CHAR_NAME_START __pyx_string_tab[44]
  2640. #define __pyx_n_u_CHAR_NEWLINE __pyx_string_tab[45]
  2641. #define __pyx_n_u_CHAR_SYMBOL __pyx_string_tab[46]
  2642. #define __pyx_n_u_CHAR_WHITESPACE __pyx_string_tab[47]
  2643. #define __pyx_n_u_CID __pyx_string_tab[48]
  2644. #define __pyx_n_u_COMMENT __pyx_string_tab[49]
  2645. #define __pyx_n_u_FILENAME __pyx_string_tab[50]
  2646. #define __pyx_n_u_FLOAT __pyx_string_tab[51]
  2647. #define __pyx_n_u_FeatureLibError __pyx_string_tab[52]
  2648. #define __pyx_n_u_FeatureLibLocation __pyx_string_tab[53]
  2649. #define __pyx_n_u_GLYPHCLASS __pyx_string_tab[54]
  2650. #define __pyx_n_u_HEXADECIMAL __pyx_string_tab[55]
  2651. #define __pyx_n_u_IncludedFeaNotFound __pyx_string_tab[56]
  2652. #define __pyx_n_u_IncludingLexer __pyx_string_tab[57]
  2653. #define __pyx_n_u_IncludingLexer___init __pyx_string_tab[58]
  2654. #define __pyx_n_u_IncludingLexer___iter __pyx_string_tab[59]
  2655. #define __pyx_n_u_IncludingLexer___next __pyx_string_tab[60]
  2656. #define __pyx_n_u_IncludingLexer_make_lexer __pyx_string_tab[61]
  2657. #define __pyx_n_u_IncludingLexer_next __pyx_string_tab[62]
  2658. #define __pyx_n_u_IncludingLexer_scan_anonymous_bl __pyx_string_tab[63]
  2659. #define __pyx_n_u_Lexer __pyx_string_tab[64]
  2660. #define __pyx_n_u_Lexer___init __pyx_string_tab[65]
  2661. #define __pyx_n_u_Lexer___iter __pyx_string_tab[66]
  2662. #define __pyx_n_u_Lexer___next __pyx_string_tab[67]
  2663. #define __pyx_n_u_Lexer_location __pyx_string_tab[68]
  2664. #define __pyx_n_u_Lexer_next __pyx_string_tab[69]
  2665. #define __pyx_n_u_Lexer_next_2 __pyx_string_tab[70]
  2666. #define __pyx_n_u_Lexer_scan_anonymous_block __pyx_string_tab[71]
  2667. #define __pyx_n_u_Lexer_scan_over __pyx_string_tab[72]
  2668. #define __pyx_n_u_Lexer_scan_until __pyx_string_tab[73]
  2669. #define __pyx_n_u_MODE_FILENAME __pyx_string_tab[74]
  2670. #define __pyx_n_u_MODE_NORMAL __pyx_string_tab[75]
  2671. #define __pyx_n_u_NAME __pyx_string_tab[76]
  2672. #define __pyx_n_u_NEWLINE __pyx_string_tab[77]
  2673. #define __pyx_n_u_NORMAL __pyx_string_tab[78]
  2674. #define __pyx_n_u_NUMBER __pyx_string_tab[79]
  2675. #define __pyx_n_u_NUMBERS __pyx_string_tab[80]
  2676. #define __pyx_n_u_NonIncludingLexer __pyx_string_tab[81]
  2677. #define __pyx_n_u_NonIncludingLexer___next __pyx_string_tab[82]
  2678. #define __pyx_n_u_OCTAL __pyx_string_tab[83]
  2679. #define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[84]
  2680. #define __pyx_n_u_RE_GLYPHCLASS __pyx_string_tab[85]
  2681. #define __pyx_n_u_STRING __pyx_string_tab[86]
  2682. #define __pyx_n_u_SYMBOL __pyx_string_tab[87]
  2683. #define __pyx_n_u_append __pyx_string_tab[88]
  2684. #define __pyx_n_u_asyncio_coroutines __pyx_string_tab[89]
  2685. #define __pyx_n_u_class_getitem __pyx_string_tab[90]
  2686. #define __pyx_n_u_cline_in_traceback __pyx_string_tab[91]
  2687. #define __pyx_n_u_close __pyx_string_tab[92]
  2688. #define __pyx_n_u_closing __pyx_string_tab[93]
  2689. #define __pyx_n_u_column __pyx_string_tab[94]
  2690. #define __pyx_n_u_compile __pyx_string_tab[95]
  2691. #define __pyx_n_u_cur_char __pyx_string_tab[96]
  2692. #define __pyx_n_u_curpath __pyx_string_tab[97]
  2693. #define __pyx_n_u_data __pyx_string_tab[98]
  2694. #define __pyx_n_u_dirname __pyx_string_tab[99]
  2695. #define __pyx_n_u_doc __pyx_string_tab[100]
  2696. #define __pyx_n_u_encoding __pyx_string_tab[101]
  2697. #define __pyx_n_u_err __pyx_string_tab[102]
  2698. #define __pyx_n_u_featurefile __pyx_string_tab[103]
  2699. #define __pyx_n_u_featurefilepath __pyx_string_tab[104]
  2700. #define __pyx_n_u_file_or_path __pyx_string_tab[105]
  2701. #define __pyx_n_u_filename __pyx_string_tab[106]
  2702. #define __pyx_n_u_filename_2 __pyx_string_tab[107]
  2703. #define __pyx_n_u_fileobj __pyx_string_tab[108]
  2704. #define __pyx_n_u_fname_location __pyx_string_tab[109]
  2705. #define __pyx_n_u_fname_token __pyx_string_tab[110]
  2706. #define __pyx_n_u_fname_type __pyx_string_tab[111]
  2707. #define __pyx_n_u_fontTools_feaLib_error __pyx_string_tab[112]
  2708. #define __pyx_n_u_fontTools_feaLib_lexer __pyx_string_tab[113]
  2709. #define __pyx_n_u_fontTools_feaLib_location __pyx_string_tab[114]
  2710. #define __pyx_n_u_func __pyx_string_tab[115]
  2711. #define __pyx_n_u_getcwd __pyx_string_tab[116]
  2712. #define __pyx_n_u_glyphclass __pyx_string_tab[117]
  2713. #define __pyx_n_u_include __pyx_string_tab[118]
  2714. #define __pyx_n_u_includeDir __pyx_string_tab[119]
  2715. #define __pyx_n_u_init __pyx_string_tab[120]
  2716. #define __pyx_n_u_is_coroutine __pyx_string_tab[121]
  2717. #define __pyx_n_u_isabs __pyx_string_tab[122]
  2718. #define __pyx_n_u_items __pyx_string_tab[123]
  2719. #define __pyx_n_u_iter __pyx_string_tab[124]
  2720. #define __pyx_n_u_join __pyx_string_tab[125]
  2721. #define __pyx_n_u_lexer __pyx_string_tab[126]
  2722. #define __pyx_n_u_lexers __pyx_string_tab[127]
  2723. #define __pyx_n_u_limit __pyx_string_tab[128]
  2724. #define __pyx_n_u_line __pyx_string_tab[129]
  2725. #define __pyx_n_u_line_start __pyx_string_tab[130]
  2726. #define __pyx_n_u_location __pyx_string_tab[131]
  2727. #define __pyx_n_u_location_2 __pyx_string_tab[132]
  2728. #define __pyx_n_u_main __pyx_string_tab[133]
  2729. #define __pyx_n_u_make_lexer __pyx_string_tab[134]
  2730. #define __pyx_n_u_match __pyx_string_tab[135]
  2731. #define __pyx_n_u_maxsplit __pyx_string_tab[136]
  2732. #define __pyx_n_u_metaclass __pyx_string_tab[137]
  2733. #define __pyx_n_u_mode __pyx_string_tab[138]
  2734. #define __pyx_n_u_module __pyx_string_tab[139]
  2735. #define __pyx_n_u_mro_entries __pyx_string_tab[140]
  2736. #define __pyx_n_u_name __pyx_string_tab[141]
  2737. #define __pyx_n_u_name_2 __pyx_string_tab[142]
  2738. #define __pyx_n_u_next __pyx_string_tab[143]
  2739. #define __pyx_n_u_next_2 __pyx_string_tab[144]
  2740. #define __pyx_n_u_next_3 __pyx_string_tab[145]
  2741. #define __pyx_n_u_next_char __pyx_string_tab[146]
  2742. #define __pyx_n_u_object __pyx_string_tab[147]
  2743. #define __pyx_n_u_open __pyx_string_tab[148]
  2744. #define __pyx_n_u_os __pyx_string_tab[149]
  2745. #define __pyx_n_u_p __pyx_string_tab[150]
  2746. #define __pyx_n_u_path __pyx_string_tab[151]
  2747. #define __pyx_n_u_pop __pyx_string_tab[152]
  2748. #define __pyx_n_u_pos __pyx_string_tab[153]
  2749. #define __pyx_n_u_prepare __pyx_string_tab[154]
  2750. #define __pyx_n_u_qualname __pyx_string_tab[155]
  2751. #define __pyx_n_u_r __pyx_string_tab[156]
  2752. #define __pyx_n_u_re __pyx_string_tab[157]
  2753. #define __pyx_n_u_read __pyx_string_tab[158]
  2754. #define __pyx_n_u_regexp __pyx_string_tab[159]
  2755. #define __pyx_n_u_scan_anonymous_block __pyx_string_tab[160]
  2756. #define __pyx_n_u_scan_over __pyx_string_tab[161]
  2757. #define __pyx_n_u_scan_until __pyx_string_tab[162]
  2758. #define __pyx_n_u_self __pyx_string_tab[163]
  2759. #define __pyx_n_u_set_name __pyx_string_tab[164]
  2760. #define __pyx_n_u_setdefault __pyx_string_tab[165]
  2761. #define __pyx_n_u_split __pyx_string_tab[166]
  2762. #define __pyx_n_u_start __pyx_string_tab[167]
  2763. #define __pyx_n_u_staticmethod __pyx_string_tab[168]
  2764. #define __pyx_n_u_stop_at __pyx_string_tab[169]
  2765. #define __pyx_n_u_string __pyx_string_tab[170]
  2766. #define __pyx_n_u_strip __pyx_string_tab[171]
  2767. #define __pyx_n_u_sub __pyx_string_tab[172]
  2768. #define __pyx_n_u_tag __pyx_string_tab[173]
  2769. #define __pyx_n_u_test __pyx_string_tab[174]
  2770. #define __pyx_n_u_text __pyx_string_tab[175]
  2771. #define __pyx_n_u_text_2 __pyx_string_tab[176]
  2772. #define __pyx_n_u_text_length __pyx_string_tab[177]
  2773. #define __pyx_n_u_token __pyx_string_tab[178]
  2774. #define __pyx_n_u_token_type __pyx_string_tab[179]
  2775. #define __pyx_n_u_valid __pyx_string_tab[180]
  2776. #define __pyx_n_u_values __pyx_string_tab[181]
  2777. #define __pyx_n_u_xX __pyx_string_tab[182]
  2778. #define __pyx_kp_b_iso88591_A_4z_c_q_L_a_Kq_Q_4r_V1D_1_3awc __pyx_string_tab[183]
  2779. #define __pyx_kp_b_iso88591_A_7_Z_Q_j_a_d_U_1_we1_7_9HA_1_6 __pyx_string_tab[184]
  2780. #define __pyx_kp_b_iso88591_A_D_b_nD_F_3c_HA __pyx_string_tab[185]
  2781. #define __pyx_kp_b_iso88591_A_D_b_nD_F_3gQ_HA __pyx_string_tab[186]
  2782. #define __pyx_kp_b_iso88591_A_Kq_Q_4z_A_t1_1A_6_A_q_4q_D_r_v __pyx_string_tab[187]
  2783. #define __pyx_kp_b_iso88591_A_M_IQ_HA_O1_IQ_Cq_IU __pyx_string_tab[188]
  2784. #define __pyx_kp_b_iso88591_A_V2T_b_k_N_ha __pyx_string_tab[189]
  2785. #define __pyx_kp_b_iso88591_A_d_D_G_d_1_HD_U_F_Q_M_uA_gU_2U __pyx_string_tab[190]
  2786. #define __pyx_kp_b_iso88591_A_fA_U_G1 __pyx_string_tab[191]
  2787. #define __pyx_kp_b_iso88591_A_q __pyx_string_tab[192]
  2788. #define __pyx_kp_b_iso88591_A_t1D __pyx_string_tab[193]
  2789. #define __pyx_kp_b_iso88591_A_t82R_4AQ __pyx_string_tab[194]
  2790. #define __pyx_kp_b_iso88591_A_t9A __pyx_string_tab[195]
  2791. #define __pyx_kp_b_iso88591_q_Kq_L_t81Ba_N __pyx_string_tab[196]
  2792. #define __pyx_int_0 __pyx_number_tab[0]
  2793. #define __pyx_int_1 __pyx_number_tab[1]
  2794. #define __pyx_int_2 __pyx_number_tab[2]
  2795. #define __pyx_int_8 __pyx_number_tab[3]
  2796. #define __pyx_int_10 __pyx_number_tab[4]
  2797. #define __pyx_int_16 __pyx_number_tab[5]
  2798. /* #### Code section: module_state_clear ### */
  2799. #if CYTHON_USE_MODULE_STATE
  2800. static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  2801. __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  2802. if (!clear_module_state) return 0;
  2803. Py_CLEAR(clear_module_state->__pyx_d);
  2804. Py_CLEAR(clear_module_state->__pyx_b);
  2805. Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  2806. Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  2807. Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  2808. Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  2809. #if CYTHON_PEP489_MULTI_PHASE_INIT
  2810. __Pyx_State_RemoveModule(NULL);
  2811. #endif
  2812. for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  2813. for (int i=0; i<16; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  2814. for (int i=0; i<197; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  2815. for (int i=0; i<6; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
  2816. /* #### Code section: module_state_clear_contents ### */
  2817. /* CommonTypesMetaclass.module_state_clear */
  2818. Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
  2819. /* CythonFunctionShared.module_state_clear */
  2820. Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  2821. /* #### Code section: module_state_clear_end ### */
  2822. return 0;
  2823. }
  2824. #endif
  2825. /* #### Code section: module_state_traverse ### */
  2826. #if CYTHON_USE_MODULE_STATE
  2827. static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  2828. __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  2829. if (!traverse_module_state) return 0;
  2830. Py_VISIT(traverse_module_state->__pyx_d);
  2831. Py_VISIT(traverse_module_state->__pyx_b);
  2832. Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  2833. __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  2834. __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  2835. __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  2836. for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  2837. for (int i=0; i<16; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  2838. for (int i=0; i<197; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  2839. for (int i=0; i<6; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
  2840. /* #### Code section: module_state_traverse_contents ### */
  2841. /* CommonTypesMetaclass.module_state_traverse */
  2842. Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
  2843. /* CythonFunctionShared.module_state_traverse */
  2844. Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  2845. /* #### Code section: module_state_traverse_end ### */
  2846. return 0;
  2847. }
  2848. #endif
  2849. /* #### Code section: module_code ### */
  2850. /* "fontTools/feaLib/lexer.py":43
  2851. * MODE_FILENAME_ = "FILENAME"
  2852. *
  2853. * def __init__(self, text, filename): # <<<<<<<<<<<<<<
  2854. * self.filename_ = filename
  2855. * self.line_ = 1
  2856. */
  2857. /* Python wrapper */
  2858. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_1__init__(PyObject *__pyx_self,
  2859. #if CYTHON_METH_FASTCALL
  2860. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  2861. #else
  2862. PyObject *__pyx_args, PyObject *__pyx_kwds
  2863. #endif
  2864. ); /*proto*/
  2865. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer___init__, "Lexer.__init__(self, text, filename)");
  2866. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer___init__};
  2867. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_1__init__(PyObject *__pyx_self,
  2868. #if CYTHON_METH_FASTCALL
  2869. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  2870. #else
  2871. PyObject *__pyx_args, PyObject *__pyx_kwds
  2872. #endif
  2873. ) {
  2874. PyObject *__pyx_v_self = 0;
  2875. PyObject *__pyx_v_text = 0;
  2876. PyObject *__pyx_v_filename = 0;
  2877. #if !CYTHON_METH_FASTCALL
  2878. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  2879. #endif
  2880. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  2881. PyObject* values[3] = {0,0,0};
  2882. int __pyx_lineno = 0;
  2883. const char *__pyx_filename = NULL;
  2884. int __pyx_clineno = 0;
  2885. PyObject *__pyx_r = 0;
  2886. __Pyx_RefNannyDeclarations
  2887. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  2888. #if !CYTHON_METH_FASTCALL
  2889. #if CYTHON_ASSUME_SAFE_SIZE
  2890. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  2891. #else
  2892. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  2893. #endif
  2894. #endif
  2895. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  2896. {
  2897. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_text,&__pyx_mstate_global->__pyx_n_u_filename,0};
  2898. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  2899. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 43, __pyx_L3_error)
  2900. if (__pyx_kwds_len > 0) {
  2901. switch (__pyx_nargs) {
  2902. case 3:
  2903. values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
  2904. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 43, __pyx_L3_error)
  2905. CYTHON_FALLTHROUGH;
  2906. case 2:
  2907. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  2908. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 43, __pyx_L3_error)
  2909. CYTHON_FALLTHROUGH;
  2910. case 1:
  2911. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  2912. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 43, __pyx_L3_error)
  2913. CYTHON_FALLTHROUGH;
  2914. case 0: break;
  2915. default: goto __pyx_L5_argtuple_error;
  2916. }
  2917. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  2918. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 43, __pyx_L3_error)
  2919. for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
  2920. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 43, __pyx_L3_error) }
  2921. }
  2922. } else if (unlikely(__pyx_nargs != 3)) {
  2923. goto __pyx_L5_argtuple_error;
  2924. } else {
  2925. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  2926. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 43, __pyx_L3_error)
  2927. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  2928. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 43, __pyx_L3_error)
  2929. values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
  2930. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 43, __pyx_L3_error)
  2931. }
  2932. __pyx_v_self = values[0];
  2933. __pyx_v_text = values[1];
  2934. __pyx_v_filename = values[2];
  2935. }
  2936. goto __pyx_L6_skip;
  2937. __pyx_L5_argtuple_error:;
  2938. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 43, __pyx_L3_error)
  2939. __pyx_L6_skip:;
  2940. goto __pyx_L4_argument_unpacking_done;
  2941. __pyx_L3_error:;
  2942. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  2943. Py_XDECREF(values[__pyx_temp]);
  2944. }
  2945. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2946. __Pyx_RefNannyFinishContext();
  2947. return NULL;
  2948. __pyx_L4_argument_unpacking_done:;
  2949. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer___init__(__pyx_self, __pyx_v_self, __pyx_v_text, __pyx_v_filename);
  2950. /* function exit code */
  2951. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  2952. Py_XDECREF(values[__pyx_temp]);
  2953. }
  2954. __Pyx_RefNannyFinishContext();
  2955. return __pyx_r;
  2956. }
  2957. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_text, PyObject *__pyx_v_filename) {
  2958. PyObject *__pyx_r = NULL;
  2959. __Pyx_RefNannyDeclarations
  2960. Py_ssize_t __pyx_t_1;
  2961. PyObject *__pyx_t_2 = NULL;
  2962. PyObject *__pyx_t_3 = NULL;
  2963. int __pyx_lineno = 0;
  2964. const char *__pyx_filename = NULL;
  2965. int __pyx_clineno = 0;
  2966. __Pyx_RefNannySetupContext("__init__", 0);
  2967. /* "fontTools/feaLib/lexer.py":44
  2968. *
  2969. * def __init__(self, text, filename):
  2970. * self.filename_ = filename # <<<<<<<<<<<<<<
  2971. * self.line_ = 1
  2972. * self.pos_ = 0
  2973. */
  2974. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_filename_2, __pyx_v_filename) < (0)) __PYX_ERR(0, 44, __pyx_L1_error)
  2975. /* "fontTools/feaLib/lexer.py":45
  2976. * def __init__(self, text, filename):
  2977. * self.filename_ = filename
  2978. * self.line_ = 1 # <<<<<<<<<<<<<<
  2979. * self.pos_ = 0
  2980. * self.line_start_ = 0
  2981. */
  2982. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 45, __pyx_L1_error)
  2983. /* "fontTools/feaLib/lexer.py":46
  2984. * self.filename_ = filename
  2985. * self.line_ = 1
  2986. * self.pos_ = 0 # <<<<<<<<<<<<<<
  2987. * self.line_start_ = 0
  2988. * self.text_ = text
  2989. */
  2990. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 46, __pyx_L1_error)
  2991. /* "fontTools/feaLib/lexer.py":47
  2992. * self.line_ = 1
  2993. * self.pos_ = 0
  2994. * self.line_start_ = 0 # <<<<<<<<<<<<<<
  2995. * self.text_ = text
  2996. * self.text_length_ = len(text)
  2997. */
  2998. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line_start, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 47, __pyx_L1_error)
  2999. /* "fontTools/feaLib/lexer.py":48
  3000. * self.pos_ = 0
  3001. * self.line_start_ = 0
  3002. * self.text_ = text # <<<<<<<<<<<<<<
  3003. * self.text_length_ = len(text)
  3004. * self.mode_ = Lexer.MODE_NORMAL_
  3005. */
  3006. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2, __pyx_v_text) < (0)) __PYX_ERR(0, 48, __pyx_L1_error)
  3007. /* "fontTools/feaLib/lexer.py":49
  3008. * self.line_start_ = 0
  3009. * self.text_ = text
  3010. * self.text_length_ = len(text) # <<<<<<<<<<<<<<
  3011. * self.mode_ = Lexer.MODE_NORMAL_
  3012. *
  3013. */
  3014. __pyx_t_1 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 49, __pyx_L1_error)
  3015. __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  3016. __Pyx_GOTREF(__pyx_t_2);
  3017. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_length, __pyx_t_2) < (0)) __PYX_ERR(0, 49, __pyx_L1_error)
  3018. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3019. /* "fontTools/feaLib/lexer.py":50
  3020. * self.text_ = text
  3021. * self.text_length_ = len(text)
  3022. * self.mode_ = Lexer.MODE_NORMAL_ # <<<<<<<<<<<<<<
  3023. *
  3024. * def __iter__(self):
  3025. */
  3026. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  3027. __Pyx_GOTREF(__pyx_t_2);
  3028. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MODE_NORMAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
  3029. __Pyx_GOTREF(__pyx_t_3);
  3030. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3031. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_mode, __pyx_t_3) < (0)) __PYX_ERR(0, 50, __pyx_L1_error)
  3032. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3033. /* "fontTools/feaLib/lexer.py":43
  3034. * MODE_FILENAME_ = "FILENAME"
  3035. *
  3036. * def __init__(self, text, filename): # <<<<<<<<<<<<<<
  3037. * self.filename_ = filename
  3038. * self.line_ = 1
  3039. */
  3040. /* function exit code */
  3041. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  3042. goto __pyx_L0;
  3043. __pyx_L1_error:;
  3044. __Pyx_XDECREF(__pyx_t_2);
  3045. __Pyx_XDECREF(__pyx_t_3);
  3046. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3047. __pyx_r = NULL;
  3048. __pyx_L0:;
  3049. __Pyx_XGIVEREF(__pyx_r);
  3050. __Pyx_RefNannyFinishContext();
  3051. return __pyx_r;
  3052. }
  3053. /* "fontTools/feaLib/lexer.py":52
  3054. * self.mode_ = Lexer.MODE_NORMAL_
  3055. *
  3056. * def __iter__(self): # <<<<<<<<<<<<<<
  3057. * return self
  3058. *
  3059. */
  3060. /* Python wrapper */
  3061. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_3__iter__(PyObject *__pyx_self,
  3062. #if CYTHON_METH_FASTCALL
  3063. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3064. #else
  3065. PyObject *__pyx_args, PyObject *__pyx_kwds
  3066. #endif
  3067. ); /*proto*/
  3068. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_2__iter__, "Lexer.__iter__(self)");
  3069. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_3__iter__ = {"__iter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_3__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_2__iter__};
  3070. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_3__iter__(PyObject *__pyx_self,
  3071. #if CYTHON_METH_FASTCALL
  3072. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3073. #else
  3074. PyObject *__pyx_args, PyObject *__pyx_kwds
  3075. #endif
  3076. ) {
  3077. PyObject *__pyx_v_self = 0;
  3078. #if !CYTHON_METH_FASTCALL
  3079. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3080. #endif
  3081. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3082. PyObject* values[1] = {0};
  3083. int __pyx_lineno = 0;
  3084. const char *__pyx_filename = NULL;
  3085. int __pyx_clineno = 0;
  3086. PyObject *__pyx_r = 0;
  3087. __Pyx_RefNannyDeclarations
  3088. __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  3089. #if !CYTHON_METH_FASTCALL
  3090. #if CYTHON_ASSUME_SAFE_SIZE
  3091. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3092. #else
  3093. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3094. #endif
  3095. #endif
  3096. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3097. {
  3098. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3099. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3100. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 52, __pyx_L3_error)
  3101. if (__pyx_kwds_len > 0) {
  3102. switch (__pyx_nargs) {
  3103. case 1:
  3104. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3105. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 52, __pyx_L3_error)
  3106. CYTHON_FALLTHROUGH;
  3107. case 0: break;
  3108. default: goto __pyx_L5_argtuple_error;
  3109. }
  3110. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3111. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__iter__", 0) < (0)) __PYX_ERR(0, 52, __pyx_L3_error)
  3112. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3113. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, i); __PYX_ERR(0, 52, __pyx_L3_error) }
  3114. }
  3115. } else if (unlikely(__pyx_nargs != 1)) {
  3116. goto __pyx_L5_argtuple_error;
  3117. } else {
  3118. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3119. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 52, __pyx_L3_error)
  3120. }
  3121. __pyx_v_self = values[0];
  3122. }
  3123. goto __pyx_L6_skip;
  3124. __pyx_L5_argtuple_error:;
  3125. __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 52, __pyx_L3_error)
  3126. __pyx_L6_skip:;
  3127. goto __pyx_L4_argument_unpacking_done;
  3128. __pyx_L3_error:;
  3129. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3130. Py_XDECREF(values[__pyx_temp]);
  3131. }
  3132. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3133. __Pyx_RefNannyFinishContext();
  3134. return NULL;
  3135. __pyx_L4_argument_unpacking_done:;
  3136. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_2__iter__(__pyx_self, __pyx_v_self);
  3137. /* function exit code */
  3138. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3139. Py_XDECREF(values[__pyx_temp]);
  3140. }
  3141. __Pyx_RefNannyFinishContext();
  3142. return __pyx_r;
  3143. }
  3144. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3145. PyObject *__pyx_r = NULL;
  3146. __Pyx_RefNannyDeclarations
  3147. __Pyx_RefNannySetupContext("__iter__", 0);
  3148. /* "fontTools/feaLib/lexer.py":53
  3149. *
  3150. * def __iter__(self):
  3151. * return self # <<<<<<<<<<<<<<
  3152. *
  3153. * def next(self): # Python 2
  3154. */
  3155. __Pyx_XDECREF(__pyx_r);
  3156. __Pyx_INCREF(__pyx_v_self);
  3157. __pyx_r = __pyx_v_self;
  3158. goto __pyx_L0;
  3159. /* "fontTools/feaLib/lexer.py":52
  3160. * self.mode_ = Lexer.MODE_NORMAL_
  3161. *
  3162. * def __iter__(self): # <<<<<<<<<<<<<<
  3163. * return self
  3164. *
  3165. */
  3166. /* function exit code */
  3167. __pyx_L0:;
  3168. __Pyx_XGIVEREF(__pyx_r);
  3169. __Pyx_RefNannyFinishContext();
  3170. return __pyx_r;
  3171. }
  3172. /* "fontTools/feaLib/lexer.py":55
  3173. * return self
  3174. *
  3175. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  3176. * return self.__next__()
  3177. *
  3178. */
  3179. /* Python wrapper */
  3180. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_5next(PyObject *__pyx_self,
  3181. #if CYTHON_METH_FASTCALL
  3182. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3183. #else
  3184. PyObject *__pyx_args, PyObject *__pyx_kwds
  3185. #endif
  3186. ); /*proto*/
  3187. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_4next, "Lexer.next(self)");
  3188. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_5next = {"next", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_5next, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_4next};
  3189. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_5next(PyObject *__pyx_self,
  3190. #if CYTHON_METH_FASTCALL
  3191. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3192. #else
  3193. PyObject *__pyx_args, PyObject *__pyx_kwds
  3194. #endif
  3195. ) {
  3196. PyObject *__pyx_v_self = 0;
  3197. #if !CYTHON_METH_FASTCALL
  3198. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3199. #endif
  3200. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3201. PyObject* values[1] = {0};
  3202. int __pyx_lineno = 0;
  3203. const char *__pyx_filename = NULL;
  3204. int __pyx_clineno = 0;
  3205. PyObject *__pyx_r = 0;
  3206. __Pyx_RefNannyDeclarations
  3207. __Pyx_RefNannySetupContext("next (wrapper)", 0);
  3208. #if !CYTHON_METH_FASTCALL
  3209. #if CYTHON_ASSUME_SAFE_SIZE
  3210. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3211. #else
  3212. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3213. #endif
  3214. #endif
  3215. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3216. {
  3217. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3218. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3219. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 55, __pyx_L3_error)
  3220. if (__pyx_kwds_len > 0) {
  3221. switch (__pyx_nargs) {
  3222. case 1:
  3223. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3224. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 55, __pyx_L3_error)
  3225. CYTHON_FALLTHROUGH;
  3226. case 0: break;
  3227. default: goto __pyx_L5_argtuple_error;
  3228. }
  3229. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3230. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "next", 0) < (0)) __PYX_ERR(0, 55, __pyx_L3_error)
  3231. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3232. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, i); __PYX_ERR(0, 55, __pyx_L3_error) }
  3233. }
  3234. } else if (unlikely(__pyx_nargs != 1)) {
  3235. goto __pyx_L5_argtuple_error;
  3236. } else {
  3237. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3238. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 55, __pyx_L3_error)
  3239. }
  3240. __pyx_v_self = values[0];
  3241. }
  3242. goto __pyx_L6_skip;
  3243. __pyx_L5_argtuple_error:;
  3244. __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 55, __pyx_L3_error)
  3245. __pyx_L6_skip:;
  3246. goto __pyx_L4_argument_unpacking_done;
  3247. __pyx_L3_error:;
  3248. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3249. Py_XDECREF(values[__pyx_temp]);
  3250. }
  3251. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3252. __Pyx_RefNannyFinishContext();
  3253. return NULL;
  3254. __pyx_L4_argument_unpacking_done:;
  3255. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_4next(__pyx_self, __pyx_v_self);
  3256. /* function exit code */
  3257. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3258. Py_XDECREF(values[__pyx_temp]);
  3259. }
  3260. __Pyx_RefNannyFinishContext();
  3261. return __pyx_r;
  3262. }
  3263. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3264. PyObject *__pyx_r = NULL;
  3265. __Pyx_RefNannyDeclarations
  3266. PyObject *__pyx_t_1 = NULL;
  3267. PyObject *__pyx_t_2 = NULL;
  3268. size_t __pyx_t_3;
  3269. int __pyx_lineno = 0;
  3270. const char *__pyx_filename = NULL;
  3271. int __pyx_clineno = 0;
  3272. __Pyx_RefNannySetupContext("next", 0);
  3273. /* "fontTools/feaLib/lexer.py":56
  3274. *
  3275. * def next(self): # Python 2
  3276. * return self.__next__() # <<<<<<<<<<<<<<
  3277. *
  3278. * def __next__(self): # Python 3
  3279. */
  3280. __Pyx_XDECREF(__pyx_r);
  3281. __pyx_t_2 = __pyx_v_self;
  3282. __Pyx_INCREF(__pyx_t_2);
  3283. __pyx_t_3 = 0;
  3284. {
  3285. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  3286. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_next, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  3287. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  3288. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  3289. __Pyx_GOTREF(__pyx_t_1);
  3290. }
  3291. __pyx_r = __pyx_t_1;
  3292. __pyx_t_1 = 0;
  3293. goto __pyx_L0;
  3294. /* "fontTools/feaLib/lexer.py":55
  3295. * return self
  3296. *
  3297. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  3298. * return self.__next__()
  3299. *
  3300. */
  3301. /* function exit code */
  3302. __pyx_L1_error:;
  3303. __Pyx_XDECREF(__pyx_t_1);
  3304. __Pyx_XDECREF(__pyx_t_2);
  3305. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3306. __pyx_r = NULL;
  3307. __pyx_L0:;
  3308. __Pyx_XGIVEREF(__pyx_r);
  3309. __Pyx_RefNannyFinishContext();
  3310. return __pyx_r;
  3311. }
  3312. /* "fontTools/feaLib/lexer.py":58
  3313. * return self.__next__()
  3314. *
  3315. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  3316. * while True:
  3317. * token_type, token, location = self.next_()
  3318. */
  3319. /* Python wrapper */
  3320. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_7__next__(PyObject *__pyx_self,
  3321. #if CYTHON_METH_FASTCALL
  3322. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3323. #else
  3324. PyObject *__pyx_args, PyObject *__pyx_kwds
  3325. #endif
  3326. ); /*proto*/
  3327. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_6__next__, "Lexer.__next__(self)");
  3328. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_7__next__ = {"__next__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_7__next__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_6__next__};
  3329. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_7__next__(PyObject *__pyx_self,
  3330. #if CYTHON_METH_FASTCALL
  3331. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3332. #else
  3333. PyObject *__pyx_args, PyObject *__pyx_kwds
  3334. #endif
  3335. ) {
  3336. PyObject *__pyx_v_self = 0;
  3337. #if !CYTHON_METH_FASTCALL
  3338. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3339. #endif
  3340. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3341. PyObject* values[1] = {0};
  3342. int __pyx_lineno = 0;
  3343. const char *__pyx_filename = NULL;
  3344. int __pyx_clineno = 0;
  3345. PyObject *__pyx_r = 0;
  3346. __Pyx_RefNannyDeclarations
  3347. __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  3348. #if !CYTHON_METH_FASTCALL
  3349. #if CYTHON_ASSUME_SAFE_SIZE
  3350. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3351. #else
  3352. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3353. #endif
  3354. #endif
  3355. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3356. {
  3357. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3358. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3359. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 58, __pyx_L3_error)
  3360. if (__pyx_kwds_len > 0) {
  3361. switch (__pyx_nargs) {
  3362. case 1:
  3363. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3364. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 58, __pyx_L3_error)
  3365. CYTHON_FALLTHROUGH;
  3366. case 0: break;
  3367. default: goto __pyx_L5_argtuple_error;
  3368. }
  3369. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3370. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__next__", 0) < (0)) __PYX_ERR(0, 58, __pyx_L3_error)
  3371. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3372. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 58, __pyx_L3_error) }
  3373. }
  3374. } else if (unlikely(__pyx_nargs != 1)) {
  3375. goto __pyx_L5_argtuple_error;
  3376. } else {
  3377. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3378. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 58, __pyx_L3_error)
  3379. }
  3380. __pyx_v_self = values[0];
  3381. }
  3382. goto __pyx_L6_skip;
  3383. __pyx_L5_argtuple_error:;
  3384. __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 58, __pyx_L3_error)
  3385. __pyx_L6_skip:;
  3386. goto __pyx_L4_argument_unpacking_done;
  3387. __pyx_L3_error:;
  3388. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3389. Py_XDECREF(values[__pyx_temp]);
  3390. }
  3391. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3392. __Pyx_RefNannyFinishContext();
  3393. return NULL;
  3394. __pyx_L4_argument_unpacking_done:;
  3395. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_6__next__(__pyx_self, __pyx_v_self);
  3396. /* function exit code */
  3397. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3398. Py_XDECREF(values[__pyx_temp]);
  3399. }
  3400. __Pyx_RefNannyFinishContext();
  3401. return __pyx_r;
  3402. }
  3403. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3404. PyObject *__pyx_v_token_type = NULL;
  3405. PyObject *__pyx_v_token = NULL;
  3406. PyObject *__pyx_v_location = NULL;
  3407. PyObject *__pyx_r = NULL;
  3408. __Pyx_RefNannyDeclarations
  3409. PyObject *__pyx_t_1 = NULL;
  3410. PyObject *__pyx_t_2 = NULL;
  3411. size_t __pyx_t_3;
  3412. PyObject *__pyx_t_4 = NULL;
  3413. PyObject *__pyx_t_5 = NULL;
  3414. PyObject *__pyx_t_6 = NULL;
  3415. PyObject *(*__pyx_t_7)(PyObject *);
  3416. int __pyx_t_8;
  3417. int __pyx_lineno = 0;
  3418. const char *__pyx_filename = NULL;
  3419. int __pyx_clineno = 0;
  3420. __Pyx_RefNannySetupContext("__next__", 0);
  3421. /* "fontTools/feaLib/lexer.py":59
  3422. *
  3423. * def __next__(self): # Python 3
  3424. * while True: # <<<<<<<<<<<<<<
  3425. * token_type, token, location = self.next_()
  3426. * if token_type != Lexer.NEWLINE:
  3427. */
  3428. while (1) {
  3429. /* "fontTools/feaLib/lexer.py":60
  3430. * def __next__(self): # Python 3
  3431. * while True:
  3432. * token_type, token, location = self.next_() # <<<<<<<<<<<<<<
  3433. * if token_type != Lexer.NEWLINE:
  3434. * return (token_type, token, location)
  3435. */
  3436. __pyx_t_2 = __pyx_v_self;
  3437. __Pyx_INCREF(__pyx_t_2);
  3438. __pyx_t_3 = 0;
  3439. {
  3440. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  3441. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_next_2, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  3442. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  3443. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  3444. __Pyx_GOTREF(__pyx_t_1);
  3445. }
  3446. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  3447. PyObject* sequence = __pyx_t_1;
  3448. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  3449. if (unlikely(size != 3)) {
  3450. if (size > 3) __Pyx_RaiseTooManyValuesError(3);
  3451. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  3452. __PYX_ERR(0, 60, __pyx_L1_error)
  3453. }
  3454. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3455. if (likely(PyTuple_CheckExact(sequence))) {
  3456. __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
  3457. __Pyx_INCREF(__pyx_t_2);
  3458. __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
  3459. __Pyx_INCREF(__pyx_t_4);
  3460. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2);
  3461. __Pyx_INCREF(__pyx_t_5);
  3462. } else {
  3463. __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
  3464. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  3465. __Pyx_XGOTREF(__pyx_t_2);
  3466. __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
  3467. if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
  3468. __Pyx_XGOTREF(__pyx_t_4);
  3469. __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
  3470. if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
  3471. __Pyx_XGOTREF(__pyx_t_5);
  3472. }
  3473. #else
  3474. __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  3475. __Pyx_GOTREF(__pyx_t_2);
  3476. __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
  3477. __Pyx_GOTREF(__pyx_t_4);
  3478. __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
  3479. __Pyx_GOTREF(__pyx_t_5);
  3480. #endif
  3481. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3482. } else {
  3483. Py_ssize_t index = -1;
  3484. __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L1_error)
  3485. __Pyx_GOTREF(__pyx_t_6);
  3486. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3487. __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
  3488. index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
  3489. __Pyx_GOTREF(__pyx_t_2);
  3490. index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
  3491. __Pyx_GOTREF(__pyx_t_4);
  3492. index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
  3493. __Pyx_GOTREF(__pyx_t_5);
  3494. if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 60, __pyx_L1_error)
  3495. __pyx_t_7 = NULL;
  3496. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3497. goto __pyx_L6_unpacking_done;
  3498. __pyx_L5_unpacking_failed:;
  3499. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3500. __pyx_t_7 = NULL;
  3501. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  3502. __PYX_ERR(0, 60, __pyx_L1_error)
  3503. __pyx_L6_unpacking_done:;
  3504. }
  3505. __Pyx_XDECREF_SET(__pyx_v_token_type, __pyx_t_2);
  3506. __pyx_t_2 = 0;
  3507. __Pyx_XDECREF_SET(__pyx_v_token, __pyx_t_4);
  3508. __pyx_t_4 = 0;
  3509. __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_5);
  3510. __pyx_t_5 = 0;
  3511. /* "fontTools/feaLib/lexer.py":61
  3512. * while True:
  3513. * token_type, token, location = self.next_()
  3514. * if token_type != Lexer.NEWLINE: # <<<<<<<<<<<<<<
  3515. * return (token_type, token, location)
  3516. *
  3517. */
  3518. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  3519. __Pyx_GOTREF(__pyx_t_1);
  3520. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NEWLINE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
  3521. __Pyx_GOTREF(__pyx_t_5);
  3522. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3523. __pyx_t_1 = PyObject_RichCompare(__pyx_v_token_type, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  3524. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3525. __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 61, __pyx_L1_error)
  3526. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3527. if (__pyx_t_8) {
  3528. /* "fontTools/feaLib/lexer.py":62
  3529. * token_type, token, location = self.next_()
  3530. * if token_type != Lexer.NEWLINE:
  3531. * return (token_type, token, location) # <<<<<<<<<<<<<<
  3532. *
  3533. * def location_(self):
  3534. */
  3535. __Pyx_XDECREF(__pyx_r);
  3536. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  3537. __Pyx_GOTREF(__pyx_t_1);
  3538. __Pyx_INCREF(__pyx_v_token_type);
  3539. __Pyx_GIVEREF(__pyx_v_token_type);
  3540. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_token_type) != (0)) __PYX_ERR(0, 62, __pyx_L1_error);
  3541. __Pyx_INCREF(__pyx_v_token);
  3542. __Pyx_GIVEREF(__pyx_v_token);
  3543. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_token) != (0)) __PYX_ERR(0, 62, __pyx_L1_error);
  3544. __Pyx_INCREF(__pyx_v_location);
  3545. __Pyx_GIVEREF(__pyx_v_location);
  3546. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 62, __pyx_L1_error);
  3547. __pyx_r = __pyx_t_1;
  3548. __pyx_t_1 = 0;
  3549. goto __pyx_L0;
  3550. /* "fontTools/feaLib/lexer.py":61
  3551. * while True:
  3552. * token_type, token, location = self.next_()
  3553. * if token_type != Lexer.NEWLINE: # <<<<<<<<<<<<<<
  3554. * return (token_type, token, location)
  3555. *
  3556. */
  3557. }
  3558. }
  3559. /* "fontTools/feaLib/lexer.py":58
  3560. * return self.__next__()
  3561. *
  3562. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  3563. * while True:
  3564. * token_type, token, location = self.next_()
  3565. */
  3566. /* function exit code */
  3567. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  3568. goto __pyx_L0;
  3569. __pyx_L1_error:;
  3570. __Pyx_XDECREF(__pyx_t_1);
  3571. __Pyx_XDECREF(__pyx_t_2);
  3572. __Pyx_XDECREF(__pyx_t_4);
  3573. __Pyx_XDECREF(__pyx_t_5);
  3574. __Pyx_XDECREF(__pyx_t_6);
  3575. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3576. __pyx_r = NULL;
  3577. __pyx_L0:;
  3578. __Pyx_XDECREF(__pyx_v_token_type);
  3579. __Pyx_XDECREF(__pyx_v_token);
  3580. __Pyx_XDECREF(__pyx_v_location);
  3581. __Pyx_XGIVEREF(__pyx_r);
  3582. __Pyx_RefNannyFinishContext();
  3583. return __pyx_r;
  3584. }
  3585. /* "fontTools/feaLib/lexer.py":64
  3586. * return (token_type, token, location)
  3587. *
  3588. * def location_(self): # <<<<<<<<<<<<<<
  3589. * column = self.pos_ - self.line_start_ + 1
  3590. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  3591. */
  3592. /* Python wrapper */
  3593. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_9location_(PyObject *__pyx_self,
  3594. #if CYTHON_METH_FASTCALL
  3595. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3596. #else
  3597. PyObject *__pyx_args, PyObject *__pyx_kwds
  3598. #endif
  3599. ); /*proto*/
  3600. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_8location_, "Lexer.location_(self)");
  3601. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_9location_ = {"location_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_9location_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_8location_};
  3602. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_9location_(PyObject *__pyx_self,
  3603. #if CYTHON_METH_FASTCALL
  3604. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3605. #else
  3606. PyObject *__pyx_args, PyObject *__pyx_kwds
  3607. #endif
  3608. ) {
  3609. PyObject *__pyx_v_self = 0;
  3610. #if !CYTHON_METH_FASTCALL
  3611. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3612. #endif
  3613. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3614. PyObject* values[1] = {0};
  3615. int __pyx_lineno = 0;
  3616. const char *__pyx_filename = NULL;
  3617. int __pyx_clineno = 0;
  3618. PyObject *__pyx_r = 0;
  3619. __Pyx_RefNannyDeclarations
  3620. __Pyx_RefNannySetupContext("location_ (wrapper)", 0);
  3621. #if !CYTHON_METH_FASTCALL
  3622. #if CYTHON_ASSUME_SAFE_SIZE
  3623. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3624. #else
  3625. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3626. #endif
  3627. #endif
  3628. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3629. {
  3630. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3631. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3632. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 64, __pyx_L3_error)
  3633. if (__pyx_kwds_len > 0) {
  3634. switch (__pyx_nargs) {
  3635. case 1:
  3636. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3637. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 64, __pyx_L3_error)
  3638. CYTHON_FALLTHROUGH;
  3639. case 0: break;
  3640. default: goto __pyx_L5_argtuple_error;
  3641. }
  3642. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3643. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "location_", 0) < (0)) __PYX_ERR(0, 64, __pyx_L3_error)
  3644. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3645. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("location_", 1, 1, 1, i); __PYX_ERR(0, 64, __pyx_L3_error) }
  3646. }
  3647. } else if (unlikely(__pyx_nargs != 1)) {
  3648. goto __pyx_L5_argtuple_error;
  3649. } else {
  3650. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3651. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 64, __pyx_L3_error)
  3652. }
  3653. __pyx_v_self = values[0];
  3654. }
  3655. goto __pyx_L6_skip;
  3656. __pyx_L5_argtuple_error:;
  3657. __Pyx_RaiseArgtupleInvalid("location_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 64, __pyx_L3_error)
  3658. __pyx_L6_skip:;
  3659. goto __pyx_L4_argument_unpacking_done;
  3660. __pyx_L3_error:;
  3661. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3662. Py_XDECREF(values[__pyx_temp]);
  3663. }
  3664. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.location_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3665. __Pyx_RefNannyFinishContext();
  3666. return NULL;
  3667. __pyx_L4_argument_unpacking_done:;
  3668. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_8location_(__pyx_self, __pyx_v_self);
  3669. /* function exit code */
  3670. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3671. Py_XDECREF(values[__pyx_temp]);
  3672. }
  3673. __Pyx_RefNannyFinishContext();
  3674. return __pyx_r;
  3675. }
  3676. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_8location_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3677. PyObject *__pyx_v_column = NULL;
  3678. PyObject *__pyx_r = NULL;
  3679. __Pyx_RefNannyDeclarations
  3680. PyObject *__pyx_t_1 = NULL;
  3681. PyObject *__pyx_t_2 = NULL;
  3682. PyObject *__pyx_t_3 = NULL;
  3683. PyObject *__pyx_t_4 = NULL;
  3684. PyObject *__pyx_t_5 = NULL;
  3685. int __pyx_t_6;
  3686. size_t __pyx_t_7;
  3687. int __pyx_lineno = 0;
  3688. const char *__pyx_filename = NULL;
  3689. int __pyx_clineno = 0;
  3690. __Pyx_RefNannySetupContext("location_", 0);
  3691. /* "fontTools/feaLib/lexer.py":65
  3692. *
  3693. * def location_(self):
  3694. * column = self.pos_ - self.line_start_ + 1 # <<<<<<<<<<<<<<
  3695. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  3696. *
  3697. */
  3698. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  3699. __Pyx_GOTREF(__pyx_t_1);
  3700. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  3701. __Pyx_GOTREF(__pyx_t_2);
  3702. __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
  3703. __Pyx_GOTREF(__pyx_t_3);
  3704. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3705. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3706. __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  3707. __Pyx_GOTREF(__pyx_t_2);
  3708. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3709. __pyx_v_column = __pyx_t_2;
  3710. __pyx_t_2 = 0;
  3711. /* "fontTools/feaLib/lexer.py":66
  3712. * def location_(self):
  3713. * column = self.pos_ - self.line_start_ + 1
  3714. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column) # <<<<<<<<<<<<<<
  3715. *
  3716. * def next_(self):
  3717. */
  3718. __Pyx_XDECREF(__pyx_r);
  3719. __pyx_t_3 = NULL;
  3720. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FeatureLibLocation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  3721. __Pyx_GOTREF(__pyx_t_1);
  3722. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_filename_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 66, __pyx_L1_error)
  3723. __Pyx_GOTREF(__pyx_t_5);
  3724. __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 66, __pyx_L1_error)
  3725. if (!__pyx_t_6) {
  3726. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3727. } else {
  3728. __Pyx_INCREF(__pyx_t_5);
  3729. __pyx_t_4 = __pyx_t_5;
  3730. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3731. goto __pyx_L3_bool_binop_done;
  3732. }
  3733. __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_features);
  3734. __pyx_t_4 = __pyx_mstate_global->__pyx_kp_u_features;
  3735. __pyx_L3_bool_binop_done:;
  3736. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 66, __pyx_L1_error)
  3737. __Pyx_GOTREF(__pyx_t_5);
  3738. __pyx_t_7 = 1;
  3739. #if CYTHON_UNPACK_METHODS
  3740. if (unlikely(PyMethod_Check(__pyx_t_1))) {
  3741. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
  3742. assert(__pyx_t_3);
  3743. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
  3744. __Pyx_INCREF(__pyx_t_3);
  3745. __Pyx_INCREF(__pyx__function);
  3746. __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
  3747. __pyx_t_7 = 0;
  3748. }
  3749. #endif
  3750. {
  3751. PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_v_column};
  3752. __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  3753. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  3754. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3755. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3756. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3757. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
  3758. __Pyx_GOTREF(__pyx_t_2);
  3759. }
  3760. __pyx_r = __pyx_t_2;
  3761. __pyx_t_2 = 0;
  3762. goto __pyx_L0;
  3763. /* "fontTools/feaLib/lexer.py":64
  3764. * return (token_type, token, location)
  3765. *
  3766. * def location_(self): # <<<<<<<<<<<<<<
  3767. * column = self.pos_ - self.line_start_ + 1
  3768. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  3769. */
  3770. /* function exit code */
  3771. __pyx_L1_error:;
  3772. __Pyx_XDECREF(__pyx_t_1);
  3773. __Pyx_XDECREF(__pyx_t_2);
  3774. __Pyx_XDECREF(__pyx_t_3);
  3775. __Pyx_XDECREF(__pyx_t_4);
  3776. __Pyx_XDECREF(__pyx_t_5);
  3777. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.location_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3778. __pyx_r = NULL;
  3779. __pyx_L0:;
  3780. __Pyx_XDECREF(__pyx_v_column);
  3781. __Pyx_XGIVEREF(__pyx_r);
  3782. __Pyx_RefNannyFinishContext();
  3783. return __pyx_r;
  3784. }
  3785. /* "fontTools/feaLib/lexer.py":68
  3786. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  3787. *
  3788. * def next_(self): # <<<<<<<<<<<<<<
  3789. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  3790. * location = self.location_()
  3791. */
  3792. /* Python wrapper */
  3793. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_11next_(PyObject *__pyx_self,
  3794. #if CYTHON_METH_FASTCALL
  3795. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3796. #else
  3797. PyObject *__pyx_args, PyObject *__pyx_kwds
  3798. #endif
  3799. ); /*proto*/
  3800. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_10next_, "Lexer.next_(self)");
  3801. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_11next_ = {"next_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_11next_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_10next_};
  3802. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_11next_(PyObject *__pyx_self,
  3803. #if CYTHON_METH_FASTCALL
  3804. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3805. #else
  3806. PyObject *__pyx_args, PyObject *__pyx_kwds
  3807. #endif
  3808. ) {
  3809. PyObject *__pyx_v_self = 0;
  3810. #if !CYTHON_METH_FASTCALL
  3811. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3812. #endif
  3813. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3814. PyObject* values[1] = {0};
  3815. int __pyx_lineno = 0;
  3816. const char *__pyx_filename = NULL;
  3817. int __pyx_clineno = 0;
  3818. PyObject *__pyx_r = 0;
  3819. __Pyx_RefNannyDeclarations
  3820. __Pyx_RefNannySetupContext("next_ (wrapper)", 0);
  3821. #if !CYTHON_METH_FASTCALL
  3822. #if CYTHON_ASSUME_SAFE_SIZE
  3823. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3824. #else
  3825. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3826. #endif
  3827. #endif
  3828. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3829. {
  3830. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3831. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3832. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 68, __pyx_L3_error)
  3833. if (__pyx_kwds_len > 0) {
  3834. switch (__pyx_nargs) {
  3835. case 1:
  3836. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3837. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 68, __pyx_L3_error)
  3838. CYTHON_FALLTHROUGH;
  3839. case 0: break;
  3840. default: goto __pyx_L5_argtuple_error;
  3841. }
  3842. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3843. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "next_", 0) < (0)) __PYX_ERR(0, 68, __pyx_L3_error)
  3844. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3845. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next_", 1, 1, 1, i); __PYX_ERR(0, 68, __pyx_L3_error) }
  3846. }
  3847. } else if (unlikely(__pyx_nargs != 1)) {
  3848. goto __pyx_L5_argtuple_error;
  3849. } else {
  3850. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3851. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 68, __pyx_L3_error)
  3852. }
  3853. __pyx_v_self = values[0];
  3854. }
  3855. goto __pyx_L6_skip;
  3856. __pyx_L5_argtuple_error:;
  3857. __Pyx_RaiseArgtupleInvalid("next_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 68, __pyx_L3_error)
  3858. __pyx_L6_skip:;
  3859. goto __pyx_L4_argument_unpacking_done;
  3860. __pyx_L3_error:;
  3861. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3862. Py_XDECREF(values[__pyx_temp]);
  3863. }
  3864. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.next_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3865. __Pyx_RefNannyFinishContext();
  3866. return NULL;
  3867. __pyx_L4_argument_unpacking_done:;
  3868. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_10next_(__pyx_self, __pyx_v_self);
  3869. /* function exit code */
  3870. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3871. Py_XDECREF(values[__pyx_temp]);
  3872. }
  3873. __Pyx_RefNannyFinishContext();
  3874. return __pyx_r;
  3875. }
  3876. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_10next_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3877. PyObject *__pyx_v_location = NULL;
  3878. PyObject *__pyx_v_start = NULL;
  3879. PyObject *__pyx_v_text = NULL;
  3880. Py_ssize_t __pyx_v_limit;
  3881. PyObject *__pyx_v_cur_char = NULL;
  3882. PyObject *__pyx_v_next_char = NULL;
  3883. PyObject *__pyx_v_glyphclass = NULL;
  3884. PyObject *__pyx_v_token = NULL;
  3885. PyObject *__pyx_v_string = NULL;
  3886. PyObject *__pyx_r = NULL;
  3887. __Pyx_RefNannyDeclarations
  3888. PyObject *__pyx_t_1 = NULL;
  3889. PyObject *__pyx_t_2 = NULL;
  3890. PyObject *__pyx_t_3 = NULL;
  3891. PyObject *__pyx_t_4 = NULL;
  3892. size_t __pyx_t_5;
  3893. Py_ssize_t __pyx_t_6;
  3894. int __pyx_t_7;
  3895. int __pyx_t_8;
  3896. PyObject *__pyx_t_9 = NULL;
  3897. PyObject *__pyx_t_10 = NULL;
  3898. int __pyx_lineno = 0;
  3899. const char *__pyx_filename = NULL;
  3900. int __pyx_clineno = 0;
  3901. __Pyx_RefNannySetupContext("next_", 0);
  3902. /* "fontTools/feaLib/lexer.py":69
  3903. *
  3904. * def next_(self):
  3905. * self.scan_over_(Lexer.CHAR_WHITESPACE_) # <<<<<<<<<<<<<<
  3906. * location = self.location_()
  3907. * start = self.pos_
  3908. */
  3909. __pyx_t_2 = __pyx_v_self;
  3910. __Pyx_INCREF(__pyx_t_2);
  3911. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
  3912. __Pyx_GOTREF(__pyx_t_3);
  3913. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_WHITESPACE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
  3914. __Pyx_GOTREF(__pyx_t_4);
  3915. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3916. __pyx_t_5 = 0;
  3917. {
  3918. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
  3919. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  3920. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  3921. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3922. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  3923. __Pyx_GOTREF(__pyx_t_1);
  3924. }
  3925. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3926. /* "fontTools/feaLib/lexer.py":70
  3927. * def next_(self):
  3928. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  3929. * location = self.location_() # <<<<<<<<<<<<<<
  3930. * start = self.pos_
  3931. * text = self.text_
  3932. */
  3933. __pyx_t_4 = __pyx_v_self;
  3934. __Pyx_INCREF(__pyx_t_4);
  3935. __pyx_t_5 = 0;
  3936. {
  3937. PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
  3938. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_location, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  3939. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  3940. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  3941. __Pyx_GOTREF(__pyx_t_1);
  3942. }
  3943. __pyx_v_location = __pyx_t_1;
  3944. __pyx_t_1 = 0;
  3945. /* "fontTools/feaLib/lexer.py":71
  3946. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  3947. * location = self.location_()
  3948. * start = self.pos_ # <<<<<<<<<<<<<<
  3949. * text = self.text_
  3950. * limit = len(text)
  3951. */
  3952. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
  3953. __Pyx_GOTREF(__pyx_t_1);
  3954. __pyx_v_start = __pyx_t_1;
  3955. __pyx_t_1 = 0;
  3956. /* "fontTools/feaLib/lexer.py":72
  3957. * location = self.location_()
  3958. * start = self.pos_
  3959. * text = self.text_ # <<<<<<<<<<<<<<
  3960. * limit = len(text)
  3961. * if start >= limit:
  3962. */
  3963. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
  3964. __Pyx_GOTREF(__pyx_t_1);
  3965. __pyx_v_text = __pyx_t_1;
  3966. __pyx_t_1 = 0;
  3967. /* "fontTools/feaLib/lexer.py":73
  3968. * start = self.pos_
  3969. * text = self.text_
  3970. * limit = len(text) # <<<<<<<<<<<<<<
  3971. * if start >= limit:
  3972. * raise StopIteration()
  3973. */
  3974. __pyx_t_6 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 73, __pyx_L1_error)
  3975. __pyx_v_limit = __pyx_t_6;
  3976. /* "fontTools/feaLib/lexer.py":74
  3977. * text = self.text_
  3978. * limit = len(text)
  3979. * if start >= limit: # <<<<<<<<<<<<<<
  3980. * raise StopIteration()
  3981. * cur_char = text[start]
  3982. */
  3983. __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  3984. __Pyx_GOTREF(__pyx_t_1);
  3985. __pyx_t_4 = PyObject_RichCompare(__pyx_v_start, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
  3986. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3987. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 74, __pyx_L1_error)
  3988. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3989. if (unlikely(__pyx_t_7)) {
  3990. /* "fontTools/feaLib/lexer.py":75
  3991. * limit = len(text)
  3992. * if start >= limit:
  3993. * raise StopIteration() # <<<<<<<<<<<<<<
  3994. * cur_char = text[start]
  3995. * next_char = text[start + 1] if start + 1 < limit else None
  3996. */
  3997. __pyx_t_1 = NULL;
  3998. __pyx_t_5 = 1;
  3999. {
  4000. PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
  4001. __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_StopIteration)), __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4002. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  4003. if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
  4004. __Pyx_GOTREF(__pyx_t_4);
  4005. }
  4006. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  4007. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4008. __PYX_ERR(0, 75, __pyx_L1_error)
  4009. /* "fontTools/feaLib/lexer.py":74
  4010. * text = self.text_
  4011. * limit = len(text)
  4012. * if start >= limit: # <<<<<<<<<<<<<<
  4013. * raise StopIteration()
  4014. * cur_char = text[start]
  4015. */
  4016. }
  4017. /* "fontTools/feaLib/lexer.py":76
  4018. * if start >= limit:
  4019. * raise StopIteration()
  4020. * cur_char = text[start] # <<<<<<<<<<<<<<
  4021. * next_char = text[start + 1] if start + 1 < limit else None
  4022. *
  4023. */
  4024. __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_v_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
  4025. __Pyx_GOTREF(__pyx_t_4);
  4026. __pyx_v_cur_char = __pyx_t_4;
  4027. __pyx_t_4 = 0;
  4028. /* "fontTools/feaLib/lexer.py":77
  4029. * raise StopIteration()
  4030. * cur_char = text[start]
  4031. * next_char = text[start + 1] if start + 1 < limit else None # <<<<<<<<<<<<<<
  4032. *
  4033. * if cur_char == "\n":
  4034. */
  4035. __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  4036. __Pyx_GOTREF(__pyx_t_1);
  4037. __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  4038. __Pyx_GOTREF(__pyx_t_2);
  4039. __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
  4040. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4041. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4042. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 77, __pyx_L1_error)
  4043. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4044. if (__pyx_t_7) {
  4045. __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error)
  4046. __Pyx_GOTREF(__pyx_t_3);
  4047. __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  4048. __Pyx_GOTREF(__pyx_t_2);
  4049. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4050. __pyx_t_4 = __pyx_t_2;
  4051. __pyx_t_2 = 0;
  4052. } else {
  4053. __Pyx_INCREF(Py_None);
  4054. __pyx_t_4 = Py_None;
  4055. }
  4056. __pyx_v_next_char = __pyx_t_4;
  4057. __pyx_t_4 = 0;
  4058. /* "fontTools/feaLib/lexer.py":79
  4059. * next_char = text[start + 1] if start + 1 < limit else None
  4060. *
  4061. * if cur_char == "\n": # <<<<<<<<<<<<<<
  4062. * self.pos_ += 1
  4063. * self.line_ += 1
  4064. */
  4065. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u_, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 79, __pyx_L1_error)
  4066. if (__pyx_t_7) {
  4067. /* "fontTools/feaLib/lexer.py":80
  4068. *
  4069. * if cur_char == "\n":
  4070. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4071. * self.line_ += 1
  4072. * self.line_start_ = self.pos_
  4073. */
  4074. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  4075. __Pyx_GOTREF(__pyx_t_4);
  4076. __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  4077. __Pyx_GOTREF(__pyx_t_2);
  4078. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4079. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_2) < (0)) __PYX_ERR(0, 80, __pyx_L1_error)
  4080. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4081. /* "fontTools/feaLib/lexer.py":81
  4082. * if cur_char == "\n":
  4083. * self.pos_ += 1
  4084. * self.line_ += 1 # <<<<<<<<<<<<<<
  4085. * self.line_start_ = self.pos_
  4086. * return (Lexer.NEWLINE, None, location)
  4087. */
  4088. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
  4089. __Pyx_GOTREF(__pyx_t_2);
  4090. __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
  4091. __Pyx_GOTREF(__pyx_t_4);
  4092. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4093. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line, __pyx_t_4) < (0)) __PYX_ERR(0, 81, __pyx_L1_error)
  4094. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4095. /* "fontTools/feaLib/lexer.py":82
  4096. * self.pos_ += 1
  4097. * self.line_ += 1
  4098. * self.line_start_ = self.pos_ # <<<<<<<<<<<<<<
  4099. * return (Lexer.NEWLINE, None, location)
  4100. * if cur_char == "\r":
  4101. */
  4102. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
  4103. __Pyx_GOTREF(__pyx_t_4);
  4104. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line_start, __pyx_t_4) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
  4105. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4106. /* "fontTools/feaLib/lexer.py":83
  4107. * self.line_ += 1
  4108. * self.line_start_ = self.pos_
  4109. * return (Lexer.NEWLINE, None, location) # <<<<<<<<<<<<<<
  4110. * if cur_char == "\r":
  4111. * self.pos_ += 2 if next_char == "\n" else 1
  4112. */
  4113. __Pyx_XDECREF(__pyx_r);
  4114. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  4115. __Pyx_GOTREF(__pyx_t_4);
  4116. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NEWLINE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
  4117. __Pyx_GOTREF(__pyx_t_2);
  4118. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4119. __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  4120. __Pyx_GOTREF(__pyx_t_4);
  4121. __Pyx_GIVEREF(__pyx_t_2);
  4122. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 83, __pyx_L1_error);
  4123. __Pyx_INCREF(Py_None);
  4124. __Pyx_GIVEREF(Py_None);
  4125. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None) != (0)) __PYX_ERR(0, 83, __pyx_L1_error);
  4126. __Pyx_INCREF(__pyx_v_location);
  4127. __Pyx_GIVEREF(__pyx_v_location);
  4128. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 83, __pyx_L1_error);
  4129. __pyx_t_2 = 0;
  4130. __pyx_r = __pyx_t_4;
  4131. __pyx_t_4 = 0;
  4132. goto __pyx_L0;
  4133. /* "fontTools/feaLib/lexer.py":79
  4134. * next_char = text[start + 1] if start + 1 < limit else None
  4135. *
  4136. * if cur_char == "\n": # <<<<<<<<<<<<<<
  4137. * self.pos_ += 1
  4138. * self.line_ += 1
  4139. */
  4140. }
  4141. /* "fontTools/feaLib/lexer.py":84
  4142. * self.line_start_ = self.pos_
  4143. * return (Lexer.NEWLINE, None, location)
  4144. * if cur_char == "\r": # <<<<<<<<<<<<<<
  4145. * self.pos_ += 2 if next_char == "\n" else 1
  4146. * self.line_ += 1
  4147. */
  4148. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__2, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 84, __pyx_L1_error)
  4149. if (__pyx_t_7) {
  4150. /* "fontTools/feaLib/lexer.py":85
  4151. * return (Lexer.NEWLINE, None, location)
  4152. * if cur_char == "\r":
  4153. * self.pos_ += 2 if next_char == "\n" else 1 # <<<<<<<<<<<<<<
  4154. * self.line_ += 1
  4155. * self.line_start_ = self.pos_
  4156. */
  4157. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
  4158. __Pyx_GOTREF(__pyx_t_4);
  4159. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_next_char, __pyx_mstate_global->__pyx_kp_u_, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 85, __pyx_L1_error)
  4160. if (__pyx_t_7) {
  4161. __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
  4162. __pyx_t_2 = __pyx_mstate_global->__pyx_int_2;
  4163. } else {
  4164. __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
  4165. __pyx_t_2 = __pyx_mstate_global->__pyx_int_1;
  4166. }
  4167. __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
  4168. __Pyx_GOTREF(__pyx_t_3);
  4169. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4170. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4171. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 85, __pyx_L1_error)
  4172. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4173. /* "fontTools/feaLib/lexer.py":86
  4174. * if cur_char == "\r":
  4175. * self.pos_ += 2 if next_char == "\n" else 1
  4176. * self.line_ += 1 # <<<<<<<<<<<<<<
  4177. * self.line_start_ = self.pos_
  4178. * return (Lexer.NEWLINE, None, location)
  4179. */
  4180. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
  4181. __Pyx_GOTREF(__pyx_t_3);
  4182. __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
  4183. __Pyx_GOTREF(__pyx_t_2);
  4184. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4185. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line, __pyx_t_2) < (0)) __PYX_ERR(0, 86, __pyx_L1_error)
  4186. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4187. /* "fontTools/feaLib/lexer.py":87
  4188. * self.pos_ += 2 if next_char == "\n" else 1
  4189. * self.line_ += 1
  4190. * self.line_start_ = self.pos_ # <<<<<<<<<<<<<<
  4191. * return (Lexer.NEWLINE, None, location)
  4192. * if cur_char == "#":
  4193. */
  4194. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
  4195. __Pyx_GOTREF(__pyx_t_2);
  4196. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_line_start, __pyx_t_2) < (0)) __PYX_ERR(0, 87, __pyx_L1_error)
  4197. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4198. /* "fontTools/feaLib/lexer.py":88
  4199. * self.line_ += 1
  4200. * self.line_start_ = self.pos_
  4201. * return (Lexer.NEWLINE, None, location) # <<<<<<<<<<<<<<
  4202. * if cur_char == "#":
  4203. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  4204. */
  4205. __Pyx_XDECREF(__pyx_r);
  4206. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  4207. __Pyx_GOTREF(__pyx_t_2);
  4208. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NEWLINE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
  4209. __Pyx_GOTREF(__pyx_t_3);
  4210. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4211. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  4212. __Pyx_GOTREF(__pyx_t_2);
  4213. __Pyx_GIVEREF(__pyx_t_3);
  4214. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
  4215. __Pyx_INCREF(Py_None);
  4216. __Pyx_GIVEREF(Py_None);
  4217. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
  4218. __Pyx_INCREF(__pyx_v_location);
  4219. __Pyx_GIVEREF(__pyx_v_location);
  4220. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
  4221. __pyx_t_3 = 0;
  4222. __pyx_r = __pyx_t_2;
  4223. __pyx_t_2 = 0;
  4224. goto __pyx_L0;
  4225. /* "fontTools/feaLib/lexer.py":84
  4226. * self.line_start_ = self.pos_
  4227. * return (Lexer.NEWLINE, None, location)
  4228. * if cur_char == "\r": # <<<<<<<<<<<<<<
  4229. * self.pos_ += 2 if next_char == "\n" else 1
  4230. * self.line_ += 1
  4231. */
  4232. }
  4233. /* "fontTools/feaLib/lexer.py":89
  4234. * self.line_start_ = self.pos_
  4235. * return (Lexer.NEWLINE, None, location)
  4236. * if cur_char == "#": # <<<<<<<<<<<<<<
  4237. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  4238. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4239. */
  4240. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__3, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 89, __pyx_L1_error)
  4241. if (__pyx_t_7) {
  4242. /* "fontTools/feaLib/lexer.py":90
  4243. * return (Lexer.NEWLINE, None, location)
  4244. * if cur_char == "#":
  4245. * self.scan_until_(Lexer.CHAR_NEWLINE_) # <<<<<<<<<<<<<<
  4246. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4247. *
  4248. */
  4249. __pyx_t_3 = __pyx_v_self;
  4250. __Pyx_INCREF(__pyx_t_3);
  4251. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
  4252. __Pyx_GOTREF(__pyx_t_4);
  4253. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CHAR_NEWLINE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
  4254. __Pyx_GOTREF(__pyx_t_1);
  4255. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4256. __pyx_t_5 = 0;
  4257. {
  4258. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
  4259. __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_until, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4260. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4261. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4262. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
  4263. __Pyx_GOTREF(__pyx_t_2);
  4264. }
  4265. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4266. /* "fontTools/feaLib/lexer.py":91
  4267. * if cur_char == "#":
  4268. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  4269. * return (Lexer.COMMENT, text[start : self.pos_], location) # <<<<<<<<<<<<<<
  4270. *
  4271. * if self.mode_ is Lexer.MODE_FILENAME_:
  4272. */
  4273. __Pyx_XDECREF(__pyx_r);
  4274. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  4275. __Pyx_GOTREF(__pyx_t_2);
  4276. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_COMMENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
  4277. __Pyx_GOTREF(__pyx_t_1);
  4278. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4279. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  4280. __Pyx_GOTREF(__pyx_t_2);
  4281. __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
  4282. __Pyx_GOTREF(__pyx_t_3);
  4283. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4284. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  4285. __Pyx_GOTREF(__pyx_t_2);
  4286. __Pyx_GIVEREF(__pyx_t_1);
  4287. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
  4288. __Pyx_GIVEREF(__pyx_t_3);
  4289. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
  4290. __Pyx_INCREF(__pyx_v_location);
  4291. __Pyx_GIVEREF(__pyx_v_location);
  4292. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
  4293. __pyx_t_1 = 0;
  4294. __pyx_t_3 = 0;
  4295. __pyx_r = __pyx_t_2;
  4296. __pyx_t_2 = 0;
  4297. goto __pyx_L0;
  4298. /* "fontTools/feaLib/lexer.py":89
  4299. * self.line_start_ = self.pos_
  4300. * return (Lexer.NEWLINE, None, location)
  4301. * if cur_char == "#": # <<<<<<<<<<<<<<
  4302. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  4303. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4304. */
  4305. }
  4306. /* "fontTools/feaLib/lexer.py":93
  4307. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4308. *
  4309. * if self.mode_ is Lexer.MODE_FILENAME_: # <<<<<<<<<<<<<<
  4310. * if cur_char != "(":
  4311. * raise FeatureLibError("Expected '(' before file name", location)
  4312. */
  4313. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
  4314. __Pyx_GOTREF(__pyx_t_2);
  4315. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
  4316. __Pyx_GOTREF(__pyx_t_3);
  4317. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_MODE_FILENAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
  4318. __Pyx_GOTREF(__pyx_t_1);
  4319. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4320. __pyx_t_7 = (__pyx_t_2 == __pyx_t_1);
  4321. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4322. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4323. if (__pyx_t_7) {
  4324. /* "fontTools/feaLib/lexer.py":94
  4325. *
  4326. * if self.mode_ is Lexer.MODE_FILENAME_:
  4327. * if cur_char != "(": # <<<<<<<<<<<<<<
  4328. * raise FeatureLibError("Expected '(' before file name", location)
  4329. * self.scan_until_(")")
  4330. */
  4331. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__4, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 94, __pyx_L1_error)
  4332. if (unlikely(__pyx_t_7)) {
  4333. /* "fontTools/feaLib/lexer.py":95
  4334. * if self.mode_ is Lexer.MODE_FILENAME_:
  4335. * if cur_char != "(":
  4336. * raise FeatureLibError("Expected '(' before file name", location) # <<<<<<<<<<<<<<
  4337. * self.scan_until_(")")
  4338. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4339. */
  4340. __pyx_t_2 = NULL;
  4341. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
  4342. __Pyx_GOTREF(__pyx_t_3);
  4343. __pyx_t_5 = 1;
  4344. #if CYTHON_UNPACK_METHODS
  4345. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  4346. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  4347. assert(__pyx_t_2);
  4348. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4349. __Pyx_INCREF(__pyx_t_2);
  4350. __Pyx_INCREF(__pyx__function);
  4351. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  4352. __pyx_t_5 = 0;
  4353. }
  4354. #endif
  4355. {
  4356. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_before_file_name, __pyx_v_location};
  4357. __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4358. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4359. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4360. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  4361. __Pyx_GOTREF(__pyx_t_1);
  4362. }
  4363. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  4364. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4365. __PYX_ERR(0, 95, __pyx_L1_error)
  4366. /* "fontTools/feaLib/lexer.py":94
  4367. *
  4368. * if self.mode_ is Lexer.MODE_FILENAME_:
  4369. * if cur_char != "(": # <<<<<<<<<<<<<<
  4370. * raise FeatureLibError("Expected '(' before file name", location)
  4371. * self.scan_until_(")")
  4372. */
  4373. }
  4374. /* "fontTools/feaLib/lexer.py":96
  4375. * if cur_char != "(":
  4376. * raise FeatureLibError("Expected '(' before file name", location)
  4377. * self.scan_until_(")") # <<<<<<<<<<<<<<
  4378. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4379. * if cur_char != ")":
  4380. */
  4381. __pyx_t_3 = __pyx_v_self;
  4382. __Pyx_INCREF(__pyx_t_3);
  4383. __pyx_t_5 = 0;
  4384. {
  4385. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__5};
  4386. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_until, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4387. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4388. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
  4389. __Pyx_GOTREF(__pyx_t_1);
  4390. }
  4391. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4392. /* "fontTools/feaLib/lexer.py":97
  4393. * raise FeatureLibError("Expected '(' before file name", location)
  4394. * self.scan_until_(")")
  4395. * cur_char = text[self.pos_] if self.pos_ < limit else None # <<<<<<<<<<<<<<
  4396. * if cur_char != ")":
  4397. * raise FeatureLibError("Expected ')' after file name", location)
  4398. */
  4399. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error)
  4400. __Pyx_GOTREF(__pyx_t_3);
  4401. __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  4402. __Pyx_GOTREF(__pyx_t_2);
  4403. __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
  4404. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4405. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4406. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 97, __pyx_L1_error)
  4407. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4408. if (__pyx_t_7) {
  4409. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
  4410. __Pyx_GOTREF(__pyx_t_4);
  4411. __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  4412. __Pyx_GOTREF(__pyx_t_2);
  4413. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4414. __pyx_t_1 = __pyx_t_2;
  4415. __pyx_t_2 = 0;
  4416. } else {
  4417. __Pyx_INCREF(Py_None);
  4418. __pyx_t_1 = Py_None;
  4419. }
  4420. __Pyx_DECREF_SET(__pyx_v_cur_char, __pyx_t_1);
  4421. __pyx_t_1 = 0;
  4422. /* "fontTools/feaLib/lexer.py":98
  4423. * self.scan_until_(")")
  4424. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4425. * if cur_char != ")": # <<<<<<<<<<<<<<
  4426. * raise FeatureLibError("Expected ')' after file name", location)
  4427. * self.pos_ += 1
  4428. */
  4429. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__5, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 98, __pyx_L1_error)
  4430. if (unlikely(__pyx_t_7)) {
  4431. /* "fontTools/feaLib/lexer.py":99
  4432. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4433. * if cur_char != ")":
  4434. * raise FeatureLibError("Expected ')' after file name", location) # <<<<<<<<<<<<<<
  4435. * self.pos_ += 1
  4436. * self.mode_ = Lexer.MODE_NORMAL_
  4437. */
  4438. __pyx_t_2 = NULL;
  4439. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
  4440. __Pyx_GOTREF(__pyx_t_4);
  4441. __pyx_t_5 = 1;
  4442. #if CYTHON_UNPACK_METHODS
  4443. if (unlikely(PyMethod_Check(__pyx_t_4))) {
  4444. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
  4445. assert(__pyx_t_2);
  4446. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
  4447. __Pyx_INCREF(__pyx_t_2);
  4448. __Pyx_INCREF(__pyx__function);
  4449. __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
  4450. __pyx_t_5 = 0;
  4451. }
  4452. #endif
  4453. {
  4454. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_after_file_name, __pyx_v_location};
  4455. __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4456. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4457. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4458. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
  4459. __Pyx_GOTREF(__pyx_t_1);
  4460. }
  4461. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  4462. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4463. __PYX_ERR(0, 99, __pyx_L1_error)
  4464. /* "fontTools/feaLib/lexer.py":98
  4465. * self.scan_until_(")")
  4466. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4467. * if cur_char != ")": # <<<<<<<<<<<<<<
  4468. * raise FeatureLibError("Expected ')' after file name", location)
  4469. * self.pos_ += 1
  4470. */
  4471. }
  4472. /* "fontTools/feaLib/lexer.py":100
  4473. * if cur_char != ")":
  4474. * raise FeatureLibError("Expected ')' after file name", location)
  4475. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4476. * self.mode_ = Lexer.MODE_NORMAL_
  4477. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
  4478. */
  4479. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
  4480. __Pyx_GOTREF(__pyx_t_1);
  4481. __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error)
  4482. __Pyx_GOTREF(__pyx_t_4);
  4483. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4484. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_4) < (0)) __PYX_ERR(0, 100, __pyx_L1_error)
  4485. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4486. /* "fontTools/feaLib/lexer.py":101
  4487. * raise FeatureLibError("Expected ')' after file name", location)
  4488. * self.pos_ += 1
  4489. * self.mode_ = Lexer.MODE_NORMAL_ # <<<<<<<<<<<<<<
  4490. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
  4491. *
  4492. */
  4493. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  4494. __Pyx_GOTREF(__pyx_t_4);
  4495. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_MODE_NORMAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  4496. __Pyx_GOTREF(__pyx_t_1);
  4497. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4498. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_mode, __pyx_t_1) < (0)) __PYX_ERR(0, 101, __pyx_L1_error)
  4499. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4500. /* "fontTools/feaLib/lexer.py":102
  4501. * self.pos_ += 1
  4502. * self.mode_ = Lexer.MODE_NORMAL_
  4503. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location) # <<<<<<<<<<<<<<
  4504. *
  4505. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_:
  4506. */
  4507. __Pyx_XDECREF(__pyx_r);
  4508. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
  4509. __Pyx_GOTREF(__pyx_t_1);
  4510. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FILENAME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
  4511. __Pyx_GOTREF(__pyx_t_4);
  4512. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4513. __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
  4514. __Pyx_GOTREF(__pyx_t_1);
  4515. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
  4516. __Pyx_GOTREF(__pyx_t_2);
  4517. __pyx_t_3 = __Pyx_PyLong_SubtractObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
  4518. __Pyx_GOTREF(__pyx_t_3);
  4519. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4520. __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_t_1, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
  4521. __Pyx_GOTREF(__pyx_t_2);
  4522. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4523. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4524. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
  4525. __Pyx_GOTREF(__pyx_t_3);
  4526. __Pyx_GIVEREF(__pyx_t_4);
  4527. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 102, __pyx_L1_error);
  4528. __Pyx_GIVEREF(__pyx_t_2);
  4529. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 102, __pyx_L1_error);
  4530. __Pyx_INCREF(__pyx_v_location);
  4531. __Pyx_GIVEREF(__pyx_v_location);
  4532. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 102, __pyx_L1_error);
  4533. __pyx_t_4 = 0;
  4534. __pyx_t_2 = 0;
  4535. __pyx_r = __pyx_t_3;
  4536. __pyx_t_3 = 0;
  4537. goto __pyx_L0;
  4538. /* "fontTools/feaLib/lexer.py":93
  4539. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4540. *
  4541. * if self.mode_ is Lexer.MODE_FILENAME_: # <<<<<<<<<<<<<<
  4542. * if cur_char != "(":
  4543. * raise FeatureLibError("Expected '(' before file name", location)
  4544. */
  4545. }
  4546. /* "fontTools/feaLib/lexer.py":104
  4547. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
  4548. *
  4549. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  4550. * self.pos_ += 1
  4551. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4552. */
  4553. __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__6, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 104, __pyx_L1_error)
  4554. if (__pyx_t_8) {
  4555. } else {
  4556. __pyx_t_7 = __pyx_t_8;
  4557. goto __pyx_L11_bool_binop_done;
  4558. }
  4559. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  4560. __Pyx_GOTREF(__pyx_t_3);
  4561. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  4562. __Pyx_GOTREF(__pyx_t_2);
  4563. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4564. __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_next_char, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 104, __pyx_L1_error)
  4565. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4566. __pyx_t_7 = __pyx_t_8;
  4567. __pyx_L11_bool_binop_done:;
  4568. if (__pyx_t_7) {
  4569. /* "fontTools/feaLib/lexer.py":105
  4570. *
  4571. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_:
  4572. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4573. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4574. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4575. */
  4576. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
  4577. __Pyx_GOTREF(__pyx_t_2);
  4578. __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
  4579. __Pyx_GOTREF(__pyx_t_3);
  4580. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4581. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 105, __pyx_L1_error)
  4582. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4583. /* "fontTools/feaLib/lexer.py":106
  4584. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_:
  4585. * self.pos_ += 1
  4586. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  4587. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4588. * if cur_char == "@":
  4589. */
  4590. __pyx_t_2 = __pyx_v_self;
  4591. __Pyx_INCREF(__pyx_t_2);
  4592. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error)
  4593. __Pyx_GOTREF(__pyx_t_4);
  4594. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
  4595. __Pyx_GOTREF(__pyx_t_1);
  4596. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4597. __pyx_t_5 = 0;
  4598. {
  4599. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
  4600. __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4601. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4602. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4603. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
  4604. __Pyx_GOTREF(__pyx_t_3);
  4605. }
  4606. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4607. /* "fontTools/feaLib/lexer.py":107
  4608. * self.pos_ += 1
  4609. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4610. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location) # <<<<<<<<<<<<<<
  4611. * if cur_char == "@":
  4612. * self.pos_ += 1
  4613. */
  4614. __Pyx_XDECREF(__pyx_r);
  4615. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  4616. __Pyx_GOTREF(__pyx_t_3);
  4617. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CID); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  4618. __Pyx_GOTREF(__pyx_t_1);
  4619. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4620. __pyx_t_2 = NULL;
  4621. __pyx_t_4 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
  4622. __Pyx_GOTREF(__pyx_t_4);
  4623. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 107, __pyx_L1_error)
  4624. __Pyx_GOTREF(__pyx_t_9);
  4625. __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_t_4, &__pyx_t_9, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 107, __pyx_L1_error)
  4626. __Pyx_GOTREF(__pyx_t_10);
  4627. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4628. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  4629. __pyx_t_5 = 1;
  4630. {
  4631. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_10, __pyx_mstate_global->__pyx_int_10};
  4632. __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4633. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4634. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4635. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  4636. __Pyx_GOTREF(__pyx_t_3);
  4637. }
  4638. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 107, __pyx_L1_error)
  4639. __Pyx_GOTREF(__pyx_t_10);
  4640. __Pyx_GIVEREF(__pyx_t_1);
  4641. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 107, __pyx_L1_error);
  4642. __Pyx_GIVEREF(__pyx_t_3);
  4643. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 107, __pyx_L1_error);
  4644. __Pyx_INCREF(__pyx_v_location);
  4645. __Pyx_GIVEREF(__pyx_v_location);
  4646. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 107, __pyx_L1_error);
  4647. __pyx_t_1 = 0;
  4648. __pyx_t_3 = 0;
  4649. __pyx_r = __pyx_t_10;
  4650. __pyx_t_10 = 0;
  4651. goto __pyx_L0;
  4652. /* "fontTools/feaLib/lexer.py":104
  4653. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
  4654. *
  4655. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  4656. * self.pos_ += 1
  4657. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4658. */
  4659. }
  4660. /* "fontTools/feaLib/lexer.py":108
  4661. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4662. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4663. * if cur_char == "@": # <<<<<<<<<<<<<<
  4664. * self.pos_ += 1
  4665. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4666. */
  4667. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__7, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 108, __pyx_L1_error)
  4668. if (__pyx_t_7) {
  4669. /* "fontTools/feaLib/lexer.py":109
  4670. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4671. * if cur_char == "@":
  4672. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4673. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4674. * glyphclass = text[start + 1 : self.pos_]
  4675. */
  4676. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 109, __pyx_L1_error)
  4677. __Pyx_GOTREF(__pyx_t_10);
  4678. __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_t_10, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
  4679. __Pyx_GOTREF(__pyx_t_3);
  4680. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4681. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 109, __pyx_L1_error)
  4682. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4683. /* "fontTools/feaLib/lexer.py":110
  4684. * if cur_char == "@":
  4685. * self.pos_ += 1
  4686. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_) # <<<<<<<<<<<<<<
  4687. * glyphclass = text[start + 1 : self.pos_]
  4688. * if len(glyphclass) < 1:
  4689. */
  4690. __pyx_t_10 = __pyx_v_self;
  4691. __Pyx_INCREF(__pyx_t_10);
  4692. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
  4693. __Pyx_GOTREF(__pyx_t_1);
  4694. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_CONTINUATION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
  4695. __Pyx_GOTREF(__pyx_t_2);
  4696. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4697. __pyx_t_5 = 0;
  4698. {
  4699. PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2};
  4700. __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4701. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  4702. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4703. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
  4704. __Pyx_GOTREF(__pyx_t_3);
  4705. }
  4706. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4707. /* "fontTools/feaLib/lexer.py":111
  4708. * self.pos_ += 1
  4709. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4710. * glyphclass = text[start + 1 : self.pos_] # <<<<<<<<<<<<<<
  4711. * if len(glyphclass) < 1:
  4712. * raise FeatureLibError("Expected glyph class name", location)
  4713. */
  4714. __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
  4715. __Pyx_GOTREF(__pyx_t_3);
  4716. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
  4717. __Pyx_GOTREF(__pyx_t_2);
  4718. __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_t_3, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 111, __pyx_L1_error)
  4719. __Pyx_GOTREF(__pyx_t_10);
  4720. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4721. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4722. __pyx_v_glyphclass = __pyx_t_10;
  4723. __pyx_t_10 = 0;
  4724. /* "fontTools/feaLib/lexer.py":112
  4725. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4726. * glyphclass = text[start + 1 : self.pos_]
  4727. * if len(glyphclass) < 1: # <<<<<<<<<<<<<<
  4728. * raise FeatureLibError("Expected glyph class name", location)
  4729. * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
  4730. */
  4731. __pyx_t_6 = PyObject_Length(__pyx_v_glyphclass); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 112, __pyx_L1_error)
  4732. __pyx_t_7 = (__pyx_t_6 < 1);
  4733. if (unlikely(__pyx_t_7)) {
  4734. /* "fontTools/feaLib/lexer.py":113
  4735. * glyphclass = text[start + 1 : self.pos_]
  4736. * if len(glyphclass) < 1:
  4737. * raise FeatureLibError("Expected glyph class name", location) # <<<<<<<<<<<<<<
  4738. * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
  4739. * raise FeatureLibError(
  4740. */
  4741. __pyx_t_2 = NULL;
  4742. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
  4743. __Pyx_GOTREF(__pyx_t_3);
  4744. __pyx_t_5 = 1;
  4745. #if CYTHON_UNPACK_METHODS
  4746. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  4747. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  4748. assert(__pyx_t_2);
  4749. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4750. __Pyx_INCREF(__pyx_t_2);
  4751. __Pyx_INCREF(__pyx__function);
  4752. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  4753. __pyx_t_5 = 0;
  4754. }
  4755. #endif
  4756. {
  4757. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_glyph_class_name, __pyx_v_location};
  4758. __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4759. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4760. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4761. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 113, __pyx_L1_error)
  4762. __Pyx_GOTREF(__pyx_t_10);
  4763. }
  4764. __Pyx_Raise(__pyx_t_10, 0, 0, 0);
  4765. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4766. __PYX_ERR(0, 113, __pyx_L1_error)
  4767. /* "fontTools/feaLib/lexer.py":112
  4768. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4769. * glyphclass = text[start + 1 : self.pos_]
  4770. * if len(glyphclass) < 1: # <<<<<<<<<<<<<<
  4771. * raise FeatureLibError("Expected glyph class name", location)
  4772. * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
  4773. */
  4774. }
  4775. /* "fontTools/feaLib/lexer.py":114
  4776. * if len(glyphclass) < 1:
  4777. * raise FeatureLibError("Expected glyph class name", location)
  4778. * if not Lexer.RE_GLYPHCLASS.match(glyphclass): # <<<<<<<<<<<<<<
  4779. * raise FeatureLibError(
  4780. * "Glyph class names must consist of letters, digits, "
  4781. */
  4782. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
  4783. __Pyx_GOTREF(__pyx_t_2);
  4784. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RE_GLYPHCLASS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
  4785. __Pyx_GOTREF(__pyx_t_1);
  4786. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4787. __pyx_t_3 = __pyx_t_1;
  4788. __Pyx_INCREF(__pyx_t_3);
  4789. __pyx_t_5 = 0;
  4790. {
  4791. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_glyphclass};
  4792. __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_match, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4793. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4794. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4795. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 114, __pyx_L1_error)
  4796. __Pyx_GOTREF(__pyx_t_10);
  4797. }
  4798. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 114, __pyx_L1_error)
  4799. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4800. __pyx_t_8 = (!__pyx_t_7);
  4801. if (unlikely(__pyx_t_8)) {
  4802. /* "fontTools/feaLib/lexer.py":115
  4803. * raise FeatureLibError("Expected glyph class name", location)
  4804. * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
  4805. * raise FeatureLibError( # <<<<<<<<<<<<<<
  4806. * "Glyph class names must consist of letters, digits, "
  4807. * "underscore, period or hyphen",
  4808. */
  4809. __pyx_t_1 = NULL;
  4810. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
  4811. __Pyx_GOTREF(__pyx_t_3);
  4812. /* "fontTools/feaLib/lexer.py":118
  4813. * "Glyph class names must consist of letters, digits, "
  4814. * "underscore, period or hyphen",
  4815. * location, # <<<<<<<<<<<<<<
  4816. * )
  4817. * return (Lexer.GLYPHCLASS, glyphclass, location)
  4818. */
  4819. __pyx_t_5 = 1;
  4820. #if CYTHON_UNPACK_METHODS
  4821. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  4822. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
  4823. assert(__pyx_t_1);
  4824. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4825. __Pyx_INCREF(__pyx_t_1);
  4826. __Pyx_INCREF(__pyx__function);
  4827. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  4828. __pyx_t_5 = 0;
  4829. }
  4830. #endif
  4831. {
  4832. PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Glyph_class_names_must_consist_o, __pyx_v_location};
  4833. __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4834. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  4835. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4836. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 115, __pyx_L1_error)
  4837. __Pyx_GOTREF(__pyx_t_10);
  4838. }
  4839. __Pyx_Raise(__pyx_t_10, 0, 0, 0);
  4840. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4841. __PYX_ERR(0, 115, __pyx_L1_error)
  4842. /* "fontTools/feaLib/lexer.py":114
  4843. * if len(glyphclass) < 1:
  4844. * raise FeatureLibError("Expected glyph class name", location)
  4845. * if not Lexer.RE_GLYPHCLASS.match(glyphclass): # <<<<<<<<<<<<<<
  4846. * raise FeatureLibError(
  4847. * "Glyph class names must consist of letters, digits, "
  4848. */
  4849. }
  4850. /* "fontTools/feaLib/lexer.py":120
  4851. * location,
  4852. * )
  4853. * return (Lexer.GLYPHCLASS, glyphclass, location) # <<<<<<<<<<<<<<
  4854. * if cur_char in Lexer.CHAR_NAME_START_:
  4855. * self.pos_ += 1
  4856. */
  4857. __Pyx_XDECREF(__pyx_r);
  4858. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 120, __pyx_L1_error)
  4859. __Pyx_GOTREF(__pyx_t_10);
  4860. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_GLYPHCLASS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
  4861. __Pyx_GOTREF(__pyx_t_3);
  4862. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4863. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 120, __pyx_L1_error)
  4864. __Pyx_GOTREF(__pyx_t_10);
  4865. __Pyx_GIVEREF(__pyx_t_3);
  4866. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 120, __pyx_L1_error);
  4867. __Pyx_INCREF(__pyx_v_glyphclass);
  4868. __Pyx_GIVEREF(__pyx_v_glyphclass);
  4869. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_glyphclass) != (0)) __PYX_ERR(0, 120, __pyx_L1_error);
  4870. __Pyx_INCREF(__pyx_v_location);
  4871. __Pyx_GIVEREF(__pyx_v_location);
  4872. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 120, __pyx_L1_error);
  4873. __pyx_t_3 = 0;
  4874. __pyx_r = __pyx_t_10;
  4875. __pyx_t_10 = 0;
  4876. goto __pyx_L0;
  4877. /* "fontTools/feaLib/lexer.py":108
  4878. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4879. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4880. * if cur_char == "@": # <<<<<<<<<<<<<<
  4881. * self.pos_ += 1
  4882. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4883. */
  4884. }
  4885. /* "fontTools/feaLib/lexer.py":121
  4886. * )
  4887. * return (Lexer.GLYPHCLASS, glyphclass, location)
  4888. * if cur_char in Lexer.CHAR_NAME_START_: # <<<<<<<<<<<<<<
  4889. * self.pos_ += 1
  4890. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4891. */
  4892. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 121, __pyx_L1_error)
  4893. __Pyx_GOTREF(__pyx_t_10);
  4894. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_START); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
  4895. __Pyx_GOTREF(__pyx_t_3);
  4896. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4897. __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_cur_char, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 121, __pyx_L1_error)
  4898. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4899. if (__pyx_t_8) {
  4900. /* "fontTools/feaLib/lexer.py":122
  4901. * return (Lexer.GLYPHCLASS, glyphclass, location)
  4902. * if cur_char in Lexer.CHAR_NAME_START_:
  4903. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4904. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4905. * token = text[start : self.pos_]
  4906. */
  4907. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error)
  4908. __Pyx_GOTREF(__pyx_t_3);
  4909. __pyx_t_10 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 122, __pyx_L1_error)
  4910. __Pyx_GOTREF(__pyx_t_10);
  4911. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4912. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_10) < (0)) __PYX_ERR(0, 122, __pyx_L1_error)
  4913. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4914. /* "fontTools/feaLib/lexer.py":123
  4915. * if cur_char in Lexer.CHAR_NAME_START_:
  4916. * self.pos_ += 1
  4917. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_) # <<<<<<<<<<<<<<
  4918. * token = text[start : self.pos_]
  4919. * if token == "include":
  4920. */
  4921. __pyx_t_3 = __pyx_v_self;
  4922. __Pyx_INCREF(__pyx_t_3);
  4923. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  4924. __Pyx_GOTREF(__pyx_t_1);
  4925. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_CONTINUATION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  4926. __Pyx_GOTREF(__pyx_t_2);
  4927. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4928. __pyx_t_5 = 0;
  4929. {
  4930. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
  4931. __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  4932. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4933. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4934. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 123, __pyx_L1_error)
  4935. __Pyx_GOTREF(__pyx_t_10);
  4936. }
  4937. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4938. /* "fontTools/feaLib/lexer.py":124
  4939. * self.pos_ += 1
  4940. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4941. * token = text[start : self.pos_] # <<<<<<<<<<<<<<
  4942. * if token == "include":
  4943. * self.mode_ = Lexer.MODE_FILENAME_
  4944. */
  4945. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 124, __pyx_L1_error)
  4946. __Pyx_GOTREF(__pyx_t_10);
  4947. __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_10, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  4948. __Pyx_GOTREF(__pyx_t_2);
  4949. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4950. __pyx_v_token = __pyx_t_2;
  4951. __pyx_t_2 = 0;
  4952. /* "fontTools/feaLib/lexer.py":125
  4953. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4954. * token = text[start : self.pos_]
  4955. * if token == "include": # <<<<<<<<<<<<<<
  4956. * self.mode_ = Lexer.MODE_FILENAME_
  4957. * return (Lexer.NAME, token, location)
  4958. */
  4959. __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_token, __pyx_mstate_global->__pyx_n_u_include, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 125, __pyx_L1_error)
  4960. if (__pyx_t_8) {
  4961. /* "fontTools/feaLib/lexer.py":126
  4962. * token = text[start : self.pos_]
  4963. * if token == "include":
  4964. * self.mode_ = Lexer.MODE_FILENAME_ # <<<<<<<<<<<<<<
  4965. * return (Lexer.NAME, token, location)
  4966. * if cur_char == "0" and next_char in "xX":
  4967. */
  4968. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
  4969. __Pyx_GOTREF(__pyx_t_2);
  4970. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MODE_FILENAME); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 126, __pyx_L1_error)
  4971. __Pyx_GOTREF(__pyx_t_10);
  4972. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4973. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_mode, __pyx_t_10) < (0)) __PYX_ERR(0, 126, __pyx_L1_error)
  4974. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4975. /* "fontTools/feaLib/lexer.py":125
  4976. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4977. * token = text[start : self.pos_]
  4978. * if token == "include": # <<<<<<<<<<<<<<
  4979. * self.mode_ = Lexer.MODE_FILENAME_
  4980. * return (Lexer.NAME, token, location)
  4981. */
  4982. }
  4983. /* "fontTools/feaLib/lexer.py":127
  4984. * if token == "include":
  4985. * self.mode_ = Lexer.MODE_FILENAME_
  4986. * return (Lexer.NAME, token, location) # <<<<<<<<<<<<<<
  4987. * if cur_char == "0" and next_char in "xX":
  4988. * self.pos_ += 2
  4989. */
  4990. __Pyx_XDECREF(__pyx_r);
  4991. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 127, __pyx_L1_error)
  4992. __Pyx_GOTREF(__pyx_t_10);
  4993. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_NAME); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
  4994. __Pyx_GOTREF(__pyx_t_2);
  4995. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4996. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 127, __pyx_L1_error)
  4997. __Pyx_GOTREF(__pyx_t_10);
  4998. __Pyx_GIVEREF(__pyx_t_2);
  4999. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 127, __pyx_L1_error);
  5000. __Pyx_INCREF(__pyx_v_token);
  5001. __Pyx_GIVEREF(__pyx_v_token);
  5002. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_token) != (0)) __PYX_ERR(0, 127, __pyx_L1_error);
  5003. __Pyx_INCREF(__pyx_v_location);
  5004. __Pyx_GIVEREF(__pyx_v_location);
  5005. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 127, __pyx_L1_error);
  5006. __pyx_t_2 = 0;
  5007. __pyx_r = __pyx_t_10;
  5008. __pyx_t_10 = 0;
  5009. goto __pyx_L0;
  5010. /* "fontTools/feaLib/lexer.py":121
  5011. * )
  5012. * return (Lexer.GLYPHCLASS, glyphclass, location)
  5013. * if cur_char in Lexer.CHAR_NAME_START_: # <<<<<<<<<<<<<<
  5014. * self.pos_ += 1
  5015. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  5016. */
  5017. }
  5018. /* "fontTools/feaLib/lexer.py":128
  5019. * self.mode_ = Lexer.MODE_FILENAME_
  5020. * return (Lexer.NAME, token, location)
  5021. * if cur_char == "0" and next_char in "xX": # <<<<<<<<<<<<<<
  5022. * self.pos_ += 2
  5023. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5024. */
  5025. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u_0, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 128, __pyx_L1_error)
  5026. if (__pyx_t_7) {
  5027. } else {
  5028. __pyx_t_8 = __pyx_t_7;
  5029. goto __pyx_L19_bool_binop_done;
  5030. }
  5031. __pyx_t_7 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_next_char, __pyx_mstate_global->__pyx_n_u_xX, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 128, __pyx_L1_error)
  5032. __pyx_t_8 = __pyx_t_7;
  5033. __pyx_L19_bool_binop_done:;
  5034. if (__pyx_t_8) {
  5035. /* "fontTools/feaLib/lexer.py":129
  5036. * return (Lexer.NAME, token, location)
  5037. * if cur_char == "0" and next_char in "xX":
  5038. * self.pos_ += 2 # <<<<<<<<<<<<<<
  5039. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5040. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5041. */
  5042. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 129, __pyx_L1_error)
  5043. __Pyx_GOTREF(__pyx_t_10);
  5044. __pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_10, __pyx_mstate_global->__pyx_int_2, 2, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
  5045. __Pyx_GOTREF(__pyx_t_2);
  5046. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5047. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_2) < (0)) __PYX_ERR(0, 129, __pyx_L1_error)
  5048. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5049. /* "fontTools/feaLib/lexer.py":130
  5050. * if cur_char == "0" and next_char in "xX":
  5051. * self.pos_ += 2
  5052. * self.scan_over_(Lexer.CHAR_HEXDIGIT_) # <<<<<<<<<<<<<<
  5053. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5054. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
  5055. */
  5056. __pyx_t_10 = __pyx_v_self;
  5057. __Pyx_INCREF(__pyx_t_10);
  5058. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  5059. __Pyx_GOTREF(__pyx_t_3);
  5060. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_HEXDIGIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  5061. __Pyx_GOTREF(__pyx_t_1);
  5062. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5063. __pyx_t_5 = 0;
  5064. {
  5065. PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_1};
  5066. __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5067. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  5068. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5069. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
  5070. __Pyx_GOTREF(__pyx_t_2);
  5071. }
  5072. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5073. /* "fontTools/feaLib/lexer.py":131
  5074. * self.pos_ += 2
  5075. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5076. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location) # <<<<<<<<<<<<<<
  5077. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
  5078. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5079. */
  5080. __Pyx_XDECREF(__pyx_r);
  5081. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
  5082. __Pyx_GOTREF(__pyx_t_2);
  5083. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
  5084. __Pyx_GOTREF(__pyx_t_1);
  5085. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5086. __pyx_t_10 = NULL;
  5087. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
  5088. __Pyx_GOTREF(__pyx_t_3);
  5089. __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error)
  5090. __Pyx_GOTREF(__pyx_t_9);
  5091. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5092. __pyx_t_5 = 1;
  5093. {
  5094. PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_9, __pyx_mstate_global->__pyx_int_16};
  5095. __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5096. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  5097. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5098. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
  5099. __Pyx_GOTREF(__pyx_t_2);
  5100. }
  5101. __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error)
  5102. __Pyx_GOTREF(__pyx_t_9);
  5103. __Pyx_GIVEREF(__pyx_t_1);
  5104. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 131, __pyx_L1_error);
  5105. __Pyx_GIVEREF(__pyx_t_2);
  5106. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 131, __pyx_L1_error);
  5107. __Pyx_INCREF(__pyx_v_location);
  5108. __Pyx_GIVEREF(__pyx_v_location);
  5109. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 131, __pyx_L1_error);
  5110. __pyx_t_1 = 0;
  5111. __pyx_t_2 = 0;
  5112. __pyx_r = __pyx_t_9;
  5113. __pyx_t_9 = 0;
  5114. goto __pyx_L0;
  5115. /* "fontTools/feaLib/lexer.py":128
  5116. * self.mode_ = Lexer.MODE_FILENAME_
  5117. * return (Lexer.NAME, token, location)
  5118. * if cur_char == "0" and next_char in "xX": # <<<<<<<<<<<<<<
  5119. * self.pos_ += 2
  5120. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5121. */
  5122. }
  5123. /* "fontTools/feaLib/lexer.py":132
  5124. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5125. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5126. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5127. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5128. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5129. */
  5130. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u_0, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 132, __pyx_L1_error)
  5131. if (__pyx_t_7) {
  5132. } else {
  5133. __pyx_t_8 = __pyx_t_7;
  5134. goto __pyx_L22_bool_binop_done;
  5135. }
  5136. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L1_error)
  5137. __Pyx_GOTREF(__pyx_t_9);
  5138. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
  5139. __Pyx_GOTREF(__pyx_t_2);
  5140. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5141. __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_next_char, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 132, __pyx_L1_error)
  5142. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5143. __pyx_t_8 = __pyx_t_7;
  5144. __pyx_L22_bool_binop_done:;
  5145. if (__pyx_t_8) {
  5146. /* "fontTools/feaLib/lexer.py":133
  5147. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5148. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
  5149. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5150. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5151. * if cur_char in Lexer.CHAR_DIGIT_:
  5152. */
  5153. __pyx_t_9 = __pyx_v_self;
  5154. __Pyx_INCREF(__pyx_t_9);
  5155. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
  5156. __Pyx_GOTREF(__pyx_t_1);
  5157. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 133, __pyx_L1_error)
  5158. __Pyx_GOTREF(__pyx_t_10);
  5159. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5160. __pyx_t_5 = 0;
  5161. {
  5162. PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_10};
  5163. __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5164. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5165. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5166. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
  5167. __Pyx_GOTREF(__pyx_t_2);
  5168. }
  5169. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5170. /* "fontTools/feaLib/lexer.py":134
  5171. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
  5172. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5173. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location) # <<<<<<<<<<<<<<
  5174. * if cur_char in Lexer.CHAR_DIGIT_:
  5175. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5176. */
  5177. __Pyx_XDECREF(__pyx_r);
  5178. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
  5179. __Pyx_GOTREF(__pyx_t_2);
  5180. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_OCTAL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 134, __pyx_L1_error)
  5181. __Pyx_GOTREF(__pyx_t_10);
  5182. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5183. __pyx_t_9 = NULL;
  5184. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
  5185. __Pyx_GOTREF(__pyx_t_1);
  5186. __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
  5187. __Pyx_GOTREF(__pyx_t_3);
  5188. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5189. __pyx_t_5 = 1;
  5190. {
  5191. PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_3, __pyx_mstate_global->__pyx_int_8};
  5192. __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5193. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5194. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5195. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
  5196. __Pyx_GOTREF(__pyx_t_2);
  5197. }
  5198. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
  5199. __Pyx_GOTREF(__pyx_t_3);
  5200. __Pyx_GIVEREF(__pyx_t_10);
  5201. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 134, __pyx_L1_error);
  5202. __Pyx_GIVEREF(__pyx_t_2);
  5203. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 134, __pyx_L1_error);
  5204. __Pyx_INCREF(__pyx_v_location);
  5205. __Pyx_GIVEREF(__pyx_v_location);
  5206. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 134, __pyx_L1_error);
  5207. __pyx_t_10 = 0;
  5208. __pyx_t_2 = 0;
  5209. __pyx_r = __pyx_t_3;
  5210. __pyx_t_3 = 0;
  5211. goto __pyx_L0;
  5212. /* "fontTools/feaLib/lexer.py":132
  5213. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5214. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5215. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5216. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5217. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5218. */
  5219. }
  5220. /* "fontTools/feaLib/lexer.py":135
  5221. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5222. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5223. * if cur_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5224. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5225. * if self.pos_ >= limit or text[self.pos_] != ".":
  5226. */
  5227. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
  5228. __Pyx_GOTREF(__pyx_t_3);
  5229. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
  5230. __Pyx_GOTREF(__pyx_t_2);
  5231. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5232. __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_cur_char, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 135, __pyx_L1_error)
  5233. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5234. if (__pyx_t_8) {
  5235. /* "fontTools/feaLib/lexer.py":136
  5236. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5237. * if cur_char in Lexer.CHAR_DIGIT_:
  5238. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5239. * if self.pos_ >= limit or text[self.pos_] != ".":
  5240. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5241. */
  5242. __pyx_t_3 = __pyx_v_self;
  5243. __Pyx_INCREF(__pyx_t_3);
  5244. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 136, __pyx_L1_error)
  5245. __Pyx_GOTREF(__pyx_t_10);
  5246. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 136, __pyx_L1_error)
  5247. __Pyx_GOTREF(__pyx_t_9);
  5248. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5249. __pyx_t_5 = 0;
  5250. {
  5251. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
  5252. __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5253. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  5254. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5255. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
  5256. __Pyx_GOTREF(__pyx_t_2);
  5257. }
  5258. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5259. /* "fontTools/feaLib/lexer.py":137
  5260. * if cur_char in Lexer.CHAR_DIGIT_:
  5261. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5262. * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
  5263. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5264. * self.scan_over_(".")
  5265. */
  5266. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
  5267. __Pyx_GOTREF(__pyx_t_2);
  5268. __pyx_t_9 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error)
  5269. __Pyx_GOTREF(__pyx_t_9);
  5270. __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
  5271. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5272. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5273. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 137, __pyx_L1_error)
  5274. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5275. if (!__pyx_t_7) {
  5276. } else {
  5277. __pyx_t_8 = __pyx_t_7;
  5278. goto __pyx_L26_bool_binop_done;
  5279. }
  5280. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
  5281. __Pyx_GOTREF(__pyx_t_3);
  5282. __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error)
  5283. __Pyx_GOTREF(__pyx_t_9);
  5284. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5285. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u__8, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 137, __pyx_L1_error)
  5286. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5287. __pyx_t_8 = __pyx_t_7;
  5288. __pyx_L26_bool_binop_done:;
  5289. if (__pyx_t_8) {
  5290. /* "fontTools/feaLib/lexer.py":138
  5291. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5292. * if self.pos_ >= limit or text[self.pos_] != ".":
  5293. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location) # <<<<<<<<<<<<<<
  5294. * self.scan_over_(".")
  5295. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5296. */
  5297. __Pyx_XDECREF(__pyx_r);
  5298. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 138, __pyx_L1_error)
  5299. __Pyx_GOTREF(__pyx_t_9);
  5300. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_NUMBER); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
  5301. __Pyx_GOTREF(__pyx_t_3);
  5302. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5303. __pyx_t_2 = NULL;
  5304. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 138, __pyx_L1_error)
  5305. __Pyx_GOTREF(__pyx_t_10);
  5306. __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_10, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
  5307. __Pyx_GOTREF(__pyx_t_1);
  5308. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5309. __pyx_t_5 = 1;
  5310. {
  5311. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_1, __pyx_mstate_global->__pyx_int_10};
  5312. __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5313. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  5314. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5315. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 138, __pyx_L1_error)
  5316. __Pyx_GOTREF(__pyx_t_9);
  5317. }
  5318. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
  5319. __Pyx_GOTREF(__pyx_t_1);
  5320. __Pyx_GIVEREF(__pyx_t_3);
  5321. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 138, __pyx_L1_error);
  5322. __Pyx_GIVEREF(__pyx_t_9);
  5323. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 138, __pyx_L1_error);
  5324. __Pyx_INCREF(__pyx_v_location);
  5325. __Pyx_GIVEREF(__pyx_v_location);
  5326. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 138, __pyx_L1_error);
  5327. __pyx_t_3 = 0;
  5328. __pyx_t_9 = 0;
  5329. __pyx_r = __pyx_t_1;
  5330. __pyx_t_1 = 0;
  5331. goto __pyx_L0;
  5332. /* "fontTools/feaLib/lexer.py":137
  5333. * if cur_char in Lexer.CHAR_DIGIT_:
  5334. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5335. * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
  5336. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5337. * self.scan_over_(".")
  5338. */
  5339. }
  5340. /* "fontTools/feaLib/lexer.py":139
  5341. * if self.pos_ >= limit or text[self.pos_] != ".":
  5342. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5343. * self.scan_over_(".") # <<<<<<<<<<<<<<
  5344. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5345. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5346. */
  5347. __pyx_t_9 = __pyx_v_self;
  5348. __Pyx_INCREF(__pyx_t_9);
  5349. __pyx_t_5 = 0;
  5350. {
  5351. PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u__8};
  5352. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5353. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5354. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
  5355. __Pyx_GOTREF(__pyx_t_1);
  5356. }
  5357. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5358. /* "fontTools/feaLib/lexer.py":140
  5359. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5360. * self.scan_over_(".")
  5361. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5362. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5363. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
  5364. */
  5365. __pyx_t_9 = __pyx_v_self;
  5366. __Pyx_INCREF(__pyx_t_9);
  5367. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
  5368. __Pyx_GOTREF(__pyx_t_3);
  5369. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
  5370. __Pyx_GOTREF(__pyx_t_2);
  5371. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5372. __pyx_t_5 = 0;
  5373. {
  5374. PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
  5375. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5376. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5377. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5378. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
  5379. __Pyx_GOTREF(__pyx_t_1);
  5380. }
  5381. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5382. /* "fontTools/feaLib/lexer.py":141
  5383. * self.scan_over_(".")
  5384. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5385. * return (Lexer.FLOAT, float(text[start : self.pos_]), location) # <<<<<<<<<<<<<<
  5386. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
  5387. * self.pos_ += 1
  5388. */
  5389. __Pyx_XDECREF(__pyx_r);
  5390. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  5391. __Pyx_GOTREF(__pyx_t_1);
  5392. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
  5393. __Pyx_GOTREF(__pyx_t_2);
  5394. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5395. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  5396. __Pyx_GOTREF(__pyx_t_1);
  5397. __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L1_error)
  5398. __Pyx_GOTREF(__pyx_t_9);
  5399. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5400. __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  5401. __Pyx_GOTREF(__pyx_t_1);
  5402. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5403. __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L1_error)
  5404. __Pyx_GOTREF(__pyx_t_9);
  5405. __Pyx_GIVEREF(__pyx_t_2);
  5406. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 141, __pyx_L1_error);
  5407. __Pyx_GIVEREF(__pyx_t_1);
  5408. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 141, __pyx_L1_error);
  5409. __Pyx_INCREF(__pyx_v_location);
  5410. __Pyx_GIVEREF(__pyx_v_location);
  5411. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 141, __pyx_L1_error);
  5412. __pyx_t_2 = 0;
  5413. __pyx_t_1 = 0;
  5414. __pyx_r = __pyx_t_9;
  5415. __pyx_t_9 = 0;
  5416. goto __pyx_L0;
  5417. /* "fontTools/feaLib/lexer.py":135
  5418. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5419. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5420. * if cur_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5421. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5422. * if self.pos_ >= limit or text[self.pos_] != ".":
  5423. */
  5424. }
  5425. /* "fontTools/feaLib/lexer.py":142
  5426. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5427. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5428. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5429. * self.pos_ += 1
  5430. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5431. */
  5432. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__9, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 142, __pyx_L1_error)
  5433. if (__pyx_t_7) {
  5434. } else {
  5435. __pyx_t_8 = __pyx_t_7;
  5436. goto __pyx_L29_bool_binop_done;
  5437. }
  5438. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 142, __pyx_L1_error)
  5439. __Pyx_GOTREF(__pyx_t_9);
  5440. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
  5441. __Pyx_GOTREF(__pyx_t_1);
  5442. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5443. __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_next_char, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 142, __pyx_L1_error)
  5444. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5445. __pyx_t_8 = __pyx_t_7;
  5446. __pyx_L29_bool_binop_done:;
  5447. if (__pyx_t_8) {
  5448. /* "fontTools/feaLib/lexer.py":143
  5449. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5450. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
  5451. * self.pos_ += 1 # <<<<<<<<<<<<<<
  5452. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5453. * if self.pos_ >= limit or text[self.pos_] != ".":
  5454. */
  5455. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
  5456. __Pyx_GOTREF(__pyx_t_1);
  5457. __pyx_t_9 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 143, __pyx_L1_error)
  5458. __Pyx_GOTREF(__pyx_t_9);
  5459. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5460. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_9) < (0)) __PYX_ERR(0, 143, __pyx_L1_error)
  5461. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5462. /* "fontTools/feaLib/lexer.py":144
  5463. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
  5464. * self.pos_ += 1
  5465. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5466. * if self.pos_ >= limit or text[self.pos_] != ".":
  5467. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5468. */
  5469. __pyx_t_1 = __pyx_v_self;
  5470. __Pyx_INCREF(__pyx_t_1);
  5471. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
  5472. __Pyx_GOTREF(__pyx_t_2);
  5473. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
  5474. __Pyx_GOTREF(__pyx_t_3);
  5475. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5476. __pyx_t_5 = 0;
  5477. {
  5478. PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
  5479. __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5480. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  5481. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5482. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 144, __pyx_L1_error)
  5483. __Pyx_GOTREF(__pyx_t_9);
  5484. }
  5485. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5486. /* "fontTools/feaLib/lexer.py":145
  5487. * self.pos_ += 1
  5488. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5489. * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
  5490. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5491. * self.scan_over_(".")
  5492. */
  5493. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error)
  5494. __Pyx_GOTREF(__pyx_t_9);
  5495. __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
  5496. __Pyx_GOTREF(__pyx_t_3);
  5497. __pyx_t_1 = PyObject_RichCompare(__pyx_t_9, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
  5498. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5499. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5500. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
  5501. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5502. if (!__pyx_t_7) {
  5503. } else {
  5504. __pyx_t_8 = __pyx_t_7;
  5505. goto __pyx_L32_bool_binop_done;
  5506. }
  5507. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
  5508. __Pyx_GOTREF(__pyx_t_1);
  5509. __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
  5510. __Pyx_GOTREF(__pyx_t_3);
  5511. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5512. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__8, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
  5513. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5514. __pyx_t_8 = __pyx_t_7;
  5515. __pyx_L32_bool_binop_done:;
  5516. if (__pyx_t_8) {
  5517. /* "fontTools/feaLib/lexer.py":146
  5518. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5519. * if self.pos_ >= limit or text[self.pos_] != ".":
  5520. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location) # <<<<<<<<<<<<<<
  5521. * self.scan_over_(".")
  5522. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5523. */
  5524. __Pyx_XDECREF(__pyx_r);
  5525. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
  5526. __Pyx_GOTREF(__pyx_t_3);
  5527. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NUMBER); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
  5528. __Pyx_GOTREF(__pyx_t_1);
  5529. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5530. __pyx_t_9 = NULL;
  5531. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error)
  5532. __Pyx_GOTREF(__pyx_t_2);
  5533. __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L1_error)
  5534. __Pyx_GOTREF(__pyx_t_10);
  5535. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5536. __pyx_t_5 = 1;
  5537. {
  5538. PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_10, __pyx_mstate_global->__pyx_int_10};
  5539. __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(&PyLong_Type), __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5540. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5541. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5542. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
  5543. __Pyx_GOTREF(__pyx_t_3);
  5544. }
  5545. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L1_error)
  5546. __Pyx_GOTREF(__pyx_t_10);
  5547. __Pyx_GIVEREF(__pyx_t_1);
  5548. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 146, __pyx_L1_error);
  5549. __Pyx_GIVEREF(__pyx_t_3);
  5550. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 146, __pyx_L1_error);
  5551. __Pyx_INCREF(__pyx_v_location);
  5552. __Pyx_GIVEREF(__pyx_v_location);
  5553. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 146, __pyx_L1_error);
  5554. __pyx_t_1 = 0;
  5555. __pyx_t_3 = 0;
  5556. __pyx_r = __pyx_t_10;
  5557. __pyx_t_10 = 0;
  5558. goto __pyx_L0;
  5559. /* "fontTools/feaLib/lexer.py":145
  5560. * self.pos_ += 1
  5561. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5562. * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
  5563. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5564. * self.scan_over_(".")
  5565. */
  5566. }
  5567. /* "fontTools/feaLib/lexer.py":147
  5568. * if self.pos_ >= limit or text[self.pos_] != ".":
  5569. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5570. * self.scan_over_(".") # <<<<<<<<<<<<<<
  5571. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5572. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5573. */
  5574. __pyx_t_3 = __pyx_v_self;
  5575. __Pyx_INCREF(__pyx_t_3);
  5576. __pyx_t_5 = 0;
  5577. {
  5578. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__8};
  5579. __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5580. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  5581. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 147, __pyx_L1_error)
  5582. __Pyx_GOTREF(__pyx_t_10);
  5583. }
  5584. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5585. /* "fontTools/feaLib/lexer.py":148
  5586. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5587. * self.scan_over_(".")
  5588. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5589. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5590. * if cur_char in Lexer.CHAR_SYMBOL_:
  5591. */
  5592. __pyx_t_3 = __pyx_v_self;
  5593. __Pyx_INCREF(__pyx_t_3);
  5594. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
  5595. __Pyx_GOTREF(__pyx_t_1);
  5596. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error)
  5597. __Pyx_GOTREF(__pyx_t_9);
  5598. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5599. __pyx_t_5 = 0;
  5600. {
  5601. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
  5602. __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5603. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  5604. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5605. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 148, __pyx_L1_error)
  5606. __Pyx_GOTREF(__pyx_t_10);
  5607. }
  5608. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5609. /* "fontTools/feaLib/lexer.py":149
  5610. * self.scan_over_(".")
  5611. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5612. * return (Lexer.FLOAT, float(text[start : self.pos_]), location) # <<<<<<<<<<<<<<
  5613. * if cur_char in Lexer.CHAR_SYMBOL_:
  5614. * self.pos_ += 1
  5615. */
  5616. __Pyx_XDECREF(__pyx_r);
  5617. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
  5618. __Pyx_GOTREF(__pyx_t_10);
  5619. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_FLOAT); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error)
  5620. __Pyx_GOTREF(__pyx_t_9);
  5621. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5622. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
  5623. __Pyx_GOTREF(__pyx_t_10);
  5624. __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_v_start, &__pyx_t_10, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
  5625. __Pyx_GOTREF(__pyx_t_3);
  5626. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5627. __pyx_t_10 = __Pyx_PyNumber_Float(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
  5628. __Pyx_GOTREF(__pyx_t_10);
  5629. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5630. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
  5631. __Pyx_GOTREF(__pyx_t_3);
  5632. __Pyx_GIVEREF(__pyx_t_9);
  5633. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 149, __pyx_L1_error);
  5634. __Pyx_GIVEREF(__pyx_t_10);
  5635. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 149, __pyx_L1_error);
  5636. __Pyx_INCREF(__pyx_v_location);
  5637. __Pyx_GIVEREF(__pyx_v_location);
  5638. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 149, __pyx_L1_error);
  5639. __pyx_t_9 = 0;
  5640. __pyx_t_10 = 0;
  5641. __pyx_r = __pyx_t_3;
  5642. __pyx_t_3 = 0;
  5643. goto __pyx_L0;
  5644. /* "fontTools/feaLib/lexer.py":142
  5645. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5646. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5647. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5648. * self.pos_ += 1
  5649. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5650. */
  5651. }
  5652. /* "fontTools/feaLib/lexer.py":150
  5653. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5654. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5655. * if cur_char in Lexer.CHAR_SYMBOL_: # <<<<<<<<<<<<<<
  5656. * self.pos_ += 1
  5657. * return (Lexer.SYMBOL, cur_char, location)
  5658. */
  5659. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
  5660. __Pyx_GOTREF(__pyx_t_3);
  5661. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_CHAR_SYMBOL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 150, __pyx_L1_error)
  5662. __Pyx_GOTREF(__pyx_t_10);
  5663. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5664. __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_cur_char, __pyx_t_10, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 150, __pyx_L1_error)
  5665. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5666. if (__pyx_t_8) {
  5667. /* "fontTools/feaLib/lexer.py":151
  5668. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5669. * if cur_char in Lexer.CHAR_SYMBOL_:
  5670. * self.pos_ += 1 # <<<<<<<<<<<<<<
  5671. * return (Lexer.SYMBOL, cur_char, location)
  5672. * if cur_char == '"':
  5673. */
  5674. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 151, __pyx_L1_error)
  5675. __Pyx_GOTREF(__pyx_t_10);
  5676. __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_t_10, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
  5677. __Pyx_GOTREF(__pyx_t_3);
  5678. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5679. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 151, __pyx_L1_error)
  5680. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5681. /* "fontTools/feaLib/lexer.py":152
  5682. * if cur_char in Lexer.CHAR_SYMBOL_:
  5683. * self.pos_ += 1
  5684. * return (Lexer.SYMBOL, cur_char, location) # <<<<<<<<<<<<<<
  5685. * if cur_char == '"':
  5686. * self.pos_ += 1
  5687. */
  5688. __Pyx_XDECREF(__pyx_r);
  5689. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
  5690. __Pyx_GOTREF(__pyx_t_3);
  5691. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SYMBOL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 152, __pyx_L1_error)
  5692. __Pyx_GOTREF(__pyx_t_10);
  5693. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5694. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
  5695. __Pyx_GOTREF(__pyx_t_3);
  5696. __Pyx_GIVEREF(__pyx_t_10);
  5697. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 152, __pyx_L1_error);
  5698. __Pyx_INCREF(__pyx_v_cur_char);
  5699. __Pyx_GIVEREF(__pyx_v_cur_char);
  5700. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cur_char) != (0)) __PYX_ERR(0, 152, __pyx_L1_error);
  5701. __Pyx_INCREF(__pyx_v_location);
  5702. __Pyx_GIVEREF(__pyx_v_location);
  5703. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 152, __pyx_L1_error);
  5704. __pyx_t_10 = 0;
  5705. __pyx_r = __pyx_t_3;
  5706. __pyx_t_3 = 0;
  5707. goto __pyx_L0;
  5708. /* "fontTools/feaLib/lexer.py":150
  5709. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5710. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5711. * if cur_char in Lexer.CHAR_SYMBOL_: # <<<<<<<<<<<<<<
  5712. * self.pos_ += 1
  5713. * return (Lexer.SYMBOL, cur_char, location)
  5714. */
  5715. }
  5716. /* "fontTools/feaLib/lexer.py":153
  5717. * self.pos_ += 1
  5718. * return (Lexer.SYMBOL, cur_char, location)
  5719. * if cur_char == '"': # <<<<<<<<<<<<<<
  5720. * self.pos_ += 1
  5721. * self.scan_until_('"')
  5722. */
  5723. __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_cur_char, __pyx_mstate_global->__pyx_kp_u__10, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 153, __pyx_L1_error)
  5724. if (__pyx_t_8) {
  5725. /* "fontTools/feaLib/lexer.py":154
  5726. * return (Lexer.SYMBOL, cur_char, location)
  5727. * if cur_char == '"':
  5728. * self.pos_ += 1 # <<<<<<<<<<<<<<
  5729. * self.scan_until_('"')
  5730. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"':
  5731. */
  5732. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  5733. __Pyx_GOTREF(__pyx_t_3);
  5734. __pyx_t_10 = __Pyx_PyLong_AddObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 154, __pyx_L1_error)
  5735. __Pyx_GOTREF(__pyx_t_10);
  5736. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5737. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_10) < (0)) __PYX_ERR(0, 154, __pyx_L1_error)
  5738. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5739. /* "fontTools/feaLib/lexer.py":155
  5740. * if cur_char == '"':
  5741. * self.pos_ += 1
  5742. * self.scan_until_('"') # <<<<<<<<<<<<<<
  5743. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"':
  5744. * self.pos_ += 1
  5745. */
  5746. __pyx_t_3 = __pyx_v_self;
  5747. __Pyx_INCREF(__pyx_t_3);
  5748. __pyx_t_5 = 0;
  5749. {
  5750. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__10};
  5751. __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_until, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5752. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  5753. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 155, __pyx_L1_error)
  5754. __Pyx_GOTREF(__pyx_t_10);
  5755. }
  5756. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5757. /* "fontTools/feaLib/lexer.py":156
  5758. * self.pos_ += 1
  5759. * self.scan_until_('"')
  5760. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"': # <<<<<<<<<<<<<<
  5761. * self.pos_ += 1
  5762. * # strip newlines embedded within a string
  5763. */
  5764. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 156, __pyx_L1_error)
  5765. __Pyx_GOTREF(__pyx_t_10);
  5766. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
  5767. __Pyx_GOTREF(__pyx_t_3);
  5768. __pyx_t_9 = PyObject_RichCompare(__pyx_t_10, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L1_error)
  5769. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5770. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5771. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 156, __pyx_L1_error)
  5772. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5773. if (__pyx_t_7) {
  5774. } else {
  5775. __pyx_t_8 = __pyx_t_7;
  5776. goto __pyx_L37_bool_binop_done;
  5777. }
  5778. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L1_error)
  5779. __Pyx_GOTREF(__pyx_t_9);
  5780. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
  5781. __Pyx_GOTREF(__pyx_t_3);
  5782. __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 156, __pyx_L1_error)
  5783. __Pyx_GOTREF(__pyx_t_10);
  5784. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5785. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5786. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_10, __pyx_mstate_global->__pyx_kp_u__10, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 156, __pyx_L1_error)
  5787. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5788. __pyx_t_8 = __pyx_t_7;
  5789. __pyx_L37_bool_binop_done:;
  5790. if (likely(__pyx_t_8)) {
  5791. /* "fontTools/feaLib/lexer.py":157
  5792. * self.scan_until_('"')
  5793. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"':
  5794. * self.pos_ += 1 # <<<<<<<<<<<<<<
  5795. * # strip newlines embedded within a string
  5796. * string = re.sub("[\r\n]", "", text[start + 1 : self.pos_ - 1])
  5797. */
  5798. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 157, __pyx_L1_error)
  5799. __Pyx_GOTREF(__pyx_t_10);
  5800. __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_t_10, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
  5801. __Pyx_GOTREF(__pyx_t_3);
  5802. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5803. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_3) < (0)) __PYX_ERR(0, 157, __pyx_L1_error)
  5804. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5805. /* "fontTools/feaLib/lexer.py":159
  5806. * self.pos_ += 1
  5807. * # strip newlines embedded within a string
  5808. * string = re.sub("[\r\n]", "", text[start + 1 : self.pos_ - 1]) # <<<<<<<<<<<<<<
  5809. * return (Lexer.STRING, string, location)
  5810. * else:
  5811. */
  5812. __pyx_t_10 = NULL;
  5813. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
  5814. __Pyx_GOTREF(__pyx_t_9);
  5815. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_sub); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  5816. __Pyx_GOTREF(__pyx_t_1);
  5817. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5818. __pyx_t_9 = __Pyx_PyLong_AddObjC(__pyx_v_start, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
  5819. __Pyx_GOTREF(__pyx_t_9);
  5820. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  5821. __Pyx_GOTREF(__pyx_t_2);
  5822. __pyx_t_4 = __Pyx_PyLong_SubtractObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
  5823. __Pyx_GOTREF(__pyx_t_4);
  5824. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5825. __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_text, 0, 0, &__pyx_t_9, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  5826. __Pyx_GOTREF(__pyx_t_2);
  5827. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5828. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  5829. __pyx_t_5 = 1;
  5830. #if CYTHON_UNPACK_METHODS
  5831. if (unlikely(PyMethod_Check(__pyx_t_1))) {
  5832. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
  5833. assert(__pyx_t_10);
  5834. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
  5835. __Pyx_INCREF(__pyx_t_10);
  5836. __Pyx_INCREF(__pyx__function);
  5837. __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
  5838. __pyx_t_5 = 0;
  5839. }
  5840. #endif
  5841. {
  5842. PyObject *__pyx_callargs[4] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u__11, __pyx_mstate_global->__pyx_kp_u__12, __pyx_t_2};
  5843. __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5844. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  5845. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5846. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5847. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
  5848. __Pyx_GOTREF(__pyx_t_3);
  5849. }
  5850. __pyx_v_string = __pyx_t_3;
  5851. __pyx_t_3 = 0;
  5852. /* "fontTools/feaLib/lexer.py":160
  5853. * # strip newlines embedded within a string
  5854. * string = re.sub("[\r\n]", "", text[start + 1 : self.pos_ - 1])
  5855. * return (Lexer.STRING, string, location) # <<<<<<<<<<<<<<
  5856. * else:
  5857. * raise FeatureLibError("Expected '\"' to terminate string", location)
  5858. */
  5859. __Pyx_XDECREF(__pyx_r);
  5860. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
  5861. __Pyx_GOTREF(__pyx_t_3);
  5862. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
  5863. __Pyx_GOTREF(__pyx_t_1);
  5864. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5865. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
  5866. __Pyx_GOTREF(__pyx_t_3);
  5867. __Pyx_GIVEREF(__pyx_t_1);
  5868. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 160, __pyx_L1_error);
  5869. __Pyx_INCREF(__pyx_v_string);
  5870. __Pyx_GIVEREF(__pyx_v_string);
  5871. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_string) != (0)) __PYX_ERR(0, 160, __pyx_L1_error);
  5872. __Pyx_INCREF(__pyx_v_location);
  5873. __Pyx_GIVEREF(__pyx_v_location);
  5874. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 160, __pyx_L1_error);
  5875. __pyx_t_1 = 0;
  5876. __pyx_r = __pyx_t_3;
  5877. __pyx_t_3 = 0;
  5878. goto __pyx_L0;
  5879. /* "fontTools/feaLib/lexer.py":156
  5880. * self.pos_ += 1
  5881. * self.scan_until_('"')
  5882. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"': # <<<<<<<<<<<<<<
  5883. * self.pos_ += 1
  5884. * # strip newlines embedded within a string
  5885. */
  5886. }
  5887. /* "fontTools/feaLib/lexer.py":162
  5888. * return (Lexer.STRING, string, location)
  5889. * else:
  5890. * raise FeatureLibError("Expected '\"' to terminate string", location) # <<<<<<<<<<<<<<
  5891. * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
  5892. *
  5893. */
  5894. /*else*/ {
  5895. __pyx_t_1 = NULL;
  5896. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
  5897. __Pyx_GOTREF(__pyx_t_2);
  5898. __pyx_t_5 = 1;
  5899. #if CYTHON_UNPACK_METHODS
  5900. if (unlikely(PyMethod_Check(__pyx_t_2))) {
  5901. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
  5902. assert(__pyx_t_1);
  5903. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
  5904. __Pyx_INCREF(__pyx_t_1);
  5905. __Pyx_INCREF(__pyx__function);
  5906. __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
  5907. __pyx_t_5 = 0;
  5908. }
  5909. #endif
  5910. {
  5911. PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Expected_to_terminate_string, __pyx_v_location};
  5912. __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5913. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  5914. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5915. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
  5916. __Pyx_GOTREF(__pyx_t_3);
  5917. }
  5918. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  5919. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5920. __PYX_ERR(0, 162, __pyx_L1_error)
  5921. }
  5922. /* "fontTools/feaLib/lexer.py":153
  5923. * self.pos_ += 1
  5924. * return (Lexer.SYMBOL, cur_char, location)
  5925. * if cur_char == '"': # <<<<<<<<<<<<<<
  5926. * self.pos_ += 1
  5927. * self.scan_until_('"')
  5928. */
  5929. }
  5930. /* "fontTools/feaLib/lexer.py":163
  5931. * else:
  5932. * raise FeatureLibError("Expected '\"' to terminate string", location)
  5933. * raise FeatureLibError("Unexpected character: %r" % cur_char, location) # <<<<<<<<<<<<<<
  5934. *
  5935. * def scan_over_(self, valid):
  5936. */
  5937. __pyx_t_2 = NULL;
  5938. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
  5939. __Pyx_GOTREF(__pyx_t_1);
  5940. __pyx_t_10 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Unexpected_character_r, __pyx_v_cur_char); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 163, __pyx_L1_error)
  5941. __Pyx_GOTREF(__pyx_t_10);
  5942. __pyx_t_5 = 1;
  5943. #if CYTHON_UNPACK_METHODS
  5944. if (unlikely(PyMethod_Check(__pyx_t_1))) {
  5945. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
  5946. assert(__pyx_t_2);
  5947. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
  5948. __Pyx_INCREF(__pyx_t_2);
  5949. __Pyx_INCREF(__pyx__function);
  5950. __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
  5951. __pyx_t_5 = 0;
  5952. }
  5953. #endif
  5954. {
  5955. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_10, __pyx_v_location};
  5956. __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  5957. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  5958. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5959. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5960. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
  5961. __Pyx_GOTREF(__pyx_t_3);
  5962. }
  5963. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  5964. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5965. __PYX_ERR(0, 163, __pyx_L1_error)
  5966. /* "fontTools/feaLib/lexer.py":68
  5967. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  5968. *
  5969. * def next_(self): # <<<<<<<<<<<<<<
  5970. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  5971. * location = self.location_()
  5972. */
  5973. /* function exit code */
  5974. __pyx_L1_error:;
  5975. __Pyx_XDECREF(__pyx_t_1);
  5976. __Pyx_XDECREF(__pyx_t_2);
  5977. __Pyx_XDECREF(__pyx_t_3);
  5978. __Pyx_XDECREF(__pyx_t_4);
  5979. __Pyx_XDECREF(__pyx_t_9);
  5980. __Pyx_XDECREF(__pyx_t_10);
  5981. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.next_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5982. __pyx_r = NULL;
  5983. __pyx_L0:;
  5984. __Pyx_XDECREF(__pyx_v_location);
  5985. __Pyx_XDECREF(__pyx_v_start);
  5986. __Pyx_XDECREF(__pyx_v_text);
  5987. __Pyx_XDECREF(__pyx_v_cur_char);
  5988. __Pyx_XDECREF(__pyx_v_next_char);
  5989. __Pyx_XDECREF(__pyx_v_glyphclass);
  5990. __Pyx_XDECREF(__pyx_v_token);
  5991. __Pyx_XDECREF(__pyx_v_string);
  5992. __Pyx_XGIVEREF(__pyx_r);
  5993. __Pyx_RefNannyFinishContext();
  5994. return __pyx_r;
  5995. }
  5996. /* "fontTools/feaLib/lexer.py":165
  5997. * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
  5998. *
  5999. * def scan_over_(self, valid): # <<<<<<<<<<<<<<
  6000. * p = self.pos_
  6001. * while p < self.text_length_ and self.text_[p] in valid:
  6002. */
  6003. /* Python wrapper */
  6004. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_(PyObject *__pyx_self,
  6005. #if CYTHON_METH_FASTCALL
  6006. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6007. #else
  6008. PyObject *__pyx_args, PyObject *__pyx_kwds
  6009. #endif
  6010. ); /*proto*/
  6011. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_, "Lexer.scan_over_(self, valid)");
  6012. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_ = {"scan_over_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_};
  6013. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_(PyObject *__pyx_self,
  6014. #if CYTHON_METH_FASTCALL
  6015. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6016. #else
  6017. PyObject *__pyx_args, PyObject *__pyx_kwds
  6018. #endif
  6019. ) {
  6020. PyObject *__pyx_v_self = 0;
  6021. PyObject *__pyx_v_valid = 0;
  6022. #if !CYTHON_METH_FASTCALL
  6023. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  6024. #endif
  6025. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  6026. PyObject* values[2] = {0,0};
  6027. int __pyx_lineno = 0;
  6028. const char *__pyx_filename = NULL;
  6029. int __pyx_clineno = 0;
  6030. PyObject *__pyx_r = 0;
  6031. __Pyx_RefNannyDeclarations
  6032. __Pyx_RefNannySetupContext("scan_over_ (wrapper)", 0);
  6033. #if !CYTHON_METH_FASTCALL
  6034. #if CYTHON_ASSUME_SAFE_SIZE
  6035. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  6036. #else
  6037. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  6038. #endif
  6039. #endif
  6040. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  6041. {
  6042. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_valid,0};
  6043. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  6044. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 165, __pyx_L3_error)
  6045. if (__pyx_kwds_len > 0) {
  6046. switch (__pyx_nargs) {
  6047. case 2:
  6048. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6049. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 165, __pyx_L3_error)
  6050. CYTHON_FALLTHROUGH;
  6051. case 1:
  6052. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6053. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 165, __pyx_L3_error)
  6054. CYTHON_FALLTHROUGH;
  6055. case 0: break;
  6056. default: goto __pyx_L5_argtuple_error;
  6057. }
  6058. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  6059. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scan_over_", 0) < (0)) __PYX_ERR(0, 165, __pyx_L3_error)
  6060. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  6061. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_over_", 1, 2, 2, i); __PYX_ERR(0, 165, __pyx_L3_error) }
  6062. }
  6063. } else if (unlikely(__pyx_nargs != 2)) {
  6064. goto __pyx_L5_argtuple_error;
  6065. } else {
  6066. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6067. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 165, __pyx_L3_error)
  6068. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6069. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 165, __pyx_L3_error)
  6070. }
  6071. __pyx_v_self = values[0];
  6072. __pyx_v_valid = values[1];
  6073. }
  6074. goto __pyx_L6_skip;
  6075. __pyx_L5_argtuple_error:;
  6076. __Pyx_RaiseArgtupleInvalid("scan_over_", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 165, __pyx_L3_error)
  6077. __pyx_L6_skip:;
  6078. goto __pyx_L4_argument_unpacking_done;
  6079. __pyx_L3_error:;
  6080. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6081. Py_XDECREF(values[__pyx_temp]);
  6082. }
  6083. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_over_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6084. __Pyx_RefNannyFinishContext();
  6085. return NULL;
  6086. __pyx_L4_argument_unpacking_done:;
  6087. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_(__pyx_self, __pyx_v_self, __pyx_v_valid);
  6088. /* function exit code */
  6089. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6090. Py_XDECREF(values[__pyx_temp]);
  6091. }
  6092. __Pyx_RefNannyFinishContext();
  6093. return __pyx_r;
  6094. }
  6095. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_valid) {
  6096. PyObject *__pyx_v_p = NULL;
  6097. PyObject *__pyx_r = NULL;
  6098. __Pyx_RefNannyDeclarations
  6099. PyObject *__pyx_t_1 = NULL;
  6100. int __pyx_t_2;
  6101. PyObject *__pyx_t_3 = NULL;
  6102. int __pyx_t_4;
  6103. int __pyx_lineno = 0;
  6104. const char *__pyx_filename = NULL;
  6105. int __pyx_clineno = 0;
  6106. __Pyx_RefNannySetupContext("scan_over_", 0);
  6107. /* "fontTools/feaLib/lexer.py":166
  6108. *
  6109. * def scan_over_(self, valid):
  6110. * p = self.pos_ # <<<<<<<<<<<<<<
  6111. * while p < self.text_length_ and self.text_[p] in valid:
  6112. * p += 1
  6113. */
  6114. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
  6115. __Pyx_GOTREF(__pyx_t_1);
  6116. __pyx_v_p = __pyx_t_1;
  6117. __pyx_t_1 = 0;
  6118. /* "fontTools/feaLib/lexer.py":167
  6119. * def scan_over_(self, valid):
  6120. * p = self.pos_
  6121. * while p < self.text_length_ and self.text_[p] in valid: # <<<<<<<<<<<<<<
  6122. * p += 1
  6123. * self.pos_ = p
  6124. */
  6125. while (1) {
  6126. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
  6127. __Pyx_GOTREF(__pyx_t_1);
  6128. __pyx_t_3 = PyObject_RichCompare(__pyx_v_p, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
  6129. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6130. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 167, __pyx_L1_error)
  6131. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6132. if (__pyx_t_4) {
  6133. } else {
  6134. __pyx_t_2 = __pyx_t_4;
  6135. goto __pyx_L5_bool_binop_done;
  6136. }
  6137. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
  6138. __Pyx_GOTREF(__pyx_t_3);
  6139. __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
  6140. __Pyx_GOTREF(__pyx_t_1);
  6141. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6142. __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_valid, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 167, __pyx_L1_error)
  6143. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6144. __pyx_t_2 = __pyx_t_4;
  6145. __pyx_L5_bool_binop_done:;
  6146. if (!__pyx_t_2) break;
  6147. /* "fontTools/feaLib/lexer.py":168
  6148. * p = self.pos_
  6149. * while p < self.text_length_ and self.text_[p] in valid:
  6150. * p += 1 # <<<<<<<<<<<<<<
  6151. * self.pos_ = p
  6152. *
  6153. */
  6154. __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_p, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
  6155. __Pyx_GOTREF(__pyx_t_1);
  6156. __Pyx_DECREF_SET(__pyx_v_p, __pyx_t_1);
  6157. __pyx_t_1 = 0;
  6158. }
  6159. /* "fontTools/feaLib/lexer.py":169
  6160. * while p < self.text_length_ and self.text_[p] in valid:
  6161. * p += 1
  6162. * self.pos_ = p # <<<<<<<<<<<<<<
  6163. *
  6164. * def scan_until_(self, stop_at):
  6165. */
  6166. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_v_p) < (0)) __PYX_ERR(0, 169, __pyx_L1_error)
  6167. /* "fontTools/feaLib/lexer.py":165
  6168. * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
  6169. *
  6170. * def scan_over_(self, valid): # <<<<<<<<<<<<<<
  6171. * p = self.pos_
  6172. * while p < self.text_length_ and self.text_[p] in valid:
  6173. */
  6174. /* function exit code */
  6175. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6176. goto __pyx_L0;
  6177. __pyx_L1_error:;
  6178. __Pyx_XDECREF(__pyx_t_1);
  6179. __Pyx_XDECREF(__pyx_t_3);
  6180. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_over_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6181. __pyx_r = NULL;
  6182. __pyx_L0:;
  6183. __Pyx_XDECREF(__pyx_v_p);
  6184. __Pyx_XGIVEREF(__pyx_r);
  6185. __Pyx_RefNannyFinishContext();
  6186. return __pyx_r;
  6187. }
  6188. /* "fontTools/feaLib/lexer.py":171
  6189. * self.pos_ = p
  6190. *
  6191. * def scan_until_(self, stop_at): # <<<<<<<<<<<<<<
  6192. * p = self.pos_
  6193. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6194. */
  6195. /* Python wrapper */
  6196. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_(PyObject *__pyx_self,
  6197. #if CYTHON_METH_FASTCALL
  6198. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6199. #else
  6200. PyObject *__pyx_args, PyObject *__pyx_kwds
  6201. #endif
  6202. ); /*proto*/
  6203. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_, "Lexer.scan_until_(self, stop_at)");
  6204. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_ = {"scan_until_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_};
  6205. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_(PyObject *__pyx_self,
  6206. #if CYTHON_METH_FASTCALL
  6207. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6208. #else
  6209. PyObject *__pyx_args, PyObject *__pyx_kwds
  6210. #endif
  6211. ) {
  6212. PyObject *__pyx_v_self = 0;
  6213. PyObject *__pyx_v_stop_at = 0;
  6214. #if !CYTHON_METH_FASTCALL
  6215. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  6216. #endif
  6217. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  6218. PyObject* values[2] = {0,0};
  6219. int __pyx_lineno = 0;
  6220. const char *__pyx_filename = NULL;
  6221. int __pyx_clineno = 0;
  6222. PyObject *__pyx_r = 0;
  6223. __Pyx_RefNannyDeclarations
  6224. __Pyx_RefNannySetupContext("scan_until_ (wrapper)", 0);
  6225. #if !CYTHON_METH_FASTCALL
  6226. #if CYTHON_ASSUME_SAFE_SIZE
  6227. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  6228. #else
  6229. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  6230. #endif
  6231. #endif
  6232. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  6233. {
  6234. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_stop_at,0};
  6235. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  6236. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 171, __pyx_L3_error)
  6237. if (__pyx_kwds_len > 0) {
  6238. switch (__pyx_nargs) {
  6239. case 2:
  6240. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6241. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 171, __pyx_L3_error)
  6242. CYTHON_FALLTHROUGH;
  6243. case 1:
  6244. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6245. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 171, __pyx_L3_error)
  6246. CYTHON_FALLTHROUGH;
  6247. case 0: break;
  6248. default: goto __pyx_L5_argtuple_error;
  6249. }
  6250. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  6251. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scan_until_", 0) < (0)) __PYX_ERR(0, 171, __pyx_L3_error)
  6252. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  6253. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_until_", 1, 2, 2, i); __PYX_ERR(0, 171, __pyx_L3_error) }
  6254. }
  6255. } else if (unlikely(__pyx_nargs != 2)) {
  6256. goto __pyx_L5_argtuple_error;
  6257. } else {
  6258. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6259. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 171, __pyx_L3_error)
  6260. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6261. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 171, __pyx_L3_error)
  6262. }
  6263. __pyx_v_self = values[0];
  6264. __pyx_v_stop_at = values[1];
  6265. }
  6266. goto __pyx_L6_skip;
  6267. __pyx_L5_argtuple_error:;
  6268. __Pyx_RaiseArgtupleInvalid("scan_until_", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 171, __pyx_L3_error)
  6269. __pyx_L6_skip:;
  6270. goto __pyx_L4_argument_unpacking_done;
  6271. __pyx_L3_error:;
  6272. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6273. Py_XDECREF(values[__pyx_temp]);
  6274. }
  6275. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_until_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6276. __Pyx_RefNannyFinishContext();
  6277. return NULL;
  6278. __pyx_L4_argument_unpacking_done:;
  6279. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_(__pyx_self, __pyx_v_self, __pyx_v_stop_at);
  6280. /* function exit code */
  6281. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6282. Py_XDECREF(values[__pyx_temp]);
  6283. }
  6284. __Pyx_RefNannyFinishContext();
  6285. return __pyx_r;
  6286. }
  6287. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stop_at) {
  6288. PyObject *__pyx_v_p = NULL;
  6289. PyObject *__pyx_r = NULL;
  6290. __Pyx_RefNannyDeclarations
  6291. PyObject *__pyx_t_1 = NULL;
  6292. int __pyx_t_2;
  6293. PyObject *__pyx_t_3 = NULL;
  6294. int __pyx_t_4;
  6295. int __pyx_lineno = 0;
  6296. const char *__pyx_filename = NULL;
  6297. int __pyx_clineno = 0;
  6298. __Pyx_RefNannySetupContext("scan_until_", 0);
  6299. /* "fontTools/feaLib/lexer.py":172
  6300. *
  6301. * def scan_until_(self, stop_at):
  6302. * p = self.pos_ # <<<<<<<<<<<<<<
  6303. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6304. * p += 1
  6305. */
  6306. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
  6307. __Pyx_GOTREF(__pyx_t_1);
  6308. __pyx_v_p = __pyx_t_1;
  6309. __pyx_t_1 = 0;
  6310. /* "fontTools/feaLib/lexer.py":173
  6311. * def scan_until_(self, stop_at):
  6312. * p = self.pos_
  6313. * while p < self.text_length_ and self.text_[p] not in stop_at: # <<<<<<<<<<<<<<
  6314. * p += 1
  6315. * self.pos_ = p
  6316. */
  6317. while (1) {
  6318. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  6319. __Pyx_GOTREF(__pyx_t_1);
  6320. __pyx_t_3 = PyObject_RichCompare(__pyx_v_p, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
  6321. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6322. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 173, __pyx_L1_error)
  6323. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6324. if (__pyx_t_4) {
  6325. } else {
  6326. __pyx_t_2 = __pyx_t_4;
  6327. goto __pyx_L5_bool_binop_done;
  6328. }
  6329. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
  6330. __Pyx_GOTREF(__pyx_t_3);
  6331. __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  6332. __Pyx_GOTREF(__pyx_t_1);
  6333. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6334. __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_v_stop_at, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 173, __pyx_L1_error)
  6335. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6336. __pyx_t_2 = __pyx_t_4;
  6337. __pyx_L5_bool_binop_done:;
  6338. if (!__pyx_t_2) break;
  6339. /* "fontTools/feaLib/lexer.py":174
  6340. * p = self.pos_
  6341. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6342. * p += 1 # <<<<<<<<<<<<<<
  6343. * self.pos_ = p
  6344. *
  6345. */
  6346. __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_p, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
  6347. __Pyx_GOTREF(__pyx_t_1);
  6348. __Pyx_DECREF_SET(__pyx_v_p, __pyx_t_1);
  6349. __pyx_t_1 = 0;
  6350. }
  6351. /* "fontTools/feaLib/lexer.py":175
  6352. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6353. * p += 1
  6354. * self.pos_ = p # <<<<<<<<<<<<<<
  6355. *
  6356. * def scan_anonymous_block(self, tag):
  6357. */
  6358. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_v_p) < (0)) __PYX_ERR(0, 175, __pyx_L1_error)
  6359. /* "fontTools/feaLib/lexer.py":171
  6360. * self.pos_ = p
  6361. *
  6362. * def scan_until_(self, stop_at): # <<<<<<<<<<<<<<
  6363. * p = self.pos_
  6364. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6365. */
  6366. /* function exit code */
  6367. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6368. goto __pyx_L0;
  6369. __pyx_L1_error:;
  6370. __Pyx_XDECREF(__pyx_t_1);
  6371. __Pyx_XDECREF(__pyx_t_3);
  6372. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_until_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6373. __pyx_r = NULL;
  6374. __pyx_L0:;
  6375. __Pyx_XDECREF(__pyx_v_p);
  6376. __Pyx_XGIVEREF(__pyx_r);
  6377. __Pyx_RefNannyFinishContext();
  6378. return __pyx_r;
  6379. }
  6380. /* "fontTools/feaLib/lexer.py":177
  6381. * self.pos_ = p
  6382. *
  6383. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  6384. * location = self.location_()
  6385. * tag = tag.strip()
  6386. */
  6387. /* Python wrapper */
  6388. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block(PyObject *__pyx_self,
  6389. #if CYTHON_METH_FASTCALL
  6390. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6391. #else
  6392. PyObject *__pyx_args, PyObject *__pyx_kwds
  6393. #endif
  6394. ); /*proto*/
  6395. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block, "Lexer.scan_anonymous_block(self, tag)");
  6396. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block = {"scan_anonymous_block", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block};
  6397. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block(PyObject *__pyx_self,
  6398. #if CYTHON_METH_FASTCALL
  6399. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6400. #else
  6401. PyObject *__pyx_args, PyObject *__pyx_kwds
  6402. #endif
  6403. ) {
  6404. PyObject *__pyx_v_self = 0;
  6405. PyObject *__pyx_v_tag = 0;
  6406. #if !CYTHON_METH_FASTCALL
  6407. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  6408. #endif
  6409. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  6410. PyObject* values[2] = {0,0};
  6411. int __pyx_lineno = 0;
  6412. const char *__pyx_filename = NULL;
  6413. int __pyx_clineno = 0;
  6414. PyObject *__pyx_r = 0;
  6415. __Pyx_RefNannyDeclarations
  6416. __Pyx_RefNannySetupContext("scan_anonymous_block (wrapper)", 0);
  6417. #if !CYTHON_METH_FASTCALL
  6418. #if CYTHON_ASSUME_SAFE_SIZE
  6419. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  6420. #else
  6421. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  6422. #endif
  6423. #endif
  6424. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  6425. {
  6426. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_tag,0};
  6427. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  6428. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 177, __pyx_L3_error)
  6429. if (__pyx_kwds_len > 0) {
  6430. switch (__pyx_nargs) {
  6431. case 2:
  6432. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6433. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 177, __pyx_L3_error)
  6434. CYTHON_FALLTHROUGH;
  6435. case 1:
  6436. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6437. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 177, __pyx_L3_error)
  6438. CYTHON_FALLTHROUGH;
  6439. case 0: break;
  6440. default: goto __pyx_L5_argtuple_error;
  6441. }
  6442. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  6443. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scan_anonymous_block", 0) < (0)) __PYX_ERR(0, 177, __pyx_L3_error)
  6444. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  6445. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, i); __PYX_ERR(0, 177, __pyx_L3_error) }
  6446. }
  6447. } else if (unlikely(__pyx_nargs != 2)) {
  6448. goto __pyx_L5_argtuple_error;
  6449. } else {
  6450. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6451. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 177, __pyx_L3_error)
  6452. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6453. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 177, __pyx_L3_error)
  6454. }
  6455. __pyx_v_self = values[0];
  6456. __pyx_v_tag = values[1];
  6457. }
  6458. goto __pyx_L6_skip;
  6459. __pyx_L5_argtuple_error:;
  6460. __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 177, __pyx_L3_error)
  6461. __pyx_L6_skip:;
  6462. goto __pyx_L4_argument_unpacking_done;
  6463. __pyx_L3_error:;
  6464. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6465. Py_XDECREF(values[__pyx_temp]);
  6466. }
  6467. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6468. __Pyx_RefNannyFinishContext();
  6469. return NULL;
  6470. __pyx_L4_argument_unpacking_done:;
  6471. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block(__pyx_self, __pyx_v_self, __pyx_v_tag);
  6472. /* function exit code */
  6473. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6474. Py_XDECREF(values[__pyx_temp]);
  6475. }
  6476. __Pyx_RefNannyFinishContext();
  6477. return __pyx_r;
  6478. }
  6479. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  6480. PyObject *__pyx_v_location = NULL;
  6481. PyObject *__pyx_v_regexp = NULL;
  6482. PyObject *__pyx_v_split = NULL;
  6483. PyObject *__pyx_r = NULL;
  6484. __Pyx_RefNannyDeclarations
  6485. PyObject *__pyx_t_1 = NULL;
  6486. PyObject *__pyx_t_2 = NULL;
  6487. size_t __pyx_t_3;
  6488. PyObject *__pyx_t_4 = NULL;
  6489. PyObject *__pyx_t_5 = NULL;
  6490. PyObject *__pyx_t_6 = NULL;
  6491. PyObject *__pyx_t_7 = NULL;
  6492. Py_ssize_t __pyx_t_8;
  6493. int __pyx_t_9;
  6494. int __pyx_lineno = 0;
  6495. const char *__pyx_filename = NULL;
  6496. int __pyx_clineno = 0;
  6497. __Pyx_RefNannySetupContext("scan_anonymous_block", 0);
  6498. __Pyx_INCREF(__pyx_v_tag);
  6499. /* "fontTools/feaLib/lexer.py":178
  6500. *
  6501. * def scan_anonymous_block(self, tag):
  6502. * location = self.location_() # <<<<<<<<<<<<<<
  6503. * tag = tag.strip()
  6504. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  6505. */
  6506. __pyx_t_2 = __pyx_v_self;
  6507. __Pyx_INCREF(__pyx_t_2);
  6508. __pyx_t_3 = 0;
  6509. {
  6510. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  6511. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_location, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  6512. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6513. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
  6514. __Pyx_GOTREF(__pyx_t_1);
  6515. }
  6516. __pyx_v_location = __pyx_t_1;
  6517. __pyx_t_1 = 0;
  6518. /* "fontTools/feaLib/lexer.py":179
  6519. * def scan_anonymous_block(self, tag):
  6520. * location = self.location_()
  6521. * tag = tag.strip() # <<<<<<<<<<<<<<
  6522. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  6523. * self.scan_over_(Lexer.CHAR_NEWLINE_)
  6524. */
  6525. __pyx_t_2 = __pyx_v_tag;
  6526. __Pyx_INCREF(__pyx_t_2);
  6527. __pyx_t_3 = 0;
  6528. {
  6529. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  6530. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_strip, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  6531. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6532. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
  6533. __Pyx_GOTREF(__pyx_t_1);
  6534. }
  6535. __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_1);
  6536. __pyx_t_1 = 0;
  6537. /* "fontTools/feaLib/lexer.py":180
  6538. * location = self.location_()
  6539. * tag = tag.strip()
  6540. * self.scan_until_(Lexer.CHAR_NEWLINE_) # <<<<<<<<<<<<<<
  6541. * self.scan_over_(Lexer.CHAR_NEWLINE_)
  6542. * regexp = r"}\s*" + tag + r"\s*;"
  6543. */
  6544. __pyx_t_2 = __pyx_v_self;
  6545. __Pyx_INCREF(__pyx_t_2);
  6546. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
  6547. __Pyx_GOTREF(__pyx_t_4);
  6548. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_CHAR_NEWLINE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L1_error)
  6549. __Pyx_GOTREF(__pyx_t_5);
  6550. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  6551. __pyx_t_3 = 0;
  6552. {
  6553. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
  6554. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_until, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  6555. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6556. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  6557. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
  6558. __Pyx_GOTREF(__pyx_t_1);
  6559. }
  6560. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6561. /* "fontTools/feaLib/lexer.py":181
  6562. * tag = tag.strip()
  6563. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  6564. * self.scan_over_(Lexer.CHAR_NEWLINE_) # <<<<<<<<<<<<<<
  6565. * regexp = r"}\s*" + tag + r"\s*;"
  6566. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
  6567. */
  6568. __pyx_t_5 = __pyx_v_self;
  6569. __Pyx_INCREF(__pyx_t_5);
  6570. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
  6571. __Pyx_GOTREF(__pyx_t_2);
  6572. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_CHAR_NEWLINE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)
  6573. __Pyx_GOTREF(__pyx_t_4);
  6574. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6575. __pyx_t_3 = 0;
  6576. {
  6577. PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
  6578. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_over, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  6579. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  6580. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  6581. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  6582. __Pyx_GOTREF(__pyx_t_1);
  6583. }
  6584. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6585. /* "fontTools/feaLib/lexer.py":182
  6586. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  6587. * self.scan_over_(Lexer.CHAR_NEWLINE_)
  6588. * regexp = r"}\s*" + tag + r"\s*;" # <<<<<<<<<<<<<<
  6589. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
  6590. * if len(split) != 2:
  6591. */
  6592. __pyx_t_1 = PyNumber_Add(__pyx_mstate_global->__pyx_kp_u_s, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
  6593. __Pyx_GOTREF(__pyx_t_1);
  6594. __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_s_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __pyx_L1_error)
  6595. __Pyx_GOTREF(__pyx_t_4);
  6596. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6597. __pyx_v_regexp = __pyx_t_4;
  6598. __pyx_t_4 = 0;
  6599. /* "fontTools/feaLib/lexer.py":183
  6600. * self.scan_over_(Lexer.CHAR_NEWLINE_)
  6601. * regexp = r"}\s*" + tag + r"\s*;"
  6602. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1) # <<<<<<<<<<<<<<
  6603. * if len(split) != 2:
  6604. * raise FeatureLibError(
  6605. */
  6606. __pyx_t_1 = NULL;
  6607. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
  6608. __Pyx_GOTREF(__pyx_t_5);
  6609. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
  6610. __Pyx_GOTREF(__pyx_t_2);
  6611. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  6612. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_text_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
  6613. __Pyx_GOTREF(__pyx_t_5);
  6614. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error)
  6615. __Pyx_GOTREF(__pyx_t_6);
  6616. __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L1_error)
  6617. __Pyx_GOTREF(__pyx_t_7);
  6618. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  6619. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6620. __pyx_t_3 = 1;
  6621. #if CYTHON_UNPACK_METHODS
  6622. if (unlikely(PyMethod_Check(__pyx_t_2))) {
  6623. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
  6624. assert(__pyx_t_1);
  6625. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
  6626. __Pyx_INCREF(__pyx_t_1);
  6627. __Pyx_INCREF(__pyx__function);
  6628. __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
  6629. __pyx_t_3 = 0;
  6630. }
  6631. #endif
  6632. {
  6633. PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_regexp, __pyx_t_7};
  6634. __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error)
  6635. __Pyx_GOTREF(__pyx_t_6);
  6636. if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_maxsplit, __pyx_mstate_global->__pyx_int_1, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 183, __pyx_L1_error)
  6637. __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6);
  6638. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  6639. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  6640. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6641. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6642. if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error)
  6643. __Pyx_GOTREF(__pyx_t_4);
  6644. }
  6645. __pyx_v_split = __pyx_t_4;
  6646. __pyx_t_4 = 0;
  6647. /* "fontTools/feaLib/lexer.py":184
  6648. * regexp = r"}\s*" + tag + r"\s*;"
  6649. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
  6650. * if len(split) != 2: # <<<<<<<<<<<<<<
  6651. * raise FeatureLibError(
  6652. * "Expected '} %s;' to terminate anonymous block" % tag, location
  6653. */
  6654. __pyx_t_8 = PyObject_Length(__pyx_v_split); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 184, __pyx_L1_error)
  6655. __pyx_t_9 = (__pyx_t_8 != 2);
  6656. if (unlikely(__pyx_t_9)) {
  6657. /* "fontTools/feaLib/lexer.py":185
  6658. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
  6659. * if len(split) != 2:
  6660. * raise FeatureLibError( # <<<<<<<<<<<<<<
  6661. * "Expected '} %s;' to terminate anonymous block" % tag, location
  6662. * )
  6663. */
  6664. __pyx_t_2 = NULL;
  6665. __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error)
  6666. __Pyx_GOTREF(__pyx_t_6);
  6667. /* "fontTools/feaLib/lexer.py":186
  6668. * if len(split) != 2:
  6669. * raise FeatureLibError(
  6670. * "Expected '} %s;' to terminate anonymous block" % tag, location # <<<<<<<<<<<<<<
  6671. * )
  6672. * self.pos_ += len(split[0])
  6673. */
  6674. __pyx_t_7 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Expected_s_to_terminate_anonymou, __pyx_v_tag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 186, __pyx_L1_error)
  6675. __Pyx_GOTREF(__pyx_t_7);
  6676. __pyx_t_3 = 1;
  6677. #if CYTHON_UNPACK_METHODS
  6678. if (unlikely(PyMethod_Check(__pyx_t_6))) {
  6679. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
  6680. assert(__pyx_t_2);
  6681. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
  6682. __Pyx_INCREF(__pyx_t_2);
  6683. __Pyx_INCREF(__pyx__function);
  6684. __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
  6685. __pyx_t_3 = 0;
  6686. }
  6687. #endif
  6688. {
  6689. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_7, __pyx_v_location};
  6690. __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  6691. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6692. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  6693. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6694. if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
  6695. __Pyx_GOTREF(__pyx_t_4);
  6696. }
  6697. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  6698. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  6699. __PYX_ERR(0, 185, __pyx_L1_error)
  6700. /* "fontTools/feaLib/lexer.py":184
  6701. * regexp = r"}\s*" + tag + r"\s*;"
  6702. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
  6703. * if len(split) != 2: # <<<<<<<<<<<<<<
  6704. * raise FeatureLibError(
  6705. * "Expected '} %s;' to terminate anonymous block" % tag, location
  6706. */
  6707. }
  6708. /* "fontTools/feaLib/lexer.py":188
  6709. * "Expected '} %s;' to terminate anonymous block" % tag, location
  6710. * )
  6711. * self.pos_ += len(split[0]) # <<<<<<<<<<<<<<
  6712. * return (Lexer.ANONYMOUS_BLOCK, split[0], location)
  6713. *
  6714. */
  6715. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error)
  6716. __Pyx_GOTREF(__pyx_t_4);
  6717. __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_split, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error)
  6718. __Pyx_GOTREF(__pyx_t_6);
  6719. __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 188, __pyx_L1_error)
  6720. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6721. __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error)
  6722. __Pyx_GOTREF(__pyx_t_6);
  6723. __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 188, __pyx_L1_error)
  6724. __Pyx_GOTREF(__pyx_t_7);
  6725. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  6726. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6727. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pos, __pyx_t_7) < (0)) __PYX_ERR(0, 188, __pyx_L1_error)
  6728. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  6729. /* "fontTools/feaLib/lexer.py":189
  6730. * )
  6731. * self.pos_ += len(split[0])
  6732. * return (Lexer.ANONYMOUS_BLOCK, split[0], location) # <<<<<<<<<<<<<<
  6733. *
  6734. *
  6735. */
  6736. __Pyx_XDECREF(__pyx_r);
  6737. __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error)
  6738. __Pyx_GOTREF(__pyx_t_7);
  6739. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ANONYMOUS_BLOCK); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 189, __pyx_L1_error)
  6740. __Pyx_GOTREF(__pyx_t_6);
  6741. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  6742. __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_split, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error)
  6743. __Pyx_GOTREF(__pyx_t_7);
  6744. __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
  6745. __Pyx_GOTREF(__pyx_t_4);
  6746. __Pyx_GIVEREF(__pyx_t_6);
  6747. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 189, __pyx_L1_error);
  6748. __Pyx_GIVEREF(__pyx_t_7);
  6749. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 189, __pyx_L1_error);
  6750. __Pyx_INCREF(__pyx_v_location);
  6751. __Pyx_GIVEREF(__pyx_v_location);
  6752. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 189, __pyx_L1_error);
  6753. __pyx_t_6 = 0;
  6754. __pyx_t_7 = 0;
  6755. __pyx_r = __pyx_t_4;
  6756. __pyx_t_4 = 0;
  6757. goto __pyx_L0;
  6758. /* "fontTools/feaLib/lexer.py":177
  6759. * self.pos_ = p
  6760. *
  6761. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  6762. * location = self.location_()
  6763. * tag = tag.strip()
  6764. */
  6765. /* function exit code */
  6766. __pyx_L1_error:;
  6767. __Pyx_XDECREF(__pyx_t_1);
  6768. __Pyx_XDECREF(__pyx_t_2);
  6769. __Pyx_XDECREF(__pyx_t_4);
  6770. __Pyx_XDECREF(__pyx_t_5);
  6771. __Pyx_XDECREF(__pyx_t_6);
  6772. __Pyx_XDECREF(__pyx_t_7);
  6773. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6774. __pyx_r = NULL;
  6775. __pyx_L0:;
  6776. __Pyx_XDECREF(__pyx_v_location);
  6777. __Pyx_XDECREF(__pyx_v_regexp);
  6778. __Pyx_XDECREF(__pyx_v_split);
  6779. __Pyx_XDECREF(__pyx_v_tag);
  6780. __Pyx_XGIVEREF(__pyx_r);
  6781. __Pyx_RefNannyFinishContext();
  6782. return __pyx_r;
  6783. }
  6784. /* "fontTools/feaLib/lexer.py":207
  6785. * """
  6786. *
  6787. * def __init__(self, featurefile, *, includeDir=None): # <<<<<<<<<<<<<<
  6788. * """Initializes an IncludingLexer.
  6789. *
  6790. */
  6791. /* Python wrapper */
  6792. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__(PyObject *__pyx_self,
  6793. #if CYTHON_METH_FASTCALL
  6794. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6795. #else
  6796. PyObject *__pyx_args, PyObject *__pyx_kwds
  6797. #endif
  6798. ); /*proto*/
  6799. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer___init__, "IncludingLexer.__init__(self, featurefile, *, includeDir=None)\n\nInitializes an IncludingLexer.\n\nBehavior:\n If includeDir is passed, it will be used to determine the top-level\n include directory to use for all encountered include statements. If it is\n not passed, ``os.path.dirname(featurefile)`` will be considered the\n include directory.");
  6800. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer___init__};
  6801. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__(PyObject *__pyx_self,
  6802. #if CYTHON_METH_FASTCALL
  6803. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6804. #else
  6805. PyObject *__pyx_args, PyObject *__pyx_kwds
  6806. #endif
  6807. ) {
  6808. PyObject *__pyx_v_self = 0;
  6809. PyObject *__pyx_v_featurefile = 0;
  6810. PyObject *__pyx_v_includeDir = 0;
  6811. #if !CYTHON_METH_FASTCALL
  6812. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  6813. #endif
  6814. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  6815. PyObject* values[3] = {0,0,0};
  6816. int __pyx_lineno = 0;
  6817. const char *__pyx_filename = NULL;
  6818. int __pyx_clineno = 0;
  6819. PyObject *__pyx_r = 0;
  6820. __Pyx_RefNannyDeclarations
  6821. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  6822. #if !CYTHON_METH_FASTCALL
  6823. #if CYTHON_ASSUME_SAFE_SIZE
  6824. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  6825. #else
  6826. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  6827. #endif
  6828. #endif
  6829. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  6830. {
  6831. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_featurefile,&__pyx_mstate_global->__pyx_n_u_includeDir,0};
  6832. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  6833. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 207, __pyx_L3_error)
  6834. if (__pyx_kwds_len > 0) {
  6835. switch (__pyx_nargs) {
  6836. case 2:
  6837. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6838. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 207, __pyx_L3_error)
  6839. CYTHON_FALLTHROUGH;
  6840. case 1:
  6841. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6842. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 207, __pyx_L3_error)
  6843. CYTHON_FALLTHROUGH;
  6844. case 0: break;
  6845. default: goto __pyx_L5_argtuple_error;
  6846. }
  6847. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  6848. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 207, __pyx_L3_error)
  6849. if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
  6850. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  6851. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 207, __pyx_L3_error) }
  6852. }
  6853. } else if (unlikely(__pyx_nargs != 2)) {
  6854. goto __pyx_L5_argtuple_error;
  6855. } else {
  6856. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6857. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 207, __pyx_L3_error)
  6858. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6859. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 207, __pyx_L3_error)
  6860. if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
  6861. }
  6862. __pyx_v_self = values[0];
  6863. __pyx_v_featurefile = values[1];
  6864. __pyx_v_includeDir = values[2];
  6865. }
  6866. goto __pyx_L6_skip;
  6867. __pyx_L5_argtuple_error:;
  6868. __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 207, __pyx_L3_error)
  6869. __pyx_L6_skip:;
  6870. goto __pyx_L4_argument_unpacking_done;
  6871. __pyx_L3_error:;
  6872. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6873. Py_XDECREF(values[__pyx_temp]);
  6874. }
  6875. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6876. __Pyx_RefNannyFinishContext();
  6877. return NULL;
  6878. __pyx_L4_argument_unpacking_done:;
  6879. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer___init__(__pyx_self, __pyx_v_self, __pyx_v_featurefile, __pyx_v_includeDir);
  6880. /* function exit code */
  6881. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6882. Py_XDECREF(values[__pyx_temp]);
  6883. }
  6884. __Pyx_RefNannyFinishContext();
  6885. return __pyx_r;
  6886. }
  6887. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_featurefile, PyObject *__pyx_v_includeDir) {
  6888. PyObject *__pyx_r = NULL;
  6889. __Pyx_RefNannyDeclarations
  6890. PyObject *__pyx_t_1 = NULL;
  6891. PyObject *__pyx_t_2 = NULL;
  6892. size_t __pyx_t_3;
  6893. int __pyx_lineno = 0;
  6894. const char *__pyx_filename = NULL;
  6895. int __pyx_clineno = 0;
  6896. __Pyx_RefNannySetupContext("__init__", 0);
  6897. /* "fontTools/feaLib/lexer.py":217
  6898. * """
  6899. *
  6900. * self.lexers_ = [self.make_lexer_(featurefile)] # <<<<<<<<<<<<<<
  6901. * self.featurefilepath = self.lexers_[0].filename_
  6902. * self.includeDir = includeDir
  6903. */
  6904. __pyx_t_2 = __pyx_v_self;
  6905. __Pyx_INCREF(__pyx_t_2);
  6906. __pyx_t_3 = 0;
  6907. {
  6908. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_featurefile};
  6909. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_lexer, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  6910. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6911. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
  6912. __Pyx_GOTREF(__pyx_t_1);
  6913. }
  6914. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error)
  6915. __Pyx_GOTREF(__pyx_t_2);
  6916. __Pyx_GIVEREF(__pyx_t_1);
  6917. if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
  6918. __pyx_t_1 = 0;
  6919. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers, __pyx_t_2) < (0)) __PYX_ERR(0, 217, __pyx_L1_error)
  6920. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6921. /* "fontTools/feaLib/lexer.py":218
  6922. *
  6923. * self.lexers_ = [self.make_lexer_(featurefile)]
  6924. * self.featurefilepath = self.lexers_[0].filename_ # <<<<<<<<<<<<<<
  6925. * self.includeDir = includeDir
  6926. *
  6927. */
  6928. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
  6929. __Pyx_GOTREF(__pyx_t_2);
  6930. __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
  6931. __Pyx_GOTREF(__pyx_t_1);
  6932. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6933. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_filename_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
  6934. __Pyx_GOTREF(__pyx_t_2);
  6935. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6936. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_featurefilepath, __pyx_t_2) < (0)) __PYX_ERR(0, 218, __pyx_L1_error)
  6937. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6938. /* "fontTools/feaLib/lexer.py":219
  6939. * self.lexers_ = [self.make_lexer_(featurefile)]
  6940. * self.featurefilepath = self.lexers_[0].filename_
  6941. * self.includeDir = includeDir # <<<<<<<<<<<<<<
  6942. *
  6943. * def __iter__(self):
  6944. */
  6945. if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_includeDir, __pyx_v_includeDir) < (0)) __PYX_ERR(0, 219, __pyx_L1_error)
  6946. /* "fontTools/feaLib/lexer.py":207
  6947. * """
  6948. *
  6949. * def __init__(self, featurefile, *, includeDir=None): # <<<<<<<<<<<<<<
  6950. * """Initializes an IncludingLexer.
  6951. *
  6952. */
  6953. /* function exit code */
  6954. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6955. goto __pyx_L0;
  6956. __pyx_L1_error:;
  6957. __Pyx_XDECREF(__pyx_t_1);
  6958. __Pyx_XDECREF(__pyx_t_2);
  6959. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6960. __pyx_r = NULL;
  6961. __pyx_L0:;
  6962. __Pyx_XGIVEREF(__pyx_r);
  6963. __Pyx_RefNannyFinishContext();
  6964. return __pyx_r;
  6965. }
  6966. /* "fontTools/feaLib/lexer.py":221
  6967. * self.includeDir = includeDir
  6968. *
  6969. * def __iter__(self): # <<<<<<<<<<<<<<
  6970. * return self
  6971. *
  6972. */
  6973. /* Python wrapper */
  6974. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__(PyObject *__pyx_self,
  6975. #if CYTHON_METH_FASTCALL
  6976. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6977. #else
  6978. PyObject *__pyx_args, PyObject *__pyx_kwds
  6979. #endif
  6980. ); /*proto*/
  6981. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__, "IncludingLexer.__iter__(self)");
  6982. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__ = {"__iter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__};
  6983. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__(PyObject *__pyx_self,
  6984. #if CYTHON_METH_FASTCALL
  6985. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6986. #else
  6987. PyObject *__pyx_args, PyObject *__pyx_kwds
  6988. #endif
  6989. ) {
  6990. PyObject *__pyx_v_self = 0;
  6991. #if !CYTHON_METH_FASTCALL
  6992. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  6993. #endif
  6994. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  6995. PyObject* values[1] = {0};
  6996. int __pyx_lineno = 0;
  6997. const char *__pyx_filename = NULL;
  6998. int __pyx_clineno = 0;
  6999. PyObject *__pyx_r = 0;
  7000. __Pyx_RefNannyDeclarations
  7001. __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  7002. #if !CYTHON_METH_FASTCALL
  7003. #if CYTHON_ASSUME_SAFE_SIZE
  7004. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  7005. #else
  7006. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  7007. #endif
  7008. #endif
  7009. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  7010. {
  7011. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  7012. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  7013. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 221, __pyx_L3_error)
  7014. if (__pyx_kwds_len > 0) {
  7015. switch (__pyx_nargs) {
  7016. case 1:
  7017. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7018. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 221, __pyx_L3_error)
  7019. CYTHON_FALLTHROUGH;
  7020. case 0: break;
  7021. default: goto __pyx_L5_argtuple_error;
  7022. }
  7023. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  7024. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__iter__", 0) < (0)) __PYX_ERR(0, 221, __pyx_L3_error)
  7025. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  7026. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, i); __PYX_ERR(0, 221, __pyx_L3_error) }
  7027. }
  7028. } else if (unlikely(__pyx_nargs != 1)) {
  7029. goto __pyx_L5_argtuple_error;
  7030. } else {
  7031. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7032. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 221, __pyx_L3_error)
  7033. }
  7034. __pyx_v_self = values[0];
  7035. }
  7036. goto __pyx_L6_skip;
  7037. __pyx_L5_argtuple_error:;
  7038. __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 221, __pyx_L3_error)
  7039. __pyx_L6_skip:;
  7040. goto __pyx_L4_argument_unpacking_done;
  7041. __pyx_L3_error:;
  7042. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  7043. Py_XDECREF(values[__pyx_temp]);
  7044. }
  7045. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7046. __Pyx_RefNannyFinishContext();
  7047. return NULL;
  7048. __pyx_L4_argument_unpacking_done:;
  7049. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__(__pyx_self, __pyx_v_self);
  7050. /* function exit code */
  7051. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  7052. Py_XDECREF(values[__pyx_temp]);
  7053. }
  7054. __Pyx_RefNannyFinishContext();
  7055. return __pyx_r;
  7056. }
  7057. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  7058. PyObject *__pyx_r = NULL;
  7059. __Pyx_RefNannyDeclarations
  7060. __Pyx_RefNannySetupContext("__iter__", 0);
  7061. /* "fontTools/feaLib/lexer.py":222
  7062. *
  7063. * def __iter__(self):
  7064. * return self # <<<<<<<<<<<<<<
  7065. *
  7066. * def next(self): # Python 2
  7067. */
  7068. __Pyx_XDECREF(__pyx_r);
  7069. __Pyx_INCREF(__pyx_v_self);
  7070. __pyx_r = __pyx_v_self;
  7071. goto __pyx_L0;
  7072. /* "fontTools/feaLib/lexer.py":221
  7073. * self.includeDir = includeDir
  7074. *
  7075. * def __iter__(self): # <<<<<<<<<<<<<<
  7076. * return self
  7077. *
  7078. */
  7079. /* function exit code */
  7080. __pyx_L0:;
  7081. __Pyx_XGIVEREF(__pyx_r);
  7082. __Pyx_RefNannyFinishContext();
  7083. return __pyx_r;
  7084. }
  7085. /* "fontTools/feaLib/lexer.py":224
  7086. * return self
  7087. *
  7088. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  7089. * return self.__next__()
  7090. *
  7091. */
  7092. /* Python wrapper */
  7093. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_5next(PyObject *__pyx_self,
  7094. #if CYTHON_METH_FASTCALL
  7095. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  7096. #else
  7097. PyObject *__pyx_args, PyObject *__pyx_kwds
  7098. #endif
  7099. ); /*proto*/
  7100. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_4next, "IncludingLexer.next(self)");
  7101. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_5next = {"next", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_5next, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_4next};
  7102. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_5next(PyObject *__pyx_self,
  7103. #if CYTHON_METH_FASTCALL
  7104. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  7105. #else
  7106. PyObject *__pyx_args, PyObject *__pyx_kwds
  7107. #endif
  7108. ) {
  7109. PyObject *__pyx_v_self = 0;
  7110. #if !CYTHON_METH_FASTCALL
  7111. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  7112. #endif
  7113. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  7114. PyObject* values[1] = {0};
  7115. int __pyx_lineno = 0;
  7116. const char *__pyx_filename = NULL;
  7117. int __pyx_clineno = 0;
  7118. PyObject *__pyx_r = 0;
  7119. __Pyx_RefNannyDeclarations
  7120. __Pyx_RefNannySetupContext("next (wrapper)", 0);
  7121. #if !CYTHON_METH_FASTCALL
  7122. #if CYTHON_ASSUME_SAFE_SIZE
  7123. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  7124. #else
  7125. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  7126. #endif
  7127. #endif
  7128. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  7129. {
  7130. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  7131. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  7132. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 224, __pyx_L3_error)
  7133. if (__pyx_kwds_len > 0) {
  7134. switch (__pyx_nargs) {
  7135. case 1:
  7136. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7137. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error)
  7138. CYTHON_FALLTHROUGH;
  7139. case 0: break;
  7140. default: goto __pyx_L5_argtuple_error;
  7141. }
  7142. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  7143. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "next", 0) < (0)) __PYX_ERR(0, 224, __pyx_L3_error)
  7144. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  7145. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, i); __PYX_ERR(0, 224, __pyx_L3_error) }
  7146. }
  7147. } else if (unlikely(__pyx_nargs != 1)) {
  7148. goto __pyx_L5_argtuple_error;
  7149. } else {
  7150. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7151. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error)
  7152. }
  7153. __pyx_v_self = values[0];
  7154. }
  7155. goto __pyx_L6_skip;
  7156. __pyx_L5_argtuple_error:;
  7157. __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 224, __pyx_L3_error)
  7158. __pyx_L6_skip:;
  7159. goto __pyx_L4_argument_unpacking_done;
  7160. __pyx_L3_error:;
  7161. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  7162. Py_XDECREF(values[__pyx_temp]);
  7163. }
  7164. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7165. __Pyx_RefNannyFinishContext();
  7166. return NULL;
  7167. __pyx_L4_argument_unpacking_done:;
  7168. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_4next(__pyx_self, __pyx_v_self);
  7169. /* function exit code */
  7170. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  7171. Py_XDECREF(values[__pyx_temp]);
  7172. }
  7173. __Pyx_RefNannyFinishContext();
  7174. return __pyx_r;
  7175. }
  7176. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  7177. PyObject *__pyx_r = NULL;
  7178. __Pyx_RefNannyDeclarations
  7179. PyObject *__pyx_t_1 = NULL;
  7180. PyObject *__pyx_t_2 = NULL;
  7181. size_t __pyx_t_3;
  7182. int __pyx_lineno = 0;
  7183. const char *__pyx_filename = NULL;
  7184. int __pyx_clineno = 0;
  7185. __Pyx_RefNannySetupContext("next", 0);
  7186. /* "fontTools/feaLib/lexer.py":225
  7187. *
  7188. * def next(self): # Python 2
  7189. * return self.__next__() # <<<<<<<<<<<<<<
  7190. *
  7191. * def __next__(self): # Python 3
  7192. */
  7193. __Pyx_XDECREF(__pyx_r);
  7194. __pyx_t_2 = __pyx_v_self;
  7195. __Pyx_INCREF(__pyx_t_2);
  7196. __pyx_t_3 = 0;
  7197. {
  7198. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  7199. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_next, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  7200. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  7201. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
  7202. __Pyx_GOTREF(__pyx_t_1);
  7203. }
  7204. __pyx_r = __pyx_t_1;
  7205. __pyx_t_1 = 0;
  7206. goto __pyx_L0;
  7207. /* "fontTools/feaLib/lexer.py":224
  7208. * return self
  7209. *
  7210. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  7211. * return self.__next__()
  7212. *
  7213. */
  7214. /* function exit code */
  7215. __pyx_L1_error:;
  7216. __Pyx_XDECREF(__pyx_t_1);
  7217. __Pyx_XDECREF(__pyx_t_2);
  7218. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7219. __pyx_r = NULL;
  7220. __pyx_L0:;
  7221. __Pyx_XGIVEREF(__pyx_r);
  7222. __Pyx_RefNannyFinishContext();
  7223. return __pyx_r;
  7224. }
  7225. /* "fontTools/feaLib/lexer.py":227
  7226. * return self.__next__()
  7227. *
  7228. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  7229. * while self.lexers_:
  7230. * lexer = self.lexers_[-1]
  7231. */
  7232. /* Python wrapper */
  7233. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__(PyObject *__pyx_self,
  7234. #if CYTHON_METH_FASTCALL
  7235. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  7236. #else
  7237. PyObject *__pyx_args, PyObject *__pyx_kwds
  7238. #endif
  7239. ); /*proto*/
  7240. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__, "IncludingLexer.__next__(self)");
  7241. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__ = {"__next__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__};
  7242. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__(PyObject *__pyx_self,
  7243. #if CYTHON_METH_FASTCALL
  7244. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  7245. #else
  7246. PyObject *__pyx_args, PyObject *__pyx_kwds
  7247. #endif
  7248. ) {
  7249. PyObject *__pyx_v_self = 0;
  7250. #if !CYTHON_METH_FASTCALL
  7251. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  7252. #endif
  7253. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  7254. PyObject* values[1] = {0};
  7255. int __pyx_lineno = 0;
  7256. const char *__pyx_filename = NULL;
  7257. int __pyx_clineno = 0;
  7258. PyObject *__pyx_r = 0;
  7259. __Pyx_RefNannyDeclarations
  7260. __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  7261. #if !CYTHON_METH_FASTCALL
  7262. #if CYTHON_ASSUME_SAFE_SIZE
  7263. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  7264. #else
  7265. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  7266. #endif
  7267. #endif
  7268. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  7269. {
  7270. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  7271. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  7272. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 227, __pyx_L3_error)
  7273. if (__pyx_kwds_len > 0) {
  7274. switch (__pyx_nargs) {
  7275. case 1:
  7276. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7277. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 227, __pyx_L3_error)
  7278. CYTHON_FALLTHROUGH;
  7279. case 0: break;
  7280. default: goto __pyx_L5_argtuple_error;
  7281. }
  7282. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  7283. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__next__", 0) < (0)) __PYX_ERR(0, 227, __pyx_L3_error)
  7284. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  7285. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 227, __pyx_L3_error) }
  7286. }
  7287. } else if (unlikely(__pyx_nargs != 1)) {
  7288. goto __pyx_L5_argtuple_error;
  7289. } else {
  7290. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7291. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 227, __pyx_L3_error)
  7292. }
  7293. __pyx_v_self = values[0];
  7294. }
  7295. goto __pyx_L6_skip;
  7296. __pyx_L5_argtuple_error:;
  7297. __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 227, __pyx_L3_error)
  7298. __pyx_L6_skip:;
  7299. goto __pyx_L4_argument_unpacking_done;
  7300. __pyx_L3_error:;
  7301. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  7302. Py_XDECREF(values[__pyx_temp]);
  7303. }
  7304. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7305. __Pyx_RefNannyFinishContext();
  7306. return NULL;
  7307. __pyx_L4_argument_unpacking_done:;
  7308. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__(__pyx_self, __pyx_v_self);
  7309. /* function exit code */
  7310. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  7311. Py_XDECREF(values[__pyx_temp]);
  7312. }
  7313. __Pyx_RefNannyFinishContext();
  7314. return __pyx_r;
  7315. }
  7316. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  7317. PyObject *__pyx_v_lexer = NULL;
  7318. PyObject *__pyx_v_token_type = NULL;
  7319. PyObject *__pyx_v_token = NULL;
  7320. PyObject *__pyx_v_location = NULL;
  7321. PyObject *__pyx_v_fname_type = NULL;
  7322. PyObject *__pyx_v_fname_token = NULL;
  7323. PyObject *__pyx_v_fname_location = NULL;
  7324. PyObject *__pyx_v_path = NULL;
  7325. PyObject *__pyx_v_curpath = NULL;
  7326. PyObject *__pyx_v_err = NULL;
  7327. PyObject *__pyx_r = NULL;
  7328. __Pyx_RefNannyDeclarations
  7329. PyObject *__pyx_t_1 = NULL;
  7330. int __pyx_t_2;
  7331. PyObject *__pyx_t_3 = NULL;
  7332. PyObject *__pyx_t_4 = NULL;
  7333. PyObject *__pyx_t_5 = NULL;
  7334. PyObject *__pyx_t_6 = NULL;
  7335. PyObject *__pyx_t_7 = NULL;
  7336. PyObject *__pyx_t_8 = NULL;
  7337. PyObject *__pyx_t_9 = NULL;
  7338. PyObject *(*__pyx_t_10)(PyObject *);
  7339. int __pyx_t_11;
  7340. int __pyx_t_12;
  7341. size_t __pyx_t_13;
  7342. Py_ssize_t __pyx_t_14;
  7343. int __pyx_t_15;
  7344. PyObject *__pyx_t_16 = NULL;
  7345. int __pyx_t_17;
  7346. char const *__pyx_t_18;
  7347. PyObject *__pyx_t_19 = NULL;
  7348. PyObject *__pyx_t_20 = NULL;
  7349. PyObject *__pyx_t_21 = NULL;
  7350. PyObject *__pyx_t_22 = NULL;
  7351. PyObject *__pyx_t_23 = NULL;
  7352. PyObject *__pyx_t_24 = NULL;
  7353. int __pyx_lineno = 0;
  7354. const char *__pyx_filename = NULL;
  7355. int __pyx_clineno = 0;
  7356. __Pyx_RefNannySetupContext("__next__", 0);
  7357. /* "fontTools/feaLib/lexer.py":228
  7358. *
  7359. * def __next__(self): # Python 3
  7360. * while self.lexers_: # <<<<<<<<<<<<<<
  7361. * lexer = self.lexers_[-1]
  7362. * try:
  7363. */
  7364. while (1) {
  7365. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
  7366. __Pyx_GOTREF(__pyx_t_1);
  7367. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 228, __pyx_L1_error)
  7368. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7369. if (!__pyx_t_2) break;
  7370. /* "fontTools/feaLib/lexer.py":229
  7371. * def __next__(self): # Python 3
  7372. * while self.lexers_:
  7373. * lexer = self.lexers_[-1] # <<<<<<<<<<<<<<
  7374. * try:
  7375. * token_type, token, location = next(lexer)
  7376. */
  7377. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
  7378. __Pyx_GOTREF(__pyx_t_1);
  7379. __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
  7380. __Pyx_GOTREF(__pyx_t_3);
  7381. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7382. __Pyx_XDECREF_SET(__pyx_v_lexer, __pyx_t_3);
  7383. __pyx_t_3 = 0;
  7384. /* "fontTools/feaLib/lexer.py":230
  7385. * while self.lexers_:
  7386. * lexer = self.lexers_[-1]
  7387. * try: # <<<<<<<<<<<<<<
  7388. * token_type, token, location = next(lexer)
  7389. * except StopIteration:
  7390. */
  7391. {
  7392. __Pyx_PyThreadState_declare
  7393. __Pyx_PyThreadState_assign
  7394. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  7395. __Pyx_XGOTREF(__pyx_t_4);
  7396. __Pyx_XGOTREF(__pyx_t_5);
  7397. __Pyx_XGOTREF(__pyx_t_6);
  7398. /*try:*/ {
  7399. /* "fontTools/feaLib/lexer.py":231
  7400. * lexer = self.lexers_[-1]
  7401. * try:
  7402. * token_type, token, location = next(lexer) # <<<<<<<<<<<<<<
  7403. * except StopIteration:
  7404. * self.lexers_.pop()
  7405. */
  7406. __pyx_t_3 = __Pyx_PyIter_Next(__pyx_v_lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L5_error)
  7407. __Pyx_GOTREF(__pyx_t_3);
  7408. if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
  7409. PyObject* sequence = __pyx_t_3;
  7410. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  7411. if (unlikely(size != 3)) {
  7412. if (size > 3) __Pyx_RaiseTooManyValuesError(3);
  7413. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  7414. __PYX_ERR(0, 231, __pyx_L5_error)
  7415. }
  7416. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  7417. if (likely(PyTuple_CheckExact(sequence))) {
  7418. __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
  7419. __Pyx_INCREF(__pyx_t_1);
  7420. __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
  7421. __Pyx_INCREF(__pyx_t_7);
  7422. __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2);
  7423. __Pyx_INCREF(__pyx_t_8);
  7424. } else {
  7425. __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
  7426. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L5_error)
  7427. __Pyx_XGOTREF(__pyx_t_1);
  7428. __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
  7429. if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L5_error)
  7430. __Pyx_XGOTREF(__pyx_t_7);
  7431. __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
  7432. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L5_error)
  7433. __Pyx_XGOTREF(__pyx_t_8);
  7434. }
  7435. #else
  7436. __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L5_error)
  7437. __Pyx_GOTREF(__pyx_t_1);
  7438. __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L5_error)
  7439. __Pyx_GOTREF(__pyx_t_7);
  7440. __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L5_error)
  7441. __Pyx_GOTREF(__pyx_t_8);
  7442. #endif
  7443. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7444. } else {
  7445. Py_ssize_t index = -1;
  7446. __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L5_error)
  7447. __Pyx_GOTREF(__pyx_t_9);
  7448. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7449. __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
  7450. index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
  7451. __Pyx_GOTREF(__pyx_t_1);
  7452. index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L13_unpacking_failed;
  7453. __Pyx_GOTREF(__pyx_t_7);
  7454. index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L13_unpacking_failed;
  7455. __Pyx_GOTREF(__pyx_t_8);
  7456. if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < (0)) __PYX_ERR(0, 231, __pyx_L5_error)
  7457. __pyx_t_10 = NULL;
  7458. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7459. goto __pyx_L14_unpacking_done;
  7460. __pyx_L13_unpacking_failed:;
  7461. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7462. __pyx_t_10 = NULL;
  7463. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  7464. __PYX_ERR(0, 231, __pyx_L5_error)
  7465. __pyx_L14_unpacking_done:;
  7466. }
  7467. __Pyx_XDECREF_SET(__pyx_v_token_type, __pyx_t_1);
  7468. __pyx_t_1 = 0;
  7469. __Pyx_XDECREF_SET(__pyx_v_token, __pyx_t_7);
  7470. __pyx_t_7 = 0;
  7471. __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_8);
  7472. __pyx_t_8 = 0;
  7473. /* "fontTools/feaLib/lexer.py":230
  7474. * while self.lexers_:
  7475. * lexer = self.lexers_[-1]
  7476. * try: # <<<<<<<<<<<<<<
  7477. * token_type, token, location = next(lexer)
  7478. * except StopIteration:
  7479. */
  7480. }
  7481. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  7482. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  7483. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  7484. goto __pyx_L12_try_end;
  7485. __pyx_L5_error:;
  7486. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  7487. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7488. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7489. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  7490. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  7491. /* "fontTools/feaLib/lexer.py":232
  7492. * try:
  7493. * token_type, token, location = next(lexer)
  7494. * except StopIteration: # <<<<<<<<<<<<<<
  7495. * self.lexers_.pop()
  7496. * continue
  7497. */
  7498. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))));
  7499. if (__pyx_t_11) {
  7500. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7501. if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 232, __pyx_L7_except_error)
  7502. __Pyx_XGOTREF(__pyx_t_3);
  7503. __Pyx_XGOTREF(__pyx_t_8);
  7504. __Pyx_XGOTREF(__pyx_t_7);
  7505. /* "fontTools/feaLib/lexer.py":233
  7506. * token_type, token, location = next(lexer)
  7507. * except StopIteration:
  7508. * self.lexers_.pop() # <<<<<<<<<<<<<<
  7509. * continue
  7510. * if token_type is Lexer.NAME and token == "include":
  7511. */
  7512. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L7_except_error)
  7513. __Pyx_GOTREF(__pyx_t_1);
  7514. __pyx_t_9 = __Pyx_PyObject_Pop(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 233, __pyx_L7_except_error)
  7515. __Pyx_GOTREF(__pyx_t_9);
  7516. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7517. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7518. /* "fontTools/feaLib/lexer.py":234
  7519. * except StopIteration:
  7520. * self.lexers_.pop()
  7521. * continue # <<<<<<<<<<<<<<
  7522. * if token_type is Lexer.NAME and token == "include":
  7523. * fname_type, fname_token, fname_location = lexer.next()
  7524. */
  7525. goto __pyx_L15_except_continue;
  7526. __pyx_L15_except_continue:;
  7527. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7528. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7529. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7530. goto __pyx_L11_try_continue;
  7531. }
  7532. goto __pyx_L7_except_error;
  7533. /* "fontTools/feaLib/lexer.py":230
  7534. * while self.lexers_:
  7535. * lexer = self.lexers_[-1]
  7536. * try: # <<<<<<<<<<<<<<
  7537. * token_type, token, location = next(lexer)
  7538. * except StopIteration:
  7539. */
  7540. __pyx_L7_except_error:;
  7541. __Pyx_XGIVEREF(__pyx_t_4);
  7542. __Pyx_XGIVEREF(__pyx_t_5);
  7543. __Pyx_XGIVEREF(__pyx_t_6);
  7544. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  7545. goto __pyx_L1_error;
  7546. __pyx_L11_try_continue:;
  7547. __Pyx_XGIVEREF(__pyx_t_4);
  7548. __Pyx_XGIVEREF(__pyx_t_5);
  7549. __Pyx_XGIVEREF(__pyx_t_6);
  7550. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  7551. goto __pyx_L3_continue;
  7552. __pyx_L12_try_end:;
  7553. }
  7554. /* "fontTools/feaLib/lexer.py":235
  7555. * self.lexers_.pop()
  7556. * continue
  7557. * if token_type is Lexer.NAME and token == "include": # <<<<<<<<<<<<<<
  7558. * fname_type, fname_token, fname_location = lexer.next()
  7559. * if fname_type is not Lexer.FILENAME:
  7560. */
  7561. __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
  7562. __Pyx_GOTREF(__pyx_t_7);
  7563. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NAME); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 235, __pyx_L1_error)
  7564. __Pyx_GOTREF(__pyx_t_8);
  7565. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7566. __pyx_t_12 = (__pyx_v_token_type == __pyx_t_8);
  7567. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7568. if (__pyx_t_12) {
  7569. } else {
  7570. __pyx_t_2 = __pyx_t_12;
  7571. goto __pyx_L18_bool_binop_done;
  7572. }
  7573. __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_v_token, __pyx_mstate_global->__pyx_n_u_include, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 235, __pyx_L1_error)
  7574. __pyx_t_2 = __pyx_t_12;
  7575. __pyx_L18_bool_binop_done:;
  7576. if (__pyx_t_2) {
  7577. /* "fontTools/feaLib/lexer.py":236
  7578. * continue
  7579. * if token_type is Lexer.NAME and token == "include":
  7580. * fname_type, fname_token, fname_location = lexer.next() # <<<<<<<<<<<<<<
  7581. * if fname_type is not Lexer.FILENAME:
  7582. * raise FeatureLibError("Expected file name", fname_location)
  7583. */
  7584. __pyx_t_7 = __pyx_v_lexer;
  7585. __Pyx_INCREF(__pyx_t_7);
  7586. __pyx_t_13 = 0;
  7587. {
  7588. PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
  7589. __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_next_3, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  7590. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7591. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 236, __pyx_L1_error)
  7592. __Pyx_GOTREF(__pyx_t_8);
  7593. }
  7594. if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
  7595. PyObject* sequence = __pyx_t_8;
  7596. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  7597. if (unlikely(size != 3)) {
  7598. if (size > 3) __Pyx_RaiseTooManyValuesError(3);
  7599. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  7600. __PYX_ERR(0, 236, __pyx_L1_error)
  7601. }
  7602. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  7603. if (likely(PyTuple_CheckExact(sequence))) {
  7604. __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
  7605. __Pyx_INCREF(__pyx_t_7);
  7606. __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
  7607. __Pyx_INCREF(__pyx_t_3);
  7608. __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2);
  7609. __Pyx_INCREF(__pyx_t_9);
  7610. } else {
  7611. __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
  7612. if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
  7613. __Pyx_XGOTREF(__pyx_t_7);
  7614. __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
  7615. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
  7616. __Pyx_XGOTREF(__pyx_t_3);
  7617. __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
  7618. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error)
  7619. __Pyx_XGOTREF(__pyx_t_9);
  7620. }
  7621. #else
  7622. __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
  7623. __Pyx_GOTREF(__pyx_t_7);
  7624. __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
  7625. __Pyx_GOTREF(__pyx_t_3);
  7626. __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error)
  7627. __Pyx_GOTREF(__pyx_t_9);
  7628. #endif
  7629. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7630. } else {
  7631. Py_ssize_t index = -1;
  7632. __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
  7633. __Pyx_GOTREF(__pyx_t_1);
  7634. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7635. __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
  7636. index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L20_unpacking_failed;
  7637. __Pyx_GOTREF(__pyx_t_7);
  7638. index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L20_unpacking_failed;
  7639. __Pyx_GOTREF(__pyx_t_3);
  7640. index = 2; __pyx_t_9 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_9)) goto __pyx_L20_unpacking_failed;
  7641. __Pyx_GOTREF(__pyx_t_9);
  7642. if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_1), 3) < (0)) __PYX_ERR(0, 236, __pyx_L1_error)
  7643. __pyx_t_10 = NULL;
  7644. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7645. goto __pyx_L21_unpacking_done;
  7646. __pyx_L20_unpacking_failed:;
  7647. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7648. __pyx_t_10 = NULL;
  7649. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  7650. __PYX_ERR(0, 236, __pyx_L1_error)
  7651. __pyx_L21_unpacking_done:;
  7652. }
  7653. __Pyx_XDECREF_SET(__pyx_v_fname_type, __pyx_t_7);
  7654. __pyx_t_7 = 0;
  7655. __Pyx_XDECREF_SET(__pyx_v_fname_token, __pyx_t_3);
  7656. __pyx_t_3 = 0;
  7657. __Pyx_XDECREF_SET(__pyx_v_fname_location, __pyx_t_9);
  7658. __pyx_t_9 = 0;
  7659. /* "fontTools/feaLib/lexer.py":237
  7660. * if token_type is Lexer.NAME and token == "include":
  7661. * fname_type, fname_token, fname_location = lexer.next()
  7662. * if fname_type is not Lexer.FILENAME: # <<<<<<<<<<<<<<
  7663. * raise FeatureLibError("Expected file name", fname_location)
  7664. * # semi_type, semi_token, semi_location = lexer.next()
  7665. */
  7666. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L1_error)
  7667. __Pyx_GOTREF(__pyx_t_8);
  7668. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_FILENAME); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 237, __pyx_L1_error)
  7669. __Pyx_GOTREF(__pyx_t_9);
  7670. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7671. __pyx_t_2 = (__pyx_v_fname_type != __pyx_t_9);
  7672. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7673. if (unlikely(__pyx_t_2)) {
  7674. /* "fontTools/feaLib/lexer.py":238
  7675. * fname_type, fname_token, fname_location = lexer.next()
  7676. * if fname_type is not Lexer.FILENAME:
  7677. * raise FeatureLibError("Expected file name", fname_location) # <<<<<<<<<<<<<<
  7678. * # semi_type, semi_token, semi_location = lexer.next()
  7679. * # if semi_type is not Lexer.SYMBOL or semi_token != ";":
  7680. */
  7681. __pyx_t_8 = NULL;
  7682. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
  7683. __Pyx_GOTREF(__pyx_t_3);
  7684. __pyx_t_13 = 1;
  7685. #if CYTHON_UNPACK_METHODS
  7686. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  7687. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
  7688. assert(__pyx_t_8);
  7689. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  7690. __Pyx_INCREF(__pyx_t_8);
  7691. __Pyx_INCREF(__pyx__function);
  7692. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  7693. __pyx_t_13 = 0;
  7694. }
  7695. #endif
  7696. {
  7697. PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_Expected_file_name, __pyx_v_fname_location};
  7698. __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  7699. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  7700. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7701. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error)
  7702. __Pyx_GOTREF(__pyx_t_9);
  7703. }
  7704. __Pyx_Raise(__pyx_t_9, 0, 0, 0);
  7705. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7706. __PYX_ERR(0, 238, __pyx_L1_error)
  7707. /* "fontTools/feaLib/lexer.py":237
  7708. * if token_type is Lexer.NAME and token == "include":
  7709. * fname_type, fname_token, fname_location = lexer.next()
  7710. * if fname_type is not Lexer.FILENAME: # <<<<<<<<<<<<<<
  7711. * raise FeatureLibError("Expected file name", fname_location)
  7712. * # semi_type, semi_token, semi_location = lexer.next()
  7713. */
  7714. }
  7715. /* "fontTools/feaLib/lexer.py":242
  7716. * # if semi_type is not Lexer.SYMBOL or semi_token != ";":
  7717. * # raise FeatureLibError("Expected ';'", semi_location)
  7718. * if os.path.isabs(fname_token): # <<<<<<<<<<<<<<
  7719. * path = fname_token
  7720. * else:
  7721. */
  7722. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 242, __pyx_L1_error)
  7723. __Pyx_GOTREF(__pyx_t_8);
  7724. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error)
  7725. __Pyx_GOTREF(__pyx_t_7);
  7726. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7727. __pyx_t_3 = __pyx_t_7;
  7728. __Pyx_INCREF(__pyx_t_3);
  7729. __pyx_t_13 = 0;
  7730. {
  7731. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_fname_token};
  7732. __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_isabs, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  7733. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7734. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7735. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 242, __pyx_L1_error)
  7736. __Pyx_GOTREF(__pyx_t_9);
  7737. }
  7738. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 242, __pyx_L1_error)
  7739. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7740. if (__pyx_t_2) {
  7741. /* "fontTools/feaLib/lexer.py":243
  7742. * # raise FeatureLibError("Expected ';'", semi_location)
  7743. * if os.path.isabs(fname_token):
  7744. * path = fname_token # <<<<<<<<<<<<<<
  7745. * else:
  7746. * if self.includeDir is not None:
  7747. */
  7748. __Pyx_INCREF(__pyx_v_fname_token);
  7749. __Pyx_XDECREF_SET(__pyx_v_path, __pyx_v_fname_token);
  7750. /* "fontTools/feaLib/lexer.py":242
  7751. * # if semi_type is not Lexer.SYMBOL or semi_token != ";":
  7752. * # raise FeatureLibError("Expected ';'", semi_location)
  7753. * if os.path.isabs(fname_token): # <<<<<<<<<<<<<<
  7754. * path = fname_token
  7755. * else:
  7756. */
  7757. goto __pyx_L23;
  7758. }
  7759. /* "fontTools/feaLib/lexer.py":245
  7760. * path = fname_token
  7761. * else:
  7762. * if self.includeDir is not None: # <<<<<<<<<<<<<<
  7763. * curpath = self.includeDir
  7764. * elif self.featurefilepath is not None:
  7765. */
  7766. /*else*/ {
  7767. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_includeDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 245, __pyx_L1_error)
  7768. __Pyx_GOTREF(__pyx_t_9);
  7769. __pyx_t_2 = (__pyx_t_9 != Py_None);
  7770. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7771. if (__pyx_t_2) {
  7772. /* "fontTools/feaLib/lexer.py":246
  7773. * else:
  7774. * if self.includeDir is not None:
  7775. * curpath = self.includeDir # <<<<<<<<<<<<<<
  7776. * elif self.featurefilepath is not None:
  7777. * curpath = os.path.dirname(self.featurefilepath)
  7778. */
  7779. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_includeDir); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 246, __pyx_L1_error)
  7780. __Pyx_GOTREF(__pyx_t_9);
  7781. __Pyx_XDECREF_SET(__pyx_v_curpath, __pyx_t_9);
  7782. __pyx_t_9 = 0;
  7783. /* "fontTools/feaLib/lexer.py":245
  7784. * path = fname_token
  7785. * else:
  7786. * if self.includeDir is not None: # <<<<<<<<<<<<<<
  7787. * curpath = self.includeDir
  7788. * elif self.featurefilepath is not None:
  7789. */
  7790. goto __pyx_L24;
  7791. }
  7792. /* "fontTools/feaLib/lexer.py":247
  7793. * if self.includeDir is not None:
  7794. * curpath = self.includeDir
  7795. * elif self.featurefilepath is not None: # <<<<<<<<<<<<<<
  7796. * curpath = os.path.dirname(self.featurefilepath)
  7797. * else:
  7798. */
  7799. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_featurefilepath); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 247, __pyx_L1_error)
  7800. __Pyx_GOTREF(__pyx_t_9);
  7801. __pyx_t_2 = (__pyx_t_9 != Py_None);
  7802. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7803. if (__pyx_t_2) {
  7804. /* "fontTools/feaLib/lexer.py":248
  7805. * curpath = self.includeDir
  7806. * elif self.featurefilepath is not None:
  7807. * curpath = os.path.dirname(self.featurefilepath) # <<<<<<<<<<<<<<
  7808. * else:
  7809. * # if the IncludingLexer was initialized from an in-memory
  7810. */
  7811. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
  7812. __Pyx_GOTREF(__pyx_t_3);
  7813. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 248, __pyx_L1_error)
  7814. __Pyx_GOTREF(__pyx_t_8);
  7815. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7816. __pyx_t_7 = __pyx_t_8;
  7817. __Pyx_INCREF(__pyx_t_7);
  7818. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_featurefilepath); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
  7819. __Pyx_GOTREF(__pyx_t_3);
  7820. __pyx_t_13 = 0;
  7821. {
  7822. PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
  7823. __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_dirname, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  7824. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7825. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7826. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7827. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 248, __pyx_L1_error)
  7828. __Pyx_GOTREF(__pyx_t_9);
  7829. }
  7830. __Pyx_XDECREF_SET(__pyx_v_curpath, __pyx_t_9);
  7831. __pyx_t_9 = 0;
  7832. /* "fontTools/feaLib/lexer.py":247
  7833. * if self.includeDir is not None:
  7834. * curpath = self.includeDir
  7835. * elif self.featurefilepath is not None: # <<<<<<<<<<<<<<
  7836. * curpath = os.path.dirname(self.featurefilepath)
  7837. * else:
  7838. */
  7839. goto __pyx_L24;
  7840. }
  7841. /* "fontTools/feaLib/lexer.py":254
  7842. * # its filesystem path, therefore we fall back to using the
  7843. * # current working directory to resolve relative includes
  7844. * curpath = os.getcwd() # <<<<<<<<<<<<<<
  7845. * path = os.path.join(curpath, fname_token)
  7846. * if len(self.lexers_) >= 5:
  7847. */
  7848. /*else*/ {
  7849. __pyx_t_8 = NULL;
  7850. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error)
  7851. __Pyx_GOTREF(__pyx_t_3);
  7852. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_getcwd); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 254, __pyx_L1_error)
  7853. __Pyx_GOTREF(__pyx_t_7);
  7854. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7855. __pyx_t_13 = 1;
  7856. #if CYTHON_UNPACK_METHODS
  7857. if (unlikely(PyMethod_Check(__pyx_t_7))) {
  7858. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  7859. assert(__pyx_t_8);
  7860. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
  7861. __Pyx_INCREF(__pyx_t_8);
  7862. __Pyx_INCREF(__pyx__function);
  7863. __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
  7864. __pyx_t_13 = 0;
  7865. }
  7866. #endif
  7867. {
  7868. PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
  7869. __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  7870. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  7871. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7872. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 254, __pyx_L1_error)
  7873. __Pyx_GOTREF(__pyx_t_9);
  7874. }
  7875. __Pyx_XDECREF_SET(__pyx_v_curpath, __pyx_t_9);
  7876. __pyx_t_9 = 0;
  7877. }
  7878. __pyx_L24:;
  7879. /* "fontTools/feaLib/lexer.py":255
  7880. * # current working directory to resolve relative includes
  7881. * curpath = os.getcwd()
  7882. * path = os.path.join(curpath, fname_token) # <<<<<<<<<<<<<<
  7883. * if len(self.lexers_) >= 5:
  7884. * raise FeatureLibError("Too many recursive includes", fname_location)
  7885. */
  7886. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 255, __pyx_L1_error)
  7887. __Pyx_GOTREF(__pyx_t_8);
  7888. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error)
  7889. __Pyx_GOTREF(__pyx_t_3);
  7890. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7891. __pyx_t_7 = __pyx_t_3;
  7892. __Pyx_INCREF(__pyx_t_7);
  7893. __pyx_t_13 = 0;
  7894. {
  7895. PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_curpath, __pyx_v_fname_token};
  7896. __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_join, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  7897. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7898. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7899. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L1_error)
  7900. __Pyx_GOTREF(__pyx_t_9);
  7901. }
  7902. __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_9);
  7903. __pyx_t_9 = 0;
  7904. }
  7905. __pyx_L23:;
  7906. /* "fontTools/feaLib/lexer.py":256
  7907. * curpath = os.getcwd()
  7908. * path = os.path.join(curpath, fname_token)
  7909. * if len(self.lexers_) >= 5: # <<<<<<<<<<<<<<
  7910. * raise FeatureLibError("Too many recursive includes", fname_location)
  7911. * try:
  7912. */
  7913. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 256, __pyx_L1_error)
  7914. __Pyx_GOTREF(__pyx_t_9);
  7915. __pyx_t_14 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 256, __pyx_L1_error)
  7916. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7917. __pyx_t_2 = (__pyx_t_14 >= 5);
  7918. if (unlikely(__pyx_t_2)) {
  7919. /* "fontTools/feaLib/lexer.py":257
  7920. * path = os.path.join(curpath, fname_token)
  7921. * if len(self.lexers_) >= 5:
  7922. * raise FeatureLibError("Too many recursive includes", fname_location) # <<<<<<<<<<<<<<
  7923. * try:
  7924. * self.lexers_.append(self.make_lexer_(path))
  7925. */
  7926. __pyx_t_3 = NULL;
  7927. __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 257, __pyx_L1_error)
  7928. __Pyx_GOTREF(__pyx_t_7);
  7929. __pyx_t_13 = 1;
  7930. #if CYTHON_UNPACK_METHODS
  7931. if (unlikely(PyMethod_Check(__pyx_t_7))) {
  7932. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
  7933. assert(__pyx_t_3);
  7934. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
  7935. __Pyx_INCREF(__pyx_t_3);
  7936. __Pyx_INCREF(__pyx__function);
  7937. __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
  7938. __pyx_t_13 = 0;
  7939. }
  7940. #endif
  7941. {
  7942. PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Too_many_recursive_includes, __pyx_v_fname_location};
  7943. __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  7944. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7945. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7946. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 257, __pyx_L1_error)
  7947. __Pyx_GOTREF(__pyx_t_9);
  7948. }
  7949. __Pyx_Raise(__pyx_t_9, 0, 0, 0);
  7950. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7951. __PYX_ERR(0, 257, __pyx_L1_error)
  7952. /* "fontTools/feaLib/lexer.py":256
  7953. * curpath = os.getcwd()
  7954. * path = os.path.join(curpath, fname_token)
  7955. * if len(self.lexers_) >= 5: # <<<<<<<<<<<<<<
  7956. * raise FeatureLibError("Too many recursive includes", fname_location)
  7957. * try:
  7958. */
  7959. }
  7960. /* "fontTools/feaLib/lexer.py":258
  7961. * if len(self.lexers_) >= 5:
  7962. * raise FeatureLibError("Too many recursive includes", fname_location)
  7963. * try: # <<<<<<<<<<<<<<
  7964. * self.lexers_.append(self.make_lexer_(path))
  7965. * except FileNotFoundError as err:
  7966. */
  7967. {
  7968. __Pyx_PyThreadState_declare
  7969. __Pyx_PyThreadState_assign
  7970. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
  7971. __Pyx_XGOTREF(__pyx_t_6);
  7972. __Pyx_XGOTREF(__pyx_t_5);
  7973. __Pyx_XGOTREF(__pyx_t_4);
  7974. /*try:*/ {
  7975. /* "fontTools/feaLib/lexer.py":259
  7976. * raise FeatureLibError("Too many recursive includes", fname_location)
  7977. * try:
  7978. * self.lexers_.append(self.make_lexer_(path)) # <<<<<<<<<<<<<<
  7979. * except FileNotFoundError as err:
  7980. * raise IncludedFeaNotFound(fname_token, fname_location) from err
  7981. */
  7982. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L26_error)
  7983. __Pyx_GOTREF(__pyx_t_9);
  7984. __pyx_t_3 = __pyx_v_self;
  7985. __Pyx_INCREF(__pyx_t_3);
  7986. __pyx_t_13 = 0;
  7987. {
  7988. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_path};
  7989. __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_lexer, __pyx_callargs+__pyx_t_13, (2-__pyx_t_13) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  7990. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7991. if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L26_error)
  7992. __Pyx_GOTREF(__pyx_t_7);
  7993. }
  7994. __pyx_t_15 = __Pyx_PyObject_Append(__pyx_t_9, __pyx_t_7); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 259, __pyx_L26_error)
  7995. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7996. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7997. /* "fontTools/feaLib/lexer.py":258
  7998. * if len(self.lexers_) >= 5:
  7999. * raise FeatureLibError("Too many recursive includes", fname_location)
  8000. * try: # <<<<<<<<<<<<<<
  8001. * self.lexers_.append(self.make_lexer_(path))
  8002. * except FileNotFoundError as err:
  8003. */
  8004. }
  8005. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  8006. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8007. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  8008. goto __pyx_L33_try_end;
  8009. __pyx_L26_error:;
  8010. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  8011. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  8012. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  8013. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  8014. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  8015. /* "fontTools/feaLib/lexer.py":260
  8016. * try:
  8017. * self.lexers_.append(self.make_lexer_(path))
  8018. * except FileNotFoundError as err: # <<<<<<<<<<<<<<
  8019. * raise IncludedFeaNotFound(fname_token, fname_location) from err
  8020. * else:
  8021. */
  8022. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_FileNotFoundError))));
  8023. if (__pyx_t_11) {
  8024. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8025. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 260, __pyx_L28_except_error)
  8026. __Pyx_XGOTREF(__pyx_t_7);
  8027. __Pyx_XGOTREF(__pyx_t_9);
  8028. __Pyx_XGOTREF(__pyx_t_3);
  8029. __Pyx_INCREF(__pyx_t_9);
  8030. __pyx_v_err = __pyx_t_9;
  8031. /*try:*/ {
  8032. /* "fontTools/feaLib/lexer.py":261
  8033. * self.lexers_.append(self.make_lexer_(path))
  8034. * except FileNotFoundError as err:
  8035. * raise IncludedFeaNotFound(fname_token, fname_location) from err # <<<<<<<<<<<<<<
  8036. * else:
  8037. * return (token_type, token, location)
  8038. */
  8039. __pyx_t_1 = NULL;
  8040. __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_IncludedFeaNotFound); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 261, __pyx_L39_error)
  8041. __Pyx_GOTREF(__pyx_t_16);
  8042. __pyx_t_13 = 1;
  8043. #if CYTHON_UNPACK_METHODS
  8044. if (unlikely(PyMethod_Check(__pyx_t_16))) {
  8045. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_16);
  8046. assert(__pyx_t_1);
  8047. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
  8048. __Pyx_INCREF(__pyx_t_1);
  8049. __Pyx_INCREF(__pyx__function);
  8050. __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
  8051. __pyx_t_13 = 0;
  8052. }
  8053. #endif
  8054. {
  8055. PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_fname_token, __pyx_v_fname_location};
  8056. __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_13, (3-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  8057. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  8058. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  8059. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 261, __pyx_L39_error)
  8060. __Pyx_GOTREF(__pyx_t_8);
  8061. }
  8062. __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_v_err);
  8063. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  8064. __PYX_ERR(0, 261, __pyx_L39_error)
  8065. }
  8066. /* "fontTools/feaLib/lexer.py":260
  8067. * try:
  8068. * self.lexers_.append(self.make_lexer_(path))
  8069. * except FileNotFoundError as err: # <<<<<<<<<<<<<<
  8070. * raise IncludedFeaNotFound(fname_token, fname_location) from err
  8071. * else:
  8072. */
  8073. /*finally:*/ {
  8074. __pyx_L39_error:;
  8075. /*exception exit:*/{
  8076. __Pyx_PyThreadState_declare
  8077. __Pyx_PyThreadState_assign
  8078. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  8079. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  8080. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  8081. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  8082. __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
  8083. if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  8084. __Pyx_XGOTREF(__pyx_t_19);
  8085. __Pyx_XGOTREF(__pyx_t_20);
  8086. __Pyx_XGOTREF(__pyx_t_21);
  8087. __Pyx_XGOTREF(__pyx_t_22);
  8088. __Pyx_XGOTREF(__pyx_t_23);
  8089. __Pyx_XGOTREF(__pyx_t_24);
  8090. __pyx_t_11 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
  8091. {
  8092. __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
  8093. }
  8094. __Pyx_XGIVEREF(__pyx_t_22);
  8095. __Pyx_XGIVEREF(__pyx_t_23);
  8096. __Pyx_XGIVEREF(__pyx_t_24);
  8097. __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
  8098. __Pyx_XGIVEREF(__pyx_t_19);
  8099. __Pyx_XGIVEREF(__pyx_t_20);
  8100. __Pyx_XGIVEREF(__pyx_t_21);
  8101. __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  8102. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  8103. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
  8104. goto __pyx_L28_except_error;
  8105. }
  8106. }
  8107. }
  8108. goto __pyx_L28_except_error;
  8109. /* "fontTools/feaLib/lexer.py":258
  8110. * if len(self.lexers_) >= 5:
  8111. * raise FeatureLibError("Too many recursive includes", fname_location)
  8112. * try: # <<<<<<<<<<<<<<
  8113. * self.lexers_.append(self.make_lexer_(path))
  8114. * except FileNotFoundError as err:
  8115. */
  8116. __pyx_L28_except_error:;
  8117. __Pyx_XGIVEREF(__pyx_t_6);
  8118. __Pyx_XGIVEREF(__pyx_t_5);
  8119. __Pyx_XGIVEREF(__pyx_t_4);
  8120. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  8121. goto __pyx_L1_error;
  8122. __pyx_L33_try_end:;
  8123. }
  8124. /* "fontTools/feaLib/lexer.py":235
  8125. * self.lexers_.pop()
  8126. * continue
  8127. * if token_type is Lexer.NAME and token == "include": # <<<<<<<<<<<<<<
  8128. * fname_type, fname_token, fname_location = lexer.next()
  8129. * if fname_type is not Lexer.FILENAME:
  8130. */
  8131. goto __pyx_L17;
  8132. }
  8133. /* "fontTools/feaLib/lexer.py":263
  8134. * raise IncludedFeaNotFound(fname_token, fname_location) from err
  8135. * else:
  8136. * return (token_type, token, location) # <<<<<<<<<<<<<<
  8137. * raise StopIteration()
  8138. *
  8139. */
  8140. /*else*/ {
  8141. __Pyx_XDECREF(__pyx_r);
  8142. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
  8143. __Pyx_GOTREF(__pyx_t_3);
  8144. __Pyx_INCREF(__pyx_v_token_type);
  8145. __Pyx_GIVEREF(__pyx_v_token_type);
  8146. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_token_type) != (0)) __PYX_ERR(0, 263, __pyx_L1_error);
  8147. __Pyx_INCREF(__pyx_v_token);
  8148. __Pyx_GIVEREF(__pyx_v_token);
  8149. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_token) != (0)) __PYX_ERR(0, 263, __pyx_L1_error);
  8150. __Pyx_INCREF(__pyx_v_location);
  8151. __Pyx_GIVEREF(__pyx_v_location);
  8152. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 263, __pyx_L1_error);
  8153. __pyx_r = __pyx_t_3;
  8154. __pyx_t_3 = 0;
  8155. goto __pyx_L0;
  8156. }
  8157. __pyx_L17:;
  8158. __pyx_L3_continue:;
  8159. }
  8160. /* "fontTools/feaLib/lexer.py":264
  8161. * else:
  8162. * return (token_type, token, location)
  8163. * raise StopIteration() # <<<<<<<<<<<<<<
  8164. *
  8165. * @staticmethod
  8166. */
  8167. __pyx_t_9 = NULL;
  8168. __pyx_t_13 = 1;
  8169. {
  8170. PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
  8171. __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_StopIteration)), __pyx_callargs+__pyx_t_13, (1-__pyx_t_13) | (__pyx_t_13*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  8172. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  8173. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
  8174. __Pyx_GOTREF(__pyx_t_3);
  8175. }
  8176. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  8177. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8178. __PYX_ERR(0, 264, __pyx_L1_error)
  8179. /* "fontTools/feaLib/lexer.py":227
  8180. * return self.__next__()
  8181. *
  8182. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  8183. * while self.lexers_:
  8184. * lexer = self.lexers_[-1]
  8185. */
  8186. /* function exit code */
  8187. __pyx_L1_error:;
  8188. __Pyx_XDECREF(__pyx_t_1);
  8189. __Pyx_XDECREF(__pyx_t_3);
  8190. __Pyx_XDECREF(__pyx_t_7);
  8191. __Pyx_XDECREF(__pyx_t_8);
  8192. __Pyx_XDECREF(__pyx_t_9);
  8193. __Pyx_XDECREF(__pyx_t_16);
  8194. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8195. __pyx_r = NULL;
  8196. __pyx_L0:;
  8197. __Pyx_XDECREF(__pyx_v_lexer);
  8198. __Pyx_XDECREF(__pyx_v_token_type);
  8199. __Pyx_XDECREF(__pyx_v_token);
  8200. __Pyx_XDECREF(__pyx_v_location);
  8201. __Pyx_XDECREF(__pyx_v_fname_type);
  8202. __Pyx_XDECREF(__pyx_v_fname_token);
  8203. __Pyx_XDECREF(__pyx_v_fname_location);
  8204. __Pyx_XDECREF(__pyx_v_path);
  8205. __Pyx_XDECREF(__pyx_v_curpath);
  8206. __Pyx_XDECREF(__pyx_v_err);
  8207. __Pyx_XGIVEREF(__pyx_r);
  8208. __Pyx_RefNannyFinishContext();
  8209. return __pyx_r;
  8210. }
  8211. /* "fontTools/feaLib/lexer.py":266
  8212. * raise StopIteration()
  8213. *
  8214. * @staticmethod # <<<<<<<<<<<<<<
  8215. * def make_lexer_(file_or_path):
  8216. * if hasattr(file_or_path, "read"):
  8217. */
  8218. /* Python wrapper */
  8219. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_(PyObject *__pyx_self,
  8220. #if CYTHON_METH_FASTCALL
  8221. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  8222. #else
  8223. PyObject *__pyx_args, PyObject *__pyx_kwds
  8224. #endif
  8225. ); /*proto*/
  8226. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_, "IncludingLexer.make_lexer_(file_or_path)");
  8227. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_ = {"make_lexer_", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_};
  8228. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_(PyObject *__pyx_self,
  8229. #if CYTHON_METH_FASTCALL
  8230. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  8231. #else
  8232. PyObject *__pyx_args, PyObject *__pyx_kwds
  8233. #endif
  8234. ) {
  8235. PyObject *__pyx_v_file_or_path = 0;
  8236. #if !CYTHON_METH_FASTCALL
  8237. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  8238. #endif
  8239. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  8240. PyObject* values[1] = {0};
  8241. int __pyx_lineno = 0;
  8242. const char *__pyx_filename = NULL;
  8243. int __pyx_clineno = 0;
  8244. PyObject *__pyx_r = 0;
  8245. __Pyx_RefNannyDeclarations
  8246. __Pyx_RefNannySetupContext("make_lexer_ (wrapper)", 0);
  8247. #if !CYTHON_METH_FASTCALL
  8248. #if CYTHON_ASSUME_SAFE_SIZE
  8249. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  8250. #else
  8251. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  8252. #endif
  8253. #endif
  8254. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  8255. {
  8256. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_or_path,0};
  8257. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  8258. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 266, __pyx_L3_error)
  8259. if (__pyx_kwds_len > 0) {
  8260. switch (__pyx_nargs) {
  8261. case 1:
  8262. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8263. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error)
  8264. CYTHON_FALLTHROUGH;
  8265. case 0: break;
  8266. default: goto __pyx_L5_argtuple_error;
  8267. }
  8268. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  8269. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "make_lexer_", 0) < (0)) __PYX_ERR(0, 266, __pyx_L3_error)
  8270. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  8271. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("make_lexer_", 1, 1, 1, i); __PYX_ERR(0, 266, __pyx_L3_error) }
  8272. }
  8273. } else if (unlikely(__pyx_nargs != 1)) {
  8274. goto __pyx_L5_argtuple_error;
  8275. } else {
  8276. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8277. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error)
  8278. }
  8279. __pyx_v_file_or_path = values[0];
  8280. }
  8281. goto __pyx_L6_skip;
  8282. __pyx_L5_argtuple_error:;
  8283. __Pyx_RaiseArgtupleInvalid("make_lexer_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 266, __pyx_L3_error)
  8284. __pyx_L6_skip:;
  8285. goto __pyx_L4_argument_unpacking_done;
  8286. __pyx_L3_error:;
  8287. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  8288. Py_XDECREF(values[__pyx_temp]);
  8289. }
  8290. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.make_lexer_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8291. __Pyx_RefNannyFinishContext();
  8292. return NULL;
  8293. __pyx_L4_argument_unpacking_done:;
  8294. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_(__pyx_self, __pyx_v_file_or_path);
  8295. /* function exit code */
  8296. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  8297. Py_XDECREF(values[__pyx_temp]);
  8298. }
  8299. __Pyx_RefNannyFinishContext();
  8300. return __pyx_r;
  8301. }
  8302. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_or_path) {
  8303. PyObject *__pyx_v_fileobj = NULL;
  8304. int __pyx_v_closing;
  8305. PyObject *__pyx_v_filename = NULL;
  8306. PyObject *__pyx_v_data = NULL;
  8307. PyObject *__pyx_r = NULL;
  8308. __Pyx_RefNannyDeclarations
  8309. int __pyx_t_1;
  8310. PyObject *__pyx_t_2 = NULL;
  8311. PyObject *__pyx_t_3 = NULL;
  8312. size_t __pyx_t_4;
  8313. PyObject *__pyx_t_5 = NULL;
  8314. int __pyx_lineno = 0;
  8315. const char *__pyx_filename = NULL;
  8316. int __pyx_clineno = 0;
  8317. __Pyx_RefNannySetupContext("make_lexer_", 0);
  8318. /* "fontTools/feaLib/lexer.py":268
  8319. * @staticmethod
  8320. * def make_lexer_(file_or_path):
  8321. * if hasattr(file_or_path, "read"): # <<<<<<<<<<<<<<
  8322. * fileobj, closing = file_or_path, False
  8323. * else:
  8324. */
  8325. __pyx_t_1 = __Pyx_HasAttr(__pyx_v_file_or_path, __pyx_mstate_global->__pyx_n_u_read); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 268, __pyx_L1_error)
  8326. if (__pyx_t_1) {
  8327. /* "fontTools/feaLib/lexer.py":269
  8328. * def make_lexer_(file_or_path):
  8329. * if hasattr(file_or_path, "read"):
  8330. * fileobj, closing = file_or_path, False # <<<<<<<<<<<<<<
  8331. * else:
  8332. * filename, closing = file_or_path, True
  8333. */
  8334. __pyx_t_2 = __pyx_v_file_or_path;
  8335. __Pyx_INCREF(__pyx_t_2);
  8336. __pyx_t_1 = 0;
  8337. __pyx_v_fileobj = __pyx_t_2;
  8338. __pyx_t_2 = 0;
  8339. __pyx_v_closing = __pyx_t_1;
  8340. /* "fontTools/feaLib/lexer.py":268
  8341. * @staticmethod
  8342. * def make_lexer_(file_or_path):
  8343. * if hasattr(file_or_path, "read"): # <<<<<<<<<<<<<<
  8344. * fileobj, closing = file_or_path, False
  8345. * else:
  8346. */
  8347. goto __pyx_L3;
  8348. }
  8349. /* "fontTools/feaLib/lexer.py":271
  8350. * fileobj, closing = file_or_path, False
  8351. * else:
  8352. * filename, closing = file_or_path, True # <<<<<<<<<<<<<<
  8353. * fileobj = open(filename, "r", encoding="utf-8-sig")
  8354. * data = fileobj.read()
  8355. */
  8356. /*else*/ {
  8357. __pyx_t_2 = __pyx_v_file_or_path;
  8358. __Pyx_INCREF(__pyx_t_2);
  8359. __pyx_t_1 = 1;
  8360. __pyx_v_filename = __pyx_t_2;
  8361. __pyx_t_2 = 0;
  8362. __pyx_v_closing = __pyx_t_1;
  8363. /* "fontTools/feaLib/lexer.py":272
  8364. * else:
  8365. * filename, closing = file_or_path, True
  8366. * fileobj = open(filename, "r", encoding="utf-8-sig") # <<<<<<<<<<<<<<
  8367. * data = fileobj.read()
  8368. * filename = getattr(fileobj, "name", None)
  8369. */
  8370. __pyx_t_3 = NULL;
  8371. __pyx_t_4 = 1;
  8372. {
  8373. PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_filename, __pyx_mstate_global->__pyx_n_u_r};
  8374. __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 272, __pyx_L1_error)
  8375. __Pyx_GOTREF(__pyx_t_5);
  8376. if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_encoding, __pyx_mstate_global->__pyx_kp_u_utf_8_sig, __pyx_t_5, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 272, __pyx_L1_error)
  8377. __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_builtin_open, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
  8378. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  8379. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  8380. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
  8381. __Pyx_GOTREF(__pyx_t_2);
  8382. }
  8383. __pyx_v_fileobj = __pyx_t_2;
  8384. __pyx_t_2 = 0;
  8385. }
  8386. __pyx_L3:;
  8387. /* "fontTools/feaLib/lexer.py":273
  8388. * filename, closing = file_or_path, True
  8389. * fileobj = open(filename, "r", encoding="utf-8-sig")
  8390. * data = fileobj.read() # <<<<<<<<<<<<<<
  8391. * filename = getattr(fileobj, "name", None)
  8392. * if closing:
  8393. */
  8394. __pyx_t_5 = __pyx_v_fileobj;
  8395. __Pyx_INCREF(__pyx_t_5);
  8396. __pyx_t_4 = 0;
  8397. {
  8398. PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
  8399. __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_read, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  8400. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8401. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  8402. __Pyx_GOTREF(__pyx_t_2);
  8403. }
  8404. __pyx_v_data = __pyx_t_2;
  8405. __pyx_t_2 = 0;
  8406. /* "fontTools/feaLib/lexer.py":274
  8407. * fileobj = open(filename, "r", encoding="utf-8-sig")
  8408. * data = fileobj.read()
  8409. * filename = getattr(fileobj, "name", None) # <<<<<<<<<<<<<<
  8410. * if closing:
  8411. * fileobj.close()
  8412. */
  8413. __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_fileobj, __pyx_mstate_global->__pyx_n_u_name, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
  8414. __Pyx_GOTREF(__pyx_t_2);
  8415. __Pyx_XDECREF_SET(__pyx_v_filename, __pyx_t_2);
  8416. __pyx_t_2 = 0;
  8417. /* "fontTools/feaLib/lexer.py":275
  8418. * data = fileobj.read()
  8419. * filename = getattr(fileobj, "name", None)
  8420. * if closing: # <<<<<<<<<<<<<<
  8421. * fileobj.close()
  8422. * return Lexer(data, filename)
  8423. */
  8424. if (__pyx_v_closing) {
  8425. /* "fontTools/feaLib/lexer.py":276
  8426. * filename = getattr(fileobj, "name", None)
  8427. * if closing:
  8428. * fileobj.close() # <<<<<<<<<<<<<<
  8429. * return Lexer(data, filename)
  8430. *
  8431. */
  8432. __pyx_t_5 = __pyx_v_fileobj;
  8433. __Pyx_INCREF(__pyx_t_5);
  8434. __pyx_t_4 = 0;
  8435. {
  8436. PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
  8437. __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  8438. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8439. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
  8440. __Pyx_GOTREF(__pyx_t_2);
  8441. }
  8442. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8443. /* "fontTools/feaLib/lexer.py":275
  8444. * data = fileobj.read()
  8445. * filename = getattr(fileobj, "name", None)
  8446. * if closing: # <<<<<<<<<<<<<<
  8447. * fileobj.close()
  8448. * return Lexer(data, filename)
  8449. */
  8450. }
  8451. /* "fontTools/feaLib/lexer.py":277
  8452. * if closing:
  8453. * fileobj.close()
  8454. * return Lexer(data, filename) # <<<<<<<<<<<<<<
  8455. *
  8456. * def scan_anonymous_block(self, tag):
  8457. */
  8458. __Pyx_XDECREF(__pyx_r);
  8459. __pyx_t_5 = NULL;
  8460. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error)
  8461. __Pyx_GOTREF(__pyx_t_3);
  8462. __pyx_t_4 = 1;
  8463. #if CYTHON_UNPACK_METHODS
  8464. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  8465. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  8466. assert(__pyx_t_5);
  8467. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  8468. __Pyx_INCREF(__pyx_t_5);
  8469. __Pyx_INCREF(__pyx__function);
  8470. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  8471. __pyx_t_4 = 0;
  8472. }
  8473. #endif
  8474. {
  8475. PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_data, __pyx_v_filename};
  8476. __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  8477. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8478. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8479. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
  8480. __Pyx_GOTREF(__pyx_t_2);
  8481. }
  8482. __pyx_r = __pyx_t_2;
  8483. __pyx_t_2 = 0;
  8484. goto __pyx_L0;
  8485. /* "fontTools/feaLib/lexer.py":266
  8486. * raise StopIteration()
  8487. *
  8488. * @staticmethod # <<<<<<<<<<<<<<
  8489. * def make_lexer_(file_or_path):
  8490. * if hasattr(file_or_path, "read"):
  8491. */
  8492. /* function exit code */
  8493. __pyx_L1_error:;
  8494. __Pyx_XDECREF(__pyx_t_2);
  8495. __Pyx_XDECREF(__pyx_t_3);
  8496. __Pyx_XDECREF(__pyx_t_5);
  8497. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.make_lexer_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8498. __pyx_r = NULL;
  8499. __pyx_L0:;
  8500. __Pyx_XDECREF(__pyx_v_fileobj);
  8501. __Pyx_XDECREF(__pyx_v_filename);
  8502. __Pyx_XDECREF(__pyx_v_data);
  8503. __Pyx_XGIVEREF(__pyx_r);
  8504. __Pyx_RefNannyFinishContext();
  8505. return __pyx_r;
  8506. }
  8507. /* "fontTools/feaLib/lexer.py":279
  8508. * return Lexer(data, filename)
  8509. *
  8510. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  8511. * return self.lexers_[-1].scan_anonymous_block(tag)
  8512. *
  8513. */
  8514. /* Python wrapper */
  8515. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block(PyObject *__pyx_self,
  8516. #if CYTHON_METH_FASTCALL
  8517. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  8518. #else
  8519. PyObject *__pyx_args, PyObject *__pyx_kwds
  8520. #endif
  8521. ); /*proto*/
  8522. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block, "IncludingLexer.scan_anonymous_block(self, tag)");
  8523. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block = {"scan_anonymous_block", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block};
  8524. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block(PyObject *__pyx_self,
  8525. #if CYTHON_METH_FASTCALL
  8526. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  8527. #else
  8528. PyObject *__pyx_args, PyObject *__pyx_kwds
  8529. #endif
  8530. ) {
  8531. PyObject *__pyx_v_self = 0;
  8532. PyObject *__pyx_v_tag = 0;
  8533. #if !CYTHON_METH_FASTCALL
  8534. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  8535. #endif
  8536. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  8537. PyObject* values[2] = {0,0};
  8538. int __pyx_lineno = 0;
  8539. const char *__pyx_filename = NULL;
  8540. int __pyx_clineno = 0;
  8541. PyObject *__pyx_r = 0;
  8542. __Pyx_RefNannyDeclarations
  8543. __Pyx_RefNannySetupContext("scan_anonymous_block (wrapper)", 0);
  8544. #if !CYTHON_METH_FASTCALL
  8545. #if CYTHON_ASSUME_SAFE_SIZE
  8546. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  8547. #else
  8548. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  8549. #endif
  8550. #endif
  8551. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  8552. {
  8553. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_tag,0};
  8554. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  8555. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 279, __pyx_L3_error)
  8556. if (__pyx_kwds_len > 0) {
  8557. switch (__pyx_nargs) {
  8558. case 2:
  8559. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  8560. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 279, __pyx_L3_error)
  8561. CYTHON_FALLTHROUGH;
  8562. case 1:
  8563. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8564. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 279, __pyx_L3_error)
  8565. CYTHON_FALLTHROUGH;
  8566. case 0: break;
  8567. default: goto __pyx_L5_argtuple_error;
  8568. }
  8569. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  8570. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scan_anonymous_block", 0) < (0)) __PYX_ERR(0, 279, __pyx_L3_error)
  8571. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  8572. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, i); __PYX_ERR(0, 279, __pyx_L3_error) }
  8573. }
  8574. } else if (unlikely(__pyx_nargs != 2)) {
  8575. goto __pyx_L5_argtuple_error;
  8576. } else {
  8577. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8578. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 279, __pyx_L3_error)
  8579. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  8580. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 279, __pyx_L3_error)
  8581. }
  8582. __pyx_v_self = values[0];
  8583. __pyx_v_tag = values[1];
  8584. }
  8585. goto __pyx_L6_skip;
  8586. __pyx_L5_argtuple_error:;
  8587. __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 279, __pyx_L3_error)
  8588. __pyx_L6_skip:;
  8589. goto __pyx_L4_argument_unpacking_done;
  8590. __pyx_L3_error:;
  8591. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  8592. Py_XDECREF(values[__pyx_temp]);
  8593. }
  8594. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8595. __Pyx_RefNannyFinishContext();
  8596. return NULL;
  8597. __pyx_L4_argument_unpacking_done:;
  8598. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block(__pyx_self, __pyx_v_self, __pyx_v_tag);
  8599. /* function exit code */
  8600. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  8601. Py_XDECREF(values[__pyx_temp]);
  8602. }
  8603. __Pyx_RefNannyFinishContext();
  8604. return __pyx_r;
  8605. }
  8606. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  8607. PyObject *__pyx_r = NULL;
  8608. __Pyx_RefNannyDeclarations
  8609. PyObject *__pyx_t_1 = NULL;
  8610. PyObject *__pyx_t_2 = NULL;
  8611. PyObject *__pyx_t_3 = NULL;
  8612. PyObject *__pyx_t_4 = NULL;
  8613. size_t __pyx_t_5;
  8614. int __pyx_lineno = 0;
  8615. const char *__pyx_filename = NULL;
  8616. int __pyx_clineno = 0;
  8617. __Pyx_RefNannySetupContext("scan_anonymous_block", 0);
  8618. /* "fontTools/feaLib/lexer.py":280
  8619. *
  8620. * def scan_anonymous_block(self, tag):
  8621. * return self.lexers_[-1].scan_anonymous_block(tag) # <<<<<<<<<<<<<<
  8622. *
  8623. *
  8624. */
  8625. __Pyx_XDECREF(__pyx_r);
  8626. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)
  8627. __Pyx_GOTREF(__pyx_t_3);
  8628. __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyLong_From_long, 0, 1, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 280, __pyx_L1_error)
  8629. __Pyx_GOTREF(__pyx_t_4);
  8630. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8631. __pyx_t_2 = __pyx_t_4;
  8632. __Pyx_INCREF(__pyx_t_2);
  8633. __pyx_t_5 = 0;
  8634. {
  8635. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_tag};
  8636. __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_scan_anonymous_block, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  8637. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  8638. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8639. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
  8640. __Pyx_GOTREF(__pyx_t_1);
  8641. }
  8642. __pyx_r = __pyx_t_1;
  8643. __pyx_t_1 = 0;
  8644. goto __pyx_L0;
  8645. /* "fontTools/feaLib/lexer.py":279
  8646. * return Lexer(data, filename)
  8647. *
  8648. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  8649. * return self.lexers_[-1].scan_anonymous_block(tag)
  8650. *
  8651. */
  8652. /* function exit code */
  8653. __pyx_L1_error:;
  8654. __Pyx_XDECREF(__pyx_t_1);
  8655. __Pyx_XDECREF(__pyx_t_2);
  8656. __Pyx_XDECREF(__pyx_t_3);
  8657. __Pyx_XDECREF(__pyx_t_4);
  8658. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8659. __pyx_r = NULL;
  8660. __pyx_L0:;
  8661. __Pyx_XGIVEREF(__pyx_r);
  8662. __Pyx_RefNannyFinishContext();
  8663. return __pyx_r;
  8664. }
  8665. /* "fontTools/feaLib/lexer.py":286
  8666. * """Lexer that does not follow `include` statements, emits them as-is."""
  8667. *
  8668. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  8669. * return next(self.lexers_[0])
  8670. */
  8671. /* Python wrapper */
  8672. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__(PyObject *__pyx_self,
  8673. #if CYTHON_METH_FASTCALL
  8674. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  8675. #else
  8676. PyObject *__pyx_args, PyObject *__pyx_kwds
  8677. #endif
  8678. ); /*proto*/
  8679. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__, "NonIncludingLexer.__next__(self)");
  8680. static PyMethodDef __pyx_mdef_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__ = {"__next__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__};
  8681. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__(PyObject *__pyx_self,
  8682. #if CYTHON_METH_FASTCALL
  8683. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  8684. #else
  8685. PyObject *__pyx_args, PyObject *__pyx_kwds
  8686. #endif
  8687. ) {
  8688. PyObject *__pyx_v_self = 0;
  8689. #if !CYTHON_METH_FASTCALL
  8690. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  8691. #endif
  8692. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  8693. PyObject* values[1] = {0};
  8694. int __pyx_lineno = 0;
  8695. const char *__pyx_filename = NULL;
  8696. int __pyx_clineno = 0;
  8697. PyObject *__pyx_r = 0;
  8698. __Pyx_RefNannyDeclarations
  8699. __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  8700. #if !CYTHON_METH_FASTCALL
  8701. #if CYTHON_ASSUME_SAFE_SIZE
  8702. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  8703. #else
  8704. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  8705. #endif
  8706. #endif
  8707. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  8708. {
  8709. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  8710. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  8711. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 286, __pyx_L3_error)
  8712. if (__pyx_kwds_len > 0) {
  8713. switch (__pyx_nargs) {
  8714. case 1:
  8715. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8716. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 286, __pyx_L3_error)
  8717. CYTHON_FALLTHROUGH;
  8718. case 0: break;
  8719. default: goto __pyx_L5_argtuple_error;
  8720. }
  8721. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  8722. if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__next__", 0) < (0)) __PYX_ERR(0, 286, __pyx_L3_error)
  8723. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  8724. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 286, __pyx_L3_error) }
  8725. }
  8726. } else if (unlikely(__pyx_nargs != 1)) {
  8727. goto __pyx_L5_argtuple_error;
  8728. } else {
  8729. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8730. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 286, __pyx_L3_error)
  8731. }
  8732. __pyx_v_self = values[0];
  8733. }
  8734. goto __pyx_L6_skip;
  8735. __pyx_L5_argtuple_error:;
  8736. __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 286, __pyx_L3_error)
  8737. __pyx_L6_skip:;
  8738. goto __pyx_L4_argument_unpacking_done;
  8739. __pyx_L3_error:;
  8740. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  8741. Py_XDECREF(values[__pyx_temp]);
  8742. }
  8743. __Pyx_AddTraceback("fontTools.feaLib.lexer.NonIncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8744. __Pyx_RefNannyFinishContext();
  8745. return NULL;
  8746. __pyx_L4_argument_unpacking_done:;
  8747. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__(__pyx_self, __pyx_v_self);
  8748. /* function exit code */
  8749. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  8750. Py_XDECREF(values[__pyx_temp]);
  8751. }
  8752. __Pyx_RefNannyFinishContext();
  8753. return __pyx_r;
  8754. }
  8755. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  8756. PyObject *__pyx_r = NULL;
  8757. __Pyx_RefNannyDeclarations
  8758. PyObject *__pyx_t_1 = NULL;
  8759. PyObject *__pyx_t_2 = NULL;
  8760. int __pyx_lineno = 0;
  8761. const char *__pyx_filename = NULL;
  8762. int __pyx_clineno = 0;
  8763. __Pyx_RefNannySetupContext("__next__", 0);
  8764. /* "fontTools/feaLib/lexer.py":287
  8765. *
  8766. * def __next__(self): # Python 3
  8767. * return next(self.lexers_[0]) # <<<<<<<<<<<<<<
  8768. */
  8769. __Pyx_XDECREF(__pyx_r);
  8770. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lexers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
  8771. __Pyx_GOTREF(__pyx_t_1);
  8772. __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
  8773. __Pyx_GOTREF(__pyx_t_2);
  8774. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8775. __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
  8776. __Pyx_GOTREF(__pyx_t_1);
  8777. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8778. __pyx_r = __pyx_t_1;
  8779. __pyx_t_1 = 0;
  8780. goto __pyx_L0;
  8781. /* "fontTools/feaLib/lexer.py":286
  8782. * """Lexer that does not follow `include` statements, emits them as-is."""
  8783. *
  8784. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  8785. * return next(self.lexers_[0])
  8786. */
  8787. /* function exit code */
  8788. __pyx_L1_error:;
  8789. __Pyx_XDECREF(__pyx_t_1);
  8790. __Pyx_XDECREF(__pyx_t_2);
  8791. __Pyx_AddTraceback("fontTools.feaLib.lexer.NonIncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8792. __pyx_r = NULL;
  8793. __pyx_L0:;
  8794. __Pyx_XGIVEREF(__pyx_r);
  8795. __Pyx_RefNannyFinishContext();
  8796. return __pyx_r;
  8797. }
  8798. /* #### Code section: module_exttypes ### */
  8799. static PyMethodDef __pyx_methods[] = {
  8800. {0, 0, 0, 0}
  8801. };
  8802. /* #### Code section: initfunc_declarations ### */
  8803. static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8804. static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8805. static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
  8806. static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8807. static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8808. static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8809. static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8810. static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8811. static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8812. static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8813. static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8814. static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8815. /* #### Code section: init_module ### */
  8816. static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  8817. __Pyx_RefNannyDeclarations
  8818. CYTHON_UNUSED_VAR(__pyx_mstate);
  8819. __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  8820. /*--- Global init code ---*/
  8821. __Pyx_RefNannyFinishContext();
  8822. return 0;
  8823. }
  8824. static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  8825. __Pyx_RefNannyDeclarations
  8826. CYTHON_UNUSED_VAR(__pyx_mstate);
  8827. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  8828. /*--- Variable export code ---*/
  8829. __Pyx_RefNannyFinishContext();
  8830. return 0;
  8831. }
  8832. static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  8833. __Pyx_RefNannyDeclarations
  8834. CYTHON_UNUSED_VAR(__pyx_mstate);
  8835. __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  8836. /*--- Function export code ---*/
  8837. __Pyx_RefNannyFinishContext();
  8838. return 0;
  8839. }
  8840. static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  8841. __Pyx_RefNannyDeclarations
  8842. CYTHON_UNUSED_VAR(__pyx_mstate);
  8843. __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  8844. /*--- Type init code ---*/
  8845. __Pyx_RefNannyFinishContext();
  8846. return 0;
  8847. }
  8848. static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  8849. __Pyx_RefNannyDeclarations
  8850. CYTHON_UNUSED_VAR(__pyx_mstate);
  8851. __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  8852. /*--- Type import code ---*/
  8853. __Pyx_RefNannyFinishContext();
  8854. return 0;
  8855. }
  8856. static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  8857. __Pyx_RefNannyDeclarations
  8858. CYTHON_UNUSED_VAR(__pyx_mstate);
  8859. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  8860. /*--- Variable import code ---*/
  8861. __Pyx_RefNannyFinishContext();
  8862. return 0;
  8863. }
  8864. static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  8865. __Pyx_RefNannyDeclarations
  8866. CYTHON_UNUSED_VAR(__pyx_mstate);
  8867. __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  8868. /*--- Function import code ---*/
  8869. __Pyx_RefNannyFinishContext();
  8870. return 0;
  8871. }
  8872. #if CYTHON_PEP489_MULTI_PHASE_INIT
  8873. static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
  8874. static int __pyx_pymod_exec_lexer(PyObject* module); /*proto*/
  8875. static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  8876. {Py_mod_create, (void*)__pyx_pymod_create},
  8877. {Py_mod_exec, (void*)__pyx_pymod_exec_lexer},
  8878. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  8879. {Py_mod_gil, Py_MOD_GIL_USED},
  8880. #endif
  8881. #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  8882. {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  8883. #endif
  8884. {0, NULL}
  8885. };
  8886. #endif
  8887. #ifdef __cplusplus
  8888. namespace {
  8889. struct PyModuleDef __pyx_moduledef =
  8890. #else
  8891. static struct PyModuleDef __pyx_moduledef =
  8892. #endif
  8893. {
  8894. PyModuleDef_HEAD_INIT,
  8895. "lexer",
  8896. 0, /* m_doc */
  8897. #if CYTHON_USE_MODULE_STATE
  8898. sizeof(__pyx_mstatetype), /* m_size */
  8899. #else
  8900. (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
  8901. #endif
  8902. __pyx_methods /* m_methods */,
  8903. #if CYTHON_PEP489_MULTI_PHASE_INIT
  8904. __pyx_moduledef_slots, /* m_slots */
  8905. #else
  8906. NULL, /* m_reload */
  8907. #endif
  8908. #if CYTHON_USE_MODULE_STATE
  8909. __pyx_m_traverse, /* m_traverse */
  8910. __pyx_m_clear, /* m_clear */
  8911. NULL /* m_free */
  8912. #else
  8913. NULL, /* m_traverse */
  8914. NULL, /* m_clear */
  8915. NULL /* m_free */
  8916. #endif
  8917. };
  8918. #ifdef __cplusplus
  8919. } /* anonymous namespace */
  8920. #endif
  8921. /* PyModInitFuncType */
  8922. #ifndef CYTHON_NO_PYINIT_EXPORT
  8923. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  8924. #else
  8925. #ifdef __cplusplus
  8926. #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  8927. #else
  8928. #define __Pyx_PyMODINIT_FUNC PyObject *
  8929. #endif
  8930. #endif
  8931. __Pyx_PyMODINIT_FUNC PyInit_lexer(void) CYTHON_SMALL_CODE; /*proto*/
  8932. __Pyx_PyMODINIT_FUNC PyInit_lexer(void)
  8933. #if CYTHON_PEP489_MULTI_PHASE_INIT
  8934. {
  8935. return PyModuleDef_Init(&__pyx_moduledef);
  8936. }
  8937. /* ModuleCreationPEP489 */
  8938. #if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
  8939. || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
  8940. static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
  8941. {
  8942. PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
  8943. if (!module) {
  8944. PyErr_Clear(); // just try the 3.8-3.12 version
  8945. module = PyImport_ImportModule("_xxsubinterpreters");
  8946. if (!module) goto bad;
  8947. }
  8948. PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
  8949. Py_DECREF(module);
  8950. if (!current) goto bad;
  8951. if (PyTuple_Check(current)) {
  8952. PyObject *new_current = PySequence_GetItem(current, 0);
  8953. Py_DECREF(current);
  8954. current = new_current;
  8955. if (!new_current) goto bad;
  8956. }
  8957. long long as_c_int = PyLong_AsLongLong(current);
  8958. Py_DECREF(current);
  8959. return as_c_int;
  8960. }
  8961. bad:
  8962. PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
  8963. return -1;
  8964. }
  8965. #endif
  8966. #if !CYTHON_USE_MODULE_STATE
  8967. static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
  8968. static PY_INT64_T main_interpreter_id = -1;
  8969. #if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  8970. PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
  8971. #elif CYTHON_COMPILING_IN_GRAAL
  8972. PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
  8973. #elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
  8974. || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
  8975. PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
  8976. #elif CYTHON_COMPILING_IN_LIMITED_API
  8977. PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
  8978. #else
  8979. PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
  8980. #endif
  8981. if (unlikely(current_id == -1)) {
  8982. return -1;
  8983. }
  8984. if (main_interpreter_id == -1) {
  8985. main_interpreter_id = current_id;
  8986. return 0;
  8987. } else if (unlikely(main_interpreter_id != current_id)) {
  8988. PyErr_SetString(
  8989. PyExc_ImportError,
  8990. "Interpreter change detected - this module can only be loaded into one interpreter per process.");
  8991. return -1;
  8992. }
  8993. return 0;
  8994. }
  8995. #endif
  8996. static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
  8997. {
  8998. PyObject *value = PyObject_GetAttrString(spec, from_name);
  8999. int result = 0;
  9000. if (likely(value)) {
  9001. if (allow_none || value != Py_None) {
  9002. result = PyDict_SetItemString(moddict, to_name, value);
  9003. }
  9004. Py_DECREF(value);
  9005. } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
  9006. PyErr_Clear();
  9007. } else {
  9008. result = -1;
  9009. }
  9010. return result;
  9011. }
  9012. static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
  9013. PyObject *module = NULL, *moddict, *modname;
  9014. CYTHON_UNUSED_VAR(def);
  9015. #if !CYTHON_USE_MODULE_STATE
  9016. if (__Pyx_check_single_interpreter())
  9017. return NULL;
  9018. #endif
  9019. if (__pyx_m)
  9020. return __Pyx_NewRef(__pyx_m);
  9021. modname = PyObject_GetAttrString(spec, "name");
  9022. if (unlikely(!modname)) goto bad;
  9023. module = PyModule_NewObject(modname);
  9024. Py_DECREF(modname);
  9025. if (unlikely(!module)) goto bad;
  9026. moddict = PyModule_GetDict(module);
  9027. if (unlikely(!moddict)) goto bad;
  9028. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
  9029. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
  9030. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
  9031. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
  9032. return module;
  9033. bad:
  9034. Py_XDECREF(module);
  9035. return NULL;
  9036. }
  9037. static CYTHON_SMALL_CODE int __pyx_pymod_exec_lexer(PyObject *__pyx_pyinit_module)
  9038. #endif
  9039. {
  9040. int stringtab_initialized = 0;
  9041. #if CYTHON_USE_MODULE_STATE
  9042. int pystate_addmodule_run = 0;
  9043. #endif
  9044. __pyx_mstatetype *__pyx_mstate = NULL;
  9045. PyObject *__pyx_t_1 = NULL;
  9046. PyObject *__pyx_t_2 = NULL;
  9047. Py_ssize_t __pyx_t_3;
  9048. PyObject *__pyx_t_4 = NULL;
  9049. PyObject *__pyx_t_5 = NULL;
  9050. PyObject *__pyx_t_6 = NULL;
  9051. PyObject *__pyx_t_7 = NULL;
  9052. PyObject *__pyx_t_8 = NULL;
  9053. PyObject *__pyx_t_9 = NULL;
  9054. PyObject *__pyx_t_10 = NULL;
  9055. PyObject *__pyx_t_11 = NULL;
  9056. size_t __pyx_t_12;
  9057. int __pyx_lineno = 0;
  9058. const char *__pyx_filename = NULL;
  9059. int __pyx_clineno = 0;
  9060. __Pyx_RefNannyDeclarations
  9061. #if CYTHON_PEP489_MULTI_PHASE_INIT
  9062. if (__pyx_m) {
  9063. if (__pyx_m == __pyx_pyinit_module) return 0;
  9064. PyErr_SetString(PyExc_RuntimeError, "Module 'lexer' has already been imported. Re-initialisation is not supported.");
  9065. return -1;
  9066. }
  9067. #else
  9068. if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  9069. #endif
  9070. /*--- Module creation code ---*/
  9071. #if CYTHON_PEP489_MULTI_PHASE_INIT
  9072. __pyx_t_1 = __pyx_pyinit_module;
  9073. Py_INCREF(__pyx_t_1);
  9074. #else
  9075. __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  9076. #endif
  9077. #if CYTHON_USE_MODULE_STATE
  9078. {
  9079. int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
  9080. __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "lexer" pseudovariable */
  9081. if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  9082. pystate_addmodule_run = 1;
  9083. }
  9084. #else
  9085. __pyx_m = __pyx_t_1;
  9086. #endif
  9087. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  9088. PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  9089. #endif
  9090. __pyx_mstate = __pyx_mstate_global;
  9091. CYTHON_UNUSED_VAR(__pyx_t_1);
  9092. __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  9093. Py_INCREF(__pyx_mstate->__pyx_d);
  9094. __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  9095. __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  9096. if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  9097. /* ImportRefnannyAPI */
  9098. #if CYTHON_REFNANNY
  9099. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  9100. if (!__Pyx_RefNanny) {
  9101. PyErr_Clear();
  9102. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  9103. if (!__Pyx_RefNanny)
  9104. Py_FatalError("failed to import 'refnanny' module");
  9105. }
  9106. #endif
  9107. __Pyx_RefNannySetupContext("PyInit_lexer", 0);
  9108. __Pyx_init_runtime_version();
  9109. if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9110. __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  9111. __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  9112. __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  9113. /*--- Library function declarations ---*/
  9114. /*--- Initialize various global constants etc. ---*/
  9115. if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9116. stringtab_initialized = 1;
  9117. if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9118. if (__pyx_module_is_main_fontTools__feaLib__lexer) {
  9119. if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9120. }
  9121. {
  9122. PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
  9123. if (!PyDict_GetItemString(modules, "fontTools.feaLib.lexer")) {
  9124. if (unlikely((PyDict_SetItemString(modules, "fontTools.feaLib.lexer", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  9125. }
  9126. }
  9127. /*--- Builtin init code ---*/
  9128. if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9129. /*--- Constants init code ---*/
  9130. if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9131. if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9132. /*--- Global type/function init code ---*/
  9133. (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  9134. (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  9135. (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  9136. (void)__Pyx_modinit_type_init_code(__pyx_mstate);
  9137. (void)__Pyx_modinit_type_import_code(__pyx_mstate);
  9138. (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
  9139. (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  9140. /*--- Execution code ---*/
  9141. /* "fontTools/feaLib/lexer.py":1
  9142. * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound # <<<<<<<<<<<<<<
  9143. * from fontTools.feaLib.location import FeatureLibLocation
  9144. * import re
  9145. */
  9146. {
  9147. PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibError,__pyx_mstate_global->__pyx_n_u_IncludedFeaNotFound};
  9148. __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_fontTools_feaLib_error, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  9149. }
  9150. __pyx_t_2 = __pyx_t_1;
  9151. __Pyx_GOTREF(__pyx_t_2);
  9152. {
  9153. PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibError,__pyx_mstate_global->__pyx_n_u_IncludedFeaNotFound};
  9154. for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
  9155. __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  9156. __Pyx_GOTREF(__pyx_t_4);
  9157. if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9158. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9159. }
  9160. }
  9161. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9162. /* "fontTools/feaLib/lexer.py":2
  9163. * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound
  9164. * from fontTools.feaLib.location import FeatureLibLocation # <<<<<<<<<<<<<<
  9165. * import re
  9166. * import os
  9167. */
  9168. {
  9169. PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibLocation};
  9170. __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_fontTools_feaLib_location, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
  9171. }
  9172. __pyx_t_2 = __pyx_t_1;
  9173. __Pyx_GOTREF(__pyx_t_2);
  9174. {
  9175. PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibLocation};
  9176. __pyx_t_3 = 0; {
  9177. __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2, __pyx_L1_error)
  9178. __Pyx_GOTREF(__pyx_t_4);
  9179. if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 2, __pyx_L1_error)
  9180. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9181. }
  9182. }
  9183. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9184. /* "fontTools/feaLib/lexer.py":3
  9185. * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound
  9186. * from fontTools.feaLib.location import FeatureLibLocation
  9187. * import re # <<<<<<<<<<<<<<
  9188. * import os
  9189. *
  9190. */
  9191. __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_re, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
  9192. __pyx_t_2 = __pyx_t_1;
  9193. __Pyx_GOTREF(__pyx_t_2);
  9194. if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_re, __pyx_t_2) < (0)) __PYX_ERR(0, 3, __pyx_L1_error)
  9195. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9196. /* "fontTools/feaLib/lexer.py":4
  9197. * from fontTools.feaLib.location import FeatureLibLocation
  9198. * import re
  9199. * import os # <<<<<<<<<<<<<<
  9200. *
  9201. * try:
  9202. */
  9203. __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_os, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
  9204. __pyx_t_2 = __pyx_t_1;
  9205. __Pyx_GOTREF(__pyx_t_2);
  9206. if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_os, __pyx_t_2) < (0)) __PYX_ERR(0, 4, __pyx_L1_error)
  9207. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9208. /* "fontTools/feaLib/lexer.py":6
  9209. * import os
  9210. *
  9211. * try: # <<<<<<<<<<<<<<
  9212. * import cython
  9213. * except ImportError:
  9214. */
  9215. {
  9216. (void)__pyx_t_1; (void)__pyx_t_5; (void)__pyx_t_6; /* mark used */
  9217. /*try:*/ {
  9218. /* "fontTools/feaLib/lexer.py":7
  9219. *
  9220. * try:
  9221. * import cython # <<<<<<<<<<<<<<
  9222. * except ImportError:
  9223. * # if cython not installed, use mock module with no-op decorators and types
  9224. */
  9225. }
  9226. }
  9227. /* "fontTools/feaLib/lexer.py":13
  9228. *
  9229. *
  9230. * class Lexer(object): # <<<<<<<<<<<<<<
  9231. * NUMBER = "NUMBER"
  9232. * HEXADECIMAL = "HEXADECIMAL"
  9233. */
  9234. __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[1]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  9235. __Pyx_GOTREF(__pyx_t_2);
  9236. __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
  9237. __Pyx_GOTREF(__pyx_t_4);
  9238. __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer, __pyx_mstate_global->__pyx_n_u_Lexer, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, (PyObject *) NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 13, __pyx_L1_error)
  9239. __Pyx_GOTREF(__pyx_t_7);
  9240. if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[1]) {
  9241. if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[1]) < 0))) __PYX_ERR(0, 13, __pyx_L1_error)
  9242. }
  9243. /* "fontTools/feaLib/lexer.py":14
  9244. *
  9245. * class Lexer(object):
  9246. * NUMBER = "NUMBER" # <<<<<<<<<<<<<<
  9247. * HEXADECIMAL = "HEXADECIMAL"
  9248. * OCTAL = "OCTAL"
  9249. */
  9250. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NUMBER, __pyx_mstate_global->__pyx_n_u_NUMBER) < (0)) __PYX_ERR(0, 14, __pyx_L1_error)
  9251. /* "fontTools/feaLib/lexer.py":15
  9252. * class Lexer(object):
  9253. * NUMBER = "NUMBER"
  9254. * HEXADECIMAL = "HEXADECIMAL" # <<<<<<<<<<<<<<
  9255. * OCTAL = "OCTAL"
  9256. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
  9257. */
  9258. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL) < (0)) __PYX_ERR(0, 15, __pyx_L1_error)
  9259. /* "fontTools/feaLib/lexer.py":16
  9260. * NUMBER = "NUMBER"
  9261. * HEXADECIMAL = "HEXADECIMAL"
  9262. * OCTAL = "OCTAL" # <<<<<<<<<<<<<<
  9263. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
  9264. * FLOAT = "FLOAT"
  9265. */
  9266. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OCTAL, __pyx_mstate_global->__pyx_n_u_OCTAL) < (0)) __PYX_ERR(0, 16, __pyx_L1_error)
  9267. /* "fontTools/feaLib/lexer.py":17
  9268. * HEXADECIMAL = "HEXADECIMAL"
  9269. * OCTAL = "OCTAL"
  9270. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL) # <<<<<<<<<<<<<<
  9271. * FLOAT = "FLOAT"
  9272. * STRING = "STRING"
  9273. */
  9274. __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NUMBER);
  9275. if (unlikely(!__pyx_t_8)) {
  9276. PyErr_Clear();
  9277. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_NUMBER);
  9278. }
  9279. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 17, __pyx_L1_error)
  9280. __Pyx_GOTREF(__pyx_t_8);
  9281. __pyx_t_9 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL);
  9282. if (unlikely(!__pyx_t_9)) {
  9283. PyErr_Clear();
  9284. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL);
  9285. }
  9286. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 17, __pyx_L1_error)
  9287. __Pyx_GOTREF(__pyx_t_9);
  9288. __pyx_t_10 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OCTAL);
  9289. if (unlikely(!__pyx_t_10)) {
  9290. PyErr_Clear();
  9291. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_OCTAL);
  9292. }
  9293. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 17, __pyx_L1_error)
  9294. __Pyx_GOTREF(__pyx_t_10);
  9295. __pyx_t_11 = PyTuple_Pack(3, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 17, __pyx_L1_error)
  9296. __Pyx_GOTREF(__pyx_t_11);
  9297. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9298. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  9299. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  9300. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NUMBERS, __pyx_t_11) < (0)) __PYX_ERR(0, 17, __pyx_L1_error)
  9301. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9302. /* "fontTools/feaLib/lexer.py":18
  9303. * OCTAL = "OCTAL"
  9304. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
  9305. * FLOAT = "FLOAT" # <<<<<<<<<<<<<<
  9306. * STRING = "STRING"
  9307. * NAME = "NAME"
  9308. */
  9309. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FLOAT, __pyx_mstate_global->__pyx_n_u_FLOAT) < (0)) __PYX_ERR(0, 18, __pyx_L1_error)
  9310. /* "fontTools/feaLib/lexer.py":19
  9311. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
  9312. * FLOAT = "FLOAT"
  9313. * STRING = "STRING" # <<<<<<<<<<<<<<
  9314. * NAME = "NAME"
  9315. * FILENAME = "FILENAME"
  9316. */
  9317. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_STRING, __pyx_mstate_global->__pyx_n_u_STRING) < (0)) __PYX_ERR(0, 19, __pyx_L1_error)
  9318. /* "fontTools/feaLib/lexer.py":20
  9319. * FLOAT = "FLOAT"
  9320. * STRING = "STRING"
  9321. * NAME = "NAME" # <<<<<<<<<<<<<<
  9322. * FILENAME = "FILENAME"
  9323. * GLYPHCLASS = "GLYPHCLASS"
  9324. */
  9325. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NAME, __pyx_mstate_global->__pyx_n_u_NAME) < (0)) __PYX_ERR(0, 20, __pyx_L1_error)
  9326. /* "fontTools/feaLib/lexer.py":21
  9327. * STRING = "STRING"
  9328. * NAME = "NAME"
  9329. * FILENAME = "FILENAME" # <<<<<<<<<<<<<<
  9330. * GLYPHCLASS = "GLYPHCLASS"
  9331. * CID = "CID"
  9332. */
  9333. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FILENAME, __pyx_mstate_global->__pyx_n_u_FILENAME) < (0)) __PYX_ERR(0, 21, __pyx_L1_error)
  9334. /* "fontTools/feaLib/lexer.py":22
  9335. * NAME = "NAME"
  9336. * FILENAME = "FILENAME"
  9337. * GLYPHCLASS = "GLYPHCLASS" # <<<<<<<<<<<<<<
  9338. * CID = "CID"
  9339. * SYMBOL = "SYMBOL"
  9340. */
  9341. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_GLYPHCLASS, __pyx_mstate_global->__pyx_n_u_GLYPHCLASS) < (0)) __PYX_ERR(0, 22, __pyx_L1_error)
  9342. /* "fontTools/feaLib/lexer.py":23
  9343. * FILENAME = "FILENAME"
  9344. * GLYPHCLASS = "GLYPHCLASS"
  9345. * CID = "CID" # <<<<<<<<<<<<<<
  9346. * SYMBOL = "SYMBOL"
  9347. * COMMENT = "COMMENT"
  9348. */
  9349. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CID, __pyx_mstate_global->__pyx_n_u_CID) < (0)) __PYX_ERR(0, 23, __pyx_L1_error)
  9350. /* "fontTools/feaLib/lexer.py":24
  9351. * GLYPHCLASS = "GLYPHCLASS"
  9352. * CID = "CID"
  9353. * SYMBOL = "SYMBOL" # <<<<<<<<<<<<<<
  9354. * COMMENT = "COMMENT"
  9355. * NEWLINE = "NEWLINE"
  9356. */
  9357. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_SYMBOL, __pyx_mstate_global->__pyx_n_u_SYMBOL) < (0)) __PYX_ERR(0, 24, __pyx_L1_error)
  9358. /* "fontTools/feaLib/lexer.py":25
  9359. * CID = "CID"
  9360. * SYMBOL = "SYMBOL"
  9361. * COMMENT = "COMMENT" # <<<<<<<<<<<<<<
  9362. * NEWLINE = "NEWLINE"
  9363. * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK"
  9364. */
  9365. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_COMMENT, __pyx_mstate_global->__pyx_n_u_COMMENT) < (0)) __PYX_ERR(0, 25, __pyx_L1_error)
  9366. /* "fontTools/feaLib/lexer.py":26
  9367. * SYMBOL = "SYMBOL"
  9368. * COMMENT = "COMMENT"
  9369. * NEWLINE = "NEWLINE" # <<<<<<<<<<<<<<
  9370. * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK"
  9371. *
  9372. */
  9373. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NEWLINE, __pyx_mstate_global->__pyx_n_u_NEWLINE) < (0)) __PYX_ERR(0, 26, __pyx_L1_error)
  9374. /* "fontTools/feaLib/lexer.py":27
  9375. * COMMENT = "COMMENT"
  9376. * NEWLINE = "NEWLINE"
  9377. * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK" # <<<<<<<<<<<<<<
  9378. *
  9379. * CHAR_WHITESPACE_ = " \t"
  9380. */
  9381. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ANONYMOUS_BLOCK, __pyx_mstate_global->__pyx_n_u_ANONYMOUS_BLOCK) < (0)) __PYX_ERR(0, 27, __pyx_L1_error)
  9382. /* "fontTools/feaLib/lexer.py":29
  9383. * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK"
  9384. *
  9385. * CHAR_WHITESPACE_ = " \t" # <<<<<<<<<<<<<<
  9386. * CHAR_NEWLINE_ = "\r\n"
  9387. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
  9388. */
  9389. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_WHITESPACE, __pyx_mstate_global->__pyx_kp_u__13) < (0)) __PYX_ERR(0, 29, __pyx_L1_error)
  9390. /* "fontTools/feaLib/lexer.py":30
  9391. *
  9392. * CHAR_WHITESPACE_ = " \t"
  9393. * CHAR_NEWLINE_ = "\r\n" # <<<<<<<<<<<<<<
  9394. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
  9395. * CHAR_DIGIT_ = "0123456789"
  9396. */
  9397. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_NEWLINE, __pyx_mstate_global->__pyx_kp_u__14) < (0)) __PYX_ERR(0, 30, __pyx_L1_error)
  9398. /* "fontTools/feaLib/lexer.py":31
  9399. * CHAR_WHITESPACE_ = " \t"
  9400. * CHAR_NEWLINE_ = "\r\n"
  9401. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()=" # <<<<<<<<<<<<<<
  9402. * CHAR_DIGIT_ = "0123456789"
  9403. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
  9404. */
  9405. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_SYMBOL, __pyx_mstate_global->__pyx_kp_u__15) < (0)) __PYX_ERR(0, 31, __pyx_L1_error)
  9406. /* "fontTools/feaLib/lexer.py":32
  9407. * CHAR_NEWLINE_ = "\r\n"
  9408. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
  9409. * CHAR_DIGIT_ = "0123456789" # <<<<<<<<<<<<<<
  9410. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
  9411. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  9412. */
  9413. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT, __pyx_mstate_global->__pyx_kp_u_0123456789) < (0)) __PYX_ERR(0, 32, __pyx_L1_error)
  9414. /* "fontTools/feaLib/lexer.py":33
  9415. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
  9416. * CHAR_DIGIT_ = "0123456789"
  9417. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef" # <<<<<<<<<<<<<<
  9418. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  9419. * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\"
  9420. */
  9421. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_HEXDIGIT, __pyx_mstate_global->__pyx_kp_u_0123456789ABCDEFabcdef) < (0)) __PYX_ERR(0, 33, __pyx_L1_error)
  9422. /* "fontTools/feaLib/lexer.py":34
  9423. * CHAR_DIGIT_ = "0123456789"
  9424. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
  9425. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" # <<<<<<<<<<<<<<
  9426. * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\"
  9427. * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-"
  9428. */
  9429. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER, __pyx_mstate_global->__pyx_n_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef) < (0)) __PYX_ERR(0, 34, __pyx_L1_error)
  9430. /* "fontTools/feaLib/lexer.py":35
  9431. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
  9432. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  9433. * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\" # <<<<<<<<<<<<<<
  9434. * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-"
  9435. *
  9436. */
  9437. __pyx_t_11 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
  9438. if (unlikely(!__pyx_t_11)) {
  9439. PyErr_Clear();
  9440. __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
  9441. }
  9442. if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 35, __pyx_L1_error)
  9443. __Pyx_GOTREF(__pyx_t_11);
  9444. __pyx_t_10 = PyNumber_Add(__pyx_t_11, __pyx_mstate_global->__pyx_kp_u__16); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 35, __pyx_L1_error)
  9445. __Pyx_GOTREF(__pyx_t_10);
  9446. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9447. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_START, __pyx_t_10) < (0)) __PYX_ERR(0, 35, __pyx_L1_error)
  9448. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  9449. /* "fontTools/feaLib/lexer.py":36
  9450. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  9451. * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\"
  9452. * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-" # <<<<<<<<<<<<<<
  9453. *
  9454. * RE_GLYPHCLASS = re.compile(r"^[A-Za-z_0-9.\-]+$")
  9455. */
  9456. __pyx_t_10 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
  9457. if (unlikely(!__pyx_t_10)) {
  9458. PyErr_Clear();
  9459. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
  9460. }
  9461. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 36, __pyx_L1_error)
  9462. __Pyx_GOTREF(__pyx_t_10);
  9463. __pyx_t_11 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT);
  9464. if (unlikely(!__pyx_t_11)) {
  9465. PyErr_Clear();
  9466. __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT);
  9467. }
  9468. if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 36, __pyx_L1_error)
  9469. __Pyx_GOTREF(__pyx_t_11);
  9470. __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 36, __pyx_L1_error)
  9471. __Pyx_GOTREF(__pyx_t_9);
  9472. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  9473. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9474. __pyx_t_11 = PyNumber_Add(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u__17); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 36, __pyx_L1_error)
  9475. __Pyx_GOTREF(__pyx_t_11);
  9476. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  9477. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_NAME_CONTINUATION, __pyx_t_11) < (0)) __PYX_ERR(0, 36, __pyx_L1_error)
  9478. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9479. /* "fontTools/feaLib/lexer.py":38
  9480. * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-"
  9481. *
  9482. * RE_GLYPHCLASS = re.compile(r"^[A-Za-z_0-9.\-]+$") # <<<<<<<<<<<<<<
  9483. *
  9484. * MODE_NORMAL_ = "NORMAL"
  9485. */
  9486. __pyx_t_9 = NULL;
  9487. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 38, __pyx_L1_error)
  9488. __Pyx_GOTREF(__pyx_t_10);
  9489. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_compile); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 38, __pyx_L1_error)
  9490. __Pyx_GOTREF(__pyx_t_8);
  9491. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  9492. __pyx_t_12 = 1;
  9493. {
  9494. PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_A_Za_z_0_9};
  9495. __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  9496. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  9497. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9498. if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 38, __pyx_L1_error)
  9499. __Pyx_GOTREF(__pyx_t_11);
  9500. }
  9501. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_RE_GLYPHCLASS, __pyx_t_11) < (0)) __PYX_ERR(0, 38, __pyx_L1_error)
  9502. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9503. /* "fontTools/feaLib/lexer.py":40
  9504. * RE_GLYPHCLASS = re.compile(r"^[A-Za-z_0-9.\-]+$")
  9505. *
  9506. * MODE_NORMAL_ = "NORMAL" # <<<<<<<<<<<<<<
  9507. * MODE_FILENAME_ = "FILENAME"
  9508. *
  9509. */
  9510. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_MODE_NORMAL, __pyx_mstate_global->__pyx_n_u_NORMAL) < (0)) __PYX_ERR(0, 40, __pyx_L1_error)
  9511. /* "fontTools/feaLib/lexer.py":41
  9512. *
  9513. * MODE_NORMAL_ = "NORMAL"
  9514. * MODE_FILENAME_ = "FILENAME" # <<<<<<<<<<<<<<
  9515. *
  9516. * def __init__(self, text, filename):
  9517. */
  9518. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_MODE_FILENAME, __pyx_mstate_global->__pyx_n_u_FILENAME) < (0)) __PYX_ERR(0, 41, __pyx_L1_error)
  9519. /* "fontTools/feaLib/lexer.py":43
  9520. * MODE_FILENAME_ = "FILENAME"
  9521. *
  9522. * def __init__(self, text, filename): # <<<<<<<<<<<<<<
  9523. * self.filename_ = filename
  9524. * self.line_ = 1
  9525. */
  9526. __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_1__init__, 0, __pyx_mstate_global->__pyx_n_u_Lexer___init, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 43, __pyx_L1_error)
  9527. __Pyx_GOTREF(__pyx_t_11);
  9528. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9529. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9530. #endif
  9531. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_11) < (0)) __PYX_ERR(0, 43, __pyx_L1_error)
  9532. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9533. /* "fontTools/feaLib/lexer.py":52
  9534. * self.mode_ = Lexer.MODE_NORMAL_
  9535. *
  9536. * def __iter__(self): # <<<<<<<<<<<<<<
  9537. * return self
  9538. *
  9539. */
  9540. __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_3__iter__, 0, __pyx_mstate_global->__pyx_n_u_Lexer___iter, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 52, __pyx_L1_error)
  9541. __Pyx_GOTREF(__pyx_t_11);
  9542. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9543. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9544. #endif
  9545. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_iter, __pyx_t_11) < (0)) __PYX_ERR(0, 52, __pyx_L1_error)
  9546. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9547. /* "fontTools/feaLib/lexer.py":55
  9548. * return self
  9549. *
  9550. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  9551. * return self.__next__()
  9552. *
  9553. */
  9554. __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_5next, 0, __pyx_mstate_global->__pyx_n_u_Lexer_next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 55, __pyx_L1_error)
  9555. __Pyx_GOTREF(__pyx_t_11);
  9556. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9557. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9558. #endif
  9559. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next_3, __pyx_t_11) < (0)) __PYX_ERR(0, 55, __pyx_L1_error)
  9560. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9561. /* "fontTools/feaLib/lexer.py":58
  9562. * return self.__next__()
  9563. *
  9564. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  9565. * while True:
  9566. * token_type, token, location = self.next_()
  9567. */
  9568. __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_7__next__, 0, __pyx_mstate_global->__pyx_n_u_Lexer___next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 58, __pyx_L1_error)
  9569. __Pyx_GOTREF(__pyx_t_11);
  9570. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9571. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9572. #endif
  9573. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_11) < (0)) __PYX_ERR(0, 58, __pyx_L1_error)
  9574. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9575. /* "fontTools/feaLib/lexer.py":64
  9576. * return (token_type, token, location)
  9577. *
  9578. * def location_(self): # <<<<<<<<<<<<<<
  9579. * column = self.pos_ - self.line_start_ + 1
  9580. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  9581. */
  9582. __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_9location_, 0, __pyx_mstate_global->__pyx_n_u_Lexer_location, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 64, __pyx_L1_error)
  9583. __Pyx_GOTREF(__pyx_t_11);
  9584. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9585. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9586. #endif
  9587. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_location, __pyx_t_11) < (0)) __PYX_ERR(0, 64, __pyx_L1_error)
  9588. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9589. /* "fontTools/feaLib/lexer.py":68
  9590. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  9591. *
  9592. * def next_(self): # <<<<<<<<<<<<<<
  9593. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  9594. * location = self.location_()
  9595. */
  9596. __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_11next_, 0, __pyx_mstate_global->__pyx_n_u_Lexer_next_2, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 68, __pyx_L1_error)
  9597. __Pyx_GOTREF(__pyx_t_11);
  9598. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9599. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9600. #endif
  9601. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next_2, __pyx_t_11) < (0)) __PYX_ERR(0, 68, __pyx_L1_error)
  9602. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9603. /* "fontTools/feaLib/lexer.py":165
  9604. * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
  9605. *
  9606. * def scan_over_(self, valid): # <<<<<<<<<<<<<<
  9607. * p = self.pos_
  9608. * while p < self.text_length_ and self.text_[p] in valid:
  9609. */
  9610. __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_, 0, __pyx_mstate_global->__pyx_n_u_Lexer_scan_over, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 165, __pyx_L1_error)
  9611. __Pyx_GOTREF(__pyx_t_11);
  9612. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9613. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9614. #endif
  9615. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_scan_over, __pyx_t_11) < (0)) __PYX_ERR(0, 165, __pyx_L1_error)
  9616. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9617. /* "fontTools/feaLib/lexer.py":171
  9618. * self.pos_ = p
  9619. *
  9620. * def scan_until_(self, stop_at): # <<<<<<<<<<<<<<
  9621. * p = self.pos_
  9622. * while p < self.text_length_ and self.text_[p] not in stop_at:
  9623. */
  9624. __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_, 0, __pyx_mstate_global->__pyx_n_u_Lexer_scan_until, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 171, __pyx_L1_error)
  9625. __Pyx_GOTREF(__pyx_t_11);
  9626. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9627. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9628. #endif
  9629. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_scan_until, __pyx_t_11) < (0)) __PYX_ERR(0, 171, __pyx_L1_error)
  9630. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9631. /* "fontTools/feaLib/lexer.py":177
  9632. * self.pos_ = p
  9633. *
  9634. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  9635. * location = self.location_()
  9636. * tag = tag.strip()
  9637. */
  9638. __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block, 0, __pyx_mstate_global->__pyx_n_u_Lexer_scan_anonymous_block, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 177, __pyx_L1_error)
  9639. __Pyx_GOTREF(__pyx_t_11);
  9640. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9641. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9642. #endif
  9643. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_scan_anonymous_block, __pyx_t_11) < (0)) __PYX_ERR(0, 177, __pyx_L1_error)
  9644. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9645. /* "fontTools/feaLib/lexer.py":13
  9646. *
  9647. *
  9648. * class Lexer(object): # <<<<<<<<<<<<<<
  9649. * NUMBER = "NUMBER"
  9650. * HEXADECIMAL = "HEXADECIMAL"
  9651. */
  9652. __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 13, __pyx_L1_error)
  9653. __Pyx_GOTREF(__pyx_t_11);
  9654. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9655. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9656. #endif
  9657. if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Lexer, __pyx_t_11) < (0)) __PYX_ERR(0, 13, __pyx_L1_error)
  9658. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9659. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  9660. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9661. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9662. /* "fontTools/feaLib/lexer.py":192
  9663. *
  9664. *
  9665. * class IncludingLexer(object): # <<<<<<<<<<<<<<
  9666. * """A Lexer that follows include statements.
  9667. *
  9668. */
  9669. __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[3]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
  9670. __Pyx_GOTREF(__pyx_t_2);
  9671. __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error)
  9672. __Pyx_GOTREF(__pyx_t_4);
  9673. __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_IncludingLexer, __pyx_mstate_global->__pyx_n_u_IncludingLexer, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_kp_u_A_Lexer_that_follows_include_sta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 192, __pyx_L1_error)
  9674. __Pyx_GOTREF(__pyx_t_7);
  9675. if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[3]) {
  9676. if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[3]) < 0))) __PYX_ERR(0, 192, __pyx_L1_error)
  9677. }
  9678. /* "fontTools/feaLib/lexer.py":207
  9679. * """
  9680. *
  9681. * def __init__(self, featurefile, *, includeDir=None): # <<<<<<<<<<<<<<
  9682. * """Initializes an IncludingLexer.
  9683. *
  9684. */
  9685. __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 207, __pyx_L1_error)
  9686. __Pyx_GOTREF(__pyx_t_11);
  9687. if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_includeDir, Py_None) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
  9688. __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer___init, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error)
  9689. __Pyx_GOTREF(__pyx_t_8);
  9690. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9691. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9692. #endif
  9693. __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_8, __pyx_t_11);
  9694. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9695. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_8) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
  9696. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9697. /* "fontTools/feaLib/lexer.py":221
  9698. * self.includeDir = includeDir
  9699. *
  9700. * def __iter__(self): # <<<<<<<<<<<<<<
  9701. * return self
  9702. *
  9703. */
  9704. __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer___iter, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 221, __pyx_L1_error)
  9705. __Pyx_GOTREF(__pyx_t_8);
  9706. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9707. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9708. #endif
  9709. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_iter, __pyx_t_8) < (0)) __PYX_ERR(0, 221, __pyx_L1_error)
  9710. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9711. /* "fontTools/feaLib/lexer.py":224
  9712. * return self
  9713. *
  9714. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  9715. * return self.__next__()
  9716. *
  9717. */
  9718. __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_5next, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer_next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error)
  9719. __Pyx_GOTREF(__pyx_t_8);
  9720. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9721. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9722. #endif
  9723. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next_3, __pyx_t_8) < (0)) __PYX_ERR(0, 224, __pyx_L1_error)
  9724. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9725. /* "fontTools/feaLib/lexer.py":227
  9726. * return self.__next__()
  9727. *
  9728. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  9729. * while self.lexers_:
  9730. * lexer = self.lexers_[-1]
  9731. */
  9732. __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer___next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 227, __pyx_L1_error)
  9733. __Pyx_GOTREF(__pyx_t_8);
  9734. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9735. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9736. #endif
  9737. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_8) < (0)) __PYX_ERR(0, 227, __pyx_L1_error)
  9738. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9739. /* "fontTools/feaLib/lexer.py":266
  9740. * raise StopIteration()
  9741. *
  9742. * @staticmethod # <<<<<<<<<<<<<<
  9743. * def make_lexer_(file_or_path):
  9744. * if hasattr(file_or_path, "read"):
  9745. */
  9746. __pyx_t_11 = NULL;
  9747. __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_IncludingLexer_make_lexer, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 266, __pyx_L1_error)
  9748. __Pyx_GOTREF(__pyx_t_9);
  9749. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9750. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  9751. #endif
  9752. __pyx_t_12 = 1;
  9753. {
  9754. PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
  9755. __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
  9756. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  9757. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  9758. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 266, __pyx_L1_error)
  9759. __Pyx_GOTREF(__pyx_t_8);
  9760. }
  9761. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_make_lexer, __pyx_t_8) < (0)) __PYX_ERR(0, 266, __pyx_L1_error)
  9762. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9763. /* "fontTools/feaLib/lexer.py":279
  9764. * return Lexer(data, filename)
  9765. *
  9766. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  9767. * return self.lexers_[-1].scan_anonymous_block(tag)
  9768. *
  9769. */
  9770. __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block, 0, __pyx_mstate_global->__pyx_n_u_IncludingLexer_scan_anonymous_bl, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 279, __pyx_L1_error)
  9771. __Pyx_GOTREF(__pyx_t_8);
  9772. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9773. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9774. #endif
  9775. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_scan_anonymous_block, __pyx_t_8) < (0)) __PYX_ERR(0, 279, __pyx_L1_error)
  9776. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9777. /* "fontTools/feaLib/lexer.py":192
  9778. *
  9779. *
  9780. * class IncludingLexer(object): # <<<<<<<<<<<<<<
  9781. * """A Lexer that follows include statements.
  9782. *
  9783. */
  9784. __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_IncludingLexer, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 192, __pyx_L1_error)
  9785. __Pyx_GOTREF(__pyx_t_8);
  9786. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9787. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9788. #endif
  9789. if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_IncludingLexer, __pyx_t_8) < (0)) __PYX_ERR(0, 192, __pyx_L1_error)
  9790. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9791. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  9792. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9793. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9794. /* "fontTools/feaLib/lexer.py":283
  9795. *
  9796. *
  9797. * class NonIncludingLexer(IncludingLexer): # <<<<<<<<<<<<<<
  9798. * """Lexer that does not follow `include` statements, emits them as-is."""
  9799. *
  9800. */
  9801. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IncludingLexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
  9802. __Pyx_GOTREF(__pyx_t_2);
  9803. __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
  9804. __Pyx_GOTREF(__pyx_t_4);
  9805. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9806. __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
  9807. __Pyx_GOTREF(__pyx_t_2);
  9808. __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L1_error)
  9809. __Pyx_GOTREF(__pyx_t_7);
  9810. __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_NonIncludingLexer, __pyx_mstate_global->__pyx_n_u_NonIncludingLexer, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_kp_u_Lexer_that_does_not_follow_inclu); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __pyx_L1_error)
  9811. __Pyx_GOTREF(__pyx_t_8);
  9812. if (__pyx_t_2 != __pyx_t_4) {
  9813. if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 283, __pyx_L1_error)
  9814. }
  9815. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9816. /* "fontTools/feaLib/lexer.py":286
  9817. * """Lexer that does not follow `include` statements, emits them as-is."""
  9818. *
  9819. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  9820. * return next(self.lexers_[0])
  9821. */
  9822. __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__, 0, __pyx_mstate_global->__pyx_n_u_NonIncludingLexer___next, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_feaLib_lexer, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L1_error)
  9823. __Pyx_GOTREF(__pyx_t_4);
  9824. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9825. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  9826. #endif
  9827. if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_4) < (0)) __PYX_ERR(0, 286, __pyx_L1_error)
  9828. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9829. /* "fontTools/feaLib/lexer.py":283
  9830. *
  9831. *
  9832. * class NonIncludingLexer(IncludingLexer): # <<<<<<<<<<<<<<
  9833. * """Lexer that does not follow `include` statements, emits them as-is."""
  9834. *
  9835. */
  9836. __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NonIncludingLexer, __pyx_t_2, __pyx_t_8, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
  9837. __Pyx_GOTREF(__pyx_t_4);
  9838. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9839. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  9840. #endif
  9841. if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NonIncludingLexer, __pyx_t_4) < (0)) __PYX_ERR(0, 283, __pyx_L1_error)
  9842. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9843. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9844. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  9845. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9846. /* "fontTools/feaLib/lexer.py":1
  9847. * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound # <<<<<<<<<<<<<<
  9848. * from fontTools.feaLib.location import FeatureLibLocation
  9849. * import re
  9850. */
  9851. __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  9852. __Pyx_GOTREF(__pyx_t_2);
  9853. if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9854. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9855. /*--- Wrapped vars code ---*/
  9856. goto __pyx_L0;
  9857. __pyx_L1_error:;
  9858. __Pyx_XDECREF(__pyx_t_2);
  9859. __Pyx_XDECREF(__pyx_t_4);
  9860. __Pyx_XDECREF(__pyx_t_7);
  9861. __Pyx_XDECREF(__pyx_t_8);
  9862. __Pyx_XDECREF(__pyx_t_9);
  9863. __Pyx_XDECREF(__pyx_t_10);
  9864. __Pyx_XDECREF(__pyx_t_11);
  9865. if (__pyx_m) {
  9866. if (__pyx_mstate->__pyx_d && stringtab_initialized) {
  9867. __Pyx_AddTraceback("init fontTools.feaLib.lexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9868. }
  9869. #if !CYTHON_USE_MODULE_STATE
  9870. Py_CLEAR(__pyx_m);
  9871. #else
  9872. Py_DECREF(__pyx_m);
  9873. if (pystate_addmodule_run) {
  9874. PyObject *tp, *value, *tb;
  9875. PyErr_Fetch(&tp, &value, &tb);
  9876. PyState_RemoveModule(&__pyx_moduledef);
  9877. PyErr_Restore(tp, value, tb);
  9878. }
  9879. #endif
  9880. } else if (!PyErr_Occurred()) {
  9881. PyErr_SetString(PyExc_ImportError, "init fontTools.feaLib.lexer");
  9882. }
  9883. __pyx_L0:;
  9884. __Pyx_RefNannyFinishContext();
  9885. #if CYTHON_PEP489_MULTI_PHASE_INIT
  9886. return (__pyx_m != NULL) ? 0 : -1;
  9887. #else
  9888. return __pyx_m;
  9889. #endif
  9890. }
  9891. /* #### Code section: pystring_table ### */
  9892. /* #### Code section: cached_builtins ### */
  9893. static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  9894. CYTHON_UNUSED_VAR(__pyx_mstate);
  9895. __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 13, __pyx_L1_error)
  9896. __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 266, __pyx_L1_error)
  9897. __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_open); if (!__pyx_builtin_open) __PYX_ERR(0, 272, __pyx_L1_error)
  9898. /* Cached unbound methods */
  9899. __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  9900. __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  9901. __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  9902. __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  9903. __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  9904. __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  9905. __pyx_mstate->__pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type;
  9906. __pyx_mstate->__pyx_umethod_PyList_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  9907. return 0;
  9908. __pyx_L1_error:;
  9909. return -1;
  9910. }
  9911. /* #### Code section: cached_constants ### */
  9912. static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  9913. __Pyx_RefNannyDeclarations
  9914. CYTHON_UNUSED_VAR(__pyx_mstate);
  9915. __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
  9916. /* "fontTools/feaLib/lexer.py":13
  9917. *
  9918. *
  9919. * class Lexer(object): # <<<<<<<<<<<<<<
  9920. * NUMBER = "NUMBER"
  9921. * HEXADECIMAL = "HEXADECIMAL"
  9922. */
  9923. __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 13, __pyx_L1_error)
  9924. __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  9925. __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);
  9926. __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 13, __pyx_L1_error)
  9927. __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  9928. __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);
  9929. /* "fontTools/feaLib/lexer.py":192
  9930. *
  9931. *
  9932. * class IncludingLexer(object): # <<<<<<<<<<<<<<
  9933. * """A Lexer that follows include statements.
  9934. *
  9935. */
  9936. __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 192, __pyx_L1_error)
  9937. __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  9938. __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);
  9939. __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 192, __pyx_L1_error)
  9940. __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  9941. __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);
  9942. #if CYTHON_IMMORTAL_CONSTANTS
  9943. {
  9944. PyObject **table = __pyx_mstate->__pyx_tuple;
  9945. for (Py_ssize_t i=0; i<4; ++i) {
  9946. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  9947. Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
  9948. #else
  9949. Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
  9950. #endif
  9951. }
  9952. }
  9953. #endif
  9954. __Pyx_RefNannyFinishContext();
  9955. return 0;
  9956. __pyx_L1_error:;
  9957. __Pyx_RefNannyFinishContext();
  9958. return -1;
  9959. }
  9960. /* #### Code section: init_constants ### */
  9961. static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  9962. CYTHON_UNUSED_VAR(__pyx_mstate);
  9963. {
  9964. const struct { const unsigned int length: 11; } index[] = {{1},{1},{10},{22},{415},{18},{28},{29},{18},{25},{45},{32},{79},{66},{29},{27},{24},{1},{4},{0},{2},{2},{15},{9},{10},{1},{1},{1},{1},{1},{1},{1},{1},{1},{10},{4},{4},{9},{52},{15},{11},{14},{12},{23},{16},{13},{12},{16},{3},{7},{8},{5},{15},{18},{10},{11},{19},{14},{23},{23},{23},{26},{19},{35},{5},{14},{14},{14},{15},{10},{11},{26},{16},{17},{14},{12},{4},{7},{6},{6},{7},{17},{26},{5},{20},{13},{6},{6},{6},{18},{17},{18},{5},{7},{6},{7},{8},{7},{4},{7},{7},{8},{3},{11},{15},{12},{8},{9},{7},{14},{11},{10},{22},{22},{25},{8},{6},{10},{7},{10},{8},{13},{5},{5},{8},{4},{5},{7},{5},{5},{11},{9},{8},{8},{11},{5},{8},{13},{5},{10},{15},{4},{8},{8},{5},{4},{9},{6},{4},{2},{1},{4},{3},{4},{11},{12},{1},{2},{4},{6},{20},{10},{11},{4},{12},{10},{5},{5},{12},{7},{6},{5},{3},{3},{8},{4},{5},{12},{5},{10},{5},{6},{2},{140},{91},{46},{46},{1121},{58},{41},{283},{38},{7},{17},{20},{11},{45}};
  9965. #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2542 bytes) */
  9966. const char* const cstring = "BZh91AY&SY\256SP\342\000\000S\177\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\373@@@@@@@@@@@@@\000@\000`\010\371\276\332\353\335\336\3331\321\333\327z5 \241vd\363\320\017\257}\tD$LJ<\320\247\250\007\215O$\323)\3711\220\"\236\232\236\223\364&\247\261LjM\351C\305?R\036\202oR~\2204\217\nyM\212z&\324\022\210\023&\204\302\032&\022x\240\364CQ0!\246\203L\321\003L\000\230F\001\003!\241\210\364OP\006 \323S\024\332Ji\030\324\003\322\036\240\000\r\003M\000\000\000\000\000\0004\000\000\r4\3654d\032dB \t<\244\375&\023\024\363A\023\010\r\014\200\304\030\001\030#F\214&\230\214\230\2320\200\315G\244\025SL\206\0040\312a4\014\010\364&\t\204\304\006F\002a4\304a\030\000&#\000\230\000L\022\232\204\024\332A\r=OA\251\240d\r=L\206i4h\003@\000\003C\023#M\014\021\264#\322\000\006\232e)wm\023\262\t\304A\372\030\242\344\277b\343\343\006\223\212\261\246\217*-A\377\252\252\005\004*\t\273\254\006\310\307L\202A\010\tD$ \001\322\252R\352\366\351\020;\013\316\016\333\325\233\377l`\336\337p\337\337-Fd\266\244\001\250\206\\\020\0212\252*\246q\350\210\364\3140\334fv\235o\001\242\237+\340\204\t\222A(\352\341\211\310d&pA\206j2]\250`\271\204\014@\315Z5\213\rT\210\r\245\233 %-\027@JCI\213\232\310#\336B\252&\224+'\022SJo\262\225Q9\251\230\2114\234\346RY\327\2720B\002\330QD\024p\371;\330\234U\031 Q\232B\216\202*\276y\274@\222\024*\301\226,\346\265^\306@\272\242\006\"\004\217v\370js2N\316<\245\377j\3517\226\361\320\231\304E\325TXi\212\\\260>5e\223~c\344\355\365\326\273\022\010iL\327\030\022\304\262\036\010\372\0265V-\314\241h\275t\245\340@|\315\200q\202=\335\r=\263\r\263\251\t\270\335\031\331\275\277\020=j\216-(\247\314\230\341\3008\253\252;\241\274\341E/\337\345\372\376M)\302\306}\316\326oc\312~\030\276\352\307`\3061\036\026<\356\366\207]\342B\344\253\365\240\354l\336l\301\305\023\237\277\004\255\207\266\2636\331\205\272\367\353\201\214\211G\221\346OI\203\305\326\204\013\nd\326\264g\335s\236F\\\3128\031\301sx\367\337p\243\204Z\373\261\344!Cg=%.F\350)tM#Z\220\022e>\255\236\301\014\207\262I""\241\022o\366\207\277+td8\243\272\304 G\276\036\376!Stq\201\233\033\027A\370q\257\260_\216\353\330\336\010\316z\\Z\363\355{1\364\276ZM[Q\215gU\003\336a\374v-A\255)\026\257\327|I\300\344\311\004!\004\020\272}\304|r\310\341\242ts\275\304u\244\003N\307`i\301\366 \326U~\023\265\010\311-<\035\"\2310L\230&\030&{L\313\244f\265\304\3249\306qp\205\035\2661~\337\374\277\343T\274\022\364\013\3576\353\273C9E\365\235\336~JI'K\372n=Z\264q\215\251\035 u\217\236=\276\347\004\306V\2348O\224\335\224n\363~\221\366\036+\371.4)\311\251\270\006\007w\257'\316\364\344h\342\235\007?]sq\300\353\270\033\2703\260\033$\222A\300V\232H\361\233\222u\006\266\035-\014;Q\250?\221\262\033r\3303\257\211N|\356\025f\3060\214\234\345\223\3456\217\313\306\352\272\332\211\024Tj6\234\366*;U5`d\360\246x}\216\315\330\351^\310;\210\324k\373-\203\\\260m\017\357\3735\232\316\346\326(\035IG\016X@m\352\346u\267`_y\2566\353\327R\253\253W\025\371\035\345\341\315}\211\201\222\275\242\231\355\360\260\"!\020\211\204\341\261p\360Odv\023=\370e\3769J\371;2\257\255\364\\\235\366\331\250\3531{X]\350\237\032s\351U\331\347\014x\226VI\020A\255\275\204\233K\034u\347J2\2253K\300M\024 \2217oi\224\350\306\034\256X6E\"Bj\342\025\347*\221\231\260\016\335\246\235hJ4\005#\251\022\n\220\002\020sGP&X9\000\274\010\200o\241\006Evf\213\035\316\276\273\261\367Y9\370\223b\302,\3010\372~\225\255\021\032\211\003\"C=\246\002\322Bw\241\370\036\221b\314\221\245\00534\2015p\324%\362\363i\336_\025\007!r\223\207\362\335\201I\232~\031@\270\025\250\336K\t\020\317-\210\212\3216\033%9\232+\246)\005\200\310j_\036\212\004\t\256\345\215to\205\010\224\252V\265\333\211\230\312\360\257S\002\365i~d\034\246\271\253*\203?~\014@\241\231/c\032\305\272\353\256\304\321yqv\336R\363\r\305\t\366c\255[D\262\320\217\223\316\2200Q'L=\014\300T\222\021\236\006\215\002@\265\313\271\245\233bv\r\326k\226\0063#*\22671\326E\241;f\234\212\302WTkkZ\310\265\325\217r\321\305\020+c\002\246\"RU\230\032\032\t\351^lU\027\263^1dUe%r\331\306\031\211f,,A\032\3045d\223\265\271\357>\210\250""\3447O\025\370\345\235\224\006\311pq,\273\242C\3671X\260\237\035Z\270\361\225\314B\n@\217\007\313d\nd\234\332\214\3354Tb\364(\214SZ\367\317gIj\276]\216\236\344Lp\217\227\265\325U\227]\004Q.T#\220\323\247\200\320\344\370\252m\tIeh\017VI7\344l\021\026\322\005\264\375yW7\353J\346\350&CK\336\365Ncm\035N[\3031\2257\267f\313\341H\364\032\035f\210\252\204\324\315\233{\216\246~IM\363\301\233\013\216hR=3\004LJ\002\346\210\0244\257G\220\271\262\023\251p\271\232\246\"@V\324\3633\354\311\003\264\026\303F\226\267Zo9\226@\262\266\310\204\350L\n\355\033&^\213\031P[\266\203k\020X\017\33585^\207\215\202M.\324\302\330\320\202*\203$\024\272\267#\025\t\214\007\2647\022b\241\033\210p\352\340\200\372\263\342\310Y\276i\234\254#\323ZN\300\250E\316\200\233C\235\t&\366\321~|c'E\255\"5o$W\177uf\0012\262&\334P\300\306\372\031E\233'\320\210\316\323\245'!]\006H5[\253\\I\317N\310\351\276\360\3467\206\365kE\007\244K\341\266F\305\244\314\003\226dn\2279w\340\300D\205\0339\230\031\350\t^\311v\224A\242H\231\021L\265*\016#+<\022\002\343\274\3117\311dllyL`\327h\033\305_\264Z\316\013b\313pc\022\325\3136V\2246l\330b\275\013\213\351bh\356\344\353\273\252+\276&\354\"\344-\266\212\341\024]okz'{\243N\355|\275(\341\205\005\312\301\254m\350\340^6\261H \314\212Z@\325\202A\223\202(\315D\016\253\246\2722%\200#\207\004\232D1\006\264.\t\004\314\344\n\255\3144\352\n\325\222^\035\256Q\311\312O]\213\0105*2\201\300L\311\230\372\306\356\021\260@\344]\014\251\270\273-\205\031]\210\214\030\033|\226\016\276\360\272\334\266\347B\326\310\375\232i\223\254_\001\310\353y\344\210'\020U\027:\210\235^&\315\266\353IhF\233\362\020\222\\>\264r\377\257\363\222S\352xc:\267\265G\0363\\\263\362\267'\215\3266\033\322\200p z\324K\236\3218\001/|\254CL\246x\020\0021qf,\233\217\364'\270\261\220\177|\240\344\231!Q2\313\372N\325\2130\032R$\001\330l\005\243\271\206\256\326\241\254\226p\230\305\362\243?t8U$\261\200\361n\324\242\354\307R\030\234\200\360\251\353\336\354t\001\222\274\260\234\214\351\036xgm\024T\r\277\316\\\273\206p\356B\317\2434\232""\250\026\373\217\236\376(l\242^\"\321b\257e\037\244\220\035T\332\321\nC\251\254\035\337\370\244T\250+9\332\256L\300\321\374YB\205*\354\362f\032'+\223\253\314\317nvnkL\3665nQ\225\350\332Z`l+n\302\317A\277\225j\325\023\202E\321\235\307\025_#\347#7\246\370\251\333#S\026\234\360}w\360\007\374\215zi\257\302q\376\014o<\311g\235\226\371\251\014\241F\324\333S\230P|,\222\322q\335'\320E\202~^\264\343]\232\352\324v]j\323\306\220W\177V\267\035.k\003\013\010\301t\340\351\334c)M\037W\366\374puX\204\233\352kS\341\202\211\373\026'?:\264\303r\277\362\257M\256/\361\226\331\276\177\362`ma\3142%\213\225\221\333\310\324MBG\204\\\253\245Z\244\214d\355g\350W\305\277\354`a\200\005\027X`4\252\022q4\314\000\202\020\002\010$\207\310~<@\037xfa \351@\304'2\201\325\024\373I\207y'\332-\307\334\332\322\253UC\305\236x|\327\244\345\204\257\032*h*\264`\345z\236\233\320\325\213\n\023\301y\202\301'H\316$\222\211R\217\024\004\274\322\242y\227\005\321\225\0048\004\024`\342N\322\231bH\006Bj\013\352V\010\235\270f\2019(V\303w\204\242TyJ\261\000\253\035\004\344)R%\377\213\271\"\234(HW)\250q\000";
  9967. PyObject *data = __Pyx_DecompressString(cstring, 2542, 2);
  9968. if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
  9969. const char* const bytes = __Pyx_PyBytes_AsString(data);
  9970. #if !CYTHON_ASSUME_SAFE_MACROS
  9971. if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
  9972. #endif
  9973. #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2392 bytes) */
  9974. const char* const cstring = "x\332\275\026K[\023\311vP\274\002\023\225H@t\306\231\216\240\210\222h\024Q\300\353\330$\001r\r\t!\301\267\323\323twHK\247;\351\252F\320O?\227,{Y\313^\366\262\227Yf\3112\313,\371\t\376\204{\252:\017^\363\315]\335|I\325\251S\347\375\252\014\334\277\037{\360p\372\321\314\343'\263]\210_\210'\222\213\342\206$+E\236K+;\212\311\341\222\210\271\242\241i\306'\304\251\272\244Y\262\302!,b\245\254\350\030E\007\0068\370\024J\n\227\255(za\267\242pEE\304\226\t\273\252\001iE\221\324\242*\211X5t\237\021\371BeK\341\260\301\330K*\302\206\tD\032g*\"2t4\005\200\006<\333\n\247\226+\206\211\021\207J\206\245\311\334\206\002W\310\320\266\025\031\354\001Q*b2\014SV\3149\337\234X\224K\025\341\n\324\033\226)\201)\206\2169\025q\353\213Y\200\315\262\210\247\350\265\336\325\202\rF\017\004\023\276<\3700.Y5\025\t\254\333e\330\007\321\023,\330\250D4e[\321:\341\241\2163\352\207'\251+\242\251P[\016\2232\332W\ng\350\332.\207\254\n\365\227\213q\267\267U\261M\230P\315IN\324e0\200Q\377\371\216\217\274\025#\237\205\373\221\331\350\373\310\207\273\343\311\035\2104\206\240LLNpb\021C\356X\002t\261\254t\357nO@\000!\002\312)\227'1\233\332n\245\304I\232\210\32019_\271\233h~\2029\245\230eU\207\264\202y\206\276[6,\304mh\206\264\325%\276q\214\020aS\3257\227\216\tG\\\331B\230\223 \373P\016\234Q\3444\005\003\023\324\202\254n\252\030vK\207\034#\t\314\237\342*\212\251\0322\244\235+\201\034E?T\256\262\001\302t\243]\267\334_\255 \376u\250p\2478\245\0142iN\312\234\210\"*\212\246\325\215{4\345\005\303\320\320=\250b\212\320\250\330he\027\220\\Y\324w!\241\222e\"V\230\276T\264\256+mW\245\222h\212\000\231s\334M\363\306\273\013\003\037\270\376\013\003S\363s\221\273\023_\276\276\373\360\364\331\355\311\177\013w\357\314E\377\374\026~/D\001\002\340^\344\217\013c\267'\337?\217F\236\266\232\007=\373\372\036\335\201\357\274\205\213\221'\021\244n\372\335\271\264\234\372\317\213\364J&\273\232[\313\027\326_\276z\375\346\255\337\261\233%\365\343\226V\326\215J\325D\330\332\376\264\263\373\231\317d3oV\262\353ya!\235\215\277\210/\363kB\"""\265\224*\010\014\\N\276>tJ'\013\205\344\232\017g\370\225\244\020\317f\n\251\314:_He3\207\320\371\002\277\326b\311$_\245S\231\244\177\310\277YY\310\246}\370\325r\252\220\314\257\362q\270K%\342\331\225\225d\246\260\230J'\251\204\305t\226/,\372\216B\214\223\246i\230\335c\332\360\207\305R\372\315\352r<\315\347\363`&\237H\306S+|:\345\307\\\006\362\214\201\027\r\250\010\037\005\005\305*\340\350)*\010\252\256bA8\211\206$\235\202\206T\236\244.\213[\212\300\n\341\370\r%?\206B\222\250\013\235V\020X+\260\233\243\006\035\265\343\250z\377\244\265\342 tUu!\341\037\224\3717\3066\010?t\266t\254j\302J6\221\024\332\271\360O\231\354\032\004\227\245\267\225R\037\223Y_YH\256\371k>c\350G}=\201\350x\220\215\027@\234\260\272\273\003\277\204*a!\003\3705\245\270\226\024\272y\315\027\326R\231%\277l\304\n<\037\262\210vuI5\242\320\342\206\205U]A\202\300&\204\260\251`\010U\231\036\001\rA\0240t\232\262!J[\222f \205.`\206dhVY\227\214r\005\206\0314\252@;\022\366\212\210K\262\210E\230\346t\326\010\202lH\202\240\000%5^1\315V\337\321\031x\010\244lt\027\014Sh\303\224\277\275\013\02406>\026\331\241\2351\377\204\215-\245\r\302\263\330\231,Q\177\262D\025Z\366'\260\254\314Nb\333\265 \024-\035\014\207hH\237d6\236YxZ\243\250\373X\264\313LP\221\320\t\246\212\304\rD\243\210\332u\367\321Pu\246\221-H\320T\030\212,\300l\201qi\342\216[]@(\213*[;}\001/\252T*\213;\250\242Q\265e\005\213~\336\204\262!C\270\351fi\024\020\312\246\001\201\207'\200&\327O\206\277\266\213\207\255ta\000M D\230\276\301P!\006\252\320<T\014x$\201]\250\230\n}Q)s\325\0225_\220i*\3607B6\225M\030\314\247\265H\2679\016\265\005R\264\242\000+n\231\003\020LU\321\3220s\212\305\202\276\037\252\004\336\225\014\031\376\262T\004\021\373\217\031]+\310\332\300\342\246 \300_\034L\327\035L\177\014\2000\351\233\270\344\027\005[XQl\213\232*\303b)h\347\365w\276\3317dO\333\237\235`\263\357\342\236d\217\330\325f_`/Mz\3100\021)\370\302\256\222s$\327\354\013\332\243\3442\231&&\245\035\264\317\330\267\200h\324\t9/\335\230\233\360\006j\223\365X\263\357\347\275\207{""\342\336'[\"\301f\340\262}\017\210\007\237\327\317\324o\326\253\007 -e\347}\321\244J\205\234k\014O8\226\313\273\005/\370\235?\000\356\307v\330~\006L\201a\373-\371\346\346\016\002#\366G\347\242+6\001\220I\230\3149\353\356\244\007\232.\201\026\205\304\250\003\217\001?\353,\273<\325\037k\006\206\354\031P\017\024\226\315\333/I\214\272\031\330K\330=\324\311\r0}\334\326\235\204\333\353.za\357\241'\325@_\320\016R\242e\233\377\007\352\315Z\356$u'J\235h\016\332\2756Om\300v\214\236\316\3321\233\3317c\017\001\000\261\211\320\030P\372*\001U!;\001\221\031\201\360\2168\333\356\232kz\227\275\371\232Hc2k\307!-\201A\273\237\006u\320\036 a\272]\"\330\001gCv\222\\sf\334`\363(\3510\371\350\236u\347\274\334\377\312\022 <Yw\302\355\353i\247\352\366y\275\336r\215%f\232%\225\026E\340\322\336.9\013\221\037\034\261\r'\327\270\265T\357\360\203\262+6&1\222p\006\334q\267\350-x[\365\340I\226\305\272x\310\241~_.\325\373\013D\272\307\035\001\367C^\2416R3\353\241z\256\035\004\213\211\035s\327\275\360!\356\237A]\222\226\014\345\037!\310\t3\333\377\345n\200\365\211Z_\375\\=\327<%\214\035\276\253$Dr\244\350,82\330\314\034DP\206OY\251\267-\216Cu\007h6\037\221\213N\021J6\327\272j\206\206\017\340\313\264_w40\255c-\177\272\225\211V\343\344\250\300m\332\021\315\301\220\235\352\006\377\212s\336\251\266\305`\350\271\317\356\220\313\377\235\313\2779\310\r\273\323n\325\353\253\365\326\226\353\311\375\340q\336\244w\222m\324\031rx\247\340\006\335\333\336\270W\252\311\365\343\226w\310\251\3333d\210,:c\214a\334\335\364\3625\260z\024\212\376\215#1\224\350\356x\270\366\244\376h\277\247\315\314\237\242t\330\021\035\014\023c\031R\323_\377;K\217\373\371\177\260\340p\272(\341U\347\216?P\216\327M\253\316}\223\350D\374\006\343+\344\275\254\305j\211\372\371:\332\017\373\351\314\035\014^e\367U\326\0132L\217\231\332\345\332t\r\327g\366/\357\307\332\306\227\\\361\240]e/\000\rS\307 \271\306o\263@<W\317\371\003f\205\260\201\223\262s\255\271C\267,\035\177md#\360+\211\203\256\036\037\265N\302\2243h\207`\002> \005\347:\364\003""\334]j\\\n;Ag\334\331\362\206\274L}\274^\332\027)\341\305=\331\016\373\325\331\347\234\241\225x\2419\370+Yr\346\231\345\261\346P\210\272\265\014-\010ag)\371B\306\240fo\261\3118\006s\006\310W\032\223s\265\2335\253\3167\007\207\354y\262\t\323:\334\014]#\367\334`\343\316\363z\317\217\276\237\202!\373\001\230w\313\351\201\234\204~!\261\203\020\235\031O\235O\320{\2437\3004\261y\365z\343z\024r\234\243\210\033N\322\035\365\202P\245\342\217\300OW\307\000\261\344\306(\353\003\320\177\023z\275\037\252\006\364=\264E\0204\347\344\335\236\216\316\024t\003\230\033\032\005\267\240\253\300\330t\255\007\006\376\340\225\306\225)Hp\350Z\343Z\304\315\271\345\306\374jc\025r6J\002L<D\244\354?\035\375\315\300(9O\276\260\201\306w=\0177\333\304\337\331\244\257~o\017|\026Dp\257\215x\002\226\2565~\237\366x/\327\306\315\022\276\321;\341T\177\204~\352\277\300\036\220^\222\206\331\027d\271\374\035&\365\023(\322\005\227\275\302\031\022\376/\375[\204D";
  9975. PyObject *data = __Pyx_DecompressString(cstring, 2392, 1);
  9976. if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
  9977. const char* const bytes = __Pyx_PyBytes_AsString(data);
  9978. #if !CYTHON_ASSUME_SAFE_MACROS
  9979. if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
  9980. #endif
  9981. #else /* compression: none (4417 bytes) */
  9982. const char* const bytes = "\n001234567890123456789ABCDEFabcdefA Lexer that follows include statements.\n\n The OpenType feature file specification states that due to\n historical reasons, relative imports should be resolved in this\n order:\n\n 1. If the source font is UFO format, then relative to the UFO's\n font directory\n 2. relative to the top-level include file\n 3. relative to the parent include file\n\n We only support 1 (via includeDir) and 2.\n ^[A-Za-z_0-9.\\-]+$Expected ')' after file nameExpected '(' before file nameExpected file nameExpected glyph class nameExpected '} %s;' to terminate anonymous blockExpected '\"' to terminate stringGlyph class names must consist of letters, digits, underscore, period or hyphenLexer that does not follow `include` statements, emits them as-is.Lib/fontTools/feaLib/lexer.pyToo many recursive includesUnexpected character: %r\"[\r\n] \t\r\n,;:-+'{}[]<>()=_+*:.^~!\\_.+*:^~!/-?\r#()\\@.-<features>}\\s*\\s*;utf-8-sigABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzANONYMOUS_BLOCKCHAR_DIGIT_CHAR_HEXDIGIT_CHAR_LETTER_CHAR_NAME_CONTINUATION_CHAR_NAME_START_CHAR_NEWLINE_CHAR_SYMBOL_CHAR_WHITESPACE_CIDCOMMENTFILENAMEFLOATFeatureLibErrorFeatureLibLocationGLYPHCLASSHEXADECIMALIncludedFeaNotFoundIncludingLexerIncludingLexer.__init__IncludingLexer.__iter__IncludingLexer.__next__IncludingLexer.make_lexer_IncludingLexer.nextIncludingLexer.scan_anonymous_blockLexerLexer.__init__Lexer.__iter__Lexer.__next__Lexer.location_Lexer.nextLexer.next_Lexer.scan_anonymous_blockLexer.scan_over_Lexer.scan_until_MODE_FILENAME_MODE_NORMAL_NAMENEWLINENORMALNUMBERNUMBERSNonIncludingLexerNonIncludingLexer.__next__OCTAL__Pyx_PyDict_NextRefRE_GLYPHCLASSSTRINGSYMBOLappendasyncio.coroutines__class_getitem__cline_in_tracebackcloseclosingcolumncompilecur_charcurpathdatadirname__doc__encodingerrfeaturefilefeaturefilepathfile_or_pathfilenamefilename_fileobjfname_locationfname_tokenfname_typefontTools.feaLib.errorfontTools.feaLib.lexerfontTools.feaLib.locati""on__func__getcwdglyphclassincludeincludeDir__init___is_coroutineisabsitems__iter__joinlexerlexers_limitline_line_start_location_location__main__make_lexer_matchmaxsplit__metaclass__mode___module____mro_entries__name__name____next__next_nextnext_charobjectopenosppathpoppos___prepare____qualname__rrereadregexpscan_anonymous_blockscan_over_scan_until_self__set_name__setdefaultsplitstartstaticmethodstop_atstringstripsubtag__test__texttext_text_length_tokentoken_typevalidvaluesxX\200A\330\010\023\2204\220z\240\021\330\010\016\210c\220\026\220q\330\010\014\210L\230\001\230\025\230a\330\010\014\210K\220q\230\005\230Q\330\010\021\220\030\230\022\2304\230r\240\021\330\010\020\220\002\220&\230\001\230\030\240\024\240V\2501\250D\260\n\270)\3001\330\010\013\2103\210a\210w\220c\230\021\330\014\022\220/\240\021\330\020@\300\002\300%\300q\340\010\014\210I\220S\230\001\230\025\230a\230q\330\010\020\220\005\320\025'\240u\250A\250T\260\021\200A\340\010\013\2107\220!\220>\240\021\330\014\025\220Z\230~\250Q\340\014\026\220j\240\016\250a\330\014\026\220d\230!\230:\240U\250)\2601\330\010\017\210w\220e\2301\330\010\023\2207\230!\2309\240H\250A\330\010\013\2101\330\014\023\2206\230\021\330\010\017\210u\220A\220V\2301\200A\330\010\014\210D\220\001\330\010\016\210b\220\002\220$\220n\240D\250\004\250F\260!\2603\260c\270\021\330\014\021\220\021\330\010\014\210H\220A\200A\330\010\014\210D\220\001\330\010\016\210b\220\002\220$\220n\240D\250\004\250F\260!\2603\260g\270Q\330\014\021\220\021\330\010\014\210H\220A\200A\330\010\014\210K\220q\230\005\230Q\330\010\023\2204\220z\240\021\330\010\020\220\004\220A\330\010\017\210t\2201\330\010\020\220\003\2201\220A\330\010\013\2106\220\023\220A\330\014\022\220-\230q\330\010\023\2204\220q\230\001\330\010\024\220D\230\001\230\026\230r\240\026\240v\250R\250r\260\022\260;\270a\340\010\013\2109\220C\220q\330\014\020\220\t\230\021\330\014\020\220\n\230!\330\014\020\220\017\230t\2401\330\014\024\220E\230\032\2406\250\021\330\010\013\2109\220C\220q\330\014\020""\220\t\230\025\230j\250\003\250:\260Q\330\014\020\220\n\230!\330\014\020\220\017\230t\2401\330\014\024\220E\230\032\2406\250\021\330\010\013\2109\220C\220q\330\014\020\220\014\230A\230U\240!\330\014\024\220E\230\032\2404\240q\250\010\260\004\260H\270A\340\010\013\2104\210w\220c\230\025\230a\330\014\017\210y\230\003\2301\330\020\026\220o\240Q\320&G\300q\330\014\020\220\014\230A\230Q\330\014\027\220t\2301\230D\240\n\250$\250f\260B\260k\300\021\330\014\017\210y\230\003\2301\330\020\026\220o\240Q\320&F\300a\330\014\020\220\t\230\021\330\014\020\220\t\230\025\230a\330\014\024\220E\230\033\240D\250\001\250\026\250r\260\024\260T\270\026\270r\300\024\300Q\340\010\013\2109\220C\220u\230D\240\n\250#\250U\260!\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\026\230s\240!\2404\240q\250\006\250b\260\004\260D\270\010\300\005\300Q\330\010\013\2109\220C\220q\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\031\230\024\230Q\230f\240B\240d\250$\250a\330\014\017\210s\220!\220<\230r\240\021\330\020\026\220o\240Q\320&C\3001\330\014\017\210t\2205\230\016\240f\250A\250Q\330\020\026\220o\240Q\330\024\025\340\024\025\340\014\024\220E\230\035\240l\260!\330\010\013\2109\220C\220u\230A\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\024\220D\230\001\230\030\240\024\240Q\330\014\017\210v\220S\230\001\330\020\024\220I\230U\240!\330\014\024\220E\230\027\240\007\240q\330\010\013\2109\220C\220t\2304\230z\250\023\250A\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\036\240s\250!\2504\250q\260\010\270\004\270H\300E\310\021\330\010\013\2109\220C\220t\2304\230z\250\023\250E\260\021\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\030\240\023\240A\240T\250\021\250(\260$\260h\270d\300!\330\010\013\2109\220C\220u\230A\330\014\020\220\013\2301\230E\240\021\330\014\017\210t\2206\230\023\230F\240#\240T\250\021\250$\250g\260S\270\001\330\020\030\230\005\230Y\240c\250\021\250$\250a""\250x\260t\2708\3005\310\001\330\014\020\220\013\2301\230A\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\030\240\025\240a\240t\2501\250H\260D\270\t\300\021\330\010\013\2109\220C\220t\2304\230z\250\023\250E\260\021\330\014\020\220\t\230\021\330\014\020\220\013\2301\230E\240\021\330\014\017\210t\2206\230\023\230F\240#\240T\250\021\250$\250g\260S\270\001\330\020\030\230\005\230Y\240c\250\021\250$\250a\250x\260t\2708\3005\310\001\330\014\020\220\013\2301\230A\330\014\020\220\013\2301\230E\240\021\330\014\024\220E\230\030\240\025\240a\240t\2501\250H\260D\270\t\300\021\330\010\013\2109\220C\220u\230A\330\014\020\220\t\230\021\330\014\024\220E\230\031\240*\250A\330\010\013\2109\220C\220q\330\014\020\220\t\230\021\330\014\020\220\014\230A\230Q\330\014\017\210t\2206\230\022\2304\230~\250T\260\024\260V\2701\270D\300\007\300s\310!\330\020\024\220I\230Q\340\020\031\230\022\2304\230q\240\n\250$\250d\260!\2606\270\022\2704\270t\3006\310\022\3101\330\020\030\230\005\230Y\240h\250a\340\020\026\220o\240Q\320&K\3101\330\010\016\210o\230Q\320\0369\270\022\270:\300Q\200A\330\010\014\210M\230\021\330\010\014\210I\220Q\330\010\014\210H\220A\330\010\014\210O\2301\330\010\014\210I\220Q\330\010\014\320\014\034\230C\230q\240\001\330\010\014\210I\220U\230!\200A\330\010\021\220\024\220V\2302\230T\240\035\250b\260\001\330\010\017\320\017!\240\021\240$\240k\260\023\260N\300$\300h\310a\200A\330\010\016\210d\220!\330\014\024\220D\230\010\240\002\240!\330\014\r\330\020\034\230G\240;\250d\260!\2601\330\023\024\330\020\024\220H\230D\240\001\330\020\021\330\014\017\210{\230#\230U\240&\250\004\250F\260#\260Q\330\020\034\230M\320):\270%\270u\300A\330\020\023\220;\230g\240U\250!\330\024\032\230/\250\021\320*@\300\001\360\010\000\021\024\2202\220U\230&\240\001\240\021\330\024\033\2301\340\024\027\220t\230<\240w\250a\330\030\"\240$\240a\330\031\035\320\035.\250g\260Q\330\030\"\240\"\240E\250\030\260\021\260$\260a\360\014\000\031#\240\"\240G\2501\330\024\033\2302\230U\240%\240q\250\t\260\021""\330\020\023\2203\220a\220t\230:\240S\250\001\330\024\032\230/\250\021\320*I\310\021\330\020\021\330\024\030\230\010\240\007\240q\250\004\250L\270\001\270\021\330\020\027\320\027,\250A\330\024\032\320\032-\250Q\250m\320;P\320PQ\340\020\030\230\014\240G\2501\330\010\016\210m\2301\200A\330\010\t\330\014\030\230\007\230{\250$\250f\260A\330\014\017\210{\230#\230U\240!\330\020\030\230\014\240G\2501\200A\330\010\017\210q\200A\330\010\017\210t\2201\220D\230\010\240\001\240\021\200A\330\010\017\210t\2208\2302\230R\320\0374\260A\260Q\200A\330\010\017\210t\2209\230A\320\004'\240q\360\024\000\t\r\210K\220q\230\004\230L\250\001\250\021\330\010\014\320\014\037\230t\2408\2501\250B\250a\330\010\014\210N\230!";
  9983. PyObject *data = NULL;
  9984. CYTHON_UNUSED_VAR(__Pyx_DecompressString);
  9985. #endif
  9986. PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
  9987. Py_ssize_t pos = 0;
  9988. for (int i = 0; i < 183; i++) {
  9989. Py_ssize_t bytes_length = index[i].length;
  9990. PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
  9991. if (likely(string) && i >= 38) PyUnicode_InternInPlace(&string);
  9992. if (unlikely(!string)) {
  9993. Py_XDECREF(data);
  9994. __PYX_ERR(0, 1, __pyx_L1_error)
  9995. }
  9996. stringtab[i] = string;
  9997. pos += bytes_length;
  9998. }
  9999. for (int i = 183; i < 197; i++) {
  10000. Py_ssize_t bytes_length = index[i].length;
  10001. PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
  10002. stringtab[i] = string;
  10003. pos += bytes_length;
  10004. if (unlikely(!string)) {
  10005. Py_XDECREF(data);
  10006. __PYX_ERR(0, 1, __pyx_L1_error)
  10007. }
  10008. }
  10009. Py_XDECREF(data);
  10010. for (Py_ssize_t i = 0; i < 197; i++) {
  10011. if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
  10012. __PYX_ERR(0, 1, __pyx_L1_error)
  10013. }
  10014. }
  10015. #if CYTHON_IMMORTAL_CONSTANTS
  10016. {
  10017. PyObject **table = stringtab + 183;
  10018. for (Py_ssize_t i=0; i<14; ++i) {
  10019. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10020. Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
  10021. #else
  10022. Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
  10023. #endif
  10024. }
  10025. }
  10026. #endif
  10027. }
  10028. {
  10029. PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
  10030. int8_t const cint_constants_1[] = {0,1,2,8,10,16};
  10031. for (int i = 0; i < 6; i++) {
  10032. numbertab[i] = PyLong_FromLong(cint_constants_1[i - 0]);
  10033. if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
  10034. }
  10035. }
  10036. #if CYTHON_IMMORTAL_CONSTANTS
  10037. {
  10038. PyObject **table = __pyx_mstate->__pyx_number_tab;
  10039. for (Py_ssize_t i=0; i<6; ++i) {
  10040. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10041. Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
  10042. #else
  10043. Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
  10044. #endif
  10045. }
  10046. }
  10047. #endif
  10048. return 0;
  10049. __pyx_L1_error:;
  10050. return -1;
  10051. }
  10052. /* #### Code section: init_codeobjects ### */
  10053. typedef struct {
  10054. unsigned int argcount : 2;
  10055. unsigned int num_posonly_args : 1;
  10056. unsigned int num_kwonly_args : 1;
  10057. unsigned int nlocals : 4;
  10058. unsigned int flags : 10;
  10059. unsigned int first_line : 9;
  10060. } __Pyx_PyCode_New_function_description;
  10061. /* NewCodeObj.proto */
  10062. static PyObject* __Pyx_PyCode_New(
  10063. const __Pyx_PyCode_New_function_description descr,
  10064. PyObject * const *varnames,
  10065. PyObject *filename,
  10066. PyObject *funcname,
  10067. PyObject *line_table,
  10068. PyObject *tuple_dedup_map
  10069. );
  10070. static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  10071. PyObject* tuple_dedup_map = PyDict_New();
  10072. if (unlikely(!tuple_dedup_map)) return -1;
  10073. {
  10074. const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 43};
  10075. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_filename};
  10076. __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_M_IQ_HA_O1_IQ_Cq_IU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  10077. }
  10078. {
  10079. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 52};
  10080. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10081. __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  10082. }
  10083. {
  10084. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 55};
  10085. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10086. __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next_3, __pyx_mstate->__pyx_kp_b_iso88591_A_t9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  10087. }
  10088. {
  10089. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 58};
  10090. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_token_type, __pyx_mstate->__pyx_n_u_token, __pyx_mstate->__pyx_n_u_location_2};
  10091. __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next, __pyx_mstate->__pyx_kp_b_iso88591_A_fA_U_G1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  10092. }
  10093. {
  10094. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 64};
  10095. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column};
  10096. __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_location, __pyx_mstate->__pyx_kp_b_iso88591_A_V2T_b_k_N_ha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  10097. }
  10098. {
  10099. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 68};
  10100. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_location_2, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_limit, __pyx_mstate->__pyx_n_u_cur_char, __pyx_mstate->__pyx_n_u_next_char, __pyx_mstate->__pyx_n_u_glyphclass, __pyx_mstate->__pyx_n_u_token, __pyx_mstate->__pyx_n_u_string};
  10101. __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next_2, __pyx_mstate->__pyx_kp_b_iso88591_A_Kq_Q_4z_A_t1_1A_6_A_q_4q_D_r_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  10102. }
  10103. {
  10104. const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 165};
  10105. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_valid, __pyx_mstate->__pyx_n_u_p};
  10106. __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_scan_over, __pyx_mstate->__pyx_kp_b_iso88591_A_D_b_nD_F_3c_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  10107. }
  10108. {
  10109. const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 171};
  10110. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stop_at, __pyx_mstate->__pyx_n_u_p};
  10111. __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_scan_until, __pyx_mstate->__pyx_kp_b_iso88591_A_D_b_nD_F_3gQ_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  10112. }
  10113. {
  10114. const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 177};
  10115. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tag, __pyx_mstate->__pyx_n_u_location_2, __pyx_mstate->__pyx_n_u_regexp, __pyx_mstate->__pyx_n_u_split};
  10116. __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_scan_anonymous_block, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_c_q_L_a_Kq_Q_4r_V1D_1_3awc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  10117. }
  10118. {
  10119. const __Pyx_PyCode_New_function_description descr = {2, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 207};
  10120. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_featurefile, __pyx_mstate->__pyx_n_u_includeDir};
  10121. __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_q_Kq_L_t81Ba_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  10122. }
  10123. {
  10124. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 221};
  10125. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10126. __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  10127. }
  10128. {
  10129. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224};
  10130. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10131. __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next_3, __pyx_mstate->__pyx_kp_b_iso88591_A_t9A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  10132. }
  10133. {
  10134. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 227};
  10135. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_lexer, __pyx_mstate->__pyx_n_u_token_type, __pyx_mstate->__pyx_n_u_token, __pyx_mstate->__pyx_n_u_location_2, __pyx_mstate->__pyx_n_u_fname_type, __pyx_mstate->__pyx_n_u_fname_token, __pyx_mstate->__pyx_n_u_fname_location, __pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_curpath, __pyx_mstate->__pyx_n_u_err};
  10136. __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next, __pyx_mstate->__pyx_kp_b_iso88591_A_d_D_G_d_1_HD_U_F_Q_M_uA_gU_2U, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  10137. }
  10138. {
  10139. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 266};
  10140. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_file_or_path, __pyx_mstate->__pyx_n_u_fileobj, __pyx_mstate->__pyx_n_u_closing, __pyx_mstate->__pyx_n_u_filename, __pyx_mstate->__pyx_n_u_data};
  10141. __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_make_lexer, __pyx_mstate->__pyx_kp_b_iso88591_A_7_Z_Q_j_a_d_U_1_we1_7_9HA_1_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  10142. }
  10143. {
  10144. const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 279};
  10145. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tag};
  10146. __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_scan_anonymous_block, __pyx_mstate->__pyx_kp_b_iso88591_A_t82R_4AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  10147. }
  10148. {
  10149. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 286};
  10150. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10151. __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_feaLib_lexer_py, __pyx_mstate->__pyx_n_u_next, __pyx_mstate->__pyx_kp_b_iso88591_A_t1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  10152. }
  10153. Py_DECREF(tuple_dedup_map);
  10154. return 0;
  10155. bad:
  10156. Py_DECREF(tuple_dedup_map);
  10157. return -1;
  10158. }
  10159. /* #### Code section: init_globals ### */
  10160. static int __Pyx_InitGlobals(void) {
  10161. /* PythonCompatibility.init */
  10162. if (likely(__Pyx_init_co_variables() == 0)); else
  10163. if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
  10164. /* CommonTypesMetaclass.init */
  10165. if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  10166. if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
  10167. /* CachedMethodType.init */
  10168. #if CYTHON_COMPILING_IN_LIMITED_API
  10169. {
  10170. PyObject *typesModule=NULL;
  10171. typesModule = PyImport_ImportModule("types");
  10172. if (typesModule) {
  10173. __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
  10174. Py_DECREF(typesModule);
  10175. }
  10176. } // error handling follows
  10177. #endif
  10178. if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
  10179. /* CythonFunctionShared.init */
  10180. if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  10181. if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
  10182. return 0;
  10183. __pyx_L1_error:;
  10184. return -1;
  10185. }
  10186. /* #### Code section: cleanup_globals ### */
  10187. /* #### Code section: cleanup_module ### */
  10188. /* #### Code section: main_method ### */
  10189. /* #### Code section: utility_code_pragmas ### */
  10190. #ifdef _MSC_VER
  10191. #pragma warning( push )
  10192. /* Warning 4127: conditional expression is constant
  10193. * Cython uses constant conditional expressions to allow in inline functions to be optimized at
  10194. * compile-time, so this warning is not useful
  10195. */
  10196. #pragma warning( disable : 4127 )
  10197. #endif
  10198. /* #### Code section: utility_code_def ### */
  10199. /* --- Runtime support code --- */
  10200. /* Refnanny */
  10201. #if CYTHON_REFNANNY
  10202. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
  10203. PyObject *m = NULL, *p = NULL;
  10204. void *r = NULL;
  10205. m = PyImport_ImportModule(modname);
  10206. if (!m) goto end;
  10207. p = PyObject_GetAttrString(m, "RefNannyAPI");
  10208. if (!p) goto end;
  10209. r = PyLong_AsVoidPtr(p);
  10210. end:
  10211. Py_XDECREF(p);
  10212. Py_XDECREF(m);
  10213. return (__Pyx_RefNannyAPIStruct *)r;
  10214. }
  10215. #endif
  10216. /* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
  10217. #if CYTHON_FAST_THREAD_STATE
  10218. static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  10219. Py_ssize_t i, n;
  10220. n = PyTuple_GET_SIZE(tuple);
  10221. for (i=0; i<n; i++) {
  10222. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  10223. }
  10224. for (i=0; i<n; i++) {
  10225. if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
  10226. }
  10227. return 0;
  10228. }
  10229. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
  10230. int result;
  10231. PyObject *exc_type;
  10232. #if PY_VERSION_HEX >= 0x030C00A6
  10233. PyObject *current_exception = tstate->current_exception;
  10234. if (unlikely(!current_exception)) return 0;
  10235. exc_type = (PyObject*) Py_TYPE(current_exception);
  10236. if (exc_type == err) return 1;
  10237. #else
  10238. exc_type = tstate->curexc_type;
  10239. if (exc_type == err) return 1;
  10240. if (unlikely(!exc_type)) return 0;
  10241. #endif
  10242. #if CYTHON_AVOID_BORROWED_REFS
  10243. Py_INCREF(exc_type);
  10244. #endif
  10245. if (unlikely(PyTuple_Check(err))) {
  10246. result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
  10247. } else {
  10248. result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
  10249. }
  10250. #if CYTHON_AVOID_BORROWED_REFS
  10251. Py_DECREF(exc_type);
  10252. #endif
  10253. return result;
  10254. }
  10255. #endif
  10256. /* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
  10257. #if CYTHON_FAST_THREAD_STATE
  10258. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  10259. #if PY_VERSION_HEX >= 0x030C00A6
  10260. PyObject *tmp_value;
  10261. assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
  10262. if (value) {
  10263. #if CYTHON_COMPILING_IN_CPYTHON
  10264. if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
  10265. #endif
  10266. PyException_SetTraceback(value, tb);
  10267. }
  10268. tmp_value = tstate->current_exception;
  10269. tstate->current_exception = value;
  10270. Py_XDECREF(tmp_value);
  10271. Py_XDECREF(type);
  10272. Py_XDECREF(tb);
  10273. #else
  10274. PyObject *tmp_type, *tmp_value, *tmp_tb;
  10275. tmp_type = tstate->curexc_type;
  10276. tmp_value = tstate->curexc_value;
  10277. tmp_tb = tstate->curexc_traceback;
  10278. tstate->curexc_type = type;
  10279. tstate->curexc_value = value;
  10280. tstate->curexc_traceback = tb;
  10281. Py_XDECREF(tmp_type);
  10282. Py_XDECREF(tmp_value);
  10283. Py_XDECREF(tmp_tb);
  10284. #endif
  10285. }
  10286. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  10287. #if PY_VERSION_HEX >= 0x030C00A6
  10288. PyObject* exc_value;
  10289. exc_value = tstate->current_exception;
  10290. tstate->current_exception = 0;
  10291. *value = exc_value;
  10292. *type = NULL;
  10293. *tb = NULL;
  10294. if (exc_value) {
  10295. *type = (PyObject*) Py_TYPE(exc_value);
  10296. Py_INCREF(*type);
  10297. #if CYTHON_COMPILING_IN_CPYTHON
  10298. *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
  10299. Py_XINCREF(*tb);
  10300. #else
  10301. *tb = PyException_GetTraceback(exc_value);
  10302. #endif
  10303. }
  10304. #else
  10305. *type = tstate->curexc_type;
  10306. *value = tstate->curexc_value;
  10307. *tb = tstate->curexc_traceback;
  10308. tstate->curexc_type = 0;
  10309. tstate->curexc_value = 0;
  10310. tstate->curexc_traceback = 0;
  10311. #endif
  10312. }
  10313. #endif
  10314. /* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
  10315. #if CYTHON_USE_TYPE_SLOTS
  10316. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
  10317. PyTypeObject* tp = Py_TYPE(obj);
  10318. if (likely(tp->tp_getattro))
  10319. return tp->tp_getattro(obj, attr_name);
  10320. return PyObject_GetAttr(obj, attr_name);
  10321. }
  10322. #endif
  10323. /* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
  10324. #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
  10325. static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
  10326. __Pyx_PyThreadState_declare
  10327. __Pyx_PyThreadState_assign
  10328. if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
  10329. __Pyx_PyErr_Clear();
  10330. }
  10331. #endif
  10332. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
  10333. PyObject *result;
  10334. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  10335. (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
  10336. return result;
  10337. #else
  10338. #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
  10339. PyTypeObject* tp = Py_TYPE(obj);
  10340. if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
  10341. return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
  10342. }
  10343. #endif
  10344. result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
  10345. if (unlikely(!result)) {
  10346. __Pyx_PyObject_GetAttrStr_ClearAttributeError();
  10347. }
  10348. return result;
  10349. #endif
  10350. }
  10351. /* GetBuiltinName */
  10352. static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
  10353. PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
  10354. if (unlikely(!result) && !PyErr_Occurred()) {
  10355. PyErr_Format(PyExc_NameError,
  10356. "name '%U' is not defined", name);
  10357. }
  10358. return result;
  10359. }
  10360. /* TupleAndListFromArray (used by fastcall) */
  10361. #if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
  10362. static CYTHON_INLINE PyObject *
  10363. __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
  10364. {
  10365. PyObject *res;
  10366. Py_ssize_t i;
  10367. if (n <= 0) {
  10368. return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
  10369. }
  10370. res = PyTuple_New(n);
  10371. if (unlikely(res == NULL)) return NULL;
  10372. for (i = 0; i < n; i++) {
  10373. if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
  10374. Py_DECREF(res);
  10375. return NULL;
  10376. }
  10377. Py_INCREF(src[i]);
  10378. }
  10379. return res;
  10380. }
  10381. #elif CYTHON_COMPILING_IN_CPYTHON
  10382. static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
  10383. PyObject *v;
  10384. Py_ssize_t i;
  10385. for (i = 0; i < length; i++) {
  10386. v = dest[i] = src[i];
  10387. Py_INCREF(v);
  10388. }
  10389. }
  10390. static CYTHON_INLINE PyObject *
  10391. __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
  10392. {
  10393. PyObject *res;
  10394. if (n <= 0) {
  10395. return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
  10396. }
  10397. res = PyTuple_New(n);
  10398. if (unlikely(res == NULL)) return NULL;
  10399. __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
  10400. return res;
  10401. }
  10402. static CYTHON_INLINE PyObject *
  10403. __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
  10404. {
  10405. PyObject *res;
  10406. if (n <= 0) {
  10407. return PyList_New(0);
  10408. }
  10409. res = PyList_New(n);
  10410. if (unlikely(res == NULL)) return NULL;
  10411. __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
  10412. return res;
  10413. }
  10414. #endif
  10415. /* BytesEquals (used by UnicodeEquals) */
  10416. static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
  10417. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
  10418. !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
  10419. return PyObject_RichCompareBool(s1, s2, equals);
  10420. #else
  10421. if (s1 == s2) {
  10422. return (equals == Py_EQ);
  10423. } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
  10424. const char *ps1, *ps2;
  10425. Py_ssize_t length = PyBytes_GET_SIZE(s1);
  10426. if (length != PyBytes_GET_SIZE(s2))
  10427. return (equals == Py_NE);
  10428. ps1 = PyBytes_AS_STRING(s1);
  10429. ps2 = PyBytes_AS_STRING(s2);
  10430. if (ps1[0] != ps2[0]) {
  10431. return (equals == Py_NE);
  10432. } else if (length == 1) {
  10433. return (equals == Py_EQ);
  10434. } else {
  10435. int result;
  10436. #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
  10437. Py_hash_t hash1, hash2;
  10438. hash1 = ((PyBytesObject*)s1)->ob_shash;
  10439. hash2 = ((PyBytesObject*)s2)->ob_shash;
  10440. if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
  10441. return (equals == Py_NE);
  10442. }
  10443. #endif
  10444. result = memcmp(ps1, ps2, (size_t)length);
  10445. return (equals == Py_EQ) ? (result == 0) : (result != 0);
  10446. }
  10447. } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
  10448. return (equals == Py_NE);
  10449. } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
  10450. return (equals == Py_NE);
  10451. } else {
  10452. int result;
  10453. PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
  10454. if (!py_result)
  10455. return -1;
  10456. result = __Pyx_PyObject_IsTrue(py_result);
  10457. Py_DECREF(py_result);
  10458. return result;
  10459. }
  10460. #endif
  10461. }
  10462. /* UnicodeEquals (used by fastcall) */
  10463. static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
  10464. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
  10465. return PyObject_RichCompareBool(s1, s2, equals);
  10466. #else
  10467. int s1_is_unicode, s2_is_unicode;
  10468. if (s1 == s2) {
  10469. goto return_eq;
  10470. }
  10471. s1_is_unicode = PyUnicode_CheckExact(s1);
  10472. s2_is_unicode = PyUnicode_CheckExact(s2);
  10473. if (s1_is_unicode & s2_is_unicode) {
  10474. Py_ssize_t length, length2;
  10475. int kind;
  10476. void *data1, *data2;
  10477. #if !CYTHON_COMPILING_IN_LIMITED_API
  10478. if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
  10479. return -1;
  10480. #endif
  10481. length = __Pyx_PyUnicode_GET_LENGTH(s1);
  10482. #if !CYTHON_ASSUME_SAFE_SIZE
  10483. if (unlikely(length < 0)) return -1;
  10484. #endif
  10485. length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
  10486. #if !CYTHON_ASSUME_SAFE_SIZE
  10487. if (unlikely(length2 < 0)) return -1;
  10488. #endif
  10489. if (length != length2) {
  10490. goto return_ne;
  10491. }
  10492. #if CYTHON_USE_UNICODE_INTERNALS
  10493. {
  10494. Py_hash_t hash1, hash2;
  10495. hash1 = ((PyASCIIObject*)s1)->hash;
  10496. hash2 = ((PyASCIIObject*)s2)->hash;
  10497. if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
  10498. goto return_ne;
  10499. }
  10500. }
  10501. #endif
  10502. kind = __Pyx_PyUnicode_KIND(s1);
  10503. if (kind != __Pyx_PyUnicode_KIND(s2)) {
  10504. goto return_ne;
  10505. }
  10506. data1 = __Pyx_PyUnicode_DATA(s1);
  10507. data2 = __Pyx_PyUnicode_DATA(s2);
  10508. if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
  10509. goto return_ne;
  10510. } else if (length == 1) {
  10511. goto return_eq;
  10512. } else {
  10513. int result = memcmp(data1, data2, (size_t)(length * kind));
  10514. return (equals == Py_EQ) ? (result == 0) : (result != 0);
  10515. }
  10516. } else if ((s1 == Py_None) & s2_is_unicode) {
  10517. goto return_ne;
  10518. } else if ((s2 == Py_None) & s1_is_unicode) {
  10519. goto return_ne;
  10520. } else {
  10521. int result;
  10522. PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
  10523. if (!py_result)
  10524. return -1;
  10525. result = __Pyx_PyObject_IsTrue(py_result);
  10526. Py_DECREF(py_result);
  10527. return result;
  10528. }
  10529. return_eq:
  10530. return (equals == Py_EQ);
  10531. return_ne:
  10532. return (equals == Py_NE);
  10533. #endif
  10534. }
  10535. /* fastcall */
  10536. #if CYTHON_METH_FASTCALL
  10537. static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
  10538. {
  10539. Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
  10540. #if !CYTHON_ASSUME_SAFE_SIZE
  10541. if (unlikely(n == -1)) return NULL;
  10542. #endif
  10543. for (i = 0; i < n; i++)
  10544. {
  10545. PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
  10546. #if !CYTHON_ASSUME_SAFE_MACROS
  10547. if (unlikely(!namei)) return NULL;
  10548. #endif
  10549. if (s == namei) return kwvalues[i];
  10550. }
  10551. for (i = 0; i < n; i++)
  10552. {
  10553. PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
  10554. #if !CYTHON_ASSUME_SAFE_MACROS
  10555. if (unlikely(!namei)) return NULL;
  10556. #endif
  10557. int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
  10558. if (unlikely(eq != 0)) {
  10559. if (unlikely(eq < 0)) return NULL;
  10560. return kwvalues[i];
  10561. }
  10562. }
  10563. return NULL;
  10564. }
  10565. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
  10566. CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
  10567. Py_ssize_t i, nkwargs;
  10568. PyObject *dict;
  10569. #if !CYTHON_ASSUME_SAFE_SIZE
  10570. nkwargs = PyTuple_Size(kwnames);
  10571. if (unlikely(nkwargs < 0)) return NULL;
  10572. #else
  10573. nkwargs = PyTuple_GET_SIZE(kwnames);
  10574. #endif
  10575. dict = PyDict_New();
  10576. if (unlikely(!dict))
  10577. return NULL;
  10578. for (i=0; i<nkwargs; i++) {
  10579. #if !CYTHON_ASSUME_SAFE_MACROS
  10580. PyObject *key = PyTuple_GetItem(kwnames, i);
  10581. if (!key) goto bad;
  10582. #else
  10583. PyObject *key = PyTuple_GET_ITEM(kwnames, i);
  10584. #endif
  10585. if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
  10586. goto bad;
  10587. }
  10588. return dict;
  10589. bad:
  10590. Py_DECREF(dict);
  10591. return NULL;
  10592. }
  10593. #endif
  10594. #endif
  10595. /* PyObjectCall (used by PyObjectFastCall) */
  10596. #if CYTHON_COMPILING_IN_CPYTHON
  10597. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  10598. PyObject *result;
  10599. ternaryfunc call = Py_TYPE(func)->tp_call;
  10600. if (unlikely(!call))
  10601. return PyObject_Call(func, arg, kw);
  10602. if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
  10603. return NULL;
  10604. result = (*call)(func, arg, kw);
  10605. Py_LeaveRecursiveCall();
  10606. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  10607. PyErr_SetString(
  10608. PyExc_SystemError,
  10609. "NULL result without error in PyObject_Call");
  10610. }
  10611. return result;
  10612. }
  10613. #endif
  10614. /* PyObjectCallMethO (used by PyObjectFastCall) */
  10615. #if CYTHON_COMPILING_IN_CPYTHON
  10616. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
  10617. PyObject *self, *result;
  10618. PyCFunction cfunc;
  10619. cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
  10620. self = __Pyx_CyOrPyCFunction_GET_SELF(func);
  10621. if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
  10622. return NULL;
  10623. result = cfunc(self, arg);
  10624. Py_LeaveRecursiveCall();
  10625. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  10626. PyErr_SetString(
  10627. PyExc_SystemError,
  10628. "NULL result without error in PyObject_Call");
  10629. }
  10630. return result;
  10631. }
  10632. #endif
  10633. /* PyObjectFastCall (used by PyObjectCallOneArg) */
  10634. #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
  10635. static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
  10636. PyObject *argstuple;
  10637. PyObject *result = 0;
  10638. size_t i;
  10639. argstuple = PyTuple_New((Py_ssize_t)nargs);
  10640. if (unlikely(!argstuple)) return NULL;
  10641. for (i = 0; i < nargs; i++) {
  10642. Py_INCREF(args[i]);
  10643. if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
  10644. }
  10645. result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  10646. bad:
  10647. Py_DECREF(argstuple);
  10648. return result;
  10649. }
  10650. #endif
  10651. #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  10652. #if PY_VERSION_HEX < 0x03090000
  10653. #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  10654. #elif CYTHON_COMPILING_IN_CPYTHON
  10655. static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
  10656. PyTypeObject *tp = Py_TYPE(callable);
  10657. #if defined(__Pyx_CyFunction_USED)
  10658. if (__Pyx_CyFunction_CheckExact(callable)) {
  10659. return __Pyx_CyFunction_func_vectorcall(callable);
  10660. }
  10661. #endif
  10662. if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
  10663. return NULL;
  10664. }
  10665. assert(PyCallable_Check(callable));
  10666. Py_ssize_t offset = tp->tp_vectorcall_offset;
  10667. assert(offset > 0);
  10668. vectorcallfunc ptr;
  10669. memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
  10670. return ptr;
  10671. }
  10672. #else
  10673. #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  10674. #endif
  10675. #endif
  10676. static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
  10677. Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
  10678. #if CYTHON_COMPILING_IN_CPYTHON
  10679. if (nargs == 0 && kwargs == NULL) {
  10680. if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
  10681. return __Pyx_PyObject_CallMethO(func, NULL);
  10682. }
  10683. else if (nargs == 1 && kwargs == NULL) {
  10684. if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
  10685. return __Pyx_PyObject_CallMethO(func, args[0]);
  10686. }
  10687. #endif
  10688. if (kwargs == NULL) {
  10689. #if CYTHON_VECTORCALL
  10690. #if CYTHON_COMPILING_IN_LIMITED_API
  10691. return PyObject_Vectorcall(func, args, _nargs, NULL);
  10692. #else
  10693. vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
  10694. if (f) {
  10695. return f(func, args, _nargs, NULL);
  10696. }
  10697. #endif
  10698. #endif
  10699. }
  10700. if (nargs == 0) {
  10701. return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
  10702. }
  10703. #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
  10704. return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
  10705. #else
  10706. return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
  10707. #endif
  10708. }
  10709. /* PyObjectCallOneArg (used by CallUnboundCMethod0) */
  10710. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  10711. PyObject *args[2] = {NULL, arg};
  10712. return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
  10713. }
  10714. /* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
  10715. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
  10716. static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
  10717. PyObject *result;
  10718. PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
  10719. if (unlikely(!selfless_args)) return NULL;
  10720. result = PyObject_Call(method, selfless_args, kwargs);
  10721. Py_DECREF(selfless_args);
  10722. return result;
  10723. }
  10724. #elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
  10725. static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
  10726. return _PyObject_Vectorcall
  10727. (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
  10728. }
  10729. #else
  10730. static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
  10731. return
  10732. #if PY_VERSION_HEX < 0x03090000
  10733. _PyObject_Vectorcall
  10734. #else
  10735. PyObject_Vectorcall
  10736. #endif
  10737. (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
  10738. }
  10739. #endif
  10740. static PyMethodDef __Pyx_UnboundCMethod_Def = {
  10741. "CythonUnboundCMethod",
  10742. __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
  10743. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
  10744. METH_VARARGS | METH_KEYWORDS,
  10745. #else
  10746. METH_FASTCALL | METH_KEYWORDS,
  10747. #endif
  10748. NULL
  10749. };
  10750. static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
  10751. PyObject *method, *result=NULL;
  10752. method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
  10753. if (unlikely(!method))
  10754. return -1;
  10755. result = method;
  10756. #if CYTHON_COMPILING_IN_CPYTHON
  10757. if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
  10758. {
  10759. PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
  10760. target->func = descr->d_method->ml_meth;
  10761. target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
  10762. } else
  10763. #endif
  10764. #if CYTHON_COMPILING_IN_PYPY
  10765. #else
  10766. if (PyCFunction_Check(method))
  10767. #endif
  10768. {
  10769. PyObject *self;
  10770. int self_found;
  10771. #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
  10772. self = PyObject_GetAttrString(method, "__self__");
  10773. if (!self) {
  10774. PyErr_Clear();
  10775. }
  10776. #else
  10777. self = PyCFunction_GET_SELF(method);
  10778. #endif
  10779. self_found = (self && self != Py_None);
  10780. #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
  10781. Py_XDECREF(self);
  10782. #endif
  10783. if (self_found) {
  10784. PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
  10785. if (unlikely(!unbound_method)) return -1;
  10786. Py_DECREF(method);
  10787. result = unbound_method;
  10788. }
  10789. }
  10790. #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10791. if (unlikely(target->method)) {
  10792. Py_DECREF(result);
  10793. } else
  10794. #endif
  10795. target->method = result;
  10796. return 0;
  10797. }
  10798. /* CallUnboundCMethod0 */
  10799. #if CYTHON_COMPILING_IN_CPYTHON
  10800. static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
  10801. int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
  10802. if (likely(was_initialized == 2 && cfunc->func)) {
  10803. if (likely(cfunc->flag == METH_NOARGS))
  10804. return __Pyx_CallCFunction(cfunc, self, NULL);
  10805. if (likely(cfunc->flag == METH_FASTCALL))
  10806. return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
  10807. if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
  10808. return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
  10809. if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
  10810. return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  10811. if (cfunc->flag == METH_VARARGS)
  10812. return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
  10813. return __Pyx__CallUnboundCMethod0(cfunc, self);
  10814. }
  10815. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10816. else if (unlikely(was_initialized == 1)) {
  10817. __Pyx_CachedCFunction tmp_cfunc = {
  10818. #ifndef __cplusplus
  10819. 0
  10820. #endif
  10821. };
  10822. tmp_cfunc.type = cfunc->type;
  10823. tmp_cfunc.method_name = cfunc->method_name;
  10824. return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
  10825. }
  10826. #endif
  10827. PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
  10828. __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
  10829. return result;
  10830. }
  10831. #endif
  10832. static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
  10833. PyObject *result;
  10834. if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
  10835. result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
  10836. return result;
  10837. }
  10838. /* py_dict_items (used by OwnedDictNext) */
  10839. static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
  10840. return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
  10841. }
  10842. /* py_dict_values (used by OwnedDictNext) */
  10843. static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
  10844. return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
  10845. }
  10846. /* OwnedDictNext (used by ParseKeywordsImpl) */
  10847. #if CYTHON_AVOID_BORROWED_REFS
  10848. static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
  10849. PyObject *next = NULL;
  10850. if (!*ppos) {
  10851. if (pvalue) {
  10852. PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
  10853. if (unlikely(!dictview)) goto bad;
  10854. *ppos = PyObject_GetIter(dictview);
  10855. Py_DECREF(dictview);
  10856. } else {
  10857. *ppos = PyObject_GetIter(p);
  10858. }
  10859. if (unlikely(!*ppos)) goto bad;
  10860. }
  10861. next = PyIter_Next(*ppos);
  10862. if (!next) {
  10863. if (PyErr_Occurred()) goto bad;
  10864. return 0;
  10865. }
  10866. if (pkey && pvalue) {
  10867. *pkey = __Pyx_PySequence_ITEM(next, 0);
  10868. if (unlikely(*pkey)) goto bad;
  10869. *pvalue = __Pyx_PySequence_ITEM(next, 1);
  10870. if (unlikely(*pvalue)) goto bad;
  10871. Py_DECREF(next);
  10872. } else if (pkey) {
  10873. *pkey = next;
  10874. } else {
  10875. assert(pvalue);
  10876. *pvalue = next;
  10877. }
  10878. return 1;
  10879. bad:
  10880. Py_XDECREF(next);
  10881. #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
  10882. PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
  10883. #else
  10884. PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
  10885. #endif
  10886. if (pkey) *pkey = NULL;
  10887. if (pvalue) *pvalue = NULL;
  10888. return 0;
  10889. }
  10890. #else // !CYTHON_AVOID_BORROWED_REFS
  10891. static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
  10892. int result = PyDict_Next(p, ppos, pkey, pvalue);
  10893. if (likely(result == 1)) {
  10894. if (pkey) Py_INCREF(*pkey);
  10895. if (pvalue) Py_INCREF(*pvalue);
  10896. }
  10897. return result;
  10898. }
  10899. #endif
  10900. /* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
  10901. static void __Pyx_RaiseDoubleKeywordsError(
  10902. const char* func_name,
  10903. PyObject* kw_name)
  10904. {
  10905. PyErr_Format(PyExc_TypeError,
  10906. "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
  10907. }
  10908. /* CallUnboundCMethod2 */
  10909. #if CYTHON_COMPILING_IN_CPYTHON
  10910. static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
  10911. int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
  10912. if (likely(was_initialized == 2 && cfunc->func)) {
  10913. PyObject *args[2] = {arg1, arg2};
  10914. if (cfunc->flag == METH_FASTCALL) {
  10915. return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
  10916. }
  10917. if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
  10918. return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
  10919. }
  10920. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10921. else if (unlikely(was_initialized == 1)) {
  10922. __Pyx_CachedCFunction tmp_cfunc = {
  10923. #ifndef __cplusplus
  10924. 0
  10925. #endif
  10926. };
  10927. tmp_cfunc.type = cfunc->type;
  10928. tmp_cfunc.method_name = cfunc->method_name;
  10929. return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
  10930. }
  10931. #endif
  10932. PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
  10933. __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
  10934. return result;
  10935. }
  10936. #endif
  10937. static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
  10938. if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
  10939. #if CYTHON_COMPILING_IN_CPYTHON
  10940. if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
  10941. PyObject *result = NULL;
  10942. PyObject *args = PyTuple_New(2);
  10943. if (unlikely(!args)) return NULL;
  10944. Py_INCREF(arg1);
  10945. PyTuple_SET_ITEM(args, 0, arg1);
  10946. Py_INCREF(arg2);
  10947. PyTuple_SET_ITEM(args, 1, arg2);
  10948. if (cfunc->flag & METH_KEYWORDS)
  10949. result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
  10950. else
  10951. result = __Pyx_CallCFunction(cfunc, self, args);
  10952. Py_DECREF(args);
  10953. return result;
  10954. }
  10955. #endif
  10956. {
  10957. PyObject *args[4] = {NULL, self, arg1, arg2};
  10958. return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
  10959. }
  10960. }
  10961. /* ParseKeywordsImpl (used by ParseKeywords) */
  10962. static int __Pyx_ValidateDuplicatePosArgs(
  10963. PyObject *kwds,
  10964. PyObject ** const argnames[],
  10965. PyObject ** const *first_kw_arg,
  10966. const char* function_name)
  10967. {
  10968. PyObject ** const *name = argnames;
  10969. while (name != first_kw_arg) {
  10970. PyObject *key = **name;
  10971. int found = PyDict_Contains(kwds, key);
  10972. if (unlikely(found)) {
  10973. if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
  10974. goto bad;
  10975. }
  10976. name++;
  10977. }
  10978. return 0;
  10979. bad:
  10980. return -1;
  10981. }
  10982. #if CYTHON_USE_UNICODE_INTERNALS
  10983. static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
  10984. int kind;
  10985. Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
  10986. if (len != PyUnicode_GET_LENGTH(s2)) return 0;
  10987. kind = PyUnicode_KIND(s1);
  10988. if (kind != PyUnicode_KIND(s2)) return 0;
  10989. const void *data1 = PyUnicode_DATA(s1);
  10990. const void *data2 = PyUnicode_DATA(s2);
  10991. return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
  10992. }
  10993. #endif
  10994. static int __Pyx_MatchKeywordArg_str(
  10995. PyObject *key,
  10996. PyObject ** const argnames[],
  10997. PyObject ** const *first_kw_arg,
  10998. size_t *index_found,
  10999. const char *function_name)
  11000. {
  11001. PyObject ** const *name;
  11002. #if CYTHON_USE_UNICODE_INTERNALS
  11003. Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
  11004. if (unlikely(key_hash == -1)) {
  11005. key_hash = PyObject_Hash(key);
  11006. if (unlikely(key_hash == -1))
  11007. goto bad;
  11008. }
  11009. #endif
  11010. name = first_kw_arg;
  11011. while (*name) {
  11012. PyObject *name_str = **name;
  11013. #if CYTHON_USE_UNICODE_INTERNALS
  11014. if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
  11015. *index_found = (size_t) (name - argnames);
  11016. return 1;
  11017. }
  11018. #else
  11019. #if CYTHON_ASSUME_SAFE_SIZE
  11020. if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
  11021. #endif
  11022. {
  11023. int cmp = PyUnicode_Compare(name_str, key);
  11024. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  11025. if (cmp == 0) {
  11026. *index_found = (size_t) (name - argnames);
  11027. return 1;
  11028. }
  11029. }
  11030. #endif
  11031. name++;
  11032. }
  11033. name = argnames;
  11034. while (name != first_kw_arg) {
  11035. PyObject *name_str = **name;
  11036. #if CYTHON_USE_UNICODE_INTERNALS
  11037. if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
  11038. if (__Pyx_UnicodeKeywordsEqual(name_str, key))
  11039. goto arg_passed_twice;
  11040. }
  11041. #else
  11042. #if CYTHON_ASSUME_SAFE_SIZE
  11043. if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
  11044. #endif
  11045. {
  11046. if (unlikely(name_str == key)) goto arg_passed_twice;
  11047. int cmp = PyUnicode_Compare(name_str, key);
  11048. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  11049. if (cmp == 0) goto arg_passed_twice;
  11050. }
  11051. #endif
  11052. name++;
  11053. }
  11054. return 0;
  11055. arg_passed_twice:
  11056. __Pyx_RaiseDoubleKeywordsError(function_name, key);
  11057. goto bad;
  11058. bad:
  11059. return -1;
  11060. }
  11061. static int __Pyx_MatchKeywordArg_nostr(
  11062. PyObject *key,
  11063. PyObject ** const argnames[],
  11064. PyObject ** const *first_kw_arg,
  11065. size_t *index_found,
  11066. const char *function_name)
  11067. {
  11068. PyObject ** const *name;
  11069. if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
  11070. name = first_kw_arg;
  11071. while (*name) {
  11072. int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
  11073. if (cmp == 1) {
  11074. *index_found = (size_t) (name - argnames);
  11075. return 1;
  11076. }
  11077. if (unlikely(cmp == -1)) goto bad;
  11078. name++;
  11079. }
  11080. name = argnames;
  11081. while (name != first_kw_arg) {
  11082. int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
  11083. if (unlikely(cmp != 0)) {
  11084. if (cmp == 1) goto arg_passed_twice;
  11085. else goto bad;
  11086. }
  11087. name++;
  11088. }
  11089. return 0;
  11090. arg_passed_twice:
  11091. __Pyx_RaiseDoubleKeywordsError(function_name, key);
  11092. goto bad;
  11093. invalid_keyword_type:
  11094. PyErr_Format(PyExc_TypeError,
  11095. "%.200s() keywords must be strings", function_name);
  11096. goto bad;
  11097. bad:
  11098. return -1;
  11099. }
  11100. static CYTHON_INLINE int __Pyx_MatchKeywordArg(
  11101. PyObject *key,
  11102. PyObject ** const argnames[],
  11103. PyObject ** const *first_kw_arg,
  11104. size_t *index_found,
  11105. const char *function_name)
  11106. {
  11107. return likely(PyUnicode_CheckExact(key)) ?
  11108. __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
  11109. __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
  11110. }
  11111. static void __Pyx_RejectUnknownKeyword(
  11112. PyObject *kwds,
  11113. PyObject ** const argnames[],
  11114. PyObject ** const *first_kw_arg,
  11115. const char *function_name)
  11116. {
  11117. #if CYTHON_AVOID_BORROWED_REFS
  11118. PyObject *pos = NULL;
  11119. #else
  11120. Py_ssize_t pos = 0;
  11121. #endif
  11122. PyObject *key = NULL;
  11123. __Pyx_BEGIN_CRITICAL_SECTION(kwds);
  11124. while (
  11125. #if CYTHON_AVOID_BORROWED_REFS
  11126. __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
  11127. #else
  11128. PyDict_Next(kwds, &pos, &key, NULL)
  11129. #endif
  11130. ) {
  11131. PyObject** const *name = first_kw_arg;
  11132. while (*name && (**name != key)) name++;
  11133. if (!*name) {
  11134. size_t index_found = 0;
  11135. int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
  11136. if (cmp != 1) {
  11137. if (cmp == 0) {
  11138. PyErr_Format(PyExc_TypeError,
  11139. "%s() got an unexpected keyword argument '%U'",
  11140. function_name, key);
  11141. }
  11142. #if CYTHON_AVOID_BORROWED_REFS
  11143. Py_DECREF(key);
  11144. #endif
  11145. break;
  11146. }
  11147. }
  11148. #if CYTHON_AVOID_BORROWED_REFS
  11149. Py_DECREF(key);
  11150. #endif
  11151. }
  11152. __Pyx_END_CRITICAL_SECTION();
  11153. #if CYTHON_AVOID_BORROWED_REFS
  11154. Py_XDECREF(pos);
  11155. #endif
  11156. assert(PyErr_Occurred());
  11157. }
  11158. static int __Pyx_ParseKeywordDict(
  11159. PyObject *kwds,
  11160. PyObject ** const argnames[],
  11161. PyObject *values[],
  11162. Py_ssize_t num_pos_args,
  11163. Py_ssize_t num_kwargs,
  11164. const char* function_name,
  11165. int ignore_unknown_kwargs)
  11166. {
  11167. PyObject** const *name;
  11168. PyObject** const *first_kw_arg = argnames + num_pos_args;
  11169. Py_ssize_t extracted = 0;
  11170. #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
  11171. if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
  11172. #endif
  11173. name = first_kw_arg;
  11174. while (*name && num_kwargs > extracted) {
  11175. PyObject * key = **name;
  11176. PyObject *value;
  11177. int found = 0;
  11178. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  11179. found = PyDict_GetItemRef(kwds, key, &value);
  11180. #else
  11181. value = PyDict_GetItemWithError(kwds, key);
  11182. if (value) {
  11183. Py_INCREF(value);
  11184. found = 1;
  11185. } else {
  11186. if (unlikely(PyErr_Occurred())) goto bad;
  11187. }
  11188. #endif
  11189. if (found) {
  11190. if (unlikely(found < 0)) goto bad;
  11191. values[name-argnames] = value;
  11192. extracted++;
  11193. }
  11194. name++;
  11195. }
  11196. if (num_kwargs > extracted) {
  11197. if (ignore_unknown_kwargs) {
  11198. if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
  11199. goto bad;
  11200. } else {
  11201. __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
  11202. goto bad;
  11203. }
  11204. }
  11205. return 0;
  11206. bad:
  11207. return -1;
  11208. }
  11209. static int __Pyx_ParseKeywordDictToDict(
  11210. PyObject *kwds,
  11211. PyObject ** const argnames[],
  11212. PyObject *kwds2,
  11213. PyObject *values[],
  11214. Py_ssize_t num_pos_args,
  11215. const char* function_name)
  11216. {
  11217. PyObject** const *name;
  11218. PyObject** const *first_kw_arg = argnames + num_pos_args;
  11219. Py_ssize_t len;
  11220. #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
  11221. if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
  11222. #endif
  11223. if (PyDict_Update(kwds2, kwds) < 0) goto bad;
  11224. name = first_kw_arg;
  11225. while (*name) {
  11226. PyObject *key = **name;
  11227. PyObject *value;
  11228. #if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
  11229. int found = PyDict_Pop(kwds2, key, &value);
  11230. if (found) {
  11231. if (unlikely(found < 0)) goto bad;
  11232. values[name-argnames] = value;
  11233. }
  11234. #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  11235. int found = PyDict_GetItemRef(kwds2, key, &value);
  11236. if (found) {
  11237. if (unlikely(found < 0)) goto bad;
  11238. values[name-argnames] = value;
  11239. if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
  11240. }
  11241. #else
  11242. #if CYTHON_COMPILING_IN_CPYTHON
  11243. value = _PyDict_Pop(kwds2, key, kwds2);
  11244. #else
  11245. value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
  11246. #endif
  11247. if (value == kwds2) {
  11248. Py_DECREF(value);
  11249. } else {
  11250. if (unlikely(!value)) goto bad;
  11251. values[name-argnames] = value;
  11252. }
  11253. #endif
  11254. name++;
  11255. }
  11256. len = PyDict_Size(kwds2);
  11257. if (len > 0) {
  11258. return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
  11259. } else if (unlikely(len == -1)) {
  11260. goto bad;
  11261. }
  11262. return 0;
  11263. bad:
  11264. return -1;
  11265. }
  11266. static int __Pyx_ParseKeywordsTuple(
  11267. PyObject *kwds,
  11268. PyObject * const *kwvalues,
  11269. PyObject ** const argnames[],
  11270. PyObject *kwds2,
  11271. PyObject *values[],
  11272. Py_ssize_t num_pos_args,
  11273. Py_ssize_t num_kwargs,
  11274. const char* function_name,
  11275. int ignore_unknown_kwargs)
  11276. {
  11277. PyObject *key = NULL;
  11278. PyObject** const * name;
  11279. PyObject** const *first_kw_arg = argnames + num_pos_args;
  11280. for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
  11281. #if CYTHON_AVOID_BORROWED_REFS
  11282. key = __Pyx_PySequence_ITEM(kwds, pos);
  11283. #else
  11284. key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
  11285. #endif
  11286. #if !CYTHON_ASSUME_SAFE_MACROS
  11287. if (unlikely(!key)) goto bad;
  11288. #endif
  11289. name = first_kw_arg;
  11290. while (*name && (**name != key)) name++;
  11291. if (*name) {
  11292. PyObject *value = kwvalues[pos];
  11293. values[name-argnames] = __Pyx_NewRef(value);
  11294. } else {
  11295. size_t index_found = 0;
  11296. int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
  11297. if (cmp == 1) {
  11298. PyObject *value = kwvalues[pos];
  11299. values[index_found] = __Pyx_NewRef(value);
  11300. } else {
  11301. if (unlikely(cmp == -1)) goto bad;
  11302. if (kwds2) {
  11303. PyObject *value = kwvalues[pos];
  11304. if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
  11305. } else if (!ignore_unknown_kwargs) {
  11306. goto invalid_keyword;
  11307. }
  11308. }
  11309. }
  11310. #if CYTHON_AVOID_BORROWED_REFS
  11311. Py_DECREF(key);
  11312. key = NULL;
  11313. #endif
  11314. }
  11315. return 0;
  11316. invalid_keyword:
  11317. PyErr_Format(PyExc_TypeError,
  11318. "%s() got an unexpected keyword argument '%U'",
  11319. function_name, key);
  11320. goto bad;
  11321. bad:
  11322. #if CYTHON_AVOID_BORROWED_REFS
  11323. Py_XDECREF(key);
  11324. #endif
  11325. return -1;
  11326. }
  11327. /* ParseKeywords */
  11328. static int __Pyx_ParseKeywords(
  11329. PyObject *kwds,
  11330. PyObject * const *kwvalues,
  11331. PyObject ** const argnames[],
  11332. PyObject *kwds2,
  11333. PyObject *values[],
  11334. Py_ssize_t num_pos_args,
  11335. Py_ssize_t num_kwargs,
  11336. const char* function_name,
  11337. int ignore_unknown_kwargs)
  11338. {
  11339. if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
  11340. return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
  11341. else if (kwds2)
  11342. return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
  11343. else
  11344. return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
  11345. }
  11346. /* RaiseArgTupleInvalid */
  11347. static void __Pyx_RaiseArgtupleInvalid(
  11348. const char* func_name,
  11349. int exact,
  11350. Py_ssize_t num_min,
  11351. Py_ssize_t num_max,
  11352. Py_ssize_t num_found)
  11353. {
  11354. Py_ssize_t num_expected;
  11355. const char *more_or_less;
  11356. if (num_found < num_min) {
  11357. num_expected = num_min;
  11358. more_or_less = "at least";
  11359. } else {
  11360. num_expected = num_max;
  11361. more_or_less = "at most";
  11362. }
  11363. if (exact) {
  11364. more_or_less = "exactly";
  11365. }
  11366. PyErr_Format(PyExc_TypeError,
  11367. "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  11368. func_name, more_or_less, num_expected,
  11369. (num_expected == 1) ? "" : "s", num_found);
  11370. }
  11371. /* PyObjectSetAttrStr */
  11372. #if CYTHON_USE_TYPE_SLOTS
  11373. static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
  11374. PyTypeObject* tp = Py_TYPE(obj);
  11375. if (likely(tp->tp_setattro))
  11376. return tp->tp_setattro(obj, attr_name, value);
  11377. return PyObject_SetAttr(obj, attr_name, value);
  11378. }
  11379. #endif
  11380. /* PyDictVersioning (used by GetModuleGlobalName) */
  11381. #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
  11382. static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
  11383. PyObject *dict = Py_TYPE(obj)->tp_dict;
  11384. return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
  11385. }
  11386. static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
  11387. PyObject **dictptr = NULL;
  11388. Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
  11389. if (offset) {
  11390. #if CYTHON_COMPILING_IN_CPYTHON
  11391. dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
  11392. #else
  11393. dictptr = _PyObject_GetDictPtr(obj);
  11394. #endif
  11395. }
  11396. return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
  11397. }
  11398. static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
  11399. PyObject *dict = Py_TYPE(obj)->tp_dict;
  11400. if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
  11401. return 0;
  11402. return obj_dict_version == __Pyx_get_object_dict_version(obj);
  11403. }
  11404. #endif
  11405. /* GetModuleGlobalName */
  11406. #if CYTHON_USE_DICT_VERSIONS
  11407. static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
  11408. #else
  11409. static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
  11410. #endif
  11411. {
  11412. PyObject *result;
  11413. #if CYTHON_COMPILING_IN_LIMITED_API
  11414. if (unlikely(!__pyx_m)) {
  11415. if (!PyErr_Occurred())
  11416. PyErr_SetNone(PyExc_NameError);
  11417. return NULL;
  11418. }
  11419. result = PyObject_GetAttr(__pyx_m, name);
  11420. if (likely(result)) {
  11421. return result;
  11422. }
  11423. PyErr_Clear();
  11424. #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  11425. if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
  11426. __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
  11427. if (likely(result)) {
  11428. return result;
  11429. }
  11430. #else
  11431. result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
  11432. __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
  11433. if (likely(result)) {
  11434. return __Pyx_NewRef(result);
  11435. }
  11436. PyErr_Clear();
  11437. #endif
  11438. return __Pyx_GetBuiltinName(name);
  11439. }
  11440. /* PyObjectFastCallMethod */
  11441. #if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
  11442. static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
  11443. PyObject *result;
  11444. PyObject *attr = PyObject_GetAttr(args[0], name);
  11445. if (unlikely(!attr))
  11446. return NULL;
  11447. result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
  11448. Py_DECREF(attr);
  11449. return result;
  11450. }
  11451. #endif
  11452. /* RaiseTooManyValuesToUnpack */
  11453. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
  11454. PyErr_Format(PyExc_ValueError,
  11455. "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
  11456. }
  11457. /* RaiseNeedMoreValuesToUnpack */
  11458. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
  11459. PyErr_Format(PyExc_ValueError,
  11460. "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
  11461. index, (index == 1) ? "" : "s");
  11462. }
  11463. /* IterFinish */
  11464. static CYTHON_INLINE int __Pyx_IterFinish(void) {
  11465. PyObject* exc_type;
  11466. __Pyx_PyThreadState_declare
  11467. __Pyx_PyThreadState_assign
  11468. exc_type = __Pyx_PyErr_CurrentExceptionType();
  11469. if (unlikely(exc_type)) {
  11470. if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
  11471. return -1;
  11472. __Pyx_PyErr_Clear();
  11473. return 0;
  11474. }
  11475. return 0;
  11476. }
  11477. /* UnpackItemEndCheck */
  11478. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
  11479. if (unlikely(retval)) {
  11480. Py_DECREF(retval);
  11481. __Pyx_RaiseTooManyValuesError(expected);
  11482. return -1;
  11483. }
  11484. return __Pyx_IterFinish();
  11485. }
  11486. /* PyLongBinop */
  11487. #if !CYTHON_COMPILING_IN_PYPY
  11488. static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) {
  11489. return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
  11490. }
  11491. #if CYTHON_USE_PYLONG_INTERNALS
  11492. static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
  11493. CYTHON_MAYBE_UNUSED_VAR(inplace);
  11494. CYTHON_UNUSED_VAR(zerodivision_check);
  11495. const long b = intval;
  11496. long a;
  11497. const PY_LONG_LONG llb = intval;
  11498. PY_LONG_LONG lla;
  11499. if (unlikely(__Pyx_PyLong_IsZero(op1))) {
  11500. return __Pyx_NewRef(op2);
  11501. }
  11502. const int is_positive = __Pyx_PyLong_IsPos(op1);
  11503. const digit* digits = __Pyx_PyLong_Digits(op1);
  11504. const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
  11505. if (likely(size == 1)) {
  11506. a = (long) digits[0];
  11507. if (!is_positive) a *= -1;
  11508. } else {
  11509. switch (size) {
  11510. case 2:
  11511. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  11512. a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11513. if (!is_positive) a *= -1;
  11514. goto calculate_long;
  11515. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
  11516. lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  11517. if (!is_positive) lla *= -1;
  11518. goto calculate_long_long;
  11519. }
  11520. break;
  11521. case 3:
  11522. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  11523. a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11524. if (!is_positive) a *= -1;
  11525. goto calculate_long;
  11526. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
  11527. lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  11528. if (!is_positive) lla *= -1;
  11529. goto calculate_long_long;
  11530. }
  11531. break;
  11532. case 4:
  11533. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  11534. a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11535. if (!is_positive) a *= -1;
  11536. goto calculate_long;
  11537. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
  11538. lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  11539. if (!is_positive) lla *= -1;
  11540. goto calculate_long_long;
  11541. }
  11542. break;
  11543. }
  11544. return PyLong_Type.tp_as_number->nb_add(op1, op2);
  11545. }
  11546. calculate_long:
  11547. {
  11548. long x;
  11549. x = a + b;
  11550. return PyLong_FromLong(x);
  11551. }
  11552. calculate_long_long:
  11553. {
  11554. PY_LONG_LONG llx;
  11555. llx = lla + llb;
  11556. return PyLong_FromLongLong(llx);
  11557. }
  11558. }
  11559. #endif
  11560. static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) {
  11561. CYTHON_UNUSED_VAR(zerodivision_check);
  11562. const long b = intval;
  11563. double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
  11564. double result;
  11565. result = ((double)a) + (double)b;
  11566. return PyFloat_FromDouble(result);
  11567. }
  11568. static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
  11569. CYTHON_MAYBE_UNUSED_VAR(intval);
  11570. CYTHON_UNUSED_VAR(zerodivision_check);
  11571. #if CYTHON_USE_PYLONG_INTERNALS
  11572. if (likely(PyLong_CheckExact(op1))) {
  11573. return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check);
  11574. }
  11575. #endif
  11576. if (PyFloat_CheckExact(op1)) {
  11577. return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check);
  11578. }
  11579. return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace);
  11580. }
  11581. #endif
  11582. /* RaiseException */
  11583. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
  11584. PyObject* owned_instance = NULL;
  11585. if (tb == Py_None) {
  11586. tb = 0;
  11587. } else if (tb && !PyTraceBack_Check(tb)) {
  11588. PyErr_SetString(PyExc_TypeError,
  11589. "raise: arg 3 must be a traceback or None");
  11590. goto bad;
  11591. }
  11592. if (value == Py_None)
  11593. value = 0;
  11594. if (PyExceptionInstance_Check(type)) {
  11595. if (value) {
  11596. PyErr_SetString(PyExc_TypeError,
  11597. "instance exception may not have a separate value");
  11598. goto bad;
  11599. }
  11600. value = type;
  11601. type = (PyObject*) Py_TYPE(value);
  11602. } else if (PyExceptionClass_Check(type)) {
  11603. PyObject *instance_class = NULL;
  11604. if (value && PyExceptionInstance_Check(value)) {
  11605. instance_class = (PyObject*) Py_TYPE(value);
  11606. if (instance_class != type) {
  11607. int is_subclass = PyObject_IsSubclass(instance_class, type);
  11608. if (!is_subclass) {
  11609. instance_class = NULL;
  11610. } else if (unlikely(is_subclass == -1)) {
  11611. goto bad;
  11612. } else {
  11613. type = instance_class;
  11614. }
  11615. }
  11616. }
  11617. if (!instance_class) {
  11618. PyObject *args;
  11619. if (!value)
  11620. args = PyTuple_New(0);
  11621. else if (PyTuple_Check(value)) {
  11622. Py_INCREF(value);
  11623. args = value;
  11624. } else
  11625. args = PyTuple_Pack(1, value);
  11626. if (!args)
  11627. goto bad;
  11628. owned_instance = PyObject_Call(type, args, NULL);
  11629. Py_DECREF(args);
  11630. if (!owned_instance)
  11631. goto bad;
  11632. value = owned_instance;
  11633. if (!PyExceptionInstance_Check(value)) {
  11634. PyErr_Format(PyExc_TypeError,
  11635. "calling %R should have returned an instance of "
  11636. "BaseException, not %R",
  11637. type, Py_TYPE(value));
  11638. goto bad;
  11639. }
  11640. }
  11641. } else {
  11642. PyErr_SetString(PyExc_TypeError,
  11643. "raise: exception class must be a subclass of BaseException");
  11644. goto bad;
  11645. }
  11646. if (cause) {
  11647. PyObject *fixed_cause;
  11648. if (cause == Py_None) {
  11649. fixed_cause = NULL;
  11650. } else if (PyExceptionClass_Check(cause)) {
  11651. fixed_cause = PyObject_CallObject(cause, NULL);
  11652. if (fixed_cause == NULL)
  11653. goto bad;
  11654. } else if (PyExceptionInstance_Check(cause)) {
  11655. fixed_cause = cause;
  11656. Py_INCREF(fixed_cause);
  11657. } else {
  11658. PyErr_SetString(PyExc_TypeError,
  11659. "exception causes must derive from "
  11660. "BaseException");
  11661. goto bad;
  11662. }
  11663. PyException_SetCause(value, fixed_cause);
  11664. }
  11665. PyErr_SetObject(type, value);
  11666. if (tb) {
  11667. #if PY_VERSION_HEX >= 0x030C00A6
  11668. PyException_SetTraceback(value, tb);
  11669. #elif CYTHON_FAST_THREAD_STATE
  11670. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  11671. PyObject* tmp_tb = tstate->curexc_traceback;
  11672. if (tb != tmp_tb) {
  11673. Py_INCREF(tb);
  11674. tstate->curexc_traceback = tb;
  11675. Py_XDECREF(tmp_tb);
  11676. }
  11677. #else
  11678. PyObject *tmp_type, *tmp_value, *tmp_tb;
  11679. PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
  11680. Py_INCREF(tb);
  11681. PyErr_Restore(tmp_type, tmp_value, tb);
  11682. Py_XDECREF(tmp_tb);
  11683. #endif
  11684. }
  11685. bad:
  11686. Py_XDECREF(owned_instance);
  11687. return;
  11688. }
  11689. /* GetItemInt */
  11690. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
  11691. PyObject *r;
  11692. if (unlikely(!j)) return NULL;
  11693. r = PyObject_GetItem(o, j);
  11694. Py_DECREF(j);
  11695. return r;
  11696. }
  11697. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  11698. int wraparound, int boundscheck, int unsafe_shared) {
  11699. CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
  11700. #if CYTHON_ASSUME_SAFE_SIZE
  11701. Py_ssize_t wrapped_i = i;
  11702. if (wraparound & unlikely(i < 0)) {
  11703. wrapped_i += PyList_GET_SIZE(o);
  11704. }
  11705. if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
  11706. return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
  11707. } else
  11708. if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
  11709. return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
  11710. }
  11711. return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
  11712. #else
  11713. (void)wraparound;
  11714. (void)boundscheck;
  11715. return PySequence_GetItem(o, i);
  11716. #endif
  11717. }
  11718. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  11719. int wraparound, int boundscheck, int unsafe_shared) {
  11720. CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
  11721. #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  11722. Py_ssize_t wrapped_i = i;
  11723. if (wraparound & unlikely(i < 0)) {
  11724. wrapped_i += PyTuple_GET_SIZE(o);
  11725. }
  11726. if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
  11727. return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
  11728. }
  11729. return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
  11730. #else
  11731. (void)wraparound;
  11732. (void)boundscheck;
  11733. return PySequence_GetItem(o, i);
  11734. #endif
  11735. }
  11736. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
  11737. int wraparound, int boundscheck, int unsafe_shared) {
  11738. CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
  11739. #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  11740. if (is_list || PyList_CheckExact(o)) {
  11741. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
  11742. if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
  11743. return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
  11744. } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
  11745. return __Pyx_NewRef(PyList_GET_ITEM(o, n));
  11746. }
  11747. } else
  11748. #if !CYTHON_AVOID_BORROWED_REFS
  11749. if (PyTuple_CheckExact(o)) {
  11750. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
  11751. if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
  11752. return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
  11753. }
  11754. } else
  11755. #endif
  11756. #endif
  11757. #if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
  11758. {
  11759. PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
  11760. PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
  11761. if (!is_list && mm && mm->mp_subscript) {
  11762. PyObject *r, *key = PyLong_FromSsize_t(i);
  11763. if (unlikely(!key)) return NULL;
  11764. r = mm->mp_subscript(o, key);
  11765. Py_DECREF(key);
  11766. return r;
  11767. }
  11768. if (is_list || likely(sm && sm->sq_item)) {
  11769. if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
  11770. Py_ssize_t l = sm->sq_length(o);
  11771. if (likely(l >= 0)) {
  11772. i += l;
  11773. } else {
  11774. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  11775. return NULL;
  11776. PyErr_Clear();
  11777. }
  11778. }
  11779. return sm->sq_item(o, i);
  11780. }
  11781. }
  11782. #else
  11783. if (is_list || !PyMapping_Check(o)) {
  11784. return PySequence_GetItem(o, i);
  11785. }
  11786. #endif
  11787. (void)wraparound;
  11788. (void)boundscheck;
  11789. return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
  11790. }
  11791. /* ObjectGetItem */
  11792. #if CYTHON_USE_TYPE_SLOTS
  11793. static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
  11794. PyObject *runerr = NULL;
  11795. Py_ssize_t key_value;
  11796. key_value = __Pyx_PyIndex_AsSsize_t(index);
  11797. if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
  11798. return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1);
  11799. }
  11800. if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
  11801. __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index));
  11802. PyErr_Clear();
  11803. PyErr_Format(PyExc_IndexError,
  11804. "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
  11805. __Pyx_DECREF_TypeName(index_type_name);
  11806. }
  11807. return NULL;
  11808. }
  11809. static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
  11810. __Pyx_TypeName obj_type_name;
  11811. if (likely(PyType_Check(obj))) {
  11812. PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
  11813. if (!meth) {
  11814. PyErr_Clear();
  11815. } else {
  11816. PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
  11817. Py_DECREF(meth);
  11818. return result;
  11819. }
  11820. }
  11821. obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
  11822. PyErr_Format(PyExc_TypeError,
  11823. "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
  11824. __Pyx_DECREF_TypeName(obj_type_name);
  11825. return NULL;
  11826. }
  11827. static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
  11828. PyTypeObject *tp = Py_TYPE(obj);
  11829. PyMappingMethods *mm = tp->tp_as_mapping;
  11830. PySequenceMethods *sm = tp->tp_as_sequence;
  11831. if (likely(mm && mm->mp_subscript)) {
  11832. return mm->mp_subscript(obj, key);
  11833. }
  11834. if (likely(sm && sm->sq_item)) {
  11835. return __Pyx_PyObject_GetIndex(obj, key);
  11836. }
  11837. return __Pyx_PyObject_GetItem_Slow(obj, key);
  11838. }
  11839. #endif
  11840. /* SliceObject */
  11841. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
  11842. Py_ssize_t cstart, Py_ssize_t cstop,
  11843. PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
  11844. int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
  11845. __Pyx_TypeName obj_type_name;
  11846. #if CYTHON_USE_TYPE_SLOTS
  11847. PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping;
  11848. if (likely(mp && mp->mp_subscript))
  11849. #endif
  11850. {
  11851. PyObject* result;
  11852. PyObject *py_slice, *py_start, *py_stop;
  11853. if (_py_slice) {
  11854. py_slice = *_py_slice;
  11855. } else {
  11856. PyObject* owned_start = NULL;
  11857. PyObject* owned_stop = NULL;
  11858. if (_py_start) {
  11859. py_start = *_py_start;
  11860. } else {
  11861. if (has_cstart) {
  11862. owned_start = py_start = PyLong_FromSsize_t(cstart);
  11863. if (unlikely(!py_start)) goto bad;
  11864. } else
  11865. py_start = Py_None;
  11866. }
  11867. if (_py_stop) {
  11868. py_stop = *_py_stop;
  11869. } else {
  11870. if (has_cstop) {
  11871. owned_stop = py_stop = PyLong_FromSsize_t(cstop);
  11872. if (unlikely(!py_stop)) {
  11873. Py_XDECREF(owned_start);
  11874. goto bad;
  11875. }
  11876. } else
  11877. py_stop = Py_None;
  11878. }
  11879. py_slice = PySlice_New(py_start, py_stop, Py_None);
  11880. Py_XDECREF(owned_start);
  11881. Py_XDECREF(owned_stop);
  11882. if (unlikely(!py_slice)) goto bad;
  11883. }
  11884. #if CYTHON_USE_TYPE_SLOTS
  11885. result = mp->mp_subscript(obj, py_slice);
  11886. #else
  11887. result = PyObject_GetItem(obj, py_slice);
  11888. #endif
  11889. if (!_py_slice) {
  11890. Py_DECREF(py_slice);
  11891. }
  11892. return result;
  11893. }
  11894. obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
  11895. PyErr_Format(PyExc_TypeError,
  11896. "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
  11897. __Pyx_DECREF_TypeName(obj_type_name);
  11898. bad:
  11899. return NULL;
  11900. }
  11901. /* PyLongBinop */
  11902. #if !CYTHON_COMPILING_IN_PYPY
  11903. static PyObject* __Pyx_Fallback___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, int inplace) {
  11904. return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
  11905. }
  11906. #if CYTHON_USE_PYLONG_INTERNALS
  11907. static PyObject* __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
  11908. CYTHON_MAYBE_UNUSED_VAR(inplace);
  11909. CYTHON_UNUSED_VAR(zerodivision_check);
  11910. const long b = intval;
  11911. long a;
  11912. const PY_LONG_LONG llb = intval;
  11913. PY_LONG_LONG lla;
  11914. if (unlikely(__Pyx_PyLong_IsZero(op1))) {
  11915. return PyLong_FromLong(-intval);
  11916. }
  11917. const int is_positive = __Pyx_PyLong_IsPos(op1);
  11918. const digit* digits = __Pyx_PyLong_Digits(op1);
  11919. const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
  11920. if (likely(size == 1)) {
  11921. a = (long) digits[0];
  11922. if (!is_positive) a *= -1;
  11923. } else {
  11924. switch (size) {
  11925. case 2:
  11926. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  11927. a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11928. if (!is_positive) a *= -1;
  11929. goto calculate_long;
  11930. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
  11931. lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  11932. if (!is_positive) lla *= -1;
  11933. goto calculate_long_long;
  11934. }
  11935. break;
  11936. case 3:
  11937. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  11938. a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11939. if (!is_positive) a *= -1;
  11940. goto calculate_long;
  11941. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
  11942. lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  11943. if (!is_positive) lla *= -1;
  11944. goto calculate_long_long;
  11945. }
  11946. break;
  11947. case 4:
  11948. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  11949. a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11950. if (!is_positive) a *= -1;
  11951. goto calculate_long;
  11952. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
  11953. lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  11954. if (!is_positive) lla *= -1;
  11955. goto calculate_long_long;
  11956. }
  11957. break;
  11958. }
  11959. return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
  11960. }
  11961. calculate_long:
  11962. {
  11963. long x;
  11964. x = a - b;
  11965. return PyLong_FromLong(x);
  11966. }
  11967. calculate_long_long:
  11968. {
  11969. PY_LONG_LONG llx;
  11970. llx = lla - llb;
  11971. return PyLong_FromLongLong(llx);
  11972. }
  11973. }
  11974. #endif
  11975. static PyObject* __Pyx_Float___Pyx_PyLong_SubtractObjC(PyObject *float_val, long intval, int zerodivision_check) {
  11976. CYTHON_UNUSED_VAR(zerodivision_check);
  11977. const long b = intval;
  11978. double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
  11979. double result;
  11980. result = ((double)a) - (double)b;
  11981. return PyFloat_FromDouble(result);
  11982. }
  11983. static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
  11984. CYTHON_MAYBE_UNUSED_VAR(intval);
  11985. CYTHON_UNUSED_VAR(zerodivision_check);
  11986. #if CYTHON_USE_PYLONG_INTERNALS
  11987. if (likely(PyLong_CheckExact(op1))) {
  11988. return __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check);
  11989. }
  11990. #endif
  11991. if (PyFloat_CheckExact(op1)) {
  11992. return __Pyx_Float___Pyx_PyLong_SubtractObjC(op1, intval, zerodivision_check);
  11993. }
  11994. return __Pyx_Fallback___Pyx_PyLong_SubtractObjC(op1, op2, inplace);
  11995. }
  11996. #endif
  11997. /* pybytes_as_double (used by pynumber_float) */
  11998. static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
  11999. PyObject *float_value = PyFloat_FromString(obj);
  12000. if (likely(float_value)) {
  12001. double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
  12002. Py_DECREF(float_value);
  12003. return value;
  12004. }
  12005. return (double)-1;
  12006. }
  12007. static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
  12008. int last_was_punctuation = 1;
  12009. int parse_error_found = 0;
  12010. Py_ssize_t i;
  12011. for (i=0; i < length; i++) {
  12012. char chr = start[i];
  12013. int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
  12014. *buffer = chr;
  12015. buffer += (chr != '_');
  12016. parse_error_found |= last_was_punctuation & is_punctuation;
  12017. last_was_punctuation = is_punctuation;
  12018. }
  12019. parse_error_found |= last_was_punctuation;
  12020. *buffer = '\0';
  12021. return unlikely(parse_error_found) ? NULL : buffer;
  12022. }
  12023. static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
  12024. int matches = 1;
  12025. char sign = start[0];
  12026. int is_signed = (sign == '+') | (sign == '-');
  12027. start += is_signed;
  12028. length -= is_signed;
  12029. switch (start[0]) {
  12030. #ifdef Py_NAN
  12031. case 'n':
  12032. case 'N':
  12033. if (unlikely(length != 3)) goto parse_failure;
  12034. matches &= (start[1] == 'a' || start[1] == 'A');
  12035. matches &= (start[2] == 'n' || start[2] == 'N');
  12036. if (unlikely(!matches)) goto parse_failure;
  12037. return (sign == '-') ? -Py_NAN : Py_NAN;
  12038. #endif
  12039. case 'i':
  12040. case 'I':
  12041. if (unlikely(length < 3)) goto parse_failure;
  12042. matches &= (start[1] == 'n' || start[1] == 'N');
  12043. matches &= (start[2] == 'f' || start[2] == 'F');
  12044. if (likely(length == 3 && matches))
  12045. return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
  12046. if (unlikely(length != 8)) goto parse_failure;
  12047. matches &= (start[3] == 'i' || start[3] == 'I');
  12048. matches &= (start[4] == 'n' || start[4] == 'N');
  12049. matches &= (start[5] == 'i' || start[5] == 'I');
  12050. matches &= (start[6] == 't' || start[6] == 'T');
  12051. matches &= (start[7] == 'y' || start[7] == 'Y');
  12052. if (unlikely(!matches)) goto parse_failure;
  12053. return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
  12054. case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
  12055. break;
  12056. default:
  12057. goto parse_failure;
  12058. }
  12059. return 0.0;
  12060. parse_failure:
  12061. return -1.0;
  12062. }
  12063. static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
  12064. return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
  12065. }
  12066. CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
  12067. double value;
  12068. Py_ssize_t i, digits;
  12069. const char *last = start + length;
  12070. char *end;
  12071. while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
  12072. start++;
  12073. while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
  12074. last--;
  12075. length = last - start;
  12076. if (unlikely(length <= 0)) goto fallback;
  12077. value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
  12078. if (unlikely(value == -1.0)) goto fallback;
  12079. if (value != 0.0) return value;
  12080. digits = 0;
  12081. for (i=0; i < length; digits += start[i++] != '_');
  12082. if (likely(digits == length)) {
  12083. value = PyOS_string_to_double(start, &end, NULL);
  12084. } else if (digits < 40) {
  12085. char number[40];
  12086. last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
  12087. if (unlikely(!last)) goto fallback;
  12088. value = PyOS_string_to_double(number, &end, NULL);
  12089. } else {
  12090. char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
  12091. if (unlikely(!number)) goto fallback;
  12092. last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
  12093. if (unlikely(!last)) {
  12094. PyMem_Free(number);
  12095. goto fallback;
  12096. }
  12097. value = PyOS_string_to_double(number, &end, NULL);
  12098. PyMem_Free(number);
  12099. }
  12100. if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
  12101. return value;
  12102. }
  12103. fallback:
  12104. return __Pyx_SlowPyString_AsDouble(obj);
  12105. }
  12106. /* pynumber_float */
  12107. static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) {
  12108. double val;
  12109. if (PyLong_CheckExact(obj)) {
  12110. #if CYTHON_USE_PYLONG_INTERNALS
  12111. if (likely(__Pyx_PyLong_IsCompact(obj))) {
  12112. val = (double) __Pyx_PyLong_CompactValue(obj);
  12113. goto no_error;
  12114. }
  12115. #endif
  12116. val = PyLong_AsDouble(obj);
  12117. } else if (PyUnicode_CheckExact(obj)) {
  12118. val = __Pyx_PyUnicode_AsDouble(obj);
  12119. } else if (PyBytes_CheckExact(obj)) {
  12120. val = __Pyx_PyBytes_AsDouble(obj);
  12121. } else if (PyByteArray_CheckExact(obj)) {
  12122. val = __Pyx_PyByteArray_AsDouble(obj);
  12123. } else {
  12124. return PyNumber_Float(obj);
  12125. }
  12126. if (unlikely(val == -1 && PyErr_Occurred())) {
  12127. return NULL;
  12128. }
  12129. #if CYTHON_USE_PYLONG_INTERNALS
  12130. no_error:
  12131. #endif
  12132. return PyFloat_FromDouble(val);
  12133. }
  12134. /* PyObjectVectorCallKwBuilder */
  12135. #if CYTHON_VECTORCALL
  12136. static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
  12137. (void)__Pyx_PyObject_FastCallDict;
  12138. if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
  12139. Py_INCREF(key);
  12140. args[n] = value;
  12141. return 0;
  12142. }
  12143. CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
  12144. (void)__Pyx_VectorcallBuilder_AddArgStr;
  12145. if (unlikely(!PyUnicode_Check(key))) {
  12146. PyErr_SetString(PyExc_TypeError, "keywords must be strings");
  12147. return -1;
  12148. }
  12149. return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
  12150. }
  12151. static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
  12152. PyObject *pyKey = PyUnicode_FromString(key);
  12153. if (!pyKey) return -1;
  12154. return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
  12155. }
  12156. #else // CYTHON_VECTORCALL
  12157. CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
  12158. if (unlikely(!PyUnicode_Check(key))) {
  12159. PyErr_SetString(PyExc_TypeError, "keywords must be strings");
  12160. return -1;
  12161. }
  12162. return PyDict_SetItem(builder, key, value);
  12163. }
  12164. #endif
  12165. /* IterNextPlain (used by IterNext) */
  12166. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  12167. static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) {
  12168. if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache))
  12169. __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next_3);
  12170. return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache;
  12171. }
  12172. #endif
  12173. static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) {
  12174. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  12175. PyObject *result;
  12176. PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI();
  12177. if (unlikely(!next)) return NULL;
  12178. result = PyObject_CallFunctionObjArgs(next, iterator, NULL);
  12179. return result;
  12180. #else
  12181. (void)__Pyx_GetBuiltinName; // only for early limited API
  12182. iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator);
  12183. assert(iternext);
  12184. return iternext(iterator);
  12185. #endif
  12186. }
  12187. /* IterNext */
  12188. static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
  12189. PyObject* exc_type;
  12190. __Pyx_PyThreadState_declare
  12191. __Pyx_PyThreadState_assign
  12192. exc_type = __Pyx_PyErr_CurrentExceptionType();
  12193. if (unlikely(exc_type)) {
  12194. if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
  12195. return NULL;
  12196. __Pyx_PyErr_Clear();
  12197. Py_INCREF(defval);
  12198. return defval;
  12199. }
  12200. if (defval) {
  12201. Py_INCREF(defval);
  12202. return defval;
  12203. }
  12204. __Pyx_PyErr_SetNone(PyExc_StopIteration);
  12205. return NULL;
  12206. }
  12207. static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
  12208. __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(iterator));
  12209. PyErr_Format(PyExc_TypeError,
  12210. __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name);
  12211. __Pyx_DECREF_TypeName(iterator_type_name);
  12212. }
  12213. static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
  12214. PyObject* next;
  12215. #if !CYTHON_COMPILING_IN_LIMITED_API
  12216. iternextfunc iternext = __Pyx_PyObject_TryGetSlot(iterator, tp_iternext, iternextfunc);
  12217. if (likely(iternext)) {
  12218. next = iternext(iterator);
  12219. if (likely(next))
  12220. return next;
  12221. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
  12222. if (unlikely(iternext == &_PyObject_NextNotImplemented))
  12223. return NULL;
  12224. #endif
  12225. } else if (CYTHON_USE_TYPE_SLOTS) {
  12226. __Pyx_PyIter_Next_ErrorNoIterator(iterator);
  12227. return NULL;
  12228. } else
  12229. #endif
  12230. if (unlikely(!PyIter_Check(iterator))) {
  12231. __Pyx_PyIter_Next_ErrorNoIterator(iterator);
  12232. return NULL;
  12233. } else {
  12234. next = defval ? PyIter_Next(iterator) : __Pyx_PyIter_Next_Plain(iterator);
  12235. if (likely(next))
  12236. return next;
  12237. }
  12238. return __Pyx_PyIter_Next2Default(defval);
  12239. }
  12240. /* GetTopmostException (used by SaveResetException) */
  12241. #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
  12242. static _PyErr_StackItem *
  12243. __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
  12244. {
  12245. _PyErr_StackItem *exc_info = tstate->exc_info;
  12246. while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
  12247. exc_info->previous_item != NULL)
  12248. {
  12249. exc_info = exc_info->previous_item;
  12250. }
  12251. return exc_info;
  12252. }
  12253. #endif
  12254. /* SaveResetException */
  12255. #if CYTHON_FAST_THREAD_STATE
  12256. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  12257. #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
  12258. _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
  12259. PyObject *exc_value = exc_info->exc_value;
  12260. if (exc_value == NULL || exc_value == Py_None) {
  12261. *value = NULL;
  12262. *type = NULL;
  12263. *tb = NULL;
  12264. } else {
  12265. *value = exc_value;
  12266. Py_INCREF(*value);
  12267. *type = (PyObject*) Py_TYPE(exc_value);
  12268. Py_INCREF(*type);
  12269. *tb = PyException_GetTraceback(exc_value);
  12270. }
  12271. #elif CYTHON_USE_EXC_INFO_STACK
  12272. _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
  12273. *type = exc_info->exc_type;
  12274. *value = exc_info->exc_value;
  12275. *tb = exc_info->exc_traceback;
  12276. Py_XINCREF(*type);
  12277. Py_XINCREF(*value);
  12278. Py_XINCREF(*tb);
  12279. #else
  12280. *type = tstate->exc_type;
  12281. *value = tstate->exc_value;
  12282. *tb = tstate->exc_traceback;
  12283. Py_XINCREF(*type);
  12284. Py_XINCREF(*value);
  12285. Py_XINCREF(*tb);
  12286. #endif
  12287. }
  12288. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  12289. #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
  12290. _PyErr_StackItem *exc_info = tstate->exc_info;
  12291. PyObject *tmp_value = exc_info->exc_value;
  12292. exc_info->exc_value = value;
  12293. Py_XDECREF(tmp_value);
  12294. Py_XDECREF(type);
  12295. Py_XDECREF(tb);
  12296. #else
  12297. PyObject *tmp_type, *tmp_value, *tmp_tb;
  12298. #if CYTHON_USE_EXC_INFO_STACK
  12299. _PyErr_StackItem *exc_info = tstate->exc_info;
  12300. tmp_type = exc_info->exc_type;
  12301. tmp_value = exc_info->exc_value;
  12302. tmp_tb = exc_info->exc_traceback;
  12303. exc_info->exc_type = type;
  12304. exc_info->exc_value = value;
  12305. exc_info->exc_traceback = tb;
  12306. #else
  12307. tmp_type = tstate->exc_type;
  12308. tmp_value = tstate->exc_value;
  12309. tmp_tb = tstate->exc_traceback;
  12310. tstate->exc_type = type;
  12311. tstate->exc_value = value;
  12312. tstate->exc_traceback = tb;
  12313. #endif
  12314. Py_XDECREF(tmp_type);
  12315. Py_XDECREF(tmp_value);
  12316. Py_XDECREF(tmp_tb);
  12317. #endif
  12318. }
  12319. #endif
  12320. /* GetException */
  12321. #if CYTHON_FAST_THREAD_STATE
  12322. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
  12323. #else
  12324. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
  12325. #endif
  12326. {
  12327. PyObject *local_type = NULL, *local_value, *local_tb = NULL;
  12328. #if CYTHON_FAST_THREAD_STATE
  12329. PyObject *tmp_type, *tmp_value, *tmp_tb;
  12330. #if PY_VERSION_HEX >= 0x030C0000
  12331. local_value = tstate->current_exception;
  12332. tstate->current_exception = 0;
  12333. #else
  12334. local_type = tstate->curexc_type;
  12335. local_value = tstate->curexc_value;
  12336. local_tb = tstate->curexc_traceback;
  12337. tstate->curexc_type = 0;
  12338. tstate->curexc_value = 0;
  12339. tstate->curexc_traceback = 0;
  12340. #endif
  12341. #elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
  12342. local_value = PyErr_GetRaisedException();
  12343. #else
  12344. PyErr_Fetch(&local_type, &local_value, &local_tb);
  12345. #endif
  12346. #if __PYX_LIMITED_VERSION_HEX > 0x030C0000
  12347. if (likely(local_value)) {
  12348. local_type = (PyObject*) Py_TYPE(local_value);
  12349. Py_INCREF(local_type);
  12350. local_tb = PyException_GetTraceback(local_value);
  12351. }
  12352. #else
  12353. PyErr_NormalizeException(&local_type, &local_value, &local_tb);
  12354. #if CYTHON_FAST_THREAD_STATE
  12355. if (unlikely(tstate->curexc_type))
  12356. #else
  12357. if (unlikely(PyErr_Occurred()))
  12358. #endif
  12359. goto bad;
  12360. if (local_tb) {
  12361. if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
  12362. goto bad;
  12363. }
  12364. #endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
  12365. Py_XINCREF(local_tb);
  12366. Py_XINCREF(local_type);
  12367. Py_XINCREF(local_value);
  12368. *type = local_type;
  12369. *value = local_value;
  12370. *tb = local_tb;
  12371. #if CYTHON_FAST_THREAD_STATE
  12372. #if CYTHON_USE_EXC_INFO_STACK
  12373. {
  12374. _PyErr_StackItem *exc_info = tstate->exc_info;
  12375. #if PY_VERSION_HEX >= 0x030B00a4
  12376. tmp_value = exc_info->exc_value;
  12377. exc_info->exc_value = local_value;
  12378. tmp_type = NULL;
  12379. tmp_tb = NULL;
  12380. Py_XDECREF(local_type);
  12381. Py_XDECREF(local_tb);
  12382. #else
  12383. tmp_type = exc_info->exc_type;
  12384. tmp_value = exc_info->exc_value;
  12385. tmp_tb = exc_info->exc_traceback;
  12386. exc_info->exc_type = local_type;
  12387. exc_info->exc_value = local_value;
  12388. exc_info->exc_traceback = local_tb;
  12389. #endif
  12390. }
  12391. #else
  12392. tmp_type = tstate->exc_type;
  12393. tmp_value = tstate->exc_value;
  12394. tmp_tb = tstate->exc_traceback;
  12395. tstate->exc_type = local_type;
  12396. tstate->exc_value = local_value;
  12397. tstate->exc_traceback = local_tb;
  12398. #endif
  12399. Py_XDECREF(tmp_type);
  12400. Py_XDECREF(tmp_value);
  12401. Py_XDECREF(tmp_tb);
  12402. #elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
  12403. PyErr_SetHandledException(local_value);
  12404. Py_XDECREF(local_value);
  12405. Py_XDECREF(local_type);
  12406. Py_XDECREF(local_tb);
  12407. #else
  12408. PyErr_SetExcInfo(local_type, local_value, local_tb);
  12409. #endif
  12410. return 0;
  12411. #if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
  12412. bad:
  12413. *type = 0;
  12414. *value = 0;
  12415. *tb = 0;
  12416. Py_XDECREF(local_type);
  12417. Py_XDECREF(local_value);
  12418. Py_XDECREF(local_tb);
  12419. return -1;
  12420. #endif
  12421. }
  12422. /* PyObjectCallNoArg (used by PyObjectCallMethod0) */
  12423. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
  12424. PyObject *arg[2] = {NULL, NULL};
  12425. return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
  12426. }
  12427. /* PyObjectGetMethod (used by PyObjectCallMethod0) */
  12428. #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
  12429. static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
  12430. PyObject *attr;
  12431. #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
  12432. __Pyx_TypeName type_name;
  12433. PyTypeObject *tp = Py_TYPE(obj);
  12434. PyObject *descr;
  12435. descrgetfunc f = NULL;
  12436. PyObject **dictptr, *dict;
  12437. int meth_found = 0;
  12438. assert (*method == NULL);
  12439. if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
  12440. attr = __Pyx_PyObject_GetAttrStr(obj, name);
  12441. goto try_unpack;
  12442. }
  12443. if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
  12444. return 0;
  12445. }
  12446. descr = _PyType_Lookup(tp, name);
  12447. if (likely(descr != NULL)) {
  12448. Py_INCREF(descr);
  12449. #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
  12450. if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
  12451. #else
  12452. #ifdef __Pyx_CyFunction_USED
  12453. if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
  12454. #else
  12455. if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
  12456. #endif
  12457. #endif
  12458. {
  12459. meth_found = 1;
  12460. } else {
  12461. f = Py_TYPE(descr)->tp_descr_get;
  12462. if (f != NULL && PyDescr_IsData(descr)) {
  12463. attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
  12464. Py_DECREF(descr);
  12465. goto try_unpack;
  12466. }
  12467. }
  12468. }
  12469. dictptr = _PyObject_GetDictPtr(obj);
  12470. if (dictptr != NULL && (dict = *dictptr) != NULL) {
  12471. Py_INCREF(dict);
  12472. attr = __Pyx_PyDict_GetItemStr(dict, name);
  12473. if (attr != NULL) {
  12474. Py_INCREF(attr);
  12475. Py_DECREF(dict);
  12476. Py_XDECREF(descr);
  12477. goto try_unpack;
  12478. }
  12479. Py_DECREF(dict);
  12480. }
  12481. if (meth_found) {
  12482. *method = descr;
  12483. return 1;
  12484. }
  12485. if (f != NULL) {
  12486. attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
  12487. Py_DECREF(descr);
  12488. goto try_unpack;
  12489. }
  12490. if (likely(descr != NULL)) {
  12491. *method = descr;
  12492. return 0;
  12493. }
  12494. type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
  12495. PyErr_Format(PyExc_AttributeError,
  12496. "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
  12497. type_name, name);
  12498. __Pyx_DECREF_TypeName(type_name);
  12499. return 0;
  12500. #else
  12501. attr = __Pyx_PyObject_GetAttrStr(obj, name);
  12502. goto try_unpack;
  12503. #endif
  12504. try_unpack:
  12505. #if CYTHON_UNPACK_METHODS
  12506. if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
  12507. PyObject *function = PyMethod_GET_FUNCTION(attr);
  12508. Py_INCREF(function);
  12509. Py_DECREF(attr);
  12510. *method = function;
  12511. return 1;
  12512. }
  12513. #endif
  12514. *method = attr;
  12515. return 0;
  12516. }
  12517. #endif
  12518. /* PyObjectCallMethod0 (used by pop) */
  12519. static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
  12520. #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
  12521. PyObject *args[1] = {obj};
  12522. (void) __Pyx_PyObject_CallOneArg;
  12523. (void) __Pyx_PyObject_CallNoArg;
  12524. return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
  12525. #else
  12526. PyObject *method = NULL, *result = NULL;
  12527. int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
  12528. if (likely(is_method)) {
  12529. result = __Pyx_PyObject_CallOneArg(method, obj);
  12530. Py_DECREF(method);
  12531. return result;
  12532. }
  12533. if (unlikely(!method)) goto bad;
  12534. result = __Pyx_PyObject_CallNoArg(method);
  12535. Py_DECREF(method);
  12536. bad:
  12537. return result;
  12538. #endif
  12539. }
  12540. /* pop */
  12541. static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) {
  12542. if (__Pyx_IS_TYPE(L, &PySet_Type)) {
  12543. return PySet_Pop(L);
  12544. }
  12545. return __Pyx_PyObject_CallMethod0(L, __pyx_mstate_global->__pyx_n_u_pop);
  12546. }
  12547. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  12548. static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) {
  12549. if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) {
  12550. __Pyx_SET_SIZE(L, Py_SIZE(L) - 1);
  12551. return PyList_GET_ITEM(L, PyList_GET_SIZE(L));
  12552. }
  12553. return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyList_Type_pop, L);
  12554. }
  12555. #endif
  12556. /* PyObjectCall2Args (used by PyObjectCallMethod1) */
  12557. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
  12558. PyObject *args[3] = {NULL, arg1, arg2};
  12559. return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
  12560. }
  12561. /* PyObjectCallMethod1 (used by append) */
  12562. #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
  12563. static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
  12564. PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
  12565. Py_DECREF(method);
  12566. return result;
  12567. }
  12568. #endif
  12569. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
  12570. #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
  12571. PyObject *args[2] = {obj, arg};
  12572. (void) __Pyx_PyObject_CallOneArg;
  12573. (void) __Pyx_PyObject_Call2Args;
  12574. return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
  12575. #else
  12576. PyObject *method = NULL, *result;
  12577. int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
  12578. if (likely(is_method)) {
  12579. result = __Pyx_PyObject_Call2Args(method, obj, arg);
  12580. Py_DECREF(method);
  12581. return result;
  12582. }
  12583. if (unlikely(!method)) return NULL;
  12584. return __Pyx__PyObject_CallMethod1(method, arg);
  12585. #endif
  12586. }
  12587. /* append */
  12588. static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
  12589. if (likely(PyList_CheckExact(L))) {
  12590. if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
  12591. } else {
  12592. PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x);
  12593. if (unlikely(!retval))
  12594. return -1;
  12595. Py_DECREF(retval);
  12596. }
  12597. return 0;
  12598. }
  12599. /* SwapException */
  12600. #if CYTHON_FAST_THREAD_STATE
  12601. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  12602. PyObject *tmp_type, *tmp_value, *tmp_tb;
  12603. #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
  12604. _PyErr_StackItem *exc_info = tstate->exc_info;
  12605. tmp_value = exc_info->exc_value;
  12606. exc_info->exc_value = *value;
  12607. if (tmp_value == NULL || tmp_value == Py_None) {
  12608. Py_XDECREF(tmp_value);
  12609. tmp_value = NULL;
  12610. tmp_type = NULL;
  12611. tmp_tb = NULL;
  12612. } else {
  12613. tmp_type = (PyObject*) Py_TYPE(tmp_value);
  12614. Py_INCREF(tmp_type);
  12615. #if CYTHON_COMPILING_IN_CPYTHON
  12616. tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
  12617. Py_XINCREF(tmp_tb);
  12618. #else
  12619. tmp_tb = PyException_GetTraceback(tmp_value);
  12620. #endif
  12621. }
  12622. #elif CYTHON_USE_EXC_INFO_STACK
  12623. _PyErr_StackItem *exc_info = tstate->exc_info;
  12624. tmp_type = exc_info->exc_type;
  12625. tmp_value = exc_info->exc_value;
  12626. tmp_tb = exc_info->exc_traceback;
  12627. exc_info->exc_type = *type;
  12628. exc_info->exc_value = *value;
  12629. exc_info->exc_traceback = *tb;
  12630. #else
  12631. tmp_type = tstate->exc_type;
  12632. tmp_value = tstate->exc_value;
  12633. tmp_tb = tstate->exc_traceback;
  12634. tstate->exc_type = *type;
  12635. tstate->exc_value = *value;
  12636. tstate->exc_traceback = *tb;
  12637. #endif
  12638. *type = tmp_type;
  12639. *value = tmp_value;
  12640. *tb = tmp_tb;
  12641. }
  12642. #else
  12643. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
  12644. PyObject *tmp_type, *tmp_value, *tmp_tb;
  12645. PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
  12646. PyErr_SetExcInfo(*type, *value, *tb);
  12647. *type = tmp_type;
  12648. *value = tmp_value;
  12649. *tb = tmp_tb;
  12650. }
  12651. #endif
  12652. /* HasAttr */
  12653. #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
  12654. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
  12655. PyObject *r;
  12656. if (unlikely(!PyUnicode_Check(n))) {
  12657. PyErr_SetString(PyExc_TypeError,
  12658. "hasattr(): attribute name must be string");
  12659. return -1;
  12660. }
  12661. r = __Pyx_PyObject_GetAttrStrNoError(o, n);
  12662. if (!r) {
  12663. return (unlikely(PyErr_Occurred())) ? -1 : 0;
  12664. } else {
  12665. Py_DECREF(r);
  12666. return 1;
  12667. }
  12668. }
  12669. #endif
  12670. /* GetAttr3 */
  12671. #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
  12672. static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
  12673. __Pyx_PyThreadState_declare
  12674. __Pyx_PyThreadState_assign
  12675. if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
  12676. return NULL;
  12677. __Pyx_PyErr_Clear();
  12678. Py_INCREF(d);
  12679. return d;
  12680. }
  12681. #endif
  12682. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
  12683. PyObject *r;
  12684. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  12685. int res = PyObject_GetOptionalAttr(o, n, &r);
  12686. return (res != 0) ? r : __Pyx_NewRef(d);
  12687. #else
  12688. #if CYTHON_USE_TYPE_SLOTS
  12689. if (likely(PyUnicode_Check(n))) {
  12690. r = __Pyx_PyObject_GetAttrStrNoError(o, n);
  12691. if (unlikely(!r) && likely(!PyErr_Occurred())) {
  12692. r = __Pyx_NewRef(d);
  12693. }
  12694. return r;
  12695. }
  12696. #endif
  12697. r = PyObject_GetAttr(o, n);
  12698. return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
  12699. #endif
  12700. }
  12701. /* ImportImpl (used by Import) */
  12702. static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
  12703. PyObject *imported_module = PyImport_GetModule(qualname);
  12704. if (unlikely(!imported_module)) {
  12705. *module = NULL;
  12706. if (PyErr_Occurred()) {
  12707. return -1;
  12708. }
  12709. return 0;
  12710. }
  12711. *module = imported_module;
  12712. return 1;
  12713. }
  12714. static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
  12715. PyObject *imported_module;
  12716. PyObject *top_level_package_name;
  12717. Py_ssize_t i;
  12718. int status, module_found;
  12719. Py_ssize_t dot_index;
  12720. module_found = __Pyx__Import_GetModule(qualname, &imported_module);
  12721. if (unlikely(!module_found || module_found == -1)) {
  12722. *module = NULL;
  12723. return module_found;
  12724. }
  12725. if (imported_names) {
  12726. for (i = 0; i < len_imported_names; i++) {
  12727. PyObject *imported_name = imported_names[i];
  12728. #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
  12729. int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
  12730. #else
  12731. int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
  12732. if (unlikely(has_imported_attribute == -1)) goto error;
  12733. #endif
  12734. if (!has_imported_attribute) {
  12735. goto not_found;
  12736. }
  12737. }
  12738. *module = imported_module;
  12739. return 1;
  12740. }
  12741. dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
  12742. if (dot_index == -1) {
  12743. *module = imported_module;
  12744. return 1;
  12745. }
  12746. if (unlikely(dot_index == -2)) goto error;
  12747. top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
  12748. if (unlikely(!top_level_package_name)) goto error;
  12749. Py_DECREF(imported_module);
  12750. status = __Pyx__Import_GetModule(top_level_package_name, module);
  12751. Py_DECREF(top_level_package_name);
  12752. return status;
  12753. error:
  12754. Py_DECREF(imported_module);
  12755. *module = NULL;
  12756. return -1;
  12757. not_found:
  12758. Py_DECREF(imported_module);
  12759. *module = NULL;
  12760. return 0;
  12761. }
  12762. static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
  12763. PyObject *module = 0;
  12764. PyObject *empty_dict = 0;
  12765. PyObject *from_list = 0;
  12766. int module_found;
  12767. if (!qualname) {
  12768. qualname = name;
  12769. }
  12770. module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
  12771. if (likely(module_found == 1)) {
  12772. return module;
  12773. } else if (unlikely(module_found == -1)) {
  12774. return NULL;
  12775. }
  12776. empty_dict = PyDict_New();
  12777. if (unlikely(!empty_dict))
  12778. goto bad;
  12779. if (imported_names) {
  12780. #if CYTHON_COMPILING_IN_CPYTHON
  12781. from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
  12782. if (unlikely(!from_list))
  12783. goto bad;
  12784. #else
  12785. from_list = PyList_New(len_imported_names);
  12786. if (unlikely(!from_list)) goto bad;
  12787. for (Py_ssize_t i=0; i<len_imported_names; ++i) {
  12788. if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
  12789. }
  12790. #endif
  12791. }
  12792. if (level == -1) {
  12793. const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
  12794. if (package_sep != (0)) {
  12795. module = PyImport_ImportModuleLevelObject(
  12796. name, moddict, empty_dict, from_list, 1);
  12797. if (unlikely(!module)) {
  12798. if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
  12799. goto bad;
  12800. PyErr_Clear();
  12801. }
  12802. }
  12803. level = 0;
  12804. }
  12805. if (!module) {
  12806. module = PyImport_ImportModuleLevelObject(
  12807. name, moddict, empty_dict, from_list, level);
  12808. }
  12809. bad:
  12810. Py_XDECREF(from_list);
  12811. Py_XDECREF(empty_dict);
  12812. return module;
  12813. }
  12814. /* Import */
  12815. static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
  12816. return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
  12817. }
  12818. /* ImportFrom */
  12819. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
  12820. PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
  12821. if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
  12822. const char* module_name_str = 0;
  12823. PyObject* module_name = 0;
  12824. PyObject* module_dot = 0;
  12825. PyObject* full_name = 0;
  12826. PyErr_Clear();
  12827. module_name_str = PyModule_GetName(module);
  12828. if (unlikely(!module_name_str)) { goto modbad; }
  12829. module_name = PyUnicode_FromString(module_name_str);
  12830. if (unlikely(!module_name)) { goto modbad; }
  12831. module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__8);
  12832. if (unlikely(!module_dot)) { goto modbad; }
  12833. full_name = PyUnicode_Concat(module_dot, name);
  12834. if (unlikely(!full_name)) { goto modbad; }
  12835. #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\
  12836. CYTHON_COMPILING_IN_GRAAL
  12837. {
  12838. PyObject *modules = PyImport_GetModuleDict();
  12839. if (unlikely(!modules))
  12840. goto modbad;
  12841. value = PyObject_GetItem(modules, full_name);
  12842. }
  12843. #else
  12844. value = PyImport_GetModule(full_name);
  12845. #endif
  12846. modbad:
  12847. Py_XDECREF(full_name);
  12848. Py_XDECREF(module_dot);
  12849. Py_XDECREF(module_name);
  12850. }
  12851. if (unlikely(!value)) {
  12852. PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
  12853. }
  12854. return value;
  12855. }
  12856. /* Py3UpdateBases */
  12857. static PyObject*
  12858. __Pyx_PEP560_update_bases(PyObject *bases)
  12859. {
  12860. Py_ssize_t i, j, size_bases;
  12861. PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
  12862. #if CYTHON_ASSUME_SAFE_SIZE
  12863. size_bases = PyTuple_GET_SIZE(bases);
  12864. #else
  12865. size_bases = PyTuple_Size(bases);
  12866. if (size_bases < 0) return NULL;
  12867. #endif
  12868. for (i = 0; i < size_bases; i++) {
  12869. #if CYTHON_AVOID_BORROWED_REFS
  12870. Py_CLEAR(base);
  12871. #endif
  12872. #if CYTHON_ASSUME_SAFE_MACROS
  12873. base = PyTuple_GET_ITEM(bases, i);
  12874. #else
  12875. base = PyTuple_GetItem(bases, i);
  12876. if (!base) goto error;
  12877. #endif
  12878. #if CYTHON_AVOID_BORROWED_REFS
  12879. Py_INCREF(base);
  12880. #endif
  12881. if (PyType_Check(base)) {
  12882. if (new_bases) {
  12883. if (PyList_Append(new_bases, base) < 0) {
  12884. goto error;
  12885. }
  12886. }
  12887. continue;
  12888. }
  12889. meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
  12890. if (!meth && PyErr_Occurred()) {
  12891. goto error;
  12892. }
  12893. if (!meth) {
  12894. if (new_bases) {
  12895. if (PyList_Append(new_bases, base) < 0) {
  12896. goto error;
  12897. }
  12898. }
  12899. continue;
  12900. }
  12901. new_base = __Pyx_PyObject_CallOneArg(meth, bases);
  12902. Py_DECREF(meth);
  12903. if (!new_base) {
  12904. goto error;
  12905. }
  12906. if (!PyTuple_Check(new_base)) {
  12907. PyErr_SetString(PyExc_TypeError,
  12908. "__mro_entries__ must return a tuple");
  12909. Py_DECREF(new_base);
  12910. goto error;
  12911. }
  12912. if (!new_bases) {
  12913. if (!(new_bases = PyList_New(i))) {
  12914. goto error;
  12915. }
  12916. for (j = 0; j < i; j++) {
  12917. PyObject *base_from_list;
  12918. #if CYTHON_ASSUME_SAFE_MACROS
  12919. base_from_list = PyTuple_GET_ITEM(bases, j);
  12920. PyList_SET_ITEM(new_bases, j, base_from_list);
  12921. Py_INCREF(base_from_list);
  12922. #else
  12923. base_from_list = PyTuple_GetItem(bases, j);
  12924. if (!base_from_list) goto error;
  12925. Py_INCREF(base_from_list);
  12926. if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
  12927. #endif
  12928. }
  12929. }
  12930. #if CYTHON_ASSUME_SAFE_SIZE
  12931. j = PyList_GET_SIZE(new_bases);
  12932. #else
  12933. j = PyList_Size(new_bases);
  12934. if (j < 0) goto error;
  12935. #endif
  12936. if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
  12937. goto error;
  12938. }
  12939. Py_DECREF(new_base);
  12940. }
  12941. if (!new_bases) {
  12942. Py_INCREF(bases);
  12943. return bases;
  12944. }
  12945. result = PyList_AsTuple(new_bases);
  12946. Py_DECREF(new_bases);
  12947. #if CYTHON_AVOID_BORROWED_REFS
  12948. Py_XDECREF(base);
  12949. #endif
  12950. return result;
  12951. error:
  12952. Py_XDECREF(new_bases);
  12953. #if CYTHON_AVOID_BORROWED_REFS
  12954. Py_XDECREF(base);
  12955. #endif
  12956. return NULL;
  12957. }
  12958. /* CalculateMetaclass */
  12959. static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
  12960. Py_ssize_t i, nbases;
  12961. #if CYTHON_ASSUME_SAFE_SIZE
  12962. nbases = PyTuple_GET_SIZE(bases);
  12963. #else
  12964. nbases = PyTuple_Size(bases);
  12965. if (nbases < 0) return NULL;
  12966. #endif
  12967. for (i=0; i < nbases; i++) {
  12968. PyTypeObject *tmptype;
  12969. #if CYTHON_ASSUME_SAFE_MACROS
  12970. PyObject *tmp = PyTuple_GET_ITEM(bases, i);
  12971. #else
  12972. PyObject *tmp = PyTuple_GetItem(bases, i);
  12973. if (!tmp) return NULL;
  12974. #endif
  12975. tmptype = Py_TYPE(tmp);
  12976. if (!metaclass) {
  12977. metaclass = tmptype;
  12978. continue;
  12979. }
  12980. if (PyType_IsSubtype(metaclass, tmptype))
  12981. continue;
  12982. if (PyType_IsSubtype(tmptype, metaclass)) {
  12983. metaclass = tmptype;
  12984. continue;
  12985. }
  12986. PyErr_SetString(PyExc_TypeError,
  12987. "metaclass conflict: "
  12988. "the metaclass of a derived class "
  12989. "must be a (non-strict) subclass "
  12990. "of the metaclasses of all its bases");
  12991. return NULL;
  12992. }
  12993. if (!metaclass) {
  12994. metaclass = &PyType_Type;
  12995. }
  12996. Py_INCREF((PyObject*) metaclass);
  12997. return (PyObject*) metaclass;
  12998. }
  12999. /* dict_setdefault (used by FetchCommonType) */
  13000. static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
  13001. PyObject* value;
  13002. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
  13003. PyObject *args[] = {d, key, default_value};
  13004. value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
  13005. #elif CYTHON_COMPILING_IN_LIMITED_API
  13006. value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
  13007. #elif PY_VERSION_HEX >= 0x030d0000
  13008. PyDict_SetDefaultRef(d, key, default_value, &value);
  13009. #else
  13010. value = PyDict_SetDefault(d, key, default_value);
  13011. if (unlikely(!value)) return NULL;
  13012. Py_INCREF(value);
  13013. #endif
  13014. return value;
  13015. }
  13016. /* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
  13017. #if CYTHON_COMPILING_IN_LIMITED_API
  13018. static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
  13019. PyObject *tp_dictoffset_o;
  13020. Py_ssize_t tp_dictoffset;
  13021. tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
  13022. if (unlikely(!tp_dictoffset_o)) return -1;
  13023. tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
  13024. Py_DECREF(tp_dictoffset_o);
  13025. if (unlikely(tp_dictoffset == 0)) {
  13026. PyErr_SetString(
  13027. PyExc_TypeError,
  13028. "'type' doesn't have a dictoffset");
  13029. return -1;
  13030. } else if (unlikely(tp_dictoffset < 0)) {
  13031. PyErr_SetString(
  13032. PyExc_TypeError,
  13033. "'type' has an unexpected negative dictoffset. "
  13034. "Please report this as Cython bug");
  13035. return -1;
  13036. }
  13037. return tp_dictoffset;
  13038. }
  13039. static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
  13040. static Py_ssize_t tp_dictoffset = 0;
  13041. if (unlikely(tp_dictoffset == 0)) {
  13042. tp_dictoffset = __Pyx_GetTypeDictOffset();
  13043. if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
  13044. tp_dictoffset = 0; // try again next time?
  13045. return NULL;
  13046. }
  13047. }
  13048. return *(PyObject**)((char*)tp + tp_dictoffset);
  13049. }
  13050. #endif
  13051. /* SetItemOnTypeDict (used by FixUpExtensionType) */
  13052. static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
  13053. int result;
  13054. PyObject *tp_dict;
  13055. #if CYTHON_COMPILING_IN_LIMITED_API
  13056. tp_dict = __Pyx_GetTypeDict(tp);
  13057. if (unlikely(!tp_dict)) return -1;
  13058. #else
  13059. tp_dict = tp->tp_dict;
  13060. #endif
  13061. result = PyDict_SetItem(tp_dict, k, v);
  13062. if (likely(!result)) {
  13063. PyType_Modified(tp);
  13064. if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
  13065. PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL);
  13066. if (!setNameResult) return -1;
  13067. Py_DECREF(setNameResult);
  13068. }
  13069. }
  13070. return result;
  13071. }
  13072. /* FixUpExtensionType (used by FetchCommonType) */
  13073. static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
  13074. #if __PYX_LIMITED_VERSION_HEX > 0x030900B1
  13075. CYTHON_UNUSED_VAR(spec);
  13076. CYTHON_UNUSED_VAR(type);
  13077. CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
  13078. #else
  13079. const PyType_Slot *slot = spec->slots;
  13080. int changed = 0;
  13081. #if !CYTHON_COMPILING_IN_LIMITED_API
  13082. while (slot && slot->slot && slot->slot != Py_tp_members)
  13083. slot++;
  13084. if (slot && slot->slot == Py_tp_members) {
  13085. #if !CYTHON_COMPILING_IN_CPYTHON
  13086. const
  13087. #endif // !CYTHON_COMPILING_IN_CPYTHON)
  13088. PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
  13089. while (memb && memb->name) {
  13090. if (memb->name[0] == '_' && memb->name[1] == '_') {
  13091. if (strcmp(memb->name, "__weaklistoffset__") == 0) {
  13092. assert(memb->type == T_PYSSIZET);
  13093. assert(memb->flags == READONLY);
  13094. type->tp_weaklistoffset = memb->offset;
  13095. changed = 1;
  13096. }
  13097. else if (strcmp(memb->name, "__dictoffset__") == 0) {
  13098. assert(memb->type == T_PYSSIZET);
  13099. assert(memb->flags == READONLY);
  13100. type->tp_dictoffset = memb->offset;
  13101. changed = 1;
  13102. }
  13103. #if CYTHON_METH_FASTCALL
  13104. else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
  13105. assert(memb->type == T_PYSSIZET);
  13106. assert(memb->flags == READONLY);
  13107. type->tp_vectorcall_offset = memb->offset;
  13108. changed = 1;
  13109. }
  13110. #endif // CYTHON_METH_FASTCALL
  13111. #if !CYTHON_COMPILING_IN_PYPY
  13112. else if (strcmp(memb->name, "__module__") == 0) {
  13113. PyObject *descr;
  13114. assert(memb->type == T_OBJECT);
  13115. assert(memb->flags == 0 || memb->flags == READONLY);
  13116. descr = PyDescr_NewMember(type, memb);
  13117. if (unlikely(!descr))
  13118. return -1;
  13119. int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
  13120. Py_DECREF(descr);
  13121. if (unlikely(set_item_result < 0)) {
  13122. return -1;
  13123. }
  13124. changed = 1;
  13125. }
  13126. #endif // !CYTHON_COMPILING_IN_PYPY
  13127. }
  13128. memb++;
  13129. }
  13130. }
  13131. #endif // !CYTHON_COMPILING_IN_LIMITED_API
  13132. #if !CYTHON_COMPILING_IN_PYPY
  13133. slot = spec->slots;
  13134. while (slot && slot->slot && slot->slot != Py_tp_getset)
  13135. slot++;
  13136. if (slot && slot->slot == Py_tp_getset) {
  13137. PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
  13138. while (getset && getset->name) {
  13139. if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
  13140. PyObject *descr = PyDescr_NewGetSet(type, getset);
  13141. if (unlikely(!descr))
  13142. return -1;
  13143. #if CYTHON_COMPILING_IN_LIMITED_API
  13144. PyObject *pyname = PyUnicode_FromString(getset->name);
  13145. if (unlikely(!pyname)) {
  13146. Py_DECREF(descr);
  13147. return -1;
  13148. }
  13149. int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
  13150. Py_DECREF(pyname);
  13151. #else
  13152. CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
  13153. int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
  13154. #endif
  13155. Py_DECREF(descr);
  13156. if (unlikely(set_item_result < 0)) {
  13157. return -1;
  13158. }
  13159. changed = 1;
  13160. }
  13161. ++getset;
  13162. }
  13163. }
  13164. #else
  13165. CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
  13166. #endif // !CYTHON_COMPILING_IN_PYPY
  13167. if (changed)
  13168. PyType_Modified(type);
  13169. #endif // PY_VERSION_HEX > 0x030900B1
  13170. return 0;
  13171. }
  13172. /* AddModuleRef (used by FetchSharedCythonModule) */
  13173. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  13174. static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
  13175. PyObject *module_dict = PyImport_GetModuleDict();
  13176. PyObject *m;
  13177. if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
  13178. return NULL;
  13179. }
  13180. if (m != NULL && PyModule_Check(m)) {
  13181. return m;
  13182. }
  13183. Py_XDECREF(m);
  13184. m = PyModule_NewObject(name);
  13185. if (m == NULL)
  13186. return NULL;
  13187. if (PyDict_CheckExact(module_dict)) {
  13188. PyObject *new_m;
  13189. (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
  13190. Py_DECREF(m);
  13191. return new_m;
  13192. } else {
  13193. if (PyObject_SetItem(module_dict, name, m) != 0) {
  13194. Py_DECREF(m);
  13195. return NULL;
  13196. }
  13197. return m;
  13198. }
  13199. }
  13200. static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
  13201. PyObject *py_name = PyUnicode_FromString(name);
  13202. if (!py_name) return NULL;
  13203. PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
  13204. Py_DECREF(py_name);
  13205. return module;
  13206. }
  13207. #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  13208. #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
  13209. #else
  13210. static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
  13211. PyObject *module = PyImport_AddModule(name);
  13212. Py_XINCREF(module);
  13213. return module;
  13214. }
  13215. #endif
  13216. /* FetchSharedCythonModule (used by FetchCommonType) */
  13217. static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
  13218. return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
  13219. }
  13220. /* FetchCommonType (used by CommonTypesMetaclass) */
  13221. #if __PYX_LIMITED_VERSION_HEX < 0x030C0000
  13222. static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
  13223. PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
  13224. if (result && metaclass) {
  13225. PyObject *old_tp = (PyObject*)Py_TYPE(result);
  13226. Py_INCREF((PyObject*)metaclass);
  13227. #if __PYX_LIMITED_VERSION_HEX >= 0x03090000
  13228. Py_SET_TYPE(result, metaclass);
  13229. #else
  13230. result->ob_type = metaclass;
  13231. #endif
  13232. Py_DECREF(old_tp);
  13233. }
  13234. return result;
  13235. }
  13236. #else
  13237. #define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
  13238. #endif
  13239. static int __Pyx_VerifyCachedType(PyObject *cached_type,
  13240. const char *name,
  13241. Py_ssize_t expected_basicsize) {
  13242. Py_ssize_t basicsize;
  13243. if (!PyType_Check(cached_type)) {
  13244. PyErr_Format(PyExc_TypeError,
  13245. "Shared Cython type %.200s is not a type object", name);
  13246. return -1;
  13247. }
  13248. if (expected_basicsize == 0) {
  13249. return 0; // size is inherited, nothing useful to check
  13250. }
  13251. #if CYTHON_COMPILING_IN_LIMITED_API
  13252. PyObject *py_basicsize;
  13253. py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
  13254. if (unlikely(!py_basicsize)) return -1;
  13255. basicsize = PyLong_AsSsize_t(py_basicsize);
  13256. Py_DECREF(py_basicsize);
  13257. py_basicsize = NULL;
  13258. if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
  13259. #else
  13260. basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
  13261. #endif
  13262. if (basicsize != expected_basicsize) {
  13263. PyErr_Format(PyExc_TypeError,
  13264. "Shared Cython type %.200s has the wrong size, try recompiling",
  13265. name);
  13266. return -1;
  13267. }
  13268. return 0;
  13269. }
  13270. static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
  13271. PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
  13272. int get_item_ref_result;
  13273. const char* object_name = strrchr(spec->name, '.');
  13274. object_name = object_name ? object_name+1 : spec->name;
  13275. py_object_name = PyUnicode_FromString(object_name);
  13276. if (!py_object_name) return NULL;
  13277. abi_module = __Pyx_FetchSharedCythonABIModule();
  13278. if (!abi_module) goto done;
  13279. abi_module_dict = PyModule_GetDict(abi_module);
  13280. if (!abi_module_dict) goto done;
  13281. get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
  13282. if (get_item_ref_result == 1) {
  13283. if (__Pyx_VerifyCachedType(
  13284. cached_type,
  13285. object_name,
  13286. spec->basicsize) < 0) {
  13287. goto bad;
  13288. }
  13289. goto done;
  13290. } else if (unlikely(get_item_ref_result == -1)) {
  13291. goto bad;
  13292. }
  13293. cached_type = __Pyx_PyType_FromMetaclass(
  13294. metaclass,
  13295. CYTHON_USE_MODULE_STATE ? module : abi_module,
  13296. spec, bases);
  13297. if (unlikely(!cached_type)) goto bad;
  13298. if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
  13299. new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
  13300. if (unlikely(new_cached_type != cached_type)) {
  13301. if (unlikely(!new_cached_type)) goto bad;
  13302. Py_DECREF(cached_type);
  13303. cached_type = new_cached_type;
  13304. if (__Pyx_VerifyCachedType(
  13305. cached_type,
  13306. object_name,
  13307. spec->basicsize) < 0) {
  13308. goto bad;
  13309. }
  13310. goto done;
  13311. } else {
  13312. Py_DECREF(new_cached_type);
  13313. }
  13314. done:
  13315. Py_XDECREF(abi_module);
  13316. Py_DECREF(py_object_name);
  13317. assert(cached_type == NULL || PyType_Check(cached_type));
  13318. return (PyTypeObject *) cached_type;
  13319. bad:
  13320. Py_XDECREF(cached_type);
  13321. cached_type = NULL;
  13322. goto done;
  13323. }
  13324. /* CommonTypesMetaclass (used by CythonFunctionShared) */
  13325. static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
  13326. return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
  13327. }
  13328. #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
  13329. static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
  13330. PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
  13331. return NULL;
  13332. }
  13333. static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
  13334. PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
  13335. return -1;
  13336. }
  13337. #endif
  13338. static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
  13339. {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
  13340. {0, 0, 0, 0, 0}
  13341. };
  13342. static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
  13343. {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
  13344. #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
  13345. {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
  13346. {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
  13347. {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
  13348. #endif
  13349. {0, 0}
  13350. };
  13351. static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
  13352. __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
  13353. 0,
  13354. 0,
  13355. Py_TPFLAGS_IMMUTABLETYPE |
  13356. Py_TPFLAGS_DISALLOW_INSTANTIATION |
  13357. Py_TPFLAGS_DEFAULT,
  13358. __pyx_CommonTypesMetaclass_slots
  13359. };
  13360. static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
  13361. __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
  13362. PyObject *bases = PyTuple_Pack(1, &PyType_Type);
  13363. if (unlikely(!bases)) {
  13364. return -1;
  13365. }
  13366. mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
  13367. Py_DECREF(bases);
  13368. if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
  13369. return -1;
  13370. }
  13371. return 0;
  13372. }
  13373. /* CallTypeTraverse (used by CythonFunctionShared) */
  13374. #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
  13375. #else
  13376. static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
  13377. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
  13378. if (__Pyx_get_runtime_version() < 0x03090000) return 0;
  13379. #endif
  13380. if (!always_call) {
  13381. PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
  13382. unsigned long flags = PyType_GetFlags(base);
  13383. if (flags & Py_TPFLAGS_HEAPTYPE) {
  13384. return 0;
  13385. }
  13386. }
  13387. Py_VISIT((PyObject*)Py_TYPE(o));
  13388. return 0;
  13389. }
  13390. #endif
  13391. /* PyMethodNew (used by CythonFunctionShared) */
  13392. #if CYTHON_COMPILING_IN_LIMITED_API
  13393. static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
  13394. PyObject *result;
  13395. CYTHON_UNUSED_VAR(typ);
  13396. if (!self)
  13397. return __Pyx_NewRef(func);
  13398. #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
  13399. {
  13400. PyObject *args[] = {func, self};
  13401. result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
  13402. }
  13403. #else
  13404. result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
  13405. #endif
  13406. return result;
  13407. }
  13408. #else
  13409. static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
  13410. CYTHON_UNUSED_VAR(typ);
  13411. if (!self)
  13412. return __Pyx_NewRef(func);
  13413. return PyMethod_New(func, self);
  13414. }
  13415. #endif
  13416. /* PyVectorcallFastCallDict (used by CythonFunctionShared) */
  13417. #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
  13418. static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
  13419. {
  13420. PyObject *res = NULL;
  13421. PyObject *kwnames;
  13422. PyObject **newargs;
  13423. PyObject **kwvalues;
  13424. Py_ssize_t i;
  13425. #if CYTHON_AVOID_BORROWED_REFS
  13426. PyObject *pos;
  13427. #else
  13428. Py_ssize_t pos;
  13429. #endif
  13430. size_t j;
  13431. PyObject *key, *value;
  13432. unsigned long keys_are_strings;
  13433. #if !CYTHON_ASSUME_SAFE_SIZE
  13434. Py_ssize_t nkw = PyDict_Size(kw);
  13435. if (unlikely(nkw == -1)) return NULL;
  13436. #else
  13437. Py_ssize_t nkw = PyDict_GET_SIZE(kw);
  13438. #endif
  13439. newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
  13440. if (unlikely(newargs == NULL)) {
  13441. PyErr_NoMemory();
  13442. return NULL;
  13443. }
  13444. for (j = 0; j < nargs; j++) newargs[j] = args[j];
  13445. kwnames = PyTuple_New(nkw);
  13446. if (unlikely(kwnames == NULL)) {
  13447. PyMem_Free(newargs);
  13448. return NULL;
  13449. }
  13450. kwvalues = newargs + nargs;
  13451. pos = 0;
  13452. i = 0;
  13453. keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
  13454. while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
  13455. keys_are_strings &=
  13456. #if CYTHON_COMPILING_IN_LIMITED_API
  13457. PyType_GetFlags(Py_TYPE(key));
  13458. #else
  13459. Py_TYPE(key)->tp_flags;
  13460. #endif
  13461. #if !CYTHON_ASSUME_SAFE_MACROS
  13462. if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
  13463. #else
  13464. PyTuple_SET_ITEM(kwnames, i, key);
  13465. #endif
  13466. kwvalues[i] = value;
  13467. i++;
  13468. }
  13469. if (unlikely(!keys_are_strings)) {
  13470. PyErr_SetString(PyExc_TypeError, "keywords must be strings");
  13471. goto cleanup;
  13472. }
  13473. res = vc(func, newargs, nargs, kwnames);
  13474. cleanup:
  13475. #if CYTHON_AVOID_BORROWED_REFS
  13476. Py_DECREF(pos);
  13477. #endif
  13478. Py_DECREF(kwnames);
  13479. for (i = 0; i < nkw; i++)
  13480. Py_DECREF(kwvalues[i]);
  13481. PyMem_Free(newargs);
  13482. return res;
  13483. }
  13484. static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
  13485. {
  13486. Py_ssize_t kw_size =
  13487. likely(kw == NULL) ?
  13488. 0 :
  13489. #if !CYTHON_ASSUME_SAFE_SIZE
  13490. PyDict_Size(kw);
  13491. #else
  13492. PyDict_GET_SIZE(kw);
  13493. #endif
  13494. if (kw_size == 0) {
  13495. return vc(func, args, nargs, NULL);
  13496. }
  13497. #if !CYTHON_ASSUME_SAFE_SIZE
  13498. else if (unlikely(kw_size == -1)) {
  13499. return NULL;
  13500. }
  13501. #endif
  13502. return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
  13503. }
  13504. #endif
  13505. /* CythonFunctionShared (used by CythonFunction) */
  13506. #if CYTHON_COMPILING_IN_LIMITED_API
  13507. static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
  13508. if (__Pyx_CyFunction_Check(func)) {
  13509. return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
  13510. } else if (PyCFunction_Check(func)) {
  13511. return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
  13512. }
  13513. return 0;
  13514. }
  13515. static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
  13516. if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
  13517. int result;
  13518. PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
  13519. if (unlikely(!newFunc)) {
  13520. PyErr_Clear(); // It's only an optimization, so don't throw an error
  13521. return 0;
  13522. }
  13523. result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
  13524. Py_DECREF(newFunc);
  13525. return result;
  13526. }
  13527. return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
  13528. }
  13529. #else
  13530. static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
  13531. if (PyMethod_Check(func)) {
  13532. func = PyMethod_GET_FUNCTION(func);
  13533. }
  13534. return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
  13535. }
  13536. #endif
  13537. static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
  13538. #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  13539. __Pyx_Py_XDECREF_SET(
  13540. __Pyx_CyFunction_GetClassObj(f),
  13541. ((classobj) ? __Pyx_NewRef(classobj) : NULL));
  13542. #else
  13543. __Pyx_Py_XDECREF_SET(
  13544. ((PyCMethodObject *) (f))->mm_class,
  13545. (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
  13546. #endif
  13547. }
  13548. static PyObject *
  13549. __Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
  13550. {
  13551. if (unlikely(op->func_doc == NULL)) {
  13552. #if CYTHON_COMPILING_IN_LIMITED_API
  13553. op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
  13554. if (unlikely(!op->func_doc)) return NULL;
  13555. #else
  13556. if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
  13557. op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
  13558. if (unlikely(op->func_doc == NULL))
  13559. return NULL;
  13560. } else {
  13561. Py_INCREF(Py_None);
  13562. return Py_None;
  13563. }
  13564. #endif
  13565. }
  13566. Py_INCREF(op->func_doc);
  13567. return op->func_doc;
  13568. }
  13569. static PyObject *
  13570. __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
  13571. PyObject *result;
  13572. CYTHON_UNUSED_VAR(closure);
  13573. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13574. result = __Pyx_CyFunction_get_doc_locked(op);
  13575. __Pyx_END_CRITICAL_SECTION();
  13576. return result;
  13577. }
  13578. static int
  13579. __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
  13580. {
  13581. CYTHON_UNUSED_VAR(context);
  13582. if (value == NULL) {
  13583. value = Py_None;
  13584. }
  13585. Py_INCREF(value);
  13586. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13587. __Pyx_Py_XDECREF_SET(op->func_doc, value);
  13588. __Pyx_END_CRITICAL_SECTION();
  13589. return 0;
  13590. }
  13591. static PyObject *
  13592. __Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
  13593. {
  13594. if (unlikely(op->func_name == NULL)) {
  13595. #if CYTHON_COMPILING_IN_LIMITED_API
  13596. op->func_name = PyObject_GetAttrString(op->func, "__name__");
  13597. #else
  13598. op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
  13599. #endif
  13600. if (unlikely(op->func_name == NULL))
  13601. return NULL;
  13602. }
  13603. Py_INCREF(op->func_name);
  13604. return op->func_name;
  13605. }
  13606. static PyObject *
  13607. __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
  13608. {
  13609. PyObject *result = NULL;
  13610. CYTHON_UNUSED_VAR(context);
  13611. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13612. result = __Pyx_CyFunction_get_name_locked(op);
  13613. __Pyx_END_CRITICAL_SECTION();
  13614. return result;
  13615. }
  13616. static int
  13617. __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
  13618. {
  13619. CYTHON_UNUSED_VAR(context);
  13620. if (unlikely(value == NULL || !PyUnicode_Check(value))) {
  13621. PyErr_SetString(PyExc_TypeError,
  13622. "__name__ must be set to a string object");
  13623. return -1;
  13624. }
  13625. Py_INCREF(value);
  13626. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13627. __Pyx_Py_XDECREF_SET(op->func_name, value);
  13628. __Pyx_END_CRITICAL_SECTION();
  13629. return 0;
  13630. }
  13631. static PyObject *
  13632. __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
  13633. {
  13634. CYTHON_UNUSED_VAR(context);
  13635. PyObject *result;
  13636. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13637. Py_INCREF(op->func_qualname);
  13638. result = op->func_qualname;
  13639. __Pyx_END_CRITICAL_SECTION();
  13640. return result;
  13641. }
  13642. static int
  13643. __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
  13644. {
  13645. CYTHON_UNUSED_VAR(context);
  13646. if (unlikely(value == NULL || !PyUnicode_Check(value))) {
  13647. PyErr_SetString(PyExc_TypeError,
  13648. "__qualname__ must be set to a string object");
  13649. return -1;
  13650. }
  13651. Py_INCREF(value);
  13652. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13653. __Pyx_Py_XDECREF_SET(op->func_qualname, value);
  13654. __Pyx_END_CRITICAL_SECTION();
  13655. return 0;
  13656. }
  13657. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  13658. static PyObject *
  13659. __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
  13660. {
  13661. CYTHON_UNUSED_VAR(context);
  13662. if (unlikely(op->func_dict == NULL)) {
  13663. op->func_dict = PyDict_New();
  13664. if (unlikely(op->func_dict == NULL))
  13665. return NULL;
  13666. }
  13667. Py_INCREF(op->func_dict);
  13668. return op->func_dict;
  13669. }
  13670. #endif
  13671. static PyObject *
  13672. __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
  13673. {
  13674. CYTHON_UNUSED_VAR(context);
  13675. Py_INCREF(op->func_globals);
  13676. return op->func_globals;
  13677. }
  13678. static PyObject *
  13679. __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
  13680. {
  13681. CYTHON_UNUSED_VAR(op);
  13682. CYTHON_UNUSED_VAR(context);
  13683. Py_INCREF(Py_None);
  13684. return Py_None;
  13685. }
  13686. static PyObject *
  13687. __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
  13688. {
  13689. PyObject* result = (op->func_code) ? op->func_code : Py_None;
  13690. CYTHON_UNUSED_VAR(context);
  13691. Py_INCREF(result);
  13692. return result;
  13693. }
  13694. static int
  13695. __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
  13696. int result = 0;
  13697. PyObject *res = op->defaults_getter((PyObject *) op);
  13698. if (unlikely(!res))
  13699. return -1;
  13700. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  13701. op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
  13702. Py_INCREF(op->defaults_tuple);
  13703. op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
  13704. Py_INCREF(op->defaults_kwdict);
  13705. #else
  13706. op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
  13707. if (unlikely(!op->defaults_tuple)) result = -1;
  13708. else {
  13709. op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
  13710. if (unlikely(!op->defaults_kwdict)) result = -1;
  13711. }
  13712. #endif
  13713. Py_DECREF(res);
  13714. return result;
  13715. }
  13716. static int
  13717. __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
  13718. CYTHON_UNUSED_VAR(context);
  13719. if (!value) {
  13720. value = Py_None;
  13721. } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
  13722. PyErr_SetString(PyExc_TypeError,
  13723. "__defaults__ must be set to a tuple object");
  13724. return -1;
  13725. }
  13726. PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
  13727. "currently affect the values used in function calls", 1);
  13728. Py_INCREF(value);
  13729. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13730. __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
  13731. __Pyx_END_CRITICAL_SECTION();
  13732. return 0;
  13733. }
  13734. static PyObject *
  13735. __Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
  13736. PyObject* result = op->defaults_tuple;
  13737. if (unlikely(!result)) {
  13738. if (op->defaults_getter) {
  13739. if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
  13740. result = op->defaults_tuple;
  13741. } else {
  13742. result = Py_None;
  13743. }
  13744. }
  13745. Py_INCREF(result);
  13746. return result;
  13747. }
  13748. static PyObject *
  13749. __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
  13750. PyObject* result = NULL;
  13751. CYTHON_UNUSED_VAR(context);
  13752. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13753. result = __Pyx_CyFunction_get_defaults_locked(op);
  13754. __Pyx_END_CRITICAL_SECTION();
  13755. return result;
  13756. }
  13757. static int
  13758. __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
  13759. CYTHON_UNUSED_VAR(context);
  13760. if (!value) {
  13761. value = Py_None;
  13762. } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
  13763. PyErr_SetString(PyExc_TypeError,
  13764. "__kwdefaults__ must be set to a dict object");
  13765. return -1;
  13766. }
  13767. PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
  13768. "currently affect the values used in function calls", 1);
  13769. Py_INCREF(value);
  13770. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13771. __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
  13772. __Pyx_END_CRITICAL_SECTION();
  13773. return 0;
  13774. }
  13775. static PyObject *
  13776. __Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
  13777. PyObject* result = op->defaults_kwdict;
  13778. if (unlikely(!result)) {
  13779. if (op->defaults_getter) {
  13780. if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
  13781. result = op->defaults_kwdict;
  13782. } else {
  13783. result = Py_None;
  13784. }
  13785. }
  13786. Py_INCREF(result);
  13787. return result;
  13788. }
  13789. static PyObject *
  13790. __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
  13791. PyObject* result;
  13792. CYTHON_UNUSED_VAR(context);
  13793. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13794. result = __Pyx_CyFunction_get_kwdefaults_locked(op);
  13795. __Pyx_END_CRITICAL_SECTION();
  13796. return result;
  13797. }
  13798. static int
  13799. __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
  13800. CYTHON_UNUSED_VAR(context);
  13801. if (!value || value == Py_None) {
  13802. value = NULL;
  13803. } else if (unlikely(!PyDict_Check(value))) {
  13804. PyErr_SetString(PyExc_TypeError,
  13805. "__annotations__ must be set to a dict object");
  13806. return -1;
  13807. }
  13808. Py_XINCREF(value);
  13809. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13810. __Pyx_Py_XDECREF_SET(op->func_annotations, value);
  13811. __Pyx_END_CRITICAL_SECTION();
  13812. return 0;
  13813. }
  13814. static PyObject *
  13815. __Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
  13816. PyObject* result = op->func_annotations;
  13817. if (unlikely(!result)) {
  13818. result = PyDict_New();
  13819. if (unlikely(!result)) return NULL;
  13820. op->func_annotations = result;
  13821. }
  13822. Py_INCREF(result);
  13823. return result;
  13824. }
  13825. static PyObject *
  13826. __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
  13827. PyObject *result;
  13828. CYTHON_UNUSED_VAR(context);
  13829. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13830. result = __Pyx_CyFunction_get_annotations_locked(op);
  13831. __Pyx_END_CRITICAL_SECTION();
  13832. return result;
  13833. }
  13834. static PyObject *
  13835. __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
  13836. int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
  13837. if (is_coroutine) {
  13838. PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
  13839. fromlist = PyList_New(1);
  13840. if (unlikely(!fromlist)) return NULL;
  13841. Py_INCREF(marker);
  13842. #if CYTHON_ASSUME_SAFE_MACROS
  13843. PyList_SET_ITEM(fromlist, 0, marker);
  13844. #else
  13845. if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
  13846. Py_DECREF(marker);
  13847. Py_DECREF(fromlist);
  13848. return NULL;
  13849. }
  13850. #endif
  13851. module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
  13852. Py_DECREF(fromlist);
  13853. if (unlikely(!module)) goto ignore;
  13854. is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
  13855. Py_DECREF(module);
  13856. if (likely(is_coroutine_value)) {
  13857. return is_coroutine_value;
  13858. }
  13859. ignore:
  13860. PyErr_Clear();
  13861. }
  13862. return __Pyx_PyBool_FromLong(is_coroutine);
  13863. }
  13864. static PyObject *
  13865. __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
  13866. PyObject *result;
  13867. CYTHON_UNUSED_VAR(context);
  13868. if (op->func_is_coroutine) {
  13869. return __Pyx_NewRef(op->func_is_coroutine);
  13870. }
  13871. result = __Pyx_CyFunction_get_is_coroutine_value(op);
  13872. if (unlikely(!result))
  13873. return NULL;
  13874. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13875. if (op->func_is_coroutine) {
  13876. Py_DECREF(result);
  13877. result = __Pyx_NewRef(op->func_is_coroutine);
  13878. } else {
  13879. op->func_is_coroutine = __Pyx_NewRef(result);
  13880. }
  13881. __Pyx_END_CRITICAL_SECTION();
  13882. return result;
  13883. }
  13884. static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
  13885. #if CYTHON_COMPILING_IN_LIMITED_API
  13886. PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
  13887. if (!py_name) return;
  13888. PyErr_Format(PyExc_TypeError,
  13889. "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  13890. py_name, message, size);
  13891. Py_DECREF(py_name);
  13892. #else
  13893. const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
  13894. PyErr_Format(PyExc_TypeError,
  13895. "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  13896. name, message, size);
  13897. #endif
  13898. }
  13899. static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
  13900. #if CYTHON_COMPILING_IN_LIMITED_API
  13901. PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
  13902. if (!py_name) return;
  13903. PyErr_Format(PyExc_TypeError,
  13904. "%.200S() %s",
  13905. py_name, message);
  13906. Py_DECREF(py_name);
  13907. #else
  13908. const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
  13909. PyErr_Format(PyExc_TypeError,
  13910. "%.200s() %s",
  13911. name, message);
  13912. #endif
  13913. }
  13914. #if CYTHON_COMPILING_IN_LIMITED_API
  13915. static PyObject *
  13916. __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
  13917. CYTHON_UNUSED_VAR(context);
  13918. return PyObject_GetAttrString(op->func, "__module__");
  13919. }
  13920. static int
  13921. __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
  13922. CYTHON_UNUSED_VAR(context);
  13923. return PyObject_SetAttrString(op->func, "__module__", value);
  13924. }
  13925. #endif
  13926. static PyGetSetDef __pyx_CyFunction_getsets[] = {
  13927. {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
  13928. {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
  13929. {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
  13930. {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
  13931. {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
  13932. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  13933. {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
  13934. {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
  13935. #else
  13936. {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
  13937. {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
  13938. #endif
  13939. {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
  13940. {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
  13941. {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
  13942. {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
  13943. {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
  13944. {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
  13945. {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
  13946. {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
  13947. {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
  13948. {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
  13949. {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
  13950. #if CYTHON_COMPILING_IN_LIMITED_API
  13951. {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
  13952. #endif
  13953. {0, 0, 0, 0, 0}
  13954. };
  13955. static PyMemberDef __pyx_CyFunction_members[] = {
  13956. #if !CYTHON_COMPILING_IN_LIMITED_API
  13957. {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
  13958. #endif
  13959. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  13960. {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
  13961. #endif
  13962. #if CYTHON_METH_FASTCALL
  13963. #if CYTHON_COMPILING_IN_LIMITED_API
  13964. {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
  13965. #else
  13966. {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
  13967. #endif
  13968. #if CYTHON_COMPILING_IN_LIMITED_API
  13969. {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
  13970. #else
  13971. {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
  13972. #endif
  13973. #endif
  13974. {0, 0, 0, 0, 0}
  13975. };
  13976. static PyObject *
  13977. __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
  13978. {
  13979. PyObject *result = NULL;
  13980. CYTHON_UNUSED_VAR(args);
  13981. __Pyx_BEGIN_CRITICAL_SECTION(m);
  13982. Py_INCREF(m->func_qualname);
  13983. result = m->func_qualname;
  13984. __Pyx_END_CRITICAL_SECTION();
  13985. return result;
  13986. }
  13987. static PyMethodDef __pyx_CyFunction_methods[] = {
  13988. {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
  13989. {0, 0, 0, 0}
  13990. };
  13991. #if CYTHON_COMPILING_IN_LIMITED_API
  13992. #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
  13993. #else
  13994. #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
  13995. #endif
  13996. static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
  13997. PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
  13998. #if !CYTHON_COMPILING_IN_LIMITED_API
  13999. PyCFunctionObject *cf = (PyCFunctionObject*) op;
  14000. #endif
  14001. if (unlikely(op == NULL))
  14002. return NULL;
  14003. #if CYTHON_COMPILING_IN_LIMITED_API
  14004. op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
  14005. if (unlikely(!op->func)) return NULL;
  14006. #endif
  14007. op->flags = flags;
  14008. __Pyx_CyFunction_weakreflist(op) = NULL;
  14009. #if !CYTHON_COMPILING_IN_LIMITED_API
  14010. cf->m_ml = ml;
  14011. cf->m_self = (PyObject *) op;
  14012. #endif
  14013. Py_XINCREF(closure);
  14014. op->func_closure = closure;
  14015. #if !CYTHON_COMPILING_IN_LIMITED_API
  14016. Py_XINCREF(module);
  14017. cf->m_module = module;
  14018. #endif
  14019. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  14020. op->func_dict = NULL;
  14021. #endif
  14022. op->func_name = NULL;
  14023. Py_INCREF(qualname);
  14024. op->func_qualname = qualname;
  14025. op->func_doc = NULL;
  14026. #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  14027. op->func_classobj = NULL;
  14028. #else
  14029. ((PyCMethodObject*)op)->mm_class = NULL;
  14030. #endif
  14031. op->func_globals = globals;
  14032. Py_INCREF(op->func_globals);
  14033. Py_XINCREF(code);
  14034. op->func_code = code;
  14035. op->defaults = NULL;
  14036. op->defaults_tuple = NULL;
  14037. op->defaults_kwdict = NULL;
  14038. op->defaults_getter = NULL;
  14039. op->func_annotations = NULL;
  14040. op->func_is_coroutine = NULL;
  14041. #if CYTHON_METH_FASTCALL
  14042. switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
  14043. case METH_NOARGS:
  14044. __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
  14045. break;
  14046. case METH_O:
  14047. __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
  14048. break;
  14049. case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
  14050. __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
  14051. break;
  14052. case METH_FASTCALL | METH_KEYWORDS:
  14053. __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
  14054. break;
  14055. case METH_VARARGS | METH_KEYWORDS:
  14056. __Pyx_CyFunction_func_vectorcall(op) = NULL;
  14057. break;
  14058. default:
  14059. PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
  14060. Py_DECREF(op);
  14061. return NULL;
  14062. }
  14063. #endif
  14064. return (PyObject *) op;
  14065. }
  14066. static int
  14067. __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
  14068. {
  14069. Py_CLEAR(m->func_closure);
  14070. #if CYTHON_COMPILING_IN_LIMITED_API
  14071. Py_CLEAR(m->func);
  14072. #else
  14073. Py_CLEAR(((PyCFunctionObject*)m)->m_module);
  14074. #endif
  14075. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  14076. Py_CLEAR(m->func_dict);
  14077. #elif PY_VERSION_HEX < 0x030d0000
  14078. _PyObject_ClearManagedDict((PyObject*)m);
  14079. #else
  14080. PyObject_ClearManagedDict((PyObject*)m);
  14081. #endif
  14082. Py_CLEAR(m->func_name);
  14083. Py_CLEAR(m->func_qualname);
  14084. Py_CLEAR(m->func_doc);
  14085. Py_CLEAR(m->func_globals);
  14086. Py_CLEAR(m->func_code);
  14087. #if !CYTHON_COMPILING_IN_LIMITED_API
  14088. #if PY_VERSION_HEX < 0x030900B1
  14089. Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
  14090. #else
  14091. {
  14092. PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
  14093. ((PyCMethodObject *) (m))->mm_class = NULL;
  14094. Py_XDECREF(cls);
  14095. }
  14096. #endif
  14097. #endif
  14098. Py_CLEAR(m->defaults_tuple);
  14099. Py_CLEAR(m->defaults_kwdict);
  14100. Py_CLEAR(m->func_annotations);
  14101. Py_CLEAR(m->func_is_coroutine);
  14102. Py_CLEAR(m->defaults);
  14103. return 0;
  14104. }
  14105. static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
  14106. {
  14107. if (__Pyx_CyFunction_weakreflist(m) != NULL)
  14108. PyObject_ClearWeakRefs((PyObject *) m);
  14109. __Pyx_CyFunction_clear(m);
  14110. __Pyx_PyHeapTypeObject_GC_Del(m);
  14111. }
  14112. static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
  14113. {
  14114. PyObject_GC_UnTrack(m);
  14115. __Pyx__CyFunction_dealloc(m);
  14116. }
  14117. static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
  14118. {
  14119. {
  14120. int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
  14121. if (e) return e;
  14122. }
  14123. Py_VISIT(m->func_closure);
  14124. #if CYTHON_COMPILING_IN_LIMITED_API
  14125. Py_VISIT(m->func);
  14126. #else
  14127. Py_VISIT(((PyCFunctionObject*)m)->m_module);
  14128. #endif
  14129. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  14130. Py_VISIT(m->func_dict);
  14131. #else
  14132. {
  14133. int e =
  14134. #if PY_VERSION_HEX < 0x030d0000
  14135. _PyObject_VisitManagedDict
  14136. #else
  14137. PyObject_VisitManagedDict
  14138. #endif
  14139. ((PyObject*)m, visit, arg);
  14140. if (e != 0) return e;
  14141. }
  14142. #endif
  14143. __Pyx_VISIT_CONST(m->func_name);
  14144. __Pyx_VISIT_CONST(m->func_qualname);
  14145. Py_VISIT(m->func_doc);
  14146. Py_VISIT(m->func_globals);
  14147. __Pyx_VISIT_CONST(m->func_code);
  14148. #if !CYTHON_COMPILING_IN_LIMITED_API
  14149. Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
  14150. #endif
  14151. Py_VISIT(m->defaults_tuple);
  14152. Py_VISIT(m->defaults_kwdict);
  14153. Py_VISIT(m->func_is_coroutine);
  14154. Py_VISIT(m->defaults);
  14155. return 0;
  14156. }
  14157. static PyObject*
  14158. __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
  14159. {
  14160. PyObject *repr;
  14161. __Pyx_BEGIN_CRITICAL_SECTION(op);
  14162. repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
  14163. op->func_qualname, (void *)op);
  14164. __Pyx_END_CRITICAL_SECTION();
  14165. return repr;
  14166. }
  14167. static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
  14168. #if CYTHON_COMPILING_IN_LIMITED_API
  14169. PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
  14170. PyCFunction meth;
  14171. int flags;
  14172. meth = PyCFunction_GetFunction(f);
  14173. if (unlikely(!meth)) return NULL;
  14174. flags = PyCFunction_GetFlags(f);
  14175. if (unlikely(flags < 0)) return NULL;
  14176. #else
  14177. PyCFunctionObject* f = (PyCFunctionObject*)func;
  14178. PyCFunction meth = f->m_ml->ml_meth;
  14179. int flags = f->m_ml->ml_flags;
  14180. #endif
  14181. Py_ssize_t size;
  14182. switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
  14183. case METH_VARARGS:
  14184. if (likely(kw == NULL || PyDict_Size(kw) == 0))
  14185. return (*meth)(self, arg);
  14186. break;
  14187. case METH_VARARGS | METH_KEYWORDS:
  14188. return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
  14189. case METH_NOARGS:
  14190. if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
  14191. #if CYTHON_ASSUME_SAFE_SIZE
  14192. size = PyTuple_GET_SIZE(arg);
  14193. #else
  14194. size = PyTuple_Size(arg);
  14195. if (unlikely(size < 0)) return NULL;
  14196. #endif
  14197. if (likely(size == 0))
  14198. return (*meth)(self, NULL);
  14199. __Pyx_CyFunction_raise_argument_count_error(
  14200. (__pyx_CyFunctionObject*)func,
  14201. "takes no arguments", size);
  14202. return NULL;
  14203. }
  14204. break;
  14205. case METH_O:
  14206. if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
  14207. #if CYTHON_ASSUME_SAFE_SIZE
  14208. size = PyTuple_GET_SIZE(arg);
  14209. #else
  14210. size = PyTuple_Size(arg);
  14211. if (unlikely(size < 0)) return NULL;
  14212. #endif
  14213. if (likely(size == 1)) {
  14214. PyObject *result, *arg0;
  14215. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  14216. arg0 = PyTuple_GET_ITEM(arg, 0);
  14217. #else
  14218. arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
  14219. #endif
  14220. result = (*meth)(self, arg0);
  14221. #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
  14222. Py_DECREF(arg0);
  14223. #endif
  14224. return result;
  14225. }
  14226. __Pyx_CyFunction_raise_argument_count_error(
  14227. (__pyx_CyFunctionObject*)func,
  14228. "takes exactly one argument", size);
  14229. return NULL;
  14230. }
  14231. break;
  14232. default:
  14233. PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
  14234. return NULL;
  14235. }
  14236. __Pyx_CyFunction_raise_type_error(
  14237. (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
  14238. return NULL;
  14239. }
  14240. static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  14241. PyObject *self, *result;
  14242. #if CYTHON_COMPILING_IN_LIMITED_API
  14243. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
  14244. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14245. #else
  14246. self = ((PyCFunctionObject*)func)->m_self;
  14247. #endif
  14248. result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
  14249. return result;
  14250. }
  14251. static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
  14252. PyObject *result;
  14253. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
  14254. #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
  14255. __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
  14256. if (vc) {
  14257. #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  14258. return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
  14259. #else
  14260. (void) &__Pyx_PyVectorcall_FastCallDict;
  14261. return PyVectorcall_Call(func, args, kw);
  14262. #endif
  14263. }
  14264. #endif
  14265. if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
  14266. Py_ssize_t argc;
  14267. PyObject *new_args;
  14268. PyObject *self;
  14269. #if CYTHON_ASSUME_SAFE_SIZE
  14270. argc = PyTuple_GET_SIZE(args);
  14271. #else
  14272. argc = PyTuple_Size(args);
  14273. if (unlikely(argc < 0)) return NULL;
  14274. #endif
  14275. new_args = PyTuple_GetSlice(args, 1, argc);
  14276. if (unlikely(!new_args))
  14277. return NULL;
  14278. self = PyTuple_GetItem(args, 0);
  14279. if (unlikely(!self)) {
  14280. Py_DECREF(new_args);
  14281. PyErr_Format(PyExc_TypeError,
  14282. "unbound method %.200S() needs an argument",
  14283. cyfunc->func_qualname);
  14284. return NULL;
  14285. }
  14286. result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
  14287. Py_DECREF(new_args);
  14288. } else {
  14289. result = __Pyx_CyFunction_Call(func, args, kw);
  14290. }
  14291. return result;
  14292. }
  14293. #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
  14294. static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
  14295. {
  14296. int ret = 0;
  14297. if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
  14298. if (unlikely(nargs < 1)) {
  14299. __Pyx_CyFunction_raise_type_error(
  14300. cyfunc, "needs an argument");
  14301. return -1;
  14302. }
  14303. ret = 1;
  14304. }
  14305. if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
  14306. __Pyx_CyFunction_raise_type_error(
  14307. cyfunc, "takes no keyword arguments");
  14308. return -1;
  14309. }
  14310. return ret;
  14311. }
  14312. static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
  14313. {
  14314. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
  14315. Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
  14316. PyObject *self;
  14317. #if CYTHON_COMPILING_IN_LIMITED_API
  14318. PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
  14319. if (unlikely(!meth)) return NULL;
  14320. #else
  14321. PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
  14322. #endif
  14323. switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
  14324. case 1:
  14325. self = args[0];
  14326. args += 1;
  14327. nargs -= 1;
  14328. break;
  14329. case 0:
  14330. #if CYTHON_COMPILING_IN_LIMITED_API
  14331. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
  14332. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14333. #else
  14334. self = ((PyCFunctionObject*)cyfunc)->m_self;
  14335. #endif
  14336. break;
  14337. default:
  14338. return NULL;
  14339. }
  14340. if (unlikely(nargs != 0)) {
  14341. __Pyx_CyFunction_raise_argument_count_error(
  14342. cyfunc, "takes no arguments", nargs);
  14343. return NULL;
  14344. }
  14345. return meth(self, NULL);
  14346. }
  14347. static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
  14348. {
  14349. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
  14350. Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
  14351. PyObject *self;
  14352. #if CYTHON_COMPILING_IN_LIMITED_API
  14353. PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
  14354. if (unlikely(!meth)) return NULL;
  14355. #else
  14356. PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
  14357. #endif
  14358. switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
  14359. case 1:
  14360. self = args[0];
  14361. args += 1;
  14362. nargs -= 1;
  14363. break;
  14364. case 0:
  14365. #if CYTHON_COMPILING_IN_LIMITED_API
  14366. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
  14367. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14368. #else
  14369. self = ((PyCFunctionObject*)cyfunc)->m_self;
  14370. #endif
  14371. break;
  14372. default:
  14373. return NULL;
  14374. }
  14375. if (unlikely(nargs != 1)) {
  14376. __Pyx_CyFunction_raise_argument_count_error(
  14377. cyfunc, "takes exactly one argument", nargs);
  14378. return NULL;
  14379. }
  14380. return meth(self, args[0]);
  14381. }
  14382. static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
  14383. {
  14384. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
  14385. Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
  14386. PyObject *self;
  14387. #if CYTHON_COMPILING_IN_LIMITED_API
  14388. PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
  14389. if (unlikely(!meth)) return NULL;
  14390. #else
  14391. PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
  14392. #endif
  14393. switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
  14394. case 1:
  14395. self = args[0];
  14396. args += 1;
  14397. nargs -= 1;
  14398. break;
  14399. case 0:
  14400. #if CYTHON_COMPILING_IN_LIMITED_API
  14401. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
  14402. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14403. #else
  14404. self = ((PyCFunctionObject*)cyfunc)->m_self;
  14405. #endif
  14406. break;
  14407. default:
  14408. return NULL;
  14409. }
  14410. return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
  14411. }
  14412. static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
  14413. {
  14414. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
  14415. PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
  14416. Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
  14417. PyObject *self;
  14418. #if CYTHON_COMPILING_IN_LIMITED_API
  14419. PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
  14420. if (unlikely(!meth)) return NULL;
  14421. #else
  14422. PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
  14423. #endif
  14424. switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
  14425. case 1:
  14426. self = args[0];
  14427. args += 1;
  14428. nargs -= 1;
  14429. break;
  14430. case 0:
  14431. #if CYTHON_COMPILING_IN_LIMITED_API
  14432. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
  14433. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14434. #else
  14435. self = ((PyCFunctionObject*)cyfunc)->m_self;
  14436. #endif
  14437. break;
  14438. default:
  14439. return NULL;
  14440. }
  14441. #if PY_VERSION_HEX < 0x030e00A6
  14442. size_t nargs_value = (size_t) nargs;
  14443. #else
  14444. Py_ssize_t nargs_value = nargs;
  14445. #endif
  14446. return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
  14447. }
  14448. #endif
  14449. static PyType_Slot __pyx_CyFunctionType_slots[] = {
  14450. {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
  14451. {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
  14452. {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
  14453. {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
  14454. {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
  14455. {Py_tp_methods, (void *)__pyx_CyFunction_methods},
  14456. {Py_tp_members, (void *)__pyx_CyFunction_members},
  14457. {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
  14458. {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
  14459. {0, 0},
  14460. };
  14461. static PyType_Spec __pyx_CyFunctionType_spec = {
  14462. __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
  14463. sizeof(__pyx_CyFunctionObject),
  14464. 0,
  14465. #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
  14466. Py_TPFLAGS_METHOD_DESCRIPTOR |
  14467. #endif
  14468. #if CYTHON_METH_FASTCALL
  14469. #if defined(Py_TPFLAGS_HAVE_VECTORCALL)
  14470. Py_TPFLAGS_HAVE_VECTORCALL |
  14471. #elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
  14472. _Py_TPFLAGS_HAVE_VECTORCALL |
  14473. #endif
  14474. #endif // CYTHON_METH_FASTCALL
  14475. #if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
  14476. Py_TPFLAGS_MANAGED_DICT |
  14477. #endif
  14478. Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
  14479. Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
  14480. __pyx_CyFunctionType_slots
  14481. };
  14482. static int __pyx_CyFunction_init(PyObject *module) {
  14483. __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
  14484. mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
  14485. mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
  14486. if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
  14487. return -1;
  14488. }
  14489. return 0;
  14490. }
  14491. static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
  14492. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  14493. m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
  14494. if (unlikely(!m->defaults))
  14495. return NULL;
  14496. return m->defaults;
  14497. }
  14498. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
  14499. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  14500. m->defaults_tuple = tuple;
  14501. Py_INCREF(tuple);
  14502. }
  14503. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
  14504. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  14505. m->defaults_kwdict = dict;
  14506. Py_INCREF(dict);
  14507. }
  14508. static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
  14509. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  14510. m->func_annotations = dict;
  14511. Py_INCREF(dict);
  14512. }
  14513. /* CythonFunction */
  14514. static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
  14515. PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
  14516. PyObject *op = __Pyx_CyFunction_Init(
  14517. PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
  14518. ml, flags, qualname, closure, module, globals, code
  14519. );
  14520. if (likely(op)) {
  14521. PyObject_GC_Track(op);
  14522. }
  14523. return op;
  14524. }
  14525. /* PyObjectLookupSpecial (used by Py3ClassCreate) */
  14526. #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
  14527. static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
  14528. PyObject *res;
  14529. PyTypeObject *tp = Py_TYPE(obj);
  14530. res = _PyType_Lookup(tp, attr_name);
  14531. if (likely(res)) {
  14532. descrgetfunc f = Py_TYPE(res)->tp_descr_get;
  14533. if (!f) {
  14534. Py_INCREF(res);
  14535. } else {
  14536. res = f(res, obj, (PyObject *)tp);
  14537. }
  14538. } else if (with_error) {
  14539. PyErr_SetObject(PyExc_AttributeError, attr_name);
  14540. }
  14541. return res;
  14542. }
  14543. #endif
  14544. /* Py3ClassCreate */
  14545. static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
  14546. PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
  14547. PyObject *ns;
  14548. if (metaclass) {
  14549. PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
  14550. if (prep) {
  14551. PyObject *pargs[3] = {NULL, name, bases};
  14552. ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
  14553. Py_DECREF(prep);
  14554. } else {
  14555. if (unlikely(PyErr_Occurred()))
  14556. return NULL;
  14557. ns = PyDict_New();
  14558. }
  14559. } else {
  14560. ns = PyDict_New();
  14561. }
  14562. if (unlikely(!ns))
  14563. return NULL;
  14564. if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad;
  14565. if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
  14566. if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad;
  14567. return ns;
  14568. bad:
  14569. Py_DECREF(ns);
  14570. return NULL;
  14571. }
  14572. static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
  14573. PyObject *dict, PyObject *mkw,
  14574. int calculate_metaclass, int allow_py2_metaclass) {
  14575. PyObject *result;
  14576. PyObject *owned_metaclass = NULL;
  14577. PyObject *margs[4] = {NULL, name, bases, dict};
  14578. if (allow_py2_metaclass) {
  14579. owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass);
  14580. if (owned_metaclass) {
  14581. metaclass = owned_metaclass;
  14582. } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
  14583. PyErr_Clear();
  14584. } else {
  14585. return NULL;
  14586. }
  14587. }
  14588. if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
  14589. metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
  14590. Py_XDECREF(owned_metaclass);
  14591. if (unlikely(!metaclass))
  14592. return NULL;
  14593. owned_metaclass = metaclass;
  14594. }
  14595. result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
  14596. Py_XDECREF(owned_metaclass);
  14597. return result;
  14598. }
  14599. /* CLineInTraceback (used by AddTraceback) */
  14600. #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
  14601. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  14602. #define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
  14603. #elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14604. #define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
  14605. #else
  14606. PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
  14607. PyObject **dict_ptr = _PyObject_GetDictPtr(o);
  14608. return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
  14609. }
  14610. #endif
  14611. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
  14612. PyObject *use_cline = NULL;
  14613. PyObject *ptype, *pvalue, *ptraceback;
  14614. PyObject *cython_runtime_dict;
  14615. CYTHON_MAYBE_UNUSED_VAR(tstate);
  14616. if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
  14617. return c_line;
  14618. }
  14619. __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
  14620. cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
  14621. if (likely(cython_runtime_dict)) {
  14622. __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
  14623. use_cline, cython_runtime_dict,
  14624. __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
  14625. }
  14626. if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
  14627. c_line = 0;
  14628. }
  14629. Py_XDECREF(use_cline);
  14630. Py_XDECREF(cython_runtime_dict);
  14631. __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
  14632. return c_line;
  14633. }
  14634. #endif
  14635. /* CodeObjectCache (used by AddTraceback) */
  14636. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
  14637. int start = 0, mid = 0, end = count - 1;
  14638. if (end >= 0 && code_line > entries[end].code_line) {
  14639. return count;
  14640. }
  14641. while (start < end) {
  14642. mid = start + (end - start) / 2;
  14643. if (code_line < entries[mid].code_line) {
  14644. end = mid;
  14645. } else if (code_line > entries[mid].code_line) {
  14646. start = mid + 1;
  14647. } else {
  14648. return mid;
  14649. }
  14650. }
  14651. if (code_line <= entries[mid].code_line) {
  14652. return mid;
  14653. } else {
  14654. return mid + 1;
  14655. }
  14656. }
  14657. static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
  14658. __Pyx_CachedCodeObjectType* code_object;
  14659. int pos;
  14660. if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
  14661. return NULL;
  14662. }
  14663. pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
  14664. if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
  14665. return NULL;
  14666. }
  14667. code_object = code_cache->entries[pos].code_object;
  14668. Py_INCREF(code_object);
  14669. return code_object;
  14670. }
  14671. static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
  14672. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
  14673. (void)__pyx__find_code_object;
  14674. return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
  14675. #else
  14676. struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
  14677. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14678. __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
  14679. if (old_count < 0) {
  14680. __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
  14681. return NULL;
  14682. }
  14683. #endif
  14684. __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
  14685. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14686. __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
  14687. #endif
  14688. return result;
  14689. #endif
  14690. }
  14691. static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
  14692. {
  14693. int pos, i;
  14694. __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
  14695. if (unlikely(!code_line)) {
  14696. return;
  14697. }
  14698. if (unlikely(!entries)) {
  14699. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
  14700. if (likely(entries)) {
  14701. code_cache->entries = entries;
  14702. code_cache->max_count = 64;
  14703. code_cache->count = 1;
  14704. entries[0].code_line = code_line;
  14705. entries[0].code_object = code_object;
  14706. Py_INCREF(code_object);
  14707. }
  14708. return;
  14709. }
  14710. pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
  14711. if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
  14712. __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
  14713. entries[pos].code_object = code_object;
  14714. Py_INCREF(code_object);
  14715. Py_DECREF(tmp);
  14716. return;
  14717. }
  14718. if (code_cache->count == code_cache->max_count) {
  14719. int new_max = code_cache->max_count + 64;
  14720. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
  14721. code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
  14722. if (unlikely(!entries)) {
  14723. return;
  14724. }
  14725. code_cache->entries = entries;
  14726. code_cache->max_count = new_max;
  14727. }
  14728. for (i=code_cache->count; i>pos; i--) {
  14729. entries[i] = entries[i-1];
  14730. }
  14731. entries[pos].code_line = code_line;
  14732. entries[pos].code_object = code_object;
  14733. code_cache->count++;
  14734. Py_INCREF(code_object);
  14735. }
  14736. static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
  14737. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
  14738. (void)__pyx__insert_code_object;
  14739. return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
  14740. #else
  14741. struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
  14742. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14743. __pyx_nonatomic_int_type expected = 0;
  14744. if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
  14745. return;
  14746. }
  14747. #endif
  14748. __pyx__insert_code_object(code_cache, code_line, code_object);
  14749. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14750. __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
  14751. #endif
  14752. #endif
  14753. }
  14754. /* AddTraceback */
  14755. #include "compile.h"
  14756. #include "frameobject.h"
  14757. #include "traceback.h"
  14758. #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  14759. #ifndef Py_BUILD_CORE
  14760. #define Py_BUILD_CORE 1
  14761. #endif
  14762. #include "internal/pycore_frame.h"
  14763. #endif
  14764. #if CYTHON_COMPILING_IN_LIMITED_API
  14765. static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
  14766. PyObject *firstlineno, PyObject *name) {
  14767. PyObject *replace = NULL;
  14768. if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
  14769. if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
  14770. replace = PyObject_GetAttrString(code, "replace");
  14771. if (likely(replace)) {
  14772. PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
  14773. Py_DECREF(replace);
  14774. return result;
  14775. }
  14776. PyErr_Clear();
  14777. return NULL;
  14778. }
  14779. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  14780. int py_line, const char *filename) {
  14781. PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
  14782. PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
  14783. PyObject *exc_type, *exc_value, *exc_traceback;
  14784. int success = 0;
  14785. if (c_line) {
  14786. c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
  14787. }
  14788. PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
  14789. code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
  14790. if (!code_object) {
  14791. code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
  14792. if (unlikely(!code_object)) goto bad;
  14793. py_py_line = PyLong_FromLong(py_line);
  14794. if (unlikely(!py_py_line)) goto bad;
  14795. if (c_line) {
  14796. py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  14797. } else {
  14798. py_funcname = PyUnicode_FromString(funcname);
  14799. }
  14800. if (unlikely(!py_funcname)) goto bad;
  14801. dict = PyDict_New();
  14802. if (unlikely(!dict)) goto bad;
  14803. {
  14804. PyObject *old_code_object = code_object;
  14805. code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
  14806. Py_DECREF(old_code_object);
  14807. }
  14808. if (unlikely(!code_object)) goto bad;
  14809. __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
  14810. } else {
  14811. dict = PyDict_New();
  14812. }
  14813. getframe = PySys_GetObject("_getframe");
  14814. if (unlikely(!getframe)) goto bad;
  14815. if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
  14816. frame = PyEval_EvalCode(code_object, dict, dict);
  14817. if (unlikely(!frame) || frame == Py_None) goto bad;
  14818. success = 1;
  14819. bad:
  14820. PyErr_Restore(exc_type, exc_value, exc_traceback);
  14821. Py_XDECREF(code_object);
  14822. Py_XDECREF(py_py_line);
  14823. Py_XDECREF(py_funcname);
  14824. Py_XDECREF(dict);
  14825. Py_XDECREF(replace);
  14826. if (success) {
  14827. PyTraceBack_Here(
  14828. (struct _frame*)frame);
  14829. }
  14830. Py_XDECREF(frame);
  14831. }
  14832. #else
  14833. static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
  14834. const char *funcname, int c_line,
  14835. int py_line, const char *filename) {
  14836. PyCodeObject *py_code = NULL;
  14837. PyObject *py_funcname = NULL;
  14838. if (c_line) {
  14839. py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  14840. if (!py_funcname) goto bad;
  14841. funcname = PyUnicode_AsUTF8(py_funcname);
  14842. if (!funcname) goto bad;
  14843. }
  14844. py_code = PyCode_NewEmpty(filename, funcname, py_line);
  14845. Py_XDECREF(py_funcname);
  14846. return py_code;
  14847. bad:
  14848. Py_XDECREF(py_funcname);
  14849. return NULL;
  14850. }
  14851. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  14852. int py_line, const char *filename) {
  14853. PyCodeObject *py_code = 0;
  14854. PyFrameObject *py_frame = 0;
  14855. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  14856. PyObject *ptype, *pvalue, *ptraceback;
  14857. if (c_line) {
  14858. c_line = __Pyx_CLineForTraceback(tstate, c_line);
  14859. }
  14860. py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
  14861. if (!py_code) {
  14862. __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
  14863. py_code = __Pyx_CreateCodeObjectForTraceback(
  14864. funcname, c_line, py_line, filename);
  14865. if (!py_code) {
  14866. /* If the code object creation fails, then we should clear the
  14867. fetched exception references and propagate the new exception */
  14868. Py_XDECREF(ptype);
  14869. Py_XDECREF(pvalue);
  14870. Py_XDECREF(ptraceback);
  14871. goto bad;
  14872. }
  14873. __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
  14874. __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
  14875. }
  14876. py_frame = PyFrame_New(
  14877. tstate, /*PyThreadState *tstate,*/
  14878. py_code, /*PyCodeObject *code,*/
  14879. __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/
  14880. 0 /*PyObject *locals*/
  14881. );
  14882. if (!py_frame) goto bad;
  14883. __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
  14884. PyTraceBack_Here(py_frame);
  14885. bad:
  14886. Py_XDECREF(py_code);
  14887. Py_XDECREF(py_frame);
  14888. }
  14889. #endif
  14890. /* CIntToPy */
  14891. static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
  14892. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  14893. #pragma GCC diagnostic push
  14894. #pragma GCC diagnostic ignored "-Wconversion"
  14895. #endif
  14896. const long neg_one = (long) -1, const_zero = (long) 0;
  14897. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  14898. #pragma GCC diagnostic pop
  14899. #endif
  14900. const int is_unsigned = neg_one > const_zero;
  14901. if (is_unsigned) {
  14902. if (sizeof(long) < sizeof(long)) {
  14903. return PyLong_FromLong((long) value);
  14904. } else if (sizeof(long) <= sizeof(unsigned long)) {
  14905. return PyLong_FromUnsignedLong((unsigned long) value);
  14906. #if !CYTHON_COMPILING_IN_PYPY
  14907. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  14908. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  14909. #endif
  14910. }
  14911. } else {
  14912. if (sizeof(long) <= sizeof(long)) {
  14913. return PyLong_FromLong((long) value);
  14914. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  14915. return PyLong_FromLongLong((PY_LONG_LONG) value);
  14916. }
  14917. }
  14918. {
  14919. unsigned char *bytes = (unsigned char *)&value;
  14920. #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
  14921. if (is_unsigned) {
  14922. return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
  14923. } else {
  14924. return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
  14925. }
  14926. #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
  14927. int one = 1; int little = (int)*(unsigned char *)&one;
  14928. return _PyLong_FromByteArray(bytes, sizeof(long),
  14929. little, !is_unsigned);
  14930. #else
  14931. int one = 1; int little = (int)*(unsigned char *)&one;
  14932. PyObject *from_bytes, *result = NULL, *kwds = NULL;
  14933. PyObject *py_bytes = NULL, *order_str = NULL;
  14934. from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
  14935. if (!from_bytes) return NULL;
  14936. py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
  14937. if (!py_bytes) goto limited_bad;
  14938. order_str = PyUnicode_FromString(little ? "little" : "big");
  14939. if (!order_str) goto limited_bad;
  14940. {
  14941. PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
  14942. if (!is_unsigned) {
  14943. kwds = __Pyx_MakeVectorcallBuilderKwds(1);
  14944. if (!kwds) goto limited_bad;
  14945. if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
  14946. }
  14947. result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
  14948. }
  14949. limited_bad:
  14950. Py_XDECREF(kwds);
  14951. Py_XDECREF(order_str);
  14952. Py_XDECREF(py_bytes);
  14953. Py_XDECREF(from_bytes);
  14954. return result;
  14955. #endif
  14956. }
  14957. }
  14958. /* FormatTypeName */
  14959. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
  14960. static __Pyx_TypeName
  14961. __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
  14962. {
  14963. PyObject *module = NULL, *name = NULL, *result = NULL;
  14964. #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  14965. name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
  14966. __pyx_mstate_global->__pyx_n_u_qualname);
  14967. #else
  14968. name = PyType_GetQualName(tp);
  14969. #endif
  14970. if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
  14971. module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
  14972. __pyx_mstate_global->__pyx_n_u_module);
  14973. if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
  14974. if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
  14975. result = name;
  14976. name = NULL;
  14977. goto done;
  14978. }
  14979. result = PyUnicode_FromFormat("%U.%U", module, name);
  14980. if (unlikely(result == NULL)) goto bad;
  14981. done:
  14982. Py_XDECREF(name);
  14983. Py_XDECREF(module);
  14984. return result;
  14985. bad:
  14986. PyErr_Clear();
  14987. if (name) {
  14988. result = name;
  14989. name = NULL;
  14990. } else {
  14991. result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__18);
  14992. }
  14993. goto done;
  14994. }
  14995. #endif
  14996. /* CIntFromPyVerify (used by CIntFromPy) */
  14997. #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
  14998. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
  14999. #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
  15000. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
  15001. #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
  15002. {\
  15003. func_type value = func_value;\
  15004. if (sizeof(target_type) < sizeof(func_type)) {\
  15005. if (unlikely(value != (func_type) (target_type) value)) {\
  15006. func_type zero = 0;\
  15007. if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
  15008. return (target_type) -1;\
  15009. if (is_unsigned && unlikely(value < zero))\
  15010. goto raise_neg_overflow;\
  15011. else\
  15012. goto raise_overflow;\
  15013. }\
  15014. }\
  15015. return (target_type) value;\
  15016. }
  15017. /* CIntFromPy */
  15018. static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
  15019. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  15020. #pragma GCC diagnostic push
  15021. #pragma GCC diagnostic ignored "-Wconversion"
  15022. #endif
  15023. const long neg_one = (long) -1, const_zero = (long) 0;
  15024. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  15025. #pragma GCC diagnostic pop
  15026. #endif
  15027. const int is_unsigned = neg_one > const_zero;
  15028. if (unlikely(!PyLong_Check(x))) {
  15029. long val;
  15030. PyObject *tmp = __Pyx_PyNumber_Long(x);
  15031. if (!tmp) return (long) -1;
  15032. val = __Pyx_PyLong_As_long(tmp);
  15033. Py_DECREF(tmp);
  15034. return val;
  15035. }
  15036. if (is_unsigned) {
  15037. #if CYTHON_USE_PYLONG_INTERNALS
  15038. if (unlikely(__Pyx_PyLong_IsNeg(x))) {
  15039. goto raise_neg_overflow;
  15040. } else if (__Pyx_PyLong_IsCompact(x)) {
  15041. __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
  15042. } else {
  15043. const digit* digits = __Pyx_PyLong_Digits(x);
  15044. assert(__Pyx_PyLong_DigitCount(x) > 1);
  15045. switch (__Pyx_PyLong_DigitCount(x)) {
  15046. case 2:
  15047. if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
  15048. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15049. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15050. } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
  15051. return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  15052. }
  15053. }
  15054. break;
  15055. case 3:
  15056. if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
  15057. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15058. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15059. } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
  15060. return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  15061. }
  15062. }
  15063. break;
  15064. case 4:
  15065. if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
  15066. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15067. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15068. } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
  15069. return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  15070. }
  15071. }
  15072. break;
  15073. }
  15074. }
  15075. #endif
  15076. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
  15077. if (unlikely(Py_SIZE(x) < 0)) {
  15078. goto raise_neg_overflow;
  15079. }
  15080. #else
  15081. {
  15082. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  15083. if (unlikely(result < 0))
  15084. return (long) -1;
  15085. if (unlikely(result == 1))
  15086. goto raise_neg_overflow;
  15087. }
  15088. #endif
  15089. if ((sizeof(long) <= sizeof(unsigned long))) {
  15090. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
  15091. } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
  15092. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  15093. }
  15094. } else {
  15095. #if CYTHON_USE_PYLONG_INTERNALS
  15096. if (__Pyx_PyLong_IsCompact(x)) {
  15097. __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
  15098. } else {
  15099. const digit* digits = __Pyx_PyLong_Digits(x);
  15100. assert(__Pyx_PyLong_DigitCount(x) > 1);
  15101. switch (__Pyx_PyLong_SignedDigitCount(x)) {
  15102. case -2:
  15103. if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
  15104. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15105. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15106. } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
  15107. return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15108. }
  15109. }
  15110. break;
  15111. case 2:
  15112. if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
  15113. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15114. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15115. } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
  15116. return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15117. }
  15118. }
  15119. break;
  15120. case -3:
  15121. if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
  15122. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15123. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15124. } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
  15125. return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15126. }
  15127. }
  15128. break;
  15129. case 3:
  15130. if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
  15131. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15132. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15133. } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
  15134. return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15135. }
  15136. }
  15137. break;
  15138. case -4:
  15139. if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
  15140. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15141. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15142. } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
  15143. return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15144. }
  15145. }
  15146. break;
  15147. case 4:
  15148. if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
  15149. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15150. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15151. } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
  15152. return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15153. }
  15154. }
  15155. break;
  15156. }
  15157. }
  15158. #endif
  15159. if ((sizeof(long) <= sizeof(long))) {
  15160. __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
  15161. } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
  15162. __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
  15163. }
  15164. }
  15165. {
  15166. long val;
  15167. int ret = -1;
  15168. #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
  15169. Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
  15170. x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
  15171. if (unlikely(bytes_copied == -1)) {
  15172. } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
  15173. goto raise_overflow;
  15174. } else {
  15175. ret = 0;
  15176. }
  15177. #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
  15178. int one = 1; int is_little = (int)*(unsigned char *)&one;
  15179. unsigned char *bytes = (unsigned char *)&val;
  15180. ret = _PyLong_AsByteArray((PyLongObject *)x,
  15181. bytes, sizeof(val),
  15182. is_little, !is_unsigned);
  15183. #else
  15184. PyObject *v;
  15185. PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
  15186. int bits, remaining_bits, is_negative = 0;
  15187. int chunk_size = (sizeof(long) < 8) ? 30 : 62;
  15188. if (likely(PyLong_CheckExact(x))) {
  15189. v = __Pyx_NewRef(x);
  15190. } else {
  15191. v = PyNumber_Long(x);
  15192. if (unlikely(!v)) return (long) -1;
  15193. assert(PyLong_CheckExact(v));
  15194. }
  15195. {
  15196. int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
  15197. if (unlikely(result < 0)) {
  15198. Py_DECREF(v);
  15199. return (long) -1;
  15200. }
  15201. is_negative = result == 1;
  15202. }
  15203. if (is_unsigned && unlikely(is_negative)) {
  15204. Py_DECREF(v);
  15205. goto raise_neg_overflow;
  15206. } else if (is_negative) {
  15207. stepval = PyNumber_Invert(v);
  15208. Py_DECREF(v);
  15209. if (unlikely(!stepval))
  15210. return (long) -1;
  15211. } else {
  15212. stepval = v;
  15213. }
  15214. v = NULL;
  15215. val = (long) 0;
  15216. mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
  15217. shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
  15218. for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
  15219. PyObject *tmp, *digit;
  15220. long idigit;
  15221. digit = PyNumber_And(stepval, mask);
  15222. if (unlikely(!digit)) goto done;
  15223. idigit = PyLong_AsLong(digit);
  15224. Py_DECREF(digit);
  15225. if (unlikely(idigit < 0)) goto done;
  15226. val |= ((long) idigit) << bits;
  15227. tmp = PyNumber_Rshift(stepval, shift);
  15228. if (unlikely(!tmp)) goto done;
  15229. Py_DECREF(stepval); stepval = tmp;
  15230. }
  15231. Py_DECREF(shift); shift = NULL;
  15232. Py_DECREF(mask); mask = NULL;
  15233. {
  15234. long idigit = PyLong_AsLong(stepval);
  15235. if (unlikely(idigit < 0)) goto done;
  15236. remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
  15237. if (unlikely(idigit >= (1L << remaining_bits)))
  15238. goto raise_overflow;
  15239. val |= ((long) idigit) << bits;
  15240. }
  15241. if (!is_unsigned) {
  15242. if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
  15243. goto raise_overflow;
  15244. if (is_negative)
  15245. val = ~val;
  15246. }
  15247. ret = 0;
  15248. done:
  15249. Py_XDECREF(shift);
  15250. Py_XDECREF(mask);
  15251. Py_XDECREF(stepval);
  15252. #endif
  15253. if (unlikely(ret))
  15254. return (long) -1;
  15255. return val;
  15256. }
  15257. raise_overflow:
  15258. PyErr_SetString(PyExc_OverflowError,
  15259. "value too large to convert to long");
  15260. return (long) -1;
  15261. raise_neg_overflow:
  15262. PyErr_SetString(PyExc_OverflowError,
  15263. "can't convert negative value to long");
  15264. return (long) -1;
  15265. }
  15266. /* CIntFromPy */
  15267. static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
  15268. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  15269. #pragma GCC diagnostic push
  15270. #pragma GCC diagnostic ignored "-Wconversion"
  15271. #endif
  15272. const int neg_one = (int) -1, const_zero = (int) 0;
  15273. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  15274. #pragma GCC diagnostic pop
  15275. #endif
  15276. const int is_unsigned = neg_one > const_zero;
  15277. if (unlikely(!PyLong_Check(x))) {
  15278. int val;
  15279. PyObject *tmp = __Pyx_PyNumber_Long(x);
  15280. if (!tmp) return (int) -1;
  15281. val = __Pyx_PyLong_As_int(tmp);
  15282. Py_DECREF(tmp);
  15283. return val;
  15284. }
  15285. if (is_unsigned) {
  15286. #if CYTHON_USE_PYLONG_INTERNALS
  15287. if (unlikely(__Pyx_PyLong_IsNeg(x))) {
  15288. goto raise_neg_overflow;
  15289. } else if (__Pyx_PyLong_IsCompact(x)) {
  15290. __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
  15291. } else {
  15292. const digit* digits = __Pyx_PyLong_Digits(x);
  15293. assert(__Pyx_PyLong_DigitCount(x) > 1);
  15294. switch (__Pyx_PyLong_DigitCount(x)) {
  15295. case 2:
  15296. if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
  15297. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15298. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15299. } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
  15300. return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  15301. }
  15302. }
  15303. break;
  15304. case 3:
  15305. if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
  15306. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15307. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15308. } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
  15309. return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  15310. }
  15311. }
  15312. break;
  15313. case 4:
  15314. if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
  15315. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15316. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15317. } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
  15318. return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  15319. }
  15320. }
  15321. break;
  15322. }
  15323. }
  15324. #endif
  15325. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
  15326. if (unlikely(Py_SIZE(x) < 0)) {
  15327. goto raise_neg_overflow;
  15328. }
  15329. #else
  15330. {
  15331. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  15332. if (unlikely(result < 0))
  15333. return (int) -1;
  15334. if (unlikely(result == 1))
  15335. goto raise_neg_overflow;
  15336. }
  15337. #endif
  15338. if ((sizeof(int) <= sizeof(unsigned long))) {
  15339. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
  15340. } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
  15341. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  15342. }
  15343. } else {
  15344. #if CYTHON_USE_PYLONG_INTERNALS
  15345. if (__Pyx_PyLong_IsCompact(x)) {
  15346. __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
  15347. } else {
  15348. const digit* digits = __Pyx_PyLong_Digits(x);
  15349. assert(__Pyx_PyLong_DigitCount(x) > 1);
  15350. switch (__Pyx_PyLong_SignedDigitCount(x)) {
  15351. case -2:
  15352. if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
  15353. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15354. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15355. } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
  15356. return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15357. }
  15358. }
  15359. break;
  15360. case 2:
  15361. if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
  15362. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15363. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15364. } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
  15365. return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15366. }
  15367. }
  15368. break;
  15369. case -3:
  15370. if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
  15371. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15372. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15373. } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
  15374. return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15375. }
  15376. }
  15377. break;
  15378. case 3:
  15379. if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
  15380. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15381. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15382. } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
  15383. return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15384. }
  15385. }
  15386. break;
  15387. case -4:
  15388. if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
  15389. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15390. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15391. } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
  15392. return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15393. }
  15394. }
  15395. break;
  15396. case 4:
  15397. if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
  15398. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15399. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15400. } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
  15401. return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15402. }
  15403. }
  15404. break;
  15405. }
  15406. }
  15407. #endif
  15408. if ((sizeof(int) <= sizeof(long))) {
  15409. __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
  15410. } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
  15411. __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
  15412. }
  15413. }
  15414. {
  15415. int val;
  15416. int ret = -1;
  15417. #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
  15418. Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
  15419. x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
  15420. if (unlikely(bytes_copied == -1)) {
  15421. } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
  15422. goto raise_overflow;
  15423. } else {
  15424. ret = 0;
  15425. }
  15426. #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
  15427. int one = 1; int is_little = (int)*(unsigned char *)&one;
  15428. unsigned char *bytes = (unsigned char *)&val;
  15429. ret = _PyLong_AsByteArray((PyLongObject *)x,
  15430. bytes, sizeof(val),
  15431. is_little, !is_unsigned);
  15432. #else
  15433. PyObject *v;
  15434. PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
  15435. int bits, remaining_bits, is_negative = 0;
  15436. int chunk_size = (sizeof(long) < 8) ? 30 : 62;
  15437. if (likely(PyLong_CheckExact(x))) {
  15438. v = __Pyx_NewRef(x);
  15439. } else {
  15440. v = PyNumber_Long(x);
  15441. if (unlikely(!v)) return (int) -1;
  15442. assert(PyLong_CheckExact(v));
  15443. }
  15444. {
  15445. int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
  15446. if (unlikely(result < 0)) {
  15447. Py_DECREF(v);
  15448. return (int) -1;
  15449. }
  15450. is_negative = result == 1;
  15451. }
  15452. if (is_unsigned && unlikely(is_negative)) {
  15453. Py_DECREF(v);
  15454. goto raise_neg_overflow;
  15455. } else if (is_negative) {
  15456. stepval = PyNumber_Invert(v);
  15457. Py_DECREF(v);
  15458. if (unlikely(!stepval))
  15459. return (int) -1;
  15460. } else {
  15461. stepval = v;
  15462. }
  15463. v = NULL;
  15464. val = (int) 0;
  15465. mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
  15466. shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
  15467. for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
  15468. PyObject *tmp, *digit;
  15469. long idigit;
  15470. digit = PyNumber_And(stepval, mask);
  15471. if (unlikely(!digit)) goto done;
  15472. idigit = PyLong_AsLong(digit);
  15473. Py_DECREF(digit);
  15474. if (unlikely(idigit < 0)) goto done;
  15475. val |= ((int) idigit) << bits;
  15476. tmp = PyNumber_Rshift(stepval, shift);
  15477. if (unlikely(!tmp)) goto done;
  15478. Py_DECREF(stepval); stepval = tmp;
  15479. }
  15480. Py_DECREF(shift); shift = NULL;
  15481. Py_DECREF(mask); mask = NULL;
  15482. {
  15483. long idigit = PyLong_AsLong(stepval);
  15484. if (unlikely(idigit < 0)) goto done;
  15485. remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
  15486. if (unlikely(idigit >= (1L << remaining_bits)))
  15487. goto raise_overflow;
  15488. val |= ((int) idigit) << bits;
  15489. }
  15490. if (!is_unsigned) {
  15491. if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
  15492. goto raise_overflow;
  15493. if (is_negative)
  15494. val = ~val;
  15495. }
  15496. ret = 0;
  15497. done:
  15498. Py_XDECREF(shift);
  15499. Py_XDECREF(mask);
  15500. Py_XDECREF(stepval);
  15501. #endif
  15502. if (unlikely(ret))
  15503. return (int) -1;
  15504. return val;
  15505. }
  15506. raise_overflow:
  15507. PyErr_SetString(PyExc_OverflowError,
  15508. "value too large to convert to int");
  15509. return (int) -1;
  15510. raise_neg_overflow:
  15511. PyErr_SetString(PyExc_OverflowError,
  15512. "can't convert negative value to int");
  15513. return (int) -1;
  15514. }
  15515. /* FastTypeChecks */
  15516. #if CYTHON_COMPILING_IN_CPYTHON
  15517. static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
  15518. while (a) {
  15519. a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
  15520. if (a == b)
  15521. return 1;
  15522. }
  15523. return b == &PyBaseObject_Type;
  15524. }
  15525. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
  15526. PyObject *mro;
  15527. if (a == b) return 1;
  15528. mro = a->tp_mro;
  15529. if (likely(mro)) {
  15530. Py_ssize_t i, n;
  15531. n = PyTuple_GET_SIZE(mro);
  15532. for (i = 0; i < n; i++) {
  15533. if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
  15534. return 1;
  15535. }
  15536. return 0;
  15537. }
  15538. return __Pyx_InBases(a, b);
  15539. }
  15540. static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
  15541. PyObject *mro;
  15542. if (cls == a || cls == b) return 1;
  15543. mro = cls->tp_mro;
  15544. if (likely(mro)) {
  15545. Py_ssize_t i, n;
  15546. n = PyTuple_GET_SIZE(mro);
  15547. for (i = 0; i < n; i++) {
  15548. PyObject *base = PyTuple_GET_ITEM(mro, i);
  15549. if (base == (PyObject *)a || base == (PyObject *)b)
  15550. return 1;
  15551. }
  15552. return 0;
  15553. }
  15554. return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
  15555. }
  15556. static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
  15557. if (exc_type1) {
  15558. return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
  15559. } else {
  15560. return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
  15561. }
  15562. }
  15563. static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  15564. Py_ssize_t i, n;
  15565. assert(PyExceptionClass_Check(exc_type));
  15566. n = PyTuple_GET_SIZE(tuple);
  15567. for (i=0; i<n; i++) {
  15568. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  15569. }
  15570. for (i=0; i<n; i++) {
  15571. PyObject *t = PyTuple_GET_ITEM(tuple, i);
  15572. if (likely(PyExceptionClass_Check(t))) {
  15573. if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
  15574. } else {
  15575. }
  15576. }
  15577. return 0;
  15578. }
  15579. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
  15580. if (likely(err == exc_type)) return 1;
  15581. if (likely(PyExceptionClass_Check(err))) {
  15582. if (likely(PyExceptionClass_Check(exc_type))) {
  15583. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
  15584. } else if (likely(PyTuple_Check(exc_type))) {
  15585. return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
  15586. } else {
  15587. }
  15588. }
  15589. return PyErr_GivenExceptionMatches(err, exc_type);
  15590. }
  15591. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
  15592. assert(PyExceptionClass_Check(exc_type1));
  15593. assert(PyExceptionClass_Check(exc_type2));
  15594. if (likely(err == exc_type1 || err == exc_type2)) return 1;
  15595. if (likely(PyExceptionClass_Check(err))) {
  15596. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
  15597. }
  15598. return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
  15599. }
  15600. #endif
  15601. /* GetRuntimeVersion */
  15602. #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  15603. void __Pyx_init_runtime_version(void) {
  15604. if (__Pyx_cached_runtime_version == 0) {
  15605. const char* rt_version = Py_GetVersion();
  15606. unsigned long version = 0;
  15607. unsigned long factor = 0x01000000UL;
  15608. unsigned int digit = 0;
  15609. int i = 0;
  15610. while (factor) {
  15611. while ('0' <= rt_version[i] && rt_version[i] <= '9') {
  15612. digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
  15613. ++i;
  15614. }
  15615. version += factor * digit;
  15616. if (rt_version[i] != '.')
  15617. break;
  15618. digit = 0;
  15619. factor >>= 8;
  15620. ++i;
  15621. }
  15622. __Pyx_cached_runtime_version = version;
  15623. }
  15624. }
  15625. #endif
  15626. static unsigned long __Pyx_get_runtime_version(void) {
  15627. #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
  15628. return Py_Version & ~0xFFUL;
  15629. #else
  15630. return __Pyx_cached_runtime_version;
  15631. #endif
  15632. }
  15633. /* CheckBinaryVersion */
  15634. static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
  15635. const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
  15636. if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
  15637. return 0;
  15638. if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
  15639. return 1;
  15640. {
  15641. char message[200];
  15642. PyOS_snprintf(message, sizeof(message),
  15643. "compile time Python version %d.%d "
  15644. "of module '%.100s' "
  15645. "%s "
  15646. "runtime version %d.%d",
  15647. (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
  15648. __Pyx_MODULE_NAME,
  15649. (allow_newer) ? "was newer than" : "does not match",
  15650. (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
  15651. );
  15652. return PyErr_WarnEx(NULL, message, 1);
  15653. }
  15654. }
  15655. /* NewCodeObj */
  15656. #if CYTHON_COMPILING_IN_LIMITED_API
  15657. static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
  15658. PyObject *code, PyObject *c, PyObject* n, PyObject *v,
  15659. PyObject *fv, PyObject *cell, PyObject* fn,
  15660. PyObject *name, int fline, PyObject *lnos) {
  15661. PyObject *exception_table = NULL;
  15662. PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
  15663. #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  15664. PyObject *version_info;
  15665. PyObject *py_minor_version = NULL;
  15666. #endif
  15667. long minor_version = 0;
  15668. PyObject *type, *value, *traceback;
  15669. PyErr_Fetch(&type, &value, &traceback);
  15670. #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
  15671. minor_version = 11;
  15672. #else
  15673. if (!(version_info = PySys_GetObject("version_info"))) goto end;
  15674. if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
  15675. minor_version = PyLong_AsLong(py_minor_version);
  15676. Py_DECREF(py_minor_version);
  15677. if (minor_version == -1 && PyErr_Occurred()) goto end;
  15678. #endif
  15679. if (!(types_module = PyImport_ImportModule("types"))) goto end;
  15680. if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
  15681. if (minor_version <= 7) {
  15682. (void)p;
  15683. result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
  15684. c, n, v, fn, name, fline, lnos, fv, cell);
  15685. } else if (minor_version <= 10) {
  15686. result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
  15687. c, n, v, fn, name, fline, lnos, fv, cell);
  15688. } else {
  15689. if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
  15690. result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
  15691. c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
  15692. }
  15693. end:
  15694. Py_XDECREF(code_type);
  15695. Py_XDECREF(exception_table);
  15696. Py_XDECREF(types_module);
  15697. if (type) {
  15698. PyErr_Restore(type, value, traceback);
  15699. }
  15700. return result;
  15701. }
  15702. #elif PY_VERSION_HEX >= 0x030B0000
  15703. static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
  15704. PyObject *code, PyObject *c, PyObject* n, PyObject *v,
  15705. PyObject *fv, PyObject *cell, PyObject* fn,
  15706. PyObject *name, int fline, PyObject *lnos) {
  15707. PyCodeObject *result;
  15708. result =
  15709. #if PY_VERSION_HEX >= 0x030C0000
  15710. PyUnstable_Code_NewWithPosOnlyArgs
  15711. #else
  15712. PyCode_NewWithPosOnlyArgs
  15713. #endif
  15714. (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
  15715. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
  15716. if (likely(result))
  15717. result->_co_firsttraceable = 0;
  15718. #endif
  15719. return result;
  15720. }
  15721. #elif !CYTHON_COMPILING_IN_PYPY
  15722. #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  15723. PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  15724. #else
  15725. #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  15726. PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  15727. #endif
  15728. static PyObject* __Pyx_PyCode_New(
  15729. const __Pyx_PyCode_New_function_description descr,
  15730. PyObject * const *varnames,
  15731. PyObject *filename,
  15732. PyObject *funcname,
  15733. PyObject *line_table,
  15734. PyObject *tuple_dedup_map
  15735. ) {
  15736. PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
  15737. Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
  15738. PyObject *varnames_tuple = PyTuple_New(var_count);
  15739. if (unlikely(!varnames_tuple)) return NULL;
  15740. for (Py_ssize_t i=0; i < var_count; i++) {
  15741. Py_INCREF(varnames[i]);
  15742. if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
  15743. }
  15744. #if CYTHON_COMPILING_IN_LIMITED_API
  15745. varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
  15746. if (!varnames_tuple_dedup) {
  15747. if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
  15748. varnames_tuple_dedup = varnames_tuple;
  15749. }
  15750. #else
  15751. varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
  15752. if (unlikely(!varnames_tuple_dedup)) goto done;
  15753. #endif
  15754. #if CYTHON_AVOID_BORROWED_REFS
  15755. Py_INCREF(varnames_tuple_dedup);
  15756. #endif
  15757. if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
  15758. Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
  15759. #if !CYTHON_ASSUME_SAFE_SIZE
  15760. if (unlikely(line_table_length == -1)) goto done;
  15761. #endif
  15762. Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
  15763. code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
  15764. if (unlikely(!code_bytes)) goto done;
  15765. char* c_code_bytes = PyBytes_AsString(code_bytes);
  15766. if (unlikely(!c_code_bytes)) goto done;
  15767. memset(c_code_bytes, 0, (size_t) code_len);
  15768. }
  15769. code_obj = (PyObject*) __Pyx__PyCode_New(
  15770. (int) descr.argcount,
  15771. (int) descr.num_posonly_args,
  15772. (int) descr.num_kwonly_args,
  15773. (int) descr.nlocals,
  15774. 0,
  15775. (int) descr.flags,
  15776. code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
  15777. __pyx_mstate_global->__pyx_empty_tuple,
  15778. __pyx_mstate_global->__pyx_empty_tuple,
  15779. varnames_tuple_dedup,
  15780. __pyx_mstate_global->__pyx_empty_tuple,
  15781. __pyx_mstate_global->__pyx_empty_tuple,
  15782. filename,
  15783. funcname,
  15784. (int) descr.first_line,
  15785. (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
  15786. );
  15787. done:
  15788. Py_XDECREF(code_bytes);
  15789. #if CYTHON_AVOID_BORROWED_REFS
  15790. Py_XDECREF(varnames_tuple_dedup);
  15791. #endif
  15792. Py_DECREF(varnames_tuple);
  15793. return code_obj;
  15794. }
  15795. /* DecompressString */
  15796. static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
  15797. PyObject *module, *decompress, *compressed_bytes, *decompressed;
  15798. const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
  15799. PyObject *methodname = PyUnicode_FromString("decompress");
  15800. if (unlikely(!methodname)) return NULL;
  15801. #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
  15802. if (algo == 3) {
  15803. PyObject *fromlist = Py_BuildValue("[O]", methodname);
  15804. if (unlikely(!fromlist)) return NULL;
  15805. module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
  15806. Py_DECREF(fromlist);
  15807. } else
  15808. #endif
  15809. module = PyImport_ImportModule(module_name);
  15810. if (unlikely(!module)) goto import_failed;
  15811. decompress = PyObject_GetAttr(module, methodname);
  15812. if (unlikely(!decompress)) goto import_failed;
  15813. {
  15814. #ifdef __cplusplus
  15815. char *memview_bytes = const_cast<char*>(s);
  15816. #else
  15817. #if defined(__clang__)
  15818. #pragma clang diagnostic push
  15819. #pragma clang diagnostic ignored "-Wcast-qual"
  15820. #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
  15821. #pragma GCC diagnostic push
  15822. #pragma GCC diagnostic ignored "-Wcast-qual"
  15823. #endif
  15824. char *memview_bytes = (char*) s;
  15825. #if defined(__clang__)
  15826. #pragma clang diagnostic pop
  15827. #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
  15828. #pragma GCC diagnostic pop
  15829. #endif
  15830. #endif
  15831. #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
  15832. int memview_flags = 0x100;
  15833. #else
  15834. int memview_flags = PyBUF_READ;
  15835. #endif
  15836. compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
  15837. }
  15838. if (unlikely(!compressed_bytes)) {
  15839. Py_DECREF(decompress);
  15840. goto bad;
  15841. }
  15842. decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
  15843. Py_DECREF(compressed_bytes);
  15844. Py_DECREF(decompress);
  15845. Py_DECREF(module);
  15846. Py_DECREF(methodname);
  15847. return decompressed;
  15848. import_failed:
  15849. PyErr_Format(PyExc_ImportError,
  15850. "Failed to import '%.20s.decompress' - cannot initialise module strings. "
  15851. "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
  15852. module_name, algo);
  15853. bad:
  15854. Py_XDECREF(module);
  15855. Py_DECREF(methodname);
  15856. return NULL;
  15857. }
  15858. #include <string.h>
  15859. static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
  15860. size_t len = strlen(s);
  15861. if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
  15862. PyErr_SetString(PyExc_OverflowError, "byte string is too long");
  15863. return -1;
  15864. }
  15865. return (Py_ssize_t) len;
  15866. }
  15867. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
  15868. Py_ssize_t len = __Pyx_ssize_strlen(c_str);
  15869. if (unlikely(len < 0)) return NULL;
  15870. return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
  15871. }
  15872. static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
  15873. Py_ssize_t len = __Pyx_ssize_strlen(c_str);
  15874. if (unlikely(len < 0)) return NULL;
  15875. return PyByteArray_FromStringAndSize(c_str, len);
  15876. }
  15877. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
  15878. Py_ssize_t ignore;
  15879. return __Pyx_PyObject_AsStringAndSize(o, &ignore);
  15880. }
  15881. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  15882. static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  15883. if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
  15884. #if CYTHON_COMPILING_IN_LIMITED_API
  15885. {
  15886. const char* result;
  15887. Py_ssize_t unicode_length;
  15888. CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  15889. #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
  15890. if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
  15891. #else
  15892. result = PyUnicode_AsUTF8AndSize(o, length);
  15893. #endif
  15894. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  15895. unicode_length = PyUnicode_GetLength(o);
  15896. if (unlikely(unicode_length < 0)) return NULL;
  15897. if (unlikely(unicode_length != *length)) {
  15898. PyUnicode_AsASCIIString(o);
  15899. return NULL;
  15900. }
  15901. #endif
  15902. return result;
  15903. }
  15904. #else
  15905. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  15906. if (likely(PyUnicode_IS_ASCII(o))) {
  15907. *length = PyUnicode_GET_LENGTH(o);
  15908. return PyUnicode_AsUTF8(o);
  15909. } else {
  15910. PyUnicode_AsASCIIString(o);
  15911. return NULL;
  15912. }
  15913. #else
  15914. return PyUnicode_AsUTF8AndSize(o, length);
  15915. #endif
  15916. #endif
  15917. }
  15918. #endif
  15919. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  15920. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  15921. if (PyUnicode_Check(o)) {
  15922. return __Pyx_PyUnicode_AsStringAndSize(o, length);
  15923. } else
  15924. #endif
  15925. if (PyByteArray_Check(o)) {
  15926. #if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
  15927. *length = PyByteArray_GET_SIZE(o);
  15928. return PyByteArray_AS_STRING(o);
  15929. #else
  15930. *length = PyByteArray_Size(o);
  15931. if (*length == -1) return NULL;
  15932. return PyByteArray_AsString(o);
  15933. #endif
  15934. } else
  15935. {
  15936. char* result;
  15937. int r = PyBytes_AsStringAndSize(o, &result, length);
  15938. if (unlikely(r < 0)) {
  15939. return NULL;
  15940. } else {
  15941. return result;
  15942. }
  15943. }
  15944. }
  15945. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
  15946. int is_true = x == Py_True;
  15947. if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
  15948. else return PyObject_IsTrue(x);
  15949. }
  15950. static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
  15951. int retval;
  15952. if (unlikely(!x)) return -1;
  15953. retval = __Pyx_PyObject_IsTrue(x);
  15954. Py_DECREF(x);
  15955. return retval;
  15956. }
  15957. static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
  15958. __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
  15959. if (PyLong_Check(result)) {
  15960. if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
  15961. "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
  15962. "The ability to return an instance of a strict subclass of int is deprecated, "
  15963. "and may be removed in a future version of Python.",
  15964. result_type_name)) {
  15965. __Pyx_DECREF_TypeName(result_type_name);
  15966. Py_DECREF(result);
  15967. return NULL;
  15968. }
  15969. __Pyx_DECREF_TypeName(result_type_name);
  15970. return result;
  15971. }
  15972. PyErr_Format(PyExc_TypeError,
  15973. "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
  15974. result_type_name);
  15975. __Pyx_DECREF_TypeName(result_type_name);
  15976. Py_DECREF(result);
  15977. return NULL;
  15978. }
  15979. static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
  15980. #if CYTHON_USE_TYPE_SLOTS
  15981. PyNumberMethods *m;
  15982. #endif
  15983. PyObject *res = NULL;
  15984. if (likely(PyLong_Check(x)))
  15985. return __Pyx_NewRef(x);
  15986. #if CYTHON_USE_TYPE_SLOTS
  15987. m = Py_TYPE(x)->tp_as_number;
  15988. if (likely(m && m->nb_int)) {
  15989. res = m->nb_int(x);
  15990. }
  15991. #else
  15992. if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
  15993. res = PyNumber_Long(x);
  15994. }
  15995. #endif
  15996. if (likely(res)) {
  15997. if (unlikely(!PyLong_CheckExact(res))) {
  15998. return __Pyx_PyNumber_LongWrongResultType(res);
  15999. }
  16000. }
  16001. else if (!PyErr_Occurred()) {
  16002. PyErr_SetString(PyExc_TypeError,
  16003. "an integer is required");
  16004. }
  16005. return res;
  16006. }
  16007. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  16008. Py_ssize_t ival;
  16009. PyObject *x;
  16010. if (likely(PyLong_CheckExact(b))) {
  16011. #if CYTHON_USE_PYLONG_INTERNALS
  16012. if (likely(__Pyx_PyLong_IsCompact(b))) {
  16013. return __Pyx_PyLong_CompactValue(b);
  16014. } else {
  16015. const digit* digits = __Pyx_PyLong_Digits(b);
  16016. const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
  16017. switch (size) {
  16018. case 2:
  16019. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  16020. return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16021. }
  16022. break;
  16023. case -2:
  16024. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  16025. return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16026. }
  16027. break;
  16028. case 3:
  16029. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  16030. return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16031. }
  16032. break;
  16033. case -3:
  16034. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  16035. return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16036. }
  16037. break;
  16038. case 4:
  16039. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  16040. return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16041. }
  16042. break;
  16043. case -4:
  16044. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  16045. return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16046. }
  16047. break;
  16048. }
  16049. }
  16050. #endif
  16051. return PyLong_AsSsize_t(b);
  16052. }
  16053. x = PyNumber_Index(b);
  16054. if (!x) return -1;
  16055. ival = PyLong_AsSsize_t(x);
  16056. Py_DECREF(x);
  16057. return ival;
  16058. }
  16059. static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  16060. if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
  16061. return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  16062. } else {
  16063. Py_ssize_t ival;
  16064. PyObject *x;
  16065. x = PyNumber_Index(o);
  16066. if (!x) return -1;
  16067. ival = PyLong_AsLong(x);
  16068. Py_DECREF(x);
  16069. return ival;
  16070. }
  16071. }
  16072. static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
  16073. CYTHON_UNUSED_VAR(b);
  16074. return __Pyx_NewRef(Py_None);
  16075. }
  16076. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  16077. return __Pyx_NewRef(b ? Py_True: Py_False);
  16078. }
  16079. static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
  16080. return PyLong_FromSize_t(ival);
  16081. }
  16082. /* MultiPhaseInitModuleState */
  16083. #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
  16084. #ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16085. #if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  16086. #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
  16087. #else
  16088. #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
  16089. #endif
  16090. #endif
  16091. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
  16092. #error "Module state with PEP489 requires atomics. Currently that's one of\
  16093. C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
  16094. #endif
  16095. #if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16096. #define __Pyx_ModuleStateLookup_Lock()
  16097. #define __Pyx_ModuleStateLookup_Unlock()
  16098. #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
  16099. static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
  16100. #define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
  16101. #define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
  16102. #elif defined(__cplusplus) && __cplusplus >= 201103L
  16103. #include <mutex>
  16104. static std::mutex __Pyx_ModuleStateLookup_mutex;
  16105. #define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
  16106. #define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
  16107. #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
  16108. #include <threads.h>
  16109. static mtx_t __Pyx_ModuleStateLookup_mutex;
  16110. static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
  16111. static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
  16112. mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
  16113. }
  16114. #define __Pyx_ModuleStateLookup_Lock()\
  16115. call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  16116. mtx_lock(&__Pyx_ModuleStateLookup_mutex)
  16117. #define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
  16118. #elif defined(HAVE_PTHREAD_H)
  16119. #include <pthread.h>
  16120. static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
  16121. #define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
  16122. #define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
  16123. #elif defined(_WIN32)
  16124. #include <Windows.h> // synchapi.h on its own doesn't work
  16125. static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
  16126. #define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
  16127. #define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
  16128. #else
  16129. #error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
  16130. Requires C standard >= C11, or C++ standard >= C++11,\
  16131. or pthreads, or the Windows 32 API, or Python >= 3.13."
  16132. #endif
  16133. typedef struct {
  16134. int64_t id;
  16135. PyObject *module;
  16136. } __Pyx_InterpreterIdAndModule;
  16137. typedef struct {
  16138. char interpreter_id_as_index;
  16139. Py_ssize_t count;
  16140. Py_ssize_t allocated;
  16141. __Pyx_InterpreterIdAndModule table[1];
  16142. } __Pyx_ModuleStateLookupData;
  16143. #define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
  16144. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16145. static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
  16146. #endif
  16147. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16148. static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
  16149. #else
  16150. static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
  16151. #endif
  16152. static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
  16153. __Pyx_InterpreterIdAndModule* table,
  16154. Py_ssize_t count,
  16155. int64_t interpreterId) {
  16156. __Pyx_InterpreterIdAndModule* begin = table;
  16157. __Pyx_InterpreterIdAndModule* end = begin + count;
  16158. if (begin->id == interpreterId) {
  16159. return begin;
  16160. }
  16161. while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
  16162. __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
  16163. if (halfway->id == interpreterId) {
  16164. return halfway;
  16165. }
  16166. if (halfway->id < interpreterId) {
  16167. begin = halfway;
  16168. } else {
  16169. end = halfway;
  16170. }
  16171. }
  16172. for (; begin < end; ++begin) {
  16173. if (begin->id >= interpreterId) return begin;
  16174. }
  16175. return begin;
  16176. }
  16177. static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
  16178. int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
  16179. if (interpreter_id == -1) return NULL;
  16180. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16181. __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
  16182. {
  16183. __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
  16184. if (likely(data)) {
  16185. __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
  16186. if (likely(data == new_data)) {
  16187. goto read_finished;
  16188. }
  16189. }
  16190. __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
  16191. __Pyx_ModuleStateLookup_Lock();
  16192. __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
  16193. data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
  16194. __Pyx_ModuleStateLookup_Unlock();
  16195. }
  16196. read_finished:;
  16197. #else
  16198. __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
  16199. #endif
  16200. __Pyx_InterpreterIdAndModule* found = NULL;
  16201. if (unlikely(!data)) goto end;
  16202. if (data->interpreter_id_as_index) {
  16203. if (interpreter_id < data->count) {
  16204. found = data->table+interpreter_id;
  16205. }
  16206. } else {
  16207. found = __Pyx_State_FindModuleStateLookupTableLowerBound(
  16208. data->table, data->count, interpreter_id);
  16209. }
  16210. end:
  16211. {
  16212. PyObject *result=NULL;
  16213. if (found && found->id == interpreter_id) {
  16214. result = found->module;
  16215. }
  16216. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16217. __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
  16218. #endif
  16219. return result;
  16220. }
  16221. }
  16222. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16223. static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
  16224. while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
  16225. }
  16226. #else
  16227. #define __Pyx_ModuleStateLookup_wait_until_no_readers()
  16228. #endif
  16229. static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
  16230. Py_ssize_t to_allocate = (*old_data)->allocated;
  16231. while (to_allocate <= interpreter_id) {
  16232. if (to_allocate == 0) to_allocate = 1;
  16233. else to_allocate *= 2;
  16234. }
  16235. __Pyx_ModuleStateLookupData *new_data = *old_data;
  16236. if (to_allocate != (*old_data)->allocated) {
  16237. new_data = (__Pyx_ModuleStateLookupData *)realloc(
  16238. *old_data,
  16239. sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
  16240. if (!new_data) {
  16241. PyErr_NoMemory();
  16242. return -1;
  16243. }
  16244. for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
  16245. new_data->table[i].id = i;
  16246. new_data->table[i].module = NULL;
  16247. }
  16248. new_data->allocated = to_allocate;
  16249. }
  16250. new_data->table[interpreter_id].module = module;
  16251. if (new_data->count < interpreter_id+1) {
  16252. new_data->count = interpreter_id+1;
  16253. }
  16254. *old_data = new_data;
  16255. return 0;
  16256. }
  16257. static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
  16258. __Pyx_InterpreterIdAndModule *read = data->table;
  16259. __Pyx_InterpreterIdAndModule *write = data->table;
  16260. __Pyx_InterpreterIdAndModule *end = read + data->count;
  16261. for (; read<end; ++read) {
  16262. if (read->module) {
  16263. write->id = read->id;
  16264. write->module = read->module;
  16265. ++write;
  16266. }
  16267. }
  16268. data->count = write - data->table;
  16269. for (; write<end; ++write) {
  16270. write->id = 0;
  16271. write->module = NULL;
  16272. }
  16273. data->interpreter_id_as_index = 0;
  16274. }
  16275. static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
  16276. int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
  16277. if (interpreter_id == -1) return -1;
  16278. int result = 0;
  16279. __Pyx_ModuleStateLookup_Lock();
  16280. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16281. __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
  16282. __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
  16283. #else
  16284. __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
  16285. #endif
  16286. __Pyx_ModuleStateLookupData *new_data = old_data;
  16287. if (!new_data) {
  16288. new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
  16289. if (!new_data) {
  16290. result = -1;
  16291. PyErr_NoMemory();
  16292. goto end;
  16293. }
  16294. new_data->allocated = 1;
  16295. new_data->interpreter_id_as_index = 1;
  16296. }
  16297. __Pyx_ModuleStateLookup_wait_until_no_readers();
  16298. if (new_data->interpreter_id_as_index) {
  16299. if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
  16300. result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
  16301. goto end;
  16302. }
  16303. __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
  16304. }
  16305. {
  16306. Py_ssize_t insert_at = 0;
  16307. {
  16308. __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
  16309. new_data->table, new_data->count, interpreter_id);
  16310. assert(lower_bound);
  16311. insert_at = lower_bound - new_data->table;
  16312. if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
  16313. lower_bound->module = module;
  16314. goto end; // already in table, nothing more to do
  16315. }
  16316. }
  16317. if (new_data->count+1 >= new_data->allocated) {
  16318. Py_ssize_t to_allocate = (new_data->count+1)*2;
  16319. new_data =
  16320. (__Pyx_ModuleStateLookupData*)realloc(
  16321. new_data,
  16322. sizeof(__Pyx_ModuleStateLookupData) +
  16323. (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
  16324. if (!new_data) {
  16325. result = -1;
  16326. new_data = old_data;
  16327. PyErr_NoMemory();
  16328. goto end;
  16329. }
  16330. new_data->allocated = to_allocate;
  16331. }
  16332. ++new_data->count;
  16333. int64_t last_id = interpreter_id;
  16334. PyObject *last_module = module;
  16335. for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
  16336. int64_t current_id = new_data->table[i].id;
  16337. new_data->table[i].id = last_id;
  16338. last_id = current_id;
  16339. PyObject *current_module = new_data->table[i].module;
  16340. new_data->table[i].module = last_module;
  16341. last_module = current_module;
  16342. }
  16343. }
  16344. end:
  16345. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16346. __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
  16347. #else
  16348. __Pyx_ModuleStateLookup_data = new_data;
  16349. #endif
  16350. __Pyx_ModuleStateLookup_Unlock();
  16351. return result;
  16352. }
  16353. static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
  16354. int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
  16355. if (interpreter_id == -1) return -1;
  16356. __Pyx_ModuleStateLookup_Lock();
  16357. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16358. __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
  16359. __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
  16360. #else
  16361. __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
  16362. #endif
  16363. if (data->interpreter_id_as_index) {
  16364. if (interpreter_id < data->count) {
  16365. data->table[interpreter_id].module = NULL;
  16366. }
  16367. goto done;
  16368. }
  16369. {
  16370. __Pyx_ModuleStateLookup_wait_until_no_readers();
  16371. __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
  16372. data->table, data->count, interpreter_id);
  16373. if (!lower_bound) goto done;
  16374. if (lower_bound->id != interpreter_id) goto done;
  16375. __Pyx_InterpreterIdAndModule *end = data->table+data->count;
  16376. for (;lower_bound<end-1; ++lower_bound) {
  16377. lower_bound->id = (lower_bound+1)->id;
  16378. lower_bound->module = (lower_bound+1)->module;
  16379. }
  16380. }
  16381. --data->count;
  16382. if (data->count == 0) {
  16383. free(data);
  16384. data = NULL;
  16385. }
  16386. done:
  16387. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16388. __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
  16389. #else
  16390. __Pyx_ModuleStateLookup_data = data;
  16391. #endif
  16392. __Pyx_ModuleStateLookup_Unlock();
  16393. return 0;
  16394. }
  16395. #endif
  16396. /* #### Code section: utility_code_pragmas_end ### */
  16397. #ifdef _MSC_VER
  16398. #pragma warning( pop )
  16399. #endif
  16400. /* #### Code section: end ### */
  16401. #endif /* Py_PYTHON_H */