lexer.c 731 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059
  1. /* Generated by Cython 3.2.4 */
  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_4"
  35. #define CYTHON_HEX_VERSION 0x030204F0
  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. #ifdef CYTHON_FREETHREADING_COMPATIBLE
  1130. #if CYTHON_FREETHREADING_COMPATIBLE
  1131. #define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
  1132. #else
  1133. #define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
  1134. #endif
  1135. #else
  1136. #define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
  1137. #endif
  1138. #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
  1139. #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
  1140. #define __PYX_DEFAULT_STRING_ENCODING ""
  1141. #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
  1142. #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  1143. #define __Pyx_uchar_cast(c) ((unsigned char)c)
  1144. #define __Pyx_long_cast(x) ((long)x)
  1145. #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
  1146. (sizeof(type) < sizeof(Py_ssize_t)) ||\
  1147. (sizeof(type) > sizeof(Py_ssize_t) &&\
  1148. likely(v < (type)PY_SSIZE_T_MAX ||\
  1149. v == (type)PY_SSIZE_T_MAX) &&\
  1150. (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
  1151. v == (type)PY_SSIZE_T_MIN))) ||\
  1152. (sizeof(type) == sizeof(Py_ssize_t) &&\
  1153. (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
  1154. v == (type)PY_SSIZE_T_MAX))) )
  1155. static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
  1156. return (size_t) i < (size_t) limit;
  1157. }
  1158. #if defined (__cplusplus) && __cplusplus >= 201103L
  1159. #include <cstdlib>
  1160. #define __Pyx_sst_abs(value) std::abs(value)
  1161. #elif SIZEOF_INT >= SIZEOF_SIZE_T
  1162. #define __Pyx_sst_abs(value) abs(value)
  1163. #elif SIZEOF_LONG >= SIZEOF_SIZE_T
  1164. #define __Pyx_sst_abs(value) labs(value)
  1165. #elif defined (_MSC_VER)
  1166. #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
  1167. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  1168. #define __Pyx_sst_abs(value) llabs(value)
  1169. #elif defined (__GNUC__)
  1170. #define __Pyx_sst_abs(value) __builtin_llabs(value)
  1171. #else
  1172. #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
  1173. #endif
  1174. static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
  1175. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
  1176. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
  1177. static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
  1178. #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
  1179. #define __Pyx_PyBytes_FromString PyBytes_FromString
  1180. #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
  1181. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
  1182. #if CYTHON_ASSUME_SAFE_MACROS
  1183. #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
  1184. #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
  1185. #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
  1186. #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
  1187. #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
  1188. #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
  1189. #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
  1190. #else
  1191. #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s))
  1192. #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s))
  1193. #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s))
  1194. #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s))
  1195. #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s))
  1196. #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s))
  1197. #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
  1198. #endif
  1199. #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
  1200. #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
  1201. #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
  1202. #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
  1203. #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
  1204. #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
  1205. #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
  1206. #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
  1207. #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
  1208. #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
  1209. #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
  1210. static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
  1211. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
  1212. return Py_NewRef(obj);
  1213. #else
  1214. Py_INCREF(obj);
  1215. return obj;
  1216. #endif
  1217. }
  1218. static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
  1219. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
  1220. return Py_XNewRef(obj);
  1221. #else
  1222. Py_XINCREF(obj);
  1223. return obj;
  1224. #endif
  1225. }
  1226. static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
  1227. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
  1228. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
  1229. static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
  1230. static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
  1231. #define __Pyx_PySequence_Tuple(obj)\
  1232. (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
  1233. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
  1234. static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
  1235. static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
  1236. #if CYTHON_ASSUME_SAFE_MACROS
  1237. #define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
  1238. #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
  1239. #else
  1240. #define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
  1241. #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
  1242. #endif
  1243. #define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
  1244. #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
  1245. #if CYTHON_USE_PYLONG_INTERNALS
  1246. #if PY_VERSION_HEX >= 0x030C00A7
  1247. #ifndef _PyLong_SIGN_MASK
  1248. #define _PyLong_SIGN_MASK 3
  1249. #endif
  1250. #ifndef _PyLong_NON_SIZE_BITS
  1251. #define _PyLong_NON_SIZE_BITS 3
  1252. #endif
  1253. #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  1254. #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
  1255. #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
  1256. #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
  1257. #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
  1258. #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
  1259. #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  1260. #define __Pyx_PyLong_SignedDigitCount(x)\
  1261. ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  1262. #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
  1263. #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
  1264. #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
  1265. #else
  1266. #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
  1267. #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  1268. #endif
  1269. typedef Py_ssize_t __Pyx_compact_pylong;
  1270. typedef size_t __Pyx_compact_upylong;
  1271. #else
  1272. #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
  1273. #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
  1274. #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
  1275. #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
  1276. #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  1277. #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
  1278. #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
  1279. #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  1280. #define __Pyx_PyLong_CompactValue(x)\
  1281. ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  1282. typedef sdigit __Pyx_compact_pylong;
  1283. typedef digit __Pyx_compact_upylong;
  1284. #endif
  1285. #if PY_VERSION_HEX >= 0x030C00A5
  1286. #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
  1287. #else
  1288. #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
  1289. #endif
  1290. #endif
  1291. #if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  1292. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
  1293. #elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  1294. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
  1295. #else
  1296. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
  1297. #endif
  1298. /* Test for GCC > 2.95 */
  1299. #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  1300. #define likely(x) __builtin_expect(!!(x), 1)
  1301. #define unlikely(x) __builtin_expect(!!(x), 0)
  1302. #else /* !__GNUC__ or GCC < 2.95 */
  1303. #define likely(x) (x)
  1304. #define unlikely(x) (x)
  1305. #endif /* __GNUC__ */
  1306. /* PretendToInitialize */
  1307. #ifdef __cplusplus
  1308. #if __cplusplus > 201103L
  1309. #include <type_traits>
  1310. #endif
  1311. template <typename T>
  1312. static void __Pyx_pretend_to_initialize(T* ptr) {
  1313. #if __cplusplus > 201103L
  1314. if ((std::is_trivially_default_constructible<T>::value))
  1315. #endif
  1316. *ptr = T();
  1317. (void)ptr;
  1318. }
  1319. #else
  1320. static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
  1321. #endif
  1322. #if !CYTHON_USE_MODULE_STATE
  1323. static PyObject *__pyx_m = NULL;
  1324. #endif
  1325. static int __pyx_lineno;
  1326. static int __pyx_clineno = 0;
  1327. static const char * const __pyx_cfilenm = __FILE__;
  1328. static const char *__pyx_filename;
  1329. /* #### Code section: filename_table ### */
  1330. static const char* const __pyx_f[] = {
  1331. "Lib/fontTools/feaLib/lexer.py",
  1332. };
  1333. /* #### Code section: utility_code_proto_before_types ### */
  1334. /* Atomics.proto (used by UnpackUnboundCMethod) */
  1335. #include <pythread.h>
  1336. #ifndef CYTHON_ATOMICS
  1337. #define CYTHON_ATOMICS 1
  1338. #endif
  1339. #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
  1340. #define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  1341. #define __pyx_atomic_int_type int
  1342. #define __pyx_nonatomic_int_type int
  1343. #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
  1344. (__STDC_VERSION__ >= 201112L) &&\
  1345. !defined(__STDC_NO_ATOMICS__))
  1346. #include <stdatomic.h>
  1347. #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
  1348. (__cplusplus >= 201103L) ||\
  1349. (defined(_MSC_VER) && _MSC_VER >= 1700)))
  1350. #include <atomic>
  1351. #endif
  1352. #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
  1353. (__STDC_VERSION__ >= 201112L) &&\
  1354. !defined(__STDC_NO_ATOMICS__) &&\
  1355. ATOMIC_INT_LOCK_FREE == 2)
  1356. #undef __pyx_atomic_int_type
  1357. #define __pyx_atomic_int_type atomic_int
  1358. #define __pyx_atomic_ptr_type atomic_uintptr_t
  1359. #define __pyx_nonatomic_ptr_type uintptr_t
  1360. #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
  1361. #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
  1362. #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
  1363. #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
  1364. #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
  1365. #define __pyx_atomic_load(value) atomic_load(value)
  1366. #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
  1367. #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
  1368. #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
  1369. #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
  1370. #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
  1371. #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
  1372. #pragma message ("Using standard C atomics")
  1373. #elif defined(__PYX_DEBUG_ATOMICS)
  1374. #warning "Using standard C atomics"
  1375. #endif
  1376. #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
  1377. (__cplusplus >= 201103L) ||\
  1378. \
  1379. (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
  1380. ATOMIC_INT_LOCK_FREE == 2)
  1381. #undef __pyx_atomic_int_type
  1382. #define __pyx_atomic_int_type std::atomic_int
  1383. #define __pyx_atomic_ptr_type std::atomic_uintptr_t
  1384. #define __pyx_nonatomic_ptr_type uintptr_t
  1385. #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
  1386. #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
  1387. #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
  1388. #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
  1389. #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
  1390. #define __pyx_atomic_load(value) std::atomic_load(value)
  1391. #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
  1392. #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
  1393. #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
  1394. #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
  1395. #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
  1396. #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
  1397. #pragma message ("Using standard C++ atomics")
  1398. #elif defined(__PYX_DEBUG_ATOMICS)
  1399. #warning "Using standard C++ atomics"
  1400. #endif
  1401. #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
  1402. (__GNUC_MINOR__ > 1 ||\
  1403. (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
  1404. #define __pyx_atomic_ptr_type void*
  1405. #define __pyx_nonatomic_ptr_type void*
  1406. #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
  1407. #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
  1408. #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
  1409. #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
  1410. static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
  1411. __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
  1412. int result = old == *expected;
  1413. *expected = old;
  1414. return result;
  1415. }
  1416. #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
  1417. #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
  1418. #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
  1419. #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
  1420. #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
  1421. static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
  1422. __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
  1423. int result = old == *expected;
  1424. *expected = old;
  1425. return result;
  1426. }
  1427. #ifdef __PYX_DEBUG_ATOMICS
  1428. #warning "Using GNU atomics"
  1429. #endif
  1430. #elif CYTHON_ATOMICS && defined(_MSC_VER)
  1431. #include <intrin.h>
  1432. #undef __pyx_atomic_int_type
  1433. #define __pyx_atomic_int_type long
  1434. #define __pyx_atomic_ptr_type void*
  1435. #undef __pyx_nonatomic_int_type
  1436. #define __pyx_nonatomic_int_type long
  1437. #define __pyx_nonatomic_ptr_type void*
  1438. #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
  1439. #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
  1440. #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
  1441. #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
  1442. #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
  1443. static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
  1444. __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
  1445. int result = old == *expected;
  1446. *expected = old;
  1447. return result;
  1448. }
  1449. #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
  1450. #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
  1451. #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
  1452. #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
  1453. #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
  1454. static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
  1455. __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
  1456. int result = old == *expected;
  1457. *expected = old;
  1458. return result;
  1459. }
  1460. #ifdef __PYX_DEBUG_ATOMICS
  1461. #pragma message ("Using MSVC atomics")
  1462. #endif
  1463. #else
  1464. #undef CYTHON_ATOMICS
  1465. #define CYTHON_ATOMICS 0
  1466. #ifdef __PYX_DEBUG_ATOMICS
  1467. #warning "Not using atomics"
  1468. #endif
  1469. #endif
  1470. /* CriticalSectionsDefinition.proto (used by CriticalSections) */
  1471. #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  1472. #define __Pyx_PyCriticalSection void*
  1473. #define __Pyx_PyCriticalSection2 void*
  1474. #define __Pyx_PyCriticalSection_End(cs)
  1475. #define __Pyx_PyCriticalSection2_End(cs)
  1476. #else
  1477. #define __Pyx_PyCriticalSection PyCriticalSection
  1478. #define __Pyx_PyCriticalSection2 PyCriticalSection2
  1479. #define __Pyx_PyCriticalSection_End PyCriticalSection_End
  1480. #define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
  1481. #endif
  1482. /* CriticalSections.proto (used by ParseKeywordsImpl) */
  1483. #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  1484. #define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
  1485. #define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
  1486. #else
  1487. #define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
  1488. #define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
  1489. #endif
  1490. #if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
  1491. #define __Pyx_BEGIN_CRITICAL_SECTION(o) {
  1492. #define __Pyx_END_CRITICAL_SECTION() }
  1493. #else
  1494. #define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
  1495. #define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
  1496. #endif
  1497. /* IncludeStructmemberH.proto (used by FixUpExtensionType) */
  1498. #include <structmember.h>
  1499. /* #### Code section: numeric_typedefs ### */
  1500. /* #### Code section: complex_type_declarations ### */
  1501. /* #### Code section: type_declarations ### */
  1502. /*--- Type declarations ---*/
  1503. /* #### Code section: utility_code_proto ### */
  1504. /* --- Runtime support code (head) --- */
  1505. /* Refnanny.proto */
  1506. #ifndef CYTHON_REFNANNY
  1507. #define CYTHON_REFNANNY 0
  1508. #endif
  1509. #if CYTHON_REFNANNY
  1510. typedef struct {
  1511. void (*INCREF)(void*, PyObject*, Py_ssize_t);
  1512. void (*DECREF)(void*, PyObject*, Py_ssize_t);
  1513. void (*GOTREF)(void*, PyObject*, Py_ssize_t);
  1514. void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
  1515. void* (*SetupContext)(const char*, Py_ssize_t, const char*);
  1516. void (*FinishContext)(void**);
  1517. } __Pyx_RefNannyAPIStruct;
  1518. static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  1519. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  1520. #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  1521. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  1522. if (acquire_gil) {\
  1523. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  1524. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
  1525. PyGILState_Release(__pyx_gilstate_save);\
  1526. } else {\
  1527. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
  1528. }
  1529. #define __Pyx_RefNannyFinishContextNogil() {\
  1530. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  1531. __Pyx_RefNannyFinishContext();\
  1532. PyGILState_Release(__pyx_gilstate_save);\
  1533. }
  1534. #define __Pyx_RefNannyFinishContextNogil() {\
  1535. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  1536. __Pyx_RefNannyFinishContext();\
  1537. PyGILState_Release(__pyx_gilstate_save);\
  1538. }
  1539. #define __Pyx_RefNannyFinishContext()\
  1540. __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  1541. #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  1542. #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  1543. #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  1544. #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  1545. #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
  1546. #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  1547. #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  1548. #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
  1549. #else
  1550. #define __Pyx_RefNannyDeclarations
  1551. #define __Pyx_RefNannySetupContext(name, acquire_gil)
  1552. #define __Pyx_RefNannyFinishContextNogil()
  1553. #define __Pyx_RefNannyFinishContext()
  1554. #define __Pyx_INCREF(r) Py_INCREF(r)
  1555. #define __Pyx_DECREF(r) Py_DECREF(r)
  1556. #define __Pyx_GOTREF(r)
  1557. #define __Pyx_GIVEREF(r)
  1558. #define __Pyx_XINCREF(r) Py_XINCREF(r)
  1559. #define __Pyx_XDECREF(r) Py_XDECREF(r)
  1560. #define __Pyx_XGOTREF(r)
  1561. #define __Pyx_XGIVEREF(r)
  1562. #endif
  1563. #define __Pyx_Py_XDECREF_SET(r, v) do {\
  1564. PyObject *tmp = (PyObject *) r;\
  1565. r = v; Py_XDECREF(tmp);\
  1566. } while (0)
  1567. #define __Pyx_XDECREF_SET(r, v) do {\
  1568. PyObject *tmp = (PyObject *) r;\
  1569. r = v; __Pyx_XDECREF(tmp);\
  1570. } while (0)
  1571. #define __Pyx_DECREF_SET(r, v) do {\
  1572. PyObject *tmp = (PyObject *) r;\
  1573. r = v; __Pyx_DECREF(tmp);\
  1574. } while (0)
  1575. #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
  1576. #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
  1577. /* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */
  1578. #if CYTHON_FAST_THREAD_STATE
  1579. #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
  1580. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
  1581. #else
  1582. #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
  1583. #endif
  1584. /* PyThreadStateGet.proto (used by PyErrFetchRestore) */
  1585. #if CYTHON_FAST_THREAD_STATE
  1586. #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
  1587. #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
  1588. #if PY_VERSION_HEX >= 0x030C00A6
  1589. #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
  1590. #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
  1591. #else
  1592. #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
  1593. #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
  1594. #endif
  1595. #else
  1596. #define __Pyx_PyThreadState_declare
  1597. #define __Pyx_PyThreadState_assign
  1598. #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
  1599. #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
  1600. #endif
  1601. /* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */
  1602. #if CYTHON_FAST_THREAD_STATE
  1603. #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
  1604. #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
  1605. #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
  1606. #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
  1607. #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
  1608. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  1609. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  1610. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
  1611. #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
  1612. #else
  1613. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  1614. #endif
  1615. #else
  1616. #define __Pyx_PyErr_Clear() PyErr_Clear()
  1617. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  1618. #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
  1619. #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
  1620. #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
  1621. #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
  1622. #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
  1623. #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
  1624. #endif
  1625. /* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */
  1626. #if CYTHON_USE_TYPE_SLOTS
  1627. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
  1628. #else
  1629. #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
  1630. #endif
  1631. /* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
  1632. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
  1633. /* GetBuiltinName.proto */
  1634. static PyObject *__Pyx_GetBuiltinName(PyObject *name);
  1635. /* TupleAndListFromArray.proto (used by fastcall) */
  1636. #if CYTHON_COMPILING_IN_CPYTHON
  1637. static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
  1638. #endif
  1639. #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
  1640. static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
  1641. #endif
  1642. /* IncludeStringH.proto (used by BytesEquals) */
  1643. #include <string.h>
  1644. /* BytesEquals.proto (used by UnicodeEquals) */
  1645. static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
  1646. /* UnicodeEquals.proto (used by fastcall) */
  1647. static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
  1648. /* fastcall.proto */
  1649. #if CYTHON_AVOID_BORROWED_REFS
  1650. #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
  1651. #elif CYTHON_ASSUME_SAFE_MACROS
  1652. #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
  1653. #else
  1654. #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
  1655. #endif
  1656. #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
  1657. #define __Pyx_KwValues_VARARGS(args, nargs) NULL
  1658. #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
  1659. #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
  1660. #if CYTHON_METH_FASTCALL
  1661. #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
  1662. #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
  1663. #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
  1664. static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  1665. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
  1666. CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  1667. #else
  1668. #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  1669. #endif
  1670. #else
  1671. #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
  1672. #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
  1673. #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
  1674. #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
  1675. #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
  1676. #endif
  1677. #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
  1678. #if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
  1679. #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
  1680. #else
  1681. #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
  1682. #endif
  1683. /* py_dict_items.proto (used by OwnedDictNext) */
  1684. static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
  1685. /* CallCFunction.proto (used by CallUnboundCMethod0) */
  1686. #define __Pyx_CallCFunction(cfunc, self, args)\
  1687. ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
  1688. #define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
  1689. ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
  1690. #define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
  1691. ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
  1692. #define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
  1693. ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)
  1694. /* PyObjectCall.proto (used by PyObjectFastCall) */
  1695. #if CYTHON_COMPILING_IN_CPYTHON
  1696. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
  1697. #else
  1698. #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
  1699. #endif
  1700. /* PyObjectCallMethO.proto (used by PyObjectFastCall) */
  1701. #if CYTHON_COMPILING_IN_CPYTHON
  1702. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
  1703. #endif
  1704. /* PyObjectFastCall.proto (used by PyObjectCallOneArg) */
  1705. #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
  1706. static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);
  1707. /* PyObjectCallOneArg.proto (used by CallUnboundCMethod0) */
  1708. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
  1709. /* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */
  1710. typedef struct {
  1711. PyObject *type;
  1712. PyObject **method_name;
  1713. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
  1714. __pyx_atomic_int_type initialized;
  1715. #endif
  1716. PyCFunction func;
  1717. PyObject *method;
  1718. int flag;
  1719. } __Pyx_CachedCFunction;
  1720. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  1721. static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
  1722. #if !CYTHON_ATOMICS
  1723. return 1;
  1724. #else
  1725. __pyx_nonatomic_int_type expected = 0;
  1726. if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
  1727. return 0;
  1728. }
  1729. return expected;
  1730. #endif
  1731. }
  1732. static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
  1733. #if CYTHON_ATOMICS
  1734. __pyx_atomic_store(&cfunc->initialized, 2);
  1735. #endif
  1736. }
  1737. #else
  1738. #define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
  1739. #define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
  1740. #endif
  1741. /* CallUnboundCMethod0.proto */
  1742. CYTHON_UNUSED
  1743. static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
  1744. #if CYTHON_COMPILING_IN_CPYTHON
  1745. static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
  1746. #else
  1747. #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
  1748. #endif
  1749. /* py_dict_values.proto (used by OwnedDictNext) */
  1750. static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
  1751. /* OwnedDictNext.proto (used by ParseKeywordsImpl) */
  1752. #if CYTHON_AVOID_BORROWED_REFS
  1753. static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
  1754. #else
  1755. CYTHON_INLINE
  1756. static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
  1757. #endif
  1758. /* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
  1759. static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
  1760. /* ParseKeywordsImpl.export */
  1761. static int __Pyx_ParseKeywordsTuple(
  1762. PyObject *kwds,
  1763. PyObject * const *kwvalues,
  1764. PyObject ** const argnames[],
  1765. PyObject *kwds2,
  1766. PyObject *values[],
  1767. Py_ssize_t num_pos_args,
  1768. Py_ssize_t num_kwargs,
  1769. const char* function_name,
  1770. int ignore_unknown_kwargs
  1771. );
  1772. static int __Pyx_ParseKeywordDictToDict(
  1773. PyObject *kwds,
  1774. PyObject ** const argnames[],
  1775. PyObject *kwds2,
  1776. PyObject *values[],
  1777. Py_ssize_t num_pos_args,
  1778. const char* function_name
  1779. );
  1780. static int __Pyx_ParseKeywordDict(
  1781. PyObject *kwds,
  1782. PyObject ** const argnames[],
  1783. PyObject *values[],
  1784. Py_ssize_t num_pos_args,
  1785. Py_ssize_t num_kwargs,
  1786. const char* function_name,
  1787. int ignore_unknown_kwargs
  1788. );
  1789. /* CallUnboundCMethod2.proto */
  1790. CYTHON_UNUSED
  1791. static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
  1792. #if CYTHON_COMPILING_IN_CPYTHON
  1793. static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
  1794. #else
  1795. #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
  1796. #endif
  1797. /* ParseKeywords.proto */
  1798. static CYTHON_INLINE int __Pyx_ParseKeywords(
  1799. PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
  1800. PyObject *kwds2, PyObject *values[],
  1801. Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
  1802. const char* function_name,
  1803. int ignore_unknown_kwargs
  1804. );
  1805. /* RaiseArgTupleInvalid.proto */
  1806. static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
  1807. Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
  1808. /* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */
  1809. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
  1810. #define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL)
  1811. #else
  1812. #define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n)
  1813. #endif
  1814. /* PyObjectSetAttrStr.proto */
  1815. #if CYTHON_USE_TYPE_SLOTS
  1816. #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
  1817. static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
  1818. #else
  1819. #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_DelAttr(o,n)
  1820. #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
  1821. #endif
  1822. /* PyDictVersioning.proto (used by GetModuleGlobalName) */
  1823. #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
  1824. #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
  1825. #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
  1826. #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
  1827. (version_var) = __PYX_GET_DICT_VERSION(dict);\
  1828. (cache_var) = (value);
  1829. #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
  1830. static PY_UINT64_T __pyx_dict_version = 0;\
  1831. static PyObject *__pyx_dict_cached_value = NULL;\
  1832. if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
  1833. (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
  1834. } else {\
  1835. (VAR) = __pyx_dict_cached_value = (LOOKUP);\
  1836. __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
  1837. }\
  1838. }
  1839. static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
  1840. static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
  1841. static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
  1842. #else
  1843. #define __PYX_GET_DICT_VERSION(dict) (0)
  1844. #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
  1845. #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
  1846. #endif
  1847. /* GetModuleGlobalName.proto */
  1848. #if CYTHON_USE_DICT_VERSIONS
  1849. #define __Pyx_GetModuleGlobalName(var, name) do {\
  1850. static PY_UINT64_T __pyx_dict_version = 0;\
  1851. static PyObject *__pyx_dict_cached_value = NULL;\
  1852. (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
  1853. (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
  1854. __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
  1855. } while(0)
  1856. #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
  1857. PY_UINT64_T __pyx_dict_version;\
  1858. PyObject *__pyx_dict_cached_value;\
  1859. (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
  1860. } while(0)
  1861. static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
  1862. #else
  1863. #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
  1864. #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
  1865. static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
  1866. #endif
  1867. /* PyObjectFastCallMethod.proto */
  1868. #if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
  1869. #define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
  1870. #else
  1871. static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
  1872. #endif
  1873. /* RaiseTooManyValuesToUnpack.proto */
  1874. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
  1875. /* RaiseNeedMoreValuesToUnpack.proto */
  1876. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
  1877. /* IterFinish.proto */
  1878. static CYTHON_INLINE int __Pyx_IterFinish(void);
  1879. /* UnpackItemEndCheck.proto */
  1880. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
  1881. /* PyLongBinop.proto */
  1882. #if !CYTHON_COMPILING_IN_PYPY
  1883. static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
  1884. #else
  1885. #define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
  1886. (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
  1887. #endif
  1888. /* PyStopIteration_Check.proto */
  1889. #define __Pyx_PyExc_StopIteration_Check(obj) __Pyx_TypeCheck(obj, PyExc_StopIteration)
  1890. /* RaiseException.export */
  1891. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
  1892. /* GetItemInt.proto */
  1893. #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
  1894. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1895. __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\
  1896. (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
  1897. __Pyx_GetItemInt_Generic(o, to_py_func(i))))
  1898. #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
  1899. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1900. __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
  1901. (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  1902. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  1903. int wraparound, int boundscheck, int unsafe_shared);
  1904. #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
  1905. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1906. __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
  1907. (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
  1908. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  1909. int wraparound, int boundscheck, int unsafe_shared);
  1910. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
  1911. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
  1912. int is_list, int wraparound, int boundscheck, int unsafe_shared);
  1913. /* ObjectGetItem.proto */
  1914. #if CYTHON_USE_TYPE_SLOTS
  1915. static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
  1916. #else
  1917. #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
  1918. #endif
  1919. /* SliceObject.proto */
  1920. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
  1921. PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
  1922. PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
  1923. int has_cstart, int has_cstop, int wraparound);
  1924. /* PyLongBinop.proto */
  1925. #if !CYTHON_COMPILING_IN_PYPY
  1926. static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
  1927. #else
  1928. #define __Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
  1929. (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
  1930. #endif
  1931. /* PySequenceContains.proto */
  1932. static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
  1933. int result = PySequence_Contains(seq, item);
  1934. return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
  1935. }
  1936. /* PyUnicodeContains.proto */
  1937. static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
  1938. int result = PyUnicode_Contains(text, substring);
  1939. return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
  1940. }
  1941. /* pybytes_as_double.proto (used by pynumber_float) */
  1942. static double __Pyx_SlowPyString_AsDouble(PyObject *obj);
  1943. static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length);
  1944. static CYTHON_INLINE double __Pyx_PyBytes_AsDouble(PyObject *obj) {
  1945. char* as_c_string;
  1946. Py_ssize_t size;
  1947. #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  1948. as_c_string = PyBytes_AS_STRING(obj);
  1949. size = PyBytes_GET_SIZE(obj);
  1950. #else
  1951. if (PyBytes_AsStringAndSize(obj, &as_c_string, &size) < 0) {
  1952. return (double)-1;
  1953. }
  1954. #endif
  1955. return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
  1956. }
  1957. static CYTHON_INLINE double __Pyx_PyByteArray_AsDouble(PyObject *obj) {
  1958. char* as_c_string;
  1959. Py_ssize_t size;
  1960. #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  1961. as_c_string = PyByteArray_AS_STRING(obj);
  1962. size = PyByteArray_GET_SIZE(obj);
  1963. #else
  1964. as_c_string = PyByteArray_AsString(obj);
  1965. if (as_c_string == NULL) {
  1966. return (double)-1;
  1967. }
  1968. size = PyByteArray_Size(obj);
  1969. #endif
  1970. return __Pyx__PyBytes_AsDouble(obj, as_c_string, size);
  1971. }
  1972. /* pyunicode_as_double.proto (used by pynumber_float) */
  1973. #if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
  1974. static const char* __Pyx__PyUnicode_AsDouble_Copy(const void* data, const int kind, char* buffer, Py_ssize_t start, Py_ssize_t end) {
  1975. int last_was_punctuation;
  1976. Py_ssize_t i;
  1977. last_was_punctuation = 1;
  1978. for (i=start; i <= end; i++) {
  1979. Py_UCS4 chr = PyUnicode_READ(kind, data, i);
  1980. int is_punctuation = (chr == '_') | (chr == '.');
  1981. *buffer = (char)chr;
  1982. buffer += (chr != '_');
  1983. if (unlikely(chr > 127)) goto parse_failure;
  1984. if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
  1985. last_was_punctuation = is_punctuation;
  1986. }
  1987. if (unlikely(last_was_punctuation)) goto parse_failure;
  1988. *buffer = '\0';
  1989. return buffer;
  1990. parse_failure:
  1991. return NULL;
  1992. }
  1993. static double __Pyx__PyUnicode_AsDouble_inf_nan(const void* data, int kind, Py_ssize_t start, Py_ssize_t length) {
  1994. int matches = 1;
  1995. Py_UCS4 chr;
  1996. Py_UCS4 sign = PyUnicode_READ(kind, data, start);
  1997. int is_signed = (sign == '-') | (sign == '+');
  1998. start += is_signed;
  1999. length -= is_signed;
  2000. switch (PyUnicode_READ(kind, data, start)) {
  2001. #ifdef Py_NAN
  2002. case 'n':
  2003. case 'N':
  2004. if (unlikely(length != 3)) goto parse_failure;
  2005. chr = PyUnicode_READ(kind, data, start+1);
  2006. matches &= (chr == 'a') | (chr == 'A');
  2007. chr = PyUnicode_READ(kind, data, start+2);
  2008. matches &= (chr == 'n') | (chr == 'N');
  2009. if (unlikely(!matches)) goto parse_failure;
  2010. return (sign == '-') ? -Py_NAN : Py_NAN;
  2011. #endif
  2012. case 'i':
  2013. case 'I':
  2014. if (unlikely(length < 3)) goto parse_failure;
  2015. chr = PyUnicode_READ(kind, data, start+1);
  2016. matches &= (chr == 'n') | (chr == 'N');
  2017. chr = PyUnicode_READ(kind, data, start+2);
  2018. matches &= (chr == 'f') | (chr == 'F');
  2019. if (likely(length == 3 && matches))
  2020. return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
  2021. if (unlikely(length != 8)) goto parse_failure;
  2022. chr = PyUnicode_READ(kind, data, start+3);
  2023. matches &= (chr == 'i') | (chr == 'I');
  2024. chr = PyUnicode_READ(kind, data, start+4);
  2025. matches &= (chr == 'n') | (chr == 'N');
  2026. chr = PyUnicode_READ(kind, data, start+5);
  2027. matches &= (chr == 'i') | (chr == 'I');
  2028. chr = PyUnicode_READ(kind, data, start+6);
  2029. matches &= (chr == 't') | (chr == 'T');
  2030. chr = PyUnicode_READ(kind, data, start+7);
  2031. matches &= (chr == 'y') | (chr == 'Y');
  2032. if (unlikely(!matches)) goto parse_failure;
  2033. return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
  2034. case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
  2035. break;
  2036. default:
  2037. goto parse_failure;
  2038. }
  2039. return 0.0;
  2040. parse_failure:
  2041. return -1.0;
  2042. }
  2043. static double __Pyx_PyUnicode_AsDouble_WithSpaces(PyObject *obj) {
  2044. double value;
  2045. const char *last;
  2046. char *end;
  2047. Py_ssize_t start, length = PyUnicode_GET_LENGTH(obj);
  2048. const int kind = PyUnicode_KIND(obj);
  2049. const void* data = PyUnicode_DATA(obj);
  2050. start = 0;
  2051. while (Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, start)))
  2052. start++;
  2053. while (start < length - 1 && Py_UNICODE_ISSPACE(PyUnicode_READ(kind, data, length - 1)))
  2054. length--;
  2055. length -= start;
  2056. if (unlikely(length <= 0)) goto fallback;
  2057. value = __Pyx__PyUnicode_AsDouble_inf_nan(data, kind, start, length);
  2058. if (unlikely(value == -1.0)) goto fallback;
  2059. if (value != 0.0) return value;
  2060. if (length < 40) {
  2061. char number[40];
  2062. last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
  2063. if (unlikely(!last)) goto fallback;
  2064. value = PyOS_string_to_double(number, &end, NULL);
  2065. } else {
  2066. char *number = (char*) PyMem_Malloc((length + 1) * sizeof(char));
  2067. if (unlikely(!number)) goto fallback;
  2068. last = __Pyx__PyUnicode_AsDouble_Copy(data, kind, number, start, start + length);
  2069. if (unlikely(!last)) {
  2070. PyMem_Free(number);
  2071. goto fallback;
  2072. }
  2073. value = PyOS_string_to_double(number, &end, NULL);
  2074. PyMem_Free(number);
  2075. }
  2076. if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
  2077. return value;
  2078. }
  2079. fallback:
  2080. return __Pyx_SlowPyString_AsDouble(obj);
  2081. }
  2082. #endif
  2083. static CYTHON_INLINE double __Pyx_PyUnicode_AsDouble(PyObject *obj) {
  2084. #if !CYTHON_COMPILING_IN_PYPY && CYTHON_ASSUME_SAFE_MACROS
  2085. if (unlikely(__Pyx_PyUnicode_READY(obj) == -1))
  2086. return (double)-1;
  2087. if (likely(PyUnicode_IS_ASCII(obj))) {
  2088. const char *s;
  2089. Py_ssize_t length;
  2090. s = PyUnicode_AsUTF8AndSize(obj, &length);
  2091. return __Pyx__PyBytes_AsDouble(obj, s, length);
  2092. }
  2093. return __Pyx_PyUnicode_AsDouble_WithSpaces(obj);
  2094. #else
  2095. return __Pyx_SlowPyString_AsDouble(obj);
  2096. #endif
  2097. }
  2098. /* pynumber_float.proto */
  2099. static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj);
  2100. #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x))
  2101. /* PyObjectVectorCallKwBuilder.proto */
  2102. CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
  2103. #if CYTHON_VECTORCALL
  2104. #if PY_VERSION_HEX >= 0x03090000
  2105. #define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
  2106. #else
  2107. #define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
  2108. #endif
  2109. #define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
  2110. static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
  2111. static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
  2112. #else
  2113. #define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
  2114. #define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
  2115. #define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
  2116. #define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
  2117. #endif
  2118. /* PyFileNotFoundError_Check.proto */
  2119. #define __Pyx_PyExc_FileNotFoundError_Check(obj) __Pyx_TypeCheck(obj, PyExc_FileNotFoundError)
  2120. /* IterNextPlain.proto (used by IterNext) */
  2121. static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator);
  2122. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  2123. static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void);
  2124. #endif
  2125. /* IterNext.proto */
  2126. #define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
  2127. static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);
  2128. /* GetTopmostException.proto (used by SaveResetException) */
  2129. #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
  2130. static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
  2131. #endif
  2132. /* SaveResetException.proto */
  2133. #if CYTHON_FAST_THREAD_STATE
  2134. #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
  2135. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  2136. #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
  2137. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  2138. #else
  2139. #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
  2140. #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
  2141. #endif
  2142. /* GetException.proto */
  2143. #if CYTHON_FAST_THREAD_STATE
  2144. #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
  2145. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  2146. #else
  2147. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
  2148. #endif
  2149. /* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */
  2150. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
  2151. /* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */
  2152. #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
  2153. static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
  2154. #endif
  2155. /* PyObjectCallMethod0.proto (used by pop) */
  2156. static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
  2157. /* pop.proto */
  2158. static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L);
  2159. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  2160. static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L);
  2161. #define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ?\
  2162. __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L))
  2163. #else
  2164. #define __Pyx_PyList_Pop(L) __Pyx__PyObject_Pop(L)
  2165. #define __Pyx_PyObject_Pop(L) __Pyx__PyObject_Pop(L)
  2166. #endif
  2167. /* ListAppend.proto (used by append) */
  2168. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  2169. static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
  2170. PyListObject* L = (PyListObject*) list;
  2171. Py_ssize_t len = Py_SIZE(list);
  2172. if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
  2173. Py_INCREF(x);
  2174. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
  2175. L->ob_item[len] = x;
  2176. #else
  2177. PyList_SET_ITEM(list, len, x);
  2178. #endif
  2179. __Pyx_SET_SIZE(list, len + 1);
  2180. return 0;
  2181. }
  2182. return PyList_Append(list, x);
  2183. }
  2184. #else
  2185. #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
  2186. #endif
  2187. /* PyObjectCall2Args.proto (used by PyObjectCallMethod1) */
  2188. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
  2189. /* PyObjectCallMethod1.proto (used by append) */
  2190. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
  2191. /* append.proto */
  2192. static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
  2193. /* SwapException.proto */
  2194. #if CYTHON_FAST_THREAD_STATE
  2195. #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
  2196. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  2197. #else
  2198. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
  2199. #endif
  2200. /* HasAttr.proto */
  2201. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  2202. #define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n)
  2203. #else
  2204. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
  2205. #endif
  2206. /* GetAttr3.proto */
  2207. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
  2208. /* ImportImpl.export */
  2209. static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);
  2210. /* Import.proto */
  2211. static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);
  2212. /* ImportFrom.proto */
  2213. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
  2214. /* Py3UpdateBases.proto */
  2215. static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);
  2216. /* CalculateMetaclass.proto */
  2217. static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
  2218. /* SetNameInClass.proto */
  2219. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
  2220. #define __Pyx_SetNameInClass(ns, name, value)\
  2221. (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
  2222. #elif CYTHON_COMPILING_IN_CPYTHON
  2223. #define __Pyx_SetNameInClass(ns, name, value)\
  2224. (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
  2225. #else
  2226. #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
  2227. #endif
  2228. /* dict_setdefault.proto (used by FetchCommonType) */
  2229. static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);
  2230. /* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
  2231. #if CYTHON_COMPILING_IN_LIMITED_API
  2232. static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
  2233. #endif
  2234. /* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
  2235. static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
  2236. #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)
  2237. /* FixUpExtensionType.proto (used by FetchCommonType) */
  2238. static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
  2239. /* AddModuleRef.proto (used by FetchSharedCythonModule) */
  2240. #if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
  2241. __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  2242. static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
  2243. #else
  2244. #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
  2245. #endif
  2246. /* FetchSharedCythonModule.proto (used by FetchCommonType) */
  2247. static PyObject *__Pyx_FetchSharedCythonABIModule(void);
  2248. /* FetchCommonType.proto (used by CommonTypesMetaclass) */
  2249. static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);
  2250. /* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
  2251. static int __pyx_CommonTypesMetaclass_init(PyObject *module);
  2252. #define __Pyx_CommonTypesMetaclass_USED
  2253. /* CallTypeTraverse.proto (used by CythonFunctionShared) */
  2254. #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
  2255. #define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
  2256. #else
  2257. static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
  2258. #endif
  2259. /* PyMethodNew.proto (used by CythonFunctionShared) */
  2260. static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);
  2261. /* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
  2262. #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
  2263. static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
  2264. #endif
  2265. /* CythonFunctionShared.proto (used by CythonFunction) */
  2266. #define __Pyx_CyFunction_USED
  2267. #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
  2268. #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
  2269. #define __Pyx_CYFUNCTION_CCLASS 0x04
  2270. #define __Pyx_CYFUNCTION_COROUTINE 0x08
  2271. #define __Pyx_CyFunction_GetClosure(f)\
  2272. (((__pyx_CyFunctionObject *) (f))->func_closure)
  2273. #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  2274. #define __Pyx_CyFunction_GetClassObj(f)\
  2275. (((__pyx_CyFunctionObject *) (f))->func_classobj)
  2276. #else
  2277. #define __Pyx_CyFunction_GetClassObj(f)\
  2278. ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
  2279. #endif
  2280. #define __Pyx_CyFunction_SetClassObj(f, classobj)\
  2281. __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
  2282. #define __Pyx_CyFunction_Defaults(type, f)\
  2283. ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
  2284. #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
  2285. ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
  2286. typedef struct {
  2287. #if CYTHON_COMPILING_IN_LIMITED_API
  2288. PyObject_HEAD
  2289. PyObject *func;
  2290. #elif PY_VERSION_HEX < 0x030900B1
  2291. PyCFunctionObject func;
  2292. #else
  2293. PyCMethodObject func;
  2294. #endif
  2295. #if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
  2296. __pyx_vectorcallfunc func_vectorcall;
  2297. #endif
  2298. #if CYTHON_COMPILING_IN_LIMITED_API
  2299. PyObject *func_weakreflist;
  2300. #endif
  2301. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  2302. PyObject *func_dict;
  2303. #endif
  2304. PyObject *func_name;
  2305. PyObject *func_qualname;
  2306. PyObject *func_doc;
  2307. PyObject *func_globals;
  2308. PyObject *func_code;
  2309. PyObject *func_closure;
  2310. #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  2311. PyObject *func_classobj;
  2312. #endif
  2313. PyObject *defaults;
  2314. int flags;
  2315. PyObject *defaults_tuple;
  2316. PyObject *defaults_kwdict;
  2317. PyObject *(*defaults_getter)(PyObject *);
  2318. PyObject *func_annotations;
  2319. PyObject *func_is_coroutine;
  2320. } __pyx_CyFunctionObject;
  2321. #undef __Pyx_CyOrPyCFunction_Check
  2322. #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
  2323. #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
  2324. #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
  2325. static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
  2326. #undef __Pyx_IsSameCFunction
  2327. #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
  2328. static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
  2329. int flags, PyObject* qualname,
  2330. PyObject *closure,
  2331. PyObject *module, PyObject *globals,
  2332. PyObject* code);
  2333. static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
  2334. static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
  2335. PyTypeObject *defaults_type);
  2336. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
  2337. PyObject *tuple);
  2338. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
  2339. PyObject *dict);
  2340. static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
  2341. PyObject *dict);
  2342. static int __pyx_CyFunction_init(PyObject *module);
  2343. #if CYTHON_METH_FASTCALL
  2344. static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
  2345. static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
  2346. static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
  2347. static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
  2348. #if CYTHON_COMPILING_IN_LIMITED_API
  2349. #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
  2350. #else
  2351. #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
  2352. #endif
  2353. #endif
  2354. /* CythonFunction.proto */
  2355. static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
  2356. int flags, PyObject* qualname,
  2357. PyObject *closure,
  2358. PyObject *module, PyObject *globals,
  2359. PyObject* code);
  2360. /* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */
  2361. #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
  2362. #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
  2363. #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
  2364. static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
  2365. #else
  2366. #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
  2367. #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
  2368. #endif
  2369. /* Py3ClassCreate.proto */
  2370. static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
  2371. PyObject *mkw, PyObject *modname, PyObject *doc);
  2372. static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
  2373. PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
  2374. /* CLineInTraceback.proto (used by AddTraceback) */
  2375. #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
  2376. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
  2377. #else
  2378. #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
  2379. #endif
  2380. /* CodeObjectCache.proto (used by AddTraceback) */
  2381. #if CYTHON_COMPILING_IN_LIMITED_API
  2382. typedef PyObject __Pyx_CachedCodeObjectType;
  2383. #else
  2384. typedef PyCodeObject __Pyx_CachedCodeObjectType;
  2385. #endif
  2386. typedef struct {
  2387. __Pyx_CachedCodeObjectType* code_object;
  2388. int code_line;
  2389. } __Pyx_CodeObjectCacheEntry;
  2390. struct __Pyx_CodeObjectCache {
  2391. int count;
  2392. int max_count;
  2393. __Pyx_CodeObjectCacheEntry* entries;
  2394. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  2395. __pyx_atomic_int_type accessor_count;
  2396. #endif
  2397. };
  2398. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
  2399. static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
  2400. static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);
  2401. /* AddTraceback.proto */
  2402. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  2403. int py_line, const char *filename);
  2404. /* GCCDiagnostics.proto */
  2405. #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
  2406. #define __Pyx_HAS_GCC_DIAGNOSTIC
  2407. #endif
  2408. /* CIntToPy.proto */
  2409. static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);
  2410. /* FormatTypeName.proto */
  2411. #if CYTHON_COMPILING_IN_LIMITED_API
  2412. typedef PyObject *__Pyx_TypeName;
  2413. #define __Pyx_FMT_TYPENAME "%U"
  2414. #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
  2415. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  2416. #define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
  2417. #else
  2418. static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
  2419. #endif
  2420. #else // !LIMITED_API
  2421. typedef const char *__Pyx_TypeName;
  2422. #define __Pyx_FMT_TYPENAME "%.200s"
  2423. #define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
  2424. #define __Pyx_DECREF_TypeName(obj)
  2425. #endif
  2426. /* CIntFromPy.proto */
  2427. static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);
  2428. /* CIntFromPy.proto */
  2429. static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);
  2430. /* FastTypeChecks.proto */
  2431. #if CYTHON_COMPILING_IN_CPYTHON
  2432. #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
  2433. #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
  2434. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
  2435. static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
  2436. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
  2437. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
  2438. #else
  2439. #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
  2440. #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
  2441. #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
  2442. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
  2443. return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
  2444. }
  2445. #endif
  2446. #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
  2447. #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
  2448. #ifdef PyExceptionInstance_Check
  2449. #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
  2450. #else
  2451. #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
  2452. #endif
  2453. /* GetRuntimeVersion.proto */
  2454. #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  2455. static unsigned long __Pyx_cached_runtime_version = 0;
  2456. static void __Pyx_init_runtime_version(void);
  2457. #else
  2458. #define __Pyx_init_runtime_version()
  2459. #endif
  2460. static unsigned long __Pyx_get_runtime_version(void);
  2461. /* CheckBinaryVersion.proto */
  2462. static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
  2463. /* DecompressString.proto */
  2464. static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);
  2465. /* MultiPhaseInitModuleState.proto */
  2466. #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
  2467. static PyObject *__Pyx_State_FindModule(void*);
  2468. static int __Pyx_State_AddModule(PyObject* module, void*);
  2469. static int __Pyx_State_RemoveModule(void*);
  2470. #elif CYTHON_USE_MODULE_STATE
  2471. #define __Pyx_State_FindModule PyState_FindModule
  2472. #define __Pyx_State_AddModule PyState_AddModule
  2473. #define __Pyx_State_RemoveModule PyState_RemoveModule
  2474. #endif
  2475. /* #### Code section: module_declarations ### */
  2476. /* CythonABIVersion.proto */
  2477. #if CYTHON_COMPILING_IN_LIMITED_API
  2478. #if CYTHON_METH_FASTCALL
  2479. #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall"
  2480. #else
  2481. #define __PYX_FASTCALL_ABI_SUFFIX
  2482. #endif
  2483. #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
  2484. #else
  2485. #define __PYX_LIMITED_ABI_SUFFIX
  2486. #endif
  2487. #if __PYX_HAS_PY_AM_SEND == 1
  2488. #define __PYX_AM_SEND_ABI_SUFFIX
  2489. #elif __PYX_HAS_PY_AM_SEND == 2
  2490. #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
  2491. #else
  2492. #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
  2493. #endif
  2494. #ifndef __PYX_MONITORING_ABI_SUFFIX
  2495. #define __PYX_MONITORING_ABI_SUFFIX
  2496. #endif
  2497. #if CYTHON_USE_TP_FINALIZE
  2498. #define __PYX_TP_FINALIZE_ABI_SUFFIX
  2499. #else
  2500. #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
  2501. #endif
  2502. #if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
  2503. #define __PYX_FREELISTS_ABI_SUFFIX
  2504. #else
  2505. #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
  2506. #endif
  2507. #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
  2508. #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
  2509. #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
  2510. /* Module declarations from "cython" */
  2511. /* Module declarations from "fontTools.feaLib.lexer" */
  2512. /* #### Code section: typeinfo ### */
  2513. /* #### Code section: before_global_var ### */
  2514. #define __Pyx_MODULE_NAME "fontTools.feaLib.lexer"
  2515. extern int __pyx_module_is_main_fontTools__feaLib__lexer;
  2516. int __pyx_module_is_main_fontTools__feaLib__lexer = 0;
  2517. /* Implementation of "fontTools.feaLib.lexer" */
  2518. /* #### Code section: global_var ### */
  2519. static PyObject *__pyx_builtin_object;
  2520. static PyObject *__pyx_builtin_staticmethod;
  2521. static PyObject *__pyx_builtin_open;
  2522. /* #### Code section: string_decls ### */
  2523. /* #### Code section: decls ### */
  2524. 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 */
  2525. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2526. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2527. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2528. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_8location_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2529. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_10next_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2530. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_valid); /* proto */
  2531. 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 */
  2532. 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 */
  2533. 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 */
  2534. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2535. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2536. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2537. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_or_path); /* proto */
  2538. 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 */
  2539. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
  2540. /* #### Code section: late_includes ### */
  2541. /* #### Code section: module_state ### */
  2542. /* SmallCodeConfig */
  2543. #ifndef CYTHON_SMALL_CODE
  2544. #if defined(__clang__)
  2545. #define CYTHON_SMALL_CODE
  2546. #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
  2547. #define CYTHON_SMALL_CODE __attribute__((cold))
  2548. #else
  2549. #define CYTHON_SMALL_CODE
  2550. #endif
  2551. #endif
  2552. typedef struct {
  2553. PyObject *__pyx_d;
  2554. PyObject *__pyx_b;
  2555. PyObject *__pyx_cython_runtime;
  2556. PyObject *__pyx_empty_tuple;
  2557. PyObject *__pyx_empty_bytes;
  2558. PyObject *__pyx_empty_unicode;
  2559. __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  2560. __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  2561. __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  2562. __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop;
  2563. PyObject *__pyx_tuple[4];
  2564. PyObject *__pyx_codeobj_tab[16];
  2565. PyObject *__pyx_string_tab[197];
  2566. PyObject *__pyx_number_tab[6];
  2567. /* #### Code section: module_state_contents ### */
  2568. /* IterNextPlain.module_state_decls */
  2569. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  2570. PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache;
  2571. #endif
  2572. /* CommonTypesMetaclass.module_state_decls */
  2573. PyTypeObject *__pyx_CommonTypesMetaclassType;
  2574. /* CachedMethodType.module_state_decls */
  2575. #if CYTHON_COMPILING_IN_LIMITED_API
  2576. PyObject *__Pyx_CachedMethodType;
  2577. #endif
  2578. /* CythonFunctionShared.module_state_decls */
  2579. PyTypeObject *__pyx_CyFunctionType;
  2580. /* CodeObjectCache.module_state_decls */
  2581. struct __Pyx_CodeObjectCache __pyx_code_cache;
  2582. /* #### Code section: module_state_end ### */
  2583. } __pyx_mstatetype;
  2584. #if CYTHON_USE_MODULE_STATE
  2585. #ifdef __cplusplus
  2586. namespace {
  2587. extern struct PyModuleDef __pyx_moduledef;
  2588. } /* anonymous namespace */
  2589. #else
  2590. static struct PyModuleDef __pyx_moduledef;
  2591. #endif
  2592. #define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))
  2593. #define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
  2594. #else
  2595. static __pyx_mstatetype __pyx_mstate_global_static =
  2596. #ifdef __cplusplus
  2597. {};
  2598. #else
  2599. {0};
  2600. #endif
  2601. static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
  2602. #endif
  2603. /* #### Code section: constant_name_defines ### */
  2604. #define __pyx_kp_u_ __pyx_string_tab[0]
  2605. #define __pyx_kp_u_0 __pyx_string_tab[1]
  2606. #define __pyx_kp_u_0123456789 __pyx_string_tab[2]
  2607. #define __pyx_kp_u_0123456789ABCDEFabcdef __pyx_string_tab[3]
  2608. #define __pyx_kp_u_A_Lexer_that_follows_include_sta __pyx_string_tab[4]
  2609. #define __pyx_kp_u_A_Za_z_0_9 __pyx_string_tab[5]
  2610. #define __pyx_kp_u_Expected_after_file_name __pyx_string_tab[6]
  2611. #define __pyx_kp_u_Expected_before_file_name __pyx_string_tab[7]
  2612. #define __pyx_kp_u_Expected_file_name __pyx_string_tab[8]
  2613. #define __pyx_kp_u_Expected_glyph_class_name __pyx_string_tab[9]
  2614. #define __pyx_kp_u_Expected_s_to_terminate_anonymou __pyx_string_tab[10]
  2615. #define __pyx_kp_u_Expected_to_terminate_string __pyx_string_tab[11]
  2616. #define __pyx_kp_u_Glyph_class_names_must_consist_o __pyx_string_tab[12]
  2617. #define __pyx_kp_u_Lexer_that_does_not_follow_inclu __pyx_string_tab[13]
  2618. #define __pyx_kp_u_Lib_fontTools_feaLib_lexer_py __pyx_string_tab[14]
  2619. #define __pyx_kp_u_Too_many_recursive_includes __pyx_string_tab[15]
  2620. #define __pyx_kp_u_Unexpected_character_r __pyx_string_tab[16]
  2621. #define __pyx_kp_u__10 __pyx_string_tab[17]
  2622. #define __pyx_kp_u__11 __pyx_string_tab[18]
  2623. #define __pyx_kp_u__12 __pyx_string_tab[19]
  2624. #define __pyx_kp_u__13 __pyx_string_tab[20]
  2625. #define __pyx_kp_u__14 __pyx_string_tab[21]
  2626. #define __pyx_kp_u__15 __pyx_string_tab[22]
  2627. #define __pyx_kp_u__16 __pyx_string_tab[23]
  2628. #define __pyx_kp_u__17 __pyx_string_tab[24]
  2629. #define __pyx_kp_u__18 __pyx_string_tab[25]
  2630. #define __pyx_kp_u__2 __pyx_string_tab[26]
  2631. #define __pyx_kp_u__3 __pyx_string_tab[27]
  2632. #define __pyx_kp_u__4 __pyx_string_tab[28]
  2633. #define __pyx_kp_u__5 __pyx_string_tab[29]
  2634. #define __pyx_kp_u__6 __pyx_string_tab[30]
  2635. #define __pyx_kp_u__7 __pyx_string_tab[31]
  2636. #define __pyx_kp_u__8 __pyx_string_tab[32]
  2637. #define __pyx_kp_u__9 __pyx_string_tab[33]
  2638. #define __pyx_kp_u_features __pyx_string_tab[34]
  2639. #define __pyx_kp_u_s __pyx_string_tab[35]
  2640. #define __pyx_kp_u_s_2 __pyx_string_tab[36]
  2641. #define __pyx_kp_u_utf_8_sig __pyx_string_tab[37]
  2642. #define __pyx_n_u_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef __pyx_string_tab[38]
  2643. #define __pyx_n_u_ANONYMOUS_BLOCK __pyx_string_tab[39]
  2644. #define __pyx_n_u_CHAR_DIGIT __pyx_string_tab[40]
  2645. #define __pyx_n_u_CHAR_HEXDIGIT __pyx_string_tab[41]
  2646. #define __pyx_n_u_CHAR_LETTER __pyx_string_tab[42]
  2647. #define __pyx_n_u_CHAR_NAME_CONTINUATION __pyx_string_tab[43]
  2648. #define __pyx_n_u_CHAR_NAME_START __pyx_string_tab[44]
  2649. #define __pyx_n_u_CHAR_NEWLINE __pyx_string_tab[45]
  2650. #define __pyx_n_u_CHAR_SYMBOL __pyx_string_tab[46]
  2651. #define __pyx_n_u_CHAR_WHITESPACE __pyx_string_tab[47]
  2652. #define __pyx_n_u_CID __pyx_string_tab[48]
  2653. #define __pyx_n_u_COMMENT __pyx_string_tab[49]
  2654. #define __pyx_n_u_FILENAME __pyx_string_tab[50]
  2655. #define __pyx_n_u_FLOAT __pyx_string_tab[51]
  2656. #define __pyx_n_u_FeatureLibError __pyx_string_tab[52]
  2657. #define __pyx_n_u_FeatureLibLocation __pyx_string_tab[53]
  2658. #define __pyx_n_u_GLYPHCLASS __pyx_string_tab[54]
  2659. #define __pyx_n_u_HEXADECIMAL __pyx_string_tab[55]
  2660. #define __pyx_n_u_IncludedFeaNotFound __pyx_string_tab[56]
  2661. #define __pyx_n_u_IncludingLexer __pyx_string_tab[57]
  2662. #define __pyx_n_u_IncludingLexer___init __pyx_string_tab[58]
  2663. #define __pyx_n_u_IncludingLexer___iter __pyx_string_tab[59]
  2664. #define __pyx_n_u_IncludingLexer___next __pyx_string_tab[60]
  2665. #define __pyx_n_u_IncludingLexer_make_lexer __pyx_string_tab[61]
  2666. #define __pyx_n_u_IncludingLexer_next __pyx_string_tab[62]
  2667. #define __pyx_n_u_IncludingLexer_scan_anonymous_bl __pyx_string_tab[63]
  2668. #define __pyx_n_u_Lexer __pyx_string_tab[64]
  2669. #define __pyx_n_u_Lexer___init __pyx_string_tab[65]
  2670. #define __pyx_n_u_Lexer___iter __pyx_string_tab[66]
  2671. #define __pyx_n_u_Lexer___next __pyx_string_tab[67]
  2672. #define __pyx_n_u_Lexer_location __pyx_string_tab[68]
  2673. #define __pyx_n_u_Lexer_next __pyx_string_tab[69]
  2674. #define __pyx_n_u_Lexer_next_2 __pyx_string_tab[70]
  2675. #define __pyx_n_u_Lexer_scan_anonymous_block __pyx_string_tab[71]
  2676. #define __pyx_n_u_Lexer_scan_over __pyx_string_tab[72]
  2677. #define __pyx_n_u_Lexer_scan_until __pyx_string_tab[73]
  2678. #define __pyx_n_u_MODE_FILENAME __pyx_string_tab[74]
  2679. #define __pyx_n_u_MODE_NORMAL __pyx_string_tab[75]
  2680. #define __pyx_n_u_NAME __pyx_string_tab[76]
  2681. #define __pyx_n_u_NEWLINE __pyx_string_tab[77]
  2682. #define __pyx_n_u_NORMAL __pyx_string_tab[78]
  2683. #define __pyx_n_u_NUMBER __pyx_string_tab[79]
  2684. #define __pyx_n_u_NUMBERS __pyx_string_tab[80]
  2685. #define __pyx_n_u_NonIncludingLexer __pyx_string_tab[81]
  2686. #define __pyx_n_u_NonIncludingLexer___next __pyx_string_tab[82]
  2687. #define __pyx_n_u_OCTAL __pyx_string_tab[83]
  2688. #define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[84]
  2689. #define __pyx_n_u_RE_GLYPHCLASS __pyx_string_tab[85]
  2690. #define __pyx_n_u_STRING __pyx_string_tab[86]
  2691. #define __pyx_n_u_SYMBOL __pyx_string_tab[87]
  2692. #define __pyx_n_u_append __pyx_string_tab[88]
  2693. #define __pyx_n_u_asyncio_coroutines __pyx_string_tab[89]
  2694. #define __pyx_n_u_class_getitem __pyx_string_tab[90]
  2695. #define __pyx_n_u_cline_in_traceback __pyx_string_tab[91]
  2696. #define __pyx_n_u_close __pyx_string_tab[92]
  2697. #define __pyx_n_u_closing __pyx_string_tab[93]
  2698. #define __pyx_n_u_column __pyx_string_tab[94]
  2699. #define __pyx_n_u_compile __pyx_string_tab[95]
  2700. #define __pyx_n_u_cur_char __pyx_string_tab[96]
  2701. #define __pyx_n_u_curpath __pyx_string_tab[97]
  2702. #define __pyx_n_u_data __pyx_string_tab[98]
  2703. #define __pyx_n_u_dirname __pyx_string_tab[99]
  2704. #define __pyx_n_u_doc __pyx_string_tab[100]
  2705. #define __pyx_n_u_encoding __pyx_string_tab[101]
  2706. #define __pyx_n_u_err __pyx_string_tab[102]
  2707. #define __pyx_n_u_featurefile __pyx_string_tab[103]
  2708. #define __pyx_n_u_featurefilepath __pyx_string_tab[104]
  2709. #define __pyx_n_u_file_or_path __pyx_string_tab[105]
  2710. #define __pyx_n_u_filename __pyx_string_tab[106]
  2711. #define __pyx_n_u_filename_2 __pyx_string_tab[107]
  2712. #define __pyx_n_u_fileobj __pyx_string_tab[108]
  2713. #define __pyx_n_u_fname_location __pyx_string_tab[109]
  2714. #define __pyx_n_u_fname_token __pyx_string_tab[110]
  2715. #define __pyx_n_u_fname_type __pyx_string_tab[111]
  2716. #define __pyx_n_u_fontTools_feaLib_error __pyx_string_tab[112]
  2717. #define __pyx_n_u_fontTools_feaLib_lexer __pyx_string_tab[113]
  2718. #define __pyx_n_u_fontTools_feaLib_location __pyx_string_tab[114]
  2719. #define __pyx_n_u_func __pyx_string_tab[115]
  2720. #define __pyx_n_u_getcwd __pyx_string_tab[116]
  2721. #define __pyx_n_u_glyphclass __pyx_string_tab[117]
  2722. #define __pyx_n_u_include __pyx_string_tab[118]
  2723. #define __pyx_n_u_includeDir __pyx_string_tab[119]
  2724. #define __pyx_n_u_init __pyx_string_tab[120]
  2725. #define __pyx_n_u_is_coroutine __pyx_string_tab[121]
  2726. #define __pyx_n_u_isabs __pyx_string_tab[122]
  2727. #define __pyx_n_u_items __pyx_string_tab[123]
  2728. #define __pyx_n_u_iter __pyx_string_tab[124]
  2729. #define __pyx_n_u_join __pyx_string_tab[125]
  2730. #define __pyx_n_u_lexer __pyx_string_tab[126]
  2731. #define __pyx_n_u_lexers __pyx_string_tab[127]
  2732. #define __pyx_n_u_limit __pyx_string_tab[128]
  2733. #define __pyx_n_u_line __pyx_string_tab[129]
  2734. #define __pyx_n_u_line_start __pyx_string_tab[130]
  2735. #define __pyx_n_u_location __pyx_string_tab[131]
  2736. #define __pyx_n_u_location_2 __pyx_string_tab[132]
  2737. #define __pyx_n_u_main __pyx_string_tab[133]
  2738. #define __pyx_n_u_make_lexer __pyx_string_tab[134]
  2739. #define __pyx_n_u_match __pyx_string_tab[135]
  2740. #define __pyx_n_u_maxsplit __pyx_string_tab[136]
  2741. #define __pyx_n_u_metaclass __pyx_string_tab[137]
  2742. #define __pyx_n_u_mode __pyx_string_tab[138]
  2743. #define __pyx_n_u_module __pyx_string_tab[139]
  2744. #define __pyx_n_u_mro_entries __pyx_string_tab[140]
  2745. #define __pyx_n_u_name __pyx_string_tab[141]
  2746. #define __pyx_n_u_name_2 __pyx_string_tab[142]
  2747. #define __pyx_n_u_next __pyx_string_tab[143]
  2748. #define __pyx_n_u_next_2 __pyx_string_tab[144]
  2749. #define __pyx_n_u_next_3 __pyx_string_tab[145]
  2750. #define __pyx_n_u_next_char __pyx_string_tab[146]
  2751. #define __pyx_n_u_object __pyx_string_tab[147]
  2752. #define __pyx_n_u_open __pyx_string_tab[148]
  2753. #define __pyx_n_u_os __pyx_string_tab[149]
  2754. #define __pyx_n_u_p __pyx_string_tab[150]
  2755. #define __pyx_n_u_path __pyx_string_tab[151]
  2756. #define __pyx_n_u_pop __pyx_string_tab[152]
  2757. #define __pyx_n_u_pos __pyx_string_tab[153]
  2758. #define __pyx_n_u_prepare __pyx_string_tab[154]
  2759. #define __pyx_n_u_qualname __pyx_string_tab[155]
  2760. #define __pyx_n_u_r __pyx_string_tab[156]
  2761. #define __pyx_n_u_re __pyx_string_tab[157]
  2762. #define __pyx_n_u_read __pyx_string_tab[158]
  2763. #define __pyx_n_u_regexp __pyx_string_tab[159]
  2764. #define __pyx_n_u_scan_anonymous_block __pyx_string_tab[160]
  2765. #define __pyx_n_u_scan_over __pyx_string_tab[161]
  2766. #define __pyx_n_u_scan_until __pyx_string_tab[162]
  2767. #define __pyx_n_u_self __pyx_string_tab[163]
  2768. #define __pyx_n_u_set_name __pyx_string_tab[164]
  2769. #define __pyx_n_u_setdefault __pyx_string_tab[165]
  2770. #define __pyx_n_u_split __pyx_string_tab[166]
  2771. #define __pyx_n_u_start __pyx_string_tab[167]
  2772. #define __pyx_n_u_staticmethod __pyx_string_tab[168]
  2773. #define __pyx_n_u_stop_at __pyx_string_tab[169]
  2774. #define __pyx_n_u_string __pyx_string_tab[170]
  2775. #define __pyx_n_u_strip __pyx_string_tab[171]
  2776. #define __pyx_n_u_sub __pyx_string_tab[172]
  2777. #define __pyx_n_u_tag __pyx_string_tab[173]
  2778. #define __pyx_n_u_test __pyx_string_tab[174]
  2779. #define __pyx_n_u_text __pyx_string_tab[175]
  2780. #define __pyx_n_u_text_2 __pyx_string_tab[176]
  2781. #define __pyx_n_u_text_length __pyx_string_tab[177]
  2782. #define __pyx_n_u_token __pyx_string_tab[178]
  2783. #define __pyx_n_u_token_type __pyx_string_tab[179]
  2784. #define __pyx_n_u_valid __pyx_string_tab[180]
  2785. #define __pyx_n_u_values __pyx_string_tab[181]
  2786. #define __pyx_n_u_xX __pyx_string_tab[182]
  2787. #define __pyx_kp_b_iso88591_A_4z_c_q_L_a_Kq_Q_4r_V1D_1_3awc __pyx_string_tab[183]
  2788. #define __pyx_kp_b_iso88591_A_7_Z_Q_j_a_d_U_1_we1_7_9HA_1_6 __pyx_string_tab[184]
  2789. #define __pyx_kp_b_iso88591_A_D_b_nD_F_3c_HA __pyx_string_tab[185]
  2790. #define __pyx_kp_b_iso88591_A_D_b_nD_F_3gQ_HA __pyx_string_tab[186]
  2791. #define __pyx_kp_b_iso88591_A_Kq_Q_4z_A_t1_1A_6_A_q_4q_D_r_v __pyx_string_tab[187]
  2792. #define __pyx_kp_b_iso88591_A_M_IQ_HA_O1_IQ_Cq_IU __pyx_string_tab[188]
  2793. #define __pyx_kp_b_iso88591_A_V2T_b_k_N_ha __pyx_string_tab[189]
  2794. #define __pyx_kp_b_iso88591_A_d_D_G_d_1_HD_U_F_Q_M_uA_gU_2U __pyx_string_tab[190]
  2795. #define __pyx_kp_b_iso88591_A_fA_U_G1 __pyx_string_tab[191]
  2796. #define __pyx_kp_b_iso88591_A_q __pyx_string_tab[192]
  2797. #define __pyx_kp_b_iso88591_A_t1D __pyx_string_tab[193]
  2798. #define __pyx_kp_b_iso88591_A_t82R_4AQ __pyx_string_tab[194]
  2799. #define __pyx_kp_b_iso88591_A_t9A __pyx_string_tab[195]
  2800. #define __pyx_kp_b_iso88591_q_Kq_L_t81Ba_N __pyx_string_tab[196]
  2801. #define __pyx_int_0 __pyx_number_tab[0]
  2802. #define __pyx_int_1 __pyx_number_tab[1]
  2803. #define __pyx_int_2 __pyx_number_tab[2]
  2804. #define __pyx_int_8 __pyx_number_tab[3]
  2805. #define __pyx_int_10 __pyx_number_tab[4]
  2806. #define __pyx_int_16 __pyx_number_tab[5]
  2807. /* #### Code section: module_state_clear ### */
  2808. #if CYTHON_USE_MODULE_STATE
  2809. static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  2810. __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  2811. if (!clear_module_state) return 0;
  2812. Py_CLEAR(clear_module_state->__pyx_d);
  2813. Py_CLEAR(clear_module_state->__pyx_b);
  2814. Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  2815. Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  2816. Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  2817. Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  2818. #if CYTHON_PEP489_MULTI_PHASE_INIT
  2819. __Pyx_State_RemoveModule(NULL);
  2820. #endif
  2821. for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  2822. for (int i=0; i<16; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  2823. for (int i=0; i<197; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  2824. for (int i=0; i<6; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
  2825. /* #### Code section: module_state_clear_contents ### */
  2826. /* CommonTypesMetaclass.module_state_clear */
  2827. Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);
  2828. /* CythonFunctionShared.module_state_clear */
  2829. Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  2830. /* #### Code section: module_state_clear_end ### */
  2831. return 0;
  2832. }
  2833. #endif
  2834. /* #### Code section: module_state_traverse ### */
  2835. #if CYTHON_USE_MODULE_STATE
  2836. static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  2837. __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  2838. if (!traverse_module_state) return 0;
  2839. Py_VISIT(traverse_module_state->__pyx_d);
  2840. Py_VISIT(traverse_module_state->__pyx_b);
  2841. Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  2842. __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  2843. __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  2844. __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  2845. for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  2846. for (int i=0; i<16; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  2847. for (int i=0; i<197; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  2848. for (int i=0; i<6; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
  2849. /* #### Code section: module_state_traverse_contents ### */
  2850. /* CommonTypesMetaclass.module_state_traverse */
  2851. Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);
  2852. /* CythonFunctionShared.module_state_traverse */
  2853. Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  2854. /* #### Code section: module_state_traverse_end ### */
  2855. return 0;
  2856. }
  2857. #endif
  2858. /* #### Code section: module_code ### */
  2859. /* "fontTools/feaLib/lexer.py":43
  2860. * MODE_FILENAME_ = "FILENAME"
  2861. *
  2862. * def __init__(self, text, filename): # <<<<<<<<<<<<<<
  2863. * self.filename_ = filename
  2864. * self.line_ = 1
  2865. */
  2866. /* Python wrapper */
  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. ); /*proto*/
  2874. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer___init__, "Lexer.__init__(self, text, filename)");
  2875. 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__};
  2876. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_1__init__(PyObject *__pyx_self,
  2877. #if CYTHON_METH_FASTCALL
  2878. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  2879. #else
  2880. PyObject *__pyx_args, PyObject *__pyx_kwds
  2881. #endif
  2882. ) {
  2883. PyObject *__pyx_v_self = 0;
  2884. PyObject *__pyx_v_text = 0;
  2885. PyObject *__pyx_v_filename = 0;
  2886. #if !CYTHON_METH_FASTCALL
  2887. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  2888. #endif
  2889. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  2890. PyObject* values[3] = {0,0,0};
  2891. int __pyx_lineno = 0;
  2892. const char *__pyx_filename = NULL;
  2893. int __pyx_clineno = 0;
  2894. PyObject *__pyx_r = 0;
  2895. __Pyx_RefNannyDeclarations
  2896. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  2897. #if !CYTHON_METH_FASTCALL
  2898. #if CYTHON_ASSUME_SAFE_SIZE
  2899. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  2900. #else
  2901. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  2902. #endif
  2903. #endif
  2904. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  2905. {
  2906. 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};
  2907. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  2908. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 43, __pyx_L3_error)
  2909. if (__pyx_kwds_len > 0) {
  2910. switch (__pyx_nargs) {
  2911. case 3:
  2912. values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
  2913. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 43, __pyx_L3_error)
  2914. CYTHON_FALLTHROUGH;
  2915. case 2:
  2916. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  2917. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 43, __pyx_L3_error)
  2918. CYTHON_FALLTHROUGH;
  2919. case 1:
  2920. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  2921. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 43, __pyx_L3_error)
  2922. CYTHON_FALLTHROUGH;
  2923. case 0: break;
  2924. default: goto __pyx_L5_argtuple_error;
  2925. }
  2926. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  2927. 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)
  2928. for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
  2929. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 43, __pyx_L3_error) }
  2930. }
  2931. } else if (unlikely(__pyx_nargs != 3)) {
  2932. goto __pyx_L5_argtuple_error;
  2933. } else {
  2934. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  2935. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 43, __pyx_L3_error)
  2936. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  2937. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 43, __pyx_L3_error)
  2938. values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
  2939. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 43, __pyx_L3_error)
  2940. }
  2941. __pyx_v_self = values[0];
  2942. __pyx_v_text = values[1];
  2943. __pyx_v_filename = values[2];
  2944. }
  2945. goto __pyx_L6_skip;
  2946. __pyx_L5_argtuple_error:;
  2947. __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 43, __pyx_L3_error)
  2948. __pyx_L6_skip:;
  2949. goto __pyx_L4_argument_unpacking_done;
  2950. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.Lexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2955. __Pyx_RefNannyFinishContext();
  2956. return NULL;
  2957. __pyx_L4_argument_unpacking_done:;
  2958. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer___init__(__pyx_self, __pyx_v_self, __pyx_v_text, __pyx_v_filename);
  2959. /* function exit code */
  2960. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  2961. Py_XDECREF(values[__pyx_temp]);
  2962. }
  2963. __Pyx_RefNannyFinishContext();
  2964. return __pyx_r;
  2965. }
  2966. 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) {
  2967. PyObject *__pyx_r = NULL;
  2968. __Pyx_RefNannyDeclarations
  2969. Py_ssize_t __pyx_t_1;
  2970. PyObject *__pyx_t_2 = NULL;
  2971. PyObject *__pyx_t_3 = NULL;
  2972. int __pyx_lineno = 0;
  2973. const char *__pyx_filename = NULL;
  2974. int __pyx_clineno = 0;
  2975. __Pyx_RefNannySetupContext("__init__", 0);
  2976. /* "fontTools/feaLib/lexer.py":44
  2977. *
  2978. * def __init__(self, text, filename):
  2979. * self.filename_ = filename # <<<<<<<<<<<<<<
  2980. * self.line_ = 1
  2981. * self.pos_ = 0
  2982. */
  2983. 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)
  2984. /* "fontTools/feaLib/lexer.py":45
  2985. * def __init__(self, text, filename):
  2986. * self.filename_ = filename
  2987. * self.line_ = 1 # <<<<<<<<<<<<<<
  2988. * self.pos_ = 0
  2989. * self.line_start_ = 0
  2990. */
  2991. 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)
  2992. /* "fontTools/feaLib/lexer.py":46
  2993. * self.filename_ = filename
  2994. * self.line_ = 1
  2995. * self.pos_ = 0 # <<<<<<<<<<<<<<
  2996. * self.line_start_ = 0
  2997. * self.text_ = text
  2998. */
  2999. 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)
  3000. /* "fontTools/feaLib/lexer.py":47
  3001. * self.line_ = 1
  3002. * self.pos_ = 0
  3003. * self.line_start_ = 0 # <<<<<<<<<<<<<<
  3004. * self.text_ = text
  3005. * self.text_length_ = len(text)
  3006. */
  3007. 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)
  3008. /* "fontTools/feaLib/lexer.py":48
  3009. * self.pos_ = 0
  3010. * self.line_start_ = 0
  3011. * self.text_ = text # <<<<<<<<<<<<<<
  3012. * self.text_length_ = len(text)
  3013. * self.mode_ = Lexer.MODE_NORMAL_
  3014. */
  3015. 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)
  3016. /* "fontTools/feaLib/lexer.py":49
  3017. * self.line_start_ = 0
  3018. * self.text_ = text
  3019. * self.text_length_ = len(text) # <<<<<<<<<<<<<<
  3020. * self.mode_ = Lexer.MODE_NORMAL_
  3021. *
  3022. */
  3023. __pyx_t_1 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 49, __pyx_L1_error)
  3024. __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  3025. __Pyx_GOTREF(__pyx_t_2);
  3026. 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)
  3027. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3028. /* "fontTools/feaLib/lexer.py":50
  3029. * self.text_ = text
  3030. * self.text_length_ = len(text)
  3031. * self.mode_ = Lexer.MODE_NORMAL_ # <<<<<<<<<<<<<<
  3032. *
  3033. * def __iter__(self):
  3034. */
  3035. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  3036. __Pyx_GOTREF(__pyx_t_2);
  3037. __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)
  3038. __Pyx_GOTREF(__pyx_t_3);
  3039. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3040. 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)
  3041. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3042. /* "fontTools/feaLib/lexer.py":43
  3043. * MODE_FILENAME_ = "FILENAME"
  3044. *
  3045. * def __init__(self, text, filename): # <<<<<<<<<<<<<<
  3046. * self.filename_ = filename
  3047. * self.line_ = 1
  3048. */
  3049. /* function exit code */
  3050. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  3051. goto __pyx_L0;
  3052. __pyx_L1_error:;
  3053. __Pyx_XDECREF(__pyx_t_2);
  3054. __Pyx_XDECREF(__pyx_t_3);
  3055. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3056. __pyx_r = NULL;
  3057. __pyx_L0:;
  3058. __Pyx_XGIVEREF(__pyx_r);
  3059. __Pyx_RefNannyFinishContext();
  3060. return __pyx_r;
  3061. }
  3062. /* "fontTools/feaLib/lexer.py":52
  3063. * self.mode_ = Lexer.MODE_NORMAL_
  3064. *
  3065. * def __iter__(self): # <<<<<<<<<<<<<<
  3066. * return self
  3067. *
  3068. */
  3069. /* Python wrapper */
  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. ); /*proto*/
  3077. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_2__iter__, "Lexer.__iter__(self)");
  3078. 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__};
  3079. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_3__iter__(PyObject *__pyx_self,
  3080. #if CYTHON_METH_FASTCALL
  3081. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3082. #else
  3083. PyObject *__pyx_args, PyObject *__pyx_kwds
  3084. #endif
  3085. ) {
  3086. PyObject *__pyx_v_self = 0;
  3087. #if !CYTHON_METH_FASTCALL
  3088. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3089. #endif
  3090. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3091. PyObject* values[1] = {0};
  3092. int __pyx_lineno = 0;
  3093. const char *__pyx_filename = NULL;
  3094. int __pyx_clineno = 0;
  3095. PyObject *__pyx_r = 0;
  3096. __Pyx_RefNannyDeclarations
  3097. __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  3098. #if !CYTHON_METH_FASTCALL
  3099. #if CYTHON_ASSUME_SAFE_SIZE
  3100. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3101. #else
  3102. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3103. #endif
  3104. #endif
  3105. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3106. {
  3107. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3108. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3109. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 52, __pyx_L3_error)
  3110. if (__pyx_kwds_len > 0) {
  3111. switch (__pyx_nargs) {
  3112. case 1:
  3113. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3114. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 52, __pyx_L3_error)
  3115. CYTHON_FALLTHROUGH;
  3116. case 0: break;
  3117. default: goto __pyx_L5_argtuple_error;
  3118. }
  3119. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3120. 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)
  3121. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3122. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, i); __PYX_ERR(0, 52, __pyx_L3_error) }
  3123. }
  3124. } else if (unlikely(__pyx_nargs != 1)) {
  3125. goto __pyx_L5_argtuple_error;
  3126. } else {
  3127. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3128. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 52, __pyx_L3_error)
  3129. }
  3130. __pyx_v_self = values[0];
  3131. }
  3132. goto __pyx_L6_skip;
  3133. __pyx_L5_argtuple_error:;
  3134. __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 52, __pyx_L3_error)
  3135. __pyx_L6_skip:;
  3136. goto __pyx_L4_argument_unpacking_done;
  3137. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.Lexer.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3142. __Pyx_RefNannyFinishContext();
  3143. return NULL;
  3144. __pyx_L4_argument_unpacking_done:;
  3145. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_2__iter__(__pyx_self, __pyx_v_self);
  3146. /* function exit code */
  3147. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3148. Py_XDECREF(values[__pyx_temp]);
  3149. }
  3150. __Pyx_RefNannyFinishContext();
  3151. return __pyx_r;
  3152. }
  3153. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3154. PyObject *__pyx_r = NULL;
  3155. __Pyx_RefNannyDeclarations
  3156. __Pyx_RefNannySetupContext("__iter__", 0);
  3157. /* "fontTools/feaLib/lexer.py":53
  3158. *
  3159. * def __iter__(self):
  3160. * return self # <<<<<<<<<<<<<<
  3161. *
  3162. * def next(self): # Python 2
  3163. */
  3164. __Pyx_XDECREF(__pyx_r);
  3165. __Pyx_INCREF(__pyx_v_self);
  3166. __pyx_r = __pyx_v_self;
  3167. goto __pyx_L0;
  3168. /* "fontTools/feaLib/lexer.py":52
  3169. * self.mode_ = Lexer.MODE_NORMAL_
  3170. *
  3171. * def __iter__(self): # <<<<<<<<<<<<<<
  3172. * return self
  3173. *
  3174. */
  3175. /* function exit code */
  3176. __pyx_L0:;
  3177. __Pyx_XGIVEREF(__pyx_r);
  3178. __Pyx_RefNannyFinishContext();
  3179. return __pyx_r;
  3180. }
  3181. /* "fontTools/feaLib/lexer.py":55
  3182. * return self
  3183. *
  3184. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  3185. * return self.__next__()
  3186. *
  3187. */
  3188. /* Python wrapper */
  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. ); /*proto*/
  3196. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_4next, "Lexer.next(self)");
  3197. 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};
  3198. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_5next(PyObject *__pyx_self,
  3199. #if CYTHON_METH_FASTCALL
  3200. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3201. #else
  3202. PyObject *__pyx_args, PyObject *__pyx_kwds
  3203. #endif
  3204. ) {
  3205. PyObject *__pyx_v_self = 0;
  3206. #if !CYTHON_METH_FASTCALL
  3207. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3208. #endif
  3209. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3210. PyObject* values[1] = {0};
  3211. int __pyx_lineno = 0;
  3212. const char *__pyx_filename = NULL;
  3213. int __pyx_clineno = 0;
  3214. PyObject *__pyx_r = 0;
  3215. __Pyx_RefNannyDeclarations
  3216. __Pyx_RefNannySetupContext("next (wrapper)", 0);
  3217. #if !CYTHON_METH_FASTCALL
  3218. #if CYTHON_ASSUME_SAFE_SIZE
  3219. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3220. #else
  3221. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3222. #endif
  3223. #endif
  3224. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3225. {
  3226. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3227. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3228. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 55, __pyx_L3_error)
  3229. if (__pyx_kwds_len > 0) {
  3230. switch (__pyx_nargs) {
  3231. case 1:
  3232. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3233. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 55, __pyx_L3_error)
  3234. CYTHON_FALLTHROUGH;
  3235. case 0: break;
  3236. default: goto __pyx_L5_argtuple_error;
  3237. }
  3238. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3239. 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)
  3240. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3241. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, i); __PYX_ERR(0, 55, __pyx_L3_error) }
  3242. }
  3243. } else if (unlikely(__pyx_nargs != 1)) {
  3244. goto __pyx_L5_argtuple_error;
  3245. } else {
  3246. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3247. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 55, __pyx_L3_error)
  3248. }
  3249. __pyx_v_self = values[0];
  3250. }
  3251. goto __pyx_L6_skip;
  3252. __pyx_L5_argtuple_error:;
  3253. __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 55, __pyx_L3_error)
  3254. __pyx_L6_skip:;
  3255. goto __pyx_L4_argument_unpacking_done;
  3256. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.Lexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3261. __Pyx_RefNannyFinishContext();
  3262. return NULL;
  3263. __pyx_L4_argument_unpacking_done:;
  3264. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_4next(__pyx_self, __pyx_v_self);
  3265. /* function exit code */
  3266. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3267. Py_XDECREF(values[__pyx_temp]);
  3268. }
  3269. __Pyx_RefNannyFinishContext();
  3270. return __pyx_r;
  3271. }
  3272. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3273. PyObject *__pyx_r = NULL;
  3274. __Pyx_RefNannyDeclarations
  3275. PyObject *__pyx_t_1 = NULL;
  3276. PyObject *__pyx_t_2 = NULL;
  3277. size_t __pyx_t_3;
  3278. int __pyx_lineno = 0;
  3279. const char *__pyx_filename = NULL;
  3280. int __pyx_clineno = 0;
  3281. __Pyx_RefNannySetupContext("next", 0);
  3282. /* "fontTools/feaLib/lexer.py":56
  3283. *
  3284. * def next(self): # Python 2
  3285. * return self.__next__() # <<<<<<<<<<<<<<
  3286. *
  3287. * def __next__(self): # Python 3
  3288. */
  3289. __Pyx_XDECREF(__pyx_r);
  3290. __pyx_t_2 = __pyx_v_self;
  3291. __Pyx_INCREF(__pyx_t_2);
  3292. __pyx_t_3 = 0;
  3293. {
  3294. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  3295. __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));
  3296. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  3297. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  3298. __Pyx_GOTREF(__pyx_t_1);
  3299. }
  3300. __pyx_r = __pyx_t_1;
  3301. __pyx_t_1 = 0;
  3302. goto __pyx_L0;
  3303. /* "fontTools/feaLib/lexer.py":55
  3304. * return self
  3305. *
  3306. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  3307. * return self.__next__()
  3308. *
  3309. */
  3310. /* function exit code */
  3311. __pyx_L1_error:;
  3312. __Pyx_XDECREF(__pyx_t_1);
  3313. __Pyx_XDECREF(__pyx_t_2);
  3314. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3315. __pyx_r = NULL;
  3316. __pyx_L0:;
  3317. __Pyx_XGIVEREF(__pyx_r);
  3318. __Pyx_RefNannyFinishContext();
  3319. return __pyx_r;
  3320. }
  3321. /* "fontTools/feaLib/lexer.py":58
  3322. * return self.__next__()
  3323. *
  3324. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  3325. * while True:
  3326. * token_type, token, location = self.next_()
  3327. */
  3328. /* Python wrapper */
  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. ); /*proto*/
  3336. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_6__next__, "Lexer.__next__(self)");
  3337. 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__};
  3338. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_7__next__(PyObject *__pyx_self,
  3339. #if CYTHON_METH_FASTCALL
  3340. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3341. #else
  3342. PyObject *__pyx_args, PyObject *__pyx_kwds
  3343. #endif
  3344. ) {
  3345. PyObject *__pyx_v_self = 0;
  3346. #if !CYTHON_METH_FASTCALL
  3347. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3348. #endif
  3349. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3350. PyObject* values[1] = {0};
  3351. int __pyx_lineno = 0;
  3352. const char *__pyx_filename = NULL;
  3353. int __pyx_clineno = 0;
  3354. PyObject *__pyx_r = 0;
  3355. __Pyx_RefNannyDeclarations
  3356. __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  3357. #if !CYTHON_METH_FASTCALL
  3358. #if CYTHON_ASSUME_SAFE_SIZE
  3359. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3360. #else
  3361. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3362. #endif
  3363. #endif
  3364. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3365. {
  3366. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3367. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3368. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 58, __pyx_L3_error)
  3369. if (__pyx_kwds_len > 0) {
  3370. switch (__pyx_nargs) {
  3371. case 1:
  3372. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3373. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 58, __pyx_L3_error)
  3374. CYTHON_FALLTHROUGH;
  3375. case 0: break;
  3376. default: goto __pyx_L5_argtuple_error;
  3377. }
  3378. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3379. 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)
  3380. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3381. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 58, __pyx_L3_error) }
  3382. }
  3383. } else if (unlikely(__pyx_nargs != 1)) {
  3384. goto __pyx_L5_argtuple_error;
  3385. } else {
  3386. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3387. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 58, __pyx_L3_error)
  3388. }
  3389. __pyx_v_self = values[0];
  3390. }
  3391. goto __pyx_L6_skip;
  3392. __pyx_L5_argtuple_error:;
  3393. __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 58, __pyx_L3_error)
  3394. __pyx_L6_skip:;
  3395. goto __pyx_L4_argument_unpacking_done;
  3396. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.Lexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3401. __Pyx_RefNannyFinishContext();
  3402. return NULL;
  3403. __pyx_L4_argument_unpacking_done:;
  3404. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_6__next__(__pyx_self, __pyx_v_self);
  3405. /* function exit code */
  3406. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3407. Py_XDECREF(values[__pyx_temp]);
  3408. }
  3409. __Pyx_RefNannyFinishContext();
  3410. return __pyx_r;
  3411. }
  3412. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3413. PyObject *__pyx_v_token_type = NULL;
  3414. PyObject *__pyx_v_token = NULL;
  3415. PyObject *__pyx_v_location = NULL;
  3416. PyObject *__pyx_r = NULL;
  3417. __Pyx_RefNannyDeclarations
  3418. PyObject *__pyx_t_1 = NULL;
  3419. PyObject *__pyx_t_2 = NULL;
  3420. size_t __pyx_t_3;
  3421. PyObject *__pyx_t_4 = NULL;
  3422. PyObject *__pyx_t_5 = NULL;
  3423. PyObject *__pyx_t_6 = NULL;
  3424. PyObject *(*__pyx_t_7)(PyObject *);
  3425. int __pyx_t_8;
  3426. int __pyx_lineno = 0;
  3427. const char *__pyx_filename = NULL;
  3428. int __pyx_clineno = 0;
  3429. __Pyx_RefNannySetupContext("__next__", 0);
  3430. /* "fontTools/feaLib/lexer.py":59
  3431. *
  3432. * def __next__(self): # Python 3
  3433. * while True: # <<<<<<<<<<<<<<
  3434. * token_type, token, location = self.next_()
  3435. * if token_type != Lexer.NEWLINE:
  3436. */
  3437. while (1) {
  3438. /* "fontTools/feaLib/lexer.py":60
  3439. * def __next__(self): # Python 3
  3440. * while True:
  3441. * token_type, token, location = self.next_() # <<<<<<<<<<<<<<
  3442. * if token_type != Lexer.NEWLINE:
  3443. * return (token_type, token, location)
  3444. */
  3445. __pyx_t_2 = __pyx_v_self;
  3446. __Pyx_INCREF(__pyx_t_2);
  3447. __pyx_t_3 = 0;
  3448. {
  3449. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  3450. __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));
  3451. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  3452. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  3453. __Pyx_GOTREF(__pyx_t_1);
  3454. }
  3455. if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
  3456. PyObject* sequence = __pyx_t_1;
  3457. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  3458. if (unlikely(size != 3)) {
  3459. if (size > 3) __Pyx_RaiseTooManyValuesError(3);
  3460. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  3461. __PYX_ERR(0, 60, __pyx_L1_error)
  3462. }
  3463. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  3464. if (likely(PyTuple_CheckExact(sequence))) {
  3465. __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
  3466. __Pyx_INCREF(__pyx_t_2);
  3467. __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
  3468. __Pyx_INCREF(__pyx_t_4);
  3469. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2);
  3470. __Pyx_INCREF(__pyx_t_5);
  3471. } else {
  3472. __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
  3473. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  3474. __Pyx_XGOTREF(__pyx_t_2);
  3475. __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
  3476. if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
  3477. __Pyx_XGOTREF(__pyx_t_4);
  3478. __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
  3479. if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
  3480. __Pyx_XGOTREF(__pyx_t_5);
  3481. }
  3482. #else
  3483. __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  3484. __Pyx_GOTREF(__pyx_t_2);
  3485. __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
  3486. __Pyx_GOTREF(__pyx_t_4);
  3487. __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
  3488. __Pyx_GOTREF(__pyx_t_5);
  3489. #endif
  3490. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3491. } else {
  3492. Py_ssize_t index = -1;
  3493. __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L1_error)
  3494. __Pyx_GOTREF(__pyx_t_6);
  3495. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3496. __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
  3497. index = 0; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
  3498. __Pyx_GOTREF(__pyx_t_2);
  3499. index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
  3500. __Pyx_GOTREF(__pyx_t_4);
  3501. index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
  3502. __Pyx_GOTREF(__pyx_t_5);
  3503. if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 60, __pyx_L1_error)
  3504. __pyx_t_7 = NULL;
  3505. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3506. goto __pyx_L6_unpacking_done;
  3507. __pyx_L5_unpacking_failed:;
  3508. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3509. __pyx_t_7 = NULL;
  3510. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  3511. __PYX_ERR(0, 60, __pyx_L1_error)
  3512. __pyx_L6_unpacking_done:;
  3513. }
  3514. __Pyx_XDECREF_SET(__pyx_v_token_type, __pyx_t_2);
  3515. __pyx_t_2 = 0;
  3516. __Pyx_XDECREF_SET(__pyx_v_token, __pyx_t_4);
  3517. __pyx_t_4 = 0;
  3518. __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_5);
  3519. __pyx_t_5 = 0;
  3520. /* "fontTools/feaLib/lexer.py":61
  3521. * while True:
  3522. * token_type, token, location = self.next_()
  3523. * if token_type != Lexer.NEWLINE: # <<<<<<<<<<<<<<
  3524. * return (token_type, token, location)
  3525. *
  3526. */
  3527. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  3528. __Pyx_GOTREF(__pyx_t_1);
  3529. __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)
  3530. __Pyx_GOTREF(__pyx_t_5);
  3531. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3532. __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)
  3533. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3534. __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 61, __pyx_L1_error)
  3535. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3536. if (__pyx_t_8) {
  3537. /* "fontTools/feaLib/lexer.py":62
  3538. * token_type, token, location = self.next_()
  3539. * if token_type != Lexer.NEWLINE:
  3540. * return (token_type, token, location) # <<<<<<<<<<<<<<
  3541. *
  3542. * def location_(self):
  3543. */
  3544. __Pyx_XDECREF(__pyx_r);
  3545. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  3546. __Pyx_GOTREF(__pyx_t_1);
  3547. __Pyx_INCREF(__pyx_v_token_type);
  3548. __Pyx_GIVEREF(__pyx_v_token_type);
  3549. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_token_type) != (0)) __PYX_ERR(0, 62, __pyx_L1_error);
  3550. __Pyx_INCREF(__pyx_v_token);
  3551. __Pyx_GIVEREF(__pyx_v_token);
  3552. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_token) != (0)) __PYX_ERR(0, 62, __pyx_L1_error);
  3553. __Pyx_INCREF(__pyx_v_location);
  3554. __Pyx_GIVEREF(__pyx_v_location);
  3555. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 62, __pyx_L1_error);
  3556. __pyx_r = __pyx_t_1;
  3557. __pyx_t_1 = 0;
  3558. goto __pyx_L0;
  3559. /* "fontTools/feaLib/lexer.py":61
  3560. * while True:
  3561. * token_type, token, location = self.next_()
  3562. * if token_type != Lexer.NEWLINE: # <<<<<<<<<<<<<<
  3563. * return (token_type, token, location)
  3564. *
  3565. */
  3566. }
  3567. }
  3568. /* "fontTools/feaLib/lexer.py":58
  3569. * return self.__next__()
  3570. *
  3571. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  3572. * while True:
  3573. * token_type, token, location = self.next_()
  3574. */
  3575. /* function exit code */
  3576. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  3577. goto __pyx_L0;
  3578. __pyx_L1_error:;
  3579. __Pyx_XDECREF(__pyx_t_1);
  3580. __Pyx_XDECREF(__pyx_t_2);
  3581. __Pyx_XDECREF(__pyx_t_4);
  3582. __Pyx_XDECREF(__pyx_t_5);
  3583. __Pyx_XDECREF(__pyx_t_6);
  3584. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3585. __pyx_r = NULL;
  3586. __pyx_L0:;
  3587. __Pyx_XDECREF(__pyx_v_token_type);
  3588. __Pyx_XDECREF(__pyx_v_token);
  3589. __Pyx_XDECREF(__pyx_v_location);
  3590. __Pyx_XGIVEREF(__pyx_r);
  3591. __Pyx_RefNannyFinishContext();
  3592. return __pyx_r;
  3593. }
  3594. /* "fontTools/feaLib/lexer.py":64
  3595. * return (token_type, token, location)
  3596. *
  3597. * def location_(self): # <<<<<<<<<<<<<<
  3598. * column = self.pos_ - self.line_start_ + 1
  3599. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  3600. */
  3601. /* Python wrapper */
  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. ); /*proto*/
  3609. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_8location_, "Lexer.location_(self)");
  3610. 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_};
  3611. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_9location_(PyObject *__pyx_self,
  3612. #if CYTHON_METH_FASTCALL
  3613. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3614. #else
  3615. PyObject *__pyx_args, PyObject *__pyx_kwds
  3616. #endif
  3617. ) {
  3618. PyObject *__pyx_v_self = 0;
  3619. #if !CYTHON_METH_FASTCALL
  3620. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3621. #endif
  3622. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3623. PyObject* values[1] = {0};
  3624. int __pyx_lineno = 0;
  3625. const char *__pyx_filename = NULL;
  3626. int __pyx_clineno = 0;
  3627. PyObject *__pyx_r = 0;
  3628. __Pyx_RefNannyDeclarations
  3629. __Pyx_RefNannySetupContext("location_ (wrapper)", 0);
  3630. #if !CYTHON_METH_FASTCALL
  3631. #if CYTHON_ASSUME_SAFE_SIZE
  3632. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3633. #else
  3634. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3635. #endif
  3636. #endif
  3637. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3638. {
  3639. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3640. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3641. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 64, __pyx_L3_error)
  3642. if (__pyx_kwds_len > 0) {
  3643. switch (__pyx_nargs) {
  3644. case 1:
  3645. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3646. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 64, __pyx_L3_error)
  3647. CYTHON_FALLTHROUGH;
  3648. case 0: break;
  3649. default: goto __pyx_L5_argtuple_error;
  3650. }
  3651. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3652. 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)
  3653. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3654. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("location_", 1, 1, 1, i); __PYX_ERR(0, 64, __pyx_L3_error) }
  3655. }
  3656. } else if (unlikely(__pyx_nargs != 1)) {
  3657. goto __pyx_L5_argtuple_error;
  3658. } else {
  3659. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3660. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 64, __pyx_L3_error)
  3661. }
  3662. __pyx_v_self = values[0];
  3663. }
  3664. goto __pyx_L6_skip;
  3665. __pyx_L5_argtuple_error:;
  3666. __Pyx_RaiseArgtupleInvalid("location_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 64, __pyx_L3_error)
  3667. __pyx_L6_skip:;
  3668. goto __pyx_L4_argument_unpacking_done;
  3669. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.Lexer.location_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3674. __Pyx_RefNannyFinishContext();
  3675. return NULL;
  3676. __pyx_L4_argument_unpacking_done:;
  3677. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_8location_(__pyx_self, __pyx_v_self);
  3678. /* function exit code */
  3679. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3680. Py_XDECREF(values[__pyx_temp]);
  3681. }
  3682. __Pyx_RefNannyFinishContext();
  3683. return __pyx_r;
  3684. }
  3685. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_8location_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3686. PyObject *__pyx_v_column = NULL;
  3687. PyObject *__pyx_r = NULL;
  3688. __Pyx_RefNannyDeclarations
  3689. PyObject *__pyx_t_1 = NULL;
  3690. PyObject *__pyx_t_2 = NULL;
  3691. PyObject *__pyx_t_3 = NULL;
  3692. PyObject *__pyx_t_4 = NULL;
  3693. PyObject *__pyx_t_5 = NULL;
  3694. int __pyx_t_6;
  3695. size_t __pyx_t_7;
  3696. int __pyx_lineno = 0;
  3697. const char *__pyx_filename = NULL;
  3698. int __pyx_clineno = 0;
  3699. __Pyx_RefNannySetupContext("location_", 0);
  3700. /* "fontTools/feaLib/lexer.py":65
  3701. *
  3702. * def location_(self):
  3703. * column = self.pos_ - self.line_start_ + 1 # <<<<<<<<<<<<<<
  3704. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  3705. *
  3706. */
  3707. __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)
  3708. __Pyx_GOTREF(__pyx_t_1);
  3709. __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)
  3710. __Pyx_GOTREF(__pyx_t_2);
  3711. __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
  3712. __Pyx_GOTREF(__pyx_t_3);
  3713. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3714. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3715. __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)
  3716. __Pyx_GOTREF(__pyx_t_2);
  3717. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3718. __pyx_v_column = __pyx_t_2;
  3719. __pyx_t_2 = 0;
  3720. /* "fontTools/feaLib/lexer.py":66
  3721. * def location_(self):
  3722. * column = self.pos_ - self.line_start_ + 1
  3723. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column) # <<<<<<<<<<<<<<
  3724. *
  3725. * def next_(self):
  3726. */
  3727. __Pyx_XDECREF(__pyx_r);
  3728. __pyx_t_3 = NULL;
  3729. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FeatureLibLocation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
  3730. __Pyx_GOTREF(__pyx_t_1);
  3731. __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)
  3732. __Pyx_GOTREF(__pyx_t_5);
  3733. __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 66, __pyx_L1_error)
  3734. if (!__pyx_t_6) {
  3735. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3736. } else {
  3737. __Pyx_INCREF(__pyx_t_5);
  3738. __pyx_t_4 = __pyx_t_5;
  3739. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3740. goto __pyx_L3_bool_binop_done;
  3741. }
  3742. __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_features);
  3743. __pyx_t_4 = __pyx_mstate_global->__pyx_kp_u_features;
  3744. __pyx_L3_bool_binop_done:;
  3745. __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)
  3746. __Pyx_GOTREF(__pyx_t_5);
  3747. __pyx_t_7 = 1;
  3748. #if CYTHON_UNPACK_METHODS
  3749. if (unlikely(PyMethod_Check(__pyx_t_1))) {
  3750. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
  3751. assert(__pyx_t_3);
  3752. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
  3753. __Pyx_INCREF(__pyx_t_3);
  3754. __Pyx_INCREF(__pyx__function);
  3755. __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
  3756. __pyx_t_7 = 0;
  3757. }
  3758. #endif
  3759. {
  3760. PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_v_column};
  3761. __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));
  3762. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  3763. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3764. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3765. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3766. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
  3767. __Pyx_GOTREF(__pyx_t_2);
  3768. }
  3769. __pyx_r = __pyx_t_2;
  3770. __pyx_t_2 = 0;
  3771. goto __pyx_L0;
  3772. /* "fontTools/feaLib/lexer.py":64
  3773. * return (token_type, token, location)
  3774. *
  3775. * def location_(self): # <<<<<<<<<<<<<<
  3776. * column = self.pos_ - self.line_start_ + 1
  3777. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  3778. */
  3779. /* function exit code */
  3780. __pyx_L1_error:;
  3781. __Pyx_XDECREF(__pyx_t_1);
  3782. __Pyx_XDECREF(__pyx_t_2);
  3783. __Pyx_XDECREF(__pyx_t_3);
  3784. __Pyx_XDECREF(__pyx_t_4);
  3785. __Pyx_XDECREF(__pyx_t_5);
  3786. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.location_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3787. __pyx_r = NULL;
  3788. __pyx_L0:;
  3789. __Pyx_XDECREF(__pyx_v_column);
  3790. __Pyx_XGIVEREF(__pyx_r);
  3791. __Pyx_RefNannyFinishContext();
  3792. return __pyx_r;
  3793. }
  3794. /* "fontTools/feaLib/lexer.py":68
  3795. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  3796. *
  3797. * def next_(self): # <<<<<<<<<<<<<<
  3798. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  3799. * location = self.location_()
  3800. */
  3801. /* Python wrapper */
  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. ); /*proto*/
  3809. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_10next_, "Lexer.next_(self)");
  3810. 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_};
  3811. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_11next_(PyObject *__pyx_self,
  3812. #if CYTHON_METH_FASTCALL
  3813. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  3814. #else
  3815. PyObject *__pyx_args, PyObject *__pyx_kwds
  3816. #endif
  3817. ) {
  3818. PyObject *__pyx_v_self = 0;
  3819. #if !CYTHON_METH_FASTCALL
  3820. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  3821. #endif
  3822. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  3823. PyObject* values[1] = {0};
  3824. int __pyx_lineno = 0;
  3825. const char *__pyx_filename = NULL;
  3826. int __pyx_clineno = 0;
  3827. PyObject *__pyx_r = 0;
  3828. __Pyx_RefNannyDeclarations
  3829. __Pyx_RefNannySetupContext("next_ (wrapper)", 0);
  3830. #if !CYTHON_METH_FASTCALL
  3831. #if CYTHON_ASSUME_SAFE_SIZE
  3832. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  3833. #else
  3834. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  3835. #endif
  3836. #endif
  3837. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  3838. {
  3839. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  3840. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  3841. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 68, __pyx_L3_error)
  3842. if (__pyx_kwds_len > 0) {
  3843. switch (__pyx_nargs) {
  3844. case 1:
  3845. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3846. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 68, __pyx_L3_error)
  3847. CYTHON_FALLTHROUGH;
  3848. case 0: break;
  3849. default: goto __pyx_L5_argtuple_error;
  3850. }
  3851. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  3852. 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)
  3853. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  3854. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next_", 1, 1, 1, i); __PYX_ERR(0, 68, __pyx_L3_error) }
  3855. }
  3856. } else if (unlikely(__pyx_nargs != 1)) {
  3857. goto __pyx_L5_argtuple_error;
  3858. } else {
  3859. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  3860. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 68, __pyx_L3_error)
  3861. }
  3862. __pyx_v_self = values[0];
  3863. }
  3864. goto __pyx_L6_skip;
  3865. __pyx_L5_argtuple_error:;
  3866. __Pyx_RaiseArgtupleInvalid("next_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 68, __pyx_L3_error)
  3867. __pyx_L6_skip:;
  3868. goto __pyx_L4_argument_unpacking_done;
  3869. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.Lexer.next_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3874. __Pyx_RefNannyFinishContext();
  3875. return NULL;
  3876. __pyx_L4_argument_unpacking_done:;
  3877. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_10next_(__pyx_self, __pyx_v_self);
  3878. /* function exit code */
  3879. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  3880. Py_XDECREF(values[__pyx_temp]);
  3881. }
  3882. __Pyx_RefNannyFinishContext();
  3883. return __pyx_r;
  3884. }
  3885. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_10next_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  3886. PyObject *__pyx_v_location = NULL;
  3887. PyObject *__pyx_v_start = NULL;
  3888. PyObject *__pyx_v_text = NULL;
  3889. Py_ssize_t __pyx_v_limit;
  3890. PyObject *__pyx_v_cur_char = NULL;
  3891. PyObject *__pyx_v_next_char = NULL;
  3892. PyObject *__pyx_v_glyphclass = NULL;
  3893. PyObject *__pyx_v_token = NULL;
  3894. PyObject *__pyx_v_string = NULL;
  3895. PyObject *__pyx_r = NULL;
  3896. __Pyx_RefNannyDeclarations
  3897. PyObject *__pyx_t_1 = NULL;
  3898. PyObject *__pyx_t_2 = NULL;
  3899. PyObject *__pyx_t_3 = NULL;
  3900. PyObject *__pyx_t_4 = NULL;
  3901. size_t __pyx_t_5;
  3902. Py_ssize_t __pyx_t_6;
  3903. int __pyx_t_7;
  3904. int __pyx_t_8;
  3905. PyObject *__pyx_t_9 = NULL;
  3906. PyObject *__pyx_t_10 = NULL;
  3907. int __pyx_lineno = 0;
  3908. const char *__pyx_filename = NULL;
  3909. int __pyx_clineno = 0;
  3910. __Pyx_RefNannySetupContext("next_", 0);
  3911. /* "fontTools/feaLib/lexer.py":69
  3912. *
  3913. * def next_(self):
  3914. * self.scan_over_(Lexer.CHAR_WHITESPACE_) # <<<<<<<<<<<<<<
  3915. * location = self.location_()
  3916. * start = self.pos_
  3917. */
  3918. __pyx_t_2 = __pyx_v_self;
  3919. __Pyx_INCREF(__pyx_t_2);
  3920. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
  3921. __Pyx_GOTREF(__pyx_t_3);
  3922. __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)
  3923. __Pyx_GOTREF(__pyx_t_4);
  3924. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3925. __pyx_t_5 = 0;
  3926. {
  3927. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
  3928. __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));
  3929. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  3930. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3931. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  3932. __Pyx_GOTREF(__pyx_t_1);
  3933. }
  3934. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3935. /* "fontTools/feaLib/lexer.py":70
  3936. * def next_(self):
  3937. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  3938. * location = self.location_() # <<<<<<<<<<<<<<
  3939. * start = self.pos_
  3940. * text = self.text_
  3941. */
  3942. __pyx_t_4 = __pyx_v_self;
  3943. __Pyx_INCREF(__pyx_t_4);
  3944. __pyx_t_5 = 0;
  3945. {
  3946. PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
  3947. __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));
  3948. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  3949. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  3950. __Pyx_GOTREF(__pyx_t_1);
  3951. }
  3952. __pyx_v_location = __pyx_t_1;
  3953. __pyx_t_1 = 0;
  3954. /* "fontTools/feaLib/lexer.py":71
  3955. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  3956. * location = self.location_()
  3957. * start = self.pos_ # <<<<<<<<<<<<<<
  3958. * text = self.text_
  3959. * limit = len(text)
  3960. */
  3961. __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)
  3962. __Pyx_GOTREF(__pyx_t_1);
  3963. __pyx_v_start = __pyx_t_1;
  3964. __pyx_t_1 = 0;
  3965. /* "fontTools/feaLib/lexer.py":72
  3966. * location = self.location_()
  3967. * start = self.pos_
  3968. * text = self.text_ # <<<<<<<<<<<<<<
  3969. * limit = len(text)
  3970. * if start >= limit:
  3971. */
  3972. __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)
  3973. __Pyx_GOTREF(__pyx_t_1);
  3974. __pyx_v_text = __pyx_t_1;
  3975. __pyx_t_1 = 0;
  3976. /* "fontTools/feaLib/lexer.py":73
  3977. * start = self.pos_
  3978. * text = self.text_
  3979. * limit = len(text) # <<<<<<<<<<<<<<
  3980. * if start >= limit:
  3981. * raise StopIteration()
  3982. */
  3983. __pyx_t_6 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 73, __pyx_L1_error)
  3984. __pyx_v_limit = __pyx_t_6;
  3985. /* "fontTools/feaLib/lexer.py":74
  3986. * text = self.text_
  3987. * limit = len(text)
  3988. * if start >= limit: # <<<<<<<<<<<<<<
  3989. * raise StopIteration()
  3990. * cur_char = text[start]
  3991. */
  3992. __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  3993. __Pyx_GOTREF(__pyx_t_1);
  3994. __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)
  3995. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3996. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 74, __pyx_L1_error)
  3997. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3998. if (unlikely(__pyx_t_7)) {
  3999. /* "fontTools/feaLib/lexer.py":75
  4000. * limit = len(text)
  4001. * if start >= limit:
  4002. * raise StopIteration() # <<<<<<<<<<<<<<
  4003. * cur_char = text[start]
  4004. * next_char = text[start + 1] if start + 1 < limit else None
  4005. */
  4006. __pyx_t_1 = NULL;
  4007. __pyx_t_5 = 1;
  4008. {
  4009. PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
  4010. __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));
  4011. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  4012. if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
  4013. __Pyx_GOTREF(__pyx_t_4);
  4014. }
  4015. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  4016. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4017. __PYX_ERR(0, 75, __pyx_L1_error)
  4018. /* "fontTools/feaLib/lexer.py":74
  4019. * text = self.text_
  4020. * limit = len(text)
  4021. * if start >= limit: # <<<<<<<<<<<<<<
  4022. * raise StopIteration()
  4023. * cur_char = text[start]
  4024. */
  4025. }
  4026. /* "fontTools/feaLib/lexer.py":76
  4027. * if start >= limit:
  4028. * raise StopIteration()
  4029. * cur_char = text[start] # <<<<<<<<<<<<<<
  4030. * next_char = text[start + 1] if start + 1 < limit else None
  4031. *
  4032. */
  4033. __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_v_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
  4034. __Pyx_GOTREF(__pyx_t_4);
  4035. __pyx_v_cur_char = __pyx_t_4;
  4036. __pyx_t_4 = 0;
  4037. /* "fontTools/feaLib/lexer.py":77
  4038. * raise StopIteration()
  4039. * cur_char = text[start]
  4040. * next_char = text[start + 1] if start + 1 < limit else None # <<<<<<<<<<<<<<
  4041. *
  4042. * if cur_char == "\n":
  4043. */
  4044. __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)
  4045. __Pyx_GOTREF(__pyx_t_1);
  4046. __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  4047. __Pyx_GOTREF(__pyx_t_2);
  4048. __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)
  4049. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4050. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4051. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 77, __pyx_L1_error)
  4052. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4053. if (__pyx_t_7) {
  4054. __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)
  4055. __Pyx_GOTREF(__pyx_t_3);
  4056. __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  4057. __Pyx_GOTREF(__pyx_t_2);
  4058. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4059. __pyx_t_4 = __pyx_t_2;
  4060. __pyx_t_2 = 0;
  4061. } else {
  4062. __Pyx_INCREF(Py_None);
  4063. __pyx_t_4 = Py_None;
  4064. }
  4065. __pyx_v_next_char = __pyx_t_4;
  4066. __pyx_t_4 = 0;
  4067. /* "fontTools/feaLib/lexer.py":79
  4068. * next_char = text[start + 1] if start + 1 < limit else None
  4069. *
  4070. * if cur_char == "\n": # <<<<<<<<<<<<<<
  4071. * self.pos_ += 1
  4072. * self.line_ += 1
  4073. */
  4074. __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)
  4075. if (__pyx_t_7) {
  4076. /* "fontTools/feaLib/lexer.py":80
  4077. *
  4078. * if cur_char == "\n":
  4079. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4080. * self.line_ += 1
  4081. * self.line_start_ = self.pos_
  4082. */
  4083. __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)
  4084. __Pyx_GOTREF(__pyx_t_4);
  4085. __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)
  4086. __Pyx_GOTREF(__pyx_t_2);
  4087. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4088. 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)
  4089. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4090. /* "fontTools/feaLib/lexer.py":81
  4091. * if cur_char == "\n":
  4092. * self.pos_ += 1
  4093. * self.line_ += 1 # <<<<<<<<<<<<<<
  4094. * self.line_start_ = self.pos_
  4095. * return (Lexer.NEWLINE, None, location)
  4096. */
  4097. __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)
  4098. __Pyx_GOTREF(__pyx_t_2);
  4099. __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)
  4100. __Pyx_GOTREF(__pyx_t_4);
  4101. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4102. 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)
  4103. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4104. /* "fontTools/feaLib/lexer.py":82
  4105. * self.pos_ += 1
  4106. * self.line_ += 1
  4107. * self.line_start_ = self.pos_ # <<<<<<<<<<<<<<
  4108. * return (Lexer.NEWLINE, None, location)
  4109. * if cur_char == "\r":
  4110. */
  4111. __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)
  4112. __Pyx_GOTREF(__pyx_t_4);
  4113. 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)
  4114. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4115. /* "fontTools/feaLib/lexer.py":83
  4116. * self.line_ += 1
  4117. * self.line_start_ = self.pos_
  4118. * return (Lexer.NEWLINE, None, location) # <<<<<<<<<<<<<<
  4119. * if cur_char == "\r":
  4120. * self.pos_ += 2 if next_char == "\n" else 1
  4121. */
  4122. __Pyx_XDECREF(__pyx_r);
  4123. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  4124. __Pyx_GOTREF(__pyx_t_4);
  4125. __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)
  4126. __Pyx_GOTREF(__pyx_t_2);
  4127. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4128. __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  4129. __Pyx_GOTREF(__pyx_t_4);
  4130. __Pyx_GIVEREF(__pyx_t_2);
  4131. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 83, __pyx_L1_error);
  4132. __Pyx_INCREF(Py_None);
  4133. __Pyx_GIVEREF(Py_None);
  4134. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None) != (0)) __PYX_ERR(0, 83, __pyx_L1_error);
  4135. __Pyx_INCREF(__pyx_v_location);
  4136. __Pyx_GIVEREF(__pyx_v_location);
  4137. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 83, __pyx_L1_error);
  4138. __pyx_t_2 = 0;
  4139. __pyx_r = __pyx_t_4;
  4140. __pyx_t_4 = 0;
  4141. goto __pyx_L0;
  4142. /* "fontTools/feaLib/lexer.py":79
  4143. * next_char = text[start + 1] if start + 1 < limit else None
  4144. *
  4145. * if cur_char == "\n": # <<<<<<<<<<<<<<
  4146. * self.pos_ += 1
  4147. * self.line_ += 1
  4148. */
  4149. }
  4150. /* "fontTools/feaLib/lexer.py":84
  4151. * self.line_start_ = self.pos_
  4152. * return (Lexer.NEWLINE, None, location)
  4153. * if cur_char == "\r": # <<<<<<<<<<<<<<
  4154. * self.pos_ += 2 if next_char == "\n" else 1
  4155. * self.line_ += 1
  4156. */
  4157. __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)
  4158. if (__pyx_t_7) {
  4159. /* "fontTools/feaLib/lexer.py":85
  4160. * return (Lexer.NEWLINE, None, location)
  4161. * if cur_char == "\r":
  4162. * self.pos_ += 2 if next_char == "\n" else 1 # <<<<<<<<<<<<<<
  4163. * self.line_ += 1
  4164. * self.line_start_ = self.pos_
  4165. */
  4166. __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)
  4167. __Pyx_GOTREF(__pyx_t_4);
  4168. __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)
  4169. if (__pyx_t_7) {
  4170. __Pyx_INCREF(__pyx_mstate_global->__pyx_int_2);
  4171. __pyx_t_2 = __pyx_mstate_global->__pyx_int_2;
  4172. } else {
  4173. __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
  4174. __pyx_t_2 = __pyx_mstate_global->__pyx_int_1;
  4175. }
  4176. __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
  4177. __Pyx_GOTREF(__pyx_t_3);
  4178. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4179. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4180. 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)
  4181. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4182. /* "fontTools/feaLib/lexer.py":86
  4183. * if cur_char == "\r":
  4184. * self.pos_ += 2 if next_char == "\n" else 1
  4185. * self.line_ += 1 # <<<<<<<<<<<<<<
  4186. * self.line_start_ = self.pos_
  4187. * return (Lexer.NEWLINE, None, location)
  4188. */
  4189. __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)
  4190. __Pyx_GOTREF(__pyx_t_3);
  4191. __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)
  4192. __Pyx_GOTREF(__pyx_t_2);
  4193. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4194. 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)
  4195. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4196. /* "fontTools/feaLib/lexer.py":87
  4197. * self.pos_ += 2 if next_char == "\n" else 1
  4198. * self.line_ += 1
  4199. * self.line_start_ = self.pos_ # <<<<<<<<<<<<<<
  4200. * return (Lexer.NEWLINE, None, location)
  4201. * if cur_char == "#":
  4202. */
  4203. __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)
  4204. __Pyx_GOTREF(__pyx_t_2);
  4205. 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)
  4206. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4207. /* "fontTools/feaLib/lexer.py":88
  4208. * self.line_ += 1
  4209. * self.line_start_ = self.pos_
  4210. * return (Lexer.NEWLINE, None, location) # <<<<<<<<<<<<<<
  4211. * if cur_char == "#":
  4212. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  4213. */
  4214. __Pyx_XDECREF(__pyx_r);
  4215. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  4216. __Pyx_GOTREF(__pyx_t_2);
  4217. __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)
  4218. __Pyx_GOTREF(__pyx_t_3);
  4219. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4220. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  4221. __Pyx_GOTREF(__pyx_t_2);
  4222. __Pyx_GIVEREF(__pyx_t_3);
  4223. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
  4224. __Pyx_INCREF(Py_None);
  4225. __Pyx_GIVEREF(Py_None);
  4226. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
  4227. __Pyx_INCREF(__pyx_v_location);
  4228. __Pyx_GIVEREF(__pyx_v_location);
  4229. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
  4230. __pyx_t_3 = 0;
  4231. __pyx_r = __pyx_t_2;
  4232. __pyx_t_2 = 0;
  4233. goto __pyx_L0;
  4234. /* "fontTools/feaLib/lexer.py":84
  4235. * self.line_start_ = self.pos_
  4236. * return (Lexer.NEWLINE, None, location)
  4237. * if cur_char == "\r": # <<<<<<<<<<<<<<
  4238. * self.pos_ += 2 if next_char == "\n" else 1
  4239. * self.line_ += 1
  4240. */
  4241. }
  4242. /* "fontTools/feaLib/lexer.py":89
  4243. * self.line_start_ = self.pos_
  4244. * return (Lexer.NEWLINE, None, location)
  4245. * if cur_char == "#": # <<<<<<<<<<<<<<
  4246. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  4247. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4248. */
  4249. __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)
  4250. if (__pyx_t_7) {
  4251. /* "fontTools/feaLib/lexer.py":90
  4252. * return (Lexer.NEWLINE, None, location)
  4253. * if cur_char == "#":
  4254. * self.scan_until_(Lexer.CHAR_NEWLINE_) # <<<<<<<<<<<<<<
  4255. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4256. *
  4257. */
  4258. __pyx_t_3 = __pyx_v_self;
  4259. __Pyx_INCREF(__pyx_t_3);
  4260. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error)
  4261. __Pyx_GOTREF(__pyx_t_4);
  4262. __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)
  4263. __Pyx_GOTREF(__pyx_t_1);
  4264. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4265. __pyx_t_5 = 0;
  4266. {
  4267. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
  4268. __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));
  4269. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4270. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4271. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
  4272. __Pyx_GOTREF(__pyx_t_2);
  4273. }
  4274. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4275. /* "fontTools/feaLib/lexer.py":91
  4276. * if cur_char == "#":
  4277. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  4278. * return (Lexer.COMMENT, text[start : self.pos_], location) # <<<<<<<<<<<<<<
  4279. *
  4280. * if self.mode_ is Lexer.MODE_FILENAME_:
  4281. */
  4282. __Pyx_XDECREF(__pyx_r);
  4283. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  4284. __Pyx_GOTREF(__pyx_t_2);
  4285. __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)
  4286. __Pyx_GOTREF(__pyx_t_1);
  4287. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4288. __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)
  4289. __Pyx_GOTREF(__pyx_t_2);
  4290. __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)
  4291. __Pyx_GOTREF(__pyx_t_3);
  4292. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4293. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
  4294. __Pyx_GOTREF(__pyx_t_2);
  4295. __Pyx_GIVEREF(__pyx_t_1);
  4296. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
  4297. __Pyx_GIVEREF(__pyx_t_3);
  4298. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
  4299. __Pyx_INCREF(__pyx_v_location);
  4300. __Pyx_GIVEREF(__pyx_v_location);
  4301. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
  4302. __pyx_t_1 = 0;
  4303. __pyx_t_3 = 0;
  4304. __pyx_r = __pyx_t_2;
  4305. __pyx_t_2 = 0;
  4306. goto __pyx_L0;
  4307. /* "fontTools/feaLib/lexer.py":89
  4308. * self.line_start_ = self.pos_
  4309. * return (Lexer.NEWLINE, None, location)
  4310. * if cur_char == "#": # <<<<<<<<<<<<<<
  4311. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  4312. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4313. */
  4314. }
  4315. /* "fontTools/feaLib/lexer.py":93
  4316. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4317. *
  4318. * if self.mode_ is Lexer.MODE_FILENAME_: # <<<<<<<<<<<<<<
  4319. * if cur_char != "(":
  4320. * raise FeatureLibError("Expected '(' before file name", location)
  4321. */
  4322. __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)
  4323. __Pyx_GOTREF(__pyx_t_2);
  4324. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
  4325. __Pyx_GOTREF(__pyx_t_3);
  4326. __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)
  4327. __Pyx_GOTREF(__pyx_t_1);
  4328. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4329. __pyx_t_7 = (__pyx_t_2 == __pyx_t_1);
  4330. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4331. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4332. if (__pyx_t_7) {
  4333. /* "fontTools/feaLib/lexer.py":94
  4334. *
  4335. * if self.mode_ is Lexer.MODE_FILENAME_:
  4336. * if cur_char != "(": # <<<<<<<<<<<<<<
  4337. * raise FeatureLibError("Expected '(' before file name", location)
  4338. * self.scan_until_(")")
  4339. */
  4340. __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)
  4341. if (unlikely(__pyx_t_7)) {
  4342. /* "fontTools/feaLib/lexer.py":95
  4343. * if self.mode_ is Lexer.MODE_FILENAME_:
  4344. * if cur_char != "(":
  4345. * raise FeatureLibError("Expected '(' before file name", location) # <<<<<<<<<<<<<<
  4346. * self.scan_until_(")")
  4347. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4348. */
  4349. __pyx_t_2 = NULL;
  4350. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
  4351. __Pyx_GOTREF(__pyx_t_3);
  4352. __pyx_t_5 = 1;
  4353. #if CYTHON_UNPACK_METHODS
  4354. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  4355. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  4356. assert(__pyx_t_2);
  4357. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4358. __Pyx_INCREF(__pyx_t_2);
  4359. __Pyx_INCREF(__pyx__function);
  4360. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  4361. __pyx_t_5 = 0;
  4362. }
  4363. #endif
  4364. {
  4365. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_before_file_name, __pyx_v_location};
  4366. __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));
  4367. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4368. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4369. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  4370. __Pyx_GOTREF(__pyx_t_1);
  4371. }
  4372. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  4373. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4374. __PYX_ERR(0, 95, __pyx_L1_error)
  4375. /* "fontTools/feaLib/lexer.py":94
  4376. *
  4377. * if self.mode_ is Lexer.MODE_FILENAME_:
  4378. * if cur_char != "(": # <<<<<<<<<<<<<<
  4379. * raise FeatureLibError("Expected '(' before file name", location)
  4380. * self.scan_until_(")")
  4381. */
  4382. }
  4383. /* "fontTools/feaLib/lexer.py":96
  4384. * if cur_char != "(":
  4385. * raise FeatureLibError("Expected '(' before file name", location)
  4386. * self.scan_until_(")") # <<<<<<<<<<<<<<
  4387. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4388. * if cur_char != ")":
  4389. */
  4390. __pyx_t_3 = __pyx_v_self;
  4391. __Pyx_INCREF(__pyx_t_3);
  4392. __pyx_t_5 = 0;
  4393. {
  4394. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__5};
  4395. __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));
  4396. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4397. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
  4398. __Pyx_GOTREF(__pyx_t_1);
  4399. }
  4400. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4401. /* "fontTools/feaLib/lexer.py":97
  4402. * raise FeatureLibError("Expected '(' before file name", location)
  4403. * self.scan_until_(")")
  4404. * cur_char = text[self.pos_] if self.pos_ < limit else None # <<<<<<<<<<<<<<
  4405. * if cur_char != ")":
  4406. * raise FeatureLibError("Expected ')' after file name", location)
  4407. */
  4408. __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)
  4409. __Pyx_GOTREF(__pyx_t_3);
  4410. __pyx_t_2 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  4411. __Pyx_GOTREF(__pyx_t_2);
  4412. __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)
  4413. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4414. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4415. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 97, __pyx_L1_error)
  4416. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4417. if (__pyx_t_7) {
  4418. __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)
  4419. __Pyx_GOTREF(__pyx_t_4);
  4420. __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)
  4421. __Pyx_GOTREF(__pyx_t_2);
  4422. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4423. __pyx_t_1 = __pyx_t_2;
  4424. __pyx_t_2 = 0;
  4425. } else {
  4426. __Pyx_INCREF(Py_None);
  4427. __pyx_t_1 = Py_None;
  4428. }
  4429. __Pyx_DECREF_SET(__pyx_v_cur_char, __pyx_t_1);
  4430. __pyx_t_1 = 0;
  4431. /* "fontTools/feaLib/lexer.py":98
  4432. * self.scan_until_(")")
  4433. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4434. * if cur_char != ")": # <<<<<<<<<<<<<<
  4435. * raise FeatureLibError("Expected ')' after file name", location)
  4436. * self.pos_ += 1
  4437. */
  4438. __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)
  4439. if (unlikely(__pyx_t_7)) {
  4440. /* "fontTools/feaLib/lexer.py":99
  4441. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4442. * if cur_char != ")":
  4443. * raise FeatureLibError("Expected ')' after file name", location) # <<<<<<<<<<<<<<
  4444. * self.pos_ += 1
  4445. * self.mode_ = Lexer.MODE_NORMAL_
  4446. */
  4447. __pyx_t_2 = NULL;
  4448. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
  4449. __Pyx_GOTREF(__pyx_t_4);
  4450. __pyx_t_5 = 1;
  4451. #if CYTHON_UNPACK_METHODS
  4452. if (unlikely(PyMethod_Check(__pyx_t_4))) {
  4453. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
  4454. assert(__pyx_t_2);
  4455. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
  4456. __Pyx_INCREF(__pyx_t_2);
  4457. __Pyx_INCREF(__pyx__function);
  4458. __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
  4459. __pyx_t_5 = 0;
  4460. }
  4461. #endif
  4462. {
  4463. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_after_file_name, __pyx_v_location};
  4464. __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));
  4465. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4466. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4467. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
  4468. __Pyx_GOTREF(__pyx_t_1);
  4469. }
  4470. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  4471. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4472. __PYX_ERR(0, 99, __pyx_L1_error)
  4473. /* "fontTools/feaLib/lexer.py":98
  4474. * self.scan_until_(")")
  4475. * cur_char = text[self.pos_] if self.pos_ < limit else None
  4476. * if cur_char != ")": # <<<<<<<<<<<<<<
  4477. * raise FeatureLibError("Expected ')' after file name", location)
  4478. * self.pos_ += 1
  4479. */
  4480. }
  4481. /* "fontTools/feaLib/lexer.py":100
  4482. * if cur_char != ")":
  4483. * raise FeatureLibError("Expected ')' after file name", location)
  4484. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4485. * self.mode_ = Lexer.MODE_NORMAL_
  4486. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
  4487. */
  4488. __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)
  4489. __Pyx_GOTREF(__pyx_t_1);
  4490. __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)
  4491. __Pyx_GOTREF(__pyx_t_4);
  4492. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4493. 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)
  4494. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4495. /* "fontTools/feaLib/lexer.py":101
  4496. * raise FeatureLibError("Expected ')' after file name", location)
  4497. * self.pos_ += 1
  4498. * self.mode_ = Lexer.MODE_NORMAL_ # <<<<<<<<<<<<<<
  4499. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
  4500. *
  4501. */
  4502. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  4503. __Pyx_GOTREF(__pyx_t_4);
  4504. __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)
  4505. __Pyx_GOTREF(__pyx_t_1);
  4506. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4507. 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)
  4508. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4509. /* "fontTools/feaLib/lexer.py":102
  4510. * self.pos_ += 1
  4511. * self.mode_ = Lexer.MODE_NORMAL_
  4512. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location) # <<<<<<<<<<<<<<
  4513. *
  4514. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_:
  4515. */
  4516. __Pyx_XDECREF(__pyx_r);
  4517. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
  4518. __Pyx_GOTREF(__pyx_t_1);
  4519. __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)
  4520. __Pyx_GOTREF(__pyx_t_4);
  4521. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4522. __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)
  4523. __Pyx_GOTREF(__pyx_t_1);
  4524. __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)
  4525. __Pyx_GOTREF(__pyx_t_2);
  4526. __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)
  4527. __Pyx_GOTREF(__pyx_t_3);
  4528. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4529. __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)
  4530. __Pyx_GOTREF(__pyx_t_2);
  4531. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4532. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4533. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
  4534. __Pyx_GOTREF(__pyx_t_3);
  4535. __Pyx_GIVEREF(__pyx_t_4);
  4536. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 102, __pyx_L1_error);
  4537. __Pyx_GIVEREF(__pyx_t_2);
  4538. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 102, __pyx_L1_error);
  4539. __Pyx_INCREF(__pyx_v_location);
  4540. __Pyx_GIVEREF(__pyx_v_location);
  4541. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 102, __pyx_L1_error);
  4542. __pyx_t_4 = 0;
  4543. __pyx_t_2 = 0;
  4544. __pyx_r = __pyx_t_3;
  4545. __pyx_t_3 = 0;
  4546. goto __pyx_L0;
  4547. /* "fontTools/feaLib/lexer.py":93
  4548. * return (Lexer.COMMENT, text[start : self.pos_], location)
  4549. *
  4550. * if self.mode_ is Lexer.MODE_FILENAME_: # <<<<<<<<<<<<<<
  4551. * if cur_char != "(":
  4552. * raise FeatureLibError("Expected '(' before file name", location)
  4553. */
  4554. }
  4555. /* "fontTools/feaLib/lexer.py":104
  4556. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
  4557. *
  4558. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  4559. * self.pos_ += 1
  4560. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4561. */
  4562. __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)
  4563. if (__pyx_t_8) {
  4564. } else {
  4565. __pyx_t_7 = __pyx_t_8;
  4566. goto __pyx_L11_bool_binop_done;
  4567. }
  4568. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  4569. __Pyx_GOTREF(__pyx_t_3);
  4570. __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)
  4571. __Pyx_GOTREF(__pyx_t_2);
  4572. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4573. __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)
  4574. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4575. __pyx_t_7 = __pyx_t_8;
  4576. __pyx_L11_bool_binop_done:;
  4577. if (__pyx_t_7) {
  4578. /* "fontTools/feaLib/lexer.py":105
  4579. *
  4580. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_:
  4581. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4582. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4583. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4584. */
  4585. __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)
  4586. __Pyx_GOTREF(__pyx_t_2);
  4587. __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)
  4588. __Pyx_GOTREF(__pyx_t_3);
  4589. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4590. 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)
  4591. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4592. /* "fontTools/feaLib/lexer.py":106
  4593. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_:
  4594. * self.pos_ += 1
  4595. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  4596. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4597. * if cur_char == "@":
  4598. */
  4599. __pyx_t_2 = __pyx_v_self;
  4600. __Pyx_INCREF(__pyx_t_2);
  4601. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error)
  4602. __Pyx_GOTREF(__pyx_t_4);
  4603. __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)
  4604. __Pyx_GOTREF(__pyx_t_1);
  4605. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4606. __pyx_t_5 = 0;
  4607. {
  4608. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
  4609. __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));
  4610. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4611. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4612. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
  4613. __Pyx_GOTREF(__pyx_t_3);
  4614. }
  4615. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4616. /* "fontTools/feaLib/lexer.py":107
  4617. * self.pos_ += 1
  4618. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4619. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location) # <<<<<<<<<<<<<<
  4620. * if cur_char == "@":
  4621. * self.pos_ += 1
  4622. */
  4623. __Pyx_XDECREF(__pyx_r);
  4624. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  4625. __Pyx_GOTREF(__pyx_t_3);
  4626. __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)
  4627. __Pyx_GOTREF(__pyx_t_1);
  4628. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4629. __pyx_t_2 = NULL;
  4630. __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)
  4631. __Pyx_GOTREF(__pyx_t_4);
  4632. __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)
  4633. __Pyx_GOTREF(__pyx_t_9);
  4634. __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)
  4635. __Pyx_GOTREF(__pyx_t_10);
  4636. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4637. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  4638. __pyx_t_5 = 1;
  4639. {
  4640. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_10, __pyx_mstate_global->__pyx_int_10};
  4641. __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));
  4642. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4643. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4644. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  4645. __Pyx_GOTREF(__pyx_t_3);
  4646. }
  4647. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 107, __pyx_L1_error)
  4648. __Pyx_GOTREF(__pyx_t_10);
  4649. __Pyx_GIVEREF(__pyx_t_1);
  4650. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 107, __pyx_L1_error);
  4651. __Pyx_GIVEREF(__pyx_t_3);
  4652. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 107, __pyx_L1_error);
  4653. __Pyx_INCREF(__pyx_v_location);
  4654. __Pyx_GIVEREF(__pyx_v_location);
  4655. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 107, __pyx_L1_error);
  4656. __pyx_t_1 = 0;
  4657. __pyx_t_3 = 0;
  4658. __pyx_r = __pyx_t_10;
  4659. __pyx_t_10 = 0;
  4660. goto __pyx_L0;
  4661. /* "fontTools/feaLib/lexer.py":104
  4662. * return (Lexer.FILENAME, text[start + 1 : self.pos_ - 1], location)
  4663. *
  4664. * if cur_char == "\\" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  4665. * self.pos_ += 1
  4666. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4667. */
  4668. }
  4669. /* "fontTools/feaLib/lexer.py":108
  4670. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4671. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4672. * if cur_char == "@": # <<<<<<<<<<<<<<
  4673. * self.pos_ += 1
  4674. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4675. */
  4676. __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)
  4677. if (__pyx_t_7) {
  4678. /* "fontTools/feaLib/lexer.py":109
  4679. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4680. * if cur_char == "@":
  4681. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4682. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4683. * glyphclass = text[start + 1 : self.pos_]
  4684. */
  4685. __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)
  4686. __Pyx_GOTREF(__pyx_t_10);
  4687. __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)
  4688. __Pyx_GOTREF(__pyx_t_3);
  4689. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4690. 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)
  4691. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4692. /* "fontTools/feaLib/lexer.py":110
  4693. * if cur_char == "@":
  4694. * self.pos_ += 1
  4695. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_) # <<<<<<<<<<<<<<
  4696. * glyphclass = text[start + 1 : self.pos_]
  4697. * if len(glyphclass) < 1:
  4698. */
  4699. __pyx_t_10 = __pyx_v_self;
  4700. __Pyx_INCREF(__pyx_t_10);
  4701. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
  4702. __Pyx_GOTREF(__pyx_t_1);
  4703. __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)
  4704. __Pyx_GOTREF(__pyx_t_2);
  4705. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4706. __pyx_t_5 = 0;
  4707. {
  4708. PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2};
  4709. __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));
  4710. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  4711. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4712. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
  4713. __Pyx_GOTREF(__pyx_t_3);
  4714. }
  4715. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4716. /* "fontTools/feaLib/lexer.py":111
  4717. * self.pos_ += 1
  4718. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4719. * glyphclass = text[start + 1 : self.pos_] # <<<<<<<<<<<<<<
  4720. * if len(glyphclass) < 1:
  4721. * raise FeatureLibError("Expected glyph class name", location)
  4722. */
  4723. __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)
  4724. __Pyx_GOTREF(__pyx_t_3);
  4725. __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)
  4726. __Pyx_GOTREF(__pyx_t_2);
  4727. __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)
  4728. __Pyx_GOTREF(__pyx_t_10);
  4729. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4730. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4731. __pyx_v_glyphclass = __pyx_t_10;
  4732. __pyx_t_10 = 0;
  4733. /* "fontTools/feaLib/lexer.py":112
  4734. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  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. */
  4740. __pyx_t_6 = PyObject_Length(__pyx_v_glyphclass); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 112, __pyx_L1_error)
  4741. __pyx_t_7 = (__pyx_t_6 < 1);
  4742. if (unlikely(__pyx_t_7)) {
  4743. /* "fontTools/feaLib/lexer.py":113
  4744. * glyphclass = text[start + 1 : self.pos_]
  4745. * if len(glyphclass) < 1:
  4746. * raise FeatureLibError("Expected glyph class name", location) # <<<<<<<<<<<<<<
  4747. * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
  4748. * raise FeatureLibError(
  4749. */
  4750. __pyx_t_2 = NULL;
  4751. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
  4752. __Pyx_GOTREF(__pyx_t_3);
  4753. __pyx_t_5 = 1;
  4754. #if CYTHON_UNPACK_METHODS
  4755. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  4756. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
  4757. assert(__pyx_t_2);
  4758. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4759. __Pyx_INCREF(__pyx_t_2);
  4760. __Pyx_INCREF(__pyx__function);
  4761. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  4762. __pyx_t_5 = 0;
  4763. }
  4764. #endif
  4765. {
  4766. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Expected_glyph_class_name, __pyx_v_location};
  4767. __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));
  4768. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  4769. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4770. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 113, __pyx_L1_error)
  4771. __Pyx_GOTREF(__pyx_t_10);
  4772. }
  4773. __Pyx_Raise(__pyx_t_10, 0, 0, 0);
  4774. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4775. __PYX_ERR(0, 113, __pyx_L1_error)
  4776. /* "fontTools/feaLib/lexer.py":112
  4777. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4778. * glyphclass = text[start + 1 : self.pos_]
  4779. * if len(glyphclass) < 1: # <<<<<<<<<<<<<<
  4780. * raise FeatureLibError("Expected glyph class name", location)
  4781. * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
  4782. */
  4783. }
  4784. /* "fontTools/feaLib/lexer.py":114
  4785. * if len(glyphclass) < 1:
  4786. * raise FeatureLibError("Expected glyph class name", location)
  4787. * if not Lexer.RE_GLYPHCLASS.match(glyphclass): # <<<<<<<<<<<<<<
  4788. * raise FeatureLibError(
  4789. * "Glyph class names must consist of letters, digits, "
  4790. */
  4791. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
  4792. __Pyx_GOTREF(__pyx_t_2);
  4793. __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)
  4794. __Pyx_GOTREF(__pyx_t_1);
  4795. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4796. __pyx_t_3 = __pyx_t_1;
  4797. __Pyx_INCREF(__pyx_t_3);
  4798. __pyx_t_5 = 0;
  4799. {
  4800. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_glyphclass};
  4801. __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));
  4802. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4803. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4804. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 114, __pyx_L1_error)
  4805. __Pyx_GOTREF(__pyx_t_10);
  4806. }
  4807. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 114, __pyx_L1_error)
  4808. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4809. __pyx_t_8 = (!__pyx_t_7);
  4810. if (unlikely(__pyx_t_8)) {
  4811. /* "fontTools/feaLib/lexer.py":115
  4812. * raise FeatureLibError("Expected glyph class name", location)
  4813. * if not Lexer.RE_GLYPHCLASS.match(glyphclass):
  4814. * raise FeatureLibError( # <<<<<<<<<<<<<<
  4815. * "Glyph class names must consist of letters, digits, "
  4816. * "underscore, period or hyphen",
  4817. */
  4818. __pyx_t_1 = NULL;
  4819. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
  4820. __Pyx_GOTREF(__pyx_t_3);
  4821. /* "fontTools/feaLib/lexer.py":118
  4822. * "Glyph class names must consist of letters, digits, "
  4823. * "underscore, period or hyphen",
  4824. * location, # <<<<<<<<<<<<<<
  4825. * )
  4826. * return (Lexer.GLYPHCLASS, glyphclass, location)
  4827. */
  4828. __pyx_t_5 = 1;
  4829. #if CYTHON_UNPACK_METHODS
  4830. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  4831. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
  4832. assert(__pyx_t_1);
  4833. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  4834. __Pyx_INCREF(__pyx_t_1);
  4835. __Pyx_INCREF(__pyx__function);
  4836. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  4837. __pyx_t_5 = 0;
  4838. }
  4839. #endif
  4840. {
  4841. PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Glyph_class_names_must_consist_o, __pyx_v_location};
  4842. __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));
  4843. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  4844. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4845. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 115, __pyx_L1_error)
  4846. __Pyx_GOTREF(__pyx_t_10);
  4847. }
  4848. __Pyx_Raise(__pyx_t_10, 0, 0, 0);
  4849. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4850. __PYX_ERR(0, 115, __pyx_L1_error)
  4851. /* "fontTools/feaLib/lexer.py":114
  4852. * if len(glyphclass) < 1:
  4853. * raise FeatureLibError("Expected glyph class name", location)
  4854. * if not Lexer.RE_GLYPHCLASS.match(glyphclass): # <<<<<<<<<<<<<<
  4855. * raise FeatureLibError(
  4856. * "Glyph class names must consist of letters, digits, "
  4857. */
  4858. }
  4859. /* "fontTools/feaLib/lexer.py":120
  4860. * location,
  4861. * )
  4862. * return (Lexer.GLYPHCLASS, glyphclass, location) # <<<<<<<<<<<<<<
  4863. * if cur_char in Lexer.CHAR_NAME_START_:
  4864. * self.pos_ += 1
  4865. */
  4866. __Pyx_XDECREF(__pyx_r);
  4867. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 120, __pyx_L1_error)
  4868. __Pyx_GOTREF(__pyx_t_10);
  4869. __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)
  4870. __Pyx_GOTREF(__pyx_t_3);
  4871. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4872. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 120, __pyx_L1_error)
  4873. __Pyx_GOTREF(__pyx_t_10);
  4874. __Pyx_GIVEREF(__pyx_t_3);
  4875. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 120, __pyx_L1_error);
  4876. __Pyx_INCREF(__pyx_v_glyphclass);
  4877. __Pyx_GIVEREF(__pyx_v_glyphclass);
  4878. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_glyphclass) != (0)) __PYX_ERR(0, 120, __pyx_L1_error);
  4879. __Pyx_INCREF(__pyx_v_location);
  4880. __Pyx_GIVEREF(__pyx_v_location);
  4881. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 120, __pyx_L1_error);
  4882. __pyx_t_3 = 0;
  4883. __pyx_r = __pyx_t_10;
  4884. __pyx_t_10 = 0;
  4885. goto __pyx_L0;
  4886. /* "fontTools/feaLib/lexer.py":108
  4887. * self.scan_over_(Lexer.CHAR_DIGIT_)
  4888. * return (Lexer.CID, int(text[start + 1 : self.pos_], 10), location)
  4889. * if cur_char == "@": # <<<<<<<<<<<<<<
  4890. * self.pos_ += 1
  4891. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4892. */
  4893. }
  4894. /* "fontTools/feaLib/lexer.py":121
  4895. * )
  4896. * return (Lexer.GLYPHCLASS, glyphclass, location)
  4897. * if cur_char in Lexer.CHAR_NAME_START_: # <<<<<<<<<<<<<<
  4898. * self.pos_ += 1
  4899. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4900. */
  4901. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 121, __pyx_L1_error)
  4902. __Pyx_GOTREF(__pyx_t_10);
  4903. __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)
  4904. __Pyx_GOTREF(__pyx_t_3);
  4905. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4906. __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)
  4907. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4908. if (__pyx_t_8) {
  4909. /* "fontTools/feaLib/lexer.py":122
  4910. * return (Lexer.GLYPHCLASS, glyphclass, location)
  4911. * if cur_char in Lexer.CHAR_NAME_START_:
  4912. * self.pos_ += 1 # <<<<<<<<<<<<<<
  4913. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4914. * token = text[start : self.pos_]
  4915. */
  4916. __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)
  4917. __Pyx_GOTREF(__pyx_t_3);
  4918. __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)
  4919. __Pyx_GOTREF(__pyx_t_10);
  4920. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4921. 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)
  4922. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4923. /* "fontTools/feaLib/lexer.py":123
  4924. * if cur_char in Lexer.CHAR_NAME_START_:
  4925. * self.pos_ += 1
  4926. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_) # <<<<<<<<<<<<<<
  4927. * token = text[start : self.pos_]
  4928. * if token == "include":
  4929. */
  4930. __pyx_t_3 = __pyx_v_self;
  4931. __Pyx_INCREF(__pyx_t_3);
  4932. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  4933. __Pyx_GOTREF(__pyx_t_1);
  4934. __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)
  4935. __Pyx_GOTREF(__pyx_t_2);
  4936. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4937. __pyx_t_5 = 0;
  4938. {
  4939. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
  4940. __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));
  4941. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  4942. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4943. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 123, __pyx_L1_error)
  4944. __Pyx_GOTREF(__pyx_t_10);
  4945. }
  4946. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4947. /* "fontTools/feaLib/lexer.py":124
  4948. * self.pos_ += 1
  4949. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4950. * token = text[start : self.pos_] # <<<<<<<<<<<<<<
  4951. * if token == "include":
  4952. * self.mode_ = Lexer.MODE_FILENAME_
  4953. */
  4954. __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)
  4955. __Pyx_GOTREF(__pyx_t_10);
  4956. __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)
  4957. __Pyx_GOTREF(__pyx_t_2);
  4958. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4959. __pyx_v_token = __pyx_t_2;
  4960. __pyx_t_2 = 0;
  4961. /* "fontTools/feaLib/lexer.py":125
  4962. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4963. * token = text[start : self.pos_]
  4964. * if token == "include": # <<<<<<<<<<<<<<
  4965. * self.mode_ = Lexer.MODE_FILENAME_
  4966. * return (Lexer.NAME, token, location)
  4967. */
  4968. __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)
  4969. if (__pyx_t_8) {
  4970. /* "fontTools/feaLib/lexer.py":126
  4971. * token = text[start : self.pos_]
  4972. * if token == "include":
  4973. * self.mode_ = Lexer.MODE_FILENAME_ # <<<<<<<<<<<<<<
  4974. * return (Lexer.NAME, token, location)
  4975. * if cur_char == "0" and next_char in "xX":
  4976. */
  4977. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
  4978. __Pyx_GOTREF(__pyx_t_2);
  4979. __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)
  4980. __Pyx_GOTREF(__pyx_t_10);
  4981. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4982. 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)
  4983. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  4984. /* "fontTools/feaLib/lexer.py":125
  4985. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  4986. * token = text[start : self.pos_]
  4987. * if token == "include": # <<<<<<<<<<<<<<
  4988. * self.mode_ = Lexer.MODE_FILENAME_
  4989. * return (Lexer.NAME, token, location)
  4990. */
  4991. }
  4992. /* "fontTools/feaLib/lexer.py":127
  4993. * if token == "include":
  4994. * self.mode_ = Lexer.MODE_FILENAME_
  4995. * return (Lexer.NAME, token, location) # <<<<<<<<<<<<<<
  4996. * if cur_char == "0" and next_char in "xX":
  4997. * self.pos_ += 2
  4998. */
  4999. __Pyx_XDECREF(__pyx_r);
  5000. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 127, __pyx_L1_error)
  5001. __Pyx_GOTREF(__pyx_t_10);
  5002. __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)
  5003. __Pyx_GOTREF(__pyx_t_2);
  5004. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5005. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 127, __pyx_L1_error)
  5006. __Pyx_GOTREF(__pyx_t_10);
  5007. __Pyx_GIVEREF(__pyx_t_2);
  5008. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 127, __pyx_L1_error);
  5009. __Pyx_INCREF(__pyx_v_token);
  5010. __Pyx_GIVEREF(__pyx_v_token);
  5011. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_token) != (0)) __PYX_ERR(0, 127, __pyx_L1_error);
  5012. __Pyx_INCREF(__pyx_v_location);
  5013. __Pyx_GIVEREF(__pyx_v_location);
  5014. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 127, __pyx_L1_error);
  5015. __pyx_t_2 = 0;
  5016. __pyx_r = __pyx_t_10;
  5017. __pyx_t_10 = 0;
  5018. goto __pyx_L0;
  5019. /* "fontTools/feaLib/lexer.py":121
  5020. * )
  5021. * return (Lexer.GLYPHCLASS, glyphclass, location)
  5022. * if cur_char in Lexer.CHAR_NAME_START_: # <<<<<<<<<<<<<<
  5023. * self.pos_ += 1
  5024. * self.scan_over_(Lexer.CHAR_NAME_CONTINUATION_)
  5025. */
  5026. }
  5027. /* "fontTools/feaLib/lexer.py":128
  5028. * self.mode_ = Lexer.MODE_FILENAME_
  5029. * return (Lexer.NAME, token, location)
  5030. * if cur_char == "0" and next_char in "xX": # <<<<<<<<<<<<<<
  5031. * self.pos_ += 2
  5032. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5033. */
  5034. __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)
  5035. if (__pyx_t_7) {
  5036. } else {
  5037. __pyx_t_8 = __pyx_t_7;
  5038. goto __pyx_L19_bool_binop_done;
  5039. }
  5040. __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)
  5041. __pyx_t_8 = __pyx_t_7;
  5042. __pyx_L19_bool_binop_done:;
  5043. if (__pyx_t_8) {
  5044. /* "fontTools/feaLib/lexer.py":129
  5045. * return (Lexer.NAME, token, location)
  5046. * if cur_char == "0" and next_char in "xX":
  5047. * self.pos_ += 2 # <<<<<<<<<<<<<<
  5048. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5049. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5050. */
  5051. __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)
  5052. __Pyx_GOTREF(__pyx_t_10);
  5053. __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)
  5054. __Pyx_GOTREF(__pyx_t_2);
  5055. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5056. 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)
  5057. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5058. /* "fontTools/feaLib/lexer.py":130
  5059. * if cur_char == "0" and next_char in "xX":
  5060. * self.pos_ += 2
  5061. * self.scan_over_(Lexer.CHAR_HEXDIGIT_) # <<<<<<<<<<<<<<
  5062. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5063. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
  5064. */
  5065. __pyx_t_10 = __pyx_v_self;
  5066. __Pyx_INCREF(__pyx_t_10);
  5067. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  5068. __Pyx_GOTREF(__pyx_t_3);
  5069. __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)
  5070. __Pyx_GOTREF(__pyx_t_1);
  5071. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5072. __pyx_t_5 = 0;
  5073. {
  5074. PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_1};
  5075. __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));
  5076. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  5077. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5078. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
  5079. __Pyx_GOTREF(__pyx_t_2);
  5080. }
  5081. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5082. /* "fontTools/feaLib/lexer.py":131
  5083. * self.pos_ += 2
  5084. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5085. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location) # <<<<<<<<<<<<<<
  5086. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
  5087. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5088. */
  5089. __Pyx_XDECREF(__pyx_r);
  5090. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
  5091. __Pyx_GOTREF(__pyx_t_2);
  5092. __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)
  5093. __Pyx_GOTREF(__pyx_t_1);
  5094. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5095. __pyx_t_10 = NULL;
  5096. __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)
  5097. __Pyx_GOTREF(__pyx_t_3);
  5098. __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)
  5099. __Pyx_GOTREF(__pyx_t_9);
  5100. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5101. __pyx_t_5 = 1;
  5102. {
  5103. PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_t_9, __pyx_mstate_global->__pyx_int_16};
  5104. __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));
  5105. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  5106. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5107. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
  5108. __Pyx_GOTREF(__pyx_t_2);
  5109. }
  5110. __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error)
  5111. __Pyx_GOTREF(__pyx_t_9);
  5112. __Pyx_GIVEREF(__pyx_t_1);
  5113. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 131, __pyx_L1_error);
  5114. __Pyx_GIVEREF(__pyx_t_2);
  5115. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 131, __pyx_L1_error);
  5116. __Pyx_INCREF(__pyx_v_location);
  5117. __Pyx_GIVEREF(__pyx_v_location);
  5118. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 131, __pyx_L1_error);
  5119. __pyx_t_1 = 0;
  5120. __pyx_t_2 = 0;
  5121. __pyx_r = __pyx_t_9;
  5122. __pyx_t_9 = 0;
  5123. goto __pyx_L0;
  5124. /* "fontTools/feaLib/lexer.py":128
  5125. * self.mode_ = Lexer.MODE_FILENAME_
  5126. * return (Lexer.NAME, token, location)
  5127. * if cur_char == "0" and next_char in "xX": # <<<<<<<<<<<<<<
  5128. * self.pos_ += 2
  5129. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5130. */
  5131. }
  5132. /* "fontTools/feaLib/lexer.py":132
  5133. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5134. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5135. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5136. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5137. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5138. */
  5139. __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)
  5140. if (__pyx_t_7) {
  5141. } else {
  5142. __pyx_t_8 = __pyx_t_7;
  5143. goto __pyx_L22_bool_binop_done;
  5144. }
  5145. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L1_error)
  5146. __Pyx_GOTREF(__pyx_t_9);
  5147. __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)
  5148. __Pyx_GOTREF(__pyx_t_2);
  5149. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5150. __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)
  5151. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5152. __pyx_t_8 = __pyx_t_7;
  5153. __pyx_L22_bool_binop_done:;
  5154. if (__pyx_t_8) {
  5155. /* "fontTools/feaLib/lexer.py":133
  5156. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5157. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
  5158. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5159. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5160. * if cur_char in Lexer.CHAR_DIGIT_:
  5161. */
  5162. __pyx_t_9 = __pyx_v_self;
  5163. __Pyx_INCREF(__pyx_t_9);
  5164. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
  5165. __Pyx_GOTREF(__pyx_t_1);
  5166. __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)
  5167. __Pyx_GOTREF(__pyx_t_10);
  5168. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5169. __pyx_t_5 = 0;
  5170. {
  5171. PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_10};
  5172. __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));
  5173. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5174. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5175. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
  5176. __Pyx_GOTREF(__pyx_t_2);
  5177. }
  5178. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5179. /* "fontTools/feaLib/lexer.py":134
  5180. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_:
  5181. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5182. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location) # <<<<<<<<<<<<<<
  5183. * if cur_char in Lexer.CHAR_DIGIT_:
  5184. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5185. */
  5186. __Pyx_XDECREF(__pyx_r);
  5187. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
  5188. __Pyx_GOTREF(__pyx_t_2);
  5189. __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)
  5190. __Pyx_GOTREF(__pyx_t_10);
  5191. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5192. __pyx_t_9 = NULL;
  5193. __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)
  5194. __Pyx_GOTREF(__pyx_t_1);
  5195. __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)
  5196. __Pyx_GOTREF(__pyx_t_3);
  5197. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5198. __pyx_t_5 = 1;
  5199. {
  5200. PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_3, __pyx_mstate_global->__pyx_int_8};
  5201. __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));
  5202. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5203. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5204. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
  5205. __Pyx_GOTREF(__pyx_t_2);
  5206. }
  5207. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
  5208. __Pyx_GOTREF(__pyx_t_3);
  5209. __Pyx_GIVEREF(__pyx_t_10);
  5210. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 134, __pyx_L1_error);
  5211. __Pyx_GIVEREF(__pyx_t_2);
  5212. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 134, __pyx_L1_error);
  5213. __Pyx_INCREF(__pyx_v_location);
  5214. __Pyx_GIVEREF(__pyx_v_location);
  5215. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 134, __pyx_L1_error);
  5216. __pyx_t_10 = 0;
  5217. __pyx_t_2 = 0;
  5218. __pyx_r = __pyx_t_3;
  5219. __pyx_t_3 = 0;
  5220. goto __pyx_L0;
  5221. /* "fontTools/feaLib/lexer.py":132
  5222. * self.scan_over_(Lexer.CHAR_HEXDIGIT_)
  5223. * return (Lexer.HEXADECIMAL, int(text[start : self.pos_], 16), location)
  5224. * if cur_char == "0" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5225. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5226. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5227. */
  5228. }
  5229. /* "fontTools/feaLib/lexer.py":135
  5230. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5231. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5232. * if cur_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5233. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5234. * if self.pos_ >= limit or text[self.pos_] != ".":
  5235. */
  5236. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
  5237. __Pyx_GOTREF(__pyx_t_3);
  5238. __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)
  5239. __Pyx_GOTREF(__pyx_t_2);
  5240. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5241. __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)
  5242. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5243. if (__pyx_t_8) {
  5244. /* "fontTools/feaLib/lexer.py":136
  5245. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5246. * if cur_char in Lexer.CHAR_DIGIT_:
  5247. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5248. * if self.pos_ >= limit or text[self.pos_] != ".":
  5249. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5250. */
  5251. __pyx_t_3 = __pyx_v_self;
  5252. __Pyx_INCREF(__pyx_t_3);
  5253. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 136, __pyx_L1_error)
  5254. __Pyx_GOTREF(__pyx_t_10);
  5255. __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)
  5256. __Pyx_GOTREF(__pyx_t_9);
  5257. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5258. __pyx_t_5 = 0;
  5259. {
  5260. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
  5261. __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));
  5262. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  5263. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5264. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
  5265. __Pyx_GOTREF(__pyx_t_2);
  5266. }
  5267. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5268. /* "fontTools/feaLib/lexer.py":137
  5269. * if cur_char in Lexer.CHAR_DIGIT_:
  5270. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5271. * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
  5272. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5273. * self.scan_over_(".")
  5274. */
  5275. __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)
  5276. __Pyx_GOTREF(__pyx_t_2);
  5277. __pyx_t_9 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error)
  5278. __Pyx_GOTREF(__pyx_t_9);
  5279. __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)
  5280. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5281. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5282. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 137, __pyx_L1_error)
  5283. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5284. if (!__pyx_t_7) {
  5285. } else {
  5286. __pyx_t_8 = __pyx_t_7;
  5287. goto __pyx_L26_bool_binop_done;
  5288. }
  5289. __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)
  5290. __Pyx_GOTREF(__pyx_t_3);
  5291. __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 137, __pyx_L1_error)
  5292. __Pyx_GOTREF(__pyx_t_9);
  5293. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5294. __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)
  5295. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5296. __pyx_t_8 = __pyx_t_7;
  5297. __pyx_L26_bool_binop_done:;
  5298. if (__pyx_t_8) {
  5299. /* "fontTools/feaLib/lexer.py":138
  5300. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5301. * if self.pos_ >= limit or text[self.pos_] != ".":
  5302. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location) # <<<<<<<<<<<<<<
  5303. * self.scan_over_(".")
  5304. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5305. */
  5306. __Pyx_XDECREF(__pyx_r);
  5307. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 138, __pyx_L1_error)
  5308. __Pyx_GOTREF(__pyx_t_9);
  5309. __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)
  5310. __Pyx_GOTREF(__pyx_t_3);
  5311. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5312. __pyx_t_2 = NULL;
  5313. __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)
  5314. __Pyx_GOTREF(__pyx_t_10);
  5315. __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)
  5316. __Pyx_GOTREF(__pyx_t_1);
  5317. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5318. __pyx_t_5 = 1;
  5319. {
  5320. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_1, __pyx_mstate_global->__pyx_int_10};
  5321. __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));
  5322. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  5323. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5324. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 138, __pyx_L1_error)
  5325. __Pyx_GOTREF(__pyx_t_9);
  5326. }
  5327. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
  5328. __Pyx_GOTREF(__pyx_t_1);
  5329. __Pyx_GIVEREF(__pyx_t_3);
  5330. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 138, __pyx_L1_error);
  5331. __Pyx_GIVEREF(__pyx_t_9);
  5332. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 138, __pyx_L1_error);
  5333. __Pyx_INCREF(__pyx_v_location);
  5334. __Pyx_GIVEREF(__pyx_v_location);
  5335. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 138, __pyx_L1_error);
  5336. __pyx_t_3 = 0;
  5337. __pyx_t_9 = 0;
  5338. __pyx_r = __pyx_t_1;
  5339. __pyx_t_1 = 0;
  5340. goto __pyx_L0;
  5341. /* "fontTools/feaLib/lexer.py":137
  5342. * if cur_char in Lexer.CHAR_DIGIT_:
  5343. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5344. * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
  5345. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5346. * self.scan_over_(".")
  5347. */
  5348. }
  5349. /* "fontTools/feaLib/lexer.py":139
  5350. * if self.pos_ >= limit or text[self.pos_] != ".":
  5351. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5352. * self.scan_over_(".") # <<<<<<<<<<<<<<
  5353. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5354. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5355. */
  5356. __pyx_t_9 = __pyx_v_self;
  5357. __Pyx_INCREF(__pyx_t_9);
  5358. __pyx_t_5 = 0;
  5359. {
  5360. PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u__8};
  5361. __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));
  5362. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5363. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
  5364. __Pyx_GOTREF(__pyx_t_1);
  5365. }
  5366. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5367. /* "fontTools/feaLib/lexer.py":140
  5368. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5369. * self.scan_over_(".")
  5370. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5371. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5372. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
  5373. */
  5374. __pyx_t_9 = __pyx_v_self;
  5375. __Pyx_INCREF(__pyx_t_9);
  5376. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
  5377. __Pyx_GOTREF(__pyx_t_3);
  5378. __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)
  5379. __Pyx_GOTREF(__pyx_t_2);
  5380. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5381. __pyx_t_5 = 0;
  5382. {
  5383. PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
  5384. __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));
  5385. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5386. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5387. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
  5388. __Pyx_GOTREF(__pyx_t_1);
  5389. }
  5390. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5391. /* "fontTools/feaLib/lexer.py":141
  5392. * self.scan_over_(".")
  5393. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5394. * return (Lexer.FLOAT, float(text[start : self.pos_]), location) # <<<<<<<<<<<<<<
  5395. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
  5396. * self.pos_ += 1
  5397. */
  5398. __Pyx_XDECREF(__pyx_r);
  5399. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  5400. __Pyx_GOTREF(__pyx_t_1);
  5401. __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)
  5402. __Pyx_GOTREF(__pyx_t_2);
  5403. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5404. __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)
  5405. __Pyx_GOTREF(__pyx_t_1);
  5406. __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)
  5407. __Pyx_GOTREF(__pyx_t_9);
  5408. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5409. __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  5410. __Pyx_GOTREF(__pyx_t_1);
  5411. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5412. __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L1_error)
  5413. __Pyx_GOTREF(__pyx_t_9);
  5414. __Pyx_GIVEREF(__pyx_t_2);
  5415. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 141, __pyx_L1_error);
  5416. __Pyx_GIVEREF(__pyx_t_1);
  5417. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 141, __pyx_L1_error);
  5418. __Pyx_INCREF(__pyx_v_location);
  5419. __Pyx_GIVEREF(__pyx_v_location);
  5420. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 141, __pyx_L1_error);
  5421. __pyx_t_2 = 0;
  5422. __pyx_t_1 = 0;
  5423. __pyx_r = __pyx_t_9;
  5424. __pyx_t_9 = 0;
  5425. goto __pyx_L0;
  5426. /* "fontTools/feaLib/lexer.py":135
  5427. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5428. * return (Lexer.OCTAL, int(text[start : self.pos_], 8), location)
  5429. * if cur_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5430. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5431. * if self.pos_ >= limit or text[self.pos_] != ".":
  5432. */
  5433. }
  5434. /* "fontTools/feaLib/lexer.py":142
  5435. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5436. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5437. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5438. * self.pos_ += 1
  5439. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5440. */
  5441. __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)
  5442. if (__pyx_t_7) {
  5443. } else {
  5444. __pyx_t_8 = __pyx_t_7;
  5445. goto __pyx_L29_bool_binop_done;
  5446. }
  5447. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 142, __pyx_L1_error)
  5448. __Pyx_GOTREF(__pyx_t_9);
  5449. __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)
  5450. __Pyx_GOTREF(__pyx_t_1);
  5451. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5452. __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)
  5453. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5454. __pyx_t_8 = __pyx_t_7;
  5455. __pyx_L29_bool_binop_done:;
  5456. if (__pyx_t_8) {
  5457. /* "fontTools/feaLib/lexer.py":143
  5458. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5459. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
  5460. * self.pos_ += 1 # <<<<<<<<<<<<<<
  5461. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5462. * if self.pos_ >= limit or text[self.pos_] != ".":
  5463. */
  5464. __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)
  5465. __Pyx_GOTREF(__pyx_t_1);
  5466. __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)
  5467. __Pyx_GOTREF(__pyx_t_9);
  5468. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5469. 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)
  5470. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5471. /* "fontTools/feaLib/lexer.py":144
  5472. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_:
  5473. * self.pos_ += 1
  5474. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5475. * if self.pos_ >= limit or text[self.pos_] != ".":
  5476. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5477. */
  5478. __pyx_t_1 = __pyx_v_self;
  5479. __Pyx_INCREF(__pyx_t_1);
  5480. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
  5481. __Pyx_GOTREF(__pyx_t_2);
  5482. __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)
  5483. __Pyx_GOTREF(__pyx_t_3);
  5484. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5485. __pyx_t_5 = 0;
  5486. {
  5487. PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
  5488. __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));
  5489. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  5490. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5491. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 144, __pyx_L1_error)
  5492. __Pyx_GOTREF(__pyx_t_9);
  5493. }
  5494. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5495. /* "fontTools/feaLib/lexer.py":145
  5496. * self.pos_ += 1
  5497. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5498. * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
  5499. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5500. * self.scan_over_(".")
  5501. */
  5502. __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)
  5503. __Pyx_GOTREF(__pyx_t_9);
  5504. __pyx_t_3 = PyLong_FromSsize_t(__pyx_v_limit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
  5505. __Pyx_GOTREF(__pyx_t_3);
  5506. __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)
  5507. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5508. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5509. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
  5510. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5511. if (!__pyx_t_7) {
  5512. } else {
  5513. __pyx_t_8 = __pyx_t_7;
  5514. goto __pyx_L32_bool_binop_done;
  5515. }
  5516. __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)
  5517. __Pyx_GOTREF(__pyx_t_1);
  5518. __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_text, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
  5519. __Pyx_GOTREF(__pyx_t_3);
  5520. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5521. __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)
  5522. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5523. __pyx_t_8 = __pyx_t_7;
  5524. __pyx_L32_bool_binop_done:;
  5525. if (__pyx_t_8) {
  5526. /* "fontTools/feaLib/lexer.py":146
  5527. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5528. * if self.pos_ >= limit or text[self.pos_] != ".":
  5529. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location) # <<<<<<<<<<<<<<
  5530. * self.scan_over_(".")
  5531. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5532. */
  5533. __Pyx_XDECREF(__pyx_r);
  5534. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
  5535. __Pyx_GOTREF(__pyx_t_3);
  5536. __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)
  5537. __Pyx_GOTREF(__pyx_t_1);
  5538. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5539. __pyx_t_9 = NULL;
  5540. __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)
  5541. __Pyx_GOTREF(__pyx_t_2);
  5542. __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)
  5543. __Pyx_GOTREF(__pyx_t_10);
  5544. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5545. __pyx_t_5 = 1;
  5546. {
  5547. PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_10, __pyx_mstate_global->__pyx_int_10};
  5548. __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));
  5549. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  5550. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5551. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
  5552. __Pyx_GOTREF(__pyx_t_3);
  5553. }
  5554. __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 146, __pyx_L1_error)
  5555. __Pyx_GOTREF(__pyx_t_10);
  5556. __Pyx_GIVEREF(__pyx_t_1);
  5557. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 146, __pyx_L1_error);
  5558. __Pyx_GIVEREF(__pyx_t_3);
  5559. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 146, __pyx_L1_error);
  5560. __Pyx_INCREF(__pyx_v_location);
  5561. __Pyx_GIVEREF(__pyx_v_location);
  5562. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 146, __pyx_L1_error);
  5563. __pyx_t_1 = 0;
  5564. __pyx_t_3 = 0;
  5565. __pyx_r = __pyx_t_10;
  5566. __pyx_t_10 = 0;
  5567. goto __pyx_L0;
  5568. /* "fontTools/feaLib/lexer.py":145
  5569. * self.pos_ += 1
  5570. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5571. * if self.pos_ >= limit or text[self.pos_] != ".": # <<<<<<<<<<<<<<
  5572. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5573. * self.scan_over_(".")
  5574. */
  5575. }
  5576. /* "fontTools/feaLib/lexer.py":147
  5577. * if self.pos_ >= limit or text[self.pos_] != ".":
  5578. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5579. * self.scan_over_(".") # <<<<<<<<<<<<<<
  5580. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5581. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5582. */
  5583. __pyx_t_3 = __pyx_v_self;
  5584. __Pyx_INCREF(__pyx_t_3);
  5585. __pyx_t_5 = 0;
  5586. {
  5587. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__8};
  5588. __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));
  5589. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  5590. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 147, __pyx_L1_error)
  5591. __Pyx_GOTREF(__pyx_t_10);
  5592. }
  5593. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5594. /* "fontTools/feaLib/lexer.py":148
  5595. * return (Lexer.NUMBER, int(text[start : self.pos_], 10), location)
  5596. * self.scan_over_(".")
  5597. * self.scan_over_(Lexer.CHAR_DIGIT_) # <<<<<<<<<<<<<<
  5598. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5599. * if cur_char in Lexer.CHAR_SYMBOL_:
  5600. */
  5601. __pyx_t_3 = __pyx_v_self;
  5602. __Pyx_INCREF(__pyx_t_3);
  5603. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
  5604. __Pyx_GOTREF(__pyx_t_1);
  5605. __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)
  5606. __Pyx_GOTREF(__pyx_t_9);
  5607. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5608. __pyx_t_5 = 0;
  5609. {
  5610. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
  5611. __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));
  5612. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  5613. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5614. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 148, __pyx_L1_error)
  5615. __Pyx_GOTREF(__pyx_t_10);
  5616. }
  5617. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5618. /* "fontTools/feaLib/lexer.py":149
  5619. * self.scan_over_(".")
  5620. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5621. * return (Lexer.FLOAT, float(text[start : self.pos_]), location) # <<<<<<<<<<<<<<
  5622. * if cur_char in Lexer.CHAR_SYMBOL_:
  5623. * self.pos_ += 1
  5624. */
  5625. __Pyx_XDECREF(__pyx_r);
  5626. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
  5627. __Pyx_GOTREF(__pyx_t_10);
  5628. __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)
  5629. __Pyx_GOTREF(__pyx_t_9);
  5630. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5631. __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)
  5632. __Pyx_GOTREF(__pyx_t_10);
  5633. __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)
  5634. __Pyx_GOTREF(__pyx_t_3);
  5635. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5636. __pyx_t_10 = __Pyx_PyNumber_Float(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 149, __pyx_L1_error)
  5637. __Pyx_GOTREF(__pyx_t_10);
  5638. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5639. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
  5640. __Pyx_GOTREF(__pyx_t_3);
  5641. __Pyx_GIVEREF(__pyx_t_9);
  5642. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9) != (0)) __PYX_ERR(0, 149, __pyx_L1_error);
  5643. __Pyx_GIVEREF(__pyx_t_10);
  5644. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_10) != (0)) __PYX_ERR(0, 149, __pyx_L1_error);
  5645. __Pyx_INCREF(__pyx_v_location);
  5646. __Pyx_GIVEREF(__pyx_v_location);
  5647. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 149, __pyx_L1_error);
  5648. __pyx_t_9 = 0;
  5649. __pyx_t_10 = 0;
  5650. __pyx_r = __pyx_t_3;
  5651. __pyx_t_3 = 0;
  5652. goto __pyx_L0;
  5653. /* "fontTools/feaLib/lexer.py":142
  5654. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5655. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5656. * if cur_char == "-" and next_char in Lexer.CHAR_DIGIT_: # <<<<<<<<<<<<<<
  5657. * self.pos_ += 1
  5658. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5659. */
  5660. }
  5661. /* "fontTools/feaLib/lexer.py":150
  5662. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5663. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5664. * if cur_char in Lexer.CHAR_SYMBOL_: # <<<<<<<<<<<<<<
  5665. * self.pos_ += 1
  5666. * return (Lexer.SYMBOL, cur_char, location)
  5667. */
  5668. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
  5669. __Pyx_GOTREF(__pyx_t_3);
  5670. __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)
  5671. __Pyx_GOTREF(__pyx_t_10);
  5672. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5673. __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)
  5674. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5675. if (__pyx_t_8) {
  5676. /* "fontTools/feaLib/lexer.py":151
  5677. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5678. * if cur_char in Lexer.CHAR_SYMBOL_:
  5679. * self.pos_ += 1 # <<<<<<<<<<<<<<
  5680. * return (Lexer.SYMBOL, cur_char, location)
  5681. * if cur_char == '"':
  5682. */
  5683. __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)
  5684. __Pyx_GOTREF(__pyx_t_10);
  5685. __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)
  5686. __Pyx_GOTREF(__pyx_t_3);
  5687. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5688. 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)
  5689. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5690. /* "fontTools/feaLib/lexer.py":152
  5691. * if cur_char in Lexer.CHAR_SYMBOL_:
  5692. * self.pos_ += 1
  5693. * return (Lexer.SYMBOL, cur_char, location) # <<<<<<<<<<<<<<
  5694. * if cur_char == '"':
  5695. * self.pos_ += 1
  5696. */
  5697. __Pyx_XDECREF(__pyx_r);
  5698. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
  5699. __Pyx_GOTREF(__pyx_t_3);
  5700. __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)
  5701. __Pyx_GOTREF(__pyx_t_10);
  5702. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5703. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
  5704. __Pyx_GOTREF(__pyx_t_3);
  5705. __Pyx_GIVEREF(__pyx_t_10);
  5706. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 152, __pyx_L1_error);
  5707. __Pyx_INCREF(__pyx_v_cur_char);
  5708. __Pyx_GIVEREF(__pyx_v_cur_char);
  5709. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cur_char) != (0)) __PYX_ERR(0, 152, __pyx_L1_error);
  5710. __Pyx_INCREF(__pyx_v_location);
  5711. __Pyx_GIVEREF(__pyx_v_location);
  5712. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 152, __pyx_L1_error);
  5713. __pyx_t_10 = 0;
  5714. __pyx_r = __pyx_t_3;
  5715. __pyx_t_3 = 0;
  5716. goto __pyx_L0;
  5717. /* "fontTools/feaLib/lexer.py":150
  5718. * self.scan_over_(Lexer.CHAR_DIGIT_)
  5719. * return (Lexer.FLOAT, float(text[start : self.pos_]), location)
  5720. * if cur_char in Lexer.CHAR_SYMBOL_: # <<<<<<<<<<<<<<
  5721. * self.pos_ += 1
  5722. * return (Lexer.SYMBOL, cur_char, location)
  5723. */
  5724. }
  5725. /* "fontTools/feaLib/lexer.py":153
  5726. * self.pos_ += 1
  5727. * return (Lexer.SYMBOL, cur_char, location)
  5728. * if cur_char == '"': # <<<<<<<<<<<<<<
  5729. * self.pos_ += 1
  5730. * self.scan_until_('"')
  5731. */
  5732. __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)
  5733. if (__pyx_t_8) {
  5734. /* "fontTools/feaLib/lexer.py":154
  5735. * return (Lexer.SYMBOL, cur_char, location)
  5736. * if cur_char == '"':
  5737. * self.pos_ += 1 # <<<<<<<<<<<<<<
  5738. * self.scan_until_('"')
  5739. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"':
  5740. */
  5741. __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)
  5742. __Pyx_GOTREF(__pyx_t_3);
  5743. __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)
  5744. __Pyx_GOTREF(__pyx_t_10);
  5745. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5746. 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)
  5747. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5748. /* "fontTools/feaLib/lexer.py":155
  5749. * if cur_char == '"':
  5750. * self.pos_ += 1
  5751. * self.scan_until_('"') # <<<<<<<<<<<<<<
  5752. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"':
  5753. * self.pos_ += 1
  5754. */
  5755. __pyx_t_3 = __pyx_v_self;
  5756. __Pyx_INCREF(__pyx_t_3);
  5757. __pyx_t_5 = 0;
  5758. {
  5759. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u__10};
  5760. __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));
  5761. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  5762. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 155, __pyx_L1_error)
  5763. __Pyx_GOTREF(__pyx_t_10);
  5764. }
  5765. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5766. /* "fontTools/feaLib/lexer.py":156
  5767. * self.pos_ += 1
  5768. * self.scan_until_('"')
  5769. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"': # <<<<<<<<<<<<<<
  5770. * self.pos_ += 1
  5771. * # strip newlines embedded within a string
  5772. */
  5773. __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)
  5774. __Pyx_GOTREF(__pyx_t_10);
  5775. __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)
  5776. __Pyx_GOTREF(__pyx_t_3);
  5777. __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)
  5778. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5779. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5780. __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 156, __pyx_L1_error)
  5781. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5782. if (__pyx_t_7) {
  5783. } else {
  5784. __pyx_t_8 = __pyx_t_7;
  5785. goto __pyx_L37_bool_binop_done;
  5786. }
  5787. __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)
  5788. __Pyx_GOTREF(__pyx_t_9);
  5789. __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)
  5790. __Pyx_GOTREF(__pyx_t_3);
  5791. __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 156, __pyx_L1_error)
  5792. __Pyx_GOTREF(__pyx_t_10);
  5793. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5794. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5795. __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)
  5796. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5797. __pyx_t_8 = __pyx_t_7;
  5798. __pyx_L37_bool_binop_done:;
  5799. if (likely(__pyx_t_8)) {
  5800. /* "fontTools/feaLib/lexer.py":157
  5801. * self.scan_until_('"')
  5802. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"':
  5803. * self.pos_ += 1 # <<<<<<<<<<<<<<
  5804. * # strip newlines embedded within a string
  5805. * string = re.sub("[\r\n]", "", text[start + 1 : self.pos_ - 1])
  5806. */
  5807. __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)
  5808. __Pyx_GOTREF(__pyx_t_10);
  5809. __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)
  5810. __Pyx_GOTREF(__pyx_t_3);
  5811. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5812. 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)
  5813. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5814. /* "fontTools/feaLib/lexer.py":159
  5815. * self.pos_ += 1
  5816. * # strip newlines embedded within a string
  5817. * string = re.sub("[\r\n]", "", text[start + 1 : self.pos_ - 1]) # <<<<<<<<<<<<<<
  5818. * return (Lexer.STRING, string, location)
  5819. * else:
  5820. */
  5821. __pyx_t_10 = NULL;
  5822. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
  5823. __Pyx_GOTREF(__pyx_t_9);
  5824. __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)
  5825. __Pyx_GOTREF(__pyx_t_1);
  5826. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5827. __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)
  5828. __Pyx_GOTREF(__pyx_t_9);
  5829. __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)
  5830. __Pyx_GOTREF(__pyx_t_2);
  5831. __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)
  5832. __Pyx_GOTREF(__pyx_t_4);
  5833. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5834. __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)
  5835. __Pyx_GOTREF(__pyx_t_2);
  5836. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  5837. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  5838. __pyx_t_5 = 1;
  5839. #if CYTHON_UNPACK_METHODS
  5840. if (unlikely(PyMethod_Check(__pyx_t_1))) {
  5841. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
  5842. assert(__pyx_t_10);
  5843. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
  5844. __Pyx_INCREF(__pyx_t_10);
  5845. __Pyx_INCREF(__pyx__function);
  5846. __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
  5847. __pyx_t_5 = 0;
  5848. }
  5849. #endif
  5850. {
  5851. PyObject *__pyx_callargs[4] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u__11, __pyx_mstate_global->__pyx_kp_u__12, __pyx_t_2};
  5852. __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));
  5853. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  5854. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5855. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5856. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
  5857. __Pyx_GOTREF(__pyx_t_3);
  5858. }
  5859. __pyx_v_string = __pyx_t_3;
  5860. __pyx_t_3 = 0;
  5861. /* "fontTools/feaLib/lexer.py":160
  5862. * # strip newlines embedded within a string
  5863. * string = re.sub("[\r\n]", "", text[start + 1 : self.pos_ - 1])
  5864. * return (Lexer.STRING, string, location) # <<<<<<<<<<<<<<
  5865. * else:
  5866. * raise FeatureLibError("Expected '\"' to terminate string", location)
  5867. */
  5868. __Pyx_XDECREF(__pyx_r);
  5869. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
  5870. __Pyx_GOTREF(__pyx_t_3);
  5871. __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)
  5872. __Pyx_GOTREF(__pyx_t_1);
  5873. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5874. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
  5875. __Pyx_GOTREF(__pyx_t_3);
  5876. __Pyx_GIVEREF(__pyx_t_1);
  5877. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 160, __pyx_L1_error);
  5878. __Pyx_INCREF(__pyx_v_string);
  5879. __Pyx_GIVEREF(__pyx_v_string);
  5880. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_string) != (0)) __PYX_ERR(0, 160, __pyx_L1_error);
  5881. __Pyx_INCREF(__pyx_v_location);
  5882. __Pyx_GIVEREF(__pyx_v_location);
  5883. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 160, __pyx_L1_error);
  5884. __pyx_t_1 = 0;
  5885. __pyx_r = __pyx_t_3;
  5886. __pyx_t_3 = 0;
  5887. goto __pyx_L0;
  5888. /* "fontTools/feaLib/lexer.py":156
  5889. * self.pos_ += 1
  5890. * self.scan_until_('"')
  5891. * if self.pos_ < self.text_length_ and self.text_[self.pos_] == '"': # <<<<<<<<<<<<<<
  5892. * self.pos_ += 1
  5893. * # strip newlines embedded within a string
  5894. */
  5895. }
  5896. /* "fontTools/feaLib/lexer.py":162
  5897. * return (Lexer.STRING, string, location)
  5898. * else:
  5899. * raise FeatureLibError("Expected '\"' to terminate string", location) # <<<<<<<<<<<<<<
  5900. * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
  5901. *
  5902. */
  5903. /*else*/ {
  5904. __pyx_t_1 = NULL;
  5905. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
  5906. __Pyx_GOTREF(__pyx_t_2);
  5907. __pyx_t_5 = 1;
  5908. #if CYTHON_UNPACK_METHODS
  5909. if (unlikely(PyMethod_Check(__pyx_t_2))) {
  5910. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
  5911. assert(__pyx_t_1);
  5912. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
  5913. __Pyx_INCREF(__pyx_t_1);
  5914. __Pyx_INCREF(__pyx__function);
  5915. __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
  5916. __pyx_t_5 = 0;
  5917. }
  5918. #endif
  5919. {
  5920. PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Expected_to_terminate_string, __pyx_v_location};
  5921. __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));
  5922. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  5923. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5924. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 162, __pyx_L1_error)
  5925. __Pyx_GOTREF(__pyx_t_3);
  5926. }
  5927. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  5928. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5929. __PYX_ERR(0, 162, __pyx_L1_error)
  5930. }
  5931. /* "fontTools/feaLib/lexer.py":153
  5932. * self.pos_ += 1
  5933. * return (Lexer.SYMBOL, cur_char, location)
  5934. * if cur_char == '"': # <<<<<<<<<<<<<<
  5935. * self.pos_ += 1
  5936. * self.scan_until_('"')
  5937. */
  5938. }
  5939. /* "fontTools/feaLib/lexer.py":163
  5940. * else:
  5941. * raise FeatureLibError("Expected '\"' to terminate string", location)
  5942. * raise FeatureLibError("Unexpected character: %r" % cur_char, location) # <<<<<<<<<<<<<<
  5943. *
  5944. * def scan_over_(self, valid):
  5945. */
  5946. __pyx_t_2 = NULL;
  5947. __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
  5948. __Pyx_GOTREF(__pyx_t_1);
  5949. __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)
  5950. __Pyx_GOTREF(__pyx_t_10);
  5951. __pyx_t_5 = 1;
  5952. #if CYTHON_UNPACK_METHODS
  5953. if (unlikely(PyMethod_Check(__pyx_t_1))) {
  5954. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
  5955. assert(__pyx_t_2);
  5956. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1);
  5957. __Pyx_INCREF(__pyx_t_2);
  5958. __Pyx_INCREF(__pyx__function);
  5959. __Pyx_DECREF_SET(__pyx_t_1, __pyx__function);
  5960. __pyx_t_5 = 0;
  5961. }
  5962. #endif
  5963. {
  5964. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_10, __pyx_v_location};
  5965. __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));
  5966. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  5967. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  5968. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5969. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
  5970. __Pyx_GOTREF(__pyx_t_3);
  5971. }
  5972. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  5973. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5974. __PYX_ERR(0, 163, __pyx_L1_error)
  5975. /* "fontTools/feaLib/lexer.py":68
  5976. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  5977. *
  5978. * def next_(self): # <<<<<<<<<<<<<<
  5979. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  5980. * location = self.location_()
  5981. */
  5982. /* function exit code */
  5983. __pyx_L1_error:;
  5984. __Pyx_XDECREF(__pyx_t_1);
  5985. __Pyx_XDECREF(__pyx_t_2);
  5986. __Pyx_XDECREF(__pyx_t_3);
  5987. __Pyx_XDECREF(__pyx_t_4);
  5988. __Pyx_XDECREF(__pyx_t_9);
  5989. __Pyx_XDECREF(__pyx_t_10);
  5990. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.next_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5991. __pyx_r = NULL;
  5992. __pyx_L0:;
  5993. __Pyx_XDECREF(__pyx_v_location);
  5994. __Pyx_XDECREF(__pyx_v_start);
  5995. __Pyx_XDECREF(__pyx_v_text);
  5996. __Pyx_XDECREF(__pyx_v_cur_char);
  5997. __Pyx_XDECREF(__pyx_v_next_char);
  5998. __Pyx_XDECREF(__pyx_v_glyphclass);
  5999. __Pyx_XDECREF(__pyx_v_token);
  6000. __Pyx_XDECREF(__pyx_v_string);
  6001. __Pyx_XGIVEREF(__pyx_r);
  6002. __Pyx_RefNannyFinishContext();
  6003. return __pyx_r;
  6004. }
  6005. /* "fontTools/feaLib/lexer.py":165
  6006. * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
  6007. *
  6008. * def scan_over_(self, valid): # <<<<<<<<<<<<<<
  6009. * p = self.pos_
  6010. * while p < self.text_length_ and self.text_[p] in valid:
  6011. */
  6012. /* Python wrapper */
  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. ); /*proto*/
  6020. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_, "Lexer.scan_over_(self, valid)");
  6021. 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_};
  6022. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_13scan_over_(PyObject *__pyx_self,
  6023. #if CYTHON_METH_FASTCALL
  6024. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6025. #else
  6026. PyObject *__pyx_args, PyObject *__pyx_kwds
  6027. #endif
  6028. ) {
  6029. PyObject *__pyx_v_self = 0;
  6030. PyObject *__pyx_v_valid = 0;
  6031. #if !CYTHON_METH_FASTCALL
  6032. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  6033. #endif
  6034. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  6035. PyObject* values[2] = {0,0};
  6036. int __pyx_lineno = 0;
  6037. const char *__pyx_filename = NULL;
  6038. int __pyx_clineno = 0;
  6039. PyObject *__pyx_r = 0;
  6040. __Pyx_RefNannyDeclarations
  6041. __Pyx_RefNannySetupContext("scan_over_ (wrapper)", 0);
  6042. #if !CYTHON_METH_FASTCALL
  6043. #if CYTHON_ASSUME_SAFE_SIZE
  6044. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  6045. #else
  6046. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  6047. #endif
  6048. #endif
  6049. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  6050. {
  6051. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_valid,0};
  6052. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  6053. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 165, __pyx_L3_error)
  6054. if (__pyx_kwds_len > 0) {
  6055. switch (__pyx_nargs) {
  6056. case 2:
  6057. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6058. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 165, __pyx_L3_error)
  6059. CYTHON_FALLTHROUGH;
  6060. case 1:
  6061. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6062. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 165, __pyx_L3_error)
  6063. CYTHON_FALLTHROUGH;
  6064. case 0: break;
  6065. default: goto __pyx_L5_argtuple_error;
  6066. }
  6067. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  6068. 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)
  6069. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  6070. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_over_", 1, 2, 2, i); __PYX_ERR(0, 165, __pyx_L3_error) }
  6071. }
  6072. } else if (unlikely(__pyx_nargs != 2)) {
  6073. goto __pyx_L5_argtuple_error;
  6074. } else {
  6075. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6076. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 165, __pyx_L3_error)
  6077. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6078. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 165, __pyx_L3_error)
  6079. }
  6080. __pyx_v_self = values[0];
  6081. __pyx_v_valid = values[1];
  6082. }
  6083. goto __pyx_L6_skip;
  6084. __pyx_L5_argtuple_error:;
  6085. __Pyx_RaiseArgtupleInvalid("scan_over_", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 165, __pyx_L3_error)
  6086. __pyx_L6_skip:;
  6087. goto __pyx_L4_argument_unpacking_done;
  6088. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_over_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6093. __Pyx_RefNannyFinishContext();
  6094. return NULL;
  6095. __pyx_L4_argument_unpacking_done:;
  6096. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_(__pyx_self, __pyx_v_self, __pyx_v_valid);
  6097. /* function exit code */
  6098. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6099. Py_XDECREF(values[__pyx_temp]);
  6100. }
  6101. __Pyx_RefNannyFinishContext();
  6102. return __pyx_r;
  6103. }
  6104. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_12scan_over_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_valid) {
  6105. PyObject *__pyx_v_p = NULL;
  6106. PyObject *__pyx_r = NULL;
  6107. __Pyx_RefNannyDeclarations
  6108. PyObject *__pyx_t_1 = NULL;
  6109. int __pyx_t_2;
  6110. PyObject *__pyx_t_3 = NULL;
  6111. int __pyx_t_4;
  6112. int __pyx_lineno = 0;
  6113. const char *__pyx_filename = NULL;
  6114. int __pyx_clineno = 0;
  6115. __Pyx_RefNannySetupContext("scan_over_", 0);
  6116. /* "fontTools/feaLib/lexer.py":166
  6117. *
  6118. * def scan_over_(self, valid):
  6119. * p = self.pos_ # <<<<<<<<<<<<<<
  6120. * while p < self.text_length_ and self.text_[p] in valid:
  6121. * p += 1
  6122. */
  6123. __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)
  6124. __Pyx_GOTREF(__pyx_t_1);
  6125. __pyx_v_p = __pyx_t_1;
  6126. __pyx_t_1 = 0;
  6127. /* "fontTools/feaLib/lexer.py":167
  6128. * def scan_over_(self, valid):
  6129. * p = self.pos_
  6130. * while p < self.text_length_ and self.text_[p] in valid: # <<<<<<<<<<<<<<
  6131. * p += 1
  6132. * self.pos_ = p
  6133. */
  6134. while (1) {
  6135. __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)
  6136. __Pyx_GOTREF(__pyx_t_1);
  6137. __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)
  6138. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6139. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 167, __pyx_L1_error)
  6140. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6141. if (__pyx_t_4) {
  6142. } else {
  6143. __pyx_t_2 = __pyx_t_4;
  6144. goto __pyx_L5_bool_binop_done;
  6145. }
  6146. __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)
  6147. __Pyx_GOTREF(__pyx_t_3);
  6148. __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
  6149. __Pyx_GOTREF(__pyx_t_1);
  6150. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6151. __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)
  6152. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6153. __pyx_t_2 = __pyx_t_4;
  6154. __pyx_L5_bool_binop_done:;
  6155. if (!__pyx_t_2) break;
  6156. /* "fontTools/feaLib/lexer.py":168
  6157. * p = self.pos_
  6158. * while p < self.text_length_ and self.text_[p] in valid:
  6159. * p += 1 # <<<<<<<<<<<<<<
  6160. * self.pos_ = p
  6161. *
  6162. */
  6163. __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)
  6164. __Pyx_GOTREF(__pyx_t_1);
  6165. __Pyx_DECREF_SET(__pyx_v_p, __pyx_t_1);
  6166. __pyx_t_1 = 0;
  6167. }
  6168. /* "fontTools/feaLib/lexer.py":169
  6169. * while p < self.text_length_ and self.text_[p] in valid:
  6170. * p += 1
  6171. * self.pos_ = p # <<<<<<<<<<<<<<
  6172. *
  6173. * def scan_until_(self, stop_at):
  6174. */
  6175. 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)
  6176. /* "fontTools/feaLib/lexer.py":165
  6177. * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
  6178. *
  6179. * def scan_over_(self, valid): # <<<<<<<<<<<<<<
  6180. * p = self.pos_
  6181. * while p < self.text_length_ and self.text_[p] in valid:
  6182. */
  6183. /* function exit code */
  6184. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6185. goto __pyx_L0;
  6186. __pyx_L1_error:;
  6187. __Pyx_XDECREF(__pyx_t_1);
  6188. __Pyx_XDECREF(__pyx_t_3);
  6189. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_over_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6190. __pyx_r = NULL;
  6191. __pyx_L0:;
  6192. __Pyx_XDECREF(__pyx_v_p);
  6193. __Pyx_XGIVEREF(__pyx_r);
  6194. __Pyx_RefNannyFinishContext();
  6195. return __pyx_r;
  6196. }
  6197. /* "fontTools/feaLib/lexer.py":171
  6198. * self.pos_ = p
  6199. *
  6200. * def scan_until_(self, stop_at): # <<<<<<<<<<<<<<
  6201. * p = self.pos_
  6202. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6203. */
  6204. /* Python wrapper */
  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. ); /*proto*/
  6212. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_, "Lexer.scan_until_(self, stop_at)");
  6213. 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_};
  6214. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_15scan_until_(PyObject *__pyx_self,
  6215. #if CYTHON_METH_FASTCALL
  6216. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6217. #else
  6218. PyObject *__pyx_args, PyObject *__pyx_kwds
  6219. #endif
  6220. ) {
  6221. PyObject *__pyx_v_self = 0;
  6222. PyObject *__pyx_v_stop_at = 0;
  6223. #if !CYTHON_METH_FASTCALL
  6224. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  6225. #endif
  6226. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  6227. PyObject* values[2] = {0,0};
  6228. int __pyx_lineno = 0;
  6229. const char *__pyx_filename = NULL;
  6230. int __pyx_clineno = 0;
  6231. PyObject *__pyx_r = 0;
  6232. __Pyx_RefNannyDeclarations
  6233. __Pyx_RefNannySetupContext("scan_until_ (wrapper)", 0);
  6234. #if !CYTHON_METH_FASTCALL
  6235. #if CYTHON_ASSUME_SAFE_SIZE
  6236. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  6237. #else
  6238. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  6239. #endif
  6240. #endif
  6241. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  6242. {
  6243. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_stop_at,0};
  6244. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  6245. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 171, __pyx_L3_error)
  6246. if (__pyx_kwds_len > 0) {
  6247. switch (__pyx_nargs) {
  6248. case 2:
  6249. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6250. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 171, __pyx_L3_error)
  6251. CYTHON_FALLTHROUGH;
  6252. case 1:
  6253. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6254. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 171, __pyx_L3_error)
  6255. CYTHON_FALLTHROUGH;
  6256. case 0: break;
  6257. default: goto __pyx_L5_argtuple_error;
  6258. }
  6259. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  6260. 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)
  6261. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  6262. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_until_", 1, 2, 2, i); __PYX_ERR(0, 171, __pyx_L3_error) }
  6263. }
  6264. } else if (unlikely(__pyx_nargs != 2)) {
  6265. goto __pyx_L5_argtuple_error;
  6266. } else {
  6267. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6268. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 171, __pyx_L3_error)
  6269. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6270. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 171, __pyx_L3_error)
  6271. }
  6272. __pyx_v_self = values[0];
  6273. __pyx_v_stop_at = values[1];
  6274. }
  6275. goto __pyx_L6_skip;
  6276. __pyx_L5_argtuple_error:;
  6277. __Pyx_RaiseArgtupleInvalid("scan_until_", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 171, __pyx_L3_error)
  6278. __pyx_L6_skip:;
  6279. goto __pyx_L4_argument_unpacking_done;
  6280. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_until_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6285. __Pyx_RefNannyFinishContext();
  6286. return NULL;
  6287. __pyx_L4_argument_unpacking_done:;
  6288. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_(__pyx_self, __pyx_v_self, __pyx_v_stop_at);
  6289. /* function exit code */
  6290. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6291. Py_XDECREF(values[__pyx_temp]);
  6292. }
  6293. __Pyx_RefNannyFinishContext();
  6294. return __pyx_r;
  6295. }
  6296. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_14scan_until_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stop_at) {
  6297. PyObject *__pyx_v_p = NULL;
  6298. PyObject *__pyx_r = NULL;
  6299. __Pyx_RefNannyDeclarations
  6300. PyObject *__pyx_t_1 = NULL;
  6301. int __pyx_t_2;
  6302. PyObject *__pyx_t_3 = NULL;
  6303. int __pyx_t_4;
  6304. int __pyx_lineno = 0;
  6305. const char *__pyx_filename = NULL;
  6306. int __pyx_clineno = 0;
  6307. __Pyx_RefNannySetupContext("scan_until_", 0);
  6308. /* "fontTools/feaLib/lexer.py":172
  6309. *
  6310. * def scan_until_(self, stop_at):
  6311. * p = self.pos_ # <<<<<<<<<<<<<<
  6312. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6313. * p += 1
  6314. */
  6315. __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)
  6316. __Pyx_GOTREF(__pyx_t_1);
  6317. __pyx_v_p = __pyx_t_1;
  6318. __pyx_t_1 = 0;
  6319. /* "fontTools/feaLib/lexer.py":173
  6320. * def scan_until_(self, stop_at):
  6321. * p = self.pos_
  6322. * while p < self.text_length_ and self.text_[p] not in stop_at: # <<<<<<<<<<<<<<
  6323. * p += 1
  6324. * self.pos_ = p
  6325. */
  6326. while (1) {
  6327. __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)
  6328. __Pyx_GOTREF(__pyx_t_1);
  6329. __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)
  6330. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6331. __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 173, __pyx_L1_error)
  6332. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6333. if (__pyx_t_4) {
  6334. } else {
  6335. __pyx_t_2 = __pyx_t_4;
  6336. goto __pyx_L5_bool_binop_done;
  6337. }
  6338. __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)
  6339. __Pyx_GOTREF(__pyx_t_3);
  6340. __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
  6341. __Pyx_GOTREF(__pyx_t_1);
  6342. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6343. __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)
  6344. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6345. __pyx_t_2 = __pyx_t_4;
  6346. __pyx_L5_bool_binop_done:;
  6347. if (!__pyx_t_2) break;
  6348. /* "fontTools/feaLib/lexer.py":174
  6349. * p = self.pos_
  6350. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6351. * p += 1 # <<<<<<<<<<<<<<
  6352. * self.pos_ = p
  6353. *
  6354. */
  6355. __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)
  6356. __Pyx_GOTREF(__pyx_t_1);
  6357. __Pyx_DECREF_SET(__pyx_v_p, __pyx_t_1);
  6358. __pyx_t_1 = 0;
  6359. }
  6360. /* "fontTools/feaLib/lexer.py":175
  6361. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6362. * p += 1
  6363. * self.pos_ = p # <<<<<<<<<<<<<<
  6364. *
  6365. * def scan_anonymous_block(self, tag):
  6366. */
  6367. 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)
  6368. /* "fontTools/feaLib/lexer.py":171
  6369. * self.pos_ = p
  6370. *
  6371. * def scan_until_(self, stop_at): # <<<<<<<<<<<<<<
  6372. * p = self.pos_
  6373. * while p < self.text_length_ and self.text_[p] not in stop_at:
  6374. */
  6375. /* function exit code */
  6376. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6377. goto __pyx_L0;
  6378. __pyx_L1_error:;
  6379. __Pyx_XDECREF(__pyx_t_1);
  6380. __Pyx_XDECREF(__pyx_t_3);
  6381. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_until_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6382. __pyx_r = NULL;
  6383. __pyx_L0:;
  6384. __Pyx_XDECREF(__pyx_v_p);
  6385. __Pyx_XGIVEREF(__pyx_r);
  6386. __Pyx_RefNannyFinishContext();
  6387. return __pyx_r;
  6388. }
  6389. /* "fontTools/feaLib/lexer.py":177
  6390. * self.pos_ = p
  6391. *
  6392. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  6393. * location = self.location_()
  6394. * tag = tag.strip()
  6395. */
  6396. /* Python wrapper */
  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. ); /*proto*/
  6404. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block, "Lexer.scan_anonymous_block(self, tag)");
  6405. 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};
  6406. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_5Lexer_17scan_anonymous_block(PyObject *__pyx_self,
  6407. #if CYTHON_METH_FASTCALL
  6408. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6409. #else
  6410. PyObject *__pyx_args, PyObject *__pyx_kwds
  6411. #endif
  6412. ) {
  6413. PyObject *__pyx_v_self = 0;
  6414. PyObject *__pyx_v_tag = 0;
  6415. #if !CYTHON_METH_FASTCALL
  6416. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  6417. #endif
  6418. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  6419. PyObject* values[2] = {0,0};
  6420. int __pyx_lineno = 0;
  6421. const char *__pyx_filename = NULL;
  6422. int __pyx_clineno = 0;
  6423. PyObject *__pyx_r = 0;
  6424. __Pyx_RefNannyDeclarations
  6425. __Pyx_RefNannySetupContext("scan_anonymous_block (wrapper)", 0);
  6426. #if !CYTHON_METH_FASTCALL
  6427. #if CYTHON_ASSUME_SAFE_SIZE
  6428. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  6429. #else
  6430. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  6431. #endif
  6432. #endif
  6433. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  6434. {
  6435. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_tag,0};
  6436. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  6437. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 177, __pyx_L3_error)
  6438. if (__pyx_kwds_len > 0) {
  6439. switch (__pyx_nargs) {
  6440. case 2:
  6441. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6442. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 177, __pyx_L3_error)
  6443. CYTHON_FALLTHROUGH;
  6444. case 1:
  6445. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6446. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 177, __pyx_L3_error)
  6447. CYTHON_FALLTHROUGH;
  6448. case 0: break;
  6449. default: goto __pyx_L5_argtuple_error;
  6450. }
  6451. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  6452. 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)
  6453. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  6454. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, i); __PYX_ERR(0, 177, __pyx_L3_error) }
  6455. }
  6456. } else if (unlikely(__pyx_nargs != 2)) {
  6457. goto __pyx_L5_argtuple_error;
  6458. } else {
  6459. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6460. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 177, __pyx_L3_error)
  6461. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6462. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 177, __pyx_L3_error)
  6463. }
  6464. __pyx_v_self = values[0];
  6465. __pyx_v_tag = values[1];
  6466. }
  6467. goto __pyx_L6_skip;
  6468. __pyx_L5_argtuple_error:;
  6469. __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 177, __pyx_L3_error)
  6470. __pyx_L6_skip:;
  6471. goto __pyx_L4_argument_unpacking_done;
  6472. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6477. __Pyx_RefNannyFinishContext();
  6478. return NULL;
  6479. __pyx_L4_argument_unpacking_done:;
  6480. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block(__pyx_self, __pyx_v_self, __pyx_v_tag);
  6481. /* function exit code */
  6482. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6483. Py_XDECREF(values[__pyx_temp]);
  6484. }
  6485. __Pyx_RefNannyFinishContext();
  6486. return __pyx_r;
  6487. }
  6488. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_5Lexer_16scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  6489. PyObject *__pyx_v_location = NULL;
  6490. PyObject *__pyx_v_regexp = NULL;
  6491. PyObject *__pyx_v_split = NULL;
  6492. PyObject *__pyx_r = NULL;
  6493. __Pyx_RefNannyDeclarations
  6494. PyObject *__pyx_t_1 = NULL;
  6495. PyObject *__pyx_t_2 = NULL;
  6496. size_t __pyx_t_3;
  6497. PyObject *__pyx_t_4 = NULL;
  6498. PyObject *__pyx_t_5 = NULL;
  6499. PyObject *__pyx_t_6 = NULL;
  6500. PyObject *__pyx_t_7 = NULL;
  6501. Py_ssize_t __pyx_t_8;
  6502. int __pyx_t_9;
  6503. int __pyx_lineno = 0;
  6504. const char *__pyx_filename = NULL;
  6505. int __pyx_clineno = 0;
  6506. __Pyx_RefNannySetupContext("scan_anonymous_block", 0);
  6507. __Pyx_INCREF(__pyx_v_tag);
  6508. /* "fontTools/feaLib/lexer.py":178
  6509. *
  6510. * def scan_anonymous_block(self, tag):
  6511. * location = self.location_() # <<<<<<<<<<<<<<
  6512. * tag = tag.strip()
  6513. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  6514. */
  6515. __pyx_t_2 = __pyx_v_self;
  6516. __Pyx_INCREF(__pyx_t_2);
  6517. __pyx_t_3 = 0;
  6518. {
  6519. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  6520. __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));
  6521. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6522. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
  6523. __Pyx_GOTREF(__pyx_t_1);
  6524. }
  6525. __pyx_v_location = __pyx_t_1;
  6526. __pyx_t_1 = 0;
  6527. /* "fontTools/feaLib/lexer.py":179
  6528. * def scan_anonymous_block(self, tag):
  6529. * location = self.location_()
  6530. * tag = tag.strip() # <<<<<<<<<<<<<<
  6531. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  6532. * self.scan_over_(Lexer.CHAR_NEWLINE_)
  6533. */
  6534. __pyx_t_2 = __pyx_v_tag;
  6535. __Pyx_INCREF(__pyx_t_2);
  6536. __pyx_t_3 = 0;
  6537. {
  6538. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  6539. __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));
  6540. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6541. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
  6542. __Pyx_GOTREF(__pyx_t_1);
  6543. }
  6544. __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_1);
  6545. __pyx_t_1 = 0;
  6546. /* "fontTools/feaLib/lexer.py":180
  6547. * location = self.location_()
  6548. * tag = tag.strip()
  6549. * self.scan_until_(Lexer.CHAR_NEWLINE_) # <<<<<<<<<<<<<<
  6550. * self.scan_over_(Lexer.CHAR_NEWLINE_)
  6551. * regexp = r"}\s*" + tag + r"\s*;"
  6552. */
  6553. __pyx_t_2 = __pyx_v_self;
  6554. __Pyx_INCREF(__pyx_t_2);
  6555. __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
  6556. __Pyx_GOTREF(__pyx_t_4);
  6557. __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)
  6558. __Pyx_GOTREF(__pyx_t_5);
  6559. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  6560. __pyx_t_3 = 0;
  6561. {
  6562. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5};
  6563. __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));
  6564. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6565. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  6566. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
  6567. __Pyx_GOTREF(__pyx_t_1);
  6568. }
  6569. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6570. /* "fontTools/feaLib/lexer.py":181
  6571. * tag = tag.strip()
  6572. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  6573. * self.scan_over_(Lexer.CHAR_NEWLINE_) # <<<<<<<<<<<<<<
  6574. * regexp = r"}\s*" + tag + r"\s*;"
  6575. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
  6576. */
  6577. __pyx_t_5 = __pyx_v_self;
  6578. __Pyx_INCREF(__pyx_t_5);
  6579. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
  6580. __Pyx_GOTREF(__pyx_t_2);
  6581. __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)
  6582. __Pyx_GOTREF(__pyx_t_4);
  6583. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6584. __pyx_t_3 = 0;
  6585. {
  6586. PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
  6587. __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));
  6588. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  6589. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  6590. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  6591. __Pyx_GOTREF(__pyx_t_1);
  6592. }
  6593. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6594. /* "fontTools/feaLib/lexer.py":182
  6595. * self.scan_until_(Lexer.CHAR_NEWLINE_)
  6596. * self.scan_over_(Lexer.CHAR_NEWLINE_)
  6597. * regexp = r"}\s*" + tag + r"\s*;" # <<<<<<<<<<<<<<
  6598. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
  6599. * if len(split) != 2:
  6600. */
  6601. __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)
  6602. __Pyx_GOTREF(__pyx_t_1);
  6603. __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)
  6604. __Pyx_GOTREF(__pyx_t_4);
  6605. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6606. __pyx_v_regexp = __pyx_t_4;
  6607. __pyx_t_4 = 0;
  6608. /* "fontTools/feaLib/lexer.py":183
  6609. * self.scan_over_(Lexer.CHAR_NEWLINE_)
  6610. * regexp = r"}\s*" + tag + r"\s*;"
  6611. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1) # <<<<<<<<<<<<<<
  6612. * if len(split) != 2:
  6613. * raise FeatureLibError(
  6614. */
  6615. __pyx_t_1 = NULL;
  6616. __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
  6617. __Pyx_GOTREF(__pyx_t_5);
  6618. __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)
  6619. __Pyx_GOTREF(__pyx_t_2);
  6620. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  6621. __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)
  6622. __Pyx_GOTREF(__pyx_t_5);
  6623. __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)
  6624. __Pyx_GOTREF(__pyx_t_6);
  6625. __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)
  6626. __Pyx_GOTREF(__pyx_t_7);
  6627. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  6628. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6629. __pyx_t_3 = 1;
  6630. #if CYTHON_UNPACK_METHODS
  6631. if (unlikely(PyMethod_Check(__pyx_t_2))) {
  6632. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
  6633. assert(__pyx_t_1);
  6634. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
  6635. __Pyx_INCREF(__pyx_t_1);
  6636. __Pyx_INCREF(__pyx__function);
  6637. __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
  6638. __pyx_t_3 = 0;
  6639. }
  6640. #endif
  6641. {
  6642. PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_regexp, __pyx_t_7};
  6643. __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 183, __pyx_L1_error)
  6644. __Pyx_GOTREF(__pyx_t_6);
  6645. 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)
  6646. __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);
  6647. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  6648. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  6649. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6650. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6651. if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error)
  6652. __Pyx_GOTREF(__pyx_t_4);
  6653. }
  6654. __pyx_v_split = __pyx_t_4;
  6655. __pyx_t_4 = 0;
  6656. /* "fontTools/feaLib/lexer.py":184
  6657. * regexp = r"}\s*" + tag + r"\s*;"
  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. __pyx_t_8 = PyObject_Length(__pyx_v_split); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 184, __pyx_L1_error)
  6664. __pyx_t_9 = (__pyx_t_8 != 2);
  6665. if (unlikely(__pyx_t_9)) {
  6666. /* "fontTools/feaLib/lexer.py":185
  6667. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
  6668. * if len(split) != 2:
  6669. * raise FeatureLibError( # <<<<<<<<<<<<<<
  6670. * "Expected '} %s;' to terminate anonymous block" % tag, location
  6671. * )
  6672. */
  6673. __pyx_t_2 = NULL;
  6674. __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error)
  6675. __Pyx_GOTREF(__pyx_t_6);
  6676. /* "fontTools/feaLib/lexer.py":186
  6677. * if len(split) != 2:
  6678. * raise FeatureLibError(
  6679. * "Expected '} %s;' to terminate anonymous block" % tag, location # <<<<<<<<<<<<<<
  6680. * )
  6681. * self.pos_ += len(split[0])
  6682. */
  6683. __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)
  6684. __Pyx_GOTREF(__pyx_t_7);
  6685. __pyx_t_3 = 1;
  6686. #if CYTHON_UNPACK_METHODS
  6687. if (unlikely(PyMethod_Check(__pyx_t_6))) {
  6688. __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
  6689. assert(__pyx_t_2);
  6690. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
  6691. __Pyx_INCREF(__pyx_t_2);
  6692. __Pyx_INCREF(__pyx__function);
  6693. __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
  6694. __pyx_t_3 = 0;
  6695. }
  6696. #endif
  6697. {
  6698. PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_7, __pyx_v_location};
  6699. __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));
  6700. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6701. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  6702. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6703. if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
  6704. __Pyx_GOTREF(__pyx_t_4);
  6705. }
  6706. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  6707. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  6708. __PYX_ERR(0, 185, __pyx_L1_error)
  6709. /* "fontTools/feaLib/lexer.py":184
  6710. * regexp = r"}\s*" + tag + r"\s*;"
  6711. * split = re.split(regexp, self.text_[self.pos_ :], maxsplit=1)
  6712. * if len(split) != 2: # <<<<<<<<<<<<<<
  6713. * raise FeatureLibError(
  6714. * "Expected '} %s;' to terminate anonymous block" % tag, location
  6715. */
  6716. }
  6717. /* "fontTools/feaLib/lexer.py":188
  6718. * "Expected '} %s;' to terminate anonymous block" % tag, location
  6719. * )
  6720. * self.pos_ += len(split[0]) # <<<<<<<<<<<<<<
  6721. * return (Lexer.ANONYMOUS_BLOCK, split[0], location)
  6722. *
  6723. */
  6724. __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)
  6725. __Pyx_GOTREF(__pyx_t_4);
  6726. __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)
  6727. __Pyx_GOTREF(__pyx_t_6);
  6728. __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 188, __pyx_L1_error)
  6729. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6730. __pyx_t_6 = PyLong_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 188, __pyx_L1_error)
  6731. __Pyx_GOTREF(__pyx_t_6);
  6732. __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 188, __pyx_L1_error)
  6733. __Pyx_GOTREF(__pyx_t_7);
  6734. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  6735. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6736. 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)
  6737. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  6738. /* "fontTools/feaLib/lexer.py":189
  6739. * )
  6740. * self.pos_ += len(split[0])
  6741. * return (Lexer.ANONYMOUS_BLOCK, split[0], location) # <<<<<<<<<<<<<<
  6742. *
  6743. *
  6744. */
  6745. __Pyx_XDECREF(__pyx_r);
  6746. __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error)
  6747. __Pyx_GOTREF(__pyx_t_7);
  6748. __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)
  6749. __Pyx_GOTREF(__pyx_t_6);
  6750. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  6751. __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)
  6752. __Pyx_GOTREF(__pyx_t_7);
  6753. __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)
  6754. __Pyx_GOTREF(__pyx_t_4);
  6755. __Pyx_GIVEREF(__pyx_t_6);
  6756. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 189, __pyx_L1_error);
  6757. __Pyx_GIVEREF(__pyx_t_7);
  6758. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 189, __pyx_L1_error);
  6759. __Pyx_INCREF(__pyx_v_location);
  6760. __Pyx_GIVEREF(__pyx_v_location);
  6761. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 189, __pyx_L1_error);
  6762. __pyx_t_6 = 0;
  6763. __pyx_t_7 = 0;
  6764. __pyx_r = __pyx_t_4;
  6765. __pyx_t_4 = 0;
  6766. goto __pyx_L0;
  6767. /* "fontTools/feaLib/lexer.py":177
  6768. * self.pos_ = p
  6769. *
  6770. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  6771. * location = self.location_()
  6772. * tag = tag.strip()
  6773. */
  6774. /* function exit code */
  6775. __pyx_L1_error:;
  6776. __Pyx_XDECREF(__pyx_t_1);
  6777. __Pyx_XDECREF(__pyx_t_2);
  6778. __Pyx_XDECREF(__pyx_t_4);
  6779. __Pyx_XDECREF(__pyx_t_5);
  6780. __Pyx_XDECREF(__pyx_t_6);
  6781. __Pyx_XDECREF(__pyx_t_7);
  6782. __Pyx_AddTraceback("fontTools.feaLib.lexer.Lexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6783. __pyx_r = NULL;
  6784. __pyx_L0:;
  6785. __Pyx_XDECREF(__pyx_v_location);
  6786. __Pyx_XDECREF(__pyx_v_regexp);
  6787. __Pyx_XDECREF(__pyx_v_split);
  6788. __Pyx_XDECREF(__pyx_v_tag);
  6789. __Pyx_XGIVEREF(__pyx_r);
  6790. __Pyx_RefNannyFinishContext();
  6791. return __pyx_r;
  6792. }
  6793. /* "fontTools/feaLib/lexer.py":207
  6794. * """
  6795. *
  6796. * def __init__(self, featurefile, *, includeDir=None): # <<<<<<<<<<<<<<
  6797. * """Initializes an IncludingLexer.
  6798. *
  6799. */
  6800. /* Python wrapper */
  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. ); /*proto*/
  6808. 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.");
  6809. 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__};
  6810. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_1__init__(PyObject *__pyx_self,
  6811. #if CYTHON_METH_FASTCALL
  6812. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6813. #else
  6814. PyObject *__pyx_args, PyObject *__pyx_kwds
  6815. #endif
  6816. ) {
  6817. PyObject *__pyx_v_self = 0;
  6818. PyObject *__pyx_v_featurefile = 0;
  6819. PyObject *__pyx_v_includeDir = 0;
  6820. #if !CYTHON_METH_FASTCALL
  6821. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  6822. #endif
  6823. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  6824. PyObject* values[3] = {0,0,0};
  6825. int __pyx_lineno = 0;
  6826. const char *__pyx_filename = NULL;
  6827. int __pyx_clineno = 0;
  6828. PyObject *__pyx_r = 0;
  6829. __Pyx_RefNannyDeclarations
  6830. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  6831. #if !CYTHON_METH_FASTCALL
  6832. #if CYTHON_ASSUME_SAFE_SIZE
  6833. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  6834. #else
  6835. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  6836. #endif
  6837. #endif
  6838. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  6839. {
  6840. 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};
  6841. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  6842. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 207, __pyx_L3_error)
  6843. if (__pyx_kwds_len > 0) {
  6844. switch (__pyx_nargs) {
  6845. case 2:
  6846. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6847. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 207, __pyx_L3_error)
  6848. CYTHON_FALLTHROUGH;
  6849. case 1:
  6850. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6851. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 207, __pyx_L3_error)
  6852. CYTHON_FALLTHROUGH;
  6853. case 0: break;
  6854. default: goto __pyx_L5_argtuple_error;
  6855. }
  6856. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  6857. 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)
  6858. if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
  6859. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  6860. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 207, __pyx_L3_error) }
  6861. }
  6862. } else if (unlikely(__pyx_nargs != 2)) {
  6863. goto __pyx_L5_argtuple_error;
  6864. } else {
  6865. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  6866. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 207, __pyx_L3_error)
  6867. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  6868. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 207, __pyx_L3_error)
  6869. if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
  6870. }
  6871. __pyx_v_self = values[0];
  6872. __pyx_v_featurefile = values[1];
  6873. __pyx_v_includeDir = values[2];
  6874. }
  6875. goto __pyx_L6_skip;
  6876. __pyx_L5_argtuple_error:;
  6877. __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 207, __pyx_L3_error)
  6878. __pyx_L6_skip:;
  6879. goto __pyx_L4_argument_unpacking_done;
  6880. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6885. __Pyx_RefNannyFinishContext();
  6886. return NULL;
  6887. __pyx_L4_argument_unpacking_done:;
  6888. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer___init__(__pyx_self, __pyx_v_self, __pyx_v_featurefile, __pyx_v_includeDir);
  6889. /* function exit code */
  6890. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  6891. Py_XDECREF(values[__pyx_temp]);
  6892. }
  6893. __Pyx_RefNannyFinishContext();
  6894. return __pyx_r;
  6895. }
  6896. 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) {
  6897. PyObject *__pyx_r = NULL;
  6898. __Pyx_RefNannyDeclarations
  6899. PyObject *__pyx_t_1 = NULL;
  6900. PyObject *__pyx_t_2 = NULL;
  6901. size_t __pyx_t_3;
  6902. int __pyx_lineno = 0;
  6903. const char *__pyx_filename = NULL;
  6904. int __pyx_clineno = 0;
  6905. __Pyx_RefNannySetupContext("__init__", 0);
  6906. /* "fontTools/feaLib/lexer.py":217
  6907. * """
  6908. *
  6909. * self.lexers_ = [self.make_lexer_(featurefile)] # <<<<<<<<<<<<<<
  6910. * self.featurefilepath = self.lexers_[0].filename_
  6911. * self.includeDir = includeDir
  6912. */
  6913. __pyx_t_2 = __pyx_v_self;
  6914. __Pyx_INCREF(__pyx_t_2);
  6915. __pyx_t_3 = 0;
  6916. {
  6917. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_featurefile};
  6918. __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));
  6919. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  6920. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
  6921. __Pyx_GOTREF(__pyx_t_1);
  6922. }
  6923. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L1_error)
  6924. __Pyx_GOTREF(__pyx_t_2);
  6925. __Pyx_GIVEREF(__pyx_t_1);
  6926. if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 217, __pyx_L1_error);
  6927. __pyx_t_1 = 0;
  6928. 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)
  6929. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6930. /* "fontTools/feaLib/lexer.py":218
  6931. *
  6932. * self.lexers_ = [self.make_lexer_(featurefile)]
  6933. * self.featurefilepath = self.lexers_[0].filename_ # <<<<<<<<<<<<<<
  6934. * self.includeDir = includeDir
  6935. *
  6936. */
  6937. __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)
  6938. __Pyx_GOTREF(__pyx_t_2);
  6939. __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)
  6940. __Pyx_GOTREF(__pyx_t_1);
  6941. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6942. __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)
  6943. __Pyx_GOTREF(__pyx_t_2);
  6944. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6945. 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)
  6946. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6947. /* "fontTools/feaLib/lexer.py":219
  6948. * self.lexers_ = [self.make_lexer_(featurefile)]
  6949. * self.featurefilepath = self.lexers_[0].filename_
  6950. * self.includeDir = includeDir # <<<<<<<<<<<<<<
  6951. *
  6952. * def __iter__(self):
  6953. */
  6954. 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)
  6955. /* "fontTools/feaLib/lexer.py":207
  6956. * """
  6957. *
  6958. * def __init__(self, featurefile, *, includeDir=None): # <<<<<<<<<<<<<<
  6959. * """Initializes an IncludingLexer.
  6960. *
  6961. */
  6962. /* function exit code */
  6963. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6964. goto __pyx_L0;
  6965. __pyx_L1_error:;
  6966. __Pyx_XDECREF(__pyx_t_1);
  6967. __Pyx_XDECREF(__pyx_t_2);
  6968. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6969. __pyx_r = NULL;
  6970. __pyx_L0:;
  6971. __Pyx_XGIVEREF(__pyx_r);
  6972. __Pyx_RefNannyFinishContext();
  6973. return __pyx_r;
  6974. }
  6975. /* "fontTools/feaLib/lexer.py":221
  6976. * self.includeDir = includeDir
  6977. *
  6978. * def __iter__(self): # <<<<<<<<<<<<<<
  6979. * return self
  6980. *
  6981. */
  6982. /* Python wrapper */
  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. ); /*proto*/
  6990. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__, "IncludingLexer.__iter__(self)");
  6991. 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__};
  6992. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_3__iter__(PyObject *__pyx_self,
  6993. #if CYTHON_METH_FASTCALL
  6994. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  6995. #else
  6996. PyObject *__pyx_args, PyObject *__pyx_kwds
  6997. #endif
  6998. ) {
  6999. PyObject *__pyx_v_self = 0;
  7000. #if !CYTHON_METH_FASTCALL
  7001. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  7002. #endif
  7003. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  7004. PyObject* values[1] = {0};
  7005. int __pyx_lineno = 0;
  7006. const char *__pyx_filename = NULL;
  7007. int __pyx_clineno = 0;
  7008. PyObject *__pyx_r = 0;
  7009. __Pyx_RefNannyDeclarations
  7010. __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  7011. #if !CYTHON_METH_FASTCALL
  7012. #if CYTHON_ASSUME_SAFE_SIZE
  7013. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  7014. #else
  7015. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  7016. #endif
  7017. #endif
  7018. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  7019. {
  7020. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  7021. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  7022. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 221, __pyx_L3_error)
  7023. if (__pyx_kwds_len > 0) {
  7024. switch (__pyx_nargs) {
  7025. case 1:
  7026. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7027. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 221, __pyx_L3_error)
  7028. CYTHON_FALLTHROUGH;
  7029. case 0: break;
  7030. default: goto __pyx_L5_argtuple_error;
  7031. }
  7032. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  7033. 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)
  7034. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  7035. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, i); __PYX_ERR(0, 221, __pyx_L3_error) }
  7036. }
  7037. } else if (unlikely(__pyx_nargs != 1)) {
  7038. goto __pyx_L5_argtuple_error;
  7039. } else {
  7040. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7041. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 221, __pyx_L3_error)
  7042. }
  7043. __pyx_v_self = values[0];
  7044. }
  7045. goto __pyx_L6_skip;
  7046. __pyx_L5_argtuple_error:;
  7047. __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 221, __pyx_L3_error)
  7048. __pyx_L6_skip:;
  7049. goto __pyx_L4_argument_unpacking_done;
  7050. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7055. __Pyx_RefNannyFinishContext();
  7056. return NULL;
  7057. __pyx_L4_argument_unpacking_done:;
  7058. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__(__pyx_self, __pyx_v_self);
  7059. /* function exit code */
  7060. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  7061. Py_XDECREF(values[__pyx_temp]);
  7062. }
  7063. __Pyx_RefNannyFinishContext();
  7064. return __pyx_r;
  7065. }
  7066. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  7067. PyObject *__pyx_r = NULL;
  7068. __Pyx_RefNannyDeclarations
  7069. __Pyx_RefNannySetupContext("__iter__", 0);
  7070. /* "fontTools/feaLib/lexer.py":222
  7071. *
  7072. * def __iter__(self):
  7073. * return self # <<<<<<<<<<<<<<
  7074. *
  7075. * def next(self): # Python 2
  7076. */
  7077. __Pyx_XDECREF(__pyx_r);
  7078. __Pyx_INCREF(__pyx_v_self);
  7079. __pyx_r = __pyx_v_self;
  7080. goto __pyx_L0;
  7081. /* "fontTools/feaLib/lexer.py":221
  7082. * self.includeDir = includeDir
  7083. *
  7084. * def __iter__(self): # <<<<<<<<<<<<<<
  7085. * return self
  7086. *
  7087. */
  7088. /* function exit code */
  7089. __pyx_L0:;
  7090. __Pyx_XGIVEREF(__pyx_r);
  7091. __Pyx_RefNannyFinishContext();
  7092. return __pyx_r;
  7093. }
  7094. /* "fontTools/feaLib/lexer.py":224
  7095. * return self
  7096. *
  7097. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  7098. * return self.__next__()
  7099. *
  7100. */
  7101. /* Python wrapper */
  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. ); /*proto*/
  7109. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_4next, "IncludingLexer.next(self)");
  7110. 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};
  7111. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_5next(PyObject *__pyx_self,
  7112. #if CYTHON_METH_FASTCALL
  7113. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  7114. #else
  7115. PyObject *__pyx_args, PyObject *__pyx_kwds
  7116. #endif
  7117. ) {
  7118. PyObject *__pyx_v_self = 0;
  7119. #if !CYTHON_METH_FASTCALL
  7120. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  7121. #endif
  7122. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  7123. PyObject* values[1] = {0};
  7124. int __pyx_lineno = 0;
  7125. const char *__pyx_filename = NULL;
  7126. int __pyx_clineno = 0;
  7127. PyObject *__pyx_r = 0;
  7128. __Pyx_RefNannyDeclarations
  7129. __Pyx_RefNannySetupContext("next (wrapper)", 0);
  7130. #if !CYTHON_METH_FASTCALL
  7131. #if CYTHON_ASSUME_SAFE_SIZE
  7132. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  7133. #else
  7134. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  7135. #endif
  7136. #endif
  7137. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  7138. {
  7139. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  7140. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  7141. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 224, __pyx_L3_error)
  7142. if (__pyx_kwds_len > 0) {
  7143. switch (__pyx_nargs) {
  7144. case 1:
  7145. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7146. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error)
  7147. CYTHON_FALLTHROUGH;
  7148. case 0: break;
  7149. default: goto __pyx_L5_argtuple_error;
  7150. }
  7151. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  7152. 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)
  7153. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  7154. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, i); __PYX_ERR(0, 224, __pyx_L3_error) }
  7155. }
  7156. } else if (unlikely(__pyx_nargs != 1)) {
  7157. goto __pyx_L5_argtuple_error;
  7158. } else {
  7159. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7160. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error)
  7161. }
  7162. __pyx_v_self = values[0];
  7163. }
  7164. goto __pyx_L6_skip;
  7165. __pyx_L5_argtuple_error:;
  7166. __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 224, __pyx_L3_error)
  7167. __pyx_L6_skip:;
  7168. goto __pyx_L4_argument_unpacking_done;
  7169. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7174. __Pyx_RefNannyFinishContext();
  7175. return NULL;
  7176. __pyx_L4_argument_unpacking_done:;
  7177. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_4next(__pyx_self, __pyx_v_self);
  7178. /* function exit code */
  7179. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  7180. Py_XDECREF(values[__pyx_temp]);
  7181. }
  7182. __Pyx_RefNannyFinishContext();
  7183. return __pyx_r;
  7184. }
  7185. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_4next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  7186. PyObject *__pyx_r = NULL;
  7187. __Pyx_RefNannyDeclarations
  7188. PyObject *__pyx_t_1 = NULL;
  7189. PyObject *__pyx_t_2 = NULL;
  7190. size_t __pyx_t_3;
  7191. int __pyx_lineno = 0;
  7192. const char *__pyx_filename = NULL;
  7193. int __pyx_clineno = 0;
  7194. __Pyx_RefNannySetupContext("next", 0);
  7195. /* "fontTools/feaLib/lexer.py":225
  7196. *
  7197. * def next(self): # Python 2
  7198. * return self.__next__() # <<<<<<<<<<<<<<
  7199. *
  7200. * def __next__(self): # Python 3
  7201. */
  7202. __Pyx_XDECREF(__pyx_r);
  7203. __pyx_t_2 = __pyx_v_self;
  7204. __Pyx_INCREF(__pyx_t_2);
  7205. __pyx_t_3 = 0;
  7206. {
  7207. PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
  7208. __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));
  7209. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  7210. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
  7211. __Pyx_GOTREF(__pyx_t_1);
  7212. }
  7213. __pyx_r = __pyx_t_1;
  7214. __pyx_t_1 = 0;
  7215. goto __pyx_L0;
  7216. /* "fontTools/feaLib/lexer.py":224
  7217. * return self
  7218. *
  7219. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  7220. * return self.__next__()
  7221. *
  7222. */
  7223. /* function exit code */
  7224. __pyx_L1_error:;
  7225. __Pyx_XDECREF(__pyx_t_1);
  7226. __Pyx_XDECREF(__pyx_t_2);
  7227. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7228. __pyx_r = NULL;
  7229. __pyx_L0:;
  7230. __Pyx_XGIVEREF(__pyx_r);
  7231. __Pyx_RefNannyFinishContext();
  7232. return __pyx_r;
  7233. }
  7234. /* "fontTools/feaLib/lexer.py":227
  7235. * return self.__next__()
  7236. *
  7237. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  7238. * while self.lexers_:
  7239. * lexer = self.lexers_[-1]
  7240. */
  7241. /* Python wrapper */
  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. ); /*proto*/
  7249. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__, "IncludingLexer.__next__(self)");
  7250. 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__};
  7251. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_7__next__(PyObject *__pyx_self,
  7252. #if CYTHON_METH_FASTCALL
  7253. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  7254. #else
  7255. PyObject *__pyx_args, PyObject *__pyx_kwds
  7256. #endif
  7257. ) {
  7258. PyObject *__pyx_v_self = 0;
  7259. #if !CYTHON_METH_FASTCALL
  7260. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  7261. #endif
  7262. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  7263. PyObject* values[1] = {0};
  7264. int __pyx_lineno = 0;
  7265. const char *__pyx_filename = NULL;
  7266. int __pyx_clineno = 0;
  7267. PyObject *__pyx_r = 0;
  7268. __Pyx_RefNannyDeclarations
  7269. __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  7270. #if !CYTHON_METH_FASTCALL
  7271. #if CYTHON_ASSUME_SAFE_SIZE
  7272. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  7273. #else
  7274. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  7275. #endif
  7276. #endif
  7277. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  7278. {
  7279. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  7280. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  7281. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 227, __pyx_L3_error)
  7282. if (__pyx_kwds_len > 0) {
  7283. switch (__pyx_nargs) {
  7284. case 1:
  7285. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7286. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 227, __pyx_L3_error)
  7287. CYTHON_FALLTHROUGH;
  7288. case 0: break;
  7289. default: goto __pyx_L5_argtuple_error;
  7290. }
  7291. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  7292. 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)
  7293. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  7294. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 227, __pyx_L3_error) }
  7295. }
  7296. } else if (unlikely(__pyx_nargs != 1)) {
  7297. goto __pyx_L5_argtuple_error;
  7298. } else {
  7299. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  7300. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 227, __pyx_L3_error)
  7301. }
  7302. __pyx_v_self = values[0];
  7303. }
  7304. goto __pyx_L6_skip;
  7305. __pyx_L5_argtuple_error:;
  7306. __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 227, __pyx_L3_error)
  7307. __pyx_L6_skip:;
  7308. goto __pyx_L4_argument_unpacking_done;
  7309. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7314. __Pyx_RefNannyFinishContext();
  7315. return NULL;
  7316. __pyx_L4_argument_unpacking_done:;
  7317. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__(__pyx_self, __pyx_v_self);
  7318. /* function exit code */
  7319. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  7320. Py_XDECREF(values[__pyx_temp]);
  7321. }
  7322. __Pyx_RefNannyFinishContext();
  7323. return __pyx_r;
  7324. }
  7325. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_6__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  7326. PyObject *__pyx_v_lexer = NULL;
  7327. PyObject *__pyx_v_token_type = NULL;
  7328. PyObject *__pyx_v_token = NULL;
  7329. PyObject *__pyx_v_location = NULL;
  7330. PyObject *__pyx_v_fname_type = NULL;
  7331. PyObject *__pyx_v_fname_token = NULL;
  7332. PyObject *__pyx_v_fname_location = NULL;
  7333. PyObject *__pyx_v_path = NULL;
  7334. PyObject *__pyx_v_curpath = NULL;
  7335. PyObject *__pyx_v_err = NULL;
  7336. PyObject *__pyx_r = NULL;
  7337. __Pyx_RefNannyDeclarations
  7338. PyObject *__pyx_t_1 = NULL;
  7339. int __pyx_t_2;
  7340. PyObject *__pyx_t_3 = NULL;
  7341. PyObject *__pyx_t_4 = NULL;
  7342. PyObject *__pyx_t_5 = NULL;
  7343. PyObject *__pyx_t_6 = NULL;
  7344. PyObject *__pyx_t_7 = NULL;
  7345. PyObject *__pyx_t_8 = NULL;
  7346. PyObject *__pyx_t_9 = NULL;
  7347. PyObject *(*__pyx_t_10)(PyObject *);
  7348. int __pyx_t_11;
  7349. int __pyx_t_12;
  7350. size_t __pyx_t_13;
  7351. Py_ssize_t __pyx_t_14;
  7352. int __pyx_t_15;
  7353. PyObject *__pyx_t_16 = NULL;
  7354. int __pyx_t_17;
  7355. char const *__pyx_t_18;
  7356. PyObject *__pyx_t_19 = NULL;
  7357. PyObject *__pyx_t_20 = NULL;
  7358. PyObject *__pyx_t_21 = NULL;
  7359. PyObject *__pyx_t_22 = NULL;
  7360. PyObject *__pyx_t_23 = NULL;
  7361. PyObject *__pyx_t_24 = NULL;
  7362. int __pyx_lineno = 0;
  7363. const char *__pyx_filename = NULL;
  7364. int __pyx_clineno = 0;
  7365. __Pyx_RefNannySetupContext("__next__", 0);
  7366. /* "fontTools/feaLib/lexer.py":228
  7367. *
  7368. * def __next__(self): # Python 3
  7369. * while self.lexers_: # <<<<<<<<<<<<<<
  7370. * lexer = self.lexers_[-1]
  7371. * try:
  7372. */
  7373. while (1) {
  7374. __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)
  7375. __Pyx_GOTREF(__pyx_t_1);
  7376. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 228, __pyx_L1_error)
  7377. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7378. if (!__pyx_t_2) break;
  7379. /* "fontTools/feaLib/lexer.py":229
  7380. * def __next__(self): # Python 3
  7381. * while self.lexers_:
  7382. * lexer = self.lexers_[-1] # <<<<<<<<<<<<<<
  7383. * try:
  7384. * token_type, token, location = next(lexer)
  7385. */
  7386. __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)
  7387. __Pyx_GOTREF(__pyx_t_1);
  7388. __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)
  7389. __Pyx_GOTREF(__pyx_t_3);
  7390. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7391. __Pyx_XDECREF_SET(__pyx_v_lexer, __pyx_t_3);
  7392. __pyx_t_3 = 0;
  7393. /* "fontTools/feaLib/lexer.py":230
  7394. * while self.lexers_:
  7395. * lexer = self.lexers_[-1]
  7396. * try: # <<<<<<<<<<<<<<
  7397. * token_type, token, location = next(lexer)
  7398. * except StopIteration:
  7399. */
  7400. {
  7401. __Pyx_PyThreadState_declare
  7402. __Pyx_PyThreadState_assign
  7403. __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
  7404. __Pyx_XGOTREF(__pyx_t_4);
  7405. __Pyx_XGOTREF(__pyx_t_5);
  7406. __Pyx_XGOTREF(__pyx_t_6);
  7407. /*try:*/ {
  7408. /* "fontTools/feaLib/lexer.py":231
  7409. * lexer = self.lexers_[-1]
  7410. * try:
  7411. * token_type, token, location = next(lexer) # <<<<<<<<<<<<<<
  7412. * except StopIteration:
  7413. * self.lexers_.pop()
  7414. */
  7415. __pyx_t_3 = __Pyx_PyIter_Next(__pyx_v_lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L5_error)
  7416. __Pyx_GOTREF(__pyx_t_3);
  7417. if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
  7418. PyObject* sequence = __pyx_t_3;
  7419. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  7420. if (unlikely(size != 3)) {
  7421. if (size > 3) __Pyx_RaiseTooManyValuesError(3);
  7422. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  7423. __PYX_ERR(0, 231, __pyx_L5_error)
  7424. }
  7425. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  7426. if (likely(PyTuple_CheckExact(sequence))) {
  7427. __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
  7428. __Pyx_INCREF(__pyx_t_1);
  7429. __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
  7430. __Pyx_INCREF(__pyx_t_7);
  7431. __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2);
  7432. __Pyx_INCREF(__pyx_t_8);
  7433. } else {
  7434. __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
  7435. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L5_error)
  7436. __Pyx_XGOTREF(__pyx_t_1);
  7437. __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
  7438. if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L5_error)
  7439. __Pyx_XGOTREF(__pyx_t_7);
  7440. __pyx_t_8 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
  7441. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L5_error)
  7442. __Pyx_XGOTREF(__pyx_t_8);
  7443. }
  7444. #else
  7445. __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L5_error)
  7446. __Pyx_GOTREF(__pyx_t_1);
  7447. __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L5_error)
  7448. __Pyx_GOTREF(__pyx_t_7);
  7449. __pyx_t_8 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 231, __pyx_L5_error)
  7450. __Pyx_GOTREF(__pyx_t_8);
  7451. #endif
  7452. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7453. } else {
  7454. Py_ssize_t index = -1;
  7455. __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L5_error)
  7456. __Pyx_GOTREF(__pyx_t_9);
  7457. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7458. __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
  7459. index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L13_unpacking_failed;
  7460. __Pyx_GOTREF(__pyx_t_1);
  7461. index = 1; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L13_unpacking_failed;
  7462. __Pyx_GOTREF(__pyx_t_7);
  7463. index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L13_unpacking_failed;
  7464. __Pyx_GOTREF(__pyx_t_8);
  7465. if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < (0)) __PYX_ERR(0, 231, __pyx_L5_error)
  7466. __pyx_t_10 = NULL;
  7467. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7468. goto __pyx_L14_unpacking_done;
  7469. __pyx_L13_unpacking_failed:;
  7470. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7471. __pyx_t_10 = NULL;
  7472. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  7473. __PYX_ERR(0, 231, __pyx_L5_error)
  7474. __pyx_L14_unpacking_done:;
  7475. }
  7476. __Pyx_XDECREF_SET(__pyx_v_token_type, __pyx_t_1);
  7477. __pyx_t_1 = 0;
  7478. __Pyx_XDECREF_SET(__pyx_v_token, __pyx_t_7);
  7479. __pyx_t_7 = 0;
  7480. __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_8);
  7481. __pyx_t_8 = 0;
  7482. /* "fontTools/feaLib/lexer.py":230
  7483. * while self.lexers_:
  7484. * lexer = self.lexers_[-1]
  7485. * try: # <<<<<<<<<<<<<<
  7486. * token_type, token, location = next(lexer)
  7487. * except StopIteration:
  7488. */
  7489. }
  7490. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  7491. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  7492. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  7493. goto __pyx_L12_try_end;
  7494. __pyx_L5_error:;
  7495. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  7496. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7497. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7498. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  7499. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  7500. /* "fontTools/feaLib/lexer.py":232
  7501. * try:
  7502. * token_type, token, location = next(lexer)
  7503. * except StopIteration: # <<<<<<<<<<<<<<
  7504. * self.lexers_.pop()
  7505. * continue
  7506. */
  7507. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration))));
  7508. if (__pyx_t_11) {
  7509. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7510. if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 232, __pyx_L7_except_error)
  7511. __Pyx_XGOTREF(__pyx_t_3);
  7512. __Pyx_XGOTREF(__pyx_t_8);
  7513. __Pyx_XGOTREF(__pyx_t_7);
  7514. /* "fontTools/feaLib/lexer.py":233
  7515. * token_type, token, location = next(lexer)
  7516. * except StopIteration:
  7517. * self.lexers_.pop() # <<<<<<<<<<<<<<
  7518. * continue
  7519. * if token_type is Lexer.NAME and token == "include":
  7520. */
  7521. __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)
  7522. __Pyx_GOTREF(__pyx_t_1);
  7523. __pyx_t_9 = __Pyx_PyObject_Pop(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 233, __pyx_L7_except_error)
  7524. __Pyx_GOTREF(__pyx_t_9);
  7525. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7526. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7527. /* "fontTools/feaLib/lexer.py":234
  7528. * except StopIteration:
  7529. * self.lexers_.pop()
  7530. * continue # <<<<<<<<<<<<<<
  7531. * if token_type is Lexer.NAME and token == "include":
  7532. * fname_type, fname_token, fname_location = lexer.next()
  7533. */
  7534. goto __pyx_L15_except_continue;
  7535. __pyx_L15_except_continue:;
  7536. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7537. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7538. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7539. goto __pyx_L11_try_continue;
  7540. }
  7541. goto __pyx_L7_except_error;
  7542. /* "fontTools/feaLib/lexer.py":230
  7543. * while self.lexers_:
  7544. * lexer = self.lexers_[-1]
  7545. * try: # <<<<<<<<<<<<<<
  7546. * token_type, token, location = next(lexer)
  7547. * except StopIteration:
  7548. */
  7549. __pyx_L7_except_error:;
  7550. __Pyx_XGIVEREF(__pyx_t_4);
  7551. __Pyx_XGIVEREF(__pyx_t_5);
  7552. __Pyx_XGIVEREF(__pyx_t_6);
  7553. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  7554. goto __pyx_L1_error;
  7555. __pyx_L11_try_continue:;
  7556. __Pyx_XGIVEREF(__pyx_t_4);
  7557. __Pyx_XGIVEREF(__pyx_t_5);
  7558. __Pyx_XGIVEREF(__pyx_t_6);
  7559. __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
  7560. goto __pyx_L3_continue;
  7561. __pyx_L12_try_end:;
  7562. }
  7563. /* "fontTools/feaLib/lexer.py":235
  7564. * self.lexers_.pop()
  7565. * continue
  7566. * if token_type is Lexer.NAME and token == "include": # <<<<<<<<<<<<<<
  7567. * fname_type, fname_token, fname_location = lexer.next()
  7568. * if fname_type is not Lexer.FILENAME:
  7569. */
  7570. __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
  7571. __Pyx_GOTREF(__pyx_t_7);
  7572. __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)
  7573. __Pyx_GOTREF(__pyx_t_8);
  7574. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7575. __pyx_t_12 = (__pyx_v_token_type == __pyx_t_8);
  7576. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7577. if (__pyx_t_12) {
  7578. } else {
  7579. __pyx_t_2 = __pyx_t_12;
  7580. goto __pyx_L18_bool_binop_done;
  7581. }
  7582. __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)
  7583. __pyx_t_2 = __pyx_t_12;
  7584. __pyx_L18_bool_binop_done:;
  7585. if (__pyx_t_2) {
  7586. /* "fontTools/feaLib/lexer.py":236
  7587. * continue
  7588. * if token_type is Lexer.NAME and token == "include":
  7589. * fname_type, fname_token, fname_location = lexer.next() # <<<<<<<<<<<<<<
  7590. * if fname_type is not Lexer.FILENAME:
  7591. * raise FeatureLibError("Expected file name", fname_location)
  7592. */
  7593. __pyx_t_7 = __pyx_v_lexer;
  7594. __Pyx_INCREF(__pyx_t_7);
  7595. __pyx_t_13 = 0;
  7596. {
  7597. PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
  7598. __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));
  7599. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7600. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 236, __pyx_L1_error)
  7601. __Pyx_GOTREF(__pyx_t_8);
  7602. }
  7603. if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
  7604. PyObject* sequence = __pyx_t_8;
  7605. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  7606. if (unlikely(size != 3)) {
  7607. if (size > 3) __Pyx_RaiseTooManyValuesError(3);
  7608. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  7609. __PYX_ERR(0, 236, __pyx_L1_error)
  7610. }
  7611. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  7612. if (likely(PyTuple_CheckExact(sequence))) {
  7613. __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
  7614. __Pyx_INCREF(__pyx_t_7);
  7615. __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
  7616. __Pyx_INCREF(__pyx_t_3);
  7617. __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2);
  7618. __Pyx_INCREF(__pyx_t_9);
  7619. } else {
  7620. __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference);
  7621. if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
  7622. __Pyx_XGOTREF(__pyx_t_7);
  7623. __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference);
  7624. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
  7625. __Pyx_XGOTREF(__pyx_t_3);
  7626. __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference);
  7627. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error)
  7628. __Pyx_XGOTREF(__pyx_t_9);
  7629. }
  7630. #else
  7631. __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 236, __pyx_L1_error)
  7632. __Pyx_GOTREF(__pyx_t_7);
  7633. __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
  7634. __Pyx_GOTREF(__pyx_t_3);
  7635. __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error)
  7636. __Pyx_GOTREF(__pyx_t_9);
  7637. #endif
  7638. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7639. } else {
  7640. Py_ssize_t index = -1;
  7641. __pyx_t_1 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
  7642. __Pyx_GOTREF(__pyx_t_1);
  7643. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7644. __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1);
  7645. index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L20_unpacking_failed;
  7646. __Pyx_GOTREF(__pyx_t_7);
  7647. index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L20_unpacking_failed;
  7648. __Pyx_GOTREF(__pyx_t_3);
  7649. index = 2; __pyx_t_9 = __pyx_t_10(__pyx_t_1); if (unlikely(!__pyx_t_9)) goto __pyx_L20_unpacking_failed;
  7650. __Pyx_GOTREF(__pyx_t_9);
  7651. if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_1), 3) < (0)) __PYX_ERR(0, 236, __pyx_L1_error)
  7652. __pyx_t_10 = NULL;
  7653. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7654. goto __pyx_L21_unpacking_done;
  7655. __pyx_L20_unpacking_failed:;
  7656. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7657. __pyx_t_10 = NULL;
  7658. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  7659. __PYX_ERR(0, 236, __pyx_L1_error)
  7660. __pyx_L21_unpacking_done:;
  7661. }
  7662. __Pyx_XDECREF_SET(__pyx_v_fname_type, __pyx_t_7);
  7663. __pyx_t_7 = 0;
  7664. __Pyx_XDECREF_SET(__pyx_v_fname_token, __pyx_t_3);
  7665. __pyx_t_3 = 0;
  7666. __Pyx_XDECREF_SET(__pyx_v_fname_location, __pyx_t_9);
  7667. __pyx_t_9 = 0;
  7668. /* "fontTools/feaLib/lexer.py":237
  7669. * if token_type is Lexer.NAME and token == "include":
  7670. * fname_type, fname_token, fname_location = lexer.next()
  7671. * if fname_type is not Lexer.FILENAME: # <<<<<<<<<<<<<<
  7672. * raise FeatureLibError("Expected file name", fname_location)
  7673. * # semi_type, semi_token, semi_location = lexer.next()
  7674. */
  7675. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 237, __pyx_L1_error)
  7676. __Pyx_GOTREF(__pyx_t_8);
  7677. __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)
  7678. __Pyx_GOTREF(__pyx_t_9);
  7679. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7680. __pyx_t_2 = (__pyx_v_fname_type != __pyx_t_9);
  7681. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7682. if (unlikely(__pyx_t_2)) {
  7683. /* "fontTools/feaLib/lexer.py":238
  7684. * fname_type, fname_token, fname_location = lexer.next()
  7685. * if fname_type is not Lexer.FILENAME:
  7686. * raise FeatureLibError("Expected file name", fname_location) # <<<<<<<<<<<<<<
  7687. * # semi_type, semi_token, semi_location = lexer.next()
  7688. * # if semi_type is not Lexer.SYMBOL or semi_token != ";":
  7689. */
  7690. __pyx_t_8 = NULL;
  7691. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
  7692. __Pyx_GOTREF(__pyx_t_3);
  7693. __pyx_t_13 = 1;
  7694. #if CYTHON_UNPACK_METHODS
  7695. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  7696. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
  7697. assert(__pyx_t_8);
  7698. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  7699. __Pyx_INCREF(__pyx_t_8);
  7700. __Pyx_INCREF(__pyx__function);
  7701. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  7702. __pyx_t_13 = 0;
  7703. }
  7704. #endif
  7705. {
  7706. PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_Expected_file_name, __pyx_v_fname_location};
  7707. __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));
  7708. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  7709. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7710. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error)
  7711. __Pyx_GOTREF(__pyx_t_9);
  7712. }
  7713. __Pyx_Raise(__pyx_t_9, 0, 0, 0);
  7714. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7715. __PYX_ERR(0, 238, __pyx_L1_error)
  7716. /* "fontTools/feaLib/lexer.py":237
  7717. * if token_type is Lexer.NAME and token == "include":
  7718. * fname_type, fname_token, fname_location = lexer.next()
  7719. * if fname_type is not Lexer.FILENAME: # <<<<<<<<<<<<<<
  7720. * raise FeatureLibError("Expected file name", fname_location)
  7721. * # semi_type, semi_token, semi_location = lexer.next()
  7722. */
  7723. }
  7724. /* "fontTools/feaLib/lexer.py":242
  7725. * # if semi_type is not Lexer.SYMBOL or semi_token != ";":
  7726. * # raise FeatureLibError("Expected ';'", semi_location)
  7727. * if os.path.isabs(fname_token): # <<<<<<<<<<<<<<
  7728. * path = fname_token
  7729. * else:
  7730. */
  7731. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 242, __pyx_L1_error)
  7732. __Pyx_GOTREF(__pyx_t_8);
  7733. __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)
  7734. __Pyx_GOTREF(__pyx_t_7);
  7735. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7736. __pyx_t_3 = __pyx_t_7;
  7737. __Pyx_INCREF(__pyx_t_3);
  7738. __pyx_t_13 = 0;
  7739. {
  7740. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_fname_token};
  7741. __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));
  7742. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7743. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7744. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 242, __pyx_L1_error)
  7745. __Pyx_GOTREF(__pyx_t_9);
  7746. }
  7747. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 242, __pyx_L1_error)
  7748. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7749. if (__pyx_t_2) {
  7750. /* "fontTools/feaLib/lexer.py":243
  7751. * # raise FeatureLibError("Expected ';'", semi_location)
  7752. * if os.path.isabs(fname_token):
  7753. * path = fname_token # <<<<<<<<<<<<<<
  7754. * else:
  7755. * if self.includeDir is not None:
  7756. */
  7757. __Pyx_INCREF(__pyx_v_fname_token);
  7758. __Pyx_XDECREF_SET(__pyx_v_path, __pyx_v_fname_token);
  7759. /* "fontTools/feaLib/lexer.py":242
  7760. * # if semi_type is not Lexer.SYMBOL or semi_token != ";":
  7761. * # raise FeatureLibError("Expected ';'", semi_location)
  7762. * if os.path.isabs(fname_token): # <<<<<<<<<<<<<<
  7763. * path = fname_token
  7764. * else:
  7765. */
  7766. goto __pyx_L23;
  7767. }
  7768. /* "fontTools/feaLib/lexer.py":245
  7769. * path = fname_token
  7770. * else:
  7771. * if self.includeDir is not None: # <<<<<<<<<<<<<<
  7772. * curpath = self.includeDir
  7773. * elif self.featurefilepath is not None:
  7774. */
  7775. /*else*/ {
  7776. __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)
  7777. __Pyx_GOTREF(__pyx_t_9);
  7778. __pyx_t_2 = (__pyx_t_9 != Py_None);
  7779. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7780. if (__pyx_t_2) {
  7781. /* "fontTools/feaLib/lexer.py":246
  7782. * else:
  7783. * if self.includeDir is not None:
  7784. * curpath = self.includeDir # <<<<<<<<<<<<<<
  7785. * elif self.featurefilepath is not None:
  7786. * curpath = os.path.dirname(self.featurefilepath)
  7787. */
  7788. __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)
  7789. __Pyx_GOTREF(__pyx_t_9);
  7790. __Pyx_XDECREF_SET(__pyx_v_curpath, __pyx_t_9);
  7791. __pyx_t_9 = 0;
  7792. /* "fontTools/feaLib/lexer.py":245
  7793. * path = fname_token
  7794. * else:
  7795. * if self.includeDir is not None: # <<<<<<<<<<<<<<
  7796. * curpath = self.includeDir
  7797. * elif self.featurefilepath is not None:
  7798. */
  7799. goto __pyx_L24;
  7800. }
  7801. /* "fontTools/feaLib/lexer.py":247
  7802. * if self.includeDir is not None:
  7803. * curpath = self.includeDir
  7804. * elif self.featurefilepath is not None: # <<<<<<<<<<<<<<
  7805. * curpath = os.path.dirname(self.featurefilepath)
  7806. * else:
  7807. */
  7808. __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)
  7809. __Pyx_GOTREF(__pyx_t_9);
  7810. __pyx_t_2 = (__pyx_t_9 != Py_None);
  7811. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7812. if (__pyx_t_2) {
  7813. /* "fontTools/feaLib/lexer.py":248
  7814. * curpath = self.includeDir
  7815. * elif self.featurefilepath is not None:
  7816. * curpath = os.path.dirname(self.featurefilepath) # <<<<<<<<<<<<<<
  7817. * else:
  7818. * # if the IncludingLexer was initialized from an in-memory
  7819. */
  7820. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
  7821. __Pyx_GOTREF(__pyx_t_3);
  7822. __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)
  7823. __Pyx_GOTREF(__pyx_t_8);
  7824. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7825. __pyx_t_7 = __pyx_t_8;
  7826. __Pyx_INCREF(__pyx_t_7);
  7827. __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)
  7828. __Pyx_GOTREF(__pyx_t_3);
  7829. __pyx_t_13 = 0;
  7830. {
  7831. PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
  7832. __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));
  7833. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7834. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7835. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7836. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 248, __pyx_L1_error)
  7837. __Pyx_GOTREF(__pyx_t_9);
  7838. }
  7839. __Pyx_XDECREF_SET(__pyx_v_curpath, __pyx_t_9);
  7840. __pyx_t_9 = 0;
  7841. /* "fontTools/feaLib/lexer.py":247
  7842. * if self.includeDir is not None:
  7843. * curpath = self.includeDir
  7844. * elif self.featurefilepath is not None: # <<<<<<<<<<<<<<
  7845. * curpath = os.path.dirname(self.featurefilepath)
  7846. * else:
  7847. */
  7848. goto __pyx_L24;
  7849. }
  7850. /* "fontTools/feaLib/lexer.py":254
  7851. * # its filesystem path, therefore we fall back to using the
  7852. * # current working directory to resolve relative includes
  7853. * curpath = os.getcwd() # <<<<<<<<<<<<<<
  7854. * path = os.path.join(curpath, fname_token)
  7855. * if len(self.lexers_) >= 5:
  7856. */
  7857. /*else*/ {
  7858. __pyx_t_8 = NULL;
  7859. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error)
  7860. __Pyx_GOTREF(__pyx_t_3);
  7861. __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)
  7862. __Pyx_GOTREF(__pyx_t_7);
  7863. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7864. __pyx_t_13 = 1;
  7865. #if CYTHON_UNPACK_METHODS
  7866. if (unlikely(PyMethod_Check(__pyx_t_7))) {
  7867. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  7868. assert(__pyx_t_8);
  7869. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
  7870. __Pyx_INCREF(__pyx_t_8);
  7871. __Pyx_INCREF(__pyx__function);
  7872. __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
  7873. __pyx_t_13 = 0;
  7874. }
  7875. #endif
  7876. {
  7877. PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
  7878. __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));
  7879. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  7880. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7881. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 254, __pyx_L1_error)
  7882. __Pyx_GOTREF(__pyx_t_9);
  7883. }
  7884. __Pyx_XDECREF_SET(__pyx_v_curpath, __pyx_t_9);
  7885. __pyx_t_9 = 0;
  7886. }
  7887. __pyx_L24:;
  7888. /* "fontTools/feaLib/lexer.py":255
  7889. * # current working directory to resolve relative includes
  7890. * curpath = os.getcwd()
  7891. * path = os.path.join(curpath, fname_token) # <<<<<<<<<<<<<<
  7892. * if len(self.lexers_) >= 5:
  7893. * raise FeatureLibError("Too many recursive includes", fname_location)
  7894. */
  7895. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 255, __pyx_L1_error)
  7896. __Pyx_GOTREF(__pyx_t_8);
  7897. __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)
  7898. __Pyx_GOTREF(__pyx_t_3);
  7899. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  7900. __pyx_t_7 = __pyx_t_3;
  7901. __Pyx_INCREF(__pyx_t_7);
  7902. __pyx_t_13 = 0;
  7903. {
  7904. PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_curpath, __pyx_v_fname_token};
  7905. __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));
  7906. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  7907. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7908. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 255, __pyx_L1_error)
  7909. __Pyx_GOTREF(__pyx_t_9);
  7910. }
  7911. __Pyx_XDECREF_SET(__pyx_v_path, __pyx_t_9);
  7912. __pyx_t_9 = 0;
  7913. }
  7914. __pyx_L23:;
  7915. /* "fontTools/feaLib/lexer.py":256
  7916. * curpath = os.getcwd()
  7917. * path = os.path.join(curpath, fname_token)
  7918. * if len(self.lexers_) >= 5: # <<<<<<<<<<<<<<
  7919. * raise FeatureLibError("Too many recursive includes", fname_location)
  7920. * try:
  7921. */
  7922. __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)
  7923. __Pyx_GOTREF(__pyx_t_9);
  7924. __pyx_t_14 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 256, __pyx_L1_error)
  7925. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7926. __pyx_t_2 = (__pyx_t_14 >= 5);
  7927. if (unlikely(__pyx_t_2)) {
  7928. /* "fontTools/feaLib/lexer.py":257
  7929. * path = os.path.join(curpath, fname_token)
  7930. * if len(self.lexers_) >= 5:
  7931. * raise FeatureLibError("Too many recursive includes", fname_location) # <<<<<<<<<<<<<<
  7932. * try:
  7933. * self.lexers_.append(self.make_lexer_(path))
  7934. */
  7935. __pyx_t_3 = NULL;
  7936. __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FeatureLibError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 257, __pyx_L1_error)
  7937. __Pyx_GOTREF(__pyx_t_7);
  7938. __pyx_t_13 = 1;
  7939. #if CYTHON_UNPACK_METHODS
  7940. if (unlikely(PyMethod_Check(__pyx_t_7))) {
  7941. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
  7942. assert(__pyx_t_3);
  7943. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
  7944. __Pyx_INCREF(__pyx_t_3);
  7945. __Pyx_INCREF(__pyx__function);
  7946. __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
  7947. __pyx_t_13 = 0;
  7948. }
  7949. #endif
  7950. {
  7951. PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Too_many_recursive_includes, __pyx_v_fname_location};
  7952. __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));
  7953. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7954. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  7955. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 257, __pyx_L1_error)
  7956. __Pyx_GOTREF(__pyx_t_9);
  7957. }
  7958. __Pyx_Raise(__pyx_t_9, 0, 0, 0);
  7959. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  7960. __PYX_ERR(0, 257, __pyx_L1_error)
  7961. /* "fontTools/feaLib/lexer.py":256
  7962. * curpath = os.getcwd()
  7963. * path = os.path.join(curpath, fname_token)
  7964. * if len(self.lexers_) >= 5: # <<<<<<<<<<<<<<
  7965. * raise FeatureLibError("Too many recursive includes", fname_location)
  7966. * try:
  7967. */
  7968. }
  7969. /* "fontTools/feaLib/lexer.py":258
  7970. * if len(self.lexers_) >= 5:
  7971. * raise FeatureLibError("Too many recursive includes", fname_location)
  7972. * try: # <<<<<<<<<<<<<<
  7973. * self.lexers_.append(self.make_lexer_(path))
  7974. * except FileNotFoundError as err:
  7975. */
  7976. {
  7977. __Pyx_PyThreadState_declare
  7978. __Pyx_PyThreadState_assign
  7979. __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
  7980. __Pyx_XGOTREF(__pyx_t_6);
  7981. __Pyx_XGOTREF(__pyx_t_5);
  7982. __Pyx_XGOTREF(__pyx_t_4);
  7983. /*try:*/ {
  7984. /* "fontTools/feaLib/lexer.py":259
  7985. * raise FeatureLibError("Too many recursive includes", fname_location)
  7986. * try:
  7987. * self.lexers_.append(self.make_lexer_(path)) # <<<<<<<<<<<<<<
  7988. * except FileNotFoundError as err:
  7989. * raise IncludedFeaNotFound(fname_token, fname_location) from err
  7990. */
  7991. __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)
  7992. __Pyx_GOTREF(__pyx_t_9);
  7993. __pyx_t_3 = __pyx_v_self;
  7994. __Pyx_INCREF(__pyx_t_3);
  7995. __pyx_t_13 = 0;
  7996. {
  7997. PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_path};
  7998. __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));
  7999. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  8000. if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 259, __pyx_L26_error)
  8001. __Pyx_GOTREF(__pyx_t_7);
  8002. }
  8003. __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)
  8004. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  8005. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  8006. /* "fontTools/feaLib/lexer.py":258
  8007. * if len(self.lexers_) >= 5:
  8008. * raise FeatureLibError("Too many recursive includes", fname_location)
  8009. * try: # <<<<<<<<<<<<<<
  8010. * self.lexers_.append(self.make_lexer_(path))
  8011. * except FileNotFoundError as err:
  8012. */
  8013. }
  8014. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  8015. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8016. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  8017. goto __pyx_L33_try_end;
  8018. __pyx_L26_error:;
  8019. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  8020. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  8021. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  8022. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  8023. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  8024. /* "fontTools/feaLib/lexer.py":260
  8025. * try:
  8026. * self.lexers_.append(self.make_lexer_(path))
  8027. * except FileNotFoundError as err: # <<<<<<<<<<<<<<
  8028. * raise IncludedFeaNotFound(fname_token, fname_location) from err
  8029. * else:
  8030. */
  8031. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_FileNotFoundError))));
  8032. if (__pyx_t_11) {
  8033. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8034. if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 260, __pyx_L28_except_error)
  8035. __Pyx_XGOTREF(__pyx_t_7);
  8036. __Pyx_XGOTREF(__pyx_t_9);
  8037. __Pyx_XGOTREF(__pyx_t_3);
  8038. __Pyx_INCREF(__pyx_t_9);
  8039. __pyx_v_err = __pyx_t_9;
  8040. /*try:*/ {
  8041. /* "fontTools/feaLib/lexer.py":261
  8042. * self.lexers_.append(self.make_lexer_(path))
  8043. * except FileNotFoundError as err:
  8044. * raise IncludedFeaNotFound(fname_token, fname_location) from err # <<<<<<<<<<<<<<
  8045. * else:
  8046. * return (token_type, token, location)
  8047. */
  8048. __pyx_t_1 = NULL;
  8049. __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_IncludedFeaNotFound); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 261, __pyx_L39_error)
  8050. __Pyx_GOTREF(__pyx_t_16);
  8051. __pyx_t_13 = 1;
  8052. #if CYTHON_UNPACK_METHODS
  8053. if (unlikely(PyMethod_Check(__pyx_t_16))) {
  8054. __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_16);
  8055. assert(__pyx_t_1);
  8056. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
  8057. __Pyx_INCREF(__pyx_t_1);
  8058. __Pyx_INCREF(__pyx__function);
  8059. __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
  8060. __pyx_t_13 = 0;
  8061. }
  8062. #endif
  8063. {
  8064. PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_fname_token, __pyx_v_fname_location};
  8065. __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));
  8066. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  8067. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  8068. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 261, __pyx_L39_error)
  8069. __Pyx_GOTREF(__pyx_t_8);
  8070. }
  8071. __Pyx_Raise(__pyx_t_8, 0, 0, __pyx_v_err);
  8072. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  8073. __PYX_ERR(0, 261, __pyx_L39_error)
  8074. }
  8075. /* "fontTools/feaLib/lexer.py":260
  8076. * try:
  8077. * self.lexers_.append(self.make_lexer_(path))
  8078. * except FileNotFoundError as err: # <<<<<<<<<<<<<<
  8079. * raise IncludedFeaNotFound(fname_token, fname_location) from err
  8080. * else:
  8081. */
  8082. /*finally:*/ {
  8083. __pyx_L39_error:;
  8084. /*exception exit:*/{
  8085. __Pyx_PyThreadState_declare
  8086. __Pyx_PyThreadState_assign
  8087. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  8088. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  8089. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  8090. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  8091. __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
  8092. 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);
  8093. __Pyx_XGOTREF(__pyx_t_19);
  8094. __Pyx_XGOTREF(__pyx_t_20);
  8095. __Pyx_XGOTREF(__pyx_t_21);
  8096. __Pyx_XGOTREF(__pyx_t_22);
  8097. __Pyx_XGOTREF(__pyx_t_23);
  8098. __Pyx_XGOTREF(__pyx_t_24);
  8099. __pyx_t_11 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
  8100. {
  8101. __Pyx_DECREF(__pyx_v_err); __pyx_v_err = 0;
  8102. }
  8103. __Pyx_XGIVEREF(__pyx_t_22);
  8104. __Pyx_XGIVEREF(__pyx_t_23);
  8105. __Pyx_XGIVEREF(__pyx_t_24);
  8106. __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
  8107. __Pyx_XGIVEREF(__pyx_t_19);
  8108. __Pyx_XGIVEREF(__pyx_t_20);
  8109. __Pyx_XGIVEREF(__pyx_t_21);
  8110. __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  8111. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  8112. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
  8113. goto __pyx_L28_except_error;
  8114. }
  8115. }
  8116. }
  8117. goto __pyx_L28_except_error;
  8118. /* "fontTools/feaLib/lexer.py":258
  8119. * if len(self.lexers_) >= 5:
  8120. * raise FeatureLibError("Too many recursive includes", fname_location)
  8121. * try: # <<<<<<<<<<<<<<
  8122. * self.lexers_.append(self.make_lexer_(path))
  8123. * except FileNotFoundError as err:
  8124. */
  8125. __pyx_L28_except_error:;
  8126. __Pyx_XGIVEREF(__pyx_t_6);
  8127. __Pyx_XGIVEREF(__pyx_t_5);
  8128. __Pyx_XGIVEREF(__pyx_t_4);
  8129. __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_4);
  8130. goto __pyx_L1_error;
  8131. __pyx_L33_try_end:;
  8132. }
  8133. /* "fontTools/feaLib/lexer.py":235
  8134. * self.lexers_.pop()
  8135. * continue
  8136. * if token_type is Lexer.NAME and token == "include": # <<<<<<<<<<<<<<
  8137. * fname_type, fname_token, fname_location = lexer.next()
  8138. * if fname_type is not Lexer.FILENAME:
  8139. */
  8140. goto __pyx_L17;
  8141. }
  8142. /* "fontTools/feaLib/lexer.py":263
  8143. * raise IncludedFeaNotFound(fname_token, fname_location) from err
  8144. * else:
  8145. * return (token_type, token, location) # <<<<<<<<<<<<<<
  8146. * raise StopIteration()
  8147. *
  8148. */
  8149. /*else*/ {
  8150. __Pyx_XDECREF(__pyx_r);
  8151. __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error)
  8152. __Pyx_GOTREF(__pyx_t_3);
  8153. __Pyx_INCREF(__pyx_v_token_type);
  8154. __Pyx_GIVEREF(__pyx_v_token_type);
  8155. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_token_type) != (0)) __PYX_ERR(0, 263, __pyx_L1_error);
  8156. __Pyx_INCREF(__pyx_v_token);
  8157. __Pyx_GIVEREF(__pyx_v_token);
  8158. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_token) != (0)) __PYX_ERR(0, 263, __pyx_L1_error);
  8159. __Pyx_INCREF(__pyx_v_location);
  8160. __Pyx_GIVEREF(__pyx_v_location);
  8161. if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_location) != (0)) __PYX_ERR(0, 263, __pyx_L1_error);
  8162. __pyx_r = __pyx_t_3;
  8163. __pyx_t_3 = 0;
  8164. goto __pyx_L0;
  8165. }
  8166. __pyx_L17:;
  8167. __pyx_L3_continue:;
  8168. }
  8169. /* "fontTools/feaLib/lexer.py":264
  8170. * else:
  8171. * return (token_type, token, location)
  8172. * raise StopIteration() # <<<<<<<<<<<<<<
  8173. *
  8174. * @staticmethod
  8175. */
  8176. __pyx_t_9 = NULL;
  8177. __pyx_t_13 = 1;
  8178. {
  8179. PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
  8180. __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));
  8181. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  8182. if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
  8183. __Pyx_GOTREF(__pyx_t_3);
  8184. }
  8185. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  8186. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8187. __PYX_ERR(0, 264, __pyx_L1_error)
  8188. /* "fontTools/feaLib/lexer.py":227
  8189. * return self.__next__()
  8190. *
  8191. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  8192. * while self.lexers_:
  8193. * lexer = self.lexers_[-1]
  8194. */
  8195. /* function exit code */
  8196. __pyx_L1_error:;
  8197. __Pyx_XDECREF(__pyx_t_1);
  8198. __Pyx_XDECREF(__pyx_t_3);
  8199. __Pyx_XDECREF(__pyx_t_7);
  8200. __Pyx_XDECREF(__pyx_t_8);
  8201. __Pyx_XDECREF(__pyx_t_9);
  8202. __Pyx_XDECREF(__pyx_t_16);
  8203. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8204. __pyx_r = NULL;
  8205. __pyx_L0:;
  8206. __Pyx_XDECREF(__pyx_v_lexer);
  8207. __Pyx_XDECREF(__pyx_v_token_type);
  8208. __Pyx_XDECREF(__pyx_v_token);
  8209. __Pyx_XDECREF(__pyx_v_location);
  8210. __Pyx_XDECREF(__pyx_v_fname_type);
  8211. __Pyx_XDECREF(__pyx_v_fname_token);
  8212. __Pyx_XDECREF(__pyx_v_fname_location);
  8213. __Pyx_XDECREF(__pyx_v_path);
  8214. __Pyx_XDECREF(__pyx_v_curpath);
  8215. __Pyx_XDECREF(__pyx_v_err);
  8216. __Pyx_XGIVEREF(__pyx_r);
  8217. __Pyx_RefNannyFinishContext();
  8218. return __pyx_r;
  8219. }
  8220. /* "fontTools/feaLib/lexer.py":266
  8221. * raise StopIteration()
  8222. *
  8223. * @staticmethod # <<<<<<<<<<<<<<
  8224. * def make_lexer_(file_or_path):
  8225. * if hasattr(file_or_path, "read"):
  8226. */
  8227. /* Python wrapper */
  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. ); /*proto*/
  8235. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_, "IncludingLexer.make_lexer_(file_or_path)");
  8236. 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_};
  8237. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_9make_lexer_(PyObject *__pyx_self,
  8238. #if CYTHON_METH_FASTCALL
  8239. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  8240. #else
  8241. PyObject *__pyx_args, PyObject *__pyx_kwds
  8242. #endif
  8243. ) {
  8244. PyObject *__pyx_v_file_or_path = 0;
  8245. #if !CYTHON_METH_FASTCALL
  8246. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  8247. #endif
  8248. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  8249. PyObject* values[1] = {0};
  8250. int __pyx_lineno = 0;
  8251. const char *__pyx_filename = NULL;
  8252. int __pyx_clineno = 0;
  8253. PyObject *__pyx_r = 0;
  8254. __Pyx_RefNannyDeclarations
  8255. __Pyx_RefNannySetupContext("make_lexer_ (wrapper)", 0);
  8256. #if !CYTHON_METH_FASTCALL
  8257. #if CYTHON_ASSUME_SAFE_SIZE
  8258. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  8259. #else
  8260. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  8261. #endif
  8262. #endif
  8263. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  8264. {
  8265. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_file_or_path,0};
  8266. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  8267. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 266, __pyx_L3_error)
  8268. if (__pyx_kwds_len > 0) {
  8269. switch (__pyx_nargs) {
  8270. case 1:
  8271. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8272. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error)
  8273. CYTHON_FALLTHROUGH;
  8274. case 0: break;
  8275. default: goto __pyx_L5_argtuple_error;
  8276. }
  8277. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  8278. 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)
  8279. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  8280. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("make_lexer_", 1, 1, 1, i); __PYX_ERR(0, 266, __pyx_L3_error) }
  8281. }
  8282. } else if (unlikely(__pyx_nargs != 1)) {
  8283. goto __pyx_L5_argtuple_error;
  8284. } else {
  8285. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8286. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 266, __pyx_L3_error)
  8287. }
  8288. __pyx_v_file_or_path = values[0];
  8289. }
  8290. goto __pyx_L6_skip;
  8291. __pyx_L5_argtuple_error:;
  8292. __Pyx_RaiseArgtupleInvalid("make_lexer_", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 266, __pyx_L3_error)
  8293. __pyx_L6_skip:;
  8294. goto __pyx_L4_argument_unpacking_done;
  8295. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.make_lexer_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8300. __Pyx_RefNannyFinishContext();
  8301. return NULL;
  8302. __pyx_L4_argument_unpacking_done:;
  8303. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_(__pyx_self, __pyx_v_file_or_path);
  8304. /* function exit code */
  8305. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  8306. Py_XDECREF(values[__pyx_temp]);
  8307. }
  8308. __Pyx_RefNannyFinishContext();
  8309. return __pyx_r;
  8310. }
  8311. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_8make_lexer_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_file_or_path) {
  8312. PyObject *__pyx_v_fileobj = NULL;
  8313. int __pyx_v_closing;
  8314. PyObject *__pyx_v_filename = NULL;
  8315. PyObject *__pyx_v_data = NULL;
  8316. PyObject *__pyx_r = NULL;
  8317. __Pyx_RefNannyDeclarations
  8318. int __pyx_t_1;
  8319. PyObject *__pyx_t_2 = NULL;
  8320. PyObject *__pyx_t_3 = NULL;
  8321. size_t __pyx_t_4;
  8322. PyObject *__pyx_t_5 = NULL;
  8323. int __pyx_lineno = 0;
  8324. const char *__pyx_filename = NULL;
  8325. int __pyx_clineno = 0;
  8326. __Pyx_RefNannySetupContext("make_lexer_", 0);
  8327. /* "fontTools/feaLib/lexer.py":268
  8328. * @staticmethod
  8329. * def make_lexer_(file_or_path):
  8330. * if hasattr(file_or_path, "read"): # <<<<<<<<<<<<<<
  8331. * fileobj, closing = file_or_path, False
  8332. * else:
  8333. */
  8334. __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)
  8335. if (__pyx_t_1) {
  8336. /* "fontTools/feaLib/lexer.py":269
  8337. * def make_lexer_(file_or_path):
  8338. * if hasattr(file_or_path, "read"):
  8339. * fileobj, closing = file_or_path, False # <<<<<<<<<<<<<<
  8340. * else:
  8341. * filename, closing = file_or_path, True
  8342. */
  8343. __pyx_t_2 = __pyx_v_file_or_path;
  8344. __Pyx_INCREF(__pyx_t_2);
  8345. __pyx_t_1 = 0;
  8346. __pyx_v_fileobj = __pyx_t_2;
  8347. __pyx_t_2 = 0;
  8348. __pyx_v_closing = __pyx_t_1;
  8349. /* "fontTools/feaLib/lexer.py":268
  8350. * @staticmethod
  8351. * def make_lexer_(file_or_path):
  8352. * if hasattr(file_or_path, "read"): # <<<<<<<<<<<<<<
  8353. * fileobj, closing = file_or_path, False
  8354. * else:
  8355. */
  8356. goto __pyx_L3;
  8357. }
  8358. /* "fontTools/feaLib/lexer.py":271
  8359. * fileobj, closing = file_or_path, False
  8360. * else:
  8361. * filename, closing = file_or_path, True # <<<<<<<<<<<<<<
  8362. * fileobj = open(filename, "r", encoding="utf-8-sig")
  8363. * data = fileobj.read()
  8364. */
  8365. /*else*/ {
  8366. __pyx_t_2 = __pyx_v_file_or_path;
  8367. __Pyx_INCREF(__pyx_t_2);
  8368. __pyx_t_1 = 1;
  8369. __pyx_v_filename = __pyx_t_2;
  8370. __pyx_t_2 = 0;
  8371. __pyx_v_closing = __pyx_t_1;
  8372. /* "fontTools/feaLib/lexer.py":272
  8373. * else:
  8374. * filename, closing = file_or_path, True
  8375. * fileobj = open(filename, "r", encoding="utf-8-sig") # <<<<<<<<<<<<<<
  8376. * data = fileobj.read()
  8377. * filename = getattr(fileobj, "name", None)
  8378. */
  8379. __pyx_t_3 = NULL;
  8380. __pyx_t_4 = 1;
  8381. {
  8382. PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_filename, __pyx_mstate_global->__pyx_n_u_r};
  8383. __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 272, __pyx_L1_error)
  8384. __Pyx_GOTREF(__pyx_t_5);
  8385. 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)
  8386. __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);
  8387. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  8388. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  8389. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
  8390. __Pyx_GOTREF(__pyx_t_2);
  8391. }
  8392. __pyx_v_fileobj = __pyx_t_2;
  8393. __pyx_t_2 = 0;
  8394. }
  8395. __pyx_L3:;
  8396. /* "fontTools/feaLib/lexer.py":273
  8397. * filename, closing = file_or_path, True
  8398. * fileobj = open(filename, "r", encoding="utf-8-sig")
  8399. * data = fileobj.read() # <<<<<<<<<<<<<<
  8400. * filename = getattr(fileobj, "name", None)
  8401. * if closing:
  8402. */
  8403. __pyx_t_5 = __pyx_v_fileobj;
  8404. __Pyx_INCREF(__pyx_t_5);
  8405. __pyx_t_4 = 0;
  8406. {
  8407. PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
  8408. __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));
  8409. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8410. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
  8411. __Pyx_GOTREF(__pyx_t_2);
  8412. }
  8413. __pyx_v_data = __pyx_t_2;
  8414. __pyx_t_2 = 0;
  8415. /* "fontTools/feaLib/lexer.py":274
  8416. * fileobj = open(filename, "r", encoding="utf-8-sig")
  8417. * data = fileobj.read()
  8418. * filename = getattr(fileobj, "name", None) # <<<<<<<<<<<<<<
  8419. * if closing:
  8420. * fileobj.close()
  8421. */
  8422. __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)
  8423. __Pyx_GOTREF(__pyx_t_2);
  8424. __Pyx_XDECREF_SET(__pyx_v_filename, __pyx_t_2);
  8425. __pyx_t_2 = 0;
  8426. /* "fontTools/feaLib/lexer.py":275
  8427. * data = fileobj.read()
  8428. * filename = getattr(fileobj, "name", None)
  8429. * if closing: # <<<<<<<<<<<<<<
  8430. * fileobj.close()
  8431. * return Lexer(data, filename)
  8432. */
  8433. if (__pyx_v_closing) {
  8434. /* "fontTools/feaLib/lexer.py":276
  8435. * filename = getattr(fileobj, "name", None)
  8436. * if closing:
  8437. * fileobj.close() # <<<<<<<<<<<<<<
  8438. * return Lexer(data, filename)
  8439. *
  8440. */
  8441. __pyx_t_5 = __pyx_v_fileobj;
  8442. __Pyx_INCREF(__pyx_t_5);
  8443. __pyx_t_4 = 0;
  8444. {
  8445. PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
  8446. __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));
  8447. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8448. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
  8449. __Pyx_GOTREF(__pyx_t_2);
  8450. }
  8451. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8452. /* "fontTools/feaLib/lexer.py":275
  8453. * data = fileobj.read()
  8454. * filename = getattr(fileobj, "name", None)
  8455. * if closing: # <<<<<<<<<<<<<<
  8456. * fileobj.close()
  8457. * return Lexer(data, filename)
  8458. */
  8459. }
  8460. /* "fontTools/feaLib/lexer.py":277
  8461. * if closing:
  8462. * fileobj.close()
  8463. * return Lexer(data, filename) # <<<<<<<<<<<<<<
  8464. *
  8465. * def scan_anonymous_block(self, tag):
  8466. */
  8467. __Pyx_XDECREF(__pyx_r);
  8468. __pyx_t_5 = NULL;
  8469. __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lexer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error)
  8470. __Pyx_GOTREF(__pyx_t_3);
  8471. __pyx_t_4 = 1;
  8472. #if CYTHON_UNPACK_METHODS
  8473. if (unlikely(PyMethod_Check(__pyx_t_3))) {
  8474. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  8475. assert(__pyx_t_5);
  8476. PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
  8477. __Pyx_INCREF(__pyx_t_5);
  8478. __Pyx_INCREF(__pyx__function);
  8479. __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
  8480. __pyx_t_4 = 0;
  8481. }
  8482. #endif
  8483. {
  8484. PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_data, __pyx_v_filename};
  8485. __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));
  8486. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  8487. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8488. if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
  8489. __Pyx_GOTREF(__pyx_t_2);
  8490. }
  8491. __pyx_r = __pyx_t_2;
  8492. __pyx_t_2 = 0;
  8493. goto __pyx_L0;
  8494. /* "fontTools/feaLib/lexer.py":266
  8495. * raise StopIteration()
  8496. *
  8497. * @staticmethod # <<<<<<<<<<<<<<
  8498. * def make_lexer_(file_or_path):
  8499. * if hasattr(file_or_path, "read"):
  8500. */
  8501. /* function exit code */
  8502. __pyx_L1_error:;
  8503. __Pyx_XDECREF(__pyx_t_2);
  8504. __Pyx_XDECREF(__pyx_t_3);
  8505. __Pyx_XDECREF(__pyx_t_5);
  8506. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.make_lexer_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8507. __pyx_r = NULL;
  8508. __pyx_L0:;
  8509. __Pyx_XDECREF(__pyx_v_fileobj);
  8510. __Pyx_XDECREF(__pyx_v_filename);
  8511. __Pyx_XDECREF(__pyx_v_data);
  8512. __Pyx_XGIVEREF(__pyx_r);
  8513. __Pyx_RefNannyFinishContext();
  8514. return __pyx_r;
  8515. }
  8516. /* "fontTools/feaLib/lexer.py":279
  8517. * return Lexer(data, filename)
  8518. *
  8519. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  8520. * return self.lexers_[-1].scan_anonymous_block(tag)
  8521. *
  8522. */
  8523. /* Python wrapper */
  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. ); /*proto*/
  8531. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block, "IncludingLexer.scan_anonymous_block(self, tag)");
  8532. 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};
  8533. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_14IncludingLexer_11scan_anonymous_block(PyObject *__pyx_self,
  8534. #if CYTHON_METH_FASTCALL
  8535. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  8536. #else
  8537. PyObject *__pyx_args, PyObject *__pyx_kwds
  8538. #endif
  8539. ) {
  8540. PyObject *__pyx_v_self = 0;
  8541. PyObject *__pyx_v_tag = 0;
  8542. #if !CYTHON_METH_FASTCALL
  8543. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  8544. #endif
  8545. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  8546. PyObject* values[2] = {0,0};
  8547. int __pyx_lineno = 0;
  8548. const char *__pyx_filename = NULL;
  8549. int __pyx_clineno = 0;
  8550. PyObject *__pyx_r = 0;
  8551. __Pyx_RefNannyDeclarations
  8552. __Pyx_RefNannySetupContext("scan_anonymous_block (wrapper)", 0);
  8553. #if !CYTHON_METH_FASTCALL
  8554. #if CYTHON_ASSUME_SAFE_SIZE
  8555. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  8556. #else
  8557. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  8558. #endif
  8559. #endif
  8560. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  8561. {
  8562. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_tag,0};
  8563. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  8564. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 279, __pyx_L3_error)
  8565. if (__pyx_kwds_len > 0) {
  8566. switch (__pyx_nargs) {
  8567. case 2:
  8568. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  8569. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 279, __pyx_L3_error)
  8570. CYTHON_FALLTHROUGH;
  8571. case 1:
  8572. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8573. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 279, __pyx_L3_error)
  8574. CYTHON_FALLTHROUGH;
  8575. case 0: break;
  8576. default: goto __pyx_L5_argtuple_error;
  8577. }
  8578. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  8579. 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)
  8580. for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
  8581. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, i); __PYX_ERR(0, 279, __pyx_L3_error) }
  8582. }
  8583. } else if (unlikely(__pyx_nargs != 2)) {
  8584. goto __pyx_L5_argtuple_error;
  8585. } else {
  8586. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8587. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 279, __pyx_L3_error)
  8588. values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
  8589. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 279, __pyx_L3_error)
  8590. }
  8591. __pyx_v_self = values[0];
  8592. __pyx_v_tag = values[1];
  8593. }
  8594. goto __pyx_L6_skip;
  8595. __pyx_L5_argtuple_error:;
  8596. __Pyx_RaiseArgtupleInvalid("scan_anonymous_block", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 279, __pyx_L3_error)
  8597. __pyx_L6_skip:;
  8598. goto __pyx_L4_argument_unpacking_done;
  8599. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8604. __Pyx_RefNannyFinishContext();
  8605. return NULL;
  8606. __pyx_L4_argument_unpacking_done:;
  8607. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block(__pyx_self, __pyx_v_self, __pyx_v_tag);
  8608. /* function exit code */
  8609. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  8610. Py_XDECREF(values[__pyx_temp]);
  8611. }
  8612. __Pyx_RefNannyFinishContext();
  8613. return __pyx_r;
  8614. }
  8615. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_14IncludingLexer_10scan_anonymous_block(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
  8616. PyObject *__pyx_r = NULL;
  8617. __Pyx_RefNannyDeclarations
  8618. PyObject *__pyx_t_1 = NULL;
  8619. PyObject *__pyx_t_2 = NULL;
  8620. PyObject *__pyx_t_3 = NULL;
  8621. PyObject *__pyx_t_4 = NULL;
  8622. size_t __pyx_t_5;
  8623. int __pyx_lineno = 0;
  8624. const char *__pyx_filename = NULL;
  8625. int __pyx_clineno = 0;
  8626. __Pyx_RefNannySetupContext("scan_anonymous_block", 0);
  8627. /* "fontTools/feaLib/lexer.py":280
  8628. *
  8629. * def scan_anonymous_block(self, tag):
  8630. * return self.lexers_[-1].scan_anonymous_block(tag) # <<<<<<<<<<<<<<
  8631. *
  8632. *
  8633. */
  8634. __Pyx_XDECREF(__pyx_r);
  8635. __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)
  8636. __Pyx_GOTREF(__pyx_t_3);
  8637. __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)
  8638. __Pyx_GOTREF(__pyx_t_4);
  8639. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8640. __pyx_t_2 = __pyx_t_4;
  8641. __Pyx_INCREF(__pyx_t_2);
  8642. __pyx_t_5 = 0;
  8643. {
  8644. PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_tag};
  8645. __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));
  8646. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  8647. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8648. if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
  8649. __Pyx_GOTREF(__pyx_t_1);
  8650. }
  8651. __pyx_r = __pyx_t_1;
  8652. __pyx_t_1 = 0;
  8653. goto __pyx_L0;
  8654. /* "fontTools/feaLib/lexer.py":279
  8655. * return Lexer(data, filename)
  8656. *
  8657. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  8658. * return self.lexers_[-1].scan_anonymous_block(tag)
  8659. *
  8660. */
  8661. /* function exit code */
  8662. __pyx_L1_error:;
  8663. __Pyx_XDECREF(__pyx_t_1);
  8664. __Pyx_XDECREF(__pyx_t_2);
  8665. __Pyx_XDECREF(__pyx_t_3);
  8666. __Pyx_XDECREF(__pyx_t_4);
  8667. __Pyx_AddTraceback("fontTools.feaLib.lexer.IncludingLexer.scan_anonymous_block", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8668. __pyx_r = NULL;
  8669. __pyx_L0:;
  8670. __Pyx_XGIVEREF(__pyx_r);
  8671. __Pyx_RefNannyFinishContext();
  8672. return __pyx_r;
  8673. }
  8674. /* "fontTools/feaLib/lexer.py":286
  8675. * """Lexer that does not follow `include` statements, emits them as-is."""
  8676. *
  8677. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  8678. * return next(self.lexers_[0])
  8679. */
  8680. /* Python wrapper */
  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. ); /*proto*/
  8688. PyDoc_STRVAR(__pyx_doc_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__, "NonIncludingLexer.__next__(self)");
  8689. 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__};
  8690. static PyObject *__pyx_pw_9fontTools_6feaLib_5lexer_17NonIncludingLexer_1__next__(PyObject *__pyx_self,
  8691. #if CYTHON_METH_FASTCALL
  8692. PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
  8693. #else
  8694. PyObject *__pyx_args, PyObject *__pyx_kwds
  8695. #endif
  8696. ) {
  8697. PyObject *__pyx_v_self = 0;
  8698. #if !CYTHON_METH_FASTCALL
  8699. CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  8700. #endif
  8701. CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  8702. PyObject* values[1] = {0};
  8703. int __pyx_lineno = 0;
  8704. const char *__pyx_filename = NULL;
  8705. int __pyx_clineno = 0;
  8706. PyObject *__pyx_r = 0;
  8707. __Pyx_RefNannyDeclarations
  8708. __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  8709. #if !CYTHON_METH_FASTCALL
  8710. #if CYTHON_ASSUME_SAFE_SIZE
  8711. __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  8712. #else
  8713. __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  8714. #endif
  8715. #endif
  8716. __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  8717. {
  8718. PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0};
  8719. const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  8720. if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 286, __pyx_L3_error)
  8721. if (__pyx_kwds_len > 0) {
  8722. switch (__pyx_nargs) {
  8723. case 1:
  8724. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8725. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 286, __pyx_L3_error)
  8726. CYTHON_FALLTHROUGH;
  8727. case 0: break;
  8728. default: goto __pyx_L5_argtuple_error;
  8729. }
  8730. const Py_ssize_t kwd_pos_args = __pyx_nargs;
  8731. 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)
  8732. for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
  8733. if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, i); __PYX_ERR(0, 286, __pyx_L3_error) }
  8734. }
  8735. } else if (unlikely(__pyx_nargs != 1)) {
  8736. goto __pyx_L5_argtuple_error;
  8737. } else {
  8738. values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
  8739. if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 286, __pyx_L3_error)
  8740. }
  8741. __pyx_v_self = values[0];
  8742. }
  8743. goto __pyx_L6_skip;
  8744. __pyx_L5_argtuple_error:;
  8745. __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 286, __pyx_L3_error)
  8746. __pyx_L6_skip:;
  8747. goto __pyx_L4_argument_unpacking_done;
  8748. __pyx_L3_error:;
  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_AddTraceback("fontTools.feaLib.lexer.NonIncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8753. __Pyx_RefNannyFinishContext();
  8754. return NULL;
  8755. __pyx_L4_argument_unpacking_done:;
  8756. __pyx_r = __pyx_pf_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__(__pyx_self, __pyx_v_self);
  8757. /* function exit code */
  8758. for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
  8759. Py_XDECREF(values[__pyx_temp]);
  8760. }
  8761. __Pyx_RefNannyFinishContext();
  8762. return __pyx_r;
  8763. }
  8764. static PyObject *__pyx_pf_9fontTools_6feaLib_5lexer_17NonIncludingLexer___next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  8765. PyObject *__pyx_r = NULL;
  8766. __Pyx_RefNannyDeclarations
  8767. PyObject *__pyx_t_1 = NULL;
  8768. PyObject *__pyx_t_2 = NULL;
  8769. int __pyx_lineno = 0;
  8770. const char *__pyx_filename = NULL;
  8771. int __pyx_clineno = 0;
  8772. __Pyx_RefNannySetupContext("__next__", 0);
  8773. /* "fontTools/feaLib/lexer.py":287
  8774. *
  8775. * def __next__(self): # Python 3
  8776. * return next(self.lexers_[0]) # <<<<<<<<<<<<<<
  8777. */
  8778. __Pyx_XDECREF(__pyx_r);
  8779. __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)
  8780. __Pyx_GOTREF(__pyx_t_1);
  8781. __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)
  8782. __Pyx_GOTREF(__pyx_t_2);
  8783. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8784. __pyx_t_1 = __Pyx_PyIter_Next(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
  8785. __Pyx_GOTREF(__pyx_t_1);
  8786. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  8787. __pyx_r = __pyx_t_1;
  8788. __pyx_t_1 = 0;
  8789. goto __pyx_L0;
  8790. /* "fontTools/feaLib/lexer.py":286
  8791. * """Lexer that does not follow `include` statements, emits them as-is."""
  8792. *
  8793. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  8794. * return next(self.lexers_[0])
  8795. */
  8796. /* function exit code */
  8797. __pyx_L1_error:;
  8798. __Pyx_XDECREF(__pyx_t_1);
  8799. __Pyx_XDECREF(__pyx_t_2);
  8800. __Pyx_AddTraceback("fontTools.feaLib.lexer.NonIncludingLexer.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8801. __pyx_r = NULL;
  8802. __pyx_L0:;
  8803. __Pyx_XGIVEREF(__pyx_r);
  8804. __Pyx_RefNannyFinishContext();
  8805. return __pyx_r;
  8806. }
  8807. /* #### Code section: module_exttypes ### */
  8808. static PyMethodDef __pyx_methods[] = {
  8809. {0, 0, 0, 0}
  8810. };
  8811. /* #### Code section: initfunc_declarations ### */
  8812. static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8813. static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8814. static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
  8815. static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8816. static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8817. static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8818. static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8819. static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8820. static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8821. static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8822. static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8823. static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
  8824. /* #### Code section: init_module ### */
  8825. static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  8826. __Pyx_RefNannyDeclarations
  8827. CYTHON_UNUSED_VAR(__pyx_mstate);
  8828. __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  8829. /*--- Global init code ---*/
  8830. __Pyx_RefNannyFinishContext();
  8831. return 0;
  8832. }
  8833. static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  8834. __Pyx_RefNannyDeclarations
  8835. CYTHON_UNUSED_VAR(__pyx_mstate);
  8836. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  8837. /*--- Variable export code ---*/
  8838. __Pyx_RefNannyFinishContext();
  8839. return 0;
  8840. }
  8841. static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  8842. __Pyx_RefNannyDeclarations
  8843. CYTHON_UNUSED_VAR(__pyx_mstate);
  8844. __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  8845. /*--- Function export code ---*/
  8846. __Pyx_RefNannyFinishContext();
  8847. return 0;
  8848. }
  8849. static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  8850. __Pyx_RefNannyDeclarations
  8851. CYTHON_UNUSED_VAR(__pyx_mstate);
  8852. __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  8853. /*--- Type init code ---*/
  8854. __Pyx_RefNannyFinishContext();
  8855. return 0;
  8856. }
  8857. static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  8858. __Pyx_RefNannyDeclarations
  8859. CYTHON_UNUSED_VAR(__pyx_mstate);
  8860. __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  8861. /*--- Type import code ---*/
  8862. __Pyx_RefNannyFinishContext();
  8863. return 0;
  8864. }
  8865. static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  8866. __Pyx_RefNannyDeclarations
  8867. CYTHON_UNUSED_VAR(__pyx_mstate);
  8868. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  8869. /*--- Variable import code ---*/
  8870. __Pyx_RefNannyFinishContext();
  8871. return 0;
  8872. }
  8873. static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  8874. __Pyx_RefNannyDeclarations
  8875. CYTHON_UNUSED_VAR(__pyx_mstate);
  8876. __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  8877. /*--- Function import code ---*/
  8878. __Pyx_RefNannyFinishContext();
  8879. return 0;
  8880. }
  8881. #if CYTHON_PEP489_MULTI_PHASE_INIT
  8882. static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
  8883. static int __pyx_pymod_exec_lexer(PyObject* module); /*proto*/
  8884. static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  8885. {Py_mod_create, (void*)__pyx_pymod_create},
  8886. {Py_mod_exec, (void*)__pyx_pymod_exec_lexer},
  8887. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  8888. {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
  8889. #endif
  8890. #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  8891. {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  8892. #endif
  8893. {0, NULL}
  8894. };
  8895. #endif
  8896. #ifdef __cplusplus
  8897. namespace {
  8898. struct PyModuleDef __pyx_moduledef =
  8899. #else
  8900. static struct PyModuleDef __pyx_moduledef =
  8901. #endif
  8902. {
  8903. PyModuleDef_HEAD_INIT,
  8904. "lexer",
  8905. 0, /* m_doc */
  8906. #if CYTHON_USE_MODULE_STATE
  8907. sizeof(__pyx_mstatetype), /* m_size */
  8908. #else
  8909. (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
  8910. #endif
  8911. __pyx_methods /* m_methods */,
  8912. #if CYTHON_PEP489_MULTI_PHASE_INIT
  8913. __pyx_moduledef_slots, /* m_slots */
  8914. #else
  8915. NULL, /* m_reload */
  8916. #endif
  8917. #if CYTHON_USE_MODULE_STATE
  8918. __pyx_m_traverse, /* m_traverse */
  8919. __pyx_m_clear, /* m_clear */
  8920. NULL /* m_free */
  8921. #else
  8922. NULL, /* m_traverse */
  8923. NULL, /* m_clear */
  8924. NULL /* m_free */
  8925. #endif
  8926. };
  8927. #ifdef __cplusplus
  8928. } /* anonymous namespace */
  8929. #endif
  8930. /* PyModInitFuncType */
  8931. #ifndef CYTHON_NO_PYINIT_EXPORT
  8932. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  8933. #else
  8934. #ifdef __cplusplus
  8935. #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  8936. #else
  8937. #define __Pyx_PyMODINIT_FUNC PyObject *
  8938. #endif
  8939. #endif
  8940. __Pyx_PyMODINIT_FUNC PyInit_lexer(void) CYTHON_SMALL_CODE; /*proto*/
  8941. __Pyx_PyMODINIT_FUNC PyInit_lexer(void)
  8942. #if CYTHON_PEP489_MULTI_PHASE_INIT
  8943. {
  8944. return PyModuleDef_Init(&__pyx_moduledef);
  8945. }
  8946. /* ModuleCreationPEP489 */
  8947. #if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
  8948. || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
  8949. static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
  8950. {
  8951. PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
  8952. if (!module) {
  8953. PyErr_Clear(); // just try the 3.8-3.12 version
  8954. module = PyImport_ImportModule("_xxsubinterpreters");
  8955. if (!module) goto bad;
  8956. }
  8957. PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
  8958. Py_DECREF(module);
  8959. if (!current) goto bad;
  8960. if (PyTuple_Check(current)) {
  8961. PyObject *new_current = PySequence_GetItem(current, 0);
  8962. Py_DECREF(current);
  8963. current = new_current;
  8964. if (!new_current) goto bad;
  8965. }
  8966. long long as_c_int = PyLong_AsLongLong(current);
  8967. Py_DECREF(current);
  8968. return as_c_int;
  8969. }
  8970. bad:
  8971. PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
  8972. return -1;
  8973. }
  8974. #endif
  8975. #if !CYTHON_USE_MODULE_STATE
  8976. static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
  8977. static PY_INT64_T main_interpreter_id = -1;
  8978. #if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  8979. PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
  8980. #elif CYTHON_COMPILING_IN_GRAAL
  8981. PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
  8982. #elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
  8983. || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
  8984. PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
  8985. #elif CYTHON_COMPILING_IN_LIMITED_API
  8986. PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
  8987. #else
  8988. PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
  8989. #endif
  8990. if (unlikely(current_id == -1)) {
  8991. return -1;
  8992. }
  8993. if (main_interpreter_id == -1) {
  8994. main_interpreter_id = current_id;
  8995. return 0;
  8996. } else if (unlikely(main_interpreter_id != current_id)) {
  8997. PyErr_SetString(
  8998. PyExc_ImportError,
  8999. "Interpreter change detected - this module can only be loaded into one interpreter per process.");
  9000. return -1;
  9001. }
  9002. return 0;
  9003. }
  9004. #endif
  9005. 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)
  9006. {
  9007. PyObject *value = PyObject_GetAttrString(spec, from_name);
  9008. int result = 0;
  9009. if (likely(value)) {
  9010. if (allow_none || value != Py_None) {
  9011. result = PyDict_SetItemString(moddict, to_name, value);
  9012. }
  9013. Py_DECREF(value);
  9014. } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
  9015. PyErr_Clear();
  9016. } else {
  9017. result = -1;
  9018. }
  9019. return result;
  9020. }
  9021. static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
  9022. PyObject *module = NULL, *moddict, *modname;
  9023. CYTHON_UNUSED_VAR(def);
  9024. #if !CYTHON_USE_MODULE_STATE
  9025. if (__Pyx_check_single_interpreter())
  9026. return NULL;
  9027. #endif
  9028. if (__pyx_m)
  9029. return __Pyx_NewRef(__pyx_m);
  9030. modname = PyObject_GetAttrString(spec, "name");
  9031. if (unlikely(!modname)) goto bad;
  9032. module = PyModule_NewObject(modname);
  9033. Py_DECREF(modname);
  9034. if (unlikely(!module)) goto bad;
  9035. moddict = PyModule_GetDict(module);
  9036. if (unlikely(!moddict)) goto bad;
  9037. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
  9038. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
  9039. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
  9040. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
  9041. return module;
  9042. bad:
  9043. Py_XDECREF(module);
  9044. return NULL;
  9045. }
  9046. static CYTHON_SMALL_CODE int __pyx_pymod_exec_lexer(PyObject *__pyx_pyinit_module)
  9047. #endif
  9048. {
  9049. int stringtab_initialized = 0;
  9050. #if CYTHON_USE_MODULE_STATE
  9051. int pystate_addmodule_run = 0;
  9052. #endif
  9053. __pyx_mstatetype *__pyx_mstate = NULL;
  9054. PyObject *__pyx_t_1 = NULL;
  9055. PyObject *__pyx_t_2 = NULL;
  9056. Py_ssize_t __pyx_t_3;
  9057. PyObject *__pyx_t_4 = NULL;
  9058. PyObject *__pyx_t_5 = NULL;
  9059. PyObject *__pyx_t_6 = NULL;
  9060. PyObject *__pyx_t_7 = NULL;
  9061. PyObject *__pyx_t_8 = NULL;
  9062. PyObject *__pyx_t_9 = NULL;
  9063. PyObject *__pyx_t_10 = NULL;
  9064. PyObject *__pyx_t_11 = NULL;
  9065. size_t __pyx_t_12;
  9066. int __pyx_lineno = 0;
  9067. const char *__pyx_filename = NULL;
  9068. int __pyx_clineno = 0;
  9069. __Pyx_RefNannyDeclarations
  9070. #if CYTHON_PEP489_MULTI_PHASE_INIT
  9071. if (__pyx_m) {
  9072. if (__pyx_m == __pyx_pyinit_module) return 0;
  9073. PyErr_SetString(PyExc_RuntimeError, "Module 'lexer' has already been imported. Re-initialisation is not supported.");
  9074. return -1;
  9075. }
  9076. #else
  9077. if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  9078. #endif
  9079. /*--- Module creation code ---*/
  9080. #if CYTHON_PEP489_MULTI_PHASE_INIT
  9081. __pyx_t_1 = __pyx_pyinit_module;
  9082. Py_INCREF(__pyx_t_1);
  9083. #else
  9084. __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  9085. #endif
  9086. #if CYTHON_USE_MODULE_STATE
  9087. {
  9088. int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
  9089. __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "lexer" pseudovariable */
  9090. if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  9091. pystate_addmodule_run = 1;
  9092. }
  9093. #else
  9094. __pyx_m = __pyx_t_1;
  9095. #endif
  9096. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  9097. PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  9098. #endif
  9099. __pyx_mstate = __pyx_mstate_global;
  9100. CYTHON_UNUSED_VAR(__pyx_t_1);
  9101. __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  9102. Py_INCREF(__pyx_mstate->__pyx_d);
  9103. __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  9104. __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  9105. if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  9106. /* ImportRefnannyAPI */
  9107. #if CYTHON_REFNANNY
  9108. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  9109. if (!__Pyx_RefNanny) {
  9110. PyErr_Clear();
  9111. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  9112. if (!__Pyx_RefNanny)
  9113. Py_FatalError("failed to import 'refnanny' module");
  9114. }
  9115. #endif
  9116. __Pyx_RefNannySetupContext("PyInit_lexer", 0);
  9117. __Pyx_init_runtime_version();
  9118. 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)
  9119. __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  9120. __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  9121. __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  9122. /*--- Library function declarations ---*/
  9123. /*--- Initialize various global constants etc. ---*/
  9124. if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9125. stringtab_initialized = 1;
  9126. if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9127. if (__pyx_module_is_main_fontTools__feaLib__lexer) {
  9128. 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)
  9129. }
  9130. {
  9131. PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
  9132. if (!PyDict_GetItemString(modules, "fontTools.feaLib.lexer")) {
  9133. if (unlikely((PyDict_SetItemString(modules, "fontTools.feaLib.lexer", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  9134. }
  9135. }
  9136. /*--- Builtin init code ---*/
  9137. if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9138. /*--- Constants init code ---*/
  9139. if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9140. if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  9141. /*--- Global type/function init code ---*/
  9142. (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  9143. (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  9144. (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  9145. (void)__Pyx_modinit_type_init_code(__pyx_mstate);
  9146. (void)__Pyx_modinit_type_import_code(__pyx_mstate);
  9147. (void)__Pyx_modinit_variable_import_code(__pyx_mstate);
  9148. (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  9149. /*--- Execution code ---*/
  9150. /* "fontTools/feaLib/lexer.py":1
  9151. * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound # <<<<<<<<<<<<<<
  9152. * from fontTools.feaLib.location import FeatureLibLocation
  9153. * import re
  9154. */
  9155. {
  9156. PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibError,__pyx_mstate_global->__pyx_n_u_IncludedFeaNotFound};
  9157. __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)
  9158. }
  9159. __pyx_t_2 = __pyx_t_1;
  9160. __Pyx_GOTREF(__pyx_t_2);
  9161. {
  9162. PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibError,__pyx_mstate_global->__pyx_n_u_IncludedFeaNotFound};
  9163. for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) {
  9164. __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)
  9165. __Pyx_GOTREF(__pyx_t_4);
  9166. 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)
  9167. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9168. }
  9169. }
  9170. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9171. /* "fontTools/feaLib/lexer.py":2
  9172. * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound
  9173. * from fontTools.feaLib.location import FeatureLibLocation # <<<<<<<<<<<<<<
  9174. * import re
  9175. * import os
  9176. */
  9177. {
  9178. PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibLocation};
  9179. __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)
  9180. }
  9181. __pyx_t_2 = __pyx_t_1;
  9182. __Pyx_GOTREF(__pyx_t_2);
  9183. {
  9184. PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_FeatureLibLocation};
  9185. __pyx_t_3 = 0; {
  9186. __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)
  9187. __Pyx_GOTREF(__pyx_t_4);
  9188. 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)
  9189. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9190. }
  9191. }
  9192. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9193. /* "fontTools/feaLib/lexer.py":3
  9194. * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound
  9195. * from fontTools.feaLib.location import FeatureLibLocation
  9196. * import re # <<<<<<<<<<<<<<
  9197. * import os
  9198. *
  9199. */
  9200. __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)
  9201. __pyx_t_2 = __pyx_t_1;
  9202. __Pyx_GOTREF(__pyx_t_2);
  9203. 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)
  9204. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9205. /* "fontTools/feaLib/lexer.py":4
  9206. * from fontTools.feaLib.location import FeatureLibLocation
  9207. * import re
  9208. * import os # <<<<<<<<<<<<<<
  9209. *
  9210. * try:
  9211. */
  9212. __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)
  9213. __pyx_t_2 = __pyx_t_1;
  9214. __Pyx_GOTREF(__pyx_t_2);
  9215. 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)
  9216. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9217. /* "fontTools/feaLib/lexer.py":6
  9218. * import os
  9219. *
  9220. * try: # <<<<<<<<<<<<<<
  9221. * import cython
  9222. * except ImportError:
  9223. */
  9224. {
  9225. (void)__pyx_t_1; (void)__pyx_t_5; (void)__pyx_t_6; /* mark used */
  9226. /*try:*/ {
  9227. /* "fontTools/feaLib/lexer.py":7
  9228. *
  9229. * try:
  9230. * import cython # <<<<<<<<<<<<<<
  9231. * except ImportError:
  9232. * # if cython not installed, use mock module with no-op decorators and types
  9233. */
  9234. }
  9235. }
  9236. /* "fontTools/feaLib/lexer.py":13
  9237. *
  9238. *
  9239. * class Lexer(object): # <<<<<<<<<<<<<<
  9240. * NUMBER = "NUMBER"
  9241. * HEXADECIMAL = "HEXADECIMAL"
  9242. */
  9243. __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)
  9244. __Pyx_GOTREF(__pyx_t_2);
  9245. __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
  9246. __Pyx_GOTREF(__pyx_t_4);
  9247. __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)
  9248. __Pyx_GOTREF(__pyx_t_7);
  9249. if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[1]) {
  9250. if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[1]) < 0))) __PYX_ERR(0, 13, __pyx_L1_error)
  9251. }
  9252. /* "fontTools/feaLib/lexer.py":14
  9253. *
  9254. * class Lexer(object):
  9255. * NUMBER = "NUMBER" # <<<<<<<<<<<<<<
  9256. * HEXADECIMAL = "HEXADECIMAL"
  9257. * OCTAL = "OCTAL"
  9258. */
  9259. 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)
  9260. /* "fontTools/feaLib/lexer.py":15
  9261. * class Lexer(object):
  9262. * NUMBER = "NUMBER"
  9263. * HEXADECIMAL = "HEXADECIMAL" # <<<<<<<<<<<<<<
  9264. * OCTAL = "OCTAL"
  9265. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
  9266. */
  9267. 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)
  9268. /* "fontTools/feaLib/lexer.py":16
  9269. * NUMBER = "NUMBER"
  9270. * HEXADECIMAL = "HEXADECIMAL"
  9271. * OCTAL = "OCTAL" # <<<<<<<<<<<<<<
  9272. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
  9273. * FLOAT = "FLOAT"
  9274. */
  9275. 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)
  9276. /* "fontTools/feaLib/lexer.py":17
  9277. * HEXADECIMAL = "HEXADECIMAL"
  9278. * OCTAL = "OCTAL"
  9279. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL) # <<<<<<<<<<<<<<
  9280. * FLOAT = "FLOAT"
  9281. * STRING = "STRING"
  9282. */
  9283. __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NUMBER);
  9284. if (unlikely(!__pyx_t_8)) {
  9285. PyErr_Clear();
  9286. __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_NUMBER);
  9287. }
  9288. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 17, __pyx_L1_error)
  9289. __Pyx_GOTREF(__pyx_t_8);
  9290. __pyx_t_9 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL);
  9291. if (unlikely(!__pyx_t_9)) {
  9292. PyErr_Clear();
  9293. __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_HEXADECIMAL);
  9294. }
  9295. if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 17, __pyx_L1_error)
  9296. __Pyx_GOTREF(__pyx_t_9);
  9297. __pyx_t_10 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OCTAL);
  9298. if (unlikely(!__pyx_t_10)) {
  9299. PyErr_Clear();
  9300. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_OCTAL);
  9301. }
  9302. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 17, __pyx_L1_error)
  9303. __Pyx_GOTREF(__pyx_t_10);
  9304. __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)
  9305. __Pyx_GOTREF(__pyx_t_11);
  9306. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9307. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  9308. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  9309. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NUMBERS, __pyx_t_11) < (0)) __PYX_ERR(0, 17, __pyx_L1_error)
  9310. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9311. /* "fontTools/feaLib/lexer.py":18
  9312. * OCTAL = "OCTAL"
  9313. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
  9314. * FLOAT = "FLOAT" # <<<<<<<<<<<<<<
  9315. * STRING = "STRING"
  9316. * NAME = "NAME"
  9317. */
  9318. 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)
  9319. /* "fontTools/feaLib/lexer.py":19
  9320. * NUMBERS = (NUMBER, HEXADECIMAL, OCTAL)
  9321. * FLOAT = "FLOAT"
  9322. * STRING = "STRING" # <<<<<<<<<<<<<<
  9323. * NAME = "NAME"
  9324. * FILENAME = "FILENAME"
  9325. */
  9326. 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)
  9327. /* "fontTools/feaLib/lexer.py":20
  9328. * FLOAT = "FLOAT"
  9329. * STRING = "STRING"
  9330. * NAME = "NAME" # <<<<<<<<<<<<<<
  9331. * FILENAME = "FILENAME"
  9332. * GLYPHCLASS = "GLYPHCLASS"
  9333. */
  9334. 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)
  9335. /* "fontTools/feaLib/lexer.py":21
  9336. * STRING = "STRING"
  9337. * NAME = "NAME"
  9338. * FILENAME = "FILENAME" # <<<<<<<<<<<<<<
  9339. * GLYPHCLASS = "GLYPHCLASS"
  9340. * CID = "CID"
  9341. */
  9342. 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)
  9343. /* "fontTools/feaLib/lexer.py":22
  9344. * NAME = "NAME"
  9345. * FILENAME = "FILENAME"
  9346. * GLYPHCLASS = "GLYPHCLASS" # <<<<<<<<<<<<<<
  9347. * CID = "CID"
  9348. * SYMBOL = "SYMBOL"
  9349. */
  9350. 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)
  9351. /* "fontTools/feaLib/lexer.py":23
  9352. * FILENAME = "FILENAME"
  9353. * GLYPHCLASS = "GLYPHCLASS"
  9354. * CID = "CID" # <<<<<<<<<<<<<<
  9355. * SYMBOL = "SYMBOL"
  9356. * COMMENT = "COMMENT"
  9357. */
  9358. 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)
  9359. /* "fontTools/feaLib/lexer.py":24
  9360. * GLYPHCLASS = "GLYPHCLASS"
  9361. * CID = "CID"
  9362. * SYMBOL = "SYMBOL" # <<<<<<<<<<<<<<
  9363. * COMMENT = "COMMENT"
  9364. * NEWLINE = "NEWLINE"
  9365. */
  9366. 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)
  9367. /* "fontTools/feaLib/lexer.py":25
  9368. * CID = "CID"
  9369. * SYMBOL = "SYMBOL"
  9370. * COMMENT = "COMMENT" # <<<<<<<<<<<<<<
  9371. * NEWLINE = "NEWLINE"
  9372. * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK"
  9373. */
  9374. 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)
  9375. /* "fontTools/feaLib/lexer.py":26
  9376. * SYMBOL = "SYMBOL"
  9377. * COMMENT = "COMMENT"
  9378. * NEWLINE = "NEWLINE" # <<<<<<<<<<<<<<
  9379. * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK"
  9380. *
  9381. */
  9382. 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)
  9383. /* "fontTools/feaLib/lexer.py":27
  9384. * COMMENT = "COMMENT"
  9385. * NEWLINE = "NEWLINE"
  9386. * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK" # <<<<<<<<<<<<<<
  9387. *
  9388. * CHAR_WHITESPACE_ = " \t"
  9389. */
  9390. 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)
  9391. /* "fontTools/feaLib/lexer.py":29
  9392. * ANONYMOUS_BLOCK = "ANONYMOUS_BLOCK"
  9393. *
  9394. * CHAR_WHITESPACE_ = " \t" # <<<<<<<<<<<<<<
  9395. * CHAR_NEWLINE_ = "\r\n"
  9396. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
  9397. */
  9398. 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)
  9399. /* "fontTools/feaLib/lexer.py":30
  9400. *
  9401. * CHAR_WHITESPACE_ = " \t"
  9402. * CHAR_NEWLINE_ = "\r\n" # <<<<<<<<<<<<<<
  9403. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
  9404. * CHAR_DIGIT_ = "0123456789"
  9405. */
  9406. 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)
  9407. /* "fontTools/feaLib/lexer.py":31
  9408. * CHAR_WHITESPACE_ = " \t"
  9409. * CHAR_NEWLINE_ = "\r\n"
  9410. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()=" # <<<<<<<<<<<<<<
  9411. * CHAR_DIGIT_ = "0123456789"
  9412. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
  9413. */
  9414. 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)
  9415. /* "fontTools/feaLib/lexer.py":32
  9416. * CHAR_NEWLINE_ = "\r\n"
  9417. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
  9418. * CHAR_DIGIT_ = "0123456789" # <<<<<<<<<<<<<<
  9419. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
  9420. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  9421. */
  9422. 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)
  9423. /* "fontTools/feaLib/lexer.py":33
  9424. * CHAR_SYMBOL_ = ",;:-+'{}[]<>()="
  9425. * CHAR_DIGIT_ = "0123456789"
  9426. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef" # <<<<<<<<<<<<<<
  9427. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  9428. * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\"
  9429. */
  9430. 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)
  9431. /* "fontTools/feaLib/lexer.py":34
  9432. * CHAR_DIGIT_ = "0123456789"
  9433. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
  9434. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" # <<<<<<<<<<<<<<
  9435. * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\"
  9436. * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-"
  9437. */
  9438. 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)
  9439. /* "fontTools/feaLib/lexer.py":35
  9440. * CHAR_HEXDIGIT_ = "0123456789ABCDEFabcdef"
  9441. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  9442. * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\" # <<<<<<<<<<<<<<
  9443. * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-"
  9444. *
  9445. */
  9446. __pyx_t_11 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
  9447. if (unlikely(!__pyx_t_11)) {
  9448. PyErr_Clear();
  9449. __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
  9450. }
  9451. if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 35, __pyx_L1_error)
  9452. __Pyx_GOTREF(__pyx_t_11);
  9453. __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)
  9454. __Pyx_GOTREF(__pyx_t_10);
  9455. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9456. 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)
  9457. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  9458. /* "fontTools/feaLib/lexer.py":36
  9459. * CHAR_LETTER_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  9460. * CHAR_NAME_START_ = CHAR_LETTER_ + "_+*:.^~!\\"
  9461. * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-" # <<<<<<<<<<<<<<
  9462. *
  9463. * RE_GLYPHCLASS = re.compile(r"^[A-Za-z_0-9.\-]+$")
  9464. */
  9465. __pyx_t_10 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
  9466. if (unlikely(!__pyx_t_10)) {
  9467. PyErr_Clear();
  9468. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_CHAR_LETTER);
  9469. }
  9470. if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 36, __pyx_L1_error)
  9471. __Pyx_GOTREF(__pyx_t_10);
  9472. __pyx_t_11 = PyObject_GetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT);
  9473. if (unlikely(!__pyx_t_11)) {
  9474. PyErr_Clear();
  9475. __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_CHAR_DIGIT);
  9476. }
  9477. if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 36, __pyx_L1_error)
  9478. __Pyx_GOTREF(__pyx_t_11);
  9479. __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 36, __pyx_L1_error)
  9480. __Pyx_GOTREF(__pyx_t_9);
  9481. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  9482. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9483. __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)
  9484. __Pyx_GOTREF(__pyx_t_11);
  9485. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  9486. 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)
  9487. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9488. /* "fontTools/feaLib/lexer.py":38
  9489. * CHAR_NAME_CONTINUATION_ = CHAR_LETTER_ + CHAR_DIGIT_ + "_.+*:^~!/-"
  9490. *
  9491. * RE_GLYPHCLASS = re.compile(r"^[A-Za-z_0-9.\-]+$") # <<<<<<<<<<<<<<
  9492. *
  9493. * MODE_NORMAL_ = "NORMAL"
  9494. */
  9495. __pyx_t_9 = NULL;
  9496. __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_re); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 38, __pyx_L1_error)
  9497. __Pyx_GOTREF(__pyx_t_10);
  9498. __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)
  9499. __Pyx_GOTREF(__pyx_t_8);
  9500. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  9501. __pyx_t_12 = 1;
  9502. {
  9503. PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_A_Za_z_0_9};
  9504. __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));
  9505. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  9506. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9507. if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 38, __pyx_L1_error)
  9508. __Pyx_GOTREF(__pyx_t_11);
  9509. }
  9510. 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)
  9511. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9512. /* "fontTools/feaLib/lexer.py":40
  9513. * RE_GLYPHCLASS = re.compile(r"^[A-Za-z_0-9.\-]+$")
  9514. *
  9515. * MODE_NORMAL_ = "NORMAL" # <<<<<<<<<<<<<<
  9516. * MODE_FILENAME_ = "FILENAME"
  9517. *
  9518. */
  9519. 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)
  9520. /* "fontTools/feaLib/lexer.py":41
  9521. *
  9522. * MODE_NORMAL_ = "NORMAL"
  9523. * MODE_FILENAME_ = "FILENAME" # <<<<<<<<<<<<<<
  9524. *
  9525. * def __init__(self, text, filename):
  9526. */
  9527. 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)
  9528. /* "fontTools/feaLib/lexer.py":43
  9529. * MODE_FILENAME_ = "FILENAME"
  9530. *
  9531. * def __init__(self, text, filename): # <<<<<<<<<<<<<<
  9532. * self.filename_ = filename
  9533. * self.line_ = 1
  9534. */
  9535. __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)
  9536. __Pyx_GOTREF(__pyx_t_11);
  9537. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9538. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9539. #endif
  9540. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_11) < (0)) __PYX_ERR(0, 43, __pyx_L1_error)
  9541. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9542. /* "fontTools/feaLib/lexer.py":52
  9543. * self.mode_ = Lexer.MODE_NORMAL_
  9544. *
  9545. * def __iter__(self): # <<<<<<<<<<<<<<
  9546. * return self
  9547. *
  9548. */
  9549. __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)
  9550. __Pyx_GOTREF(__pyx_t_11);
  9551. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9552. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9553. #endif
  9554. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_iter, __pyx_t_11) < (0)) __PYX_ERR(0, 52, __pyx_L1_error)
  9555. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9556. /* "fontTools/feaLib/lexer.py":55
  9557. * return self
  9558. *
  9559. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  9560. * return self.__next__()
  9561. *
  9562. */
  9563. __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)
  9564. __Pyx_GOTREF(__pyx_t_11);
  9565. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9566. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9567. #endif
  9568. 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)
  9569. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9570. /* "fontTools/feaLib/lexer.py":58
  9571. * return self.__next__()
  9572. *
  9573. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  9574. * while True:
  9575. * token_type, token, location = self.next_()
  9576. */
  9577. __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)
  9578. __Pyx_GOTREF(__pyx_t_11);
  9579. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9580. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9581. #endif
  9582. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_11) < (0)) __PYX_ERR(0, 58, __pyx_L1_error)
  9583. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9584. /* "fontTools/feaLib/lexer.py":64
  9585. * return (token_type, token, location)
  9586. *
  9587. * def location_(self): # <<<<<<<<<<<<<<
  9588. * column = self.pos_ - self.line_start_ + 1
  9589. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  9590. */
  9591. __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)
  9592. __Pyx_GOTREF(__pyx_t_11);
  9593. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9594. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9595. #endif
  9596. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_location, __pyx_t_11) < (0)) __PYX_ERR(0, 64, __pyx_L1_error)
  9597. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9598. /* "fontTools/feaLib/lexer.py":68
  9599. * return FeatureLibLocation(self.filename_ or "<features>", self.line_, column)
  9600. *
  9601. * def next_(self): # <<<<<<<<<<<<<<
  9602. * self.scan_over_(Lexer.CHAR_WHITESPACE_)
  9603. * location = self.location_()
  9604. */
  9605. __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)
  9606. __Pyx_GOTREF(__pyx_t_11);
  9607. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9608. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9609. #endif
  9610. 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)
  9611. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9612. /* "fontTools/feaLib/lexer.py":165
  9613. * raise FeatureLibError("Unexpected character: %r" % cur_char, location)
  9614. *
  9615. * def scan_over_(self, valid): # <<<<<<<<<<<<<<
  9616. * p = self.pos_
  9617. * while p < self.text_length_ and self.text_[p] in valid:
  9618. */
  9619. __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)
  9620. __Pyx_GOTREF(__pyx_t_11);
  9621. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9622. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9623. #endif
  9624. 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)
  9625. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9626. /* "fontTools/feaLib/lexer.py":171
  9627. * self.pos_ = p
  9628. *
  9629. * def scan_until_(self, stop_at): # <<<<<<<<<<<<<<
  9630. * p = self.pos_
  9631. * while p < self.text_length_ and self.text_[p] not in stop_at:
  9632. */
  9633. __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)
  9634. __Pyx_GOTREF(__pyx_t_11);
  9635. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9636. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9637. #endif
  9638. 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)
  9639. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9640. /* "fontTools/feaLib/lexer.py":177
  9641. * self.pos_ = p
  9642. *
  9643. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  9644. * location = self.location_()
  9645. * tag = tag.strip()
  9646. */
  9647. __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)
  9648. __Pyx_GOTREF(__pyx_t_11);
  9649. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9650. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9651. #endif
  9652. 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)
  9653. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9654. /* "fontTools/feaLib/lexer.py":13
  9655. *
  9656. *
  9657. * class Lexer(object): # <<<<<<<<<<<<<<
  9658. * NUMBER = "NUMBER"
  9659. * HEXADECIMAL = "HEXADECIMAL"
  9660. */
  9661. __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)
  9662. __Pyx_GOTREF(__pyx_t_11);
  9663. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9664. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11);
  9665. #endif
  9666. 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)
  9667. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9668. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  9669. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9670. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9671. /* "fontTools/feaLib/lexer.py":192
  9672. *
  9673. *
  9674. * class IncludingLexer(object): # <<<<<<<<<<<<<<
  9675. * """A Lexer that follows include statements.
  9676. *
  9677. */
  9678. __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)
  9679. __Pyx_GOTREF(__pyx_t_2);
  9680. __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error)
  9681. __Pyx_GOTREF(__pyx_t_4);
  9682. __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)
  9683. __Pyx_GOTREF(__pyx_t_7);
  9684. if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[3]) {
  9685. if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[3]) < 0))) __PYX_ERR(0, 192, __pyx_L1_error)
  9686. }
  9687. /* "fontTools/feaLib/lexer.py":207
  9688. * """
  9689. *
  9690. * def __init__(self, featurefile, *, includeDir=None): # <<<<<<<<<<<<<<
  9691. * """Initializes an IncludingLexer.
  9692. *
  9693. */
  9694. __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 207, __pyx_L1_error)
  9695. __Pyx_GOTREF(__pyx_t_11);
  9696. if (PyDict_SetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_includeDir, Py_None) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
  9697. __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)
  9698. __Pyx_GOTREF(__pyx_t_8);
  9699. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9700. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9701. #endif
  9702. __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_8, __pyx_t_11);
  9703. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  9704. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_8) < (0)) __PYX_ERR(0, 207, __pyx_L1_error)
  9705. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9706. /* "fontTools/feaLib/lexer.py":221
  9707. * self.includeDir = includeDir
  9708. *
  9709. * def __iter__(self): # <<<<<<<<<<<<<<
  9710. * return self
  9711. *
  9712. */
  9713. __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)
  9714. __Pyx_GOTREF(__pyx_t_8);
  9715. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9716. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9717. #endif
  9718. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_iter, __pyx_t_8) < (0)) __PYX_ERR(0, 221, __pyx_L1_error)
  9719. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9720. /* "fontTools/feaLib/lexer.py":224
  9721. * return self
  9722. *
  9723. * def next(self): # Python 2 # <<<<<<<<<<<<<<
  9724. * return self.__next__()
  9725. *
  9726. */
  9727. __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)
  9728. __Pyx_GOTREF(__pyx_t_8);
  9729. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9730. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9731. #endif
  9732. 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)
  9733. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9734. /* "fontTools/feaLib/lexer.py":227
  9735. * return self.__next__()
  9736. *
  9737. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  9738. * while self.lexers_:
  9739. * lexer = self.lexers_[-1]
  9740. */
  9741. __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)
  9742. __Pyx_GOTREF(__pyx_t_8);
  9743. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9744. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9745. #endif
  9746. if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_8) < (0)) __PYX_ERR(0, 227, __pyx_L1_error)
  9747. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9748. /* "fontTools/feaLib/lexer.py":266
  9749. * raise StopIteration()
  9750. *
  9751. * @staticmethod # <<<<<<<<<<<<<<
  9752. * def make_lexer_(file_or_path):
  9753. * if hasattr(file_or_path, "read"):
  9754. */
  9755. __pyx_t_11 = NULL;
  9756. __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)
  9757. __Pyx_GOTREF(__pyx_t_9);
  9758. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9759. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9);
  9760. #endif
  9761. __pyx_t_12 = 1;
  9762. {
  9763. PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
  9764. __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));
  9765. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  9766. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  9767. if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 266, __pyx_L1_error)
  9768. __Pyx_GOTREF(__pyx_t_8);
  9769. }
  9770. 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)
  9771. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9772. /* "fontTools/feaLib/lexer.py":279
  9773. * return Lexer(data, filename)
  9774. *
  9775. * def scan_anonymous_block(self, tag): # <<<<<<<<<<<<<<
  9776. * return self.lexers_[-1].scan_anonymous_block(tag)
  9777. *
  9778. */
  9779. __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)
  9780. __Pyx_GOTREF(__pyx_t_8);
  9781. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9782. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9783. #endif
  9784. 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)
  9785. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9786. /* "fontTools/feaLib/lexer.py":192
  9787. *
  9788. *
  9789. * class IncludingLexer(object): # <<<<<<<<<<<<<<
  9790. * """A Lexer that follows include statements.
  9791. *
  9792. */
  9793. __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)
  9794. __Pyx_GOTREF(__pyx_t_8);
  9795. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9796. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_8);
  9797. #endif
  9798. 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)
  9799. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9800. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  9801. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9802. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9803. /* "fontTools/feaLib/lexer.py":283
  9804. *
  9805. *
  9806. * class NonIncludingLexer(IncludingLexer): # <<<<<<<<<<<<<<
  9807. * """Lexer that does not follow `include` statements, emits them as-is."""
  9808. *
  9809. */
  9810. __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IncludingLexer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
  9811. __Pyx_GOTREF(__pyx_t_2);
  9812. __pyx_t_4 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 283, __pyx_L1_error)
  9813. __Pyx_GOTREF(__pyx_t_4);
  9814. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9815. __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
  9816. __Pyx_GOTREF(__pyx_t_2);
  9817. __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L1_error)
  9818. __Pyx_GOTREF(__pyx_t_7);
  9819. __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)
  9820. __Pyx_GOTREF(__pyx_t_8);
  9821. if (__pyx_t_2 != __pyx_t_4) {
  9822. if (unlikely((PyDict_SetItemString(__pyx_t_8, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 283, __pyx_L1_error)
  9823. }
  9824. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9825. /* "fontTools/feaLib/lexer.py":286
  9826. * """Lexer that does not follow `include` statements, emits them as-is."""
  9827. *
  9828. * def __next__(self): # Python 3 # <<<<<<<<<<<<<<
  9829. * return next(self.lexers_[0])
  9830. */
  9831. __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)
  9832. __Pyx_GOTREF(__pyx_t_4);
  9833. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9834. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  9835. #endif
  9836. if (__Pyx_SetNameInClass(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_4) < (0)) __PYX_ERR(0, 286, __pyx_L1_error)
  9837. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9838. /* "fontTools/feaLib/lexer.py":283
  9839. *
  9840. *
  9841. * class NonIncludingLexer(IncludingLexer): # <<<<<<<<<<<<<<
  9842. * """Lexer that does not follow `include` statements, emits them as-is."""
  9843. *
  9844. */
  9845. __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)
  9846. __Pyx_GOTREF(__pyx_t_4);
  9847. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  9848. PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4);
  9849. #endif
  9850. 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)
  9851. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9852. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  9853. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  9854. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9855. /* "fontTools/feaLib/lexer.py":1
  9856. * from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFound # <<<<<<<<<<<<<<
  9857. * from fontTools.feaLib.location import FeatureLibLocation
  9858. * import re
  9859. */
  9860. __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  9861. __Pyx_GOTREF(__pyx_t_2);
  9862. 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)
  9863. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9864. /*--- Wrapped vars code ---*/
  9865. goto __pyx_L0;
  9866. __pyx_L1_error:;
  9867. __Pyx_XDECREF(__pyx_t_2);
  9868. __Pyx_XDECREF(__pyx_t_4);
  9869. __Pyx_XDECREF(__pyx_t_7);
  9870. __Pyx_XDECREF(__pyx_t_8);
  9871. __Pyx_XDECREF(__pyx_t_9);
  9872. __Pyx_XDECREF(__pyx_t_10);
  9873. __Pyx_XDECREF(__pyx_t_11);
  9874. if (__pyx_m) {
  9875. if (__pyx_mstate->__pyx_d && stringtab_initialized) {
  9876. __Pyx_AddTraceback("init fontTools.feaLib.lexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9877. }
  9878. #if !CYTHON_USE_MODULE_STATE
  9879. Py_CLEAR(__pyx_m);
  9880. #else
  9881. Py_DECREF(__pyx_m);
  9882. if (pystate_addmodule_run) {
  9883. PyObject *tp, *value, *tb;
  9884. PyErr_Fetch(&tp, &value, &tb);
  9885. PyState_RemoveModule(&__pyx_moduledef);
  9886. PyErr_Restore(tp, value, tb);
  9887. }
  9888. #endif
  9889. } else if (!PyErr_Occurred()) {
  9890. PyErr_SetString(PyExc_ImportError, "init fontTools.feaLib.lexer");
  9891. }
  9892. __pyx_L0:;
  9893. __Pyx_RefNannyFinishContext();
  9894. #if CYTHON_PEP489_MULTI_PHASE_INIT
  9895. return (__pyx_m != NULL) ? 0 : -1;
  9896. #else
  9897. return __pyx_m;
  9898. #endif
  9899. }
  9900. /* #### Code section: pystring_table ### */
  9901. /* #### Code section: cached_builtins ### */
  9902. static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  9903. CYTHON_UNUSED_VAR(__pyx_mstate);
  9904. __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 13, __pyx_L1_error)
  9905. __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 266, __pyx_L1_error)
  9906. __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_open); if (!__pyx_builtin_open) __PYX_ERR(0, 272, __pyx_L1_error)
  9907. /* Cached unbound methods */
  9908. __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  9909. __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  9910. __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  9911. __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  9912. __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  9913. __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  9914. __pyx_mstate->__pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type;
  9915. __pyx_mstate->__pyx_umethod_PyList_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  9916. return 0;
  9917. __pyx_L1_error:;
  9918. return -1;
  9919. }
  9920. /* #### Code section: cached_constants ### */
  9921. static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  9922. __Pyx_RefNannyDeclarations
  9923. CYTHON_UNUSED_VAR(__pyx_mstate);
  9924. __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
  9925. /* "fontTools/feaLib/lexer.py":13
  9926. *
  9927. *
  9928. * class Lexer(object): # <<<<<<<<<<<<<<
  9929. * NUMBER = "NUMBER"
  9930. * HEXADECIMAL = "HEXADECIMAL"
  9931. */
  9932. __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)
  9933. __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  9934. __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);
  9935. __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)
  9936. __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  9937. __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);
  9938. /* "fontTools/feaLib/lexer.py":192
  9939. *
  9940. *
  9941. * class IncludingLexer(object): # <<<<<<<<<<<<<<
  9942. * """A Lexer that follows include statements.
  9943. *
  9944. */
  9945. __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)
  9946. __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  9947. __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);
  9948. __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)
  9949. __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  9950. __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);
  9951. #if CYTHON_IMMORTAL_CONSTANTS
  9952. {
  9953. PyObject **table = __pyx_mstate->__pyx_tuple;
  9954. for (Py_ssize_t i=0; i<4; ++i) {
  9955. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  9956. #if PY_VERSION_HEX < 0x030E0000
  9957. if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
  9958. #else
  9959. if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
  9960. #endif
  9961. {
  9962. Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
  9963. }
  9964. #else
  9965. Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
  9966. #endif
  9967. }
  9968. }
  9969. #endif
  9970. __Pyx_RefNannyFinishContext();
  9971. return 0;
  9972. __pyx_L1_error:;
  9973. __Pyx_RefNannyFinishContext();
  9974. return -1;
  9975. }
  9976. /* #### Code section: init_constants ### */
  9977. static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  9978. CYTHON_UNUSED_VAR(__pyx_mstate);
  9979. {
  9980. 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}};
  9981. #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (2542 bytes) */
  9982. 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";
  9983. PyObject *data = __Pyx_DecompressString(cstring, 2542, 2);
  9984. if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
  9985. const char* const bytes = __Pyx_PyBytes_AsString(data);
  9986. #if !CYTHON_ASSUME_SAFE_MACROS
  9987. if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
  9988. #endif
  9989. #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (2392 bytes) */
  9990. 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";
  9991. PyObject *data = __Pyx_DecompressString(cstring, 2392, 1);
  9992. if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
  9993. const char* const bytes = __Pyx_PyBytes_AsString(data);
  9994. #if !CYTHON_ASSUME_SAFE_MACROS
  9995. if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
  9996. #endif
  9997. #else /* compression: none (4417 bytes) */
  9998. 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!";
  9999. PyObject *data = NULL;
  10000. CYTHON_UNUSED_VAR(__Pyx_DecompressString);
  10001. #endif
  10002. PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
  10003. Py_ssize_t pos = 0;
  10004. for (int i = 0; i < 183; i++) {
  10005. Py_ssize_t bytes_length = index[i].length;
  10006. PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
  10007. if (likely(string) && i >= 38) PyUnicode_InternInPlace(&string);
  10008. if (unlikely(!string)) {
  10009. Py_XDECREF(data);
  10010. __PYX_ERR(0, 1, __pyx_L1_error)
  10011. }
  10012. stringtab[i] = string;
  10013. pos += bytes_length;
  10014. }
  10015. for (int i = 183; i < 197; i++) {
  10016. Py_ssize_t bytes_length = index[i].length;
  10017. PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
  10018. stringtab[i] = string;
  10019. pos += bytes_length;
  10020. if (unlikely(!string)) {
  10021. Py_XDECREF(data);
  10022. __PYX_ERR(0, 1, __pyx_L1_error)
  10023. }
  10024. }
  10025. Py_XDECREF(data);
  10026. for (Py_ssize_t i = 0; i < 197; i++) {
  10027. if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
  10028. __PYX_ERR(0, 1, __pyx_L1_error)
  10029. }
  10030. }
  10031. #if CYTHON_IMMORTAL_CONSTANTS
  10032. {
  10033. PyObject **table = stringtab + 183;
  10034. for (Py_ssize_t i=0; i<14; ++i) {
  10035. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10036. #if PY_VERSION_HEX < 0x030E0000
  10037. if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
  10038. #else
  10039. if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
  10040. #endif
  10041. {
  10042. Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
  10043. }
  10044. #else
  10045. Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
  10046. #endif
  10047. }
  10048. }
  10049. #endif
  10050. }
  10051. {
  10052. PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
  10053. int8_t const cint_constants_1[] = {0,1,2,8,10,16};
  10054. for (int i = 0; i < 6; i++) {
  10055. numbertab[i] = PyLong_FromLong(cint_constants_1[i - 0]);
  10056. if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
  10057. }
  10058. }
  10059. #if CYTHON_IMMORTAL_CONSTANTS
  10060. {
  10061. PyObject **table = __pyx_mstate->__pyx_number_tab;
  10062. for (Py_ssize_t i=0; i<6; ++i) {
  10063. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10064. #if PY_VERSION_HEX < 0x030E0000
  10065. if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1)
  10066. #else
  10067. if (PyUnstable_Object_IsUniquelyReferenced(table[i]))
  10068. #endif
  10069. {
  10070. Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
  10071. }
  10072. #else
  10073. Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
  10074. #endif
  10075. }
  10076. }
  10077. #endif
  10078. return 0;
  10079. __pyx_L1_error:;
  10080. return -1;
  10081. }
  10082. /* #### Code section: init_codeobjects ### */
  10083. typedef struct {
  10084. unsigned int argcount : 2;
  10085. unsigned int num_posonly_args : 1;
  10086. unsigned int num_kwonly_args : 1;
  10087. unsigned int nlocals : 4;
  10088. unsigned int flags : 10;
  10089. unsigned int first_line : 9;
  10090. } __Pyx_PyCode_New_function_description;
  10091. /* NewCodeObj.proto */
  10092. static PyObject* __Pyx_PyCode_New(
  10093. const __Pyx_PyCode_New_function_description descr,
  10094. PyObject * const *varnames,
  10095. PyObject *filename,
  10096. PyObject *funcname,
  10097. PyObject *line_table,
  10098. PyObject *tuple_dedup_map
  10099. );
  10100. static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  10101. PyObject* tuple_dedup_map = PyDict_New();
  10102. if (unlikely(!tuple_dedup_map)) return -1;
  10103. {
  10104. const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 43};
  10105. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_filename};
  10106. __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;
  10107. }
  10108. {
  10109. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 52};
  10110. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10111. __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;
  10112. }
  10113. {
  10114. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 55};
  10115. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10116. __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;
  10117. }
  10118. {
  10119. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 58};
  10120. 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};
  10121. __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;
  10122. }
  10123. {
  10124. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 64};
  10125. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column};
  10126. __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;
  10127. }
  10128. {
  10129. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 68};
  10130. 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};
  10131. __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;
  10132. }
  10133. {
  10134. const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 165};
  10135. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_valid, __pyx_mstate->__pyx_n_u_p};
  10136. __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;
  10137. }
  10138. {
  10139. const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 171};
  10140. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stop_at, __pyx_mstate->__pyx_n_u_p};
  10141. __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;
  10142. }
  10143. {
  10144. const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 177};
  10145. 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};
  10146. __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;
  10147. }
  10148. {
  10149. const __Pyx_PyCode_New_function_description descr = {2, 0, 1, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 207};
  10150. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_featurefile, __pyx_mstate->__pyx_n_u_includeDir};
  10151. __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;
  10152. }
  10153. {
  10154. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 221};
  10155. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10156. __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;
  10157. }
  10158. {
  10159. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224};
  10160. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10161. __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;
  10162. }
  10163. {
  10164. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 227};
  10165. 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};
  10166. __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;
  10167. }
  10168. {
  10169. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 266};
  10170. 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};
  10171. __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;
  10172. }
  10173. {
  10174. const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 279};
  10175. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_tag};
  10176. __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;
  10177. }
  10178. {
  10179. const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 286};
  10180. PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
  10181. __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;
  10182. }
  10183. Py_DECREF(tuple_dedup_map);
  10184. return 0;
  10185. bad:
  10186. Py_DECREF(tuple_dedup_map);
  10187. return -1;
  10188. }
  10189. /* #### Code section: init_globals ### */
  10190. static int __Pyx_InitGlobals(void) {
  10191. /* PythonCompatibility.init */
  10192. if (likely(__Pyx_init_co_variables() == 0)); else
  10193. if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
  10194. /* CommonTypesMetaclass.init */
  10195. if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  10196. if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
  10197. /* CachedMethodType.init */
  10198. #if CYTHON_COMPILING_IN_LIMITED_API
  10199. {
  10200. PyObject *typesModule=NULL;
  10201. typesModule = PyImport_ImportModule("types");
  10202. if (typesModule) {
  10203. __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
  10204. Py_DECREF(typesModule);
  10205. }
  10206. } // error handling follows
  10207. #endif
  10208. if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
  10209. /* CythonFunctionShared.init */
  10210. if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  10211. if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
  10212. return 0;
  10213. __pyx_L1_error:;
  10214. return -1;
  10215. }
  10216. /* #### Code section: cleanup_globals ### */
  10217. /* #### Code section: cleanup_module ### */
  10218. /* #### Code section: main_method ### */
  10219. /* #### Code section: utility_code_pragmas ### */
  10220. #ifdef _MSC_VER
  10221. #pragma warning( push )
  10222. /* Warning 4127: conditional expression is constant
  10223. * Cython uses constant conditional expressions to allow in inline functions to be optimized at
  10224. * compile-time, so this warning is not useful
  10225. */
  10226. #pragma warning( disable : 4127 )
  10227. #endif
  10228. /* #### Code section: utility_code_def ### */
  10229. /* --- Runtime support code --- */
  10230. /* Refnanny */
  10231. #if CYTHON_REFNANNY
  10232. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
  10233. PyObject *m = NULL, *p = NULL;
  10234. void *r = NULL;
  10235. m = PyImport_ImportModule(modname);
  10236. if (!m) goto end;
  10237. p = PyObject_GetAttrString(m, "RefNannyAPI");
  10238. if (!p) goto end;
  10239. r = PyLong_AsVoidPtr(p);
  10240. end:
  10241. Py_XDECREF(p);
  10242. Py_XDECREF(m);
  10243. return (__Pyx_RefNannyAPIStruct *)r;
  10244. }
  10245. #endif
  10246. /* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
  10247. #if CYTHON_FAST_THREAD_STATE
  10248. static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  10249. Py_ssize_t i, n;
  10250. n = PyTuple_GET_SIZE(tuple);
  10251. for (i=0; i<n; i++) {
  10252. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  10253. }
  10254. for (i=0; i<n; i++) {
  10255. if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
  10256. }
  10257. return 0;
  10258. }
  10259. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
  10260. int result;
  10261. PyObject *exc_type;
  10262. #if PY_VERSION_HEX >= 0x030C00A6
  10263. PyObject *current_exception = tstate->current_exception;
  10264. if (unlikely(!current_exception)) return 0;
  10265. exc_type = (PyObject*) Py_TYPE(current_exception);
  10266. if (exc_type == err) return 1;
  10267. #else
  10268. exc_type = tstate->curexc_type;
  10269. if (exc_type == err) return 1;
  10270. if (unlikely(!exc_type)) return 0;
  10271. #endif
  10272. #if CYTHON_AVOID_BORROWED_REFS
  10273. Py_INCREF(exc_type);
  10274. #endif
  10275. if (unlikely(PyTuple_Check(err))) {
  10276. result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
  10277. } else {
  10278. result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
  10279. }
  10280. #if CYTHON_AVOID_BORROWED_REFS
  10281. Py_DECREF(exc_type);
  10282. #endif
  10283. return result;
  10284. }
  10285. #endif
  10286. /* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
  10287. #if CYTHON_FAST_THREAD_STATE
  10288. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  10289. #if PY_VERSION_HEX >= 0x030C00A6
  10290. PyObject *tmp_value;
  10291. assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
  10292. if (value) {
  10293. #if CYTHON_COMPILING_IN_CPYTHON
  10294. if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
  10295. #endif
  10296. PyException_SetTraceback(value, tb);
  10297. }
  10298. tmp_value = tstate->current_exception;
  10299. tstate->current_exception = value;
  10300. Py_XDECREF(tmp_value);
  10301. Py_XDECREF(type);
  10302. Py_XDECREF(tb);
  10303. #else
  10304. PyObject *tmp_type, *tmp_value, *tmp_tb;
  10305. tmp_type = tstate->curexc_type;
  10306. tmp_value = tstate->curexc_value;
  10307. tmp_tb = tstate->curexc_traceback;
  10308. tstate->curexc_type = type;
  10309. tstate->curexc_value = value;
  10310. tstate->curexc_traceback = tb;
  10311. Py_XDECREF(tmp_type);
  10312. Py_XDECREF(tmp_value);
  10313. Py_XDECREF(tmp_tb);
  10314. #endif
  10315. }
  10316. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  10317. #if PY_VERSION_HEX >= 0x030C00A6
  10318. PyObject* exc_value;
  10319. exc_value = tstate->current_exception;
  10320. tstate->current_exception = 0;
  10321. *value = exc_value;
  10322. *type = NULL;
  10323. *tb = NULL;
  10324. if (exc_value) {
  10325. *type = (PyObject*) Py_TYPE(exc_value);
  10326. Py_INCREF(*type);
  10327. #if CYTHON_COMPILING_IN_CPYTHON
  10328. *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
  10329. Py_XINCREF(*tb);
  10330. #else
  10331. *tb = PyException_GetTraceback(exc_value);
  10332. #endif
  10333. }
  10334. #else
  10335. *type = tstate->curexc_type;
  10336. *value = tstate->curexc_value;
  10337. *tb = tstate->curexc_traceback;
  10338. tstate->curexc_type = 0;
  10339. tstate->curexc_value = 0;
  10340. tstate->curexc_traceback = 0;
  10341. #endif
  10342. }
  10343. #endif
  10344. /* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */
  10345. #if CYTHON_USE_TYPE_SLOTS
  10346. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
  10347. PyTypeObject* tp = Py_TYPE(obj);
  10348. if (likely(tp->tp_getattro))
  10349. return tp->tp_getattro(obj, attr_name);
  10350. return PyObject_GetAttr(obj, attr_name);
  10351. }
  10352. #endif
  10353. /* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
  10354. #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
  10355. static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
  10356. __Pyx_PyThreadState_declare
  10357. __Pyx_PyThreadState_assign
  10358. if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
  10359. __Pyx_PyErr_Clear();
  10360. }
  10361. #endif
  10362. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
  10363. PyObject *result;
  10364. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  10365. (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
  10366. return result;
  10367. #else
  10368. #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
  10369. PyTypeObject* tp = Py_TYPE(obj);
  10370. if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
  10371. return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
  10372. }
  10373. #endif
  10374. result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
  10375. if (unlikely(!result)) {
  10376. __Pyx_PyObject_GetAttrStr_ClearAttributeError();
  10377. }
  10378. return result;
  10379. #endif
  10380. }
  10381. /* GetBuiltinName */
  10382. static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
  10383. PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
  10384. if (unlikely(!result) && !PyErr_Occurred()) {
  10385. PyErr_Format(PyExc_NameError,
  10386. "name '%U' is not defined", name);
  10387. }
  10388. return result;
  10389. }
  10390. /* TupleAndListFromArray (used by fastcall) */
  10391. #if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
  10392. static CYTHON_INLINE PyObject *
  10393. __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
  10394. {
  10395. PyObject *res;
  10396. Py_ssize_t i;
  10397. if (n <= 0) {
  10398. return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
  10399. }
  10400. res = PyTuple_New(n);
  10401. if (unlikely(res == NULL)) return NULL;
  10402. for (i = 0; i < n; i++) {
  10403. if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
  10404. Py_DECREF(res);
  10405. return NULL;
  10406. }
  10407. Py_INCREF(src[i]);
  10408. }
  10409. return res;
  10410. }
  10411. #elif CYTHON_COMPILING_IN_CPYTHON
  10412. static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
  10413. PyObject *v;
  10414. Py_ssize_t i;
  10415. for (i = 0; i < length; i++) {
  10416. v = dest[i] = src[i];
  10417. Py_INCREF(v);
  10418. }
  10419. }
  10420. static CYTHON_INLINE PyObject *
  10421. __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
  10422. {
  10423. PyObject *res;
  10424. if (n <= 0) {
  10425. return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
  10426. }
  10427. res = PyTuple_New(n);
  10428. if (unlikely(res == NULL)) return NULL;
  10429. __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
  10430. return res;
  10431. }
  10432. static CYTHON_INLINE PyObject *
  10433. __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
  10434. {
  10435. PyObject *res;
  10436. if (n <= 0) {
  10437. return PyList_New(0);
  10438. }
  10439. res = PyList_New(n);
  10440. if (unlikely(res == NULL)) return NULL;
  10441. __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
  10442. return res;
  10443. }
  10444. #endif
  10445. /* BytesEquals (used by UnicodeEquals) */
  10446. static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
  10447. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
  10448. !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
  10449. return PyObject_RichCompareBool(s1, s2, equals);
  10450. #else
  10451. if (s1 == s2) {
  10452. return (equals == Py_EQ);
  10453. } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
  10454. const char *ps1, *ps2;
  10455. Py_ssize_t length = PyBytes_GET_SIZE(s1);
  10456. if (length != PyBytes_GET_SIZE(s2))
  10457. return (equals == Py_NE);
  10458. ps1 = PyBytes_AS_STRING(s1);
  10459. ps2 = PyBytes_AS_STRING(s2);
  10460. if (ps1[0] != ps2[0]) {
  10461. return (equals == Py_NE);
  10462. } else if (length == 1) {
  10463. return (equals == Py_EQ);
  10464. } else {
  10465. int result;
  10466. #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
  10467. Py_hash_t hash1, hash2;
  10468. hash1 = ((PyBytesObject*)s1)->ob_shash;
  10469. hash2 = ((PyBytesObject*)s2)->ob_shash;
  10470. if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
  10471. return (equals == Py_NE);
  10472. }
  10473. #endif
  10474. result = memcmp(ps1, ps2, (size_t)length);
  10475. return (equals == Py_EQ) ? (result == 0) : (result != 0);
  10476. }
  10477. } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
  10478. return (equals == Py_NE);
  10479. } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
  10480. return (equals == Py_NE);
  10481. } else {
  10482. int result;
  10483. PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
  10484. if (!py_result)
  10485. return -1;
  10486. result = __Pyx_PyObject_IsTrue(py_result);
  10487. Py_DECREF(py_result);
  10488. return result;
  10489. }
  10490. #endif
  10491. }
  10492. /* UnicodeEquals (used by fastcall) */
  10493. static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
  10494. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
  10495. return PyObject_RichCompareBool(s1, s2, equals);
  10496. #else
  10497. int s1_is_unicode, s2_is_unicode;
  10498. if (s1 == s2) {
  10499. goto return_eq;
  10500. }
  10501. s1_is_unicode = PyUnicode_CheckExact(s1);
  10502. s2_is_unicode = PyUnicode_CheckExact(s2);
  10503. if (s1_is_unicode & s2_is_unicode) {
  10504. Py_ssize_t length, length2;
  10505. int kind;
  10506. void *data1, *data2;
  10507. #if !CYTHON_COMPILING_IN_LIMITED_API
  10508. if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
  10509. return -1;
  10510. #endif
  10511. length = __Pyx_PyUnicode_GET_LENGTH(s1);
  10512. #if !CYTHON_ASSUME_SAFE_SIZE
  10513. if (unlikely(length < 0)) return -1;
  10514. #endif
  10515. length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
  10516. #if !CYTHON_ASSUME_SAFE_SIZE
  10517. if (unlikely(length2 < 0)) return -1;
  10518. #endif
  10519. if (length != length2) {
  10520. goto return_ne;
  10521. }
  10522. #if CYTHON_USE_UNICODE_INTERNALS
  10523. {
  10524. Py_hash_t hash1, hash2;
  10525. hash1 = ((PyASCIIObject*)s1)->hash;
  10526. hash2 = ((PyASCIIObject*)s2)->hash;
  10527. if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
  10528. goto return_ne;
  10529. }
  10530. }
  10531. #endif
  10532. kind = __Pyx_PyUnicode_KIND(s1);
  10533. if (kind != __Pyx_PyUnicode_KIND(s2)) {
  10534. goto return_ne;
  10535. }
  10536. data1 = __Pyx_PyUnicode_DATA(s1);
  10537. data2 = __Pyx_PyUnicode_DATA(s2);
  10538. if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
  10539. goto return_ne;
  10540. } else if (length == 1) {
  10541. goto return_eq;
  10542. } else {
  10543. int result = memcmp(data1, data2, (size_t)(length * kind));
  10544. return (equals == Py_EQ) ? (result == 0) : (result != 0);
  10545. }
  10546. } else if ((s1 == Py_None) & s2_is_unicode) {
  10547. goto return_ne;
  10548. } else if ((s2 == Py_None) & s1_is_unicode) {
  10549. goto return_ne;
  10550. } else {
  10551. int result;
  10552. PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
  10553. if (!py_result)
  10554. return -1;
  10555. result = __Pyx_PyObject_IsTrue(py_result);
  10556. Py_DECREF(py_result);
  10557. return result;
  10558. }
  10559. return_eq:
  10560. return (equals == Py_EQ);
  10561. return_ne:
  10562. return (equals == Py_NE);
  10563. #endif
  10564. }
  10565. /* fastcall */
  10566. #if CYTHON_METH_FASTCALL
  10567. static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
  10568. {
  10569. Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
  10570. #if !CYTHON_ASSUME_SAFE_SIZE
  10571. if (unlikely(n == -1)) return NULL;
  10572. #endif
  10573. for (i = 0; i < n; i++)
  10574. {
  10575. PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
  10576. #if !CYTHON_ASSUME_SAFE_MACROS
  10577. if (unlikely(!namei)) return NULL;
  10578. #endif
  10579. if (s == namei) return kwvalues[i];
  10580. }
  10581. for (i = 0; i < n; i++)
  10582. {
  10583. PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
  10584. #if !CYTHON_ASSUME_SAFE_MACROS
  10585. if (unlikely(!namei)) return NULL;
  10586. #endif
  10587. int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
  10588. if (unlikely(eq != 0)) {
  10589. if (unlikely(eq < 0)) return NULL;
  10590. return kwvalues[i];
  10591. }
  10592. }
  10593. return NULL;
  10594. }
  10595. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
  10596. CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
  10597. Py_ssize_t i, nkwargs;
  10598. PyObject *dict;
  10599. #if !CYTHON_ASSUME_SAFE_SIZE
  10600. nkwargs = PyTuple_Size(kwnames);
  10601. if (unlikely(nkwargs < 0)) return NULL;
  10602. #else
  10603. nkwargs = PyTuple_GET_SIZE(kwnames);
  10604. #endif
  10605. dict = PyDict_New();
  10606. if (unlikely(!dict))
  10607. return NULL;
  10608. for (i=0; i<nkwargs; i++) {
  10609. #if !CYTHON_ASSUME_SAFE_MACROS
  10610. PyObject *key = PyTuple_GetItem(kwnames, i);
  10611. if (!key) goto bad;
  10612. #else
  10613. PyObject *key = PyTuple_GET_ITEM(kwnames, i);
  10614. #endif
  10615. if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
  10616. goto bad;
  10617. }
  10618. return dict;
  10619. bad:
  10620. Py_DECREF(dict);
  10621. return NULL;
  10622. }
  10623. #endif
  10624. #endif
  10625. /* PyObjectCall (used by PyObjectFastCall) */
  10626. #if CYTHON_COMPILING_IN_CPYTHON
  10627. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  10628. PyObject *result;
  10629. ternaryfunc call = Py_TYPE(func)->tp_call;
  10630. if (unlikely(!call))
  10631. return PyObject_Call(func, arg, kw);
  10632. if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
  10633. return NULL;
  10634. result = (*call)(func, arg, kw);
  10635. Py_LeaveRecursiveCall();
  10636. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  10637. PyErr_SetString(
  10638. PyExc_SystemError,
  10639. "NULL result without error in PyObject_Call");
  10640. }
  10641. return result;
  10642. }
  10643. #endif
  10644. /* PyObjectCallMethO (used by PyObjectFastCall) */
  10645. #if CYTHON_COMPILING_IN_CPYTHON
  10646. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
  10647. PyObject *self, *result;
  10648. PyCFunction cfunc;
  10649. cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
  10650. self = __Pyx_CyOrPyCFunction_GET_SELF(func);
  10651. if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
  10652. return NULL;
  10653. result = cfunc(self, arg);
  10654. Py_LeaveRecursiveCall();
  10655. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  10656. PyErr_SetString(
  10657. PyExc_SystemError,
  10658. "NULL result without error in PyObject_Call");
  10659. }
  10660. return result;
  10661. }
  10662. #endif
  10663. /* PyObjectFastCall (used by PyObjectCallOneArg) */
  10664. #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
  10665. static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
  10666. PyObject *argstuple;
  10667. PyObject *result = 0;
  10668. size_t i;
  10669. argstuple = PyTuple_New((Py_ssize_t)nargs);
  10670. if (unlikely(!argstuple)) return NULL;
  10671. for (i = 0; i < nargs; i++) {
  10672. Py_INCREF(args[i]);
  10673. if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
  10674. }
  10675. result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  10676. bad:
  10677. Py_DECREF(argstuple);
  10678. return result;
  10679. }
  10680. #endif
  10681. #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  10682. #if PY_VERSION_HEX < 0x03090000
  10683. #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  10684. #elif CYTHON_COMPILING_IN_CPYTHON
  10685. static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
  10686. PyTypeObject *tp = Py_TYPE(callable);
  10687. #if defined(__Pyx_CyFunction_USED)
  10688. if (__Pyx_CyFunction_CheckExact(callable)) {
  10689. return __Pyx_CyFunction_func_vectorcall(callable);
  10690. }
  10691. #endif
  10692. if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
  10693. return NULL;
  10694. }
  10695. assert(PyCallable_Check(callable));
  10696. Py_ssize_t offset = tp->tp_vectorcall_offset;
  10697. assert(offset > 0);
  10698. vectorcallfunc ptr;
  10699. memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
  10700. return ptr;
  10701. }
  10702. #else
  10703. #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  10704. #endif
  10705. #endif
  10706. static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
  10707. Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
  10708. #if CYTHON_COMPILING_IN_CPYTHON
  10709. if (nargs == 0 && kwargs == NULL) {
  10710. if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
  10711. return __Pyx_PyObject_CallMethO(func, NULL);
  10712. }
  10713. else if (nargs == 1 && kwargs == NULL) {
  10714. if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
  10715. return __Pyx_PyObject_CallMethO(func, args[0]);
  10716. }
  10717. #endif
  10718. if (kwargs == NULL) {
  10719. #if CYTHON_VECTORCALL
  10720. #if CYTHON_COMPILING_IN_LIMITED_API
  10721. return PyObject_Vectorcall(func, args, _nargs, NULL);
  10722. #else
  10723. vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
  10724. if (f) {
  10725. return f(func, args, _nargs, NULL);
  10726. }
  10727. #endif
  10728. #endif
  10729. }
  10730. if (nargs == 0) {
  10731. return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
  10732. }
  10733. #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
  10734. return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
  10735. #else
  10736. return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
  10737. #endif
  10738. }
  10739. /* PyObjectCallOneArg (used by CallUnboundCMethod0) */
  10740. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  10741. PyObject *args[2] = {NULL, arg};
  10742. return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
  10743. }
  10744. /* UnpackUnboundCMethod (used by CallUnboundCMethod0) */
  10745. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
  10746. static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
  10747. PyObject *result;
  10748. PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
  10749. if (unlikely(!selfless_args)) return NULL;
  10750. result = PyObject_Call(method, selfless_args, kwargs);
  10751. Py_DECREF(selfless_args);
  10752. return result;
  10753. }
  10754. #elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
  10755. static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
  10756. return _PyObject_Vectorcall
  10757. (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
  10758. }
  10759. #else
  10760. static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
  10761. return
  10762. #if PY_VERSION_HEX < 0x03090000
  10763. _PyObject_Vectorcall
  10764. #else
  10765. PyObject_Vectorcall
  10766. #endif
  10767. (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
  10768. }
  10769. #endif
  10770. static PyMethodDef __Pyx_UnboundCMethod_Def = {
  10771. "CythonUnboundCMethod",
  10772. __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
  10773. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
  10774. METH_VARARGS | METH_KEYWORDS,
  10775. #else
  10776. METH_FASTCALL | METH_KEYWORDS,
  10777. #endif
  10778. NULL
  10779. };
  10780. static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
  10781. PyObject *method, *result=NULL;
  10782. method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
  10783. if (unlikely(!method))
  10784. return -1;
  10785. result = method;
  10786. #if CYTHON_COMPILING_IN_CPYTHON
  10787. if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
  10788. {
  10789. PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
  10790. target->func = descr->d_method->ml_meth;
  10791. target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
  10792. } else
  10793. #endif
  10794. #if CYTHON_COMPILING_IN_PYPY
  10795. #else
  10796. if (PyCFunction_Check(method))
  10797. #endif
  10798. {
  10799. PyObject *self;
  10800. int self_found;
  10801. #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
  10802. self = PyObject_GetAttrString(method, "__self__");
  10803. if (!self) {
  10804. PyErr_Clear();
  10805. }
  10806. #else
  10807. self = PyCFunction_GET_SELF(method);
  10808. #endif
  10809. self_found = (self && self != Py_None);
  10810. #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
  10811. Py_XDECREF(self);
  10812. #endif
  10813. if (self_found) {
  10814. PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
  10815. if (unlikely(!unbound_method)) return -1;
  10816. Py_DECREF(method);
  10817. result = unbound_method;
  10818. }
  10819. }
  10820. #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10821. if (unlikely(target->method)) {
  10822. Py_DECREF(result);
  10823. } else
  10824. #endif
  10825. target->method = result;
  10826. return 0;
  10827. }
  10828. /* CallUnboundCMethod0 */
  10829. #if CYTHON_COMPILING_IN_CPYTHON
  10830. static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
  10831. int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
  10832. if (likely(was_initialized == 2 && cfunc->func)) {
  10833. if (likely(cfunc->flag == METH_NOARGS))
  10834. return __Pyx_CallCFunction(cfunc, self, NULL);
  10835. if (likely(cfunc->flag == METH_FASTCALL))
  10836. return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
  10837. if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
  10838. return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
  10839. if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
  10840. return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
  10841. if (cfunc->flag == METH_VARARGS)
  10842. return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
  10843. return __Pyx__CallUnboundCMethod0(cfunc, self);
  10844. }
  10845. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10846. else if (unlikely(was_initialized == 1)) {
  10847. __Pyx_CachedCFunction tmp_cfunc = {
  10848. #ifndef __cplusplus
  10849. 0
  10850. #endif
  10851. };
  10852. tmp_cfunc.type = cfunc->type;
  10853. tmp_cfunc.method_name = cfunc->method_name;
  10854. return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
  10855. }
  10856. #endif
  10857. PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
  10858. __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
  10859. return result;
  10860. }
  10861. #endif
  10862. static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
  10863. PyObject *result;
  10864. if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
  10865. result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
  10866. return result;
  10867. }
  10868. /* py_dict_items (used by OwnedDictNext) */
  10869. static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
  10870. return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
  10871. }
  10872. /* py_dict_values (used by OwnedDictNext) */
  10873. static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
  10874. return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
  10875. }
  10876. /* OwnedDictNext (used by ParseKeywordsImpl) */
  10877. #if CYTHON_AVOID_BORROWED_REFS
  10878. static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
  10879. PyObject *next = NULL;
  10880. if (!*ppos) {
  10881. if (pvalue) {
  10882. PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
  10883. if (unlikely(!dictview)) goto bad;
  10884. *ppos = PyObject_GetIter(dictview);
  10885. Py_DECREF(dictview);
  10886. } else {
  10887. *ppos = PyObject_GetIter(p);
  10888. }
  10889. if (unlikely(!*ppos)) goto bad;
  10890. }
  10891. next = PyIter_Next(*ppos);
  10892. if (!next) {
  10893. if (PyErr_Occurred()) goto bad;
  10894. return 0;
  10895. }
  10896. if (pkey && pvalue) {
  10897. *pkey = __Pyx_PySequence_ITEM(next, 0);
  10898. if (unlikely(*pkey)) goto bad;
  10899. *pvalue = __Pyx_PySequence_ITEM(next, 1);
  10900. if (unlikely(*pvalue)) goto bad;
  10901. Py_DECREF(next);
  10902. } else if (pkey) {
  10903. *pkey = next;
  10904. } else {
  10905. assert(pvalue);
  10906. *pvalue = next;
  10907. }
  10908. return 1;
  10909. bad:
  10910. Py_XDECREF(next);
  10911. #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
  10912. PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
  10913. #else
  10914. PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
  10915. #endif
  10916. if (pkey) *pkey = NULL;
  10917. if (pvalue) *pvalue = NULL;
  10918. return 0;
  10919. }
  10920. #else // !CYTHON_AVOID_BORROWED_REFS
  10921. static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
  10922. int result = PyDict_Next(p, ppos, pkey, pvalue);
  10923. if (likely(result == 1)) {
  10924. if (pkey) Py_INCREF(*pkey);
  10925. if (pvalue) Py_INCREF(*pvalue);
  10926. }
  10927. return result;
  10928. }
  10929. #endif
  10930. /* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
  10931. static void __Pyx_RaiseDoubleKeywordsError(
  10932. const char* func_name,
  10933. PyObject* kw_name)
  10934. {
  10935. PyErr_Format(PyExc_TypeError,
  10936. "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
  10937. }
  10938. /* CallUnboundCMethod2 */
  10939. #if CYTHON_COMPILING_IN_CPYTHON
  10940. static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
  10941. int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
  10942. if (likely(was_initialized == 2 && cfunc->func)) {
  10943. PyObject *args[2] = {arg1, arg2};
  10944. if (cfunc->flag == METH_FASTCALL) {
  10945. return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
  10946. }
  10947. if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
  10948. return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
  10949. }
  10950. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  10951. else if (unlikely(was_initialized == 1)) {
  10952. __Pyx_CachedCFunction tmp_cfunc = {
  10953. #ifndef __cplusplus
  10954. 0
  10955. #endif
  10956. };
  10957. tmp_cfunc.type = cfunc->type;
  10958. tmp_cfunc.method_name = cfunc->method_name;
  10959. return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
  10960. }
  10961. #endif
  10962. PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
  10963. __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
  10964. return result;
  10965. }
  10966. #endif
  10967. static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
  10968. if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
  10969. #if CYTHON_COMPILING_IN_CPYTHON
  10970. if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
  10971. PyObject *result = NULL;
  10972. PyObject *args = PyTuple_New(2);
  10973. if (unlikely(!args)) return NULL;
  10974. Py_INCREF(arg1);
  10975. PyTuple_SET_ITEM(args, 0, arg1);
  10976. Py_INCREF(arg2);
  10977. PyTuple_SET_ITEM(args, 1, arg2);
  10978. if (cfunc->flag & METH_KEYWORDS)
  10979. result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
  10980. else
  10981. result = __Pyx_CallCFunction(cfunc, self, args);
  10982. Py_DECREF(args);
  10983. return result;
  10984. }
  10985. #endif
  10986. {
  10987. PyObject *args[4] = {NULL, self, arg1, arg2};
  10988. return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
  10989. }
  10990. }
  10991. /* ParseKeywordsImpl (used by ParseKeywords) */
  10992. static int __Pyx_ValidateDuplicatePosArgs(
  10993. PyObject *kwds,
  10994. PyObject ** const argnames[],
  10995. PyObject ** const *first_kw_arg,
  10996. const char* function_name)
  10997. {
  10998. PyObject ** const *name = argnames;
  10999. while (name != first_kw_arg) {
  11000. PyObject *key = **name;
  11001. int found = PyDict_Contains(kwds, key);
  11002. if (unlikely(found)) {
  11003. if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
  11004. goto bad;
  11005. }
  11006. name++;
  11007. }
  11008. return 0;
  11009. bad:
  11010. return -1;
  11011. }
  11012. #if CYTHON_USE_UNICODE_INTERNALS
  11013. static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
  11014. int kind;
  11015. Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
  11016. if (len != PyUnicode_GET_LENGTH(s2)) return 0;
  11017. kind = PyUnicode_KIND(s1);
  11018. if (kind != PyUnicode_KIND(s2)) return 0;
  11019. const void *data1 = PyUnicode_DATA(s1);
  11020. const void *data2 = PyUnicode_DATA(s2);
  11021. return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
  11022. }
  11023. #endif
  11024. static int __Pyx_MatchKeywordArg_str(
  11025. PyObject *key,
  11026. PyObject ** const argnames[],
  11027. PyObject ** const *first_kw_arg,
  11028. size_t *index_found,
  11029. const char *function_name)
  11030. {
  11031. PyObject ** const *name;
  11032. #if CYTHON_USE_UNICODE_INTERNALS
  11033. Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
  11034. if (unlikely(key_hash == -1)) {
  11035. key_hash = PyObject_Hash(key);
  11036. if (unlikely(key_hash == -1))
  11037. goto bad;
  11038. }
  11039. #endif
  11040. name = first_kw_arg;
  11041. while (*name) {
  11042. PyObject *name_str = **name;
  11043. #if CYTHON_USE_UNICODE_INTERNALS
  11044. if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
  11045. *index_found = (size_t) (name - argnames);
  11046. return 1;
  11047. }
  11048. #else
  11049. #if CYTHON_ASSUME_SAFE_SIZE
  11050. if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
  11051. #endif
  11052. {
  11053. int cmp = PyUnicode_Compare(name_str, key);
  11054. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  11055. if (cmp == 0) {
  11056. *index_found = (size_t) (name - argnames);
  11057. return 1;
  11058. }
  11059. }
  11060. #endif
  11061. name++;
  11062. }
  11063. name = argnames;
  11064. while (name != first_kw_arg) {
  11065. PyObject *name_str = **name;
  11066. #if CYTHON_USE_UNICODE_INTERNALS
  11067. if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
  11068. if (__Pyx_UnicodeKeywordsEqual(name_str, key))
  11069. goto arg_passed_twice;
  11070. }
  11071. #else
  11072. #if CYTHON_ASSUME_SAFE_SIZE
  11073. if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
  11074. #endif
  11075. {
  11076. if (unlikely(name_str == key)) goto arg_passed_twice;
  11077. int cmp = PyUnicode_Compare(name_str, key);
  11078. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  11079. if (cmp == 0) goto arg_passed_twice;
  11080. }
  11081. #endif
  11082. name++;
  11083. }
  11084. return 0;
  11085. arg_passed_twice:
  11086. __Pyx_RaiseDoubleKeywordsError(function_name, key);
  11087. goto bad;
  11088. bad:
  11089. return -1;
  11090. }
  11091. static int __Pyx_MatchKeywordArg_nostr(
  11092. PyObject *key,
  11093. PyObject ** const argnames[],
  11094. PyObject ** const *first_kw_arg,
  11095. size_t *index_found,
  11096. const char *function_name)
  11097. {
  11098. PyObject ** const *name;
  11099. if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
  11100. name = first_kw_arg;
  11101. while (*name) {
  11102. int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
  11103. if (cmp == 1) {
  11104. *index_found = (size_t) (name - argnames);
  11105. return 1;
  11106. }
  11107. if (unlikely(cmp == -1)) goto bad;
  11108. name++;
  11109. }
  11110. name = argnames;
  11111. while (name != first_kw_arg) {
  11112. int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
  11113. if (unlikely(cmp != 0)) {
  11114. if (cmp == 1) goto arg_passed_twice;
  11115. else goto bad;
  11116. }
  11117. name++;
  11118. }
  11119. return 0;
  11120. arg_passed_twice:
  11121. __Pyx_RaiseDoubleKeywordsError(function_name, key);
  11122. goto bad;
  11123. invalid_keyword_type:
  11124. PyErr_Format(PyExc_TypeError,
  11125. "%.200s() keywords must be strings", function_name);
  11126. goto bad;
  11127. bad:
  11128. return -1;
  11129. }
  11130. static CYTHON_INLINE int __Pyx_MatchKeywordArg(
  11131. PyObject *key,
  11132. PyObject ** const argnames[],
  11133. PyObject ** const *first_kw_arg,
  11134. size_t *index_found,
  11135. const char *function_name)
  11136. {
  11137. return likely(PyUnicode_CheckExact(key)) ?
  11138. __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
  11139. __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
  11140. }
  11141. static void __Pyx_RejectUnknownKeyword(
  11142. PyObject *kwds,
  11143. PyObject ** const argnames[],
  11144. PyObject ** const *first_kw_arg,
  11145. const char *function_name)
  11146. {
  11147. #if CYTHON_AVOID_BORROWED_REFS
  11148. PyObject *pos = NULL;
  11149. #else
  11150. Py_ssize_t pos = 0;
  11151. #endif
  11152. PyObject *key = NULL;
  11153. __Pyx_BEGIN_CRITICAL_SECTION(kwds);
  11154. while (
  11155. #if CYTHON_AVOID_BORROWED_REFS
  11156. __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
  11157. #else
  11158. PyDict_Next(kwds, &pos, &key, NULL)
  11159. #endif
  11160. ) {
  11161. PyObject** const *name = first_kw_arg;
  11162. while (*name && (**name != key)) name++;
  11163. if (!*name) {
  11164. size_t index_found = 0;
  11165. int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
  11166. if (cmp != 1) {
  11167. if (cmp == 0) {
  11168. PyErr_Format(PyExc_TypeError,
  11169. "%s() got an unexpected keyword argument '%U'",
  11170. function_name, key);
  11171. }
  11172. #if CYTHON_AVOID_BORROWED_REFS
  11173. Py_DECREF(key);
  11174. #endif
  11175. break;
  11176. }
  11177. }
  11178. #if CYTHON_AVOID_BORROWED_REFS
  11179. Py_DECREF(key);
  11180. #endif
  11181. }
  11182. __Pyx_END_CRITICAL_SECTION();
  11183. #if CYTHON_AVOID_BORROWED_REFS
  11184. Py_XDECREF(pos);
  11185. #endif
  11186. assert(PyErr_Occurred());
  11187. }
  11188. static int __Pyx_ParseKeywordDict(
  11189. PyObject *kwds,
  11190. PyObject ** const argnames[],
  11191. PyObject *values[],
  11192. Py_ssize_t num_pos_args,
  11193. Py_ssize_t num_kwargs,
  11194. const char* function_name,
  11195. int ignore_unknown_kwargs)
  11196. {
  11197. PyObject** const *name;
  11198. PyObject** const *first_kw_arg = argnames + num_pos_args;
  11199. Py_ssize_t extracted = 0;
  11200. #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
  11201. if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
  11202. #endif
  11203. name = first_kw_arg;
  11204. while (*name && num_kwargs > extracted) {
  11205. PyObject * key = **name;
  11206. PyObject *value;
  11207. int found = 0;
  11208. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  11209. found = PyDict_GetItemRef(kwds, key, &value);
  11210. #else
  11211. value = PyDict_GetItemWithError(kwds, key);
  11212. if (value) {
  11213. Py_INCREF(value);
  11214. found = 1;
  11215. } else {
  11216. if (unlikely(PyErr_Occurred())) goto bad;
  11217. }
  11218. #endif
  11219. if (found) {
  11220. if (unlikely(found < 0)) goto bad;
  11221. values[name-argnames] = value;
  11222. extracted++;
  11223. }
  11224. name++;
  11225. }
  11226. if (num_kwargs > extracted) {
  11227. if (ignore_unknown_kwargs) {
  11228. if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
  11229. goto bad;
  11230. } else {
  11231. __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
  11232. goto bad;
  11233. }
  11234. }
  11235. return 0;
  11236. bad:
  11237. return -1;
  11238. }
  11239. static int __Pyx_ParseKeywordDictToDict(
  11240. PyObject *kwds,
  11241. PyObject ** const argnames[],
  11242. PyObject *kwds2,
  11243. PyObject *values[],
  11244. Py_ssize_t num_pos_args,
  11245. const char* function_name)
  11246. {
  11247. PyObject** const *name;
  11248. PyObject** const *first_kw_arg = argnames + num_pos_args;
  11249. Py_ssize_t len;
  11250. #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
  11251. if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
  11252. #endif
  11253. if (PyDict_Update(kwds2, kwds) < 0) goto bad;
  11254. name = first_kw_arg;
  11255. while (*name) {
  11256. PyObject *key = **name;
  11257. PyObject *value;
  11258. #if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
  11259. int found = PyDict_Pop(kwds2, key, &value);
  11260. if (found) {
  11261. if (unlikely(found < 0)) goto bad;
  11262. values[name-argnames] = value;
  11263. }
  11264. #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  11265. int found = PyDict_GetItemRef(kwds2, key, &value);
  11266. if (found) {
  11267. if (unlikely(found < 0)) goto bad;
  11268. values[name-argnames] = value;
  11269. if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
  11270. }
  11271. #else
  11272. #if CYTHON_COMPILING_IN_CPYTHON
  11273. value = _PyDict_Pop(kwds2, key, kwds2);
  11274. #else
  11275. value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
  11276. #endif
  11277. if (value == kwds2) {
  11278. Py_DECREF(value);
  11279. } else {
  11280. if (unlikely(!value)) goto bad;
  11281. values[name-argnames] = value;
  11282. }
  11283. #endif
  11284. name++;
  11285. }
  11286. len = PyDict_Size(kwds2);
  11287. if (len > 0) {
  11288. return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
  11289. } else if (unlikely(len == -1)) {
  11290. goto bad;
  11291. }
  11292. return 0;
  11293. bad:
  11294. return -1;
  11295. }
  11296. static int __Pyx_ParseKeywordsTuple(
  11297. PyObject *kwds,
  11298. PyObject * const *kwvalues,
  11299. PyObject ** const argnames[],
  11300. PyObject *kwds2,
  11301. PyObject *values[],
  11302. Py_ssize_t num_pos_args,
  11303. Py_ssize_t num_kwargs,
  11304. const char* function_name,
  11305. int ignore_unknown_kwargs)
  11306. {
  11307. PyObject *key = NULL;
  11308. PyObject** const * name;
  11309. PyObject** const *first_kw_arg = argnames + num_pos_args;
  11310. for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
  11311. #if CYTHON_AVOID_BORROWED_REFS
  11312. key = __Pyx_PySequence_ITEM(kwds, pos);
  11313. #else
  11314. key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
  11315. #endif
  11316. #if !CYTHON_ASSUME_SAFE_MACROS
  11317. if (unlikely(!key)) goto bad;
  11318. #endif
  11319. name = first_kw_arg;
  11320. while (*name && (**name != key)) name++;
  11321. if (*name) {
  11322. PyObject *value = kwvalues[pos];
  11323. values[name-argnames] = __Pyx_NewRef(value);
  11324. } else {
  11325. size_t index_found = 0;
  11326. int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
  11327. if (cmp == 1) {
  11328. PyObject *value = kwvalues[pos];
  11329. values[index_found] = __Pyx_NewRef(value);
  11330. } else {
  11331. if (unlikely(cmp == -1)) goto bad;
  11332. if (kwds2) {
  11333. PyObject *value = kwvalues[pos];
  11334. if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
  11335. } else if (!ignore_unknown_kwargs) {
  11336. goto invalid_keyword;
  11337. }
  11338. }
  11339. }
  11340. #if CYTHON_AVOID_BORROWED_REFS
  11341. Py_DECREF(key);
  11342. key = NULL;
  11343. #endif
  11344. }
  11345. return 0;
  11346. invalid_keyword:
  11347. PyErr_Format(PyExc_TypeError,
  11348. "%s() got an unexpected keyword argument '%U'",
  11349. function_name, key);
  11350. goto bad;
  11351. bad:
  11352. #if CYTHON_AVOID_BORROWED_REFS
  11353. Py_XDECREF(key);
  11354. #endif
  11355. return -1;
  11356. }
  11357. /* ParseKeywords */
  11358. static int __Pyx_ParseKeywords(
  11359. PyObject *kwds,
  11360. PyObject * const *kwvalues,
  11361. PyObject ** const argnames[],
  11362. PyObject *kwds2,
  11363. PyObject *values[],
  11364. Py_ssize_t num_pos_args,
  11365. Py_ssize_t num_kwargs,
  11366. const char* function_name,
  11367. int ignore_unknown_kwargs)
  11368. {
  11369. if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
  11370. return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
  11371. else if (kwds2)
  11372. return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
  11373. else
  11374. return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
  11375. }
  11376. /* RaiseArgTupleInvalid */
  11377. static void __Pyx_RaiseArgtupleInvalid(
  11378. const char* func_name,
  11379. int exact,
  11380. Py_ssize_t num_min,
  11381. Py_ssize_t num_max,
  11382. Py_ssize_t num_found)
  11383. {
  11384. Py_ssize_t num_expected;
  11385. const char *more_or_less;
  11386. if (num_found < num_min) {
  11387. num_expected = num_min;
  11388. more_or_less = "at least";
  11389. } else {
  11390. num_expected = num_max;
  11391. more_or_less = "at most";
  11392. }
  11393. if (exact) {
  11394. more_or_less = "exactly";
  11395. }
  11396. PyErr_Format(PyExc_TypeError,
  11397. "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  11398. func_name, more_or_less, num_expected,
  11399. (num_expected == 1) ? "" : "s", num_found);
  11400. }
  11401. /* PyObjectSetAttrStr */
  11402. #if CYTHON_USE_TYPE_SLOTS
  11403. static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
  11404. PyTypeObject* tp = Py_TYPE(obj);
  11405. if (likely(tp->tp_setattro))
  11406. return tp->tp_setattro(obj, attr_name, value);
  11407. return PyObject_SetAttr(obj, attr_name, value);
  11408. }
  11409. #endif
  11410. /* PyDictVersioning (used by GetModuleGlobalName) */
  11411. #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
  11412. static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
  11413. PyObject *dict = Py_TYPE(obj)->tp_dict;
  11414. return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
  11415. }
  11416. static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
  11417. PyObject **dictptr = NULL;
  11418. Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
  11419. if (offset) {
  11420. #if CYTHON_COMPILING_IN_CPYTHON
  11421. dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
  11422. #else
  11423. dictptr = _PyObject_GetDictPtr(obj);
  11424. #endif
  11425. }
  11426. return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
  11427. }
  11428. static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
  11429. PyObject *dict = Py_TYPE(obj)->tp_dict;
  11430. if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
  11431. return 0;
  11432. return obj_dict_version == __Pyx_get_object_dict_version(obj);
  11433. }
  11434. #endif
  11435. /* GetModuleGlobalName */
  11436. #if CYTHON_USE_DICT_VERSIONS
  11437. static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
  11438. #else
  11439. static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
  11440. #endif
  11441. {
  11442. PyObject *result;
  11443. #if CYTHON_COMPILING_IN_LIMITED_API
  11444. if (unlikely(!__pyx_m)) {
  11445. if (!PyErr_Occurred())
  11446. PyErr_SetNone(PyExc_NameError);
  11447. return NULL;
  11448. }
  11449. result = PyObject_GetAttr(__pyx_m, name);
  11450. if (likely(result)) {
  11451. return result;
  11452. }
  11453. PyErr_Clear();
  11454. #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  11455. if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
  11456. __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
  11457. if (likely(result)) {
  11458. return result;
  11459. }
  11460. #else
  11461. result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
  11462. __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
  11463. if (likely(result)) {
  11464. return __Pyx_NewRef(result);
  11465. }
  11466. PyErr_Clear();
  11467. #endif
  11468. return __Pyx_GetBuiltinName(name);
  11469. }
  11470. /* PyObjectFastCallMethod */
  11471. #if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
  11472. static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
  11473. PyObject *result;
  11474. PyObject *attr = PyObject_GetAttr(args[0], name);
  11475. if (unlikely(!attr))
  11476. return NULL;
  11477. result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
  11478. Py_DECREF(attr);
  11479. return result;
  11480. }
  11481. #endif
  11482. /* RaiseTooManyValuesToUnpack */
  11483. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
  11484. PyErr_Format(PyExc_ValueError,
  11485. "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
  11486. }
  11487. /* RaiseNeedMoreValuesToUnpack */
  11488. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
  11489. PyErr_Format(PyExc_ValueError,
  11490. "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
  11491. index, (index == 1) ? "" : "s");
  11492. }
  11493. /* IterFinish */
  11494. static CYTHON_INLINE int __Pyx_IterFinish(void) {
  11495. PyObject* exc_type;
  11496. __Pyx_PyThreadState_declare
  11497. __Pyx_PyThreadState_assign
  11498. exc_type = __Pyx_PyErr_CurrentExceptionType();
  11499. if (unlikely(exc_type)) {
  11500. if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
  11501. return -1;
  11502. __Pyx_PyErr_Clear();
  11503. return 0;
  11504. }
  11505. return 0;
  11506. }
  11507. /* UnpackItemEndCheck */
  11508. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
  11509. if (unlikely(retval)) {
  11510. Py_DECREF(retval);
  11511. __Pyx_RaiseTooManyValuesError(expected);
  11512. return -1;
  11513. }
  11514. return __Pyx_IterFinish();
  11515. }
  11516. /* PyLongBinop */
  11517. #if !CYTHON_COMPILING_IN_PYPY
  11518. static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) {
  11519. return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
  11520. }
  11521. #if CYTHON_USE_PYLONG_INTERNALS
  11522. static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
  11523. CYTHON_MAYBE_UNUSED_VAR(inplace);
  11524. CYTHON_UNUSED_VAR(zerodivision_check);
  11525. const long b = intval;
  11526. long a;
  11527. const PY_LONG_LONG llb = intval;
  11528. PY_LONG_LONG lla;
  11529. if (unlikely(__Pyx_PyLong_IsZero(op1))) {
  11530. return __Pyx_NewRef(op2);
  11531. }
  11532. const int is_positive = __Pyx_PyLong_IsPos(op1);
  11533. const digit* digits = __Pyx_PyLong_Digits(op1);
  11534. const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
  11535. if (likely(size == 1)) {
  11536. a = (long) digits[0];
  11537. if (!is_positive) a *= -1;
  11538. } else {
  11539. switch (size) {
  11540. case 2:
  11541. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  11542. a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11543. if (!is_positive) a *= -1;
  11544. goto calculate_long;
  11545. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
  11546. lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  11547. if (!is_positive) lla *= -1;
  11548. goto calculate_long_long;
  11549. }
  11550. break;
  11551. case 3:
  11552. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  11553. a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11554. if (!is_positive) a *= -1;
  11555. goto calculate_long;
  11556. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
  11557. 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]));
  11558. if (!is_positive) lla *= -1;
  11559. goto calculate_long_long;
  11560. }
  11561. break;
  11562. case 4:
  11563. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  11564. a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11565. if (!is_positive) a *= -1;
  11566. goto calculate_long;
  11567. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
  11568. 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]));
  11569. if (!is_positive) lla *= -1;
  11570. goto calculate_long_long;
  11571. }
  11572. break;
  11573. }
  11574. return PyLong_Type.tp_as_number->nb_add(op1, op2);
  11575. }
  11576. calculate_long:
  11577. {
  11578. long x;
  11579. x = a + b;
  11580. return PyLong_FromLong(x);
  11581. }
  11582. calculate_long_long:
  11583. {
  11584. PY_LONG_LONG llx;
  11585. llx = lla + llb;
  11586. return PyLong_FromLongLong(llx);
  11587. }
  11588. }
  11589. #endif
  11590. static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) {
  11591. CYTHON_UNUSED_VAR(zerodivision_check);
  11592. const long b = intval;
  11593. double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
  11594. double result;
  11595. result = ((double)a) + (double)b;
  11596. return PyFloat_FromDouble(result);
  11597. }
  11598. static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
  11599. CYTHON_MAYBE_UNUSED_VAR(intval);
  11600. CYTHON_UNUSED_VAR(zerodivision_check);
  11601. #if CYTHON_USE_PYLONG_INTERNALS
  11602. if (likely(PyLong_CheckExact(op1))) {
  11603. return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check);
  11604. }
  11605. #endif
  11606. if (PyFloat_CheckExact(op1)) {
  11607. return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check);
  11608. }
  11609. return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace);
  11610. }
  11611. #endif
  11612. /* RaiseException */
  11613. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
  11614. PyObject* owned_instance = NULL;
  11615. if (tb == Py_None) {
  11616. tb = 0;
  11617. } else if (tb && !PyTraceBack_Check(tb)) {
  11618. PyErr_SetString(PyExc_TypeError,
  11619. "raise: arg 3 must be a traceback or None");
  11620. goto bad;
  11621. }
  11622. if (value == Py_None)
  11623. value = 0;
  11624. if (PyExceptionInstance_Check(type)) {
  11625. if (value) {
  11626. PyErr_SetString(PyExc_TypeError,
  11627. "instance exception may not have a separate value");
  11628. goto bad;
  11629. }
  11630. value = type;
  11631. type = (PyObject*) Py_TYPE(value);
  11632. } else if (PyExceptionClass_Check(type)) {
  11633. PyObject *instance_class = NULL;
  11634. if (value && PyExceptionInstance_Check(value)) {
  11635. instance_class = (PyObject*) Py_TYPE(value);
  11636. if (instance_class != type) {
  11637. int is_subclass = PyObject_IsSubclass(instance_class, type);
  11638. if (!is_subclass) {
  11639. instance_class = NULL;
  11640. } else if (unlikely(is_subclass == -1)) {
  11641. goto bad;
  11642. } else {
  11643. type = instance_class;
  11644. }
  11645. }
  11646. }
  11647. if (!instance_class) {
  11648. PyObject *args;
  11649. if (!value)
  11650. args = PyTuple_New(0);
  11651. else if (PyTuple_Check(value)) {
  11652. Py_INCREF(value);
  11653. args = value;
  11654. } else
  11655. args = PyTuple_Pack(1, value);
  11656. if (!args)
  11657. goto bad;
  11658. owned_instance = PyObject_Call(type, args, NULL);
  11659. Py_DECREF(args);
  11660. if (!owned_instance)
  11661. goto bad;
  11662. value = owned_instance;
  11663. if (!PyExceptionInstance_Check(value)) {
  11664. PyErr_Format(PyExc_TypeError,
  11665. "calling %R should have returned an instance of "
  11666. "BaseException, not %R",
  11667. type, Py_TYPE(value));
  11668. goto bad;
  11669. }
  11670. }
  11671. } else {
  11672. PyErr_SetString(PyExc_TypeError,
  11673. "raise: exception class must be a subclass of BaseException");
  11674. goto bad;
  11675. }
  11676. if (cause) {
  11677. PyObject *fixed_cause;
  11678. if (cause == Py_None) {
  11679. fixed_cause = NULL;
  11680. } else if (PyExceptionClass_Check(cause)) {
  11681. fixed_cause = PyObject_CallObject(cause, NULL);
  11682. if (fixed_cause == NULL)
  11683. goto bad;
  11684. } else if (PyExceptionInstance_Check(cause)) {
  11685. fixed_cause = cause;
  11686. Py_INCREF(fixed_cause);
  11687. } else {
  11688. PyErr_SetString(PyExc_TypeError,
  11689. "exception causes must derive from "
  11690. "BaseException");
  11691. goto bad;
  11692. }
  11693. PyException_SetCause(value, fixed_cause);
  11694. }
  11695. PyErr_SetObject(type, value);
  11696. if (tb) {
  11697. #if PY_VERSION_HEX >= 0x030C00A6
  11698. PyException_SetTraceback(value, tb);
  11699. #elif CYTHON_FAST_THREAD_STATE
  11700. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  11701. PyObject* tmp_tb = tstate->curexc_traceback;
  11702. if (tb != tmp_tb) {
  11703. Py_INCREF(tb);
  11704. tstate->curexc_traceback = tb;
  11705. Py_XDECREF(tmp_tb);
  11706. }
  11707. #else
  11708. PyObject *tmp_type, *tmp_value, *tmp_tb;
  11709. PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
  11710. Py_INCREF(tb);
  11711. PyErr_Restore(tmp_type, tmp_value, tb);
  11712. Py_XDECREF(tmp_tb);
  11713. #endif
  11714. }
  11715. bad:
  11716. Py_XDECREF(owned_instance);
  11717. return;
  11718. }
  11719. /* GetItemInt */
  11720. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
  11721. PyObject *r;
  11722. if (unlikely(!j)) return NULL;
  11723. r = PyObject_GetItem(o, j);
  11724. Py_DECREF(j);
  11725. return r;
  11726. }
  11727. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  11728. int wraparound, int boundscheck, int unsafe_shared) {
  11729. CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
  11730. #if CYTHON_ASSUME_SAFE_SIZE
  11731. Py_ssize_t wrapped_i = i;
  11732. if (wraparound & unlikely(i < 0)) {
  11733. wrapped_i += PyList_GET_SIZE(o);
  11734. }
  11735. if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
  11736. return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
  11737. } else
  11738. if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
  11739. return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
  11740. }
  11741. return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
  11742. #else
  11743. (void)wraparound;
  11744. (void)boundscheck;
  11745. return PySequence_GetItem(o, i);
  11746. #endif
  11747. }
  11748. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  11749. int wraparound, int boundscheck, int unsafe_shared) {
  11750. CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
  11751. #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  11752. Py_ssize_t wrapped_i = i;
  11753. if (wraparound & unlikely(i < 0)) {
  11754. wrapped_i += PyTuple_GET_SIZE(o);
  11755. }
  11756. if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
  11757. return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
  11758. }
  11759. return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
  11760. #else
  11761. (void)wraparound;
  11762. (void)boundscheck;
  11763. return PySequence_GetItem(o, i);
  11764. #endif
  11765. }
  11766. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
  11767. int wraparound, int boundscheck, int unsafe_shared) {
  11768. CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
  11769. #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  11770. if (is_list || PyList_CheckExact(o)) {
  11771. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
  11772. if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
  11773. return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
  11774. } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
  11775. return __Pyx_NewRef(PyList_GET_ITEM(o, n));
  11776. }
  11777. } else
  11778. #if !CYTHON_AVOID_BORROWED_REFS
  11779. if (PyTuple_CheckExact(o)) {
  11780. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
  11781. if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
  11782. return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
  11783. }
  11784. } else
  11785. #endif
  11786. #endif
  11787. #if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
  11788. {
  11789. PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
  11790. PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
  11791. if (!is_list && mm && mm->mp_subscript) {
  11792. PyObject *r, *key = PyLong_FromSsize_t(i);
  11793. if (unlikely(!key)) return NULL;
  11794. r = mm->mp_subscript(o, key);
  11795. Py_DECREF(key);
  11796. return r;
  11797. }
  11798. if (is_list || likely(sm && sm->sq_item)) {
  11799. if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
  11800. Py_ssize_t l = sm->sq_length(o);
  11801. if (likely(l >= 0)) {
  11802. i += l;
  11803. } else {
  11804. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  11805. return NULL;
  11806. PyErr_Clear();
  11807. }
  11808. }
  11809. return sm->sq_item(o, i);
  11810. }
  11811. }
  11812. #else
  11813. if (is_list || !PyMapping_Check(o)) {
  11814. return PySequence_GetItem(o, i);
  11815. }
  11816. #endif
  11817. (void)wraparound;
  11818. (void)boundscheck;
  11819. return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
  11820. }
  11821. /* ObjectGetItem */
  11822. #if CYTHON_USE_TYPE_SLOTS
  11823. static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
  11824. PyObject *runerr = NULL;
  11825. Py_ssize_t key_value;
  11826. key_value = __Pyx_PyIndex_AsSsize_t(index);
  11827. if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
  11828. return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1);
  11829. }
  11830. if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
  11831. __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index));
  11832. PyErr_Clear();
  11833. PyErr_Format(PyExc_IndexError,
  11834. "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
  11835. __Pyx_DECREF_TypeName(index_type_name);
  11836. }
  11837. return NULL;
  11838. }
  11839. static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
  11840. __Pyx_TypeName obj_type_name;
  11841. if (likely(PyType_Check(obj))) {
  11842. PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem);
  11843. if (!meth) {
  11844. PyErr_Clear();
  11845. } else {
  11846. PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
  11847. Py_DECREF(meth);
  11848. return result;
  11849. }
  11850. }
  11851. obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
  11852. PyErr_Format(PyExc_TypeError,
  11853. "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
  11854. __Pyx_DECREF_TypeName(obj_type_name);
  11855. return NULL;
  11856. }
  11857. static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
  11858. PyTypeObject *tp = Py_TYPE(obj);
  11859. PyMappingMethods *mm = tp->tp_as_mapping;
  11860. PySequenceMethods *sm = tp->tp_as_sequence;
  11861. if (likely(mm && mm->mp_subscript)) {
  11862. return mm->mp_subscript(obj, key);
  11863. }
  11864. if (likely(sm && sm->sq_item)) {
  11865. return __Pyx_PyObject_GetIndex(obj, key);
  11866. }
  11867. return __Pyx_PyObject_GetItem_Slow(obj, key);
  11868. }
  11869. #endif
  11870. /* SliceObject */
  11871. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
  11872. Py_ssize_t cstart, Py_ssize_t cstop,
  11873. PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
  11874. int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
  11875. __Pyx_TypeName obj_type_name;
  11876. #if CYTHON_USE_TYPE_SLOTS
  11877. PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping;
  11878. if (likely(mp && mp->mp_subscript))
  11879. #endif
  11880. {
  11881. PyObject* result;
  11882. PyObject *py_slice, *py_start, *py_stop;
  11883. if (_py_slice) {
  11884. py_slice = *_py_slice;
  11885. } else {
  11886. PyObject* owned_start = NULL;
  11887. PyObject* owned_stop = NULL;
  11888. if (_py_start) {
  11889. py_start = *_py_start;
  11890. } else {
  11891. if (has_cstart) {
  11892. owned_start = py_start = PyLong_FromSsize_t(cstart);
  11893. if (unlikely(!py_start)) goto bad;
  11894. } else
  11895. py_start = Py_None;
  11896. }
  11897. if (_py_stop) {
  11898. py_stop = *_py_stop;
  11899. } else {
  11900. if (has_cstop) {
  11901. owned_stop = py_stop = PyLong_FromSsize_t(cstop);
  11902. if (unlikely(!py_stop)) {
  11903. Py_XDECREF(owned_start);
  11904. goto bad;
  11905. }
  11906. } else
  11907. py_stop = Py_None;
  11908. }
  11909. py_slice = PySlice_New(py_start, py_stop, Py_None);
  11910. Py_XDECREF(owned_start);
  11911. Py_XDECREF(owned_stop);
  11912. if (unlikely(!py_slice)) goto bad;
  11913. }
  11914. #if CYTHON_USE_TYPE_SLOTS
  11915. result = mp->mp_subscript(obj, py_slice);
  11916. #else
  11917. result = PyObject_GetItem(obj, py_slice);
  11918. #endif
  11919. if (!_py_slice) {
  11920. Py_DECREF(py_slice);
  11921. }
  11922. return result;
  11923. }
  11924. obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
  11925. PyErr_Format(PyExc_TypeError,
  11926. "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
  11927. __Pyx_DECREF_TypeName(obj_type_name);
  11928. bad:
  11929. return NULL;
  11930. }
  11931. /* PyLongBinop */
  11932. #if !CYTHON_COMPILING_IN_PYPY
  11933. static PyObject* __Pyx_Fallback___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, int inplace) {
  11934. return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
  11935. }
  11936. #if CYTHON_USE_PYLONG_INTERNALS
  11937. static PyObject* __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
  11938. CYTHON_MAYBE_UNUSED_VAR(inplace);
  11939. CYTHON_UNUSED_VAR(zerodivision_check);
  11940. const long b = intval;
  11941. long a;
  11942. const PY_LONG_LONG llb = intval;
  11943. PY_LONG_LONG lla;
  11944. if (unlikely(__Pyx_PyLong_IsZero(op1))) {
  11945. return PyLong_FromLong(-intval);
  11946. }
  11947. const int is_positive = __Pyx_PyLong_IsPos(op1);
  11948. const digit* digits = __Pyx_PyLong_Digits(op1);
  11949. const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
  11950. if (likely(size == 1)) {
  11951. a = (long) digits[0];
  11952. if (!is_positive) a *= -1;
  11953. } else {
  11954. switch (size) {
  11955. case 2:
  11956. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  11957. a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11958. if (!is_positive) a *= -1;
  11959. goto calculate_long;
  11960. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
  11961. lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
  11962. if (!is_positive) lla *= -1;
  11963. goto calculate_long_long;
  11964. }
  11965. break;
  11966. case 3:
  11967. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  11968. a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11969. if (!is_positive) a *= -1;
  11970. goto calculate_long;
  11971. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
  11972. 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]));
  11973. if (!is_positive) lla *= -1;
  11974. goto calculate_long_long;
  11975. }
  11976. break;
  11977. case 4:
  11978. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  11979. a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  11980. if (!is_positive) a *= -1;
  11981. goto calculate_long;
  11982. } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
  11983. 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]));
  11984. if (!is_positive) lla *= -1;
  11985. goto calculate_long_long;
  11986. }
  11987. break;
  11988. }
  11989. return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
  11990. }
  11991. calculate_long:
  11992. {
  11993. long x;
  11994. x = a - b;
  11995. return PyLong_FromLong(x);
  11996. }
  11997. calculate_long_long:
  11998. {
  11999. PY_LONG_LONG llx;
  12000. llx = lla - llb;
  12001. return PyLong_FromLongLong(llx);
  12002. }
  12003. }
  12004. #endif
  12005. static PyObject* __Pyx_Float___Pyx_PyLong_SubtractObjC(PyObject *float_val, long intval, int zerodivision_check) {
  12006. CYTHON_UNUSED_VAR(zerodivision_check);
  12007. const long b = intval;
  12008. double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
  12009. double result;
  12010. result = ((double)a) - (double)b;
  12011. return PyFloat_FromDouble(result);
  12012. }
  12013. static CYTHON_INLINE PyObject* __Pyx_PyLong_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
  12014. CYTHON_MAYBE_UNUSED_VAR(intval);
  12015. CYTHON_UNUSED_VAR(zerodivision_check);
  12016. #if CYTHON_USE_PYLONG_INTERNALS
  12017. if (likely(PyLong_CheckExact(op1))) {
  12018. return __Pyx_Unpacked___Pyx_PyLong_SubtractObjC(op1, op2, intval, inplace, zerodivision_check);
  12019. }
  12020. #endif
  12021. if (PyFloat_CheckExact(op1)) {
  12022. return __Pyx_Float___Pyx_PyLong_SubtractObjC(op1, intval, zerodivision_check);
  12023. }
  12024. return __Pyx_Fallback___Pyx_PyLong_SubtractObjC(op1, op2, inplace);
  12025. }
  12026. #endif
  12027. /* pybytes_as_double (used by pynumber_float) */
  12028. static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
  12029. PyObject *float_value = PyFloat_FromString(obj);
  12030. if (likely(float_value)) {
  12031. double value = __Pyx_PyFloat_AS_DOUBLE(float_value);
  12032. Py_DECREF(float_value);
  12033. return value;
  12034. }
  12035. return (double)-1;
  12036. }
  12037. static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
  12038. int last_was_punctuation = 1;
  12039. int parse_error_found = 0;
  12040. Py_ssize_t i;
  12041. for (i=0; i < length; i++) {
  12042. char chr = start[i];
  12043. int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
  12044. *buffer = chr;
  12045. buffer += (chr != '_');
  12046. parse_error_found |= last_was_punctuation & is_punctuation;
  12047. last_was_punctuation = is_punctuation;
  12048. }
  12049. parse_error_found |= last_was_punctuation;
  12050. *buffer = '\0';
  12051. return unlikely(parse_error_found) ? NULL : buffer;
  12052. }
  12053. static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
  12054. int matches = 1;
  12055. char sign = start[0];
  12056. int is_signed = (sign == '+') | (sign == '-');
  12057. start += is_signed;
  12058. length -= is_signed;
  12059. switch (start[0]) {
  12060. #ifdef Py_NAN
  12061. case 'n':
  12062. case 'N':
  12063. if (unlikely(length != 3)) goto parse_failure;
  12064. matches &= (start[1] == 'a' || start[1] == 'A');
  12065. matches &= (start[2] == 'n' || start[2] == 'N');
  12066. if (unlikely(!matches)) goto parse_failure;
  12067. return (sign == '-') ? -Py_NAN : Py_NAN;
  12068. #endif
  12069. case 'i':
  12070. case 'I':
  12071. if (unlikely(length < 3)) goto parse_failure;
  12072. matches &= (start[1] == 'n' || start[1] == 'N');
  12073. matches &= (start[2] == 'f' || start[2] == 'F');
  12074. if (likely(length == 3 && matches))
  12075. return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
  12076. if (unlikely(length != 8)) goto parse_failure;
  12077. matches &= (start[3] == 'i' || start[3] == 'I');
  12078. matches &= (start[4] == 'n' || start[4] == 'N');
  12079. matches &= (start[5] == 'i' || start[5] == 'I');
  12080. matches &= (start[6] == 't' || start[6] == 'T');
  12081. matches &= (start[7] == 'y' || start[7] == 'Y');
  12082. if (unlikely(!matches)) goto parse_failure;
  12083. return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
  12084. case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
  12085. break;
  12086. default:
  12087. goto parse_failure;
  12088. }
  12089. return 0.0;
  12090. parse_failure:
  12091. return -1.0;
  12092. }
  12093. static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
  12094. return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
  12095. }
  12096. CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
  12097. double value;
  12098. Py_ssize_t i, digits;
  12099. const char *last = start + length;
  12100. char *end;
  12101. while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
  12102. start++;
  12103. while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
  12104. last--;
  12105. length = last - start;
  12106. if (unlikely(length <= 0)) goto fallback;
  12107. value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
  12108. if (unlikely(value == -1.0)) goto fallback;
  12109. if (value != 0.0) return value;
  12110. digits = 0;
  12111. for (i=0; i < length; digits += start[i++] != '_');
  12112. if (likely(digits == length)) {
  12113. value = PyOS_string_to_double(start, &end, NULL);
  12114. } else if (digits < 40) {
  12115. char number[40];
  12116. last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
  12117. if (unlikely(!last)) goto fallback;
  12118. value = PyOS_string_to_double(number, &end, NULL);
  12119. } else {
  12120. char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
  12121. if (unlikely(!number)) goto fallback;
  12122. last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
  12123. if (unlikely(!last)) {
  12124. PyMem_Free(number);
  12125. goto fallback;
  12126. }
  12127. value = PyOS_string_to_double(number, &end, NULL);
  12128. PyMem_Free(number);
  12129. }
  12130. if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
  12131. return value;
  12132. }
  12133. fallback:
  12134. return __Pyx_SlowPyString_AsDouble(obj);
  12135. }
  12136. /* pynumber_float */
  12137. static CYTHON_INLINE PyObject* __Pyx__PyNumber_Float(PyObject* obj) {
  12138. double val;
  12139. if (PyLong_CheckExact(obj)) {
  12140. #if CYTHON_USE_PYLONG_INTERNALS
  12141. if (likely(__Pyx_PyLong_IsCompact(obj))) {
  12142. val = (double) __Pyx_PyLong_CompactValue(obj);
  12143. goto no_error;
  12144. }
  12145. #endif
  12146. val = PyLong_AsDouble(obj);
  12147. } else if (PyUnicode_CheckExact(obj)) {
  12148. val = __Pyx_PyUnicode_AsDouble(obj);
  12149. } else if (PyBytes_CheckExact(obj)) {
  12150. val = __Pyx_PyBytes_AsDouble(obj);
  12151. } else if (PyByteArray_CheckExact(obj)) {
  12152. val = __Pyx_PyByteArray_AsDouble(obj);
  12153. } else {
  12154. return PyNumber_Float(obj);
  12155. }
  12156. if (unlikely(val == -1 && PyErr_Occurred())) {
  12157. return NULL;
  12158. }
  12159. #if CYTHON_USE_PYLONG_INTERNALS
  12160. no_error:
  12161. #endif
  12162. return PyFloat_FromDouble(val);
  12163. }
  12164. /* PyObjectVectorCallKwBuilder */
  12165. #if CYTHON_VECTORCALL
  12166. static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
  12167. (void)__Pyx_PyObject_FastCallDict;
  12168. if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
  12169. Py_INCREF(key);
  12170. args[n] = value;
  12171. return 0;
  12172. }
  12173. CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
  12174. (void)__Pyx_VectorcallBuilder_AddArgStr;
  12175. if (unlikely(!PyUnicode_Check(key))) {
  12176. PyErr_SetString(PyExc_TypeError, "keywords must be strings");
  12177. return -1;
  12178. }
  12179. return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
  12180. }
  12181. static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
  12182. PyObject *pyKey = PyUnicode_FromString(key);
  12183. if (!pyKey) return -1;
  12184. return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
  12185. }
  12186. #else // CYTHON_VECTORCALL
  12187. CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
  12188. if (unlikely(!PyUnicode_Check(key))) {
  12189. PyErr_SetString(PyExc_TypeError, "keywords must be strings");
  12190. return -1;
  12191. }
  12192. return PyDict_SetItem(builder, key, value);
  12193. }
  12194. #endif
  12195. /* IterNextPlain (used by IterNext) */
  12196. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  12197. static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) {
  12198. if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache))
  12199. __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next_3);
  12200. return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache;
  12201. }
  12202. #endif
  12203. static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) {
  12204. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  12205. PyObject *result;
  12206. PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI();
  12207. if (unlikely(!next)) return NULL;
  12208. result = PyObject_CallFunctionObjArgs(next, iterator, NULL);
  12209. return result;
  12210. #else
  12211. (void)__Pyx_GetBuiltinName; // only for early limited API
  12212. iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator);
  12213. assert(iternext);
  12214. return iternext(iterator);
  12215. #endif
  12216. }
  12217. /* IterNext */
  12218. static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
  12219. PyObject* exc_type;
  12220. __Pyx_PyThreadState_declare
  12221. __Pyx_PyThreadState_assign
  12222. exc_type = __Pyx_PyErr_CurrentExceptionType();
  12223. if (unlikely(exc_type)) {
  12224. if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
  12225. return NULL;
  12226. __Pyx_PyErr_Clear();
  12227. Py_INCREF(defval);
  12228. return defval;
  12229. }
  12230. if (defval) {
  12231. Py_INCREF(defval);
  12232. return defval;
  12233. }
  12234. __Pyx_PyErr_SetNone(PyExc_StopIteration);
  12235. return NULL;
  12236. }
  12237. static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
  12238. __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(iterator));
  12239. PyErr_Format(PyExc_TypeError,
  12240. __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name);
  12241. __Pyx_DECREF_TypeName(iterator_type_name);
  12242. }
  12243. static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
  12244. PyObject* next;
  12245. #if !CYTHON_COMPILING_IN_LIMITED_API
  12246. iternextfunc iternext = __Pyx_PyObject_TryGetSlot(iterator, tp_iternext, iternextfunc);
  12247. if (likely(iternext)) {
  12248. next = iternext(iterator);
  12249. if (likely(next))
  12250. return next;
  12251. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
  12252. if (unlikely(iternext == &_PyObject_NextNotImplemented))
  12253. return NULL;
  12254. #endif
  12255. } else if (CYTHON_USE_TYPE_SLOTS) {
  12256. __Pyx_PyIter_Next_ErrorNoIterator(iterator);
  12257. return NULL;
  12258. } else
  12259. #endif
  12260. if (unlikely(!PyIter_Check(iterator))) {
  12261. __Pyx_PyIter_Next_ErrorNoIterator(iterator);
  12262. return NULL;
  12263. } else {
  12264. next = defval ? PyIter_Next(iterator) : __Pyx_PyIter_Next_Plain(iterator);
  12265. if (likely(next))
  12266. return next;
  12267. }
  12268. return __Pyx_PyIter_Next2Default(defval);
  12269. }
  12270. /* GetTopmostException (used by SaveResetException) */
  12271. #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
  12272. static _PyErr_StackItem *
  12273. __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
  12274. {
  12275. _PyErr_StackItem *exc_info = tstate->exc_info;
  12276. while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
  12277. exc_info->previous_item != NULL)
  12278. {
  12279. exc_info = exc_info->previous_item;
  12280. }
  12281. return exc_info;
  12282. }
  12283. #endif
  12284. /* SaveResetException */
  12285. #if CYTHON_FAST_THREAD_STATE
  12286. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  12287. #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
  12288. _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
  12289. PyObject *exc_value = exc_info->exc_value;
  12290. if (exc_value == NULL || exc_value == Py_None) {
  12291. *value = NULL;
  12292. *type = NULL;
  12293. *tb = NULL;
  12294. } else {
  12295. *value = exc_value;
  12296. Py_INCREF(*value);
  12297. *type = (PyObject*) Py_TYPE(exc_value);
  12298. Py_INCREF(*type);
  12299. *tb = PyException_GetTraceback(exc_value);
  12300. }
  12301. #elif CYTHON_USE_EXC_INFO_STACK
  12302. _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
  12303. *type = exc_info->exc_type;
  12304. *value = exc_info->exc_value;
  12305. *tb = exc_info->exc_traceback;
  12306. Py_XINCREF(*type);
  12307. Py_XINCREF(*value);
  12308. Py_XINCREF(*tb);
  12309. #else
  12310. *type = tstate->exc_type;
  12311. *value = tstate->exc_value;
  12312. *tb = tstate->exc_traceback;
  12313. Py_XINCREF(*type);
  12314. Py_XINCREF(*value);
  12315. Py_XINCREF(*tb);
  12316. #endif
  12317. }
  12318. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  12319. #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
  12320. _PyErr_StackItem *exc_info = tstate->exc_info;
  12321. PyObject *tmp_value = exc_info->exc_value;
  12322. exc_info->exc_value = value;
  12323. Py_XDECREF(tmp_value);
  12324. Py_XDECREF(type);
  12325. Py_XDECREF(tb);
  12326. #else
  12327. PyObject *tmp_type, *tmp_value, *tmp_tb;
  12328. #if CYTHON_USE_EXC_INFO_STACK
  12329. _PyErr_StackItem *exc_info = tstate->exc_info;
  12330. tmp_type = exc_info->exc_type;
  12331. tmp_value = exc_info->exc_value;
  12332. tmp_tb = exc_info->exc_traceback;
  12333. exc_info->exc_type = type;
  12334. exc_info->exc_value = value;
  12335. exc_info->exc_traceback = tb;
  12336. #else
  12337. tmp_type = tstate->exc_type;
  12338. tmp_value = tstate->exc_value;
  12339. tmp_tb = tstate->exc_traceback;
  12340. tstate->exc_type = type;
  12341. tstate->exc_value = value;
  12342. tstate->exc_traceback = tb;
  12343. #endif
  12344. Py_XDECREF(tmp_type);
  12345. Py_XDECREF(tmp_value);
  12346. Py_XDECREF(tmp_tb);
  12347. #endif
  12348. }
  12349. #endif
  12350. /* GetException */
  12351. #if CYTHON_FAST_THREAD_STATE
  12352. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
  12353. #else
  12354. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
  12355. #endif
  12356. {
  12357. PyObject *local_type = NULL, *local_value, *local_tb = NULL;
  12358. #if CYTHON_FAST_THREAD_STATE
  12359. PyObject *tmp_type, *tmp_value, *tmp_tb;
  12360. #if PY_VERSION_HEX >= 0x030C0000
  12361. local_value = tstate->current_exception;
  12362. tstate->current_exception = 0;
  12363. #else
  12364. local_type = tstate->curexc_type;
  12365. local_value = tstate->curexc_value;
  12366. local_tb = tstate->curexc_traceback;
  12367. tstate->curexc_type = 0;
  12368. tstate->curexc_value = 0;
  12369. tstate->curexc_traceback = 0;
  12370. #endif
  12371. #elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
  12372. local_value = PyErr_GetRaisedException();
  12373. #else
  12374. PyErr_Fetch(&local_type, &local_value, &local_tb);
  12375. #endif
  12376. #if __PYX_LIMITED_VERSION_HEX > 0x030C0000
  12377. if (likely(local_value)) {
  12378. local_type = (PyObject*) Py_TYPE(local_value);
  12379. Py_INCREF(local_type);
  12380. local_tb = PyException_GetTraceback(local_value);
  12381. }
  12382. #else
  12383. PyErr_NormalizeException(&local_type, &local_value, &local_tb);
  12384. #if CYTHON_FAST_THREAD_STATE
  12385. if (unlikely(tstate->curexc_type))
  12386. #else
  12387. if (unlikely(PyErr_Occurred()))
  12388. #endif
  12389. goto bad;
  12390. if (local_tb) {
  12391. if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
  12392. goto bad;
  12393. }
  12394. #endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
  12395. Py_XINCREF(local_tb);
  12396. Py_XINCREF(local_type);
  12397. Py_XINCREF(local_value);
  12398. *type = local_type;
  12399. *value = local_value;
  12400. *tb = local_tb;
  12401. #if CYTHON_FAST_THREAD_STATE
  12402. #if CYTHON_USE_EXC_INFO_STACK
  12403. {
  12404. _PyErr_StackItem *exc_info = tstate->exc_info;
  12405. #if PY_VERSION_HEX >= 0x030B00a4
  12406. tmp_value = exc_info->exc_value;
  12407. exc_info->exc_value = local_value;
  12408. tmp_type = NULL;
  12409. tmp_tb = NULL;
  12410. Py_XDECREF(local_type);
  12411. Py_XDECREF(local_tb);
  12412. #else
  12413. tmp_type = exc_info->exc_type;
  12414. tmp_value = exc_info->exc_value;
  12415. tmp_tb = exc_info->exc_traceback;
  12416. exc_info->exc_type = local_type;
  12417. exc_info->exc_value = local_value;
  12418. exc_info->exc_traceback = local_tb;
  12419. #endif
  12420. }
  12421. #else
  12422. tmp_type = tstate->exc_type;
  12423. tmp_value = tstate->exc_value;
  12424. tmp_tb = tstate->exc_traceback;
  12425. tstate->exc_type = local_type;
  12426. tstate->exc_value = local_value;
  12427. tstate->exc_traceback = local_tb;
  12428. #endif
  12429. Py_XDECREF(tmp_type);
  12430. Py_XDECREF(tmp_value);
  12431. Py_XDECREF(tmp_tb);
  12432. #elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
  12433. PyErr_SetHandledException(local_value);
  12434. Py_XDECREF(local_value);
  12435. Py_XDECREF(local_type);
  12436. Py_XDECREF(local_tb);
  12437. #else
  12438. PyErr_SetExcInfo(local_type, local_value, local_tb);
  12439. #endif
  12440. return 0;
  12441. #if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
  12442. bad:
  12443. *type = 0;
  12444. *value = 0;
  12445. *tb = 0;
  12446. Py_XDECREF(local_type);
  12447. Py_XDECREF(local_value);
  12448. Py_XDECREF(local_tb);
  12449. return -1;
  12450. #endif
  12451. }
  12452. /* PyObjectCallNoArg (used by PyObjectCallMethod0) */
  12453. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
  12454. PyObject *arg[2] = {NULL, NULL};
  12455. return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
  12456. }
  12457. /* PyObjectGetMethod (used by PyObjectCallMethod0) */
  12458. #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
  12459. static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
  12460. PyObject *attr;
  12461. #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
  12462. __Pyx_TypeName type_name;
  12463. PyTypeObject *tp = Py_TYPE(obj);
  12464. PyObject *descr;
  12465. descrgetfunc f = NULL;
  12466. PyObject **dictptr, *dict;
  12467. int meth_found = 0;
  12468. assert (*method == NULL);
  12469. if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
  12470. attr = __Pyx_PyObject_GetAttrStr(obj, name);
  12471. goto try_unpack;
  12472. }
  12473. if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
  12474. return 0;
  12475. }
  12476. descr = _PyType_Lookup(tp, name);
  12477. if (likely(descr != NULL)) {
  12478. Py_INCREF(descr);
  12479. #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
  12480. if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
  12481. #else
  12482. #ifdef __Pyx_CyFunction_USED
  12483. if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
  12484. #else
  12485. if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
  12486. #endif
  12487. #endif
  12488. {
  12489. meth_found = 1;
  12490. } else {
  12491. f = Py_TYPE(descr)->tp_descr_get;
  12492. if (f != NULL && PyDescr_IsData(descr)) {
  12493. attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
  12494. Py_DECREF(descr);
  12495. goto try_unpack;
  12496. }
  12497. }
  12498. }
  12499. dictptr = _PyObject_GetDictPtr(obj);
  12500. if (dictptr != NULL && (dict = *dictptr) != NULL) {
  12501. Py_INCREF(dict);
  12502. attr = __Pyx_PyDict_GetItemStr(dict, name);
  12503. if (attr != NULL) {
  12504. Py_INCREF(attr);
  12505. Py_DECREF(dict);
  12506. Py_XDECREF(descr);
  12507. goto try_unpack;
  12508. }
  12509. Py_DECREF(dict);
  12510. }
  12511. if (meth_found) {
  12512. *method = descr;
  12513. return 1;
  12514. }
  12515. if (f != NULL) {
  12516. attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
  12517. Py_DECREF(descr);
  12518. goto try_unpack;
  12519. }
  12520. if (likely(descr != NULL)) {
  12521. *method = descr;
  12522. return 0;
  12523. }
  12524. type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
  12525. PyErr_Format(PyExc_AttributeError,
  12526. "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
  12527. type_name, name);
  12528. __Pyx_DECREF_TypeName(type_name);
  12529. return 0;
  12530. #else
  12531. attr = __Pyx_PyObject_GetAttrStr(obj, name);
  12532. goto try_unpack;
  12533. #endif
  12534. try_unpack:
  12535. #if CYTHON_UNPACK_METHODS
  12536. if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
  12537. PyObject *function = PyMethod_GET_FUNCTION(attr);
  12538. Py_INCREF(function);
  12539. Py_DECREF(attr);
  12540. *method = function;
  12541. return 1;
  12542. }
  12543. #endif
  12544. *method = attr;
  12545. return 0;
  12546. }
  12547. #endif
  12548. /* PyObjectCallMethod0 (used by pop) */
  12549. static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
  12550. #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
  12551. PyObject *args[1] = {obj};
  12552. (void) __Pyx_PyObject_CallOneArg;
  12553. (void) __Pyx_PyObject_CallNoArg;
  12554. return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
  12555. #else
  12556. PyObject *method = NULL, *result = NULL;
  12557. int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
  12558. if (likely(is_method)) {
  12559. result = __Pyx_PyObject_CallOneArg(method, obj);
  12560. Py_DECREF(method);
  12561. return result;
  12562. }
  12563. if (unlikely(!method)) goto bad;
  12564. result = __Pyx_PyObject_CallNoArg(method);
  12565. Py_DECREF(method);
  12566. bad:
  12567. return result;
  12568. #endif
  12569. }
  12570. /* pop */
  12571. static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) {
  12572. if (__Pyx_IS_TYPE(L, &PySet_Type)) {
  12573. return PySet_Pop(L);
  12574. }
  12575. return __Pyx_PyObject_CallMethod0(L, __pyx_mstate_global->__pyx_n_u_pop);
  12576. }
  12577. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  12578. static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) {
  12579. if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) {
  12580. __Pyx_SET_SIZE(L, Py_SIZE(L) - 1);
  12581. return PyList_GET_ITEM(L, PyList_GET_SIZE(L));
  12582. }
  12583. return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyList_Type_pop, L);
  12584. }
  12585. #endif
  12586. /* PyObjectCall2Args (used by PyObjectCallMethod1) */
  12587. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
  12588. PyObject *args[3] = {NULL, arg1, arg2};
  12589. return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
  12590. }
  12591. /* PyObjectCallMethod1 (used by append) */
  12592. #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
  12593. static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
  12594. PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
  12595. Py_DECREF(method);
  12596. return result;
  12597. }
  12598. #endif
  12599. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
  12600. #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
  12601. PyObject *args[2] = {obj, arg};
  12602. (void) __Pyx_PyObject_CallOneArg;
  12603. (void) __Pyx_PyObject_Call2Args;
  12604. return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
  12605. #else
  12606. PyObject *method = NULL, *result;
  12607. int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
  12608. if (likely(is_method)) {
  12609. result = __Pyx_PyObject_Call2Args(method, obj, arg);
  12610. Py_DECREF(method);
  12611. return result;
  12612. }
  12613. if (unlikely(!method)) return NULL;
  12614. return __Pyx__PyObject_CallMethod1(method, arg);
  12615. #endif
  12616. }
  12617. /* append */
  12618. static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
  12619. if (likely(PyList_CheckExact(L))) {
  12620. if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
  12621. } else {
  12622. PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x);
  12623. if (unlikely(!retval))
  12624. return -1;
  12625. Py_DECREF(retval);
  12626. }
  12627. return 0;
  12628. }
  12629. /* SwapException */
  12630. #if CYTHON_FAST_THREAD_STATE
  12631. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  12632. PyObject *tmp_type, *tmp_value, *tmp_tb;
  12633. #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
  12634. _PyErr_StackItem *exc_info = tstate->exc_info;
  12635. tmp_value = exc_info->exc_value;
  12636. exc_info->exc_value = *value;
  12637. if (tmp_value == NULL || tmp_value == Py_None) {
  12638. Py_XDECREF(tmp_value);
  12639. tmp_value = NULL;
  12640. tmp_type = NULL;
  12641. tmp_tb = NULL;
  12642. } else {
  12643. tmp_type = (PyObject*) Py_TYPE(tmp_value);
  12644. Py_INCREF(tmp_type);
  12645. #if CYTHON_COMPILING_IN_CPYTHON
  12646. tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
  12647. Py_XINCREF(tmp_tb);
  12648. #else
  12649. tmp_tb = PyException_GetTraceback(tmp_value);
  12650. #endif
  12651. }
  12652. #elif CYTHON_USE_EXC_INFO_STACK
  12653. _PyErr_StackItem *exc_info = tstate->exc_info;
  12654. tmp_type = exc_info->exc_type;
  12655. tmp_value = exc_info->exc_value;
  12656. tmp_tb = exc_info->exc_traceback;
  12657. exc_info->exc_type = *type;
  12658. exc_info->exc_value = *value;
  12659. exc_info->exc_traceback = *tb;
  12660. #else
  12661. tmp_type = tstate->exc_type;
  12662. tmp_value = tstate->exc_value;
  12663. tmp_tb = tstate->exc_traceback;
  12664. tstate->exc_type = *type;
  12665. tstate->exc_value = *value;
  12666. tstate->exc_traceback = *tb;
  12667. #endif
  12668. *type = tmp_type;
  12669. *value = tmp_value;
  12670. *tb = tmp_tb;
  12671. }
  12672. #else
  12673. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
  12674. PyObject *tmp_type, *tmp_value, *tmp_tb;
  12675. PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
  12676. PyErr_SetExcInfo(*type, *value, *tb);
  12677. *type = tmp_type;
  12678. *value = tmp_value;
  12679. *tb = tmp_tb;
  12680. }
  12681. #endif
  12682. /* HasAttr */
  12683. #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
  12684. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
  12685. PyObject *r;
  12686. if (unlikely(!PyUnicode_Check(n))) {
  12687. PyErr_SetString(PyExc_TypeError,
  12688. "hasattr(): attribute name must be string");
  12689. return -1;
  12690. }
  12691. r = __Pyx_PyObject_GetAttrStrNoError(o, n);
  12692. if (!r) {
  12693. return (unlikely(PyErr_Occurred())) ? -1 : 0;
  12694. } else {
  12695. Py_DECREF(r);
  12696. return 1;
  12697. }
  12698. }
  12699. #endif
  12700. /* GetAttr3 */
  12701. #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
  12702. static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
  12703. __Pyx_PyThreadState_declare
  12704. __Pyx_PyThreadState_assign
  12705. if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
  12706. return NULL;
  12707. __Pyx_PyErr_Clear();
  12708. Py_INCREF(d);
  12709. return d;
  12710. }
  12711. #endif
  12712. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
  12713. PyObject *r;
  12714. #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  12715. int res = PyObject_GetOptionalAttr(o, n, &r);
  12716. return (res != 0) ? r : __Pyx_NewRef(d);
  12717. #else
  12718. #if CYTHON_USE_TYPE_SLOTS
  12719. if (likely(PyUnicode_Check(n))) {
  12720. r = __Pyx_PyObject_GetAttrStrNoError(o, n);
  12721. if (unlikely(!r) && likely(!PyErr_Occurred())) {
  12722. r = __Pyx_NewRef(d);
  12723. }
  12724. return r;
  12725. }
  12726. #endif
  12727. r = PyObject_GetAttr(o, n);
  12728. return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
  12729. #endif
  12730. }
  12731. /* ImportImpl (used by Import) */
  12732. static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
  12733. PyObject *imported_module = PyImport_GetModule(qualname);
  12734. if (unlikely(!imported_module)) {
  12735. *module = NULL;
  12736. if (PyErr_Occurred()) {
  12737. return -1;
  12738. }
  12739. return 0;
  12740. }
  12741. *module = imported_module;
  12742. return 1;
  12743. }
  12744. static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
  12745. PyObject *imported_module;
  12746. PyObject *top_level_package_name;
  12747. Py_ssize_t i;
  12748. int status, module_found;
  12749. Py_ssize_t dot_index;
  12750. module_found = __Pyx__Import_GetModule(qualname, &imported_module);
  12751. if (unlikely(!module_found || module_found == -1)) {
  12752. *module = NULL;
  12753. return module_found;
  12754. }
  12755. if (imported_names) {
  12756. for (i = 0; i < len_imported_names; i++) {
  12757. PyObject *imported_name = imported_names[i];
  12758. #if __PYX_LIMITED_VERSION_HEX < 0x030d0000
  12759. int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
  12760. #else
  12761. int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
  12762. if (unlikely(has_imported_attribute == -1)) goto error;
  12763. #endif
  12764. if (!has_imported_attribute) {
  12765. goto not_found;
  12766. }
  12767. }
  12768. *module = imported_module;
  12769. return 1;
  12770. }
  12771. dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
  12772. if (dot_index == -1) {
  12773. *module = imported_module;
  12774. return 1;
  12775. }
  12776. if (unlikely(dot_index == -2)) goto error;
  12777. top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
  12778. if (unlikely(!top_level_package_name)) goto error;
  12779. Py_DECREF(imported_module);
  12780. status = __Pyx__Import_GetModule(top_level_package_name, module);
  12781. Py_DECREF(top_level_package_name);
  12782. return status;
  12783. error:
  12784. Py_DECREF(imported_module);
  12785. *module = NULL;
  12786. return -1;
  12787. not_found:
  12788. Py_DECREF(imported_module);
  12789. *module = NULL;
  12790. return 0;
  12791. }
  12792. static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
  12793. PyObject *module = 0;
  12794. PyObject *empty_dict = 0;
  12795. PyObject *from_list = 0;
  12796. int module_found;
  12797. if (!qualname) {
  12798. qualname = name;
  12799. }
  12800. module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
  12801. if (likely(module_found == 1)) {
  12802. return module;
  12803. } else if (unlikely(module_found == -1)) {
  12804. return NULL;
  12805. }
  12806. empty_dict = PyDict_New();
  12807. if (unlikely(!empty_dict))
  12808. goto bad;
  12809. if (imported_names) {
  12810. #if CYTHON_COMPILING_IN_CPYTHON
  12811. from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
  12812. if (unlikely(!from_list))
  12813. goto bad;
  12814. #else
  12815. from_list = PyList_New(len_imported_names);
  12816. if (unlikely(!from_list)) goto bad;
  12817. for (Py_ssize_t i=0; i<len_imported_names; ++i) {
  12818. if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
  12819. }
  12820. #endif
  12821. }
  12822. if (level == -1) {
  12823. const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
  12824. if (package_sep != (0)) {
  12825. module = PyImport_ImportModuleLevelObject(
  12826. name, moddict, empty_dict, from_list, 1);
  12827. if (unlikely(!module)) {
  12828. if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
  12829. goto bad;
  12830. PyErr_Clear();
  12831. }
  12832. }
  12833. level = 0;
  12834. }
  12835. if (!module) {
  12836. module = PyImport_ImportModuleLevelObject(
  12837. name, moddict, empty_dict, from_list, level);
  12838. }
  12839. bad:
  12840. Py_XDECREF(from_list);
  12841. Py_XDECREF(empty_dict);
  12842. return module;
  12843. }
  12844. /* Import */
  12845. static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
  12846. return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
  12847. }
  12848. /* ImportFrom */
  12849. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
  12850. PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
  12851. if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
  12852. const char* module_name_str = 0;
  12853. PyObject* module_name = 0;
  12854. PyObject* module_dot = 0;
  12855. PyObject* full_name = 0;
  12856. PyErr_Clear();
  12857. module_name_str = PyModule_GetName(module);
  12858. if (unlikely(!module_name_str)) { goto modbad; }
  12859. module_name = PyUnicode_FromString(module_name_str);
  12860. if (unlikely(!module_name)) { goto modbad; }
  12861. module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__8);
  12862. if (unlikely(!module_dot)) { goto modbad; }
  12863. full_name = PyUnicode_Concat(module_dot, name);
  12864. if (unlikely(!full_name)) { goto modbad; }
  12865. #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\
  12866. CYTHON_COMPILING_IN_GRAAL
  12867. {
  12868. PyObject *modules = PyImport_GetModuleDict();
  12869. if (unlikely(!modules))
  12870. goto modbad;
  12871. value = PyObject_GetItem(modules, full_name);
  12872. }
  12873. #else
  12874. value = PyImport_GetModule(full_name);
  12875. #endif
  12876. modbad:
  12877. Py_XDECREF(full_name);
  12878. Py_XDECREF(module_dot);
  12879. Py_XDECREF(module_name);
  12880. }
  12881. if (unlikely(!value)) {
  12882. PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
  12883. }
  12884. return value;
  12885. }
  12886. /* Py3UpdateBases */
  12887. static PyObject*
  12888. __Pyx_PEP560_update_bases(PyObject *bases)
  12889. {
  12890. Py_ssize_t i, j, size_bases;
  12891. PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL;
  12892. #if CYTHON_ASSUME_SAFE_SIZE
  12893. size_bases = PyTuple_GET_SIZE(bases);
  12894. #else
  12895. size_bases = PyTuple_Size(bases);
  12896. if (size_bases < 0) return NULL;
  12897. #endif
  12898. for (i = 0; i < size_bases; i++) {
  12899. #if CYTHON_AVOID_BORROWED_REFS
  12900. Py_CLEAR(base);
  12901. #endif
  12902. #if CYTHON_ASSUME_SAFE_MACROS
  12903. base = PyTuple_GET_ITEM(bases, i);
  12904. #else
  12905. base = PyTuple_GetItem(bases, i);
  12906. if (!base) goto error;
  12907. #endif
  12908. #if CYTHON_AVOID_BORROWED_REFS
  12909. Py_INCREF(base);
  12910. #endif
  12911. if (PyType_Check(base)) {
  12912. if (new_bases) {
  12913. if (PyList_Append(new_bases, base) < 0) {
  12914. goto error;
  12915. }
  12916. }
  12917. continue;
  12918. }
  12919. meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries);
  12920. if (!meth && PyErr_Occurred()) {
  12921. goto error;
  12922. }
  12923. if (!meth) {
  12924. if (new_bases) {
  12925. if (PyList_Append(new_bases, base) < 0) {
  12926. goto error;
  12927. }
  12928. }
  12929. continue;
  12930. }
  12931. new_base = __Pyx_PyObject_CallOneArg(meth, bases);
  12932. Py_DECREF(meth);
  12933. if (!new_base) {
  12934. goto error;
  12935. }
  12936. if (!PyTuple_Check(new_base)) {
  12937. PyErr_SetString(PyExc_TypeError,
  12938. "__mro_entries__ must return a tuple");
  12939. Py_DECREF(new_base);
  12940. goto error;
  12941. }
  12942. if (!new_bases) {
  12943. if (!(new_bases = PyList_New(i))) {
  12944. goto error;
  12945. }
  12946. for (j = 0; j < i; j++) {
  12947. PyObject *base_from_list;
  12948. #if CYTHON_ASSUME_SAFE_MACROS
  12949. base_from_list = PyTuple_GET_ITEM(bases, j);
  12950. PyList_SET_ITEM(new_bases, j, base_from_list);
  12951. Py_INCREF(base_from_list);
  12952. #else
  12953. base_from_list = PyTuple_GetItem(bases, j);
  12954. if (!base_from_list) goto error;
  12955. Py_INCREF(base_from_list);
  12956. if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error;
  12957. #endif
  12958. }
  12959. }
  12960. #if CYTHON_ASSUME_SAFE_SIZE
  12961. j = PyList_GET_SIZE(new_bases);
  12962. #else
  12963. j = PyList_Size(new_bases);
  12964. if (j < 0) goto error;
  12965. #endif
  12966. if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
  12967. goto error;
  12968. }
  12969. Py_DECREF(new_base);
  12970. }
  12971. if (!new_bases) {
  12972. Py_INCREF(bases);
  12973. return bases;
  12974. }
  12975. result = PyList_AsTuple(new_bases);
  12976. Py_DECREF(new_bases);
  12977. #if CYTHON_AVOID_BORROWED_REFS
  12978. Py_XDECREF(base);
  12979. #endif
  12980. return result;
  12981. error:
  12982. Py_XDECREF(new_bases);
  12983. #if CYTHON_AVOID_BORROWED_REFS
  12984. Py_XDECREF(base);
  12985. #endif
  12986. return NULL;
  12987. }
  12988. /* CalculateMetaclass */
  12989. static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
  12990. Py_ssize_t i, nbases;
  12991. #if CYTHON_ASSUME_SAFE_SIZE
  12992. nbases = PyTuple_GET_SIZE(bases);
  12993. #else
  12994. nbases = PyTuple_Size(bases);
  12995. if (nbases < 0) return NULL;
  12996. #endif
  12997. for (i=0; i < nbases; i++) {
  12998. PyTypeObject *tmptype;
  12999. #if CYTHON_ASSUME_SAFE_MACROS
  13000. PyObject *tmp = PyTuple_GET_ITEM(bases, i);
  13001. #else
  13002. PyObject *tmp = PyTuple_GetItem(bases, i);
  13003. if (!tmp) return NULL;
  13004. #endif
  13005. tmptype = Py_TYPE(tmp);
  13006. if (!metaclass) {
  13007. metaclass = tmptype;
  13008. continue;
  13009. }
  13010. if (PyType_IsSubtype(metaclass, tmptype))
  13011. continue;
  13012. if (PyType_IsSubtype(tmptype, metaclass)) {
  13013. metaclass = tmptype;
  13014. continue;
  13015. }
  13016. PyErr_SetString(PyExc_TypeError,
  13017. "metaclass conflict: "
  13018. "the metaclass of a derived class "
  13019. "must be a (non-strict) subclass "
  13020. "of the metaclasses of all its bases");
  13021. return NULL;
  13022. }
  13023. if (!metaclass) {
  13024. metaclass = &PyType_Type;
  13025. }
  13026. Py_INCREF((PyObject*) metaclass);
  13027. return (PyObject*) metaclass;
  13028. }
  13029. /* dict_setdefault (used by FetchCommonType) */
  13030. static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
  13031. PyObject* value;
  13032. #if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4)
  13033. PyDict_SetDefaultRef(d, key, default_value, &value);
  13034. #elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
  13035. PyObject *args[] = {d, key, default_value};
  13036. value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
  13037. #elif CYTHON_COMPILING_IN_LIMITED_API
  13038. value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
  13039. #else
  13040. value = PyDict_SetDefault(d, key, default_value);
  13041. if (unlikely(!value)) return NULL;
  13042. Py_INCREF(value);
  13043. #endif
  13044. return value;
  13045. }
  13046. /* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
  13047. #if CYTHON_COMPILING_IN_LIMITED_API
  13048. static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
  13049. PyObject *tp_dictoffset_o;
  13050. Py_ssize_t tp_dictoffset;
  13051. tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
  13052. if (unlikely(!tp_dictoffset_o)) return -1;
  13053. tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
  13054. Py_DECREF(tp_dictoffset_o);
  13055. if (unlikely(tp_dictoffset == 0)) {
  13056. PyErr_SetString(
  13057. PyExc_TypeError,
  13058. "'type' doesn't have a dictoffset");
  13059. return -1;
  13060. } else if (unlikely(tp_dictoffset < 0)) {
  13061. PyErr_SetString(
  13062. PyExc_TypeError,
  13063. "'type' has an unexpected negative dictoffset. "
  13064. "Please report this as Cython bug");
  13065. return -1;
  13066. }
  13067. return tp_dictoffset;
  13068. }
  13069. static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
  13070. static Py_ssize_t tp_dictoffset = 0;
  13071. if (unlikely(tp_dictoffset == 0)) {
  13072. tp_dictoffset = __Pyx_GetTypeDictOffset();
  13073. if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
  13074. tp_dictoffset = 0; // try again next time?
  13075. return NULL;
  13076. }
  13077. }
  13078. return *(PyObject**)((char*)tp + tp_dictoffset);
  13079. }
  13080. #endif
  13081. /* SetItemOnTypeDict (used by FixUpExtensionType) */
  13082. static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
  13083. int result;
  13084. PyObject *tp_dict;
  13085. #if CYTHON_COMPILING_IN_LIMITED_API
  13086. tp_dict = __Pyx_GetTypeDict(tp);
  13087. if (unlikely(!tp_dict)) return -1;
  13088. #else
  13089. tp_dict = tp->tp_dict;
  13090. #endif
  13091. result = PyDict_SetItem(tp_dict, k, v);
  13092. if (likely(!result)) {
  13093. PyType_Modified(tp);
  13094. if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
  13095. PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL);
  13096. if (!setNameResult) return -1;
  13097. Py_DECREF(setNameResult);
  13098. }
  13099. }
  13100. return result;
  13101. }
  13102. /* FixUpExtensionType (used by FetchCommonType) */
  13103. static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
  13104. #if __PYX_LIMITED_VERSION_HEX > 0x030900B1
  13105. CYTHON_UNUSED_VAR(spec);
  13106. CYTHON_UNUSED_VAR(type);
  13107. CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
  13108. #else
  13109. const PyType_Slot *slot = spec->slots;
  13110. int changed = 0;
  13111. #if !CYTHON_COMPILING_IN_LIMITED_API
  13112. while (slot && slot->slot && slot->slot != Py_tp_members)
  13113. slot++;
  13114. if (slot && slot->slot == Py_tp_members) {
  13115. #if !CYTHON_COMPILING_IN_CPYTHON
  13116. const
  13117. #endif // !CYTHON_COMPILING_IN_CPYTHON)
  13118. PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
  13119. while (memb && memb->name) {
  13120. if (memb->name[0] == '_' && memb->name[1] == '_') {
  13121. if (strcmp(memb->name, "__weaklistoffset__") == 0) {
  13122. assert(memb->type == T_PYSSIZET);
  13123. assert(memb->flags == READONLY);
  13124. type->tp_weaklistoffset = memb->offset;
  13125. changed = 1;
  13126. }
  13127. else if (strcmp(memb->name, "__dictoffset__") == 0) {
  13128. assert(memb->type == T_PYSSIZET);
  13129. assert(memb->flags == READONLY);
  13130. type->tp_dictoffset = memb->offset;
  13131. changed = 1;
  13132. }
  13133. #if CYTHON_METH_FASTCALL
  13134. else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
  13135. assert(memb->type == T_PYSSIZET);
  13136. assert(memb->flags == READONLY);
  13137. type->tp_vectorcall_offset = memb->offset;
  13138. changed = 1;
  13139. }
  13140. #endif // CYTHON_METH_FASTCALL
  13141. #if !CYTHON_COMPILING_IN_PYPY
  13142. else if (strcmp(memb->name, "__module__") == 0) {
  13143. PyObject *descr;
  13144. assert(memb->type == T_OBJECT);
  13145. assert(memb->flags == 0 || memb->flags == READONLY);
  13146. descr = PyDescr_NewMember(type, memb);
  13147. if (unlikely(!descr))
  13148. return -1;
  13149. int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
  13150. Py_DECREF(descr);
  13151. if (unlikely(set_item_result < 0)) {
  13152. return -1;
  13153. }
  13154. changed = 1;
  13155. }
  13156. #endif // !CYTHON_COMPILING_IN_PYPY
  13157. }
  13158. memb++;
  13159. }
  13160. }
  13161. #endif // !CYTHON_COMPILING_IN_LIMITED_API
  13162. #if !CYTHON_COMPILING_IN_PYPY
  13163. slot = spec->slots;
  13164. while (slot && slot->slot && slot->slot != Py_tp_getset)
  13165. slot++;
  13166. if (slot && slot->slot == Py_tp_getset) {
  13167. PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
  13168. while (getset && getset->name) {
  13169. if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
  13170. PyObject *descr = PyDescr_NewGetSet(type, getset);
  13171. if (unlikely(!descr))
  13172. return -1;
  13173. #if CYTHON_COMPILING_IN_LIMITED_API
  13174. PyObject *pyname = PyUnicode_FromString(getset->name);
  13175. if (unlikely(!pyname)) {
  13176. Py_DECREF(descr);
  13177. return -1;
  13178. }
  13179. int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
  13180. Py_DECREF(pyname);
  13181. #else
  13182. CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
  13183. int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
  13184. #endif
  13185. Py_DECREF(descr);
  13186. if (unlikely(set_item_result < 0)) {
  13187. return -1;
  13188. }
  13189. changed = 1;
  13190. }
  13191. ++getset;
  13192. }
  13193. }
  13194. #else
  13195. CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
  13196. #endif // !CYTHON_COMPILING_IN_PYPY
  13197. if (changed)
  13198. PyType_Modified(type);
  13199. #endif // PY_VERSION_HEX > 0x030900B1
  13200. return 0;
  13201. }
  13202. /* AddModuleRef (used by FetchSharedCythonModule) */
  13203. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  13204. static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
  13205. PyObject *module_dict = PyImport_GetModuleDict();
  13206. PyObject *m;
  13207. if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
  13208. return NULL;
  13209. }
  13210. if (m != NULL && PyModule_Check(m)) {
  13211. return m;
  13212. }
  13213. Py_XDECREF(m);
  13214. m = PyModule_NewObject(name);
  13215. if (m == NULL)
  13216. return NULL;
  13217. if (PyDict_CheckExact(module_dict)) {
  13218. PyObject *new_m;
  13219. (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
  13220. Py_DECREF(m);
  13221. return new_m;
  13222. } else {
  13223. if (PyObject_SetItem(module_dict, name, m) != 0) {
  13224. Py_DECREF(m);
  13225. return NULL;
  13226. }
  13227. return m;
  13228. }
  13229. }
  13230. static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
  13231. PyObject *py_name = PyUnicode_FromString(name);
  13232. if (!py_name) return NULL;
  13233. PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
  13234. Py_DECREF(py_name);
  13235. return module;
  13236. }
  13237. #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  13238. #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
  13239. #else
  13240. static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
  13241. PyObject *module = PyImport_AddModule(name);
  13242. Py_XINCREF(module);
  13243. return module;
  13244. }
  13245. #endif
  13246. /* FetchSharedCythonModule (used by FetchCommonType) */
  13247. static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
  13248. return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
  13249. }
  13250. /* FetchCommonType (used by CommonTypesMetaclass) */
  13251. #if __PYX_LIMITED_VERSION_HEX < 0x030C0000
  13252. static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
  13253. PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
  13254. if (result && metaclass) {
  13255. PyObject *old_tp = (PyObject*)Py_TYPE(result);
  13256. Py_INCREF((PyObject*)metaclass);
  13257. #if __PYX_LIMITED_VERSION_HEX >= 0x03090000
  13258. Py_SET_TYPE(result, metaclass);
  13259. #else
  13260. result->ob_type = metaclass;
  13261. #endif
  13262. Py_DECREF(old_tp);
  13263. }
  13264. return result;
  13265. }
  13266. #else
  13267. #define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
  13268. #endif
  13269. static int __Pyx_VerifyCachedType(PyObject *cached_type,
  13270. const char *name,
  13271. Py_ssize_t expected_basicsize) {
  13272. Py_ssize_t basicsize;
  13273. if (!PyType_Check(cached_type)) {
  13274. PyErr_Format(PyExc_TypeError,
  13275. "Shared Cython type %.200s is not a type object", name);
  13276. return -1;
  13277. }
  13278. if (expected_basicsize == 0) {
  13279. return 0; // size is inherited, nothing useful to check
  13280. }
  13281. #if CYTHON_COMPILING_IN_LIMITED_API
  13282. PyObject *py_basicsize;
  13283. py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
  13284. if (unlikely(!py_basicsize)) return -1;
  13285. basicsize = PyLong_AsSsize_t(py_basicsize);
  13286. Py_DECREF(py_basicsize);
  13287. py_basicsize = NULL;
  13288. if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
  13289. #else
  13290. basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
  13291. #endif
  13292. if (basicsize != expected_basicsize) {
  13293. PyErr_Format(PyExc_TypeError,
  13294. "Shared Cython type %.200s has the wrong size, try recompiling",
  13295. name);
  13296. return -1;
  13297. }
  13298. return 0;
  13299. }
  13300. static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
  13301. PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
  13302. int get_item_ref_result;
  13303. const char* object_name = strrchr(spec->name, '.');
  13304. object_name = object_name ? object_name+1 : spec->name;
  13305. py_object_name = PyUnicode_FromString(object_name);
  13306. if (!py_object_name) return NULL;
  13307. abi_module = __Pyx_FetchSharedCythonABIModule();
  13308. if (!abi_module) goto done;
  13309. abi_module_dict = PyModule_GetDict(abi_module);
  13310. if (!abi_module_dict) goto done;
  13311. get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
  13312. if (get_item_ref_result == 1) {
  13313. if (__Pyx_VerifyCachedType(
  13314. cached_type,
  13315. object_name,
  13316. spec->basicsize) < 0) {
  13317. goto bad;
  13318. }
  13319. goto done;
  13320. } else if (unlikely(get_item_ref_result == -1)) {
  13321. goto bad;
  13322. }
  13323. cached_type = __Pyx_PyType_FromMetaclass(
  13324. metaclass,
  13325. CYTHON_USE_MODULE_STATE ? module : abi_module,
  13326. spec, bases);
  13327. if (unlikely(!cached_type)) goto bad;
  13328. if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
  13329. new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
  13330. if (unlikely(new_cached_type != cached_type)) {
  13331. if (unlikely(!new_cached_type)) goto bad;
  13332. Py_DECREF(cached_type);
  13333. cached_type = new_cached_type;
  13334. if (__Pyx_VerifyCachedType(
  13335. cached_type,
  13336. object_name,
  13337. spec->basicsize) < 0) {
  13338. goto bad;
  13339. }
  13340. goto done;
  13341. } else {
  13342. Py_DECREF(new_cached_type);
  13343. }
  13344. done:
  13345. Py_XDECREF(abi_module);
  13346. Py_DECREF(py_object_name);
  13347. assert(cached_type == NULL || PyType_Check(cached_type));
  13348. return (PyTypeObject *) cached_type;
  13349. bad:
  13350. Py_XDECREF(cached_type);
  13351. cached_type = NULL;
  13352. goto done;
  13353. }
  13354. /* CommonTypesMetaclass (used by CythonFunctionShared) */
  13355. static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
  13356. return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
  13357. }
  13358. #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
  13359. static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
  13360. PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
  13361. return NULL;
  13362. }
  13363. static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
  13364. PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
  13365. return -1;
  13366. }
  13367. #endif
  13368. static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
  13369. {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
  13370. {0, 0, 0, 0, 0}
  13371. };
  13372. static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
  13373. {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
  13374. #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
  13375. {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
  13376. {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
  13377. {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
  13378. #endif
  13379. {0, 0}
  13380. };
  13381. static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
  13382. __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
  13383. 0,
  13384. 0,
  13385. Py_TPFLAGS_IMMUTABLETYPE |
  13386. Py_TPFLAGS_DISALLOW_INSTANTIATION |
  13387. Py_TPFLAGS_DEFAULT,
  13388. __pyx_CommonTypesMetaclass_slots
  13389. };
  13390. static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
  13391. __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
  13392. PyObject *bases = PyTuple_Pack(1, &PyType_Type);
  13393. if (unlikely(!bases)) {
  13394. return -1;
  13395. }
  13396. mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
  13397. Py_DECREF(bases);
  13398. if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
  13399. return -1;
  13400. }
  13401. return 0;
  13402. }
  13403. /* CallTypeTraverse (used by CythonFunctionShared) */
  13404. #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
  13405. #else
  13406. static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
  13407. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
  13408. if (__Pyx_get_runtime_version() < 0x03090000) return 0;
  13409. #endif
  13410. if (!always_call) {
  13411. PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
  13412. unsigned long flags = PyType_GetFlags(base);
  13413. if (flags & Py_TPFLAGS_HEAPTYPE) {
  13414. return 0;
  13415. }
  13416. }
  13417. Py_VISIT((PyObject*)Py_TYPE(o));
  13418. return 0;
  13419. }
  13420. #endif
  13421. /* PyMethodNew (used by CythonFunctionShared) */
  13422. #if CYTHON_COMPILING_IN_LIMITED_API
  13423. static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
  13424. PyObject *result;
  13425. CYTHON_UNUSED_VAR(typ);
  13426. if (!self)
  13427. return __Pyx_NewRef(func);
  13428. #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
  13429. {
  13430. PyObject *args[] = {func, self};
  13431. result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
  13432. }
  13433. #else
  13434. result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
  13435. #endif
  13436. return result;
  13437. }
  13438. #else
  13439. static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
  13440. CYTHON_UNUSED_VAR(typ);
  13441. if (!self)
  13442. return __Pyx_NewRef(func);
  13443. return PyMethod_New(func, self);
  13444. }
  13445. #endif
  13446. /* PyVectorcallFastCallDict (used by CythonFunctionShared) */
  13447. #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
  13448. static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
  13449. {
  13450. PyObject *res = NULL;
  13451. PyObject *kwnames;
  13452. PyObject **newargs;
  13453. PyObject **kwvalues;
  13454. Py_ssize_t i;
  13455. #if CYTHON_AVOID_BORROWED_REFS
  13456. PyObject *pos;
  13457. #else
  13458. Py_ssize_t pos;
  13459. #endif
  13460. size_t j;
  13461. PyObject *key, *value;
  13462. unsigned long keys_are_strings;
  13463. #if !CYTHON_ASSUME_SAFE_SIZE
  13464. Py_ssize_t nkw = PyDict_Size(kw);
  13465. if (unlikely(nkw == -1)) return NULL;
  13466. #else
  13467. Py_ssize_t nkw = PyDict_GET_SIZE(kw);
  13468. #endif
  13469. newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
  13470. if (unlikely(newargs == NULL)) {
  13471. PyErr_NoMemory();
  13472. return NULL;
  13473. }
  13474. for (j = 0; j < nargs; j++) newargs[j] = args[j];
  13475. kwnames = PyTuple_New(nkw);
  13476. if (unlikely(kwnames == NULL)) {
  13477. PyMem_Free(newargs);
  13478. return NULL;
  13479. }
  13480. kwvalues = newargs + nargs;
  13481. pos = 0;
  13482. i = 0;
  13483. keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
  13484. while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
  13485. keys_are_strings &=
  13486. #if CYTHON_COMPILING_IN_LIMITED_API
  13487. PyType_GetFlags(Py_TYPE(key));
  13488. #else
  13489. Py_TYPE(key)->tp_flags;
  13490. #endif
  13491. #if !CYTHON_ASSUME_SAFE_MACROS
  13492. if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
  13493. #else
  13494. PyTuple_SET_ITEM(kwnames, i, key);
  13495. #endif
  13496. kwvalues[i] = value;
  13497. i++;
  13498. }
  13499. if (unlikely(!keys_are_strings)) {
  13500. PyErr_SetString(PyExc_TypeError, "keywords must be strings");
  13501. goto cleanup;
  13502. }
  13503. res = vc(func, newargs, nargs, kwnames);
  13504. cleanup:
  13505. #if CYTHON_AVOID_BORROWED_REFS
  13506. Py_DECREF(pos);
  13507. #endif
  13508. Py_DECREF(kwnames);
  13509. for (i = 0; i < nkw; i++)
  13510. Py_DECREF(kwvalues[i]);
  13511. PyMem_Free(newargs);
  13512. return res;
  13513. }
  13514. static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
  13515. {
  13516. Py_ssize_t kw_size =
  13517. likely(kw == NULL) ?
  13518. 0 :
  13519. #if !CYTHON_ASSUME_SAFE_SIZE
  13520. PyDict_Size(kw);
  13521. #else
  13522. PyDict_GET_SIZE(kw);
  13523. #endif
  13524. if (kw_size == 0) {
  13525. return vc(func, args, nargs, NULL);
  13526. }
  13527. #if !CYTHON_ASSUME_SAFE_SIZE
  13528. else if (unlikely(kw_size == -1)) {
  13529. return NULL;
  13530. }
  13531. #endif
  13532. return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
  13533. }
  13534. #endif
  13535. /* CythonFunctionShared (used by CythonFunction) */
  13536. #if CYTHON_COMPILING_IN_LIMITED_API
  13537. static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
  13538. if (__Pyx_CyFunction_Check(func)) {
  13539. return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
  13540. } else if (PyCFunction_Check(func)) {
  13541. return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
  13542. }
  13543. return 0;
  13544. }
  13545. static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
  13546. if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
  13547. int result;
  13548. PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
  13549. if (unlikely(!newFunc)) {
  13550. PyErr_Clear(); // It's only an optimization, so don't throw an error
  13551. return 0;
  13552. }
  13553. result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
  13554. Py_DECREF(newFunc);
  13555. return result;
  13556. }
  13557. return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
  13558. }
  13559. #else
  13560. static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
  13561. if (PyMethod_Check(func)) {
  13562. func = PyMethod_GET_FUNCTION(func);
  13563. }
  13564. return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
  13565. }
  13566. #endif
  13567. static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
  13568. #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  13569. __Pyx_Py_XDECREF_SET(
  13570. __Pyx_CyFunction_GetClassObj(f),
  13571. ((classobj) ? __Pyx_NewRef(classobj) : NULL));
  13572. #else
  13573. __Pyx_Py_XDECREF_SET(
  13574. ((PyCMethodObject *) (f))->mm_class,
  13575. (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
  13576. #endif
  13577. }
  13578. static PyObject *
  13579. __Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
  13580. {
  13581. if (unlikely(op->func_doc == NULL)) {
  13582. #if CYTHON_COMPILING_IN_LIMITED_API
  13583. op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
  13584. if (unlikely(!op->func_doc)) return NULL;
  13585. #else
  13586. if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
  13587. op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
  13588. if (unlikely(op->func_doc == NULL))
  13589. return NULL;
  13590. } else {
  13591. Py_INCREF(Py_None);
  13592. return Py_None;
  13593. }
  13594. #endif
  13595. }
  13596. Py_INCREF(op->func_doc);
  13597. return op->func_doc;
  13598. }
  13599. static PyObject *
  13600. __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
  13601. PyObject *result;
  13602. CYTHON_UNUSED_VAR(closure);
  13603. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13604. result = __Pyx_CyFunction_get_doc_locked(op);
  13605. __Pyx_END_CRITICAL_SECTION();
  13606. return result;
  13607. }
  13608. static int
  13609. __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
  13610. {
  13611. CYTHON_UNUSED_VAR(context);
  13612. if (value == NULL) {
  13613. value = Py_None;
  13614. }
  13615. Py_INCREF(value);
  13616. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13617. __Pyx_Py_XDECREF_SET(op->func_doc, value);
  13618. __Pyx_END_CRITICAL_SECTION();
  13619. return 0;
  13620. }
  13621. static PyObject *
  13622. __Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
  13623. {
  13624. if (unlikely(op->func_name == NULL)) {
  13625. #if CYTHON_COMPILING_IN_LIMITED_API
  13626. op->func_name = PyObject_GetAttrString(op->func, "__name__");
  13627. #else
  13628. op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
  13629. #endif
  13630. if (unlikely(op->func_name == NULL))
  13631. return NULL;
  13632. }
  13633. Py_INCREF(op->func_name);
  13634. return op->func_name;
  13635. }
  13636. static PyObject *
  13637. __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
  13638. {
  13639. PyObject *result = NULL;
  13640. CYTHON_UNUSED_VAR(context);
  13641. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13642. result = __Pyx_CyFunction_get_name_locked(op);
  13643. __Pyx_END_CRITICAL_SECTION();
  13644. return result;
  13645. }
  13646. static int
  13647. __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
  13648. {
  13649. CYTHON_UNUSED_VAR(context);
  13650. if (unlikely(value == NULL || !PyUnicode_Check(value))) {
  13651. PyErr_SetString(PyExc_TypeError,
  13652. "__name__ must be set to a string object");
  13653. return -1;
  13654. }
  13655. Py_INCREF(value);
  13656. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13657. __Pyx_Py_XDECREF_SET(op->func_name, value);
  13658. __Pyx_END_CRITICAL_SECTION();
  13659. return 0;
  13660. }
  13661. static PyObject *
  13662. __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
  13663. {
  13664. CYTHON_UNUSED_VAR(context);
  13665. PyObject *result;
  13666. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13667. Py_INCREF(op->func_qualname);
  13668. result = op->func_qualname;
  13669. __Pyx_END_CRITICAL_SECTION();
  13670. return result;
  13671. }
  13672. static int
  13673. __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
  13674. {
  13675. CYTHON_UNUSED_VAR(context);
  13676. if (unlikely(value == NULL || !PyUnicode_Check(value))) {
  13677. PyErr_SetString(PyExc_TypeError,
  13678. "__qualname__ must be set to a string object");
  13679. return -1;
  13680. }
  13681. Py_INCREF(value);
  13682. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13683. __Pyx_Py_XDECREF_SET(op->func_qualname, value);
  13684. __Pyx_END_CRITICAL_SECTION();
  13685. return 0;
  13686. }
  13687. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  13688. static PyObject *
  13689. __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
  13690. {
  13691. CYTHON_UNUSED_VAR(context);
  13692. if (unlikely(op->func_dict == NULL)) {
  13693. op->func_dict = PyDict_New();
  13694. if (unlikely(op->func_dict == NULL))
  13695. return NULL;
  13696. }
  13697. Py_INCREF(op->func_dict);
  13698. return op->func_dict;
  13699. }
  13700. #endif
  13701. static PyObject *
  13702. __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
  13703. {
  13704. CYTHON_UNUSED_VAR(context);
  13705. Py_INCREF(op->func_globals);
  13706. return op->func_globals;
  13707. }
  13708. static PyObject *
  13709. __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
  13710. {
  13711. CYTHON_UNUSED_VAR(op);
  13712. CYTHON_UNUSED_VAR(context);
  13713. Py_INCREF(Py_None);
  13714. return Py_None;
  13715. }
  13716. static PyObject *
  13717. __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
  13718. {
  13719. PyObject* result = (op->func_code) ? op->func_code : Py_None;
  13720. CYTHON_UNUSED_VAR(context);
  13721. Py_INCREF(result);
  13722. return result;
  13723. }
  13724. static int
  13725. __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
  13726. int result = 0;
  13727. PyObject *res = op->defaults_getter((PyObject *) op);
  13728. if (unlikely(!res))
  13729. return -1;
  13730. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  13731. op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
  13732. Py_INCREF(op->defaults_tuple);
  13733. op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
  13734. Py_INCREF(op->defaults_kwdict);
  13735. #else
  13736. op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
  13737. if (unlikely(!op->defaults_tuple)) result = -1;
  13738. else {
  13739. op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
  13740. if (unlikely(!op->defaults_kwdict)) result = -1;
  13741. }
  13742. #endif
  13743. Py_DECREF(res);
  13744. return result;
  13745. }
  13746. static int
  13747. __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
  13748. CYTHON_UNUSED_VAR(context);
  13749. if (!value) {
  13750. value = Py_None;
  13751. } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
  13752. PyErr_SetString(PyExc_TypeError,
  13753. "__defaults__ must be set to a tuple object");
  13754. return -1;
  13755. }
  13756. PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
  13757. "currently affect the values used in function calls", 1);
  13758. Py_INCREF(value);
  13759. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13760. __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
  13761. __Pyx_END_CRITICAL_SECTION();
  13762. return 0;
  13763. }
  13764. static PyObject *
  13765. __Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
  13766. PyObject* result = op->defaults_tuple;
  13767. if (unlikely(!result)) {
  13768. if (op->defaults_getter) {
  13769. if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
  13770. result = op->defaults_tuple;
  13771. } else {
  13772. result = Py_None;
  13773. }
  13774. }
  13775. Py_INCREF(result);
  13776. return result;
  13777. }
  13778. static PyObject *
  13779. __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
  13780. PyObject* result = NULL;
  13781. CYTHON_UNUSED_VAR(context);
  13782. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13783. result = __Pyx_CyFunction_get_defaults_locked(op);
  13784. __Pyx_END_CRITICAL_SECTION();
  13785. return result;
  13786. }
  13787. static int
  13788. __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
  13789. CYTHON_UNUSED_VAR(context);
  13790. if (!value) {
  13791. value = Py_None;
  13792. } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
  13793. PyErr_SetString(PyExc_TypeError,
  13794. "__kwdefaults__ must be set to a dict object");
  13795. return -1;
  13796. }
  13797. PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
  13798. "currently affect the values used in function calls", 1);
  13799. Py_INCREF(value);
  13800. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13801. __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
  13802. __Pyx_END_CRITICAL_SECTION();
  13803. return 0;
  13804. }
  13805. static PyObject *
  13806. __Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
  13807. PyObject* result = op->defaults_kwdict;
  13808. if (unlikely(!result)) {
  13809. if (op->defaults_getter) {
  13810. if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
  13811. result = op->defaults_kwdict;
  13812. } else {
  13813. result = Py_None;
  13814. }
  13815. }
  13816. Py_INCREF(result);
  13817. return result;
  13818. }
  13819. static PyObject *
  13820. __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
  13821. PyObject* result;
  13822. CYTHON_UNUSED_VAR(context);
  13823. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13824. result = __Pyx_CyFunction_get_kwdefaults_locked(op);
  13825. __Pyx_END_CRITICAL_SECTION();
  13826. return result;
  13827. }
  13828. static int
  13829. __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
  13830. CYTHON_UNUSED_VAR(context);
  13831. if (!value || value == Py_None) {
  13832. value = NULL;
  13833. } else if (unlikely(!PyDict_Check(value))) {
  13834. PyErr_SetString(PyExc_TypeError,
  13835. "__annotations__ must be set to a dict object");
  13836. return -1;
  13837. }
  13838. Py_XINCREF(value);
  13839. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13840. __Pyx_Py_XDECREF_SET(op->func_annotations, value);
  13841. __Pyx_END_CRITICAL_SECTION();
  13842. return 0;
  13843. }
  13844. static PyObject *
  13845. __Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
  13846. PyObject* result = op->func_annotations;
  13847. if (unlikely(!result)) {
  13848. result = PyDict_New();
  13849. if (unlikely(!result)) return NULL;
  13850. op->func_annotations = result;
  13851. }
  13852. Py_INCREF(result);
  13853. return result;
  13854. }
  13855. static PyObject *
  13856. __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
  13857. PyObject *result;
  13858. CYTHON_UNUSED_VAR(context);
  13859. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13860. result = __Pyx_CyFunction_get_annotations_locked(op);
  13861. __Pyx_END_CRITICAL_SECTION();
  13862. return result;
  13863. }
  13864. static PyObject *
  13865. __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
  13866. int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
  13867. if (is_coroutine) {
  13868. PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
  13869. fromlist = PyList_New(1);
  13870. if (unlikely(!fromlist)) return NULL;
  13871. Py_INCREF(marker);
  13872. #if CYTHON_ASSUME_SAFE_MACROS
  13873. PyList_SET_ITEM(fromlist, 0, marker);
  13874. #else
  13875. if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
  13876. Py_DECREF(marker);
  13877. Py_DECREF(fromlist);
  13878. return NULL;
  13879. }
  13880. #endif
  13881. module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
  13882. Py_DECREF(fromlist);
  13883. if (unlikely(!module)) goto ignore;
  13884. is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
  13885. Py_DECREF(module);
  13886. if (likely(is_coroutine_value)) {
  13887. return is_coroutine_value;
  13888. }
  13889. ignore:
  13890. PyErr_Clear();
  13891. }
  13892. return __Pyx_PyBool_FromLong(is_coroutine);
  13893. }
  13894. static PyObject *
  13895. __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
  13896. PyObject *result;
  13897. CYTHON_UNUSED_VAR(context);
  13898. if (op->func_is_coroutine) {
  13899. return __Pyx_NewRef(op->func_is_coroutine);
  13900. }
  13901. result = __Pyx_CyFunction_get_is_coroutine_value(op);
  13902. if (unlikely(!result))
  13903. return NULL;
  13904. __Pyx_BEGIN_CRITICAL_SECTION(op);
  13905. if (op->func_is_coroutine) {
  13906. Py_DECREF(result);
  13907. result = __Pyx_NewRef(op->func_is_coroutine);
  13908. } else {
  13909. op->func_is_coroutine = __Pyx_NewRef(result);
  13910. }
  13911. __Pyx_END_CRITICAL_SECTION();
  13912. return result;
  13913. }
  13914. static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
  13915. #if CYTHON_COMPILING_IN_LIMITED_API
  13916. PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
  13917. if (!py_name) return;
  13918. PyErr_Format(PyExc_TypeError,
  13919. "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  13920. py_name, message, size);
  13921. Py_DECREF(py_name);
  13922. #else
  13923. const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
  13924. PyErr_Format(PyExc_TypeError,
  13925. "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  13926. name, message, size);
  13927. #endif
  13928. }
  13929. static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
  13930. #if CYTHON_COMPILING_IN_LIMITED_API
  13931. PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
  13932. if (!py_name) return;
  13933. PyErr_Format(PyExc_TypeError,
  13934. "%.200S() %s",
  13935. py_name, message);
  13936. Py_DECREF(py_name);
  13937. #else
  13938. const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
  13939. PyErr_Format(PyExc_TypeError,
  13940. "%.200s() %s",
  13941. name, message);
  13942. #endif
  13943. }
  13944. #if CYTHON_COMPILING_IN_LIMITED_API
  13945. static PyObject *
  13946. __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
  13947. CYTHON_UNUSED_VAR(context);
  13948. return PyObject_GetAttrString(op->func, "__module__");
  13949. }
  13950. static int
  13951. __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
  13952. CYTHON_UNUSED_VAR(context);
  13953. return PyObject_SetAttrString(op->func, "__module__", value);
  13954. }
  13955. #endif
  13956. static PyGetSetDef __pyx_CyFunction_getsets[] = {
  13957. {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
  13958. {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
  13959. {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
  13960. {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
  13961. {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
  13962. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  13963. {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
  13964. {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
  13965. #else
  13966. {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
  13967. {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
  13968. #endif
  13969. {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
  13970. {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
  13971. {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
  13972. {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
  13973. {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
  13974. {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
  13975. {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
  13976. {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
  13977. {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
  13978. {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
  13979. {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
  13980. #if CYTHON_COMPILING_IN_LIMITED_API
  13981. {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
  13982. #endif
  13983. {0, 0, 0, 0, 0}
  13984. };
  13985. static PyMemberDef __pyx_CyFunction_members[] = {
  13986. #if !CYTHON_COMPILING_IN_LIMITED_API
  13987. {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
  13988. #endif
  13989. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  13990. {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
  13991. #endif
  13992. #if CYTHON_METH_FASTCALL
  13993. #if CYTHON_COMPILING_IN_LIMITED_API
  13994. {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
  13995. #else
  13996. {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
  13997. #endif
  13998. #if CYTHON_COMPILING_IN_LIMITED_API
  13999. {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
  14000. #else
  14001. {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
  14002. #endif
  14003. #endif
  14004. {0, 0, 0, 0, 0}
  14005. };
  14006. static PyObject *
  14007. __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
  14008. {
  14009. PyObject *result = NULL;
  14010. CYTHON_UNUSED_VAR(args);
  14011. __Pyx_BEGIN_CRITICAL_SECTION(m);
  14012. Py_INCREF(m->func_qualname);
  14013. result = m->func_qualname;
  14014. __Pyx_END_CRITICAL_SECTION();
  14015. return result;
  14016. }
  14017. static PyMethodDef __pyx_CyFunction_methods[] = {
  14018. {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
  14019. {0, 0, 0, 0}
  14020. };
  14021. #if CYTHON_COMPILING_IN_LIMITED_API
  14022. #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
  14023. #else
  14024. #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
  14025. #endif
  14026. static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
  14027. PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
  14028. #if !CYTHON_COMPILING_IN_LIMITED_API
  14029. PyCFunctionObject *cf = (PyCFunctionObject*) op;
  14030. #endif
  14031. if (unlikely(op == NULL))
  14032. return NULL;
  14033. #if CYTHON_COMPILING_IN_LIMITED_API
  14034. op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
  14035. if (unlikely(!op->func)) return NULL;
  14036. #endif
  14037. op->flags = flags;
  14038. __Pyx_CyFunction_weakreflist(op) = NULL;
  14039. #if !CYTHON_COMPILING_IN_LIMITED_API
  14040. cf->m_ml = ml;
  14041. cf->m_self = (PyObject *) op;
  14042. #endif
  14043. Py_XINCREF(closure);
  14044. op->func_closure = closure;
  14045. #if !CYTHON_COMPILING_IN_LIMITED_API
  14046. Py_XINCREF(module);
  14047. cf->m_module = module;
  14048. #endif
  14049. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  14050. op->func_dict = NULL;
  14051. #endif
  14052. op->func_name = NULL;
  14053. Py_INCREF(qualname);
  14054. op->func_qualname = qualname;
  14055. op->func_doc = NULL;
  14056. #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  14057. op->func_classobj = NULL;
  14058. #else
  14059. ((PyCMethodObject*)op)->mm_class = NULL;
  14060. #endif
  14061. op->func_globals = globals;
  14062. Py_INCREF(op->func_globals);
  14063. Py_XINCREF(code);
  14064. op->func_code = code;
  14065. op->defaults = NULL;
  14066. op->defaults_tuple = NULL;
  14067. op->defaults_kwdict = NULL;
  14068. op->defaults_getter = NULL;
  14069. op->func_annotations = NULL;
  14070. op->func_is_coroutine = NULL;
  14071. #if CYTHON_METH_FASTCALL
  14072. switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
  14073. case METH_NOARGS:
  14074. __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
  14075. break;
  14076. case METH_O:
  14077. __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
  14078. break;
  14079. case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
  14080. __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
  14081. break;
  14082. case METH_FASTCALL | METH_KEYWORDS:
  14083. __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
  14084. break;
  14085. case METH_VARARGS | METH_KEYWORDS:
  14086. __Pyx_CyFunction_func_vectorcall(op) = NULL;
  14087. break;
  14088. default:
  14089. PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
  14090. Py_DECREF(op);
  14091. return NULL;
  14092. }
  14093. #endif
  14094. return (PyObject *) op;
  14095. }
  14096. static int
  14097. __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
  14098. {
  14099. Py_CLEAR(m->func_closure);
  14100. #if CYTHON_COMPILING_IN_LIMITED_API
  14101. Py_CLEAR(m->func);
  14102. #else
  14103. Py_CLEAR(((PyCFunctionObject*)m)->m_module);
  14104. #endif
  14105. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  14106. Py_CLEAR(m->func_dict);
  14107. #elif PY_VERSION_HEX < 0x030d0000
  14108. _PyObject_ClearManagedDict((PyObject*)m);
  14109. #else
  14110. PyObject_ClearManagedDict((PyObject*)m);
  14111. #endif
  14112. Py_CLEAR(m->func_name);
  14113. Py_CLEAR(m->func_qualname);
  14114. Py_CLEAR(m->func_doc);
  14115. Py_CLEAR(m->func_globals);
  14116. Py_CLEAR(m->func_code);
  14117. #if !CYTHON_COMPILING_IN_LIMITED_API
  14118. #if PY_VERSION_HEX < 0x030900B1
  14119. Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
  14120. #else
  14121. {
  14122. PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
  14123. ((PyCMethodObject *) (m))->mm_class = NULL;
  14124. Py_XDECREF(cls);
  14125. }
  14126. #endif
  14127. #endif
  14128. Py_CLEAR(m->defaults_tuple);
  14129. Py_CLEAR(m->defaults_kwdict);
  14130. Py_CLEAR(m->func_annotations);
  14131. Py_CLEAR(m->func_is_coroutine);
  14132. Py_CLEAR(m->defaults);
  14133. return 0;
  14134. }
  14135. static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
  14136. {
  14137. if (__Pyx_CyFunction_weakreflist(m) != NULL)
  14138. PyObject_ClearWeakRefs((PyObject *) m);
  14139. __Pyx_CyFunction_clear(m);
  14140. __Pyx_PyHeapTypeObject_GC_Del(m);
  14141. }
  14142. static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
  14143. {
  14144. PyObject_GC_UnTrack(m);
  14145. __Pyx__CyFunction_dealloc(m);
  14146. }
  14147. static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
  14148. {
  14149. {
  14150. int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
  14151. if (e) return e;
  14152. }
  14153. Py_VISIT(m->func_closure);
  14154. #if CYTHON_COMPILING_IN_LIMITED_API
  14155. Py_VISIT(m->func);
  14156. #else
  14157. Py_VISIT(((PyCFunctionObject*)m)->m_module);
  14158. #endif
  14159. #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
  14160. Py_VISIT(m->func_dict);
  14161. #else
  14162. {
  14163. int e =
  14164. #if PY_VERSION_HEX < 0x030d0000
  14165. _PyObject_VisitManagedDict
  14166. #else
  14167. PyObject_VisitManagedDict
  14168. #endif
  14169. ((PyObject*)m, visit, arg);
  14170. if (e != 0) return e;
  14171. }
  14172. #endif
  14173. __Pyx_VISIT_CONST(m->func_name);
  14174. __Pyx_VISIT_CONST(m->func_qualname);
  14175. Py_VISIT(m->func_doc);
  14176. Py_VISIT(m->func_globals);
  14177. __Pyx_VISIT_CONST(m->func_code);
  14178. #if !CYTHON_COMPILING_IN_LIMITED_API
  14179. Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
  14180. #endif
  14181. Py_VISIT(m->defaults_tuple);
  14182. Py_VISIT(m->defaults_kwdict);
  14183. Py_VISIT(m->func_is_coroutine);
  14184. Py_VISIT(m->defaults);
  14185. return 0;
  14186. }
  14187. static PyObject*
  14188. __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
  14189. {
  14190. PyObject *repr;
  14191. __Pyx_BEGIN_CRITICAL_SECTION(op);
  14192. repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
  14193. op->func_qualname, (void *)op);
  14194. __Pyx_END_CRITICAL_SECTION();
  14195. return repr;
  14196. }
  14197. static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
  14198. #if CYTHON_COMPILING_IN_LIMITED_API
  14199. PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
  14200. PyCFunction meth;
  14201. int flags;
  14202. meth = PyCFunction_GetFunction(f);
  14203. if (unlikely(!meth)) return NULL;
  14204. flags = PyCFunction_GetFlags(f);
  14205. if (unlikely(flags < 0)) return NULL;
  14206. #else
  14207. PyCFunctionObject* f = (PyCFunctionObject*)func;
  14208. PyCFunction meth = f->m_ml->ml_meth;
  14209. int flags = f->m_ml->ml_flags;
  14210. #endif
  14211. Py_ssize_t size;
  14212. switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
  14213. case METH_VARARGS:
  14214. if (likely(kw == NULL || PyDict_Size(kw) == 0))
  14215. return (*meth)(self, arg);
  14216. break;
  14217. case METH_VARARGS | METH_KEYWORDS:
  14218. return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
  14219. case METH_NOARGS:
  14220. if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
  14221. #if CYTHON_ASSUME_SAFE_SIZE
  14222. size = PyTuple_GET_SIZE(arg);
  14223. #else
  14224. size = PyTuple_Size(arg);
  14225. if (unlikely(size < 0)) return NULL;
  14226. #endif
  14227. if (likely(size == 0))
  14228. return (*meth)(self, NULL);
  14229. __Pyx_CyFunction_raise_argument_count_error(
  14230. (__pyx_CyFunctionObject*)func,
  14231. "takes no arguments", size);
  14232. return NULL;
  14233. }
  14234. break;
  14235. case METH_O:
  14236. if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
  14237. #if CYTHON_ASSUME_SAFE_SIZE
  14238. size = PyTuple_GET_SIZE(arg);
  14239. #else
  14240. size = PyTuple_Size(arg);
  14241. if (unlikely(size < 0)) return NULL;
  14242. #endif
  14243. if (likely(size == 1)) {
  14244. PyObject *result, *arg0;
  14245. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  14246. arg0 = PyTuple_GET_ITEM(arg, 0);
  14247. #else
  14248. arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
  14249. #endif
  14250. result = (*meth)(self, arg0);
  14251. #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
  14252. Py_DECREF(arg0);
  14253. #endif
  14254. return result;
  14255. }
  14256. __Pyx_CyFunction_raise_argument_count_error(
  14257. (__pyx_CyFunctionObject*)func,
  14258. "takes exactly one argument", size);
  14259. return NULL;
  14260. }
  14261. break;
  14262. default:
  14263. PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
  14264. return NULL;
  14265. }
  14266. __Pyx_CyFunction_raise_type_error(
  14267. (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
  14268. return NULL;
  14269. }
  14270. static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  14271. PyObject *self, *result;
  14272. #if CYTHON_COMPILING_IN_LIMITED_API
  14273. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
  14274. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14275. #else
  14276. self = ((PyCFunctionObject*)func)->m_self;
  14277. #endif
  14278. result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
  14279. return result;
  14280. }
  14281. static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
  14282. PyObject *result;
  14283. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
  14284. #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
  14285. __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
  14286. if (vc) {
  14287. #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
  14288. return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
  14289. #else
  14290. (void) &__Pyx_PyVectorcall_FastCallDict;
  14291. return PyVectorcall_Call(func, args, kw);
  14292. #endif
  14293. }
  14294. #endif
  14295. if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
  14296. Py_ssize_t argc;
  14297. PyObject *new_args;
  14298. PyObject *self;
  14299. #if CYTHON_ASSUME_SAFE_SIZE
  14300. argc = PyTuple_GET_SIZE(args);
  14301. #else
  14302. argc = PyTuple_Size(args);
  14303. if (unlikely(argc < 0)) return NULL;
  14304. #endif
  14305. new_args = PyTuple_GetSlice(args, 1, argc);
  14306. if (unlikely(!new_args))
  14307. return NULL;
  14308. self = PyTuple_GetItem(args, 0);
  14309. if (unlikely(!self)) {
  14310. Py_DECREF(new_args);
  14311. PyErr_Format(PyExc_TypeError,
  14312. "unbound method %.200S() needs an argument",
  14313. cyfunc->func_qualname);
  14314. return NULL;
  14315. }
  14316. result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
  14317. Py_DECREF(new_args);
  14318. } else {
  14319. result = __Pyx_CyFunction_Call(func, args, kw);
  14320. }
  14321. return result;
  14322. }
  14323. #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
  14324. static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
  14325. {
  14326. int ret = 0;
  14327. if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
  14328. if (unlikely(nargs < 1)) {
  14329. __Pyx_CyFunction_raise_type_error(
  14330. cyfunc, "needs an argument");
  14331. return -1;
  14332. }
  14333. ret = 1;
  14334. }
  14335. if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
  14336. __Pyx_CyFunction_raise_type_error(
  14337. cyfunc, "takes no keyword arguments");
  14338. return -1;
  14339. }
  14340. return ret;
  14341. }
  14342. static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
  14343. {
  14344. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
  14345. Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
  14346. PyObject *self;
  14347. #if CYTHON_COMPILING_IN_LIMITED_API
  14348. PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
  14349. if (unlikely(!meth)) return NULL;
  14350. #else
  14351. PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
  14352. #endif
  14353. switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
  14354. case 1:
  14355. self = args[0];
  14356. args += 1;
  14357. nargs -= 1;
  14358. break;
  14359. case 0:
  14360. #if CYTHON_COMPILING_IN_LIMITED_API
  14361. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
  14362. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14363. #else
  14364. self = ((PyCFunctionObject*)cyfunc)->m_self;
  14365. #endif
  14366. break;
  14367. default:
  14368. return NULL;
  14369. }
  14370. if (unlikely(nargs != 0)) {
  14371. __Pyx_CyFunction_raise_argument_count_error(
  14372. cyfunc, "takes no arguments", nargs);
  14373. return NULL;
  14374. }
  14375. return meth(self, NULL);
  14376. }
  14377. static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
  14378. {
  14379. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
  14380. Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
  14381. PyObject *self;
  14382. #if CYTHON_COMPILING_IN_LIMITED_API
  14383. PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
  14384. if (unlikely(!meth)) return NULL;
  14385. #else
  14386. PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
  14387. #endif
  14388. switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
  14389. case 1:
  14390. self = args[0];
  14391. args += 1;
  14392. nargs -= 1;
  14393. break;
  14394. case 0:
  14395. #if CYTHON_COMPILING_IN_LIMITED_API
  14396. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
  14397. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14398. #else
  14399. self = ((PyCFunctionObject*)cyfunc)->m_self;
  14400. #endif
  14401. break;
  14402. default:
  14403. return NULL;
  14404. }
  14405. if (unlikely(nargs != 1)) {
  14406. __Pyx_CyFunction_raise_argument_count_error(
  14407. cyfunc, "takes exactly one argument", nargs);
  14408. return NULL;
  14409. }
  14410. return meth(self, args[0]);
  14411. }
  14412. static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
  14413. {
  14414. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
  14415. Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
  14416. PyObject *self;
  14417. #if CYTHON_COMPILING_IN_LIMITED_API
  14418. PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
  14419. if (unlikely(!meth)) return NULL;
  14420. #else
  14421. PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
  14422. #endif
  14423. switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
  14424. case 1:
  14425. self = args[0];
  14426. args += 1;
  14427. nargs -= 1;
  14428. break;
  14429. case 0:
  14430. #if CYTHON_COMPILING_IN_LIMITED_API
  14431. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
  14432. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14433. #else
  14434. self = ((PyCFunctionObject*)cyfunc)->m_self;
  14435. #endif
  14436. break;
  14437. default:
  14438. return NULL;
  14439. }
  14440. return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
  14441. }
  14442. static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
  14443. {
  14444. __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
  14445. PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
  14446. Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
  14447. PyObject *self;
  14448. #if CYTHON_COMPILING_IN_LIMITED_API
  14449. PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
  14450. if (unlikely(!meth)) return NULL;
  14451. #else
  14452. PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
  14453. #endif
  14454. switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
  14455. case 1:
  14456. self = args[0];
  14457. args += 1;
  14458. nargs -= 1;
  14459. break;
  14460. case 0:
  14461. #if CYTHON_COMPILING_IN_LIMITED_API
  14462. self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
  14463. if (unlikely(!self) && PyErr_Occurred()) return NULL;
  14464. #else
  14465. self = ((PyCFunctionObject*)cyfunc)->m_self;
  14466. #endif
  14467. break;
  14468. default:
  14469. return NULL;
  14470. }
  14471. #if PY_VERSION_HEX < 0x030e00A6
  14472. size_t nargs_value = (size_t) nargs;
  14473. #else
  14474. Py_ssize_t nargs_value = nargs;
  14475. #endif
  14476. return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
  14477. }
  14478. #endif
  14479. static PyType_Slot __pyx_CyFunctionType_slots[] = {
  14480. {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
  14481. {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
  14482. {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
  14483. {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
  14484. {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
  14485. {Py_tp_methods, (void *)__pyx_CyFunction_methods},
  14486. {Py_tp_members, (void *)__pyx_CyFunction_members},
  14487. {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
  14488. {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
  14489. {0, 0},
  14490. };
  14491. static PyType_Spec __pyx_CyFunctionType_spec = {
  14492. __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
  14493. sizeof(__pyx_CyFunctionObject),
  14494. 0,
  14495. #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
  14496. Py_TPFLAGS_METHOD_DESCRIPTOR |
  14497. #endif
  14498. #if CYTHON_METH_FASTCALL
  14499. #if defined(Py_TPFLAGS_HAVE_VECTORCALL)
  14500. Py_TPFLAGS_HAVE_VECTORCALL |
  14501. #elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
  14502. _Py_TPFLAGS_HAVE_VECTORCALL |
  14503. #endif
  14504. #endif // CYTHON_METH_FASTCALL
  14505. #if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
  14506. Py_TPFLAGS_MANAGED_DICT |
  14507. #endif
  14508. Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
  14509. Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
  14510. __pyx_CyFunctionType_slots
  14511. };
  14512. static int __pyx_CyFunction_init(PyObject *module) {
  14513. __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
  14514. mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
  14515. mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
  14516. if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
  14517. return -1;
  14518. }
  14519. return 0;
  14520. }
  14521. static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
  14522. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  14523. m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
  14524. if (unlikely(!m->defaults))
  14525. return NULL;
  14526. return m->defaults;
  14527. }
  14528. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
  14529. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  14530. m->defaults_tuple = tuple;
  14531. Py_INCREF(tuple);
  14532. }
  14533. static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
  14534. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  14535. m->defaults_kwdict = dict;
  14536. Py_INCREF(dict);
  14537. }
  14538. static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
  14539. __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
  14540. m->func_annotations = dict;
  14541. Py_INCREF(dict);
  14542. }
  14543. /* CythonFunction */
  14544. static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
  14545. PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
  14546. PyObject *op = __Pyx_CyFunction_Init(
  14547. PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
  14548. ml, flags, qualname, closure, module, globals, code
  14549. );
  14550. if (likely(op)) {
  14551. PyObject_GC_Track(op);
  14552. }
  14553. return op;
  14554. }
  14555. /* PyObjectLookupSpecial (used by Py3ClassCreate) */
  14556. #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
  14557. static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
  14558. PyObject *res;
  14559. PyTypeObject *tp = Py_TYPE(obj);
  14560. res = _PyType_Lookup(tp, attr_name);
  14561. if (likely(res)) {
  14562. descrgetfunc f = Py_TYPE(res)->tp_descr_get;
  14563. if (!f) {
  14564. Py_INCREF(res);
  14565. } else {
  14566. res = f(res, obj, (PyObject *)tp);
  14567. }
  14568. } else if (with_error) {
  14569. PyErr_SetObject(PyExc_AttributeError, attr_name);
  14570. }
  14571. return res;
  14572. }
  14573. #endif
  14574. /* Py3ClassCreate */
  14575. static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
  14576. PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
  14577. PyObject *ns;
  14578. if (metaclass) {
  14579. PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare);
  14580. if (prep) {
  14581. PyObject *pargs[3] = {NULL, name, bases};
  14582. ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
  14583. Py_DECREF(prep);
  14584. } else {
  14585. if (unlikely(PyErr_Occurred()))
  14586. return NULL;
  14587. ns = PyDict_New();
  14588. }
  14589. } else {
  14590. ns = PyDict_New();
  14591. }
  14592. if (unlikely(!ns))
  14593. return NULL;
  14594. if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad;
  14595. if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad;
  14596. if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad;
  14597. return ns;
  14598. bad:
  14599. Py_DECREF(ns);
  14600. return NULL;
  14601. }
  14602. static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
  14603. PyObject *dict, PyObject *mkw,
  14604. int calculate_metaclass, int allow_py2_metaclass) {
  14605. PyObject *result;
  14606. PyObject *owned_metaclass = NULL;
  14607. PyObject *margs[4] = {NULL, name, bases, dict};
  14608. if (allow_py2_metaclass) {
  14609. owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass);
  14610. if (owned_metaclass) {
  14611. metaclass = owned_metaclass;
  14612. } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
  14613. PyErr_Clear();
  14614. } else {
  14615. return NULL;
  14616. }
  14617. }
  14618. if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
  14619. metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
  14620. Py_XDECREF(owned_metaclass);
  14621. if (unlikely(!metaclass))
  14622. return NULL;
  14623. owned_metaclass = metaclass;
  14624. }
  14625. result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
  14626. Py_XDECREF(owned_metaclass);
  14627. return result;
  14628. }
  14629. /* CLineInTraceback (used by AddTraceback) */
  14630. #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
  14631. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
  14632. #define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
  14633. #elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14634. #define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
  14635. #else
  14636. PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
  14637. PyObject **dict_ptr = _PyObject_GetDictPtr(o);
  14638. return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
  14639. }
  14640. #endif
  14641. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
  14642. PyObject *use_cline = NULL;
  14643. PyObject *ptype, *pvalue, *ptraceback;
  14644. PyObject *cython_runtime_dict;
  14645. CYTHON_MAYBE_UNUSED_VAR(tstate);
  14646. if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
  14647. return c_line;
  14648. }
  14649. __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
  14650. cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
  14651. if (likely(cython_runtime_dict)) {
  14652. __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
  14653. use_cline, cython_runtime_dict,
  14654. __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
  14655. }
  14656. if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
  14657. c_line = 0;
  14658. }
  14659. Py_XDECREF(use_cline);
  14660. Py_XDECREF(cython_runtime_dict);
  14661. __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
  14662. return c_line;
  14663. }
  14664. #endif
  14665. /* CodeObjectCache (used by AddTraceback) */
  14666. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
  14667. int start = 0, mid = 0, end = count - 1;
  14668. if (end >= 0 && code_line > entries[end].code_line) {
  14669. return count;
  14670. }
  14671. while (start < end) {
  14672. mid = start + (end - start) / 2;
  14673. if (code_line < entries[mid].code_line) {
  14674. end = mid;
  14675. } else if (code_line > entries[mid].code_line) {
  14676. start = mid + 1;
  14677. } else {
  14678. return mid;
  14679. }
  14680. }
  14681. if (code_line <= entries[mid].code_line) {
  14682. return mid;
  14683. } else {
  14684. return mid + 1;
  14685. }
  14686. }
  14687. static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
  14688. __Pyx_CachedCodeObjectType* code_object;
  14689. int pos;
  14690. if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
  14691. return NULL;
  14692. }
  14693. pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
  14694. if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
  14695. return NULL;
  14696. }
  14697. code_object = code_cache->entries[pos].code_object;
  14698. Py_INCREF(code_object);
  14699. return code_object;
  14700. }
  14701. static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
  14702. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
  14703. (void)__pyx__find_code_object;
  14704. return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
  14705. #else
  14706. struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
  14707. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14708. __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
  14709. if (old_count < 0) {
  14710. __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
  14711. return NULL;
  14712. }
  14713. #endif
  14714. __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
  14715. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14716. __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
  14717. #endif
  14718. return result;
  14719. #endif
  14720. }
  14721. static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
  14722. {
  14723. int pos, i;
  14724. __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
  14725. if (unlikely(!code_line)) {
  14726. return;
  14727. }
  14728. if (unlikely(!entries)) {
  14729. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
  14730. if (likely(entries)) {
  14731. code_cache->entries = entries;
  14732. code_cache->max_count = 64;
  14733. code_cache->count = 1;
  14734. entries[0].code_line = code_line;
  14735. entries[0].code_object = code_object;
  14736. Py_INCREF(code_object);
  14737. }
  14738. return;
  14739. }
  14740. pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
  14741. if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
  14742. __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
  14743. entries[pos].code_object = code_object;
  14744. Py_INCREF(code_object);
  14745. Py_DECREF(tmp);
  14746. return;
  14747. }
  14748. if (code_cache->count == code_cache->max_count) {
  14749. int new_max = code_cache->max_count + 64;
  14750. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
  14751. code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
  14752. if (unlikely(!entries)) {
  14753. return;
  14754. }
  14755. code_cache->entries = entries;
  14756. code_cache->max_count = new_max;
  14757. }
  14758. for (i=code_cache->count; i>pos; i--) {
  14759. entries[i] = entries[i-1];
  14760. }
  14761. entries[pos].code_line = code_line;
  14762. entries[pos].code_object = code_object;
  14763. code_cache->count++;
  14764. Py_INCREF(code_object);
  14765. }
  14766. static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
  14767. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
  14768. (void)__pyx__insert_code_object;
  14769. return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
  14770. #else
  14771. struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
  14772. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14773. __pyx_nonatomic_int_type expected = 0;
  14774. if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
  14775. return;
  14776. }
  14777. #endif
  14778. __pyx__insert_code_object(code_cache, code_line, code_object);
  14779. #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  14780. __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
  14781. #endif
  14782. #endif
  14783. }
  14784. /* AddTraceback */
  14785. #include "compile.h"
  14786. #include "frameobject.h"
  14787. #include "traceback.h"
  14788. #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  14789. #ifndef Py_BUILD_CORE
  14790. #define Py_BUILD_CORE 1
  14791. #endif
  14792. #include "internal/pycore_frame.h"
  14793. #endif
  14794. #if CYTHON_COMPILING_IN_LIMITED_API
  14795. static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
  14796. PyObject *firstlineno, PyObject *name) {
  14797. PyObject *replace = NULL;
  14798. if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
  14799. if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
  14800. replace = PyObject_GetAttrString(code, "replace");
  14801. if (likely(replace)) {
  14802. PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
  14803. Py_DECREF(replace);
  14804. return result;
  14805. }
  14806. PyErr_Clear();
  14807. return NULL;
  14808. }
  14809. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  14810. int py_line, const char *filename) {
  14811. PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
  14812. PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
  14813. PyObject *exc_type, *exc_value, *exc_traceback;
  14814. int success = 0;
  14815. if (c_line) {
  14816. c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
  14817. }
  14818. PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
  14819. code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
  14820. if (!code_object) {
  14821. code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
  14822. if (unlikely(!code_object)) goto bad;
  14823. py_py_line = PyLong_FromLong(py_line);
  14824. if (unlikely(!py_py_line)) goto bad;
  14825. if (c_line) {
  14826. py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  14827. } else {
  14828. py_funcname = PyUnicode_FromString(funcname);
  14829. }
  14830. if (unlikely(!py_funcname)) goto bad;
  14831. dict = PyDict_New();
  14832. if (unlikely(!dict)) goto bad;
  14833. {
  14834. PyObject *old_code_object = code_object;
  14835. code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
  14836. Py_DECREF(old_code_object);
  14837. }
  14838. if (unlikely(!code_object)) goto bad;
  14839. __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
  14840. } else {
  14841. dict = PyDict_New();
  14842. }
  14843. getframe = PySys_GetObject("_getframe");
  14844. if (unlikely(!getframe)) goto bad;
  14845. if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
  14846. frame = PyEval_EvalCode(code_object, dict, dict);
  14847. if (unlikely(!frame) || frame == Py_None) goto bad;
  14848. success = 1;
  14849. bad:
  14850. PyErr_Restore(exc_type, exc_value, exc_traceback);
  14851. Py_XDECREF(code_object);
  14852. Py_XDECREF(py_py_line);
  14853. Py_XDECREF(py_funcname);
  14854. Py_XDECREF(dict);
  14855. Py_XDECREF(replace);
  14856. if (success) {
  14857. PyTraceBack_Here(
  14858. (struct _frame*)frame);
  14859. }
  14860. Py_XDECREF(frame);
  14861. }
  14862. #else
  14863. static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
  14864. const char *funcname, int c_line,
  14865. int py_line, const char *filename) {
  14866. PyCodeObject *py_code = NULL;
  14867. PyObject *py_funcname = NULL;
  14868. if (c_line) {
  14869. py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  14870. if (!py_funcname) goto bad;
  14871. funcname = PyUnicode_AsUTF8(py_funcname);
  14872. if (!funcname) goto bad;
  14873. }
  14874. py_code = PyCode_NewEmpty(filename, funcname, py_line);
  14875. Py_XDECREF(py_funcname);
  14876. return py_code;
  14877. bad:
  14878. Py_XDECREF(py_funcname);
  14879. return NULL;
  14880. }
  14881. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  14882. int py_line, const char *filename) {
  14883. PyCodeObject *py_code = 0;
  14884. PyFrameObject *py_frame = 0;
  14885. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  14886. PyObject *ptype, *pvalue, *ptraceback;
  14887. if (c_line) {
  14888. c_line = __Pyx_CLineForTraceback(tstate, c_line);
  14889. }
  14890. py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
  14891. if (!py_code) {
  14892. __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
  14893. py_code = __Pyx_CreateCodeObjectForTraceback(
  14894. funcname, c_line, py_line, filename);
  14895. if (!py_code) {
  14896. /* If the code object creation fails, then we should clear the
  14897. fetched exception references and propagate the new exception */
  14898. Py_XDECREF(ptype);
  14899. Py_XDECREF(pvalue);
  14900. Py_XDECREF(ptraceback);
  14901. goto bad;
  14902. }
  14903. __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
  14904. __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
  14905. }
  14906. py_frame = PyFrame_New(
  14907. tstate, /*PyThreadState *tstate,*/
  14908. py_code, /*PyCodeObject *code,*/
  14909. __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/
  14910. 0 /*PyObject *locals*/
  14911. );
  14912. if (!py_frame) goto bad;
  14913. __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
  14914. PyTraceBack_Here(py_frame);
  14915. bad:
  14916. Py_XDECREF(py_code);
  14917. Py_XDECREF(py_frame);
  14918. }
  14919. #endif
  14920. /* CIntToPy */
  14921. static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
  14922. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  14923. #pragma GCC diagnostic push
  14924. #pragma GCC diagnostic ignored "-Wconversion"
  14925. #endif
  14926. const long neg_one = (long) -1, const_zero = (long) 0;
  14927. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  14928. #pragma GCC diagnostic pop
  14929. #endif
  14930. const int is_unsigned = neg_one > const_zero;
  14931. if (is_unsigned) {
  14932. if (sizeof(long) < sizeof(long)) {
  14933. return PyLong_FromLong((long) value);
  14934. } else if (sizeof(long) <= sizeof(unsigned long)) {
  14935. return PyLong_FromUnsignedLong((unsigned long) value);
  14936. #if !CYTHON_COMPILING_IN_PYPY
  14937. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  14938. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  14939. #endif
  14940. }
  14941. } else {
  14942. if (sizeof(long) <= sizeof(long)) {
  14943. return PyLong_FromLong((long) value);
  14944. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  14945. return PyLong_FromLongLong((PY_LONG_LONG) value);
  14946. }
  14947. }
  14948. {
  14949. unsigned char *bytes = (unsigned char *)&value;
  14950. #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
  14951. if (is_unsigned) {
  14952. return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
  14953. } else {
  14954. return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
  14955. }
  14956. #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
  14957. int one = 1; int little = (int)*(unsigned char *)&one;
  14958. return _PyLong_FromByteArray(bytes, sizeof(long),
  14959. little, !is_unsigned);
  14960. #else
  14961. int one = 1; int little = (int)*(unsigned char *)&one;
  14962. PyObject *from_bytes, *result = NULL, *kwds = NULL;
  14963. PyObject *py_bytes = NULL, *order_str = NULL;
  14964. from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
  14965. if (!from_bytes) return NULL;
  14966. py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
  14967. if (!py_bytes) goto limited_bad;
  14968. order_str = PyUnicode_FromString(little ? "little" : "big");
  14969. if (!order_str) goto limited_bad;
  14970. {
  14971. PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
  14972. if (!is_unsigned) {
  14973. kwds = __Pyx_MakeVectorcallBuilderKwds(1);
  14974. if (!kwds) goto limited_bad;
  14975. if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
  14976. }
  14977. result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
  14978. }
  14979. limited_bad:
  14980. Py_XDECREF(kwds);
  14981. Py_XDECREF(order_str);
  14982. Py_XDECREF(py_bytes);
  14983. Py_XDECREF(from_bytes);
  14984. return result;
  14985. #endif
  14986. }
  14987. }
  14988. /* FormatTypeName */
  14989. #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
  14990. static __Pyx_TypeName
  14991. __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
  14992. {
  14993. PyObject *module = NULL, *name = NULL, *result = NULL;
  14994. #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  14995. name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
  14996. __pyx_mstate_global->__pyx_n_u_qualname);
  14997. #else
  14998. name = PyType_GetQualName(tp);
  14999. #endif
  15000. if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
  15001. module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
  15002. __pyx_mstate_global->__pyx_n_u_module);
  15003. if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
  15004. if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
  15005. result = name;
  15006. name = NULL;
  15007. goto done;
  15008. }
  15009. result = PyUnicode_FromFormat("%U.%U", module, name);
  15010. if (unlikely(result == NULL)) goto bad;
  15011. done:
  15012. Py_XDECREF(name);
  15013. Py_XDECREF(module);
  15014. return result;
  15015. bad:
  15016. PyErr_Clear();
  15017. if (name) {
  15018. result = name;
  15019. name = NULL;
  15020. } else {
  15021. result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__18);
  15022. }
  15023. goto done;
  15024. }
  15025. #endif
  15026. /* CIntFromPyVerify (used by CIntFromPy) */
  15027. #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
  15028. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
  15029. #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
  15030. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
  15031. #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
  15032. {\
  15033. func_type value = func_value;\
  15034. if (sizeof(target_type) < sizeof(func_type)) {\
  15035. if (unlikely(value != (func_type) (target_type) value)) {\
  15036. func_type zero = 0;\
  15037. if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
  15038. return (target_type) -1;\
  15039. if (is_unsigned && unlikely(value < zero))\
  15040. goto raise_neg_overflow;\
  15041. else\
  15042. goto raise_overflow;\
  15043. }\
  15044. }\
  15045. return (target_type) value;\
  15046. }
  15047. /* CIntFromPy */
  15048. static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
  15049. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  15050. #pragma GCC diagnostic push
  15051. #pragma GCC diagnostic ignored "-Wconversion"
  15052. #endif
  15053. const long neg_one = (long) -1, const_zero = (long) 0;
  15054. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  15055. #pragma GCC diagnostic pop
  15056. #endif
  15057. const int is_unsigned = neg_one > const_zero;
  15058. if (unlikely(!PyLong_Check(x))) {
  15059. long val;
  15060. PyObject *tmp = __Pyx_PyNumber_Long(x);
  15061. if (!tmp) return (long) -1;
  15062. val = __Pyx_PyLong_As_long(tmp);
  15063. Py_DECREF(tmp);
  15064. return val;
  15065. }
  15066. if (is_unsigned) {
  15067. #if CYTHON_USE_PYLONG_INTERNALS
  15068. if (unlikely(__Pyx_PyLong_IsNeg(x))) {
  15069. goto raise_neg_overflow;
  15070. } else if (__Pyx_PyLong_IsCompact(x)) {
  15071. __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
  15072. } else {
  15073. const digit* digits = __Pyx_PyLong_Digits(x);
  15074. assert(__Pyx_PyLong_DigitCount(x) > 1);
  15075. switch (__Pyx_PyLong_DigitCount(x)) {
  15076. case 2:
  15077. if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
  15078. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15079. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15080. } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
  15081. return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  15082. }
  15083. }
  15084. break;
  15085. case 3:
  15086. if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
  15087. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15088. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15089. } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
  15090. return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  15091. }
  15092. }
  15093. break;
  15094. case 4:
  15095. if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
  15096. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15097. __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])))
  15098. } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
  15099. return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  15100. }
  15101. }
  15102. break;
  15103. }
  15104. }
  15105. #endif
  15106. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
  15107. if (unlikely(Py_SIZE(x) < 0)) {
  15108. goto raise_neg_overflow;
  15109. }
  15110. #else
  15111. {
  15112. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  15113. if (unlikely(result < 0))
  15114. return (long) -1;
  15115. if (unlikely(result == 1))
  15116. goto raise_neg_overflow;
  15117. }
  15118. #endif
  15119. if ((sizeof(long) <= sizeof(unsigned long))) {
  15120. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
  15121. } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
  15122. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  15123. }
  15124. } else {
  15125. #if CYTHON_USE_PYLONG_INTERNALS
  15126. if (__Pyx_PyLong_IsCompact(x)) {
  15127. __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
  15128. } else {
  15129. const digit* digits = __Pyx_PyLong_Digits(x);
  15130. assert(__Pyx_PyLong_DigitCount(x) > 1);
  15131. switch (__Pyx_PyLong_SignedDigitCount(x)) {
  15132. case -2:
  15133. if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
  15134. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15135. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15136. } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
  15137. return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15138. }
  15139. }
  15140. break;
  15141. case 2:
  15142. if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
  15143. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15144. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15145. } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
  15146. return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15147. }
  15148. }
  15149. break;
  15150. case -3:
  15151. if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
  15152. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15153. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15154. } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
  15155. return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15156. }
  15157. }
  15158. break;
  15159. case 3:
  15160. if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
  15161. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15162. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15163. } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
  15164. return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15165. }
  15166. }
  15167. break;
  15168. case -4:
  15169. if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
  15170. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15171. __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])))
  15172. } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
  15173. return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15174. }
  15175. }
  15176. break;
  15177. case 4:
  15178. if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
  15179. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15180. __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])))
  15181. } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
  15182. return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  15183. }
  15184. }
  15185. break;
  15186. }
  15187. }
  15188. #endif
  15189. if ((sizeof(long) <= sizeof(long))) {
  15190. __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
  15191. } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
  15192. __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
  15193. }
  15194. }
  15195. {
  15196. long val;
  15197. int ret = -1;
  15198. #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
  15199. Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
  15200. x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
  15201. if (unlikely(bytes_copied == -1)) {
  15202. } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
  15203. goto raise_overflow;
  15204. } else {
  15205. ret = 0;
  15206. }
  15207. #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
  15208. int one = 1; int is_little = (int)*(unsigned char *)&one;
  15209. unsigned char *bytes = (unsigned char *)&val;
  15210. ret = _PyLong_AsByteArray((PyLongObject *)x,
  15211. bytes, sizeof(val),
  15212. is_little, !is_unsigned);
  15213. #else
  15214. PyObject *v;
  15215. PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
  15216. int bits, remaining_bits, is_negative = 0;
  15217. int chunk_size = (sizeof(long) < 8) ? 30 : 62;
  15218. if (likely(PyLong_CheckExact(x))) {
  15219. v = __Pyx_NewRef(x);
  15220. } else {
  15221. v = PyNumber_Long(x);
  15222. if (unlikely(!v)) return (long) -1;
  15223. assert(PyLong_CheckExact(v));
  15224. }
  15225. {
  15226. int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
  15227. if (unlikely(result < 0)) {
  15228. Py_DECREF(v);
  15229. return (long) -1;
  15230. }
  15231. is_negative = result == 1;
  15232. }
  15233. if (is_unsigned && unlikely(is_negative)) {
  15234. Py_DECREF(v);
  15235. goto raise_neg_overflow;
  15236. } else if (is_negative) {
  15237. stepval = PyNumber_Invert(v);
  15238. Py_DECREF(v);
  15239. if (unlikely(!stepval))
  15240. return (long) -1;
  15241. } else {
  15242. stepval = v;
  15243. }
  15244. v = NULL;
  15245. val = (long) 0;
  15246. mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
  15247. shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
  15248. for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
  15249. PyObject *tmp, *digit;
  15250. long idigit;
  15251. digit = PyNumber_And(stepval, mask);
  15252. if (unlikely(!digit)) goto done;
  15253. idigit = PyLong_AsLong(digit);
  15254. Py_DECREF(digit);
  15255. if (unlikely(idigit < 0)) goto done;
  15256. val |= ((long) idigit) << bits;
  15257. tmp = PyNumber_Rshift(stepval, shift);
  15258. if (unlikely(!tmp)) goto done;
  15259. Py_DECREF(stepval); stepval = tmp;
  15260. }
  15261. Py_DECREF(shift); shift = NULL;
  15262. Py_DECREF(mask); mask = NULL;
  15263. {
  15264. long idigit = PyLong_AsLong(stepval);
  15265. if (unlikely(idigit < 0)) goto done;
  15266. remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
  15267. if (unlikely(idigit >= (1L << remaining_bits)))
  15268. goto raise_overflow;
  15269. val |= ((long) idigit) << bits;
  15270. }
  15271. if (!is_unsigned) {
  15272. if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
  15273. goto raise_overflow;
  15274. if (is_negative)
  15275. val = ~val;
  15276. }
  15277. ret = 0;
  15278. done:
  15279. Py_XDECREF(shift);
  15280. Py_XDECREF(mask);
  15281. Py_XDECREF(stepval);
  15282. #endif
  15283. if (unlikely(ret))
  15284. return (long) -1;
  15285. return val;
  15286. }
  15287. raise_overflow:
  15288. PyErr_SetString(PyExc_OverflowError,
  15289. "value too large to convert to long");
  15290. return (long) -1;
  15291. raise_neg_overflow:
  15292. PyErr_SetString(PyExc_OverflowError,
  15293. "can't convert negative value to long");
  15294. return (long) -1;
  15295. }
  15296. /* CIntFromPy */
  15297. static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
  15298. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  15299. #pragma GCC diagnostic push
  15300. #pragma GCC diagnostic ignored "-Wconversion"
  15301. #endif
  15302. const int neg_one = (int) -1, const_zero = (int) 0;
  15303. #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
  15304. #pragma GCC diagnostic pop
  15305. #endif
  15306. const int is_unsigned = neg_one > const_zero;
  15307. if (unlikely(!PyLong_Check(x))) {
  15308. int val;
  15309. PyObject *tmp = __Pyx_PyNumber_Long(x);
  15310. if (!tmp) return (int) -1;
  15311. val = __Pyx_PyLong_As_int(tmp);
  15312. Py_DECREF(tmp);
  15313. return val;
  15314. }
  15315. if (is_unsigned) {
  15316. #if CYTHON_USE_PYLONG_INTERNALS
  15317. if (unlikely(__Pyx_PyLong_IsNeg(x))) {
  15318. goto raise_neg_overflow;
  15319. } else if (__Pyx_PyLong_IsCompact(x)) {
  15320. __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
  15321. } else {
  15322. const digit* digits = __Pyx_PyLong_Digits(x);
  15323. assert(__Pyx_PyLong_DigitCount(x) > 1);
  15324. switch (__Pyx_PyLong_DigitCount(x)) {
  15325. case 2:
  15326. if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
  15327. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15328. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15329. } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
  15330. return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  15331. }
  15332. }
  15333. break;
  15334. case 3:
  15335. if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
  15336. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15337. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15338. } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
  15339. return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  15340. }
  15341. }
  15342. break;
  15343. case 4:
  15344. if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
  15345. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15346. __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])))
  15347. } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
  15348. return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  15349. }
  15350. }
  15351. break;
  15352. }
  15353. }
  15354. #endif
  15355. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
  15356. if (unlikely(Py_SIZE(x) < 0)) {
  15357. goto raise_neg_overflow;
  15358. }
  15359. #else
  15360. {
  15361. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  15362. if (unlikely(result < 0))
  15363. return (int) -1;
  15364. if (unlikely(result == 1))
  15365. goto raise_neg_overflow;
  15366. }
  15367. #endif
  15368. if ((sizeof(int) <= sizeof(unsigned long))) {
  15369. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
  15370. } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
  15371. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  15372. }
  15373. } else {
  15374. #if CYTHON_USE_PYLONG_INTERNALS
  15375. if (__Pyx_PyLong_IsCompact(x)) {
  15376. __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
  15377. } else {
  15378. const digit* digits = __Pyx_PyLong_Digits(x);
  15379. assert(__Pyx_PyLong_DigitCount(x) > 1);
  15380. switch (__Pyx_PyLong_SignedDigitCount(x)) {
  15381. case -2:
  15382. if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
  15383. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15384. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15385. } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
  15386. return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15387. }
  15388. }
  15389. break;
  15390. case 2:
  15391. if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
  15392. if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
  15393. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15394. } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
  15395. return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15396. }
  15397. }
  15398. break;
  15399. case -3:
  15400. if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
  15401. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15402. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15403. } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
  15404. return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15405. }
  15406. }
  15407. break;
  15408. case 3:
  15409. if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
  15410. if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
  15411. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  15412. } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
  15413. return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15414. }
  15415. }
  15416. break;
  15417. case -4:
  15418. if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
  15419. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15420. __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])))
  15421. } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
  15422. return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15423. }
  15424. }
  15425. break;
  15426. case 4:
  15427. if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
  15428. if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
  15429. __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])))
  15430. } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
  15431. return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  15432. }
  15433. }
  15434. break;
  15435. }
  15436. }
  15437. #endif
  15438. if ((sizeof(int) <= sizeof(long))) {
  15439. __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
  15440. } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
  15441. __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
  15442. }
  15443. }
  15444. {
  15445. int val;
  15446. int ret = -1;
  15447. #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
  15448. Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
  15449. x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
  15450. if (unlikely(bytes_copied == -1)) {
  15451. } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
  15452. goto raise_overflow;
  15453. } else {
  15454. ret = 0;
  15455. }
  15456. #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
  15457. int one = 1; int is_little = (int)*(unsigned char *)&one;
  15458. unsigned char *bytes = (unsigned char *)&val;
  15459. ret = _PyLong_AsByteArray((PyLongObject *)x,
  15460. bytes, sizeof(val),
  15461. is_little, !is_unsigned);
  15462. #else
  15463. PyObject *v;
  15464. PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
  15465. int bits, remaining_bits, is_negative = 0;
  15466. int chunk_size = (sizeof(long) < 8) ? 30 : 62;
  15467. if (likely(PyLong_CheckExact(x))) {
  15468. v = __Pyx_NewRef(x);
  15469. } else {
  15470. v = PyNumber_Long(x);
  15471. if (unlikely(!v)) return (int) -1;
  15472. assert(PyLong_CheckExact(v));
  15473. }
  15474. {
  15475. int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
  15476. if (unlikely(result < 0)) {
  15477. Py_DECREF(v);
  15478. return (int) -1;
  15479. }
  15480. is_negative = result == 1;
  15481. }
  15482. if (is_unsigned && unlikely(is_negative)) {
  15483. Py_DECREF(v);
  15484. goto raise_neg_overflow;
  15485. } else if (is_negative) {
  15486. stepval = PyNumber_Invert(v);
  15487. Py_DECREF(v);
  15488. if (unlikely(!stepval))
  15489. return (int) -1;
  15490. } else {
  15491. stepval = v;
  15492. }
  15493. v = NULL;
  15494. val = (int) 0;
  15495. mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
  15496. shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
  15497. for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
  15498. PyObject *tmp, *digit;
  15499. long idigit;
  15500. digit = PyNumber_And(stepval, mask);
  15501. if (unlikely(!digit)) goto done;
  15502. idigit = PyLong_AsLong(digit);
  15503. Py_DECREF(digit);
  15504. if (unlikely(idigit < 0)) goto done;
  15505. val |= ((int) idigit) << bits;
  15506. tmp = PyNumber_Rshift(stepval, shift);
  15507. if (unlikely(!tmp)) goto done;
  15508. Py_DECREF(stepval); stepval = tmp;
  15509. }
  15510. Py_DECREF(shift); shift = NULL;
  15511. Py_DECREF(mask); mask = NULL;
  15512. {
  15513. long idigit = PyLong_AsLong(stepval);
  15514. if (unlikely(idigit < 0)) goto done;
  15515. remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
  15516. if (unlikely(idigit >= (1L << remaining_bits)))
  15517. goto raise_overflow;
  15518. val |= ((int) idigit) << bits;
  15519. }
  15520. if (!is_unsigned) {
  15521. if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
  15522. goto raise_overflow;
  15523. if (is_negative)
  15524. val = ~val;
  15525. }
  15526. ret = 0;
  15527. done:
  15528. Py_XDECREF(shift);
  15529. Py_XDECREF(mask);
  15530. Py_XDECREF(stepval);
  15531. #endif
  15532. if (unlikely(ret))
  15533. return (int) -1;
  15534. return val;
  15535. }
  15536. raise_overflow:
  15537. PyErr_SetString(PyExc_OverflowError,
  15538. "value too large to convert to int");
  15539. return (int) -1;
  15540. raise_neg_overflow:
  15541. PyErr_SetString(PyExc_OverflowError,
  15542. "can't convert negative value to int");
  15543. return (int) -1;
  15544. }
  15545. /* FastTypeChecks */
  15546. #if CYTHON_COMPILING_IN_CPYTHON
  15547. static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
  15548. while (a) {
  15549. a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
  15550. if (a == b)
  15551. return 1;
  15552. }
  15553. return b == &PyBaseObject_Type;
  15554. }
  15555. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
  15556. PyObject *mro;
  15557. if (a == b) return 1;
  15558. mro = a->tp_mro;
  15559. if (likely(mro)) {
  15560. Py_ssize_t i, n;
  15561. n = PyTuple_GET_SIZE(mro);
  15562. for (i = 0; i < n; i++) {
  15563. if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
  15564. return 1;
  15565. }
  15566. return 0;
  15567. }
  15568. return __Pyx_InBases(a, b);
  15569. }
  15570. static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
  15571. PyObject *mro;
  15572. if (cls == a || cls == b) return 1;
  15573. mro = cls->tp_mro;
  15574. if (likely(mro)) {
  15575. Py_ssize_t i, n;
  15576. n = PyTuple_GET_SIZE(mro);
  15577. for (i = 0; i < n; i++) {
  15578. PyObject *base = PyTuple_GET_ITEM(mro, i);
  15579. if (base == (PyObject *)a || base == (PyObject *)b)
  15580. return 1;
  15581. }
  15582. return 0;
  15583. }
  15584. return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
  15585. }
  15586. static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
  15587. if (exc_type1) {
  15588. return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
  15589. } else {
  15590. return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
  15591. }
  15592. }
  15593. static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  15594. Py_ssize_t i, n;
  15595. assert(PyExceptionClass_Check(exc_type));
  15596. n = PyTuple_GET_SIZE(tuple);
  15597. for (i=0; i<n; i++) {
  15598. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  15599. }
  15600. for (i=0; i<n; i++) {
  15601. PyObject *t = PyTuple_GET_ITEM(tuple, i);
  15602. if (likely(PyExceptionClass_Check(t))) {
  15603. if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
  15604. } else {
  15605. }
  15606. }
  15607. return 0;
  15608. }
  15609. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
  15610. if (likely(err == exc_type)) return 1;
  15611. if (likely(PyExceptionClass_Check(err))) {
  15612. if (likely(PyExceptionClass_Check(exc_type))) {
  15613. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
  15614. } else if (likely(PyTuple_Check(exc_type))) {
  15615. return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
  15616. } else {
  15617. }
  15618. }
  15619. return PyErr_GivenExceptionMatches(err, exc_type);
  15620. }
  15621. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
  15622. assert(PyExceptionClass_Check(exc_type1));
  15623. assert(PyExceptionClass_Check(exc_type2));
  15624. if (likely(err == exc_type1 || err == exc_type2)) return 1;
  15625. if (likely(PyExceptionClass_Check(err))) {
  15626. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
  15627. }
  15628. return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
  15629. }
  15630. #endif
  15631. /* GetRuntimeVersion */
  15632. #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  15633. void __Pyx_init_runtime_version(void) {
  15634. if (__Pyx_cached_runtime_version == 0) {
  15635. const char* rt_version = Py_GetVersion();
  15636. unsigned long version = 0;
  15637. unsigned long factor = 0x01000000UL;
  15638. unsigned int digit = 0;
  15639. int i = 0;
  15640. while (factor) {
  15641. while ('0' <= rt_version[i] && rt_version[i] <= '9') {
  15642. digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
  15643. ++i;
  15644. }
  15645. version += factor * digit;
  15646. if (rt_version[i] != '.')
  15647. break;
  15648. digit = 0;
  15649. factor >>= 8;
  15650. ++i;
  15651. }
  15652. __Pyx_cached_runtime_version = version;
  15653. }
  15654. }
  15655. #endif
  15656. static unsigned long __Pyx_get_runtime_version(void) {
  15657. #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
  15658. return Py_Version & ~0xFFUL;
  15659. #else
  15660. return __Pyx_cached_runtime_version;
  15661. #endif
  15662. }
  15663. /* CheckBinaryVersion */
  15664. static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
  15665. const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
  15666. if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
  15667. return 0;
  15668. if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
  15669. return 1;
  15670. {
  15671. char message[200];
  15672. PyOS_snprintf(message, sizeof(message),
  15673. "compile time Python version %d.%d "
  15674. "of module '%.100s' "
  15675. "%s "
  15676. "runtime version %d.%d",
  15677. (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
  15678. __Pyx_MODULE_NAME,
  15679. (allow_newer) ? "was newer than" : "does not match",
  15680. (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
  15681. );
  15682. return PyErr_WarnEx(NULL, message, 1);
  15683. }
  15684. }
  15685. /* NewCodeObj */
  15686. #if CYTHON_COMPILING_IN_LIMITED_API
  15687. static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
  15688. PyObject *code, PyObject *c, PyObject* n, PyObject *v,
  15689. PyObject *fv, PyObject *cell, PyObject* fn,
  15690. PyObject *name, int fline, PyObject *lnos) {
  15691. PyObject *exception_table = NULL;
  15692. PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
  15693. #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
  15694. PyObject *version_info;
  15695. PyObject *py_minor_version = NULL;
  15696. #endif
  15697. long minor_version = 0;
  15698. PyObject *type, *value, *traceback;
  15699. PyErr_Fetch(&type, &value, &traceback);
  15700. #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
  15701. minor_version = 11;
  15702. #else
  15703. if (!(version_info = PySys_GetObject("version_info"))) goto end;
  15704. if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
  15705. minor_version = PyLong_AsLong(py_minor_version);
  15706. Py_DECREF(py_minor_version);
  15707. if (minor_version == -1 && PyErr_Occurred()) goto end;
  15708. #endif
  15709. if (!(types_module = PyImport_ImportModule("types"))) goto end;
  15710. if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
  15711. if (minor_version <= 7) {
  15712. (void)p;
  15713. result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
  15714. c, n, v, fn, name, fline, lnos, fv, cell);
  15715. } else if (minor_version <= 10) {
  15716. result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
  15717. c, n, v, fn, name, fline, lnos, fv, cell);
  15718. } else {
  15719. if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
  15720. result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
  15721. c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
  15722. }
  15723. end:
  15724. Py_XDECREF(code_type);
  15725. Py_XDECREF(exception_table);
  15726. Py_XDECREF(types_module);
  15727. if (type) {
  15728. PyErr_Restore(type, value, traceback);
  15729. }
  15730. return result;
  15731. }
  15732. #elif PY_VERSION_HEX >= 0x030B0000
  15733. static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
  15734. PyObject *code, PyObject *c, PyObject* n, PyObject *v,
  15735. PyObject *fv, PyObject *cell, PyObject* fn,
  15736. PyObject *name, int fline, PyObject *lnos) {
  15737. PyCodeObject *result;
  15738. result =
  15739. #if PY_VERSION_HEX >= 0x030C0000
  15740. PyUnstable_Code_NewWithPosOnlyArgs
  15741. #else
  15742. PyCode_NewWithPosOnlyArgs
  15743. #endif
  15744. (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
  15745. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
  15746. if (likely(result))
  15747. result->_co_firsttraceable = 0;
  15748. #endif
  15749. return result;
  15750. }
  15751. #elif !CYTHON_COMPILING_IN_PYPY
  15752. #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  15753. PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  15754. #else
  15755. #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  15756. PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  15757. #endif
  15758. static PyObject* __Pyx_PyCode_New(
  15759. const __Pyx_PyCode_New_function_description descr,
  15760. PyObject * const *varnames,
  15761. PyObject *filename,
  15762. PyObject *funcname,
  15763. PyObject *line_table,
  15764. PyObject *tuple_dedup_map
  15765. ) {
  15766. PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
  15767. Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
  15768. PyObject *varnames_tuple = PyTuple_New(var_count);
  15769. if (unlikely(!varnames_tuple)) return NULL;
  15770. for (Py_ssize_t i=0; i < var_count; i++) {
  15771. Py_INCREF(varnames[i]);
  15772. if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
  15773. }
  15774. #if CYTHON_COMPILING_IN_LIMITED_API
  15775. varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
  15776. if (!varnames_tuple_dedup) {
  15777. if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
  15778. varnames_tuple_dedup = varnames_tuple;
  15779. }
  15780. #else
  15781. varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
  15782. if (unlikely(!varnames_tuple_dedup)) goto done;
  15783. #endif
  15784. #if CYTHON_AVOID_BORROWED_REFS
  15785. Py_INCREF(varnames_tuple_dedup);
  15786. #endif
  15787. if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
  15788. Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
  15789. #if !CYTHON_ASSUME_SAFE_SIZE
  15790. if (unlikely(line_table_length == -1)) goto done;
  15791. #endif
  15792. Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
  15793. code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
  15794. if (unlikely(!code_bytes)) goto done;
  15795. char* c_code_bytes = PyBytes_AsString(code_bytes);
  15796. if (unlikely(!c_code_bytes)) goto done;
  15797. memset(c_code_bytes, 0, (size_t) code_len);
  15798. }
  15799. code_obj = (PyObject*) __Pyx__PyCode_New(
  15800. (int) descr.argcount,
  15801. (int) descr.num_posonly_args,
  15802. (int) descr.num_kwonly_args,
  15803. (int) descr.nlocals,
  15804. 0,
  15805. (int) descr.flags,
  15806. code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
  15807. __pyx_mstate_global->__pyx_empty_tuple,
  15808. __pyx_mstate_global->__pyx_empty_tuple,
  15809. varnames_tuple_dedup,
  15810. __pyx_mstate_global->__pyx_empty_tuple,
  15811. __pyx_mstate_global->__pyx_empty_tuple,
  15812. filename,
  15813. funcname,
  15814. (int) descr.first_line,
  15815. (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
  15816. );
  15817. done:
  15818. Py_XDECREF(code_bytes);
  15819. #if CYTHON_AVOID_BORROWED_REFS
  15820. Py_XDECREF(varnames_tuple_dedup);
  15821. #endif
  15822. Py_DECREF(varnames_tuple);
  15823. return code_obj;
  15824. }
  15825. /* DecompressString */
  15826. static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
  15827. PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed;
  15828. const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
  15829. PyObject *methodname = PyUnicode_FromString("decompress");
  15830. if (unlikely(!methodname)) return NULL;
  15831. #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
  15832. if (algo == 3) {
  15833. PyObject *fromlist = Py_BuildValue("[O]", methodname);
  15834. if (unlikely(!fromlist)) goto bad;
  15835. module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
  15836. Py_DECREF(fromlist);
  15837. } else
  15838. #endif
  15839. module = PyImport_ImportModule(module_name);
  15840. if (unlikely(!module)) goto import_failed;
  15841. decompress = PyObject_GetAttr(module, methodname);
  15842. if (unlikely(!decompress)) goto import_failed;
  15843. {
  15844. #ifdef __cplusplus
  15845. char *memview_bytes = const_cast<char*>(s);
  15846. #else
  15847. #if defined(__clang__)
  15848. #pragma clang diagnostic push
  15849. #pragma clang diagnostic ignored "-Wcast-qual"
  15850. #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
  15851. #pragma GCC diagnostic push
  15852. #pragma GCC diagnostic ignored "-Wcast-qual"
  15853. #endif
  15854. char *memview_bytes = (char*) s;
  15855. #if defined(__clang__)
  15856. #pragma clang diagnostic pop
  15857. #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
  15858. #pragma GCC diagnostic pop
  15859. #endif
  15860. #endif
  15861. #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
  15862. int memview_flags = 0x100;
  15863. #else
  15864. int memview_flags = PyBUF_READ;
  15865. #endif
  15866. compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
  15867. }
  15868. if (unlikely(!compressed_bytes)) {
  15869. Py_DECREF(decompress);
  15870. goto bad;
  15871. }
  15872. decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
  15873. Py_DECREF(compressed_bytes);
  15874. Py_DECREF(decompress);
  15875. Py_DECREF(module);
  15876. Py_DECREF(methodname);
  15877. return decompressed;
  15878. import_failed:
  15879. PyErr_Format(PyExc_ImportError,
  15880. "Failed to import '%.20s.decompress' - cannot initialise module strings. "
  15881. "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
  15882. module_name, algo);
  15883. bad:
  15884. Py_XDECREF(module);
  15885. Py_DECREF(methodname);
  15886. return NULL;
  15887. }
  15888. #include <string.h>
  15889. static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
  15890. size_t len = strlen(s);
  15891. if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
  15892. PyErr_SetString(PyExc_OverflowError, "byte string is too long");
  15893. return -1;
  15894. }
  15895. return (Py_ssize_t) len;
  15896. }
  15897. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
  15898. Py_ssize_t len = __Pyx_ssize_strlen(c_str);
  15899. if (unlikely(len < 0)) return NULL;
  15900. return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
  15901. }
  15902. static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
  15903. Py_ssize_t len = __Pyx_ssize_strlen(c_str);
  15904. if (unlikely(len < 0)) return NULL;
  15905. return PyByteArray_FromStringAndSize(c_str, len);
  15906. }
  15907. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
  15908. Py_ssize_t ignore;
  15909. return __Pyx_PyObject_AsStringAndSize(o, &ignore);
  15910. }
  15911. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  15912. static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  15913. if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
  15914. #if CYTHON_COMPILING_IN_LIMITED_API
  15915. {
  15916. const char* result;
  15917. Py_ssize_t unicode_length;
  15918. CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  15919. #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
  15920. if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
  15921. #else
  15922. result = PyUnicode_AsUTF8AndSize(o, length);
  15923. #endif
  15924. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  15925. unicode_length = PyUnicode_GetLength(o);
  15926. if (unlikely(unicode_length < 0)) return NULL;
  15927. if (unlikely(unicode_length != *length)) {
  15928. PyUnicode_AsASCIIString(o);
  15929. return NULL;
  15930. }
  15931. #endif
  15932. return result;
  15933. }
  15934. #else
  15935. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  15936. if (likely(PyUnicode_IS_ASCII(o))) {
  15937. *length = PyUnicode_GET_LENGTH(o);
  15938. return PyUnicode_AsUTF8(o);
  15939. } else {
  15940. PyUnicode_AsASCIIString(o);
  15941. return NULL;
  15942. }
  15943. #else
  15944. return PyUnicode_AsUTF8AndSize(o, length);
  15945. #endif
  15946. #endif
  15947. }
  15948. #endif
  15949. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  15950. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  15951. if (PyUnicode_Check(o)) {
  15952. return __Pyx_PyUnicode_AsStringAndSize(o, length);
  15953. } else
  15954. #endif
  15955. if (PyByteArray_Check(o)) {
  15956. #if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
  15957. *length = PyByteArray_GET_SIZE(o);
  15958. return PyByteArray_AS_STRING(o);
  15959. #else
  15960. *length = PyByteArray_Size(o);
  15961. if (*length == -1) return NULL;
  15962. return PyByteArray_AsString(o);
  15963. #endif
  15964. } else
  15965. {
  15966. char* result;
  15967. int r = PyBytes_AsStringAndSize(o, &result, length);
  15968. if (unlikely(r < 0)) {
  15969. return NULL;
  15970. } else {
  15971. return result;
  15972. }
  15973. }
  15974. }
  15975. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
  15976. int is_true = x == Py_True;
  15977. if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
  15978. else return PyObject_IsTrue(x);
  15979. }
  15980. static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
  15981. int retval;
  15982. if (unlikely(!x)) return -1;
  15983. retval = __Pyx_PyObject_IsTrue(x);
  15984. Py_DECREF(x);
  15985. return retval;
  15986. }
  15987. static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
  15988. __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
  15989. if (PyLong_Check(result)) {
  15990. if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
  15991. "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
  15992. "The ability to return an instance of a strict subclass of int is deprecated, "
  15993. "and may be removed in a future version of Python.",
  15994. result_type_name)) {
  15995. __Pyx_DECREF_TypeName(result_type_name);
  15996. Py_DECREF(result);
  15997. return NULL;
  15998. }
  15999. __Pyx_DECREF_TypeName(result_type_name);
  16000. return result;
  16001. }
  16002. PyErr_Format(PyExc_TypeError,
  16003. "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
  16004. result_type_name);
  16005. __Pyx_DECREF_TypeName(result_type_name);
  16006. Py_DECREF(result);
  16007. return NULL;
  16008. }
  16009. static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
  16010. #if CYTHON_USE_TYPE_SLOTS
  16011. PyNumberMethods *m;
  16012. #endif
  16013. PyObject *res = NULL;
  16014. if (likely(PyLong_Check(x)))
  16015. return __Pyx_NewRef(x);
  16016. #if CYTHON_USE_TYPE_SLOTS
  16017. m = Py_TYPE(x)->tp_as_number;
  16018. if (likely(m && m->nb_int)) {
  16019. res = m->nb_int(x);
  16020. }
  16021. #else
  16022. if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
  16023. res = PyNumber_Long(x);
  16024. }
  16025. #endif
  16026. if (likely(res)) {
  16027. if (unlikely(!PyLong_CheckExact(res))) {
  16028. return __Pyx_PyNumber_LongWrongResultType(res);
  16029. }
  16030. }
  16031. else if (!PyErr_Occurred()) {
  16032. PyErr_SetString(PyExc_TypeError,
  16033. "an integer is required");
  16034. }
  16035. return res;
  16036. }
  16037. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  16038. Py_ssize_t ival;
  16039. PyObject *x;
  16040. if (likely(PyLong_CheckExact(b))) {
  16041. #if CYTHON_USE_PYLONG_INTERNALS
  16042. if (likely(__Pyx_PyLong_IsCompact(b))) {
  16043. return __Pyx_PyLong_CompactValue(b);
  16044. } else {
  16045. const digit* digits = __Pyx_PyLong_Digits(b);
  16046. const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
  16047. switch (size) {
  16048. case 2:
  16049. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  16050. return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16051. }
  16052. break;
  16053. case -2:
  16054. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  16055. return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16056. }
  16057. break;
  16058. case 3:
  16059. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  16060. return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16061. }
  16062. break;
  16063. case -3:
  16064. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  16065. return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  16066. }
  16067. break;
  16068. case 4:
  16069. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  16070. 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]));
  16071. }
  16072. break;
  16073. case -4:
  16074. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  16075. 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]));
  16076. }
  16077. break;
  16078. }
  16079. }
  16080. #endif
  16081. return PyLong_AsSsize_t(b);
  16082. }
  16083. x = PyNumber_Index(b);
  16084. if (!x) return -1;
  16085. ival = PyLong_AsSsize_t(x);
  16086. Py_DECREF(x);
  16087. return ival;
  16088. }
  16089. static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  16090. if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
  16091. return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  16092. } else {
  16093. Py_ssize_t ival;
  16094. PyObject *x;
  16095. x = PyNumber_Index(o);
  16096. if (!x) return -1;
  16097. ival = PyLong_AsLong(x);
  16098. Py_DECREF(x);
  16099. return ival;
  16100. }
  16101. }
  16102. static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
  16103. CYTHON_UNUSED_VAR(b);
  16104. return __Pyx_NewRef(Py_None);
  16105. }
  16106. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  16107. return __Pyx_NewRef(b ? Py_True: Py_False);
  16108. }
  16109. static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
  16110. return PyLong_FromSize_t(ival);
  16111. }
  16112. /* MultiPhaseInitModuleState */
  16113. #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
  16114. #ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16115. #if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  16116. #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
  16117. #else
  16118. #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
  16119. #endif
  16120. #endif
  16121. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
  16122. #error "Module state with PEP489 requires atomics. Currently that's one of\
  16123. C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
  16124. #endif
  16125. #if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16126. #define __Pyx_ModuleStateLookup_Lock()
  16127. #define __Pyx_ModuleStateLookup_Unlock()
  16128. #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
  16129. static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
  16130. #define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
  16131. #define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
  16132. #elif defined(__cplusplus) && __cplusplus >= 201103L
  16133. #include <mutex>
  16134. static std::mutex __Pyx_ModuleStateLookup_mutex;
  16135. #define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
  16136. #define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
  16137. #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
  16138. #include <threads.h>
  16139. static mtx_t __Pyx_ModuleStateLookup_mutex;
  16140. static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
  16141. static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
  16142. mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
  16143. }
  16144. #define __Pyx_ModuleStateLookup_Lock()\
  16145. call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  16146. mtx_lock(&__Pyx_ModuleStateLookup_mutex)
  16147. #define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
  16148. #elif defined(HAVE_PTHREAD_H)
  16149. #include <pthread.h>
  16150. static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
  16151. #define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
  16152. #define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
  16153. #elif defined(_WIN32)
  16154. #include <Windows.h> // synchapi.h on its own doesn't work
  16155. static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
  16156. #define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
  16157. #define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
  16158. #else
  16159. #error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
  16160. Requires C standard >= C11, or C++ standard >= C++11,\
  16161. or pthreads, or the Windows 32 API, or Python >= 3.13."
  16162. #endif
  16163. typedef struct {
  16164. int64_t id;
  16165. PyObject *module;
  16166. } __Pyx_InterpreterIdAndModule;
  16167. typedef struct {
  16168. char interpreter_id_as_index;
  16169. Py_ssize_t count;
  16170. Py_ssize_t allocated;
  16171. __Pyx_InterpreterIdAndModule table[1];
  16172. } __Pyx_ModuleStateLookupData;
  16173. #define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
  16174. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16175. static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
  16176. #endif
  16177. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16178. static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
  16179. #else
  16180. static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
  16181. #endif
  16182. static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
  16183. __Pyx_InterpreterIdAndModule* table,
  16184. Py_ssize_t count,
  16185. int64_t interpreterId) {
  16186. __Pyx_InterpreterIdAndModule* begin = table;
  16187. __Pyx_InterpreterIdAndModule* end = begin + count;
  16188. if (begin->id == interpreterId) {
  16189. return begin;
  16190. }
  16191. while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
  16192. __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
  16193. if (halfway->id == interpreterId) {
  16194. return halfway;
  16195. }
  16196. if (halfway->id < interpreterId) {
  16197. begin = halfway;
  16198. } else {
  16199. end = halfway;
  16200. }
  16201. }
  16202. for (; begin < end; ++begin) {
  16203. if (begin->id >= interpreterId) return begin;
  16204. }
  16205. return begin;
  16206. }
  16207. static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
  16208. int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
  16209. if (interpreter_id == -1) return NULL;
  16210. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16211. __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
  16212. {
  16213. __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
  16214. if (likely(data)) {
  16215. __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
  16216. if (likely(data == new_data)) {
  16217. goto read_finished;
  16218. }
  16219. }
  16220. __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
  16221. __Pyx_ModuleStateLookup_Lock();
  16222. __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
  16223. data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
  16224. __Pyx_ModuleStateLookup_Unlock();
  16225. }
  16226. read_finished:;
  16227. #else
  16228. __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
  16229. #endif
  16230. __Pyx_InterpreterIdAndModule* found = NULL;
  16231. if (unlikely(!data)) goto end;
  16232. if (data->interpreter_id_as_index) {
  16233. if (interpreter_id < data->count) {
  16234. found = data->table+interpreter_id;
  16235. }
  16236. } else {
  16237. found = __Pyx_State_FindModuleStateLookupTableLowerBound(
  16238. data->table, data->count, interpreter_id);
  16239. }
  16240. end:
  16241. {
  16242. PyObject *result=NULL;
  16243. if (found && found->id == interpreter_id) {
  16244. result = found->module;
  16245. }
  16246. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16247. __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
  16248. #endif
  16249. return result;
  16250. }
  16251. }
  16252. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16253. static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
  16254. while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
  16255. }
  16256. #else
  16257. #define __Pyx_ModuleStateLookup_wait_until_no_readers()
  16258. #endif
  16259. static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
  16260. Py_ssize_t to_allocate = (*old_data)->allocated;
  16261. while (to_allocate <= interpreter_id) {
  16262. if (to_allocate == 0) to_allocate = 1;
  16263. else to_allocate *= 2;
  16264. }
  16265. __Pyx_ModuleStateLookupData *new_data = *old_data;
  16266. if (to_allocate != (*old_data)->allocated) {
  16267. new_data = (__Pyx_ModuleStateLookupData *)realloc(
  16268. *old_data,
  16269. sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
  16270. if (!new_data) {
  16271. PyErr_NoMemory();
  16272. return -1;
  16273. }
  16274. for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
  16275. new_data->table[i].id = i;
  16276. new_data->table[i].module = NULL;
  16277. }
  16278. new_data->allocated = to_allocate;
  16279. }
  16280. new_data->table[interpreter_id].module = module;
  16281. if (new_data->count < interpreter_id+1) {
  16282. new_data->count = interpreter_id+1;
  16283. }
  16284. *old_data = new_data;
  16285. return 0;
  16286. }
  16287. static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
  16288. __Pyx_InterpreterIdAndModule *read = data->table;
  16289. __Pyx_InterpreterIdAndModule *write = data->table;
  16290. __Pyx_InterpreterIdAndModule *end = read + data->count;
  16291. for (; read<end; ++read) {
  16292. if (read->module) {
  16293. write->id = read->id;
  16294. write->module = read->module;
  16295. ++write;
  16296. }
  16297. }
  16298. data->count = write - data->table;
  16299. for (; write<end; ++write) {
  16300. write->id = 0;
  16301. write->module = NULL;
  16302. }
  16303. data->interpreter_id_as_index = 0;
  16304. }
  16305. static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
  16306. int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
  16307. if (interpreter_id == -1) return -1;
  16308. int result = 0;
  16309. __Pyx_ModuleStateLookup_Lock();
  16310. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16311. __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
  16312. __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
  16313. #else
  16314. __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
  16315. #endif
  16316. __Pyx_ModuleStateLookupData *new_data = old_data;
  16317. if (!new_data) {
  16318. new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
  16319. if (!new_data) {
  16320. result = -1;
  16321. PyErr_NoMemory();
  16322. goto end;
  16323. }
  16324. new_data->allocated = 1;
  16325. new_data->interpreter_id_as_index = 1;
  16326. }
  16327. __Pyx_ModuleStateLookup_wait_until_no_readers();
  16328. if (new_data->interpreter_id_as_index) {
  16329. if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
  16330. result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
  16331. goto end;
  16332. }
  16333. __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
  16334. }
  16335. {
  16336. Py_ssize_t insert_at = 0;
  16337. {
  16338. __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
  16339. new_data->table, new_data->count, interpreter_id);
  16340. assert(lower_bound);
  16341. insert_at = lower_bound - new_data->table;
  16342. if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
  16343. lower_bound->module = module;
  16344. goto end; // already in table, nothing more to do
  16345. }
  16346. }
  16347. if (new_data->count+1 >= new_data->allocated) {
  16348. Py_ssize_t to_allocate = (new_data->count+1)*2;
  16349. new_data =
  16350. (__Pyx_ModuleStateLookupData*)realloc(
  16351. new_data,
  16352. sizeof(__Pyx_ModuleStateLookupData) +
  16353. (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
  16354. if (!new_data) {
  16355. result = -1;
  16356. new_data = old_data;
  16357. PyErr_NoMemory();
  16358. goto end;
  16359. }
  16360. new_data->allocated = to_allocate;
  16361. }
  16362. ++new_data->count;
  16363. int64_t last_id = interpreter_id;
  16364. PyObject *last_module = module;
  16365. for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
  16366. int64_t current_id = new_data->table[i].id;
  16367. new_data->table[i].id = last_id;
  16368. last_id = current_id;
  16369. PyObject *current_module = new_data->table[i].module;
  16370. new_data->table[i].module = last_module;
  16371. last_module = current_module;
  16372. }
  16373. }
  16374. end:
  16375. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16376. __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
  16377. #else
  16378. __Pyx_ModuleStateLookup_data = new_data;
  16379. #endif
  16380. __Pyx_ModuleStateLookup_Unlock();
  16381. return result;
  16382. }
  16383. static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
  16384. int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
  16385. if (interpreter_id == -1) return -1;
  16386. __Pyx_ModuleStateLookup_Lock();
  16387. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16388. __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
  16389. __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
  16390. #else
  16391. __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
  16392. #endif
  16393. if (data->interpreter_id_as_index) {
  16394. if (interpreter_id < data->count) {
  16395. data->table[interpreter_id].module = NULL;
  16396. }
  16397. goto done;
  16398. }
  16399. {
  16400. __Pyx_ModuleStateLookup_wait_until_no_readers();
  16401. __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
  16402. data->table, data->count, interpreter_id);
  16403. if (!lower_bound) goto done;
  16404. if (lower_bound->id != interpreter_id) goto done;
  16405. __Pyx_InterpreterIdAndModule *end = data->table+data->count;
  16406. for (;lower_bound<end-1; ++lower_bound) {
  16407. lower_bound->id = (lower_bound+1)->id;
  16408. lower_bound->module = (lower_bound+1)->module;
  16409. }
  16410. }
  16411. --data->count;
  16412. if (data->count == 0) {
  16413. free(data);
  16414. data = NULL;
  16415. }
  16416. done:
  16417. #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
  16418. __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
  16419. #else
  16420. __Pyx_ModuleStateLookup_data = data;
  16421. #endif
  16422. __Pyx_ModuleStateLookup_Unlock();
  16423. return 0;
  16424. }
  16425. #endif
  16426. /* #### Code section: utility_code_pragmas_end ### */
  16427. #ifdef _MSC_VER
  16428. #pragma warning( pop )
  16429. #endif
  16430. /* #### Code section: end ### */
  16431. #endif /* Py_PYTHON_H */