sqlite_parser.go 749 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256
  1. // Code generated from SQLiteParser.g4 by ANTLR 4.12.0. DO NOT EDIT.
  2. package parser // SQLiteParser
  3. import (
  4. "fmt"
  5. "strconv"
  6. "sync"
  7. "github.com/antlr/antlr4/runtime/Go/antlr/v4"
  8. )
  9. // Suppress unused import errors
  10. var _ = fmt.Printf
  11. var _ = strconv.Itoa
  12. var _ = sync.Once{}
  13. type SQLiteParser struct {
  14. *antlr.BaseParser
  15. }
  16. var sqliteparserParserStaticData struct {
  17. once sync.Once
  18. serializedATN []int32
  19. literalNames []string
  20. symbolicNames []string
  21. ruleNames []string
  22. predictionContextCache *antlr.PredictionContextCache
  23. atn *antlr.ATN
  24. decisionToDFA []*antlr.DFA
  25. }
  26. func sqliteparserParserInit() {
  27. staticData := &sqliteparserParserStaticData
  28. staticData.literalNames = []string{
  29. "", "';'", "'.'", "'('", "')'", "','", "'='", "'*'", "'+'", "'->>'",
  30. "'->'", "'-'", "'~'", "'||'", "'/'", "'%'", "'<<'", "'>>'", "'&'", "'|'",
  31. "'<'", "'<='", "'>'", "'>='", "'=='", "'!='", "'<>'",
  32. }
  33. staticData.symbolicNames = []string{
  34. "", "SCOL", "DOT", "OPEN_PAR", "CLOSE_PAR", "COMMA", "ASSIGN", "STAR",
  35. "PLUS", "PTR2", "PTR", "MINUS", "TILDE", "PIPE2", "DIV", "MOD", "LT2",
  36. "GT2", "AMP", "PIPE", "LT", "LT_EQ", "GT", "GT_EQ", "EQ", "NOT_EQ1",
  37. "NOT_EQ2", "ABORT_", "ACTION_", "ADD_", "AFTER_", "ALL_", "ALTER_",
  38. "ANALYZE_", "AND_", "AS_", "ASC_", "ATTACH_", "AUTOINCREMENT_", "BEFORE_",
  39. "BEGIN_", "BETWEEN_", "BY_", "CASCADE_", "CASE_", "CAST_", "CHECK_",
  40. "COLLATE_", "COLUMN_", "COMMIT_", "CONFLICT_", "CONSTRAINT_", "CREATE_",
  41. "CROSS_", "CURRENT_DATE_", "CURRENT_TIME_", "CURRENT_TIMESTAMP_", "DATABASE_",
  42. "DEFAULT_", "DEFERRABLE_", "DEFERRED_", "DELETE_", "DESC_", "DETACH_",
  43. "DISTINCT_", "DROP_", "EACH_", "ELSE_", "END_", "ESCAPE_", "EXCEPT_",
  44. "EXCLUSIVE_", "EXISTS_", "EXPLAIN_", "FAIL_", "FOR_", "FOREIGN_", "FROM_",
  45. "FULL_", "GLOB_", "GROUP_", "HAVING_", "IF_", "IGNORE_", "IMMEDIATE_",
  46. "IN_", "INDEX_", "INDEXED_", "INITIALLY_", "INNER_", "INSERT_", "INSTEAD_",
  47. "INTERSECT_", "INTO_", "IS_", "ISNULL_", "JOIN_", "KEY_", "LEFT_", "LIKE_",
  48. "LIMIT_", "MATCH_", "NATURAL_", "NO_", "NOT_", "NOTNULL_", "NULL_",
  49. "OF_", "OFFSET_", "ON_", "OR_", "ORDER_", "OUTER_", "PLAN_", "PRAGMA_",
  50. "PRIMARY_", "QUERY_", "RAISE_", "RECURSIVE_", "REFERENCES_", "REGEXP_",
  51. "REINDEX_", "RELEASE_", "RENAME_", "REPLACE_", "RESTRICT_", "RETURNING_",
  52. "RIGHT_", "ROLLBACK_", "ROW_", "ROWS_", "SAVEPOINT_", "SELECT_", "SET_",
  53. "STRICT_", "TABLE_", "TEMP_", "TEMPORARY_", "THEN_", "TO_", "TRANSACTION_",
  54. "TRIGGER_", "UNION_", "UNIQUE_", "UPDATE_", "USING_", "VACUUM_", "VALUES_",
  55. "VIEW_", "VIRTUAL_", "WHEN_", "WHERE_", "WITH_", "WITHOUT_", "FIRST_VALUE_",
  56. "OVER_", "PARTITION_", "RANGE_", "PRECEDING_", "UNBOUNDED_", "CURRENT_",
  57. "FOLLOWING_", "CUME_DIST_", "DENSE_RANK_", "LAG_", "LAST_VALUE_", "LEAD_",
  58. "NTH_VALUE_", "NTILE_", "PERCENT_RANK_", "RANK_", "ROW_NUMBER_", "GENERATED_",
  59. "ALWAYS_", "STORED_", "TRUE_", "FALSE_", "WINDOW_", "NULLS_", "FIRST_",
  60. "LAST_", "FILTER_", "GROUPS_", "EXCLUDE_", "TIES_", "OTHERS_", "DO_",
  61. "NOTHING_", "IDENTIFIER", "NUMERIC_LITERAL", "NUMBERED_BIND_PARAMETER",
  62. "NAMED_BIND_PARAMETER", "STRING_LITERAL", "BLOB_LITERAL", "SINGLE_LINE_COMMENT",
  63. "MULTILINE_COMMENT", "SPACES", "UNEXPECTED_CHAR",
  64. }
  65. staticData.ruleNames = []string{
  66. "parse", "sql_stmt_list", "sql_stmt", "alter_table_stmt", "analyze_stmt",
  67. "attach_stmt", "begin_stmt", "commit_stmt", "rollback_stmt", "savepoint_stmt",
  68. "release_stmt", "create_index_stmt", "indexed_column", "table_option",
  69. "create_table_stmt", "column_def", "type_name", "column_constraint",
  70. "signed_number", "table_constraint", "foreign_key_clause", "conflict_clause",
  71. "create_trigger_stmt", "create_view_stmt", "create_virtual_table_stmt",
  72. "with_clause", "cte_table_name", "recursive_cte", "common_table_expression",
  73. "returning_clause", "delete_stmt", "delete_stmt_limited", "detach_stmt",
  74. "drop_stmt", "expr", "raise_function", "literal_value", "insert_stmt",
  75. "upsert_clause", "pragma_stmt", "pragma_value", "reindex_stmt", "select_stmt",
  76. "join_clause", "select_core", "factored_select_stmt", "simple_select_stmt",
  77. "compound_select_stmt", "table_or_subquery", "result_column", "join_operator",
  78. "join_constraint", "compound_operator", "update_stmt", "column_name_list",
  79. "update_stmt_limited", "qualified_table_name", "vacuum_stmt", "filter_clause",
  80. "window_defn", "over_clause", "frame_spec", "frame_clause", "simple_function_invocation",
  81. "aggregate_function_invocation", "window_function_invocation", "common_table_stmt",
  82. "order_by_stmt", "limit_stmt", "ordering_term", "asc_desc", "frame_left",
  83. "frame_right", "frame_single", "window_function", "of_OF_fset", "default_DEFAULT__value",
  84. "partition_by", "order_by_expr", "order_by_expr_asc_desc", "expr_asc_desc",
  85. "initial_select", "recursive__select", "unary_operator", "error_message",
  86. "module_argument", "column_alias", "keyword", "name", "function_name",
  87. "qualified_function_name", "schema_name", "table_name", "table_or_index_name",
  88. "new_table_name", "column_name", "collation_name", "foreign_table",
  89. "index_name", "trigger_name", "view_name", "module_name", "pragma_name",
  90. "savepoint_name", "table_alias", "table_alias_fallback", "transaction_name",
  91. "window_name", "alias", "filename", "base_window_name", "simple_func",
  92. "aggregate_func", "table_function_name", "any_name",
  93. }
  94. staticData.predictionContextCache = antlr.NewPredictionContextCache()
  95. staticData.serializedATN = []int32{
  96. 4, 1, 197, 2178, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4,
  97. 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10,
  98. 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7,
  99. 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20,
  100. 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2,
  101. 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31,
  102. 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7,
  103. 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41,
  104. 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2,
  105. 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52,
  106. 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7,
  107. 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62,
  108. 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2,
  109. 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73,
  110. 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7,
  111. 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83,
  112. 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2,
  113. 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94,
  114. 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7,
  115. 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2,
  116. 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7,
  117. 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2,
  118. 113, 7, 113, 2, 114, 7, 114, 1, 0, 5, 0, 232, 8, 0, 10, 0, 12, 0, 235,
  119. 9, 0, 1, 0, 1, 0, 1, 1, 5, 1, 240, 8, 1, 10, 1, 12, 1, 243, 9, 1, 1, 1,
  120. 1, 1, 4, 1, 247, 8, 1, 11, 1, 12, 1, 248, 1, 1, 5, 1, 252, 8, 1, 10, 1,
  121. 12, 1, 255, 9, 1, 1, 1, 5, 1, 258, 8, 1, 10, 1, 12, 1, 261, 9, 1, 1, 2,
  122. 1, 2, 1, 2, 3, 2, 266, 8, 2, 3, 2, 268, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1,
  123. 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1,
  124. 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 294, 8, 2, 1, 3, 1,
  125. 3, 1, 3, 1, 3, 1, 3, 3, 3, 301, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3,
  126. 3, 308, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 314, 8, 3, 1, 3, 1, 3, 3, 3,
  127. 318, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 323, 8, 3, 1, 3, 3, 3, 326, 8, 3, 1,
  128. 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 333, 8, 4, 1, 4, 3, 4, 336, 8, 4, 1, 5,
  129. 1, 5, 3, 5, 340, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 3, 6, 348, 8,
  130. 6, 1, 6, 1, 6, 3, 6, 352, 8, 6, 3, 6, 354, 8, 6, 1, 7, 1, 7, 3, 7, 358,
  131. 8, 7, 1, 8, 1, 8, 3, 8, 362, 8, 8, 1, 8, 1, 8, 3, 8, 366, 8, 8, 1, 8, 3,
  132. 8, 369, 8, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 3, 10, 376, 8, 10, 1, 10,
  133. 1, 10, 1, 11, 1, 11, 3, 11, 382, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3,
  134. 11, 388, 8, 11, 1, 11, 1, 11, 1, 11, 3, 11, 393, 8, 11, 1, 11, 1, 11, 1,
  135. 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 402, 8, 11, 10, 11, 12, 11, 405,
  136. 9, 11, 1, 11, 1, 11, 1, 11, 3, 11, 410, 8, 11, 1, 12, 1, 12, 3, 12, 414,
  137. 8, 12, 1, 12, 1, 12, 3, 12, 418, 8, 12, 1, 12, 3, 12, 421, 8, 12, 1, 13,
  138. 1, 13, 1, 13, 3, 13, 426, 8, 13, 1, 14, 1, 14, 3, 14, 430, 8, 14, 1, 14,
  139. 1, 14, 1, 14, 1, 14, 3, 14, 436, 8, 14, 1, 14, 1, 14, 1, 14, 3, 14, 441,
  140. 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 448, 8, 14, 10, 14, 12,
  141. 14, 451, 9, 14, 1, 14, 1, 14, 5, 14, 455, 8, 14, 10, 14, 12, 14, 458, 9,
  142. 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 464, 8, 14, 10, 14, 12, 14, 467,
  143. 9, 14, 3, 14, 469, 8, 14, 1, 14, 1, 14, 3, 14, 473, 8, 14, 1, 15, 1, 15,
  144. 3, 15, 477, 8, 15, 1, 15, 5, 15, 480, 8, 15, 10, 15, 12, 15, 483, 9, 15,
  145. 1, 16, 4, 16, 486, 8, 16, 11, 16, 12, 16, 487, 1, 16, 1, 16, 1, 16, 1,
  146. 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 500, 8, 16, 1, 17,
  147. 1, 17, 3, 17, 504, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17, 509, 8, 17, 1, 17,
  148. 3, 17, 512, 8, 17, 1, 17, 3, 17, 515, 8, 17, 1, 17, 1, 17, 1, 17, 3, 17,
  149. 520, 8, 17, 1, 17, 3, 17, 523, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17,
  150. 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 537, 8, 17, 1,
  151. 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 544, 8, 17, 1, 17, 1, 17, 1, 17,
  152. 1, 17, 1, 17, 3, 17, 551, 8, 17, 3, 17, 553, 8, 17, 1, 18, 3, 18, 556,
  153. 8, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 562, 8, 19, 1, 19, 1, 19, 1,
  154. 19, 3, 19, 567, 8, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 573, 8, 19, 10,
  155. 19, 12, 19, 576, 9, 19, 1, 19, 1, 19, 3, 19, 580, 8, 19, 1, 19, 1, 19,
  156. 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 593,
  157. 8, 19, 10, 19, 12, 19, 596, 9, 19, 1, 19, 1, 19, 1, 19, 3, 19, 601, 8,
  158. 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 609, 8, 20, 10, 20,
  159. 12, 20, 612, 9, 20, 1, 20, 1, 20, 3, 20, 616, 8, 20, 1, 20, 1, 20, 1, 20,
  160. 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 626, 8, 20, 1, 20, 1, 20, 5,
  161. 20, 630, 8, 20, 10, 20, 12, 20, 633, 9, 20, 1, 20, 3, 20, 636, 8, 20, 1,
  162. 20, 1, 20, 1, 20, 3, 20, 641, 8, 20, 3, 20, 643, 8, 20, 1, 21, 1, 21, 1,
  163. 21, 1, 21, 1, 22, 1, 22, 3, 22, 651, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22,
  164. 3, 22, 657, 8, 22, 1, 22, 1, 22, 1, 22, 3, 22, 662, 8, 22, 1, 22, 1, 22,
  165. 1, 22, 1, 22, 1, 22, 3, 22, 669, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1,
  166. 22, 1, 22, 1, 22, 5, 22, 678, 8, 22, 10, 22, 12, 22, 681, 9, 22, 3, 22,
  167. 683, 8, 22, 3, 22, 685, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22,
  168. 692, 8, 22, 1, 22, 1, 22, 3, 22, 696, 8, 22, 1, 22, 1, 22, 1, 22, 1, 22,
  169. 1, 22, 3, 22, 703, 8, 22, 1, 22, 1, 22, 4, 22, 707, 8, 22, 11, 22, 12,
  170. 22, 708, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 715, 8, 23, 1, 23, 1, 23, 1,
  171. 23, 1, 23, 3, 23, 721, 8, 23, 1, 23, 1, 23, 1, 23, 3, 23, 726, 8, 23, 1,
  172. 23, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 733, 8, 23, 10, 23, 12, 23, 736,
  173. 9, 23, 1, 23, 1, 23, 3, 23, 740, 8, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1,
  174. 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 751, 8, 24, 1, 24, 1, 24, 1, 24,
  175. 3, 24, 756, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5,
  176. 24, 765, 8, 24, 10, 24, 12, 24, 768, 9, 24, 1, 24, 1, 24, 3, 24, 772, 8,
  177. 24, 1, 25, 1, 25, 3, 25, 776, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25,
  178. 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 790, 8, 25, 10,
  179. 25, 12, 25, 793, 9, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 800,
  180. 8, 26, 10, 26, 12, 26, 803, 9, 26, 1, 26, 1, 26, 3, 26, 807, 8, 26, 1,
  181. 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 815, 8, 27, 1, 27, 1, 27,
  182. 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 825, 8, 28, 10, 28, 12,
  183. 28, 828, 9, 28, 1, 28, 1, 28, 3, 28, 832, 8, 28, 1, 28, 1, 28, 1, 28, 1,
  184. 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 843, 8, 29, 1, 29, 3, 29,
  185. 846, 8, 29, 3, 29, 848, 8, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 854,
  186. 8, 29, 1, 29, 3, 29, 857, 8, 29, 3, 29, 859, 8, 29, 5, 29, 861, 8, 29,
  187. 10, 29, 12, 29, 864, 9, 29, 1, 30, 3, 30, 867, 8, 30, 1, 30, 1, 30, 1,
  188. 30, 1, 30, 1, 30, 3, 30, 874, 8, 30, 1, 30, 3, 30, 877, 8, 30, 1, 31, 3,
  189. 31, 880, 8, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 887, 8, 31, 1,
  190. 31, 3, 31, 890, 8, 31, 1, 31, 3, 31, 893, 8, 31, 1, 31, 3, 31, 896, 8,
  191. 31, 1, 32, 1, 32, 3, 32, 900, 8, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33,
  192. 1, 33, 3, 33, 908, 8, 33, 1, 33, 1, 33, 1, 33, 3, 33, 913, 8, 33, 1, 33,
  193. 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 924, 8,
  194. 34, 1, 34, 1, 34, 1, 34, 3, 34, 929, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34,
  195. 1, 34, 1, 34, 1, 34, 3, 34, 938, 8, 34, 1, 34, 1, 34, 1, 34, 5, 34, 943,
  196. 8, 34, 10, 34, 12, 34, 946, 9, 34, 1, 34, 3, 34, 949, 8, 34, 1, 34, 1,
  197. 34, 3, 34, 953, 8, 34, 1, 34, 3, 34, 956, 8, 34, 1, 34, 1, 34, 1, 34, 1,
  198. 34, 5, 34, 962, 8, 34, 10, 34, 12, 34, 965, 9, 34, 1, 34, 1, 34, 1, 34,
  199. 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 977, 8, 34, 1,
  200. 34, 3, 34, 980, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34,
  201. 988, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 4, 34, 995, 8, 34, 11, 34,
  202. 12, 34, 996, 1, 34, 1, 34, 3, 34, 1001, 8, 34, 1, 34, 1, 34, 1, 34, 3,
  203. 34, 1006, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34,
  204. 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1,
  205. 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1035,
  206. 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1042, 8, 34, 1, 34, 1,
  207. 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1053, 8, 34,
  208. 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1062, 8, 34, 1,
  209. 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 5, 34, 1070, 8, 34, 10, 34, 12,
  210. 34, 1073, 9, 34, 3, 34, 1075, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34,
  211. 1081, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1087, 8, 34, 1, 34, 1,
  212. 34, 1, 34, 1, 34, 1, 34, 5, 34, 1094, 8, 34, 10, 34, 12, 34, 1097, 9, 34,
  213. 3, 34, 1099, 8, 34, 1, 34, 1, 34, 3, 34, 1103, 8, 34, 1, 34, 1, 34, 1,
  214. 34, 1, 34, 1, 34, 3, 34, 1110, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34,
  215. 1116, 8, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 1123, 8, 34, 5,
  216. 34, 1125, 8, 34, 10, 34, 12, 34, 1128, 9, 34, 1, 35, 1, 35, 1, 35, 1, 35,
  217. 1, 35, 1, 35, 3, 35, 1136, 8, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 3,
  218. 37, 1143, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1150, 8, 37,
  219. 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 1156, 8, 37, 1, 37, 1, 37, 1, 37, 3,
  220. 37, 1161, 8, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1167, 8, 37, 10, 37,
  221. 12, 37, 1170, 9, 37, 1, 37, 1, 37, 3, 37, 1174, 8, 37, 1, 37, 1, 37, 1,
  222. 37, 1, 37, 1, 37, 5, 37, 1181, 8, 37, 10, 37, 12, 37, 1184, 9, 37, 1, 37,
  223. 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 1192, 8, 37, 10, 37, 12, 37,
  224. 1195, 9, 37, 1, 37, 1, 37, 5, 37, 1199, 8, 37, 10, 37, 12, 37, 1202, 9,
  225. 37, 1, 37, 3, 37, 1205, 8, 37, 1, 37, 3, 37, 1208, 8, 37, 1, 37, 3, 37,
  226. 1211, 8, 37, 1, 37, 1, 37, 3, 37, 1215, 8, 37, 1, 38, 1, 38, 1, 38, 1,
  227. 38, 1, 38, 1, 38, 5, 38, 1223, 8, 38, 10, 38, 12, 38, 1226, 9, 38, 1, 38,
  228. 1, 38, 1, 38, 3, 38, 1231, 8, 38, 3, 38, 1233, 8, 38, 1, 38, 1, 38, 1,
  229. 38, 1, 38, 1, 38, 1, 38, 3, 38, 1241, 8, 38, 1, 38, 1, 38, 1, 38, 1, 38,
  230. 1, 38, 3, 38, 1248, 8, 38, 1, 38, 1, 38, 1, 38, 5, 38, 1253, 8, 38, 10,
  231. 38, 12, 38, 1256, 9, 38, 1, 38, 1, 38, 3, 38, 1260, 8, 38, 3, 38, 1262,
  232. 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 1268, 8, 39, 1, 39, 1, 39, 1,
  233. 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 1277, 8, 39, 1, 40, 1, 40, 1, 40,
  234. 3, 40, 1282, 8, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 1289, 8,
  235. 41, 1, 41, 1, 41, 3, 41, 1293, 8, 41, 3, 41, 1295, 8, 41, 1, 42, 3, 42,
  236. 1298, 8, 42, 1, 42, 1, 42, 1, 42, 1, 42, 5, 42, 1304, 8, 42, 10, 42, 12,
  237. 42, 1307, 9, 42, 1, 42, 3, 42, 1310, 8, 42, 1, 42, 3, 42, 1313, 8, 42,
  238. 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 1320, 8, 43, 10, 43, 12, 43,
  239. 1323, 9, 43, 1, 44, 1, 44, 3, 44, 1327, 8, 44, 1, 44, 1, 44, 1, 44, 5,
  240. 44, 1332, 8, 44, 10, 44, 12, 44, 1335, 9, 44, 1, 44, 1, 44, 1, 44, 1, 44,
  241. 5, 44, 1341, 8, 44, 10, 44, 12, 44, 1344, 9, 44, 1, 44, 3, 44, 1347, 8,
  242. 44, 3, 44, 1349, 8, 44, 1, 44, 1, 44, 3, 44, 1353, 8, 44, 1, 44, 1, 44,
  243. 1, 44, 1, 44, 1, 44, 5, 44, 1360, 8, 44, 10, 44, 12, 44, 1363, 9, 44, 1,
  244. 44, 1, 44, 3, 44, 1367, 8, 44, 3, 44, 1369, 8, 44, 1, 44, 1, 44, 1, 44,
  245. 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 5, 44, 1380, 8, 44, 10, 44, 12,
  246. 44, 1383, 9, 44, 3, 44, 1385, 8, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44,
  247. 5, 44, 1392, 8, 44, 10, 44, 12, 44, 1395, 9, 44, 1, 44, 1, 44, 1, 44, 1,
  248. 44, 1, 44, 1, 44, 5, 44, 1403, 8, 44, 10, 44, 12, 44, 1406, 9, 44, 1, 44,
  249. 1, 44, 5, 44, 1410, 8, 44, 10, 44, 12, 44, 1413, 9, 44, 3, 44, 1415, 8,
  250. 44, 1, 45, 1, 45, 1, 46, 3, 46, 1420, 8, 46, 1, 46, 1, 46, 3, 46, 1424,
  251. 8, 46, 1, 46, 3, 46, 1427, 8, 46, 1, 47, 3, 47, 1430, 8, 47, 1, 47, 1,
  252. 47, 1, 47, 3, 47, 1435, 8, 47, 1, 47, 1, 47, 3, 47, 1439, 8, 47, 1, 47,
  253. 4, 47, 1442, 8, 47, 11, 47, 12, 47, 1443, 1, 47, 3, 47, 1447, 8, 47, 1,
  254. 47, 3, 47, 1450, 8, 47, 1, 48, 1, 48, 1, 48, 3, 48, 1455, 8, 48, 1, 48,
  255. 1, 48, 3, 48, 1459, 8, 48, 1, 48, 3, 48, 1462, 8, 48, 1, 48, 1, 48, 1,
  256. 48, 1, 48, 1, 48, 3, 48, 1469, 8, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1474,
  257. 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1481, 8, 48, 10, 48, 12,
  258. 48, 1484, 9, 48, 1, 48, 1, 48, 3, 48, 1488, 8, 48, 1, 48, 3, 48, 1491,
  259. 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5, 48, 1497, 8, 48, 10, 48, 12, 48,
  260. 1500, 9, 48, 1, 48, 3, 48, 1503, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1,
  261. 48, 1, 48, 3, 48, 1511, 8, 48, 1, 48, 3, 48, 1514, 8, 48, 1, 48, 1, 48,
  262. 1, 48, 3, 48, 1519, 8, 48, 1, 48, 1, 48, 3, 48, 1523, 8, 48, 1, 48, 3,
  263. 48, 1526, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1533, 8, 48,
  264. 1, 48, 1, 48, 1, 48, 3, 48, 1538, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1,
  265. 48, 5, 48, 1545, 8, 48, 10, 48, 12, 48, 1548, 9, 48, 1, 48, 1, 48, 3, 48,
  266. 1552, 8, 48, 1, 48, 3, 48, 1555, 8, 48, 1, 48, 1, 48, 1, 48, 1, 48, 5,
  267. 48, 1561, 8, 48, 10, 48, 12, 48, 1564, 9, 48, 1, 48, 3, 48, 1567, 8, 48,
  268. 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 1575, 8, 48, 1, 48, 3,
  269. 48, 1578, 8, 48, 3, 48, 1580, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49,
  270. 1, 49, 1, 49, 3, 49, 1589, 8, 49, 1, 49, 3, 49, 1592, 8, 49, 3, 49, 1594,
  271. 8, 49, 1, 50, 1, 50, 3, 50, 1598, 8, 50, 1, 50, 1, 50, 3, 50, 1602, 8,
  272. 50, 1, 50, 3, 50, 1605, 8, 50, 1, 50, 1, 50, 1, 50, 3, 50, 1610, 8, 50,
  273. 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 5, 51, 1619, 8, 51, 10,
  274. 51, 12, 51, 1622, 9, 51, 1, 51, 1, 51, 3, 51, 1626, 8, 51, 1, 52, 1, 52,
  275. 3, 52, 1630, 8, 52, 1, 52, 1, 52, 3, 52, 1634, 8, 52, 1, 53, 3, 53, 1637,
  276. 8, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1642, 8, 53, 1, 53, 1, 53, 1, 53, 1,
  277. 53, 3, 53, 1648, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 1655,
  278. 8, 53, 1, 53, 1, 53, 1, 53, 5, 53, 1660, 8, 53, 10, 53, 12, 53, 1663, 9,
  279. 53, 1, 53, 1, 53, 3, 53, 1667, 8, 53, 1, 53, 3, 53, 1670, 8, 53, 1, 54,
  280. 1, 54, 1, 54, 1, 54, 5, 54, 1676, 8, 54, 10, 54, 12, 54, 1679, 9, 54, 1,
  281. 54, 1, 54, 1, 55, 3, 55, 1684, 8, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1689,
  282. 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 1695, 8, 55, 1, 55, 1, 55, 1,
  283. 55, 1, 55, 1, 55, 3, 55, 1702, 8, 55, 1, 55, 1, 55, 1, 55, 5, 55, 1707,
  284. 8, 55, 10, 55, 12, 55, 1710, 9, 55, 1, 55, 1, 55, 3, 55, 1714, 8, 55, 1,
  285. 55, 3, 55, 1717, 8, 55, 1, 55, 3, 55, 1720, 8, 55, 1, 56, 1, 56, 1, 56,
  286. 3, 56, 1725, 8, 56, 1, 56, 1, 56, 1, 56, 3, 56, 1730, 8, 56, 1, 56, 1,
  287. 56, 1, 56, 1, 56, 1, 56, 3, 56, 1737, 8, 56, 1, 57, 1, 57, 3, 57, 1741,
  288. 8, 57, 1, 57, 1, 57, 3, 57, 1745, 8, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1,
  289. 58, 1, 58, 1, 59, 1, 59, 3, 59, 1755, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59,
  290. 1, 59, 5, 59, 1762, 8, 59, 10, 59, 12, 59, 1765, 9, 59, 3, 59, 1767, 8,
  291. 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1774, 8, 59, 10, 59, 12,
  292. 59, 1777, 9, 59, 1, 59, 3, 59, 1780, 8, 59, 1, 59, 1, 59, 1, 60, 1, 60,
  293. 1, 60, 1, 60, 3, 60, 1788, 8, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5,
  294. 60, 1795, 8, 60, 10, 60, 12, 60, 1798, 9, 60, 3, 60, 1800, 8, 60, 1, 60,
  295. 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 1807, 8, 60, 10, 60, 12, 60, 1810, 9,
  296. 60, 3, 60, 1812, 8, 60, 1, 60, 3, 60, 1815, 8, 60, 1, 60, 3, 60, 1818,
  297. 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 3, 61, 1828,
  298. 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1837, 8,
  299. 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 5, 63, 1844, 8, 63, 10, 63, 12,
  300. 63, 1847, 9, 63, 1, 63, 3, 63, 1850, 8, 63, 1, 63, 1, 63, 1, 64, 1, 64,
  301. 1, 64, 3, 64, 1857, 8, 64, 1, 64, 1, 64, 1, 64, 5, 64, 1862, 8, 64, 10,
  302. 64, 12, 64, 1865, 9, 64, 1, 64, 3, 64, 1868, 8, 64, 1, 64, 1, 64, 3, 64,
  303. 1872, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 5, 65, 1879, 8, 65, 10,
  304. 65, 12, 65, 1882, 9, 65, 1, 65, 3, 65, 1885, 8, 65, 1, 65, 1, 65, 3, 65,
  305. 1889, 8, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1894, 8, 65, 1, 66, 1, 66, 3,
  306. 66, 1898, 8, 66, 1, 66, 1, 66, 1, 66, 5, 66, 1903, 8, 66, 10, 66, 12, 66,
  307. 1906, 9, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 5, 67, 1913, 8, 67, 10,
  308. 67, 12, 67, 1916, 9, 67, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 1922, 8, 68,
  309. 1, 69, 1, 69, 1, 69, 3, 69, 1927, 8, 69, 1, 69, 3, 69, 1930, 8, 69, 1,
  310. 69, 1, 69, 3, 69, 1934, 8, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71,
  311. 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 1948, 8, 71, 1, 72, 1,
  312. 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 1960,
  313. 8, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 3, 73, 1969, 8,
  314. 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1978, 8, 74,
  315. 1, 74, 1, 74, 3, 74, 1982, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1,
  316. 74, 1, 74, 1, 74, 3, 74, 1992, 8, 74, 1, 74, 3, 74, 1995, 8, 74, 1, 74,
  317. 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2004, 8, 74, 1, 74, 1,
  318. 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2013, 8, 74, 1, 74, 3, 74,
  319. 2016, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2022, 8, 74, 1, 74, 1,
  320. 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74,
  321. 3, 74, 2036, 8, 74, 1, 74, 1, 74, 3, 74, 2040, 8, 74, 1, 74, 1, 74, 1,
  322. 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 2051, 8, 74, 1, 74,
  323. 1, 74, 1, 74, 3, 74, 2056, 8, 74, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1,
  324. 76, 1, 77, 1, 77, 1, 77, 4, 77, 2067, 8, 77, 11, 77, 12, 77, 2068, 1, 78,
  325. 1, 78, 1, 78, 4, 78, 2074, 8, 78, 11, 78, 12, 78, 2075, 1, 79, 1, 79, 1,
  326. 79, 1, 79, 1, 80, 1, 80, 3, 80, 2084, 8, 80, 1, 80, 1, 80, 1, 80, 3, 80,
  327. 2089, 8, 80, 5, 80, 2091, 8, 80, 10, 80, 12, 80, 2094, 9, 80, 1, 81, 1,
  328. 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, 85, 3, 85, 2106,
  329. 8, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, 1, 89, 1, 90, 1,
  330. 90, 1, 90, 3, 90, 2119, 8, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 92, 1, 92,
  331. 1, 93, 1, 93, 1, 94, 1, 94, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 1, 97, 1,
  332. 98, 1, 98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 101, 1, 101, 1, 102, 1, 102,
  333. 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, 1, 106, 1, 107,
  334. 1, 107, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111,
  335. 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 114, 1, 114, 1, 114,
  336. 1, 114, 1, 114, 3, 114, 2176, 8, 114, 1, 114, 2, 449, 487, 1, 68, 115,
  337. 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36,
  338. 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72,
  339. 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106,
  340. 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136,
  341. 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166,
  342. 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196,
  343. 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226,
  344. 228, 0, 30, 3, 0, 60, 60, 71, 71, 84, 84, 2, 0, 49, 49, 68, 68, 1, 0, 136,
  345. 137, 2, 0, 149, 149, 174, 174, 2, 0, 8, 8, 11, 11, 2, 0, 61, 61, 144, 144,
  346. 2, 0, 58, 58, 106, 106, 2, 0, 60, 60, 84, 84, 5, 0, 27, 27, 74, 74, 83,
  347. 83, 124, 124, 128, 128, 4, 0, 86, 86, 135, 135, 141, 141, 148, 148, 1,
  348. 0, 9, 10, 2, 0, 7, 7, 14, 15, 1, 0, 16, 19, 1, 0, 20, 23, 4, 0, 79, 79,
  349. 99, 99, 101, 101, 120, 120, 3, 0, 27, 27, 74, 74, 128, 128, 5, 0, 54, 56,
  350. 106, 106, 175, 176, 189, 189, 192, 193, 2, 0, 31, 31, 64, 64, 3, 0, 78,
  351. 78, 98, 98, 127, 127, 3, 0, 130, 130, 157, 157, 182, 182, 2, 0, 5, 5, 108,
  352. 108, 1, 0, 179, 180, 2, 0, 36, 36, 62, 62, 2, 0, 154, 154, 165, 165, 2,
  353. 0, 162, 162, 169, 169, 2, 0, 163, 163, 170, 171, 2, 0, 164, 164, 166, 166,
  354. 3, 0, 8, 8, 11, 12, 104, 104, 2, 0, 188, 188, 192, 192, 1, 0, 27, 183,
  355. 2484, 0, 233, 1, 0, 0, 0, 2, 241, 1, 0, 0, 0, 4, 267, 1, 0, 0, 0, 6, 295,
  356. 1, 0, 0, 0, 8, 327, 1, 0, 0, 0, 10, 337, 1, 0, 0, 0, 12, 345, 1, 0, 0,
  357. 0, 14, 355, 1, 0, 0, 0, 16, 359, 1, 0, 0, 0, 18, 370, 1, 0, 0, 0, 20, 373,
  358. 1, 0, 0, 0, 22, 379, 1, 0, 0, 0, 24, 413, 1, 0, 0, 0, 26, 425, 1, 0, 0,
  359. 0, 28, 427, 1, 0, 0, 0, 30, 474, 1, 0, 0, 0, 32, 485, 1, 0, 0, 0, 34, 503,
  360. 1, 0, 0, 0, 36, 555, 1, 0, 0, 0, 38, 561, 1, 0, 0, 0, 40, 602, 1, 0, 0,
  361. 0, 42, 644, 1, 0, 0, 0, 44, 648, 1, 0, 0, 0, 46, 712, 1, 0, 0, 0, 48, 744,
  362. 1, 0, 0, 0, 50, 773, 1, 0, 0, 0, 52, 794, 1, 0, 0, 0, 54, 808, 1, 0, 0,
  363. 0, 56, 819, 1, 0, 0, 0, 58, 838, 1, 0, 0, 0, 60, 866, 1, 0, 0, 0, 62, 879,
  364. 1, 0, 0, 0, 64, 897, 1, 0, 0, 0, 66, 903, 1, 0, 0, 0, 68, 1005, 1, 0, 0,
  365. 0, 70, 1129, 1, 0, 0, 0, 72, 1139, 1, 0, 0, 0, 74, 1214, 1, 0, 0, 0, 76,
  366. 1216, 1, 0, 0, 0, 78, 1263, 1, 0, 0, 0, 80, 1281, 1, 0, 0, 0, 82, 1283,
  367. 1, 0, 0, 0, 84, 1297, 1, 0, 0, 0, 86, 1314, 1, 0, 0, 0, 88, 1414, 1, 0,
  368. 0, 0, 90, 1416, 1, 0, 0, 0, 92, 1419, 1, 0, 0, 0, 94, 1429, 1, 0, 0, 0,
  369. 96, 1579, 1, 0, 0, 0, 98, 1593, 1, 0, 0, 0, 100, 1609, 1, 0, 0, 0, 102,
  370. 1625, 1, 0, 0, 0, 104, 1633, 1, 0, 0, 0, 106, 1636, 1, 0, 0, 0, 108, 1671,
  371. 1, 0, 0, 0, 110, 1683, 1, 0, 0, 0, 112, 1724, 1, 0, 0, 0, 114, 1738, 1,
  372. 0, 0, 0, 116, 1746, 1, 0, 0, 0, 118, 1752, 1, 0, 0, 0, 120, 1783, 1, 0,
  373. 0, 0, 122, 1819, 1, 0, 0, 0, 124, 1829, 1, 0, 0, 0, 126, 1838, 1, 0, 0,
  374. 0, 128, 1853, 1, 0, 0, 0, 130, 1873, 1, 0, 0, 0, 132, 1895, 1, 0, 0, 0,
  375. 134, 1907, 1, 0, 0, 0, 136, 1917, 1, 0, 0, 0, 138, 1923, 1, 0, 0, 0, 140,
  376. 1935, 1, 0, 0, 0, 142, 1947, 1, 0, 0, 0, 144, 1959, 1, 0, 0, 0, 146, 1968,
  377. 1, 0, 0, 0, 148, 2055, 1, 0, 0, 0, 150, 2057, 1, 0, 0, 0, 152, 2060, 1,
  378. 0, 0, 0, 154, 2063, 1, 0, 0, 0, 156, 2070, 1, 0, 0, 0, 158, 2077, 1, 0,
  379. 0, 0, 160, 2081, 1, 0, 0, 0, 162, 2095, 1, 0, 0, 0, 164, 2097, 1, 0, 0,
  380. 0, 166, 2099, 1, 0, 0, 0, 168, 2101, 1, 0, 0, 0, 170, 2105, 1, 0, 0, 0,
  381. 172, 2107, 1, 0, 0, 0, 174, 2109, 1, 0, 0, 0, 176, 2111, 1, 0, 0, 0, 178,
  382. 2113, 1, 0, 0, 0, 180, 2118, 1, 0, 0, 0, 182, 2122, 1, 0, 0, 0, 184, 2124,
  383. 1, 0, 0, 0, 186, 2126, 1, 0, 0, 0, 188, 2128, 1, 0, 0, 0, 190, 2130, 1,
  384. 0, 0, 0, 192, 2132, 1, 0, 0, 0, 194, 2134, 1, 0, 0, 0, 196, 2136, 1, 0,
  385. 0, 0, 198, 2138, 1, 0, 0, 0, 200, 2140, 1, 0, 0, 0, 202, 2142, 1, 0, 0,
  386. 0, 204, 2144, 1, 0, 0, 0, 206, 2146, 1, 0, 0, 0, 208, 2148, 1, 0, 0, 0,
  387. 210, 2150, 1, 0, 0, 0, 212, 2152, 1, 0, 0, 0, 214, 2154, 1, 0, 0, 0, 216,
  388. 2156, 1, 0, 0, 0, 218, 2158, 1, 0, 0, 0, 220, 2160, 1, 0, 0, 0, 222, 2162,
  389. 1, 0, 0, 0, 224, 2164, 1, 0, 0, 0, 226, 2166, 1, 0, 0, 0, 228, 2175, 1,
  390. 0, 0, 0, 230, 232, 3, 2, 1, 0, 231, 230, 1, 0, 0, 0, 232, 235, 1, 0, 0,
  391. 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 236, 1, 0, 0, 0, 235,
  392. 233, 1, 0, 0, 0, 236, 237, 5, 0, 0, 1, 237, 1, 1, 0, 0, 0, 238, 240, 5,
  393. 1, 0, 0, 239, 238, 1, 0, 0, 0, 240, 243, 1, 0, 0, 0, 241, 239, 1, 0, 0,
  394. 0, 241, 242, 1, 0, 0, 0, 242, 244, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 244,
  395. 253, 3, 4, 2, 0, 245, 247, 5, 1, 0, 0, 246, 245, 1, 0, 0, 0, 247, 248,
  396. 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 250, 1, 0,
  397. 0, 0, 250, 252, 3, 4, 2, 0, 251, 246, 1, 0, 0, 0, 252, 255, 1, 0, 0, 0,
  398. 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 259, 1, 0, 0, 0, 255,
  399. 253, 1, 0, 0, 0, 256, 258, 5, 1, 0, 0, 257, 256, 1, 0, 0, 0, 258, 261,
  400. 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 3, 1, 0, 0,
  401. 0, 261, 259, 1, 0, 0, 0, 262, 265, 5, 73, 0, 0, 263, 264, 5, 116, 0, 0,
  402. 264, 266, 5, 113, 0, 0, 265, 263, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266,
  403. 268, 1, 0, 0, 0, 267, 262, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 293,
  404. 1, 0, 0, 0, 269, 294, 3, 6, 3, 0, 270, 294, 3, 8, 4, 0, 271, 294, 3, 10,
  405. 5, 0, 272, 294, 3, 12, 6, 0, 273, 294, 3, 14, 7, 0, 274, 294, 3, 22, 11,
  406. 0, 275, 294, 3, 28, 14, 0, 276, 294, 3, 44, 22, 0, 277, 294, 3, 46, 23,
  407. 0, 278, 294, 3, 48, 24, 0, 279, 294, 3, 60, 30, 0, 280, 294, 3, 62, 31,
  408. 0, 281, 294, 3, 64, 32, 0, 282, 294, 3, 66, 33, 0, 283, 294, 3, 74, 37,
  409. 0, 284, 294, 3, 78, 39, 0, 285, 294, 3, 82, 41, 0, 286, 294, 3, 20, 10,
  410. 0, 287, 294, 3, 16, 8, 0, 288, 294, 3, 18, 9, 0, 289, 294, 3, 84, 42, 0,
  411. 290, 294, 3, 106, 53, 0, 291, 294, 3, 110, 55, 0, 292, 294, 3, 114, 57,
  412. 0, 293, 269, 1, 0, 0, 0, 293, 270, 1, 0, 0, 0, 293, 271, 1, 0, 0, 0, 293,
  413. 272, 1, 0, 0, 0, 293, 273, 1, 0, 0, 0, 293, 274, 1, 0, 0, 0, 293, 275,
  414. 1, 0, 0, 0, 293, 276, 1, 0, 0, 0, 293, 277, 1, 0, 0, 0, 293, 278, 1, 0,
  415. 0, 0, 293, 279, 1, 0, 0, 0, 293, 280, 1, 0, 0, 0, 293, 281, 1, 0, 0, 0,
  416. 293, 282, 1, 0, 0, 0, 293, 283, 1, 0, 0, 0, 293, 284, 1, 0, 0, 0, 293,
  417. 285, 1, 0, 0, 0, 293, 286, 1, 0, 0, 0, 293, 287, 1, 0, 0, 0, 293, 288,
  418. 1, 0, 0, 0, 293, 289, 1, 0, 0, 0, 293, 290, 1, 0, 0, 0, 293, 291, 1, 0,
  419. 0, 0, 293, 292, 1, 0, 0, 0, 294, 5, 1, 0, 0, 0, 295, 296, 5, 32, 0, 0,
  420. 296, 300, 5, 135, 0, 0, 297, 298, 3, 182, 91, 0, 298, 299, 5, 2, 0, 0,
  421. 299, 301, 1, 0, 0, 0, 300, 297, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301,
  422. 302, 1, 0, 0, 0, 302, 325, 3, 184, 92, 0, 303, 313, 5, 123, 0, 0, 304,
  423. 305, 5, 139, 0, 0, 305, 314, 3, 188, 94, 0, 306, 308, 5, 48, 0, 0, 307,
  424. 306, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310,
  425. 3, 190, 95, 0, 310, 311, 5, 139, 0, 0, 311, 312, 3, 190, 95, 0, 312, 314,
  426. 1, 0, 0, 0, 313, 304, 1, 0, 0, 0, 313, 307, 1, 0, 0, 0, 314, 326, 1, 0,
  427. 0, 0, 315, 317, 5, 29, 0, 0, 316, 318, 5, 48, 0, 0, 317, 316, 1, 0, 0,
  428. 0, 317, 318, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 326, 3, 30, 15, 0,
  429. 320, 322, 5, 65, 0, 0, 321, 323, 5, 48, 0, 0, 322, 321, 1, 0, 0, 0, 322,
  430. 323, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 326, 3, 190, 95, 0, 325, 303,
  431. 1, 0, 0, 0, 325, 315, 1, 0, 0, 0, 325, 320, 1, 0, 0, 0, 326, 7, 1, 0, 0,
  432. 0, 327, 335, 5, 33, 0, 0, 328, 336, 3, 182, 91, 0, 329, 330, 3, 182, 91,
  433. 0, 330, 331, 5, 2, 0, 0, 331, 333, 1, 0, 0, 0, 332, 329, 1, 0, 0, 0, 332,
  434. 333, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 336, 3, 186, 93, 0, 335, 328,
  435. 1, 0, 0, 0, 335, 332, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 9, 1, 0, 0,
  436. 0, 337, 339, 5, 37, 0, 0, 338, 340, 5, 57, 0, 0, 339, 338, 1, 0, 0, 0,
  437. 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 342, 3, 68, 34, 0, 342,
  438. 343, 5, 35, 0, 0, 343, 344, 3, 182, 91, 0, 344, 11, 1, 0, 0, 0, 345, 347,
  439. 5, 40, 0, 0, 346, 348, 7, 0, 0, 0, 347, 346, 1, 0, 0, 0, 347, 348, 1, 0,
  440. 0, 0, 348, 353, 1, 0, 0, 0, 349, 351, 5, 140, 0, 0, 350, 352, 3, 212, 106,
  441. 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 354, 1, 0, 0, 0, 353,
  442. 349, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 13, 1, 0, 0, 0, 355, 357, 7,
  443. 1, 0, 0, 356, 358, 5, 140, 0, 0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0,
  444. 0, 0, 358, 15, 1, 0, 0, 0, 359, 361, 5, 128, 0, 0, 360, 362, 5, 140, 0,
  445. 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 368, 1, 0, 0, 0, 363,
  446. 365, 5, 139, 0, 0, 364, 366, 5, 131, 0, 0, 365, 364, 1, 0, 0, 0, 365, 366,
  447. 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 369, 3, 206, 103, 0, 368, 363, 1,
  448. 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 17, 1, 0, 0, 0, 370, 371, 5, 131, 0,
  449. 0, 371, 372, 3, 206, 103, 0, 372, 19, 1, 0, 0, 0, 373, 375, 5, 122, 0,
  450. 0, 374, 376, 5, 131, 0, 0, 375, 374, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0,
  451. 376, 377, 1, 0, 0, 0, 377, 378, 3, 206, 103, 0, 378, 21, 1, 0, 0, 0, 379,
  452. 381, 5, 52, 0, 0, 380, 382, 5, 143, 0, 0, 381, 380, 1, 0, 0, 0, 381, 382,
  453. 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 387, 5, 86, 0, 0, 384, 385, 5, 82,
  454. 0, 0, 385, 386, 5, 104, 0, 0, 386, 388, 5, 72, 0, 0, 387, 384, 1, 0, 0,
  455. 0, 387, 388, 1, 0, 0, 0, 388, 392, 1, 0, 0, 0, 389, 390, 3, 182, 91, 0,
  456. 390, 391, 5, 2, 0, 0, 391, 393, 1, 0, 0, 0, 392, 389, 1, 0, 0, 0, 392,
  457. 393, 1, 0, 0, 0, 393, 394, 1, 0, 0, 0, 394, 395, 3, 196, 98, 0, 395, 396,
  458. 5, 109, 0, 0, 396, 397, 3, 184, 92, 0, 397, 398, 5, 3, 0, 0, 398, 403,
  459. 3, 24, 12, 0, 399, 400, 5, 5, 0, 0, 400, 402, 3, 24, 12, 0, 401, 399, 1,
  460. 0, 0, 0, 402, 405, 1, 0, 0, 0, 403, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0,
  461. 0, 404, 406, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 409, 5, 4, 0, 0, 407,
  462. 408, 5, 151, 0, 0, 408, 410, 3, 68, 34, 0, 409, 407, 1, 0, 0, 0, 409, 410,
  463. 1, 0, 0, 0, 410, 23, 1, 0, 0, 0, 411, 414, 3, 190, 95, 0, 412, 414, 3,
  464. 68, 34, 0, 413, 411, 1, 0, 0, 0, 413, 412, 1, 0, 0, 0, 414, 417, 1, 0,
  465. 0, 0, 415, 416, 5, 47, 0, 0, 416, 418, 3, 192, 96, 0, 417, 415, 1, 0, 0,
  466. 0, 417, 418, 1, 0, 0, 0, 418, 420, 1, 0, 0, 0, 419, 421, 3, 140, 70, 0,
  467. 420, 419, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 25, 1, 0, 0, 0, 422, 423,
  468. 5, 153, 0, 0, 423, 426, 5, 188, 0, 0, 424, 426, 5, 134, 0, 0, 425, 422,
  469. 1, 0, 0, 0, 425, 424, 1, 0, 0, 0, 426, 27, 1, 0, 0, 0, 427, 429, 5, 52,
  470. 0, 0, 428, 430, 7, 2, 0, 0, 429, 428, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0,
  471. 430, 431, 1, 0, 0, 0, 431, 435, 5, 135, 0, 0, 432, 433, 5, 82, 0, 0, 433,
  472. 434, 5, 104, 0, 0, 434, 436, 5, 72, 0, 0, 435, 432, 1, 0, 0, 0, 435, 436,
  473. 1, 0, 0, 0, 436, 440, 1, 0, 0, 0, 437, 438, 3, 182, 91, 0, 438, 439, 5,
  474. 2, 0, 0, 439, 441, 1, 0, 0, 0, 440, 437, 1, 0, 0, 0, 440, 441, 1, 0, 0,
  475. 0, 441, 442, 1, 0, 0, 0, 442, 472, 3, 184, 92, 0, 443, 444, 5, 3, 0, 0,
  476. 444, 449, 3, 30, 15, 0, 445, 446, 5, 5, 0, 0, 446, 448, 3, 30, 15, 0, 447,
  477. 445, 1, 0, 0, 0, 448, 451, 1, 0, 0, 0, 449, 450, 1, 0, 0, 0, 449, 447,
  478. 1, 0, 0, 0, 450, 456, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 452, 453, 5, 5,
  479. 0, 0, 453, 455, 3, 38, 19, 0, 454, 452, 1, 0, 0, 0, 455, 458, 1, 0, 0,
  480. 0, 456, 454, 1, 0, 0, 0, 456, 457, 1, 0, 0, 0, 457, 459, 1, 0, 0, 0, 458,
  481. 456, 1, 0, 0, 0, 459, 468, 5, 4, 0, 0, 460, 465, 3, 26, 13, 0, 461, 462,
  482. 5, 5, 0, 0, 462, 464, 3, 26, 13, 0, 463, 461, 1, 0, 0, 0, 464, 467, 1,
  483. 0, 0, 0, 465, 463, 1, 0, 0, 0, 465, 466, 1, 0, 0, 0, 466, 469, 1, 0, 0,
  484. 0, 467, 465, 1, 0, 0, 0, 468, 460, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469,
  485. 473, 1, 0, 0, 0, 470, 471, 5, 35, 0, 0, 471, 473, 3, 84, 42, 0, 472, 443,
  486. 1, 0, 0, 0, 472, 470, 1, 0, 0, 0, 473, 29, 1, 0, 0, 0, 474, 476, 3, 190,
  487. 95, 0, 475, 477, 3, 32, 16, 0, 476, 475, 1, 0, 0, 0, 476, 477, 1, 0, 0,
  488. 0, 477, 481, 1, 0, 0, 0, 478, 480, 3, 34, 17, 0, 479, 478, 1, 0, 0, 0,
  489. 480, 483, 1, 0, 0, 0, 481, 479, 1, 0, 0, 0, 481, 482, 1, 0, 0, 0, 482,
  490. 31, 1, 0, 0, 0, 483, 481, 1, 0, 0, 0, 484, 486, 3, 176, 88, 0, 485, 484,
  491. 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 488, 1, 0, 0, 0, 487, 485, 1, 0,
  492. 0, 0, 488, 499, 1, 0, 0, 0, 489, 490, 5, 3, 0, 0, 490, 491, 3, 36, 18,
  493. 0, 491, 492, 5, 4, 0, 0, 492, 500, 1, 0, 0, 0, 493, 494, 5, 3, 0, 0, 494,
  494. 495, 3, 36, 18, 0, 495, 496, 5, 5, 0, 0, 496, 497, 3, 36, 18, 0, 497, 498,
  495. 5, 4, 0, 0, 498, 500, 1, 0, 0, 0, 499, 489, 1, 0, 0, 0, 499, 493, 1, 0,
  496. 0, 0, 499, 500, 1, 0, 0, 0, 500, 33, 1, 0, 0, 0, 501, 502, 5, 51, 0, 0,
  497. 502, 504, 3, 176, 88, 0, 503, 501, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504,
  498. 552, 1, 0, 0, 0, 505, 506, 5, 115, 0, 0, 506, 508, 5, 97, 0, 0, 507, 509,
  499. 3, 140, 70, 0, 508, 507, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 511, 1,
  500. 0, 0, 0, 510, 512, 3, 42, 21, 0, 511, 510, 1, 0, 0, 0, 511, 512, 1, 0,
  501. 0, 0, 512, 514, 1, 0, 0, 0, 513, 515, 5, 38, 0, 0, 514, 513, 1, 0, 0, 0,
  502. 514, 515, 1, 0, 0, 0, 515, 553, 1, 0, 0, 0, 516, 517, 5, 104, 0, 0, 517,
  503. 520, 5, 106, 0, 0, 518, 520, 5, 143, 0, 0, 519, 516, 1, 0, 0, 0, 519, 518,
  504. 1, 0, 0, 0, 520, 522, 1, 0, 0, 0, 521, 523, 3, 42, 21, 0, 522, 521, 1,
  505. 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 553, 1, 0, 0, 0, 524, 525, 5, 46, 0,
  506. 0, 525, 526, 5, 3, 0, 0, 526, 527, 3, 68, 34, 0, 527, 528, 5, 4, 0, 0,
  507. 528, 553, 1, 0, 0, 0, 529, 536, 5, 58, 0, 0, 530, 537, 3, 36, 18, 0, 531,
  508. 537, 3, 72, 36, 0, 532, 533, 5, 3, 0, 0, 533, 534, 3, 68, 34, 0, 534, 535,
  509. 5, 4, 0, 0, 535, 537, 1, 0, 0, 0, 536, 530, 1, 0, 0, 0, 536, 531, 1, 0,
  510. 0, 0, 536, 532, 1, 0, 0, 0, 537, 553, 1, 0, 0, 0, 538, 539, 5, 47, 0, 0,
  511. 539, 553, 3, 192, 96, 0, 540, 553, 3, 40, 20, 0, 541, 542, 5, 172, 0, 0,
  512. 542, 544, 5, 173, 0, 0, 543, 541, 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544,
  513. 545, 1, 0, 0, 0, 545, 546, 5, 35, 0, 0, 546, 547, 5, 3, 0, 0, 547, 548,
  514. 3, 68, 34, 0, 548, 550, 5, 4, 0, 0, 549, 551, 7, 3, 0, 0, 550, 549, 1,
  515. 0, 0, 0, 550, 551, 1, 0, 0, 0, 551, 553, 1, 0, 0, 0, 552, 505, 1, 0, 0,
  516. 0, 552, 519, 1, 0, 0, 0, 552, 524, 1, 0, 0, 0, 552, 529, 1, 0, 0, 0, 552,
  517. 538, 1, 0, 0, 0, 552, 540, 1, 0, 0, 0, 552, 543, 1, 0, 0, 0, 553, 35, 1,
  518. 0, 0, 0, 554, 556, 7, 4, 0, 0, 555, 554, 1, 0, 0, 0, 555, 556, 1, 0, 0,
  519. 0, 556, 557, 1, 0, 0, 0, 557, 558, 5, 189, 0, 0, 558, 37, 1, 0, 0, 0, 559,
  520. 560, 5, 51, 0, 0, 560, 562, 3, 176, 88, 0, 561, 559, 1, 0, 0, 0, 561, 562,
  521. 1, 0, 0, 0, 562, 600, 1, 0, 0, 0, 563, 564, 5, 115, 0, 0, 564, 567, 5,
  522. 97, 0, 0, 565, 567, 5, 143, 0, 0, 566, 563, 1, 0, 0, 0, 566, 565, 1, 0,
  523. 0, 0, 567, 568, 1, 0, 0, 0, 568, 569, 5, 3, 0, 0, 569, 574, 3, 24, 12,
  524. 0, 570, 571, 5, 5, 0, 0, 571, 573, 3, 24, 12, 0, 572, 570, 1, 0, 0, 0,
  525. 573, 576, 1, 0, 0, 0, 574, 572, 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575,
  526. 577, 1, 0, 0, 0, 576, 574, 1, 0, 0, 0, 577, 579, 5, 4, 0, 0, 578, 580,
  527. 3, 42, 21, 0, 579, 578, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580, 601, 1,
  528. 0, 0, 0, 581, 582, 5, 46, 0, 0, 582, 583, 5, 3, 0, 0, 583, 584, 3, 68,
  529. 34, 0, 584, 585, 5, 4, 0, 0, 585, 601, 1, 0, 0, 0, 586, 587, 5, 76, 0,
  530. 0, 587, 588, 5, 97, 0, 0, 588, 589, 5, 3, 0, 0, 589, 594, 3, 190, 95, 0,
  531. 590, 591, 5, 5, 0, 0, 591, 593, 3, 190, 95, 0, 592, 590, 1, 0, 0, 0, 593,
  532. 596, 1, 0, 0, 0, 594, 592, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 597,
  533. 1, 0, 0, 0, 596, 594, 1, 0, 0, 0, 597, 598, 5, 4, 0, 0, 598, 599, 3, 40,
  534. 20, 0, 599, 601, 1, 0, 0, 0, 600, 566, 1, 0, 0, 0, 600, 581, 1, 0, 0, 0,
  535. 600, 586, 1, 0, 0, 0, 601, 39, 1, 0, 0, 0, 602, 603, 5, 119, 0, 0, 603,
  536. 615, 3, 194, 97, 0, 604, 605, 5, 3, 0, 0, 605, 610, 3, 190, 95, 0, 606,
  537. 607, 5, 5, 0, 0, 607, 609, 3, 190, 95, 0, 608, 606, 1, 0, 0, 0, 609, 612,
  538. 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 613, 1, 0,
  539. 0, 0, 612, 610, 1, 0, 0, 0, 613, 614, 5, 4, 0, 0, 614, 616, 1, 0, 0, 0,
  540. 615, 604, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 631, 1, 0, 0, 0, 617,
  541. 618, 5, 109, 0, 0, 618, 625, 7, 5, 0, 0, 619, 620, 5, 133, 0, 0, 620, 626,
  542. 7, 6, 0, 0, 621, 626, 5, 43, 0, 0, 622, 626, 5, 125, 0, 0, 623, 624, 5,
  543. 103, 0, 0, 624, 626, 5, 28, 0, 0, 625, 619, 1, 0, 0, 0, 625, 621, 1, 0,
  544. 0, 0, 625, 622, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 626, 630, 1, 0, 0, 0,
  545. 627, 628, 5, 101, 0, 0, 628, 630, 3, 176, 88, 0, 629, 617, 1, 0, 0, 0,
  546. 629, 627, 1, 0, 0, 0, 630, 633, 1, 0, 0, 0, 631, 629, 1, 0, 0, 0, 631,
  547. 632, 1, 0, 0, 0, 632, 642, 1, 0, 0, 0, 633, 631, 1, 0, 0, 0, 634, 636,
  548. 5, 104, 0, 0, 635, 634, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 637, 1,
  549. 0, 0, 0, 637, 640, 5, 59, 0, 0, 638, 639, 5, 88, 0, 0, 639, 641, 7, 7,
  550. 0, 0, 640, 638, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 643, 1, 0, 0, 0,
  551. 642, 635, 1, 0, 0, 0, 642, 643, 1, 0, 0, 0, 643, 41, 1, 0, 0, 0, 644, 645,
  552. 5, 109, 0, 0, 645, 646, 5, 50, 0, 0, 646, 647, 7, 8, 0, 0, 647, 43, 1,
  553. 0, 0, 0, 648, 650, 5, 52, 0, 0, 649, 651, 7, 2, 0, 0, 650, 649, 1, 0, 0,
  554. 0, 650, 651, 1, 0, 0, 0, 651, 652, 1, 0, 0, 0, 652, 656, 5, 141, 0, 0,
  555. 653, 654, 5, 82, 0, 0, 654, 655, 5, 104, 0, 0, 655, 657, 5, 72, 0, 0, 656,
  556. 653, 1, 0, 0, 0, 656, 657, 1, 0, 0, 0, 657, 661, 1, 0, 0, 0, 658, 659,
  557. 3, 182, 91, 0, 659, 660, 5, 2, 0, 0, 660, 662, 1, 0, 0, 0, 661, 658, 1,
  558. 0, 0, 0, 661, 662, 1, 0, 0, 0, 662, 663, 1, 0, 0, 0, 663, 668, 3, 198,
  559. 99, 0, 664, 669, 5, 39, 0, 0, 665, 669, 5, 30, 0, 0, 666, 667, 5, 91, 0,
  560. 0, 667, 669, 5, 107, 0, 0, 668, 664, 1, 0, 0, 0, 668, 665, 1, 0, 0, 0,
  561. 668, 666, 1, 0, 0, 0, 668, 669, 1, 0, 0, 0, 669, 684, 1, 0, 0, 0, 670,
  562. 685, 5, 61, 0, 0, 671, 685, 5, 90, 0, 0, 672, 682, 5, 144, 0, 0, 673, 674,
  563. 5, 107, 0, 0, 674, 679, 3, 190, 95, 0, 675, 676, 5, 5, 0, 0, 676, 678,
  564. 3, 190, 95, 0, 677, 675, 1, 0, 0, 0, 678, 681, 1, 0, 0, 0, 679, 677, 1,
  565. 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 683, 1, 0, 0, 0, 681, 679, 1, 0, 0,
  566. 0, 682, 673, 1, 0, 0, 0, 682, 683, 1, 0, 0, 0, 683, 685, 1, 0, 0, 0, 684,
  567. 670, 1, 0, 0, 0, 684, 671, 1, 0, 0, 0, 684, 672, 1, 0, 0, 0, 685, 686,
  568. 1, 0, 0, 0, 686, 687, 5, 109, 0, 0, 687, 691, 3, 184, 92, 0, 688, 689,
  569. 5, 75, 0, 0, 689, 690, 5, 66, 0, 0, 690, 692, 5, 129, 0, 0, 691, 688, 1,
  570. 0, 0, 0, 691, 692, 1, 0, 0, 0, 692, 695, 1, 0, 0, 0, 693, 694, 5, 150,
  571. 0, 0, 694, 696, 3, 68, 34, 0, 695, 693, 1, 0, 0, 0, 695, 696, 1, 0, 0,
  572. 0, 696, 697, 1, 0, 0, 0, 697, 706, 5, 40, 0, 0, 698, 703, 3, 106, 53, 0,
  573. 699, 703, 3, 74, 37, 0, 700, 703, 3, 60, 30, 0, 701, 703, 3, 84, 42, 0,
  574. 702, 698, 1, 0, 0, 0, 702, 699, 1, 0, 0, 0, 702, 700, 1, 0, 0, 0, 702,
  575. 701, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, 705, 5, 1, 0, 0, 705, 707,
  576. 1, 0, 0, 0, 706, 702, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 706, 1, 0,
  577. 0, 0, 708, 709, 1, 0, 0, 0, 709, 710, 1, 0, 0, 0, 710, 711, 5, 68, 0, 0,
  578. 711, 45, 1, 0, 0, 0, 712, 714, 5, 52, 0, 0, 713, 715, 7, 2, 0, 0, 714,
  579. 713, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, 716, 1, 0, 0, 0, 716, 720,
  580. 5, 148, 0, 0, 717, 718, 5, 82, 0, 0, 718, 719, 5, 104, 0, 0, 719, 721,
  581. 5, 72, 0, 0, 720, 717, 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 725, 1, 0,
  582. 0, 0, 722, 723, 3, 182, 91, 0, 723, 724, 5, 2, 0, 0, 724, 726, 1, 0, 0,
  583. 0, 725, 722, 1, 0, 0, 0, 725, 726, 1, 0, 0, 0, 726, 727, 1, 0, 0, 0, 727,
  584. 739, 3, 200, 100, 0, 728, 729, 5, 3, 0, 0, 729, 734, 3, 190, 95, 0, 730,
  585. 731, 5, 5, 0, 0, 731, 733, 3, 190, 95, 0, 732, 730, 1, 0, 0, 0, 733, 736,
  586. 1, 0, 0, 0, 734, 732, 1, 0, 0, 0, 734, 735, 1, 0, 0, 0, 735, 737, 1, 0,
  587. 0, 0, 736, 734, 1, 0, 0, 0, 737, 738, 5, 4, 0, 0, 738, 740, 1, 0, 0, 0,
  588. 739, 728, 1, 0, 0, 0, 739, 740, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741,
  589. 742, 5, 35, 0, 0, 742, 743, 3, 84, 42, 0, 743, 47, 1, 0, 0, 0, 744, 745,
  590. 5, 52, 0, 0, 745, 746, 5, 149, 0, 0, 746, 750, 5, 135, 0, 0, 747, 748,
  591. 5, 82, 0, 0, 748, 749, 5, 104, 0, 0, 749, 751, 5, 72, 0, 0, 750, 747, 1,
  592. 0, 0, 0, 750, 751, 1, 0, 0, 0, 751, 755, 1, 0, 0, 0, 752, 753, 3, 182,
  593. 91, 0, 753, 754, 5, 2, 0, 0, 754, 756, 1, 0, 0, 0, 755, 752, 1, 0, 0, 0,
  594. 755, 756, 1, 0, 0, 0, 756, 757, 1, 0, 0, 0, 757, 758, 3, 184, 92, 0, 758,
  595. 759, 5, 145, 0, 0, 759, 771, 3, 202, 101, 0, 760, 761, 5, 3, 0, 0, 761,
  596. 766, 3, 170, 85, 0, 762, 763, 5, 5, 0, 0, 763, 765, 3, 170, 85, 0, 764,
  597. 762, 1, 0, 0, 0, 765, 768, 1, 0, 0, 0, 766, 764, 1, 0, 0, 0, 766, 767,
  598. 1, 0, 0, 0, 767, 769, 1, 0, 0, 0, 768, 766, 1, 0, 0, 0, 769, 770, 5, 4,
  599. 0, 0, 770, 772, 1, 0, 0, 0, 771, 760, 1, 0, 0, 0, 771, 772, 1, 0, 0, 0,
  600. 772, 49, 1, 0, 0, 0, 773, 775, 5, 152, 0, 0, 774, 776, 5, 118, 0, 0, 775,
  601. 774, 1, 0, 0, 0, 775, 776, 1, 0, 0, 0, 776, 777, 1, 0, 0, 0, 777, 778,
  602. 3, 52, 26, 0, 778, 779, 5, 35, 0, 0, 779, 780, 5, 3, 0, 0, 780, 781, 3,
  603. 84, 42, 0, 781, 791, 5, 4, 0, 0, 782, 783, 5, 5, 0, 0, 783, 784, 3, 52,
  604. 26, 0, 784, 785, 5, 35, 0, 0, 785, 786, 5, 3, 0, 0, 786, 787, 3, 84, 42,
  605. 0, 787, 788, 5, 4, 0, 0, 788, 790, 1, 0, 0, 0, 789, 782, 1, 0, 0, 0, 790,
  606. 793, 1, 0, 0, 0, 791, 789, 1, 0, 0, 0, 791, 792, 1, 0, 0, 0, 792, 51, 1,
  607. 0, 0, 0, 793, 791, 1, 0, 0, 0, 794, 806, 3, 184, 92, 0, 795, 796, 5, 3,
  608. 0, 0, 796, 801, 3, 190, 95, 0, 797, 798, 5, 5, 0, 0, 798, 800, 3, 190,
  609. 95, 0, 799, 797, 1, 0, 0, 0, 800, 803, 1, 0, 0, 0, 801, 799, 1, 0, 0, 0,
  610. 801, 802, 1, 0, 0, 0, 802, 804, 1, 0, 0, 0, 803, 801, 1, 0, 0, 0, 804,
  611. 805, 5, 4, 0, 0, 805, 807, 1, 0, 0, 0, 806, 795, 1, 0, 0, 0, 806, 807,
  612. 1, 0, 0, 0, 807, 53, 1, 0, 0, 0, 808, 809, 3, 52, 26, 0, 809, 810, 5, 35,
  613. 0, 0, 810, 811, 5, 3, 0, 0, 811, 812, 3, 162, 81, 0, 812, 814, 5, 142,
  614. 0, 0, 813, 815, 5, 31, 0, 0, 814, 813, 1, 0, 0, 0, 814, 815, 1, 0, 0, 0,
  615. 815, 816, 1, 0, 0, 0, 816, 817, 3, 164, 82, 0, 817, 818, 5, 4, 0, 0, 818,
  616. 55, 1, 0, 0, 0, 819, 831, 3, 184, 92, 0, 820, 821, 5, 3, 0, 0, 821, 826,
  617. 3, 190, 95, 0, 822, 823, 5, 5, 0, 0, 823, 825, 3, 190, 95, 0, 824, 822,
  618. 1, 0, 0, 0, 825, 828, 1, 0, 0, 0, 826, 824, 1, 0, 0, 0, 826, 827, 1, 0,
  619. 0, 0, 827, 829, 1, 0, 0, 0, 828, 826, 1, 0, 0, 0, 829, 830, 5, 4, 0, 0,
  620. 830, 832, 1, 0, 0, 0, 831, 820, 1, 0, 0, 0, 831, 832, 1, 0, 0, 0, 832,
  621. 833, 1, 0, 0, 0, 833, 834, 5, 35, 0, 0, 834, 835, 5, 3, 0, 0, 835, 836,
  622. 3, 84, 42, 0, 836, 837, 5, 4, 0, 0, 837, 57, 1, 0, 0, 0, 838, 847, 5, 126,
  623. 0, 0, 839, 848, 5, 7, 0, 0, 840, 845, 3, 68, 34, 0, 841, 843, 5, 35, 0,
  624. 0, 842, 841, 1, 0, 0, 0, 842, 843, 1, 0, 0, 0, 843, 844, 1, 0, 0, 0, 844,
  625. 846, 3, 172, 86, 0, 845, 842, 1, 0, 0, 0, 845, 846, 1, 0, 0, 0, 846, 848,
  626. 1, 0, 0, 0, 847, 839, 1, 0, 0, 0, 847, 840, 1, 0, 0, 0, 848, 862, 1, 0,
  627. 0, 0, 849, 858, 5, 5, 0, 0, 850, 859, 5, 7, 0, 0, 851, 856, 3, 68, 34,
  628. 0, 852, 854, 5, 35, 0, 0, 853, 852, 1, 0, 0, 0, 853, 854, 1, 0, 0, 0, 854,
  629. 855, 1, 0, 0, 0, 855, 857, 3, 172, 86, 0, 856, 853, 1, 0, 0, 0, 856, 857,
  630. 1, 0, 0, 0, 857, 859, 1, 0, 0, 0, 858, 850, 1, 0, 0, 0, 858, 851, 1, 0,
  631. 0, 0, 859, 861, 1, 0, 0, 0, 860, 849, 1, 0, 0, 0, 861, 864, 1, 0, 0, 0,
  632. 862, 860, 1, 0, 0, 0, 862, 863, 1, 0, 0, 0, 863, 59, 1, 0, 0, 0, 864, 862,
  633. 1, 0, 0, 0, 865, 867, 3, 50, 25, 0, 866, 865, 1, 0, 0, 0, 866, 867, 1,
  634. 0, 0, 0, 867, 868, 1, 0, 0, 0, 868, 869, 5, 61, 0, 0, 869, 870, 5, 77,
  635. 0, 0, 870, 873, 3, 112, 56, 0, 871, 872, 5, 151, 0, 0, 872, 874, 3, 68,
  636. 34, 0, 873, 871, 1, 0, 0, 0, 873, 874, 1, 0, 0, 0, 874, 876, 1, 0, 0, 0,
  637. 875, 877, 3, 58, 29, 0, 876, 875, 1, 0, 0, 0, 876, 877, 1, 0, 0, 0, 877,
  638. 61, 1, 0, 0, 0, 878, 880, 3, 50, 25, 0, 879, 878, 1, 0, 0, 0, 879, 880,
  639. 1, 0, 0, 0, 880, 881, 1, 0, 0, 0, 881, 882, 5, 61, 0, 0, 882, 883, 5, 77,
  640. 0, 0, 883, 886, 3, 112, 56, 0, 884, 885, 5, 151, 0, 0, 885, 887, 3, 68,
  641. 34, 0, 886, 884, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 892, 1, 0, 0, 0,
  642. 888, 890, 3, 134, 67, 0, 889, 888, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890,
  643. 891, 1, 0, 0, 0, 891, 893, 3, 136, 68, 0, 892, 889, 1, 0, 0, 0, 892, 893,
  644. 1, 0, 0, 0, 893, 895, 1, 0, 0, 0, 894, 896, 3, 58, 29, 0, 895, 894, 1,
  645. 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, 63, 1, 0, 0, 0, 897, 899, 5, 63, 0,
  646. 0, 898, 900, 5, 57, 0, 0, 899, 898, 1, 0, 0, 0, 899, 900, 1, 0, 0, 0, 900,
  647. 901, 1, 0, 0, 0, 901, 902, 3, 182, 91, 0, 902, 65, 1, 0, 0, 0, 903, 904,
  648. 5, 65, 0, 0, 904, 907, 7, 9, 0, 0, 905, 906, 5, 82, 0, 0, 906, 908, 5,
  649. 72, 0, 0, 907, 905, 1, 0, 0, 0, 907, 908, 1, 0, 0, 0, 908, 912, 1, 0, 0,
  650. 0, 909, 910, 3, 182, 91, 0, 910, 911, 5, 2, 0, 0, 911, 913, 1, 0, 0, 0,
  651. 912, 909, 1, 0, 0, 0, 912, 913, 1, 0, 0, 0, 913, 914, 1, 0, 0, 0, 914,
  652. 915, 3, 228, 114, 0, 915, 67, 1, 0, 0, 0, 916, 917, 6, 34, -1, 0, 917,
  653. 1006, 3, 72, 36, 0, 918, 1006, 5, 190, 0, 0, 919, 1006, 5, 191, 0, 0, 920,
  654. 921, 3, 182, 91, 0, 921, 922, 5, 2, 0, 0, 922, 924, 1, 0, 0, 0, 923, 920,
  655. 1, 0, 0, 0, 923, 924, 1, 0, 0, 0, 924, 925, 1, 0, 0, 0, 925, 926, 3, 184,
  656. 92, 0, 926, 927, 5, 2, 0, 0, 927, 929, 1, 0, 0, 0, 928, 923, 1, 0, 0, 0,
  657. 928, 929, 1, 0, 0, 0, 929, 930, 1, 0, 0, 0, 930, 1006, 3, 190, 95, 0, 931,
  658. 932, 3, 166, 83, 0, 932, 933, 3, 68, 34, 21, 933, 1006, 1, 0, 0, 0, 934,
  659. 935, 3, 180, 90, 0, 935, 948, 5, 3, 0, 0, 936, 938, 5, 64, 0, 0, 937, 936,
  660. 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 939, 1, 0, 0, 0, 939, 944, 3, 68,
  661. 34, 0, 940, 941, 5, 5, 0, 0, 941, 943, 3, 68, 34, 0, 942, 940, 1, 0, 0,
  662. 0, 943, 946, 1, 0, 0, 0, 944, 942, 1, 0, 0, 0, 944, 945, 1, 0, 0, 0, 945,
  663. 949, 1, 0, 0, 0, 946, 944, 1, 0, 0, 0, 947, 949, 5, 7, 0, 0, 948, 937,
  664. 1, 0, 0, 0, 948, 947, 1, 0, 0, 0, 948, 949, 1, 0, 0, 0, 949, 950, 1, 0,
  665. 0, 0, 950, 952, 5, 4, 0, 0, 951, 953, 3, 116, 58, 0, 952, 951, 1, 0, 0,
  666. 0, 952, 953, 1, 0, 0, 0, 953, 955, 1, 0, 0, 0, 954, 956, 3, 120, 60, 0,
  667. 955, 954, 1, 0, 0, 0, 955, 956, 1, 0, 0, 0, 956, 1006, 1, 0, 0, 0, 957,
  668. 958, 5, 3, 0, 0, 958, 963, 3, 68, 34, 0, 959, 960, 5, 5, 0, 0, 960, 962,
  669. 3, 68, 34, 0, 961, 959, 1, 0, 0, 0, 962, 965, 1, 0, 0, 0, 963, 961, 1,
  670. 0, 0, 0, 963, 964, 1, 0, 0, 0, 964, 966, 1, 0, 0, 0, 965, 963, 1, 0, 0,
  671. 0, 966, 967, 5, 4, 0, 0, 967, 1006, 1, 0, 0, 0, 968, 969, 5, 45, 0, 0,
  672. 969, 970, 5, 3, 0, 0, 970, 971, 3, 68, 34, 0, 971, 972, 5, 35, 0, 0, 972,
  673. 973, 3, 32, 16, 0, 973, 974, 5, 4, 0, 0, 974, 1006, 1, 0, 0, 0, 975, 977,
  674. 5, 104, 0, 0, 976, 975, 1, 0, 0, 0, 976, 977, 1, 0, 0, 0, 977, 978, 1,
  675. 0, 0, 0, 978, 980, 5, 72, 0, 0, 979, 976, 1, 0, 0, 0, 979, 980, 1, 0, 0,
  676. 0, 980, 981, 1, 0, 0, 0, 981, 982, 5, 3, 0, 0, 982, 983, 3, 84, 42, 0,
  677. 983, 984, 5, 4, 0, 0, 984, 1006, 1, 0, 0, 0, 985, 987, 5, 44, 0, 0, 986,
  678. 988, 3, 68, 34, 0, 987, 986, 1, 0, 0, 0, 987, 988, 1, 0, 0, 0, 988, 994,
  679. 1, 0, 0, 0, 989, 990, 5, 150, 0, 0, 990, 991, 3, 68, 34, 0, 991, 992, 5,
  680. 138, 0, 0, 992, 993, 3, 68, 34, 0, 993, 995, 1, 0, 0, 0, 994, 989, 1, 0,
  681. 0, 0, 995, 996, 1, 0, 0, 0, 996, 994, 1, 0, 0, 0, 996, 997, 1, 0, 0, 0,
  682. 997, 1000, 1, 0, 0, 0, 998, 999, 5, 67, 0, 0, 999, 1001, 3, 68, 34, 0,
  683. 1000, 998, 1, 0, 0, 0, 1000, 1001, 1, 0, 0, 0, 1001, 1002, 1, 0, 0, 0,
  684. 1002, 1003, 5, 68, 0, 0, 1003, 1006, 1, 0, 0, 0, 1004, 1006, 3, 70, 35,
  685. 0, 1005, 916, 1, 0, 0, 0, 1005, 918, 1, 0, 0, 0, 1005, 919, 1, 0, 0, 0,
  686. 1005, 928, 1, 0, 0, 0, 1005, 931, 1, 0, 0, 0, 1005, 934, 1, 0, 0, 0, 1005,
  687. 957, 1, 0, 0, 0, 1005, 968, 1, 0, 0, 0, 1005, 979, 1, 0, 0, 0, 1005, 985,
  688. 1, 0, 0, 0, 1005, 1004, 1, 0, 0, 0, 1006, 1126, 1, 0, 0, 0, 1007, 1008,
  689. 10, 20, 0, 0, 1008, 1009, 5, 13, 0, 0, 1009, 1125, 3, 68, 34, 21, 1010,
  690. 1011, 10, 19, 0, 0, 1011, 1012, 7, 10, 0, 0, 1012, 1125, 3, 68, 34, 20,
  691. 1013, 1014, 10, 18, 0, 0, 1014, 1015, 7, 11, 0, 0, 1015, 1125, 3, 68, 34,
  692. 19, 1016, 1017, 10, 17, 0, 0, 1017, 1018, 7, 4, 0, 0, 1018, 1125, 3, 68,
  693. 34, 18, 1019, 1020, 10, 16, 0, 0, 1020, 1021, 7, 12, 0, 0, 1021, 1125,
  694. 3, 68, 34, 17, 1022, 1023, 10, 15, 0, 0, 1023, 1024, 7, 13, 0, 0, 1024,
  695. 1125, 3, 68, 34, 16, 1025, 1041, 10, 14, 0, 0, 1026, 1042, 5, 6, 0, 0,
  696. 1027, 1042, 5, 24, 0, 0, 1028, 1042, 5, 25, 0, 0, 1029, 1042, 5, 26, 0,
  697. 0, 1030, 1042, 5, 94, 0, 0, 1031, 1032, 5, 94, 0, 0, 1032, 1042, 5, 104,
  698. 0, 0, 1033, 1035, 5, 104, 0, 0, 1034, 1033, 1, 0, 0, 0, 1034, 1035, 1,
  699. 0, 0, 0, 1035, 1036, 1, 0, 0, 0, 1036, 1042, 5, 85, 0, 0, 1037, 1042, 5,
  700. 99, 0, 0, 1038, 1042, 5, 79, 0, 0, 1039, 1042, 5, 101, 0, 0, 1040, 1042,
  701. 5, 120, 0, 0, 1041, 1026, 1, 0, 0, 0, 1041, 1027, 1, 0, 0, 0, 1041, 1028,
  702. 1, 0, 0, 0, 1041, 1029, 1, 0, 0, 0, 1041, 1030, 1, 0, 0, 0, 1041, 1031,
  703. 1, 0, 0, 0, 1041, 1034, 1, 0, 0, 0, 1041, 1037, 1, 0, 0, 0, 1041, 1038,
  704. 1, 0, 0, 0, 1041, 1039, 1, 0, 0, 0, 1041, 1040, 1, 0, 0, 0, 1042, 1043,
  705. 1, 0, 0, 0, 1043, 1125, 3, 68, 34, 15, 1044, 1045, 10, 12, 0, 0, 1045,
  706. 1046, 5, 34, 0, 0, 1046, 1125, 3, 68, 34, 13, 1047, 1048, 10, 11, 0, 0,
  707. 1048, 1049, 5, 110, 0, 0, 1049, 1125, 3, 68, 34, 12, 1050, 1052, 10, 4,
  708. 0, 0, 1051, 1053, 5, 104, 0, 0, 1052, 1051, 1, 0, 0, 0, 1052, 1053, 1,
  709. 0, 0, 0, 1053, 1054, 1, 0, 0, 0, 1054, 1055, 5, 41, 0, 0, 1055, 1056, 3,
  710. 68, 34, 0, 1056, 1057, 5, 34, 0, 0, 1057, 1058, 3, 68, 34, 5, 1058, 1125,
  711. 1, 0, 0, 0, 1059, 1061, 10, 13, 0, 0, 1060, 1062, 5, 104, 0, 0, 1061, 1060,
  712. 1, 0, 0, 0, 1061, 1062, 1, 0, 0, 0, 1062, 1063, 1, 0, 0, 0, 1063, 1102,
  713. 5, 85, 0, 0, 1064, 1074, 5, 3, 0, 0, 1065, 1075, 3, 84, 42, 0, 1066, 1071,
  714. 3, 68, 34, 0, 1067, 1068, 5, 5, 0, 0, 1068, 1070, 3, 68, 34, 0, 1069, 1067,
  715. 1, 0, 0, 0, 1070, 1073, 1, 0, 0, 0, 1071, 1069, 1, 0, 0, 0, 1071, 1072,
  716. 1, 0, 0, 0, 1072, 1075, 1, 0, 0, 0, 1073, 1071, 1, 0, 0, 0, 1074, 1065,
  717. 1, 0, 0, 0, 1074, 1066, 1, 0, 0, 0, 1074, 1075, 1, 0, 0, 0, 1075, 1076,
  718. 1, 0, 0, 0, 1076, 1103, 5, 4, 0, 0, 1077, 1078, 3, 182, 91, 0, 1078, 1079,
  719. 5, 2, 0, 0, 1079, 1081, 1, 0, 0, 0, 1080, 1077, 1, 0, 0, 0, 1080, 1081,
  720. 1, 0, 0, 0, 1081, 1082, 1, 0, 0, 0, 1082, 1103, 3, 184, 92, 0, 1083, 1084,
  721. 3, 182, 91, 0, 1084, 1085, 5, 2, 0, 0, 1085, 1087, 1, 0, 0, 0, 1086, 1083,
  722. 1, 0, 0, 0, 1086, 1087, 1, 0, 0, 0, 1087, 1088, 1, 0, 0, 0, 1088, 1089,
  723. 3, 226, 113, 0, 1089, 1098, 5, 3, 0, 0, 1090, 1095, 3, 68, 34, 0, 1091,
  724. 1092, 5, 5, 0, 0, 1092, 1094, 3, 68, 34, 0, 1093, 1091, 1, 0, 0, 0, 1094,
  725. 1097, 1, 0, 0, 0, 1095, 1093, 1, 0, 0, 0, 1095, 1096, 1, 0, 0, 0, 1096,
  726. 1099, 1, 0, 0, 0, 1097, 1095, 1, 0, 0, 0, 1098, 1090, 1, 0, 0, 0, 1098,
  727. 1099, 1, 0, 0, 0, 1099, 1100, 1, 0, 0, 0, 1100, 1101, 5, 4, 0, 0, 1101,
  728. 1103, 1, 0, 0, 0, 1102, 1064, 1, 0, 0, 0, 1102, 1080, 1, 0, 0, 0, 1102,
  729. 1086, 1, 0, 0, 0, 1103, 1125, 1, 0, 0, 0, 1104, 1105, 10, 7, 0, 0, 1105,
  730. 1106, 5, 47, 0, 0, 1106, 1125, 3, 192, 96, 0, 1107, 1109, 10, 6, 0, 0,
  731. 1108, 1110, 5, 104, 0, 0, 1109, 1108, 1, 0, 0, 0, 1109, 1110, 1, 0, 0,
  732. 0, 1110, 1111, 1, 0, 0, 0, 1111, 1112, 7, 14, 0, 0, 1112, 1115, 3, 68,
  733. 34, 0, 1113, 1114, 5, 69, 0, 0, 1114, 1116, 3, 68, 34, 0, 1115, 1113, 1,
  734. 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1125, 1, 0, 0, 0, 1117, 1122, 10,
  735. 5, 0, 0, 1118, 1123, 5, 95, 0, 0, 1119, 1123, 5, 105, 0, 0, 1120, 1121,
  736. 5, 104, 0, 0, 1121, 1123, 5, 106, 0, 0, 1122, 1118, 1, 0, 0, 0, 1122, 1119,
  737. 1, 0, 0, 0, 1122, 1120, 1, 0, 0, 0, 1123, 1125, 1, 0, 0, 0, 1124, 1007,
  738. 1, 0, 0, 0, 1124, 1010, 1, 0, 0, 0, 1124, 1013, 1, 0, 0, 0, 1124, 1016,
  739. 1, 0, 0, 0, 1124, 1019, 1, 0, 0, 0, 1124, 1022, 1, 0, 0, 0, 1124, 1025,
  740. 1, 0, 0, 0, 1124, 1044, 1, 0, 0, 0, 1124, 1047, 1, 0, 0, 0, 1124, 1050,
  741. 1, 0, 0, 0, 1124, 1059, 1, 0, 0, 0, 1124, 1104, 1, 0, 0, 0, 1124, 1107,
  742. 1, 0, 0, 0, 1124, 1117, 1, 0, 0, 0, 1125, 1128, 1, 0, 0, 0, 1126, 1124,
  743. 1, 0, 0, 0, 1126, 1127, 1, 0, 0, 0, 1127, 69, 1, 0, 0, 0, 1128, 1126, 1,
  744. 0, 0, 0, 1129, 1130, 5, 117, 0, 0, 1130, 1135, 5, 3, 0, 0, 1131, 1136,
  745. 5, 83, 0, 0, 1132, 1133, 7, 15, 0, 0, 1133, 1134, 5, 5, 0, 0, 1134, 1136,
  746. 3, 168, 84, 0, 1135, 1131, 1, 0, 0, 0, 1135, 1132, 1, 0, 0, 0, 1136, 1137,
  747. 1, 0, 0, 0, 1137, 1138, 5, 4, 0, 0, 1138, 71, 1, 0, 0, 0, 1139, 1140, 7,
  748. 16, 0, 0, 1140, 73, 1, 0, 0, 0, 1141, 1143, 3, 50, 25, 0, 1142, 1141, 1,
  749. 0, 0, 0, 1142, 1143, 1, 0, 0, 0, 1143, 1149, 1, 0, 0, 0, 1144, 1150, 5,
  750. 90, 0, 0, 1145, 1150, 5, 124, 0, 0, 1146, 1147, 5, 90, 0, 0, 1147, 1148,
  751. 5, 110, 0, 0, 1148, 1150, 7, 8, 0, 0, 1149, 1144, 1, 0, 0, 0, 1149, 1145,
  752. 1, 0, 0, 0, 1149, 1146, 1, 0, 0, 0, 1150, 1151, 1, 0, 0, 0, 1151, 1155,
  753. 5, 93, 0, 0, 1152, 1153, 3, 182, 91, 0, 1153, 1154, 5, 2, 0, 0, 1154, 1156,
  754. 1, 0, 0, 0, 1155, 1152, 1, 0, 0, 0, 1155, 1156, 1, 0, 0, 0, 1156, 1157,
  755. 1, 0, 0, 0, 1157, 1160, 3, 184, 92, 0, 1158, 1159, 5, 35, 0, 0, 1159, 1161,
  756. 3, 208, 104, 0, 1160, 1158, 1, 0, 0, 0, 1160, 1161, 1, 0, 0, 0, 1161, 1173,
  757. 1, 0, 0, 0, 1162, 1163, 5, 3, 0, 0, 1163, 1168, 3, 190, 95, 0, 1164, 1165,
  758. 5, 5, 0, 0, 1165, 1167, 3, 190, 95, 0, 1166, 1164, 1, 0, 0, 0, 1167, 1170,
  759. 1, 0, 0, 0, 1168, 1166, 1, 0, 0, 0, 1168, 1169, 1, 0, 0, 0, 1169, 1171,
  760. 1, 0, 0, 0, 1170, 1168, 1, 0, 0, 0, 1171, 1172, 5, 4, 0, 0, 1172, 1174,
  761. 1, 0, 0, 0, 1173, 1162, 1, 0, 0, 0, 1173, 1174, 1, 0, 0, 0, 1174, 1204,
  762. 1, 0, 0, 0, 1175, 1176, 5, 147, 0, 0, 1176, 1177, 5, 3, 0, 0, 1177, 1182,
  763. 3, 68, 34, 0, 1178, 1179, 5, 5, 0, 0, 1179, 1181, 3, 68, 34, 0, 1180, 1178,
  764. 1, 0, 0, 0, 1181, 1184, 1, 0, 0, 0, 1182, 1180, 1, 0, 0, 0, 1182, 1183,
  765. 1, 0, 0, 0, 1183, 1185, 1, 0, 0, 0, 1184, 1182, 1, 0, 0, 0, 1185, 1200,
  766. 5, 4, 0, 0, 1186, 1187, 5, 5, 0, 0, 1187, 1188, 5, 3, 0, 0, 1188, 1193,
  767. 3, 68, 34, 0, 1189, 1190, 5, 5, 0, 0, 1190, 1192, 3, 68, 34, 0, 1191, 1189,
  768. 1, 0, 0, 0, 1192, 1195, 1, 0, 0, 0, 1193, 1191, 1, 0, 0, 0, 1193, 1194,
  769. 1, 0, 0, 0, 1194, 1196, 1, 0, 0, 0, 1195, 1193, 1, 0, 0, 0, 1196, 1197,
  770. 5, 4, 0, 0, 1197, 1199, 1, 0, 0, 0, 1198, 1186, 1, 0, 0, 0, 1199, 1202,
  771. 1, 0, 0, 0, 1200, 1198, 1, 0, 0, 0, 1200, 1201, 1, 0, 0, 0, 1201, 1205,
  772. 1, 0, 0, 0, 1202, 1200, 1, 0, 0, 0, 1203, 1205, 3, 84, 42, 0, 1204, 1175,
  773. 1, 0, 0, 0, 1204, 1203, 1, 0, 0, 0, 1205, 1207, 1, 0, 0, 0, 1206, 1208,
  774. 3, 76, 38, 0, 1207, 1206, 1, 0, 0, 0, 1207, 1208, 1, 0, 0, 0, 1208, 1210,
  775. 1, 0, 0, 0, 1209, 1211, 3, 58, 29, 0, 1210, 1209, 1, 0, 0, 0, 1210, 1211,
  776. 1, 0, 0, 0, 1211, 1215, 1, 0, 0, 0, 1212, 1213, 5, 58, 0, 0, 1213, 1215,
  777. 5, 147, 0, 0, 1214, 1142, 1, 0, 0, 0, 1214, 1212, 1, 0, 0, 0, 1215, 75,
  778. 1, 0, 0, 0, 1216, 1217, 5, 109, 0, 0, 1217, 1232, 5, 50, 0, 0, 1218, 1219,
  779. 5, 3, 0, 0, 1219, 1224, 3, 24, 12, 0, 1220, 1221, 5, 5, 0, 0, 1221, 1223,
  780. 3, 24, 12, 0, 1222, 1220, 1, 0, 0, 0, 1223, 1226, 1, 0, 0, 0, 1224, 1222,
  781. 1, 0, 0, 0, 1224, 1225, 1, 0, 0, 0, 1225, 1227, 1, 0, 0, 0, 1226, 1224,
  782. 1, 0, 0, 0, 1227, 1230, 5, 4, 0, 0, 1228, 1229, 5, 151, 0, 0, 1229, 1231,
  783. 3, 68, 34, 0, 1230, 1228, 1, 0, 0, 0, 1230, 1231, 1, 0, 0, 0, 1231, 1233,
  784. 1, 0, 0, 0, 1232, 1218, 1, 0, 0, 0, 1232, 1233, 1, 0, 0, 0, 1233, 1234,
  785. 1, 0, 0, 0, 1234, 1261, 5, 186, 0, 0, 1235, 1262, 5, 187, 0, 0, 1236, 1237,
  786. 5, 144, 0, 0, 1237, 1240, 5, 133, 0, 0, 1238, 1241, 3, 190, 95, 0, 1239,
  787. 1241, 3, 108, 54, 0, 1240, 1238, 1, 0, 0, 0, 1240, 1239, 1, 0, 0, 0, 1241,
  788. 1242, 1, 0, 0, 0, 1242, 1243, 5, 6, 0, 0, 1243, 1254, 3, 68, 34, 0, 1244,
  789. 1247, 5, 5, 0, 0, 1245, 1248, 3, 190, 95, 0, 1246, 1248, 3, 108, 54, 0,
  790. 1247, 1245, 1, 0, 0, 0, 1247, 1246, 1, 0, 0, 0, 1248, 1249, 1, 0, 0, 0,
  791. 1249, 1250, 5, 6, 0, 0, 1250, 1251, 3, 68, 34, 0, 1251, 1253, 1, 0, 0,
  792. 0, 1252, 1244, 1, 0, 0, 0, 1253, 1256, 1, 0, 0, 0, 1254, 1252, 1, 0, 0,
  793. 0, 1254, 1255, 1, 0, 0, 0, 1255, 1259, 1, 0, 0, 0, 1256, 1254, 1, 0, 0,
  794. 0, 1257, 1258, 5, 151, 0, 0, 1258, 1260, 3, 68, 34, 0, 1259, 1257, 1, 0,
  795. 0, 0, 1259, 1260, 1, 0, 0, 0, 1260, 1262, 1, 0, 0, 0, 1261, 1235, 1, 0,
  796. 0, 0, 1261, 1236, 1, 0, 0, 0, 1262, 77, 1, 0, 0, 0, 1263, 1267, 5, 114,
  797. 0, 0, 1264, 1265, 3, 182, 91, 0, 1265, 1266, 5, 2, 0, 0, 1266, 1268, 1,
  798. 0, 0, 0, 1267, 1264, 1, 0, 0, 0, 1267, 1268, 1, 0, 0, 0, 1268, 1269, 1,
  799. 0, 0, 0, 1269, 1276, 3, 204, 102, 0, 1270, 1271, 5, 6, 0, 0, 1271, 1277,
  800. 3, 80, 40, 0, 1272, 1273, 5, 3, 0, 0, 1273, 1274, 3, 80, 40, 0, 1274, 1275,
  801. 5, 4, 0, 0, 1275, 1277, 1, 0, 0, 0, 1276, 1270, 1, 0, 0, 0, 1276, 1272,
  802. 1, 0, 0, 0, 1276, 1277, 1, 0, 0, 0, 1277, 79, 1, 0, 0, 0, 1278, 1282, 3,
  803. 36, 18, 0, 1279, 1282, 3, 176, 88, 0, 1280, 1282, 5, 192, 0, 0, 1281, 1278,
  804. 1, 0, 0, 0, 1281, 1279, 1, 0, 0, 0, 1281, 1280, 1, 0, 0, 0, 1282, 81, 1,
  805. 0, 0, 0, 1283, 1294, 5, 121, 0, 0, 1284, 1295, 3, 192, 96, 0, 1285, 1286,
  806. 3, 182, 91, 0, 1286, 1287, 5, 2, 0, 0, 1287, 1289, 1, 0, 0, 0, 1288, 1285,
  807. 1, 0, 0, 0, 1288, 1289, 1, 0, 0, 0, 1289, 1292, 1, 0, 0, 0, 1290, 1293,
  808. 3, 184, 92, 0, 1291, 1293, 3, 196, 98, 0, 1292, 1290, 1, 0, 0, 0, 1292,
  809. 1291, 1, 0, 0, 0, 1293, 1295, 1, 0, 0, 0, 1294, 1284, 1, 0, 0, 0, 1294,
  810. 1288, 1, 0, 0, 0, 1294, 1295, 1, 0, 0, 0, 1295, 83, 1, 0, 0, 0, 1296, 1298,
  811. 3, 132, 66, 0, 1297, 1296, 1, 0, 0, 0, 1297, 1298, 1, 0, 0, 0, 1298, 1299,
  812. 1, 0, 0, 0, 1299, 1305, 3, 88, 44, 0, 1300, 1301, 3, 104, 52, 0, 1301,
  813. 1302, 3, 88, 44, 0, 1302, 1304, 1, 0, 0, 0, 1303, 1300, 1, 0, 0, 0, 1304,
  814. 1307, 1, 0, 0, 0, 1305, 1303, 1, 0, 0, 0, 1305, 1306, 1, 0, 0, 0, 1306,
  815. 1309, 1, 0, 0, 0, 1307, 1305, 1, 0, 0, 0, 1308, 1310, 3, 134, 67, 0, 1309,
  816. 1308, 1, 0, 0, 0, 1309, 1310, 1, 0, 0, 0, 1310, 1312, 1, 0, 0, 0, 1311,
  817. 1313, 3, 136, 68, 0, 1312, 1311, 1, 0, 0, 0, 1312, 1313, 1, 0, 0, 0, 1313,
  818. 85, 1, 0, 0, 0, 1314, 1321, 3, 96, 48, 0, 1315, 1316, 3, 100, 50, 0, 1316,
  819. 1317, 3, 96, 48, 0, 1317, 1318, 3, 102, 51, 0, 1318, 1320, 1, 0, 0, 0,
  820. 1319, 1315, 1, 0, 0, 0, 1320, 1323, 1, 0, 0, 0, 1321, 1319, 1, 0, 0, 0,
  821. 1321, 1322, 1, 0, 0, 0, 1322, 87, 1, 0, 0, 0, 1323, 1321, 1, 0, 0, 0, 1324,
  822. 1326, 5, 132, 0, 0, 1325, 1327, 7, 17, 0, 0, 1326, 1325, 1, 0, 0, 0, 1326,
  823. 1327, 1, 0, 0, 0, 1327, 1328, 1, 0, 0, 0, 1328, 1333, 3, 98, 49, 0, 1329,
  824. 1330, 5, 5, 0, 0, 1330, 1332, 3, 98, 49, 0, 1331, 1329, 1, 0, 0, 0, 1332,
  825. 1335, 1, 0, 0, 0, 1333, 1331, 1, 0, 0, 0, 1333, 1334, 1, 0, 0, 0, 1334,
  826. 1348, 1, 0, 0, 0, 1335, 1333, 1, 0, 0, 0, 1336, 1346, 5, 77, 0, 0, 1337,
  827. 1342, 3, 96, 48, 0, 1338, 1339, 5, 5, 0, 0, 1339, 1341, 3, 96, 48, 0, 1340,
  828. 1338, 1, 0, 0, 0, 1341, 1344, 1, 0, 0, 0, 1342, 1340, 1, 0, 0, 0, 1342,
  829. 1343, 1, 0, 0, 0, 1343, 1347, 1, 0, 0, 0, 1344, 1342, 1, 0, 0, 0, 1345,
  830. 1347, 3, 86, 43, 0, 1346, 1337, 1, 0, 0, 0, 1346, 1345, 1, 0, 0, 0, 1347,
  831. 1349, 1, 0, 0, 0, 1348, 1336, 1, 0, 0, 0, 1348, 1349, 1, 0, 0, 0, 1349,
  832. 1352, 1, 0, 0, 0, 1350, 1351, 5, 151, 0, 0, 1351, 1353, 3, 68, 34, 0, 1352,
  833. 1350, 1, 0, 0, 0, 1352, 1353, 1, 0, 0, 0, 1353, 1368, 1, 0, 0, 0, 1354,
  834. 1355, 5, 80, 0, 0, 1355, 1356, 5, 42, 0, 0, 1356, 1361, 3, 68, 34, 0, 1357,
  835. 1358, 5, 5, 0, 0, 1358, 1360, 3, 68, 34, 0, 1359, 1357, 1, 0, 0, 0, 1360,
  836. 1363, 1, 0, 0, 0, 1361, 1359, 1, 0, 0, 0, 1361, 1362, 1, 0, 0, 0, 1362,
  837. 1366, 1, 0, 0, 0, 1363, 1361, 1, 0, 0, 0, 1364, 1365, 5, 81, 0, 0, 1365,
  838. 1367, 3, 68, 34, 0, 1366, 1364, 1, 0, 0, 0, 1366, 1367, 1, 0, 0, 0, 1367,
  839. 1369, 1, 0, 0, 0, 1368, 1354, 1, 0, 0, 0, 1368, 1369, 1, 0, 0, 0, 1369,
  840. 1384, 1, 0, 0, 0, 1370, 1371, 5, 177, 0, 0, 1371, 1372, 3, 214, 107, 0,
  841. 1372, 1373, 5, 35, 0, 0, 1373, 1381, 3, 118, 59, 0, 1374, 1375, 5, 5, 0,
  842. 0, 1375, 1376, 3, 214, 107, 0, 1376, 1377, 5, 35, 0, 0, 1377, 1378, 3,
  843. 118, 59, 0, 1378, 1380, 1, 0, 0, 0, 1379, 1374, 1, 0, 0, 0, 1380, 1383,
  844. 1, 0, 0, 0, 1381, 1379, 1, 0, 0, 0, 1381, 1382, 1, 0, 0, 0, 1382, 1385,
  845. 1, 0, 0, 0, 1383, 1381, 1, 0, 0, 0, 1384, 1370, 1, 0, 0, 0, 1384, 1385,
  846. 1, 0, 0, 0, 1385, 1415, 1, 0, 0, 0, 1386, 1387, 5, 147, 0, 0, 1387, 1388,
  847. 5, 3, 0, 0, 1388, 1393, 3, 68, 34, 0, 1389, 1390, 5, 5, 0, 0, 1390, 1392,
  848. 3, 68, 34, 0, 1391, 1389, 1, 0, 0, 0, 1392, 1395, 1, 0, 0, 0, 1393, 1391,
  849. 1, 0, 0, 0, 1393, 1394, 1, 0, 0, 0, 1394, 1396, 1, 0, 0, 0, 1395, 1393,
  850. 1, 0, 0, 0, 1396, 1411, 5, 4, 0, 0, 1397, 1398, 5, 5, 0, 0, 1398, 1399,
  851. 5, 3, 0, 0, 1399, 1404, 3, 68, 34, 0, 1400, 1401, 5, 5, 0, 0, 1401, 1403,
  852. 3, 68, 34, 0, 1402, 1400, 1, 0, 0, 0, 1403, 1406, 1, 0, 0, 0, 1404, 1402,
  853. 1, 0, 0, 0, 1404, 1405, 1, 0, 0, 0, 1405, 1407, 1, 0, 0, 0, 1406, 1404,
  854. 1, 0, 0, 0, 1407, 1408, 5, 4, 0, 0, 1408, 1410, 1, 0, 0, 0, 1409, 1397,
  855. 1, 0, 0, 0, 1410, 1413, 1, 0, 0, 0, 1411, 1409, 1, 0, 0, 0, 1411, 1412,
  856. 1, 0, 0, 0, 1412, 1415, 1, 0, 0, 0, 1413, 1411, 1, 0, 0, 0, 1414, 1324,
  857. 1, 0, 0, 0, 1414, 1386, 1, 0, 0, 0, 1415, 89, 1, 0, 0, 0, 1416, 1417, 3,
  858. 84, 42, 0, 1417, 91, 1, 0, 0, 0, 1418, 1420, 3, 132, 66, 0, 1419, 1418,
  859. 1, 0, 0, 0, 1419, 1420, 1, 0, 0, 0, 1420, 1421, 1, 0, 0, 0, 1421, 1423,
  860. 3, 88, 44, 0, 1422, 1424, 3, 134, 67, 0, 1423, 1422, 1, 0, 0, 0, 1423,
  861. 1424, 1, 0, 0, 0, 1424, 1426, 1, 0, 0, 0, 1425, 1427, 3, 136, 68, 0, 1426,
  862. 1425, 1, 0, 0, 0, 1426, 1427, 1, 0, 0, 0, 1427, 93, 1, 0, 0, 0, 1428, 1430,
  863. 3, 132, 66, 0, 1429, 1428, 1, 0, 0, 0, 1429, 1430, 1, 0, 0, 0, 1430, 1431,
  864. 1, 0, 0, 0, 1431, 1441, 3, 88, 44, 0, 1432, 1434, 5, 142, 0, 0, 1433, 1435,
  865. 5, 31, 0, 0, 1434, 1433, 1, 0, 0, 0, 1434, 1435, 1, 0, 0, 0, 1435, 1439,
  866. 1, 0, 0, 0, 1436, 1439, 5, 92, 0, 0, 1437, 1439, 5, 70, 0, 0, 1438, 1432,
  867. 1, 0, 0, 0, 1438, 1436, 1, 0, 0, 0, 1438, 1437, 1, 0, 0, 0, 1439, 1440,
  868. 1, 0, 0, 0, 1440, 1442, 3, 88, 44, 0, 1441, 1438, 1, 0, 0, 0, 1442, 1443,
  869. 1, 0, 0, 0, 1443, 1441, 1, 0, 0, 0, 1443, 1444, 1, 0, 0, 0, 1444, 1446,
  870. 1, 0, 0, 0, 1445, 1447, 3, 134, 67, 0, 1446, 1445, 1, 0, 0, 0, 1446, 1447,
  871. 1, 0, 0, 0, 1447, 1449, 1, 0, 0, 0, 1448, 1450, 3, 136, 68, 0, 1449, 1448,
  872. 1, 0, 0, 0, 1449, 1450, 1, 0, 0, 0, 1450, 95, 1, 0, 0, 0, 1451, 1452, 3,
  873. 182, 91, 0, 1452, 1453, 5, 2, 0, 0, 1453, 1455, 1, 0, 0, 0, 1454, 1451,
  874. 1, 0, 0, 0, 1454, 1455, 1, 0, 0, 0, 1455, 1456, 1, 0, 0, 0, 1456, 1461,
  875. 3, 184, 92, 0, 1457, 1459, 5, 35, 0, 0, 1458, 1457, 1, 0, 0, 0, 1458, 1459,
  876. 1, 0, 0, 0, 1459, 1460, 1, 0, 0, 0, 1460, 1462, 3, 208, 104, 0, 1461, 1458,
  877. 1, 0, 0, 0, 1461, 1462, 1, 0, 0, 0, 1462, 1468, 1, 0, 0, 0, 1463, 1464,
  878. 5, 87, 0, 0, 1464, 1465, 5, 42, 0, 0, 1465, 1469, 3, 196, 98, 0, 1466,
  879. 1467, 5, 104, 0, 0, 1467, 1469, 5, 87, 0, 0, 1468, 1463, 1, 0, 0, 0, 1468,
  880. 1466, 1, 0, 0, 0, 1468, 1469, 1, 0, 0, 0, 1469, 1580, 1, 0, 0, 0, 1470,
  881. 1471, 3, 182, 91, 0, 1471, 1472, 5, 2, 0, 0, 1472, 1474, 1, 0, 0, 0, 1473,
  882. 1470, 1, 0, 0, 0, 1473, 1474, 1, 0, 0, 0, 1474, 1475, 1, 0, 0, 0, 1475,
  883. 1476, 3, 226, 113, 0, 1476, 1477, 5, 3, 0, 0, 1477, 1482, 3, 68, 34, 0,
  884. 1478, 1479, 5, 5, 0, 0, 1479, 1481, 3, 68, 34, 0, 1480, 1478, 1, 0, 0,
  885. 0, 1481, 1484, 1, 0, 0, 0, 1482, 1480, 1, 0, 0, 0, 1482, 1483, 1, 0, 0,
  886. 0, 1483, 1485, 1, 0, 0, 0, 1484, 1482, 1, 0, 0, 0, 1485, 1490, 5, 4, 0,
  887. 0, 1486, 1488, 5, 35, 0, 0, 1487, 1486, 1, 0, 0, 0, 1487, 1488, 1, 0, 0,
  888. 0, 1488, 1489, 1, 0, 0, 0, 1489, 1491, 3, 208, 104, 0, 1490, 1487, 1, 0,
  889. 0, 0, 1490, 1491, 1, 0, 0, 0, 1491, 1580, 1, 0, 0, 0, 1492, 1502, 5, 3,
  890. 0, 0, 1493, 1498, 3, 96, 48, 0, 1494, 1495, 5, 5, 0, 0, 1495, 1497, 3,
  891. 96, 48, 0, 1496, 1494, 1, 0, 0, 0, 1497, 1500, 1, 0, 0, 0, 1498, 1496,
  892. 1, 0, 0, 0, 1498, 1499, 1, 0, 0, 0, 1499, 1503, 1, 0, 0, 0, 1500, 1498,
  893. 1, 0, 0, 0, 1501, 1503, 3, 86, 43, 0, 1502, 1493, 1, 0, 0, 0, 1502, 1501,
  894. 1, 0, 0, 0, 1503, 1504, 1, 0, 0, 0, 1504, 1505, 5, 4, 0, 0, 1505, 1580,
  895. 1, 0, 0, 0, 1506, 1507, 5, 3, 0, 0, 1507, 1508, 3, 84, 42, 0, 1508, 1513,
  896. 5, 4, 0, 0, 1509, 1511, 5, 35, 0, 0, 1510, 1509, 1, 0, 0, 0, 1510, 1511,
  897. 1, 0, 0, 0, 1511, 1512, 1, 0, 0, 0, 1512, 1514, 3, 208, 104, 0, 1513, 1510,
  898. 1, 0, 0, 0, 1513, 1514, 1, 0, 0, 0, 1514, 1580, 1, 0, 0, 0, 1515, 1516,
  899. 3, 182, 91, 0, 1516, 1517, 5, 2, 0, 0, 1517, 1519, 1, 0, 0, 0, 1518, 1515,
  900. 1, 0, 0, 0, 1518, 1519, 1, 0, 0, 0, 1519, 1520, 1, 0, 0, 0, 1520, 1525,
  901. 3, 184, 92, 0, 1521, 1523, 5, 35, 0, 0, 1522, 1521, 1, 0, 0, 0, 1522, 1523,
  902. 1, 0, 0, 0, 1523, 1524, 1, 0, 0, 0, 1524, 1526, 3, 210, 105, 0, 1525, 1522,
  903. 1, 0, 0, 0, 1525, 1526, 1, 0, 0, 0, 1526, 1532, 1, 0, 0, 0, 1527, 1528,
  904. 5, 87, 0, 0, 1528, 1529, 5, 42, 0, 0, 1529, 1533, 3, 196, 98, 0, 1530,
  905. 1531, 5, 104, 0, 0, 1531, 1533, 5, 87, 0, 0, 1532, 1527, 1, 0, 0, 0, 1532,
  906. 1530, 1, 0, 0, 0, 1532, 1533, 1, 0, 0, 0, 1533, 1580, 1, 0, 0, 0, 1534,
  907. 1535, 3, 182, 91, 0, 1535, 1536, 5, 2, 0, 0, 1536, 1538, 1, 0, 0, 0, 1537,
  908. 1534, 1, 0, 0, 0, 1537, 1538, 1, 0, 0, 0, 1538, 1539, 1, 0, 0, 0, 1539,
  909. 1540, 3, 226, 113, 0, 1540, 1541, 5, 3, 0, 0, 1541, 1546, 3, 68, 34, 0,
  910. 1542, 1543, 5, 5, 0, 0, 1543, 1545, 3, 68, 34, 0, 1544, 1542, 1, 0, 0,
  911. 0, 1545, 1548, 1, 0, 0, 0, 1546, 1544, 1, 0, 0, 0, 1546, 1547, 1, 0, 0,
  912. 0, 1547, 1549, 1, 0, 0, 0, 1548, 1546, 1, 0, 0, 0, 1549, 1554, 5, 4, 0,
  913. 0, 1550, 1552, 5, 35, 0, 0, 1551, 1550, 1, 0, 0, 0, 1551, 1552, 1, 0, 0,
  914. 0, 1552, 1553, 1, 0, 0, 0, 1553, 1555, 3, 210, 105, 0, 1554, 1551, 1, 0,
  915. 0, 0, 1554, 1555, 1, 0, 0, 0, 1555, 1580, 1, 0, 0, 0, 1556, 1566, 5, 3,
  916. 0, 0, 1557, 1562, 3, 96, 48, 0, 1558, 1559, 5, 5, 0, 0, 1559, 1561, 3,
  917. 96, 48, 0, 1560, 1558, 1, 0, 0, 0, 1561, 1564, 1, 0, 0, 0, 1562, 1560,
  918. 1, 0, 0, 0, 1562, 1563, 1, 0, 0, 0, 1563, 1567, 1, 0, 0, 0, 1564, 1562,
  919. 1, 0, 0, 0, 1565, 1567, 3, 86, 43, 0, 1566, 1557, 1, 0, 0, 0, 1566, 1565,
  920. 1, 0, 0, 0, 1567, 1568, 1, 0, 0, 0, 1568, 1569, 5, 4, 0, 0, 1569, 1580,
  921. 1, 0, 0, 0, 1570, 1571, 5, 3, 0, 0, 1571, 1572, 3, 84, 42, 0, 1572, 1577,
  922. 5, 4, 0, 0, 1573, 1575, 5, 35, 0, 0, 1574, 1573, 1, 0, 0, 0, 1574, 1575,
  923. 1, 0, 0, 0, 1575, 1576, 1, 0, 0, 0, 1576, 1578, 3, 210, 105, 0, 1577, 1574,
  924. 1, 0, 0, 0, 1577, 1578, 1, 0, 0, 0, 1578, 1580, 1, 0, 0, 0, 1579, 1454,
  925. 1, 0, 0, 0, 1579, 1473, 1, 0, 0, 0, 1579, 1492, 1, 0, 0, 0, 1579, 1506,
  926. 1, 0, 0, 0, 1579, 1518, 1, 0, 0, 0, 1579, 1537, 1, 0, 0, 0, 1579, 1556,
  927. 1, 0, 0, 0, 1579, 1570, 1, 0, 0, 0, 1580, 97, 1, 0, 0, 0, 1581, 1594, 5,
  928. 7, 0, 0, 1582, 1583, 3, 184, 92, 0, 1583, 1584, 5, 2, 0, 0, 1584, 1585,
  929. 5, 7, 0, 0, 1585, 1594, 1, 0, 0, 0, 1586, 1591, 3, 68, 34, 0, 1587, 1589,
  930. 5, 35, 0, 0, 1588, 1587, 1, 0, 0, 0, 1588, 1589, 1, 0, 0, 0, 1589, 1590,
  931. 1, 0, 0, 0, 1590, 1592, 3, 172, 86, 0, 1591, 1588, 1, 0, 0, 0, 1591, 1592,
  932. 1, 0, 0, 0, 1592, 1594, 1, 0, 0, 0, 1593, 1581, 1, 0, 0, 0, 1593, 1582,
  933. 1, 0, 0, 0, 1593, 1586, 1, 0, 0, 0, 1594, 99, 1, 0, 0, 0, 1595, 1610, 5,
  934. 5, 0, 0, 1596, 1598, 5, 102, 0, 0, 1597, 1596, 1, 0, 0, 0, 1597, 1598,
  935. 1, 0, 0, 0, 1598, 1604, 1, 0, 0, 0, 1599, 1601, 7, 18, 0, 0, 1600, 1602,
  936. 5, 112, 0, 0, 1601, 1600, 1, 0, 0, 0, 1601, 1602, 1, 0, 0, 0, 1602, 1605,
  937. 1, 0, 0, 0, 1603, 1605, 5, 89, 0, 0, 1604, 1599, 1, 0, 0, 0, 1604, 1603,
  938. 1, 0, 0, 0, 1604, 1605, 1, 0, 0, 0, 1605, 1606, 1, 0, 0, 0, 1606, 1610,
  939. 5, 96, 0, 0, 1607, 1608, 5, 53, 0, 0, 1608, 1610, 5, 96, 0, 0, 1609, 1595,
  940. 1, 0, 0, 0, 1609, 1597, 1, 0, 0, 0, 1609, 1607, 1, 0, 0, 0, 1610, 101,
  941. 1, 0, 0, 0, 1611, 1612, 5, 109, 0, 0, 1612, 1626, 3, 68, 34, 0, 1613, 1614,
  942. 5, 145, 0, 0, 1614, 1615, 5, 3, 0, 0, 1615, 1620, 3, 190, 95, 0, 1616,
  943. 1617, 5, 5, 0, 0, 1617, 1619, 3, 190, 95, 0, 1618, 1616, 1, 0, 0, 0, 1619,
  944. 1622, 1, 0, 0, 0, 1620, 1618, 1, 0, 0, 0, 1620, 1621, 1, 0, 0, 0, 1621,
  945. 1623, 1, 0, 0, 0, 1622, 1620, 1, 0, 0, 0, 1623, 1624, 5, 4, 0, 0, 1624,
  946. 1626, 1, 0, 0, 0, 1625, 1611, 1, 0, 0, 0, 1625, 1613, 1, 0, 0, 0, 1625,
  947. 1626, 1, 0, 0, 0, 1626, 103, 1, 0, 0, 0, 1627, 1629, 5, 142, 0, 0, 1628,
  948. 1630, 5, 31, 0, 0, 1629, 1628, 1, 0, 0, 0, 1629, 1630, 1, 0, 0, 0, 1630,
  949. 1634, 1, 0, 0, 0, 1631, 1634, 5, 92, 0, 0, 1632, 1634, 5, 70, 0, 0, 1633,
  950. 1627, 1, 0, 0, 0, 1633, 1631, 1, 0, 0, 0, 1633, 1632, 1, 0, 0, 0, 1634,
  951. 105, 1, 0, 0, 0, 1635, 1637, 3, 50, 25, 0, 1636, 1635, 1, 0, 0, 0, 1636,
  952. 1637, 1, 0, 0, 0, 1637, 1638, 1, 0, 0, 0, 1638, 1641, 5, 144, 0, 0, 1639,
  953. 1640, 5, 110, 0, 0, 1640, 1642, 7, 8, 0, 0, 1641, 1639, 1, 0, 0, 0, 1641,
  954. 1642, 1, 0, 0, 0, 1642, 1643, 1, 0, 0, 0, 1643, 1644, 3, 112, 56, 0, 1644,
  955. 1647, 5, 133, 0, 0, 1645, 1648, 3, 190, 95, 0, 1646, 1648, 3, 108, 54,
  956. 0, 1647, 1645, 1, 0, 0, 0, 1647, 1646, 1, 0, 0, 0, 1648, 1649, 1, 0, 0,
  957. 0, 1649, 1650, 5, 6, 0, 0, 1650, 1661, 3, 68, 34, 0, 1651, 1654, 5, 5,
  958. 0, 0, 1652, 1655, 3, 190, 95, 0, 1653, 1655, 3, 108, 54, 0, 1654, 1652,
  959. 1, 0, 0, 0, 1654, 1653, 1, 0, 0, 0, 1655, 1656, 1, 0, 0, 0, 1656, 1657,
  960. 5, 6, 0, 0, 1657, 1658, 3, 68, 34, 0, 1658, 1660, 1, 0, 0, 0, 1659, 1651,
  961. 1, 0, 0, 0, 1660, 1663, 1, 0, 0, 0, 1661, 1659, 1, 0, 0, 0, 1661, 1662,
  962. 1, 0, 0, 0, 1662, 1666, 1, 0, 0, 0, 1663, 1661, 1, 0, 0, 0, 1664, 1665,
  963. 5, 151, 0, 0, 1665, 1667, 3, 68, 34, 0, 1666, 1664, 1, 0, 0, 0, 1666, 1667,
  964. 1, 0, 0, 0, 1667, 1669, 1, 0, 0, 0, 1668, 1670, 3, 58, 29, 0, 1669, 1668,
  965. 1, 0, 0, 0, 1669, 1670, 1, 0, 0, 0, 1670, 107, 1, 0, 0, 0, 1671, 1672,
  966. 5, 3, 0, 0, 1672, 1677, 3, 190, 95, 0, 1673, 1674, 5, 5, 0, 0, 1674, 1676,
  967. 3, 190, 95, 0, 1675, 1673, 1, 0, 0, 0, 1676, 1679, 1, 0, 0, 0, 1677, 1675,
  968. 1, 0, 0, 0, 1677, 1678, 1, 0, 0, 0, 1678, 1680, 1, 0, 0, 0, 1679, 1677,
  969. 1, 0, 0, 0, 1680, 1681, 5, 4, 0, 0, 1681, 109, 1, 0, 0, 0, 1682, 1684,
  970. 3, 50, 25, 0, 1683, 1682, 1, 0, 0, 0, 1683, 1684, 1, 0, 0, 0, 1684, 1685,
  971. 1, 0, 0, 0, 1685, 1688, 5, 144, 0, 0, 1686, 1687, 5, 110, 0, 0, 1687, 1689,
  972. 7, 8, 0, 0, 1688, 1686, 1, 0, 0, 0, 1688, 1689, 1, 0, 0, 0, 1689, 1690,
  973. 1, 0, 0, 0, 1690, 1691, 3, 112, 56, 0, 1691, 1694, 5, 133, 0, 0, 1692,
  974. 1695, 3, 190, 95, 0, 1693, 1695, 3, 108, 54, 0, 1694, 1692, 1, 0, 0, 0,
  975. 1694, 1693, 1, 0, 0, 0, 1695, 1696, 1, 0, 0, 0, 1696, 1697, 5, 6, 0, 0,
  976. 1697, 1708, 3, 68, 34, 0, 1698, 1701, 5, 5, 0, 0, 1699, 1702, 3, 190, 95,
  977. 0, 1700, 1702, 3, 108, 54, 0, 1701, 1699, 1, 0, 0, 0, 1701, 1700, 1, 0,
  978. 0, 0, 1702, 1703, 1, 0, 0, 0, 1703, 1704, 5, 6, 0, 0, 1704, 1705, 3, 68,
  979. 34, 0, 1705, 1707, 1, 0, 0, 0, 1706, 1698, 1, 0, 0, 0, 1707, 1710, 1, 0,
  980. 0, 0, 1708, 1706, 1, 0, 0, 0, 1708, 1709, 1, 0, 0, 0, 1709, 1713, 1, 0,
  981. 0, 0, 1710, 1708, 1, 0, 0, 0, 1711, 1712, 5, 151, 0, 0, 1712, 1714, 3,
  982. 68, 34, 0, 1713, 1711, 1, 0, 0, 0, 1713, 1714, 1, 0, 0, 0, 1714, 1719,
  983. 1, 0, 0, 0, 1715, 1717, 3, 134, 67, 0, 1716, 1715, 1, 0, 0, 0, 1716, 1717,
  984. 1, 0, 0, 0, 1717, 1718, 1, 0, 0, 0, 1718, 1720, 3, 136, 68, 0, 1719, 1716,
  985. 1, 0, 0, 0, 1719, 1720, 1, 0, 0, 0, 1720, 111, 1, 0, 0, 0, 1721, 1722,
  986. 3, 182, 91, 0, 1722, 1723, 5, 2, 0, 0, 1723, 1725, 1, 0, 0, 0, 1724, 1721,
  987. 1, 0, 0, 0, 1724, 1725, 1, 0, 0, 0, 1725, 1726, 1, 0, 0, 0, 1726, 1729,
  988. 3, 184, 92, 0, 1727, 1728, 5, 35, 0, 0, 1728, 1730, 3, 216, 108, 0, 1729,
  989. 1727, 1, 0, 0, 0, 1729, 1730, 1, 0, 0, 0, 1730, 1736, 1, 0, 0, 0, 1731,
  990. 1732, 5, 87, 0, 0, 1732, 1733, 5, 42, 0, 0, 1733, 1737, 3, 196, 98, 0,
  991. 1734, 1735, 5, 104, 0, 0, 1735, 1737, 5, 87, 0, 0, 1736, 1731, 1, 0, 0,
  992. 0, 1736, 1734, 1, 0, 0, 0, 1736, 1737, 1, 0, 0, 0, 1737, 113, 1, 0, 0,
  993. 0, 1738, 1740, 5, 146, 0, 0, 1739, 1741, 3, 182, 91, 0, 1740, 1739, 1,
  994. 0, 0, 0, 1740, 1741, 1, 0, 0, 0, 1741, 1744, 1, 0, 0, 0, 1742, 1743, 5,
  995. 93, 0, 0, 1743, 1745, 3, 218, 109, 0, 1744, 1742, 1, 0, 0, 0, 1744, 1745,
  996. 1, 0, 0, 0, 1745, 115, 1, 0, 0, 0, 1746, 1747, 5, 181, 0, 0, 1747, 1748,
  997. 5, 3, 0, 0, 1748, 1749, 5, 151, 0, 0, 1749, 1750, 3, 68, 34, 0, 1750, 1751,
  998. 5, 4, 0, 0, 1751, 117, 1, 0, 0, 0, 1752, 1754, 5, 3, 0, 0, 1753, 1755,
  999. 3, 220, 110, 0, 1754, 1753, 1, 0, 0, 0, 1754, 1755, 1, 0, 0, 0, 1755, 1766,
  1000. 1, 0, 0, 0, 1756, 1757, 5, 156, 0, 0, 1757, 1758, 5, 42, 0, 0, 1758, 1763,
  1001. 3, 68, 34, 0, 1759, 1760, 5, 5, 0, 0, 1760, 1762, 3, 68, 34, 0, 1761, 1759,
  1002. 1, 0, 0, 0, 1762, 1765, 1, 0, 0, 0, 1763, 1761, 1, 0, 0, 0, 1763, 1764,
  1003. 1, 0, 0, 0, 1764, 1767, 1, 0, 0, 0, 1765, 1763, 1, 0, 0, 0, 1766, 1756,
  1004. 1, 0, 0, 0, 1766, 1767, 1, 0, 0, 0, 1767, 1768, 1, 0, 0, 0, 1768, 1769,
  1005. 5, 111, 0, 0, 1769, 1770, 5, 42, 0, 0, 1770, 1775, 3, 138, 69, 0, 1771,
  1006. 1772, 5, 5, 0, 0, 1772, 1774, 3, 138, 69, 0, 1773, 1771, 1, 0, 0, 0, 1774,
  1007. 1777, 1, 0, 0, 0, 1775, 1773, 1, 0, 0, 0, 1775, 1776, 1, 0, 0, 0, 1776,
  1008. 1779, 1, 0, 0, 0, 1777, 1775, 1, 0, 0, 0, 1778, 1780, 3, 122, 61, 0, 1779,
  1009. 1778, 1, 0, 0, 0, 1779, 1780, 1, 0, 0, 0, 1780, 1781, 1, 0, 0, 0, 1781,
  1010. 1782, 5, 4, 0, 0, 1782, 119, 1, 0, 0, 0, 1783, 1817, 5, 155, 0, 0, 1784,
  1011. 1818, 3, 214, 107, 0, 1785, 1787, 5, 3, 0, 0, 1786, 1788, 3, 220, 110,
  1012. 0, 1787, 1786, 1, 0, 0, 0, 1787, 1788, 1, 0, 0, 0, 1788, 1799, 1, 0, 0,
  1013. 0, 1789, 1790, 5, 156, 0, 0, 1790, 1791, 5, 42, 0, 0, 1791, 1796, 3, 68,
  1014. 34, 0, 1792, 1793, 5, 5, 0, 0, 1793, 1795, 3, 68, 34, 0, 1794, 1792, 1,
  1015. 0, 0, 0, 1795, 1798, 1, 0, 0, 0, 1796, 1794, 1, 0, 0, 0, 1796, 1797, 1,
  1016. 0, 0, 0, 1797, 1800, 1, 0, 0, 0, 1798, 1796, 1, 0, 0, 0, 1799, 1789, 1,
  1017. 0, 0, 0, 1799, 1800, 1, 0, 0, 0, 1800, 1811, 1, 0, 0, 0, 1801, 1802, 5,
  1018. 111, 0, 0, 1802, 1803, 5, 42, 0, 0, 1803, 1808, 3, 138, 69, 0, 1804, 1805,
  1019. 5, 5, 0, 0, 1805, 1807, 3, 138, 69, 0, 1806, 1804, 1, 0, 0, 0, 1807, 1810,
  1020. 1, 0, 0, 0, 1808, 1806, 1, 0, 0, 0, 1808, 1809, 1, 0, 0, 0, 1809, 1812,
  1021. 1, 0, 0, 0, 1810, 1808, 1, 0, 0, 0, 1811, 1801, 1, 0, 0, 0, 1811, 1812,
  1022. 1, 0, 0, 0, 1812, 1814, 1, 0, 0, 0, 1813, 1815, 3, 122, 61, 0, 1814, 1813,
  1023. 1, 0, 0, 0, 1814, 1815, 1, 0, 0, 0, 1815, 1816, 1, 0, 0, 0, 1816, 1818,
  1024. 5, 4, 0, 0, 1817, 1784, 1, 0, 0, 0, 1817, 1785, 1, 0, 0, 0, 1818, 121,
  1025. 1, 0, 0, 0, 1819, 1827, 3, 124, 62, 0, 1820, 1821, 5, 183, 0, 0, 1821,
  1026. 1822, 5, 103, 0, 0, 1822, 1828, 5, 185, 0, 0, 1823, 1824, 5, 160, 0, 0,
  1027. 1824, 1828, 5, 129, 0, 0, 1825, 1828, 5, 80, 0, 0, 1826, 1828, 5, 184,
  1028. 0, 0, 1827, 1820, 1, 0, 0, 0, 1827, 1823, 1, 0, 0, 0, 1827, 1825, 1, 0,
  1029. 0, 0, 1827, 1826, 1, 0, 0, 0, 1827, 1828, 1, 0, 0, 0, 1828, 123, 1, 0,
  1030. 0, 0, 1829, 1836, 7, 19, 0, 0, 1830, 1837, 3, 146, 73, 0, 1831, 1832, 5,
  1031. 41, 0, 0, 1832, 1833, 3, 142, 71, 0, 1833, 1834, 5, 34, 0, 0, 1834, 1835,
  1032. 3, 144, 72, 0, 1835, 1837, 1, 0, 0, 0, 1836, 1830, 1, 0, 0, 0, 1836, 1831,
  1033. 1, 0, 0, 0, 1837, 125, 1, 0, 0, 0, 1838, 1839, 3, 222, 111, 0, 1839, 1849,
  1034. 5, 3, 0, 0, 1840, 1845, 3, 68, 34, 0, 1841, 1842, 5, 5, 0, 0, 1842, 1844,
  1035. 3, 68, 34, 0, 1843, 1841, 1, 0, 0, 0, 1844, 1847, 1, 0, 0, 0, 1845, 1843,
  1036. 1, 0, 0, 0, 1845, 1846, 1, 0, 0, 0, 1846, 1850, 1, 0, 0, 0, 1847, 1845,
  1037. 1, 0, 0, 0, 1848, 1850, 5, 7, 0, 0, 1849, 1840, 1, 0, 0, 0, 1849, 1848,
  1038. 1, 0, 0, 0, 1850, 1851, 1, 0, 0, 0, 1851, 1852, 5, 4, 0, 0, 1852, 127,
  1039. 1, 0, 0, 0, 1853, 1854, 3, 224, 112, 0, 1854, 1867, 5, 3, 0, 0, 1855, 1857,
  1040. 5, 64, 0, 0, 1856, 1855, 1, 0, 0, 0, 1856, 1857, 1, 0, 0, 0, 1857, 1858,
  1041. 1, 0, 0, 0, 1858, 1863, 3, 68, 34, 0, 1859, 1860, 5, 5, 0, 0, 1860, 1862,
  1042. 3, 68, 34, 0, 1861, 1859, 1, 0, 0, 0, 1862, 1865, 1, 0, 0, 0, 1863, 1861,
  1043. 1, 0, 0, 0, 1863, 1864, 1, 0, 0, 0, 1864, 1868, 1, 0, 0, 0, 1865, 1863,
  1044. 1, 0, 0, 0, 1866, 1868, 5, 7, 0, 0, 1867, 1856, 1, 0, 0, 0, 1867, 1866,
  1045. 1, 0, 0, 0, 1867, 1868, 1, 0, 0, 0, 1868, 1869, 1, 0, 0, 0, 1869, 1871,
  1046. 5, 4, 0, 0, 1870, 1872, 3, 116, 58, 0, 1871, 1870, 1, 0, 0, 0, 1871, 1872,
  1047. 1, 0, 0, 0, 1872, 129, 1, 0, 0, 0, 1873, 1874, 3, 148, 74, 0, 1874, 1884,
  1048. 5, 3, 0, 0, 1875, 1880, 3, 68, 34, 0, 1876, 1877, 5, 5, 0, 0, 1877, 1879,
  1049. 3, 68, 34, 0, 1878, 1876, 1, 0, 0, 0, 1879, 1882, 1, 0, 0, 0, 1880, 1878,
  1050. 1, 0, 0, 0, 1880, 1881, 1, 0, 0, 0, 1881, 1885, 1, 0, 0, 0, 1882, 1880,
  1051. 1, 0, 0, 0, 1883, 1885, 5, 7, 0, 0, 1884, 1875, 1, 0, 0, 0, 1884, 1883,
  1052. 1, 0, 0, 0, 1884, 1885, 1, 0, 0, 0, 1885, 1886, 1, 0, 0, 0, 1886, 1888,
  1053. 5, 4, 0, 0, 1887, 1889, 3, 116, 58, 0, 1888, 1887, 1, 0, 0, 0, 1888, 1889,
  1054. 1, 0, 0, 0, 1889, 1890, 1, 0, 0, 0, 1890, 1893, 5, 155, 0, 0, 1891, 1894,
  1055. 3, 118, 59, 0, 1892, 1894, 3, 214, 107, 0, 1893, 1891, 1, 0, 0, 0, 1893,
  1056. 1892, 1, 0, 0, 0, 1894, 131, 1, 0, 0, 0, 1895, 1897, 5, 152, 0, 0, 1896,
  1057. 1898, 5, 118, 0, 0, 1897, 1896, 1, 0, 0, 0, 1897, 1898, 1, 0, 0, 0, 1898,
  1058. 1899, 1, 0, 0, 0, 1899, 1904, 3, 56, 28, 0, 1900, 1901, 5, 5, 0, 0, 1901,
  1059. 1903, 3, 56, 28, 0, 1902, 1900, 1, 0, 0, 0, 1903, 1906, 1, 0, 0, 0, 1904,
  1060. 1902, 1, 0, 0, 0, 1904, 1905, 1, 0, 0, 0, 1905, 133, 1, 0, 0, 0, 1906,
  1061. 1904, 1, 0, 0, 0, 1907, 1908, 5, 111, 0, 0, 1908, 1909, 5, 42, 0, 0, 1909,
  1062. 1914, 3, 138, 69, 0, 1910, 1911, 5, 5, 0, 0, 1911, 1913, 3, 138, 69, 0,
  1063. 1912, 1910, 1, 0, 0, 0, 1913, 1916, 1, 0, 0, 0, 1914, 1912, 1, 0, 0, 0,
  1064. 1914, 1915, 1, 0, 0, 0, 1915, 135, 1, 0, 0, 0, 1916, 1914, 1, 0, 0, 0,
  1065. 1917, 1918, 5, 100, 0, 0, 1918, 1921, 3, 68, 34, 0, 1919, 1920, 7, 20,
  1066. 0, 0, 1920, 1922, 3, 68, 34, 0, 1921, 1919, 1, 0, 0, 0, 1921, 1922, 1,
  1067. 0, 0, 0, 1922, 137, 1, 0, 0, 0, 1923, 1926, 3, 68, 34, 0, 1924, 1925, 5,
  1068. 47, 0, 0, 1925, 1927, 3, 192, 96, 0, 1926, 1924, 1, 0, 0, 0, 1926, 1927,
  1069. 1, 0, 0, 0, 1927, 1929, 1, 0, 0, 0, 1928, 1930, 3, 140, 70, 0, 1929, 1928,
  1070. 1, 0, 0, 0, 1929, 1930, 1, 0, 0, 0, 1930, 1933, 1, 0, 0, 0, 1931, 1932,
  1071. 5, 178, 0, 0, 1932, 1934, 7, 21, 0, 0, 1933, 1931, 1, 0, 0, 0, 1933, 1934,
  1072. 1, 0, 0, 0, 1934, 139, 1, 0, 0, 0, 1935, 1936, 7, 22, 0, 0, 1936, 141,
  1073. 1, 0, 0, 0, 1937, 1938, 3, 68, 34, 0, 1938, 1939, 5, 158, 0, 0, 1939, 1948,
  1074. 1, 0, 0, 0, 1940, 1941, 3, 68, 34, 0, 1941, 1942, 5, 161, 0, 0, 1942, 1948,
  1075. 1, 0, 0, 0, 1943, 1944, 5, 160, 0, 0, 1944, 1948, 5, 129, 0, 0, 1945, 1946,
  1076. 5, 159, 0, 0, 1946, 1948, 5, 158, 0, 0, 1947, 1937, 1, 0, 0, 0, 1947, 1940,
  1077. 1, 0, 0, 0, 1947, 1943, 1, 0, 0, 0, 1947, 1945, 1, 0, 0, 0, 1948, 143,
  1078. 1, 0, 0, 0, 1949, 1950, 3, 68, 34, 0, 1950, 1951, 5, 158, 0, 0, 1951, 1960,
  1079. 1, 0, 0, 0, 1952, 1953, 3, 68, 34, 0, 1953, 1954, 5, 161, 0, 0, 1954, 1960,
  1080. 1, 0, 0, 0, 1955, 1956, 5, 160, 0, 0, 1956, 1960, 5, 129, 0, 0, 1957, 1958,
  1081. 5, 159, 0, 0, 1958, 1960, 5, 161, 0, 0, 1959, 1949, 1, 0, 0, 0, 1959, 1952,
  1082. 1, 0, 0, 0, 1959, 1955, 1, 0, 0, 0, 1959, 1957, 1, 0, 0, 0, 1960, 145,
  1083. 1, 0, 0, 0, 1961, 1962, 3, 68, 34, 0, 1962, 1963, 5, 158, 0, 0, 1963, 1969,
  1084. 1, 0, 0, 0, 1964, 1965, 5, 159, 0, 0, 1965, 1969, 5, 158, 0, 0, 1966, 1967,
  1085. 5, 160, 0, 0, 1967, 1969, 5, 129, 0, 0, 1968, 1961, 1, 0, 0, 0, 1968, 1964,
  1086. 1, 0, 0, 0, 1968, 1966, 1, 0, 0, 0, 1969, 147, 1, 0, 0, 0, 1970, 1971,
  1087. 7, 23, 0, 0, 1971, 1972, 5, 3, 0, 0, 1972, 1973, 3, 68, 34, 0, 1973, 1974,
  1088. 5, 4, 0, 0, 1974, 1975, 5, 155, 0, 0, 1975, 1977, 5, 3, 0, 0, 1976, 1978,
  1089. 3, 154, 77, 0, 1977, 1976, 1, 0, 0, 0, 1977, 1978, 1, 0, 0, 0, 1978, 1979,
  1090. 1, 0, 0, 0, 1979, 1981, 3, 158, 79, 0, 1980, 1982, 3, 124, 62, 0, 1981,
  1091. 1980, 1, 0, 0, 0, 1981, 1982, 1, 0, 0, 0, 1982, 1983, 1, 0, 0, 0, 1983,
  1092. 1984, 5, 4, 0, 0, 1984, 2056, 1, 0, 0, 0, 1985, 1986, 7, 24, 0, 0, 1986,
  1093. 1987, 5, 3, 0, 0, 1987, 1988, 5, 4, 0, 0, 1988, 1989, 5, 155, 0, 0, 1989,
  1094. 1991, 5, 3, 0, 0, 1990, 1992, 3, 154, 77, 0, 1991, 1990, 1, 0, 0, 0, 1991,
  1095. 1992, 1, 0, 0, 0, 1992, 1994, 1, 0, 0, 0, 1993, 1995, 3, 156, 78, 0, 1994,
  1096. 1993, 1, 0, 0, 0, 1994, 1995, 1, 0, 0, 0, 1995, 1996, 1, 0, 0, 0, 1996,
  1097. 2056, 5, 4, 0, 0, 1997, 1998, 7, 25, 0, 0, 1998, 1999, 5, 3, 0, 0, 1999,
  1098. 2000, 5, 4, 0, 0, 2000, 2001, 5, 155, 0, 0, 2001, 2003, 5, 3, 0, 0, 2002,
  1099. 2004, 3, 154, 77, 0, 2003, 2002, 1, 0, 0, 0, 2003, 2004, 1, 0, 0, 0, 2004,
  1100. 2005, 1, 0, 0, 0, 2005, 2006, 3, 158, 79, 0, 2006, 2007, 5, 4, 0, 0, 2007,
  1101. 2056, 1, 0, 0, 0, 2008, 2009, 7, 26, 0, 0, 2009, 2010, 5, 3, 0, 0, 2010,
  1102. 2012, 3, 68, 34, 0, 2011, 2013, 3, 150, 75, 0, 2012, 2011, 1, 0, 0, 0,
  1103. 2012, 2013, 1, 0, 0, 0, 2013, 2015, 1, 0, 0, 0, 2014, 2016, 3, 152, 76,
  1104. 0, 2015, 2014, 1, 0, 0, 0, 2015, 2016, 1, 0, 0, 0, 2016, 2017, 1, 0, 0,
  1105. 0, 2017, 2018, 5, 4, 0, 0, 2018, 2019, 5, 155, 0, 0, 2019, 2021, 5, 3,
  1106. 0, 0, 2020, 2022, 3, 154, 77, 0, 2021, 2020, 1, 0, 0, 0, 2021, 2022, 1,
  1107. 0, 0, 0, 2022, 2023, 1, 0, 0, 0, 2023, 2024, 3, 158, 79, 0, 2024, 2025,
  1108. 5, 4, 0, 0, 2025, 2056, 1, 0, 0, 0, 2026, 2027, 5, 167, 0, 0, 2027, 2028,
  1109. 5, 3, 0, 0, 2028, 2029, 3, 68, 34, 0, 2029, 2030, 5, 5, 0, 0, 2030, 2031,
  1110. 3, 36, 18, 0, 2031, 2032, 5, 4, 0, 0, 2032, 2033, 5, 155, 0, 0, 2033, 2035,
  1111. 5, 3, 0, 0, 2034, 2036, 3, 154, 77, 0, 2035, 2034, 1, 0, 0, 0, 2035, 2036,
  1112. 1, 0, 0, 0, 2036, 2037, 1, 0, 0, 0, 2037, 2039, 3, 158, 79, 0, 2038, 2040,
  1113. 3, 124, 62, 0, 2039, 2038, 1, 0, 0, 0, 2039, 2040, 1, 0, 0, 0, 2040, 2041,
  1114. 1, 0, 0, 0, 2041, 2042, 5, 4, 0, 0, 2042, 2056, 1, 0, 0, 0, 2043, 2044,
  1115. 5, 168, 0, 0, 2044, 2045, 5, 3, 0, 0, 2045, 2046, 3, 68, 34, 0, 2046, 2047,
  1116. 5, 4, 0, 0, 2047, 2048, 5, 155, 0, 0, 2048, 2050, 5, 3, 0, 0, 2049, 2051,
  1117. 3, 154, 77, 0, 2050, 2049, 1, 0, 0, 0, 2050, 2051, 1, 0, 0, 0, 2051, 2052,
  1118. 1, 0, 0, 0, 2052, 2053, 3, 158, 79, 0, 2053, 2054, 5, 4, 0, 0, 2054, 2056,
  1119. 1, 0, 0, 0, 2055, 1970, 1, 0, 0, 0, 2055, 1985, 1, 0, 0, 0, 2055, 1997,
  1120. 1, 0, 0, 0, 2055, 2008, 1, 0, 0, 0, 2055, 2026, 1, 0, 0, 0, 2055, 2043,
  1121. 1, 0, 0, 0, 2056, 149, 1, 0, 0, 0, 2057, 2058, 5, 5, 0, 0, 2058, 2059,
  1122. 3, 36, 18, 0, 2059, 151, 1, 0, 0, 0, 2060, 2061, 5, 5, 0, 0, 2061, 2062,
  1123. 3, 36, 18, 0, 2062, 153, 1, 0, 0, 0, 2063, 2064, 5, 156, 0, 0, 2064, 2066,
  1124. 5, 42, 0, 0, 2065, 2067, 3, 68, 34, 0, 2066, 2065, 1, 0, 0, 0, 2067, 2068,
  1125. 1, 0, 0, 0, 2068, 2066, 1, 0, 0, 0, 2068, 2069, 1, 0, 0, 0, 2069, 155,
  1126. 1, 0, 0, 0, 2070, 2071, 5, 111, 0, 0, 2071, 2073, 5, 42, 0, 0, 2072, 2074,
  1127. 3, 68, 34, 0, 2073, 2072, 1, 0, 0, 0, 2074, 2075, 1, 0, 0, 0, 2075, 2073,
  1128. 1, 0, 0, 0, 2075, 2076, 1, 0, 0, 0, 2076, 157, 1, 0, 0, 0, 2077, 2078,
  1129. 5, 111, 0, 0, 2078, 2079, 5, 42, 0, 0, 2079, 2080, 3, 158, 79, 0, 2080,
  1130. 159, 1, 0, 0, 0, 2081, 2083, 3, 68, 34, 0, 2082, 2084, 3, 140, 70, 0, 2083,
  1131. 2082, 1, 0, 0, 0, 2083, 2084, 1, 0, 0, 0, 2084, 2092, 1, 0, 0, 0, 2085,
  1132. 2086, 5, 5, 0, 0, 2086, 2088, 3, 68, 34, 0, 2087, 2089, 3, 140, 70, 0,
  1133. 2088, 2087, 1, 0, 0, 0, 2088, 2089, 1, 0, 0, 0, 2089, 2091, 1, 0, 0, 0,
  1134. 2090, 2085, 1, 0, 0, 0, 2091, 2094, 1, 0, 0, 0, 2092, 2090, 1, 0, 0, 0,
  1135. 2092, 2093, 1, 0, 0, 0, 2093, 161, 1, 0, 0, 0, 2094, 2092, 1, 0, 0, 0,
  1136. 2095, 2096, 3, 84, 42, 0, 2096, 163, 1, 0, 0, 0, 2097, 2098, 3, 84, 42,
  1137. 0, 2098, 165, 1, 0, 0, 0, 2099, 2100, 7, 27, 0, 0, 2100, 167, 1, 0, 0,
  1138. 0, 2101, 2102, 5, 192, 0, 0, 2102, 169, 1, 0, 0, 0, 2103, 2106, 3, 68,
  1139. 34, 0, 2104, 2106, 3, 30, 15, 0, 2105, 2103, 1, 0, 0, 0, 2105, 2104, 1,
  1140. 0, 0, 0, 2106, 171, 1, 0, 0, 0, 2107, 2108, 7, 28, 0, 0, 2108, 173, 1,
  1141. 0, 0, 0, 2109, 2110, 7, 29, 0, 0, 2110, 175, 1, 0, 0, 0, 2111, 2112, 3,
  1142. 228, 114, 0, 2112, 177, 1, 0, 0, 0, 2113, 2114, 3, 228, 114, 0, 2114, 179,
  1143. 1, 0, 0, 0, 2115, 2116, 3, 182, 91, 0, 2116, 2117, 5, 2, 0, 0, 2117, 2119,
  1144. 1, 0, 0, 0, 2118, 2115, 1, 0, 0, 0, 2118, 2119, 1, 0, 0, 0, 2119, 2120,
  1145. 1, 0, 0, 0, 2120, 2121, 3, 178, 89, 0, 2121, 181, 1, 0, 0, 0, 2122, 2123,
  1146. 3, 228, 114, 0, 2123, 183, 1, 0, 0, 0, 2124, 2125, 3, 228, 114, 0, 2125,
  1147. 185, 1, 0, 0, 0, 2126, 2127, 3, 228, 114, 0, 2127, 187, 1, 0, 0, 0, 2128,
  1148. 2129, 3, 228, 114, 0, 2129, 189, 1, 0, 0, 0, 2130, 2131, 3, 228, 114, 0,
  1149. 2131, 191, 1, 0, 0, 0, 2132, 2133, 3, 228, 114, 0, 2133, 193, 1, 0, 0,
  1150. 0, 2134, 2135, 3, 228, 114, 0, 2135, 195, 1, 0, 0, 0, 2136, 2137, 3, 228,
  1151. 114, 0, 2137, 197, 1, 0, 0, 0, 2138, 2139, 3, 228, 114, 0, 2139, 199, 1,
  1152. 0, 0, 0, 2140, 2141, 3, 228, 114, 0, 2141, 201, 1, 0, 0, 0, 2142, 2143,
  1153. 3, 228, 114, 0, 2143, 203, 1, 0, 0, 0, 2144, 2145, 3, 228, 114, 0, 2145,
  1154. 205, 1, 0, 0, 0, 2146, 2147, 3, 228, 114, 0, 2147, 207, 1, 0, 0, 0, 2148,
  1155. 2149, 7, 28, 0, 0, 2149, 209, 1, 0, 0, 0, 2150, 2151, 3, 228, 114, 0, 2151,
  1156. 211, 1, 0, 0, 0, 2152, 2153, 3, 228, 114, 0, 2153, 213, 1, 0, 0, 0, 2154,
  1157. 2155, 3, 228, 114, 0, 2155, 215, 1, 0, 0, 0, 2156, 2157, 3, 228, 114, 0,
  1158. 2157, 217, 1, 0, 0, 0, 2158, 2159, 3, 228, 114, 0, 2159, 219, 1, 0, 0,
  1159. 0, 2160, 2161, 3, 228, 114, 0, 2161, 221, 1, 0, 0, 0, 2162, 2163, 3, 228,
  1160. 114, 0, 2163, 223, 1, 0, 0, 0, 2164, 2165, 3, 228, 114, 0, 2165, 225, 1,
  1161. 0, 0, 0, 2166, 2167, 3, 228, 114, 0, 2167, 227, 1, 0, 0, 0, 2168, 2176,
  1162. 5, 188, 0, 0, 2169, 2176, 3, 174, 87, 0, 2170, 2176, 5, 192, 0, 0, 2171,
  1163. 2172, 5, 3, 0, 0, 2172, 2173, 3, 228, 114, 0, 2173, 2174, 5, 4, 0, 0, 2174,
  1164. 2176, 1, 0, 0, 0, 2175, 2168, 1, 0, 0, 0, 2175, 2169, 1, 0, 0, 0, 2175,
  1165. 2170, 1, 0, 0, 0, 2175, 2171, 1, 0, 0, 0, 2176, 229, 1, 0, 0, 0, 314, 233,
  1166. 241, 248, 253, 259, 265, 267, 293, 300, 307, 313, 317, 322, 325, 332, 335,
  1167. 339, 347, 351, 353, 357, 361, 365, 368, 375, 381, 387, 392, 403, 409, 413,
  1168. 417, 420, 425, 429, 435, 440, 449, 456, 465, 468, 472, 476, 481, 487, 499,
  1169. 503, 508, 511, 514, 519, 522, 536, 543, 550, 552, 555, 561, 566, 574, 579,
  1170. 594, 600, 610, 615, 625, 629, 631, 635, 640, 642, 650, 656, 661, 668, 679,
  1171. 682, 684, 691, 695, 702, 708, 714, 720, 725, 734, 739, 750, 755, 766, 771,
  1172. 775, 791, 801, 806, 814, 826, 831, 842, 845, 847, 853, 856, 858, 862, 866,
  1173. 873, 876, 879, 886, 889, 892, 895, 899, 907, 912, 923, 928, 937, 944, 948,
  1174. 952, 955, 963, 976, 979, 987, 996, 1000, 1005, 1034, 1041, 1052, 1061,
  1175. 1071, 1074, 1080, 1086, 1095, 1098, 1102, 1109, 1115, 1122, 1124, 1126,
  1176. 1135, 1142, 1149, 1155, 1160, 1168, 1173, 1182, 1193, 1200, 1204, 1207,
  1177. 1210, 1214, 1224, 1230, 1232, 1240, 1247, 1254, 1259, 1261, 1267, 1276,
  1178. 1281, 1288, 1292, 1294, 1297, 1305, 1309, 1312, 1321, 1326, 1333, 1342,
  1179. 1346, 1348, 1352, 1361, 1366, 1368, 1381, 1384, 1393, 1404, 1411, 1414,
  1180. 1419, 1423, 1426, 1429, 1434, 1438, 1443, 1446, 1449, 1454, 1458, 1461,
  1181. 1468, 1473, 1482, 1487, 1490, 1498, 1502, 1510, 1513, 1518, 1522, 1525,
  1182. 1532, 1537, 1546, 1551, 1554, 1562, 1566, 1574, 1577, 1579, 1588, 1591,
  1183. 1593, 1597, 1601, 1604, 1609, 1620, 1625, 1629, 1633, 1636, 1641, 1647,
  1184. 1654, 1661, 1666, 1669, 1677, 1683, 1688, 1694, 1701, 1708, 1713, 1716,
  1185. 1719, 1724, 1729, 1736, 1740, 1744, 1754, 1763, 1766, 1775, 1779, 1787,
  1186. 1796, 1799, 1808, 1811, 1814, 1817, 1827, 1836, 1845, 1849, 1856, 1863,
  1187. 1867, 1871, 1880, 1884, 1888, 1893, 1897, 1904, 1914, 1921, 1926, 1929,
  1188. 1933, 1947, 1959, 1968, 1977, 1981, 1991, 1994, 2003, 2012, 2015, 2021,
  1189. 2035, 2039, 2050, 2055, 2068, 2075, 2083, 2088, 2092, 2105, 2118, 2175,
  1190. }
  1191. deserializer := antlr.NewATNDeserializer(nil)
  1192. staticData.atn = deserializer.Deserialize(staticData.serializedATN)
  1193. atn := staticData.atn
  1194. staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState))
  1195. decisionToDFA := staticData.decisionToDFA
  1196. for index, state := range atn.DecisionToState {
  1197. decisionToDFA[index] = antlr.NewDFA(state, index)
  1198. }
  1199. }
  1200. // SQLiteParserInit initializes any static state used to implement SQLiteParser. By default the
  1201. // static state used to implement the parser is lazily initialized during the first call to
  1202. // NewSQLiteParser(). You can call this function if you wish to initialize the static state ahead
  1203. // of time.
  1204. func SQLiteParserInit() {
  1205. staticData := &sqliteparserParserStaticData
  1206. staticData.once.Do(sqliteparserParserInit)
  1207. }
  1208. // NewSQLiteParser produces a new parser instance for the optional input antlr.TokenStream.
  1209. func NewSQLiteParser(input antlr.TokenStream) *SQLiteParser {
  1210. SQLiteParserInit()
  1211. this := new(SQLiteParser)
  1212. this.BaseParser = antlr.NewBaseParser(input)
  1213. staticData := &sqliteparserParserStaticData
  1214. this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.predictionContextCache)
  1215. this.RuleNames = staticData.ruleNames
  1216. this.LiteralNames = staticData.literalNames
  1217. this.SymbolicNames = staticData.symbolicNames
  1218. this.GrammarFileName = "SQLiteParser.g4"
  1219. return this
  1220. }
  1221. // SQLiteParser tokens.
  1222. const (
  1223. SQLiteParserEOF = antlr.TokenEOF
  1224. SQLiteParserSCOL = 1
  1225. SQLiteParserDOT = 2
  1226. SQLiteParserOPEN_PAR = 3
  1227. SQLiteParserCLOSE_PAR = 4
  1228. SQLiteParserCOMMA = 5
  1229. SQLiteParserASSIGN = 6
  1230. SQLiteParserSTAR = 7
  1231. SQLiteParserPLUS = 8
  1232. SQLiteParserPTR2 = 9
  1233. SQLiteParserPTR = 10
  1234. SQLiteParserMINUS = 11
  1235. SQLiteParserTILDE = 12
  1236. SQLiteParserPIPE2 = 13
  1237. SQLiteParserDIV = 14
  1238. SQLiteParserMOD = 15
  1239. SQLiteParserLT2 = 16
  1240. SQLiteParserGT2 = 17
  1241. SQLiteParserAMP = 18
  1242. SQLiteParserPIPE = 19
  1243. SQLiteParserLT = 20
  1244. SQLiteParserLT_EQ = 21
  1245. SQLiteParserGT = 22
  1246. SQLiteParserGT_EQ = 23
  1247. SQLiteParserEQ = 24
  1248. SQLiteParserNOT_EQ1 = 25
  1249. SQLiteParserNOT_EQ2 = 26
  1250. SQLiteParserABORT_ = 27
  1251. SQLiteParserACTION_ = 28
  1252. SQLiteParserADD_ = 29
  1253. SQLiteParserAFTER_ = 30
  1254. SQLiteParserALL_ = 31
  1255. SQLiteParserALTER_ = 32
  1256. SQLiteParserANALYZE_ = 33
  1257. SQLiteParserAND_ = 34
  1258. SQLiteParserAS_ = 35
  1259. SQLiteParserASC_ = 36
  1260. SQLiteParserATTACH_ = 37
  1261. SQLiteParserAUTOINCREMENT_ = 38
  1262. SQLiteParserBEFORE_ = 39
  1263. SQLiteParserBEGIN_ = 40
  1264. SQLiteParserBETWEEN_ = 41
  1265. SQLiteParserBY_ = 42
  1266. SQLiteParserCASCADE_ = 43
  1267. SQLiteParserCASE_ = 44
  1268. SQLiteParserCAST_ = 45
  1269. SQLiteParserCHECK_ = 46
  1270. SQLiteParserCOLLATE_ = 47
  1271. SQLiteParserCOLUMN_ = 48
  1272. SQLiteParserCOMMIT_ = 49
  1273. SQLiteParserCONFLICT_ = 50
  1274. SQLiteParserCONSTRAINT_ = 51
  1275. SQLiteParserCREATE_ = 52
  1276. SQLiteParserCROSS_ = 53
  1277. SQLiteParserCURRENT_DATE_ = 54
  1278. SQLiteParserCURRENT_TIME_ = 55
  1279. SQLiteParserCURRENT_TIMESTAMP_ = 56
  1280. SQLiteParserDATABASE_ = 57
  1281. SQLiteParserDEFAULT_ = 58
  1282. SQLiteParserDEFERRABLE_ = 59
  1283. SQLiteParserDEFERRED_ = 60
  1284. SQLiteParserDELETE_ = 61
  1285. SQLiteParserDESC_ = 62
  1286. SQLiteParserDETACH_ = 63
  1287. SQLiteParserDISTINCT_ = 64
  1288. SQLiteParserDROP_ = 65
  1289. SQLiteParserEACH_ = 66
  1290. SQLiteParserELSE_ = 67
  1291. SQLiteParserEND_ = 68
  1292. SQLiteParserESCAPE_ = 69
  1293. SQLiteParserEXCEPT_ = 70
  1294. SQLiteParserEXCLUSIVE_ = 71
  1295. SQLiteParserEXISTS_ = 72
  1296. SQLiteParserEXPLAIN_ = 73
  1297. SQLiteParserFAIL_ = 74
  1298. SQLiteParserFOR_ = 75
  1299. SQLiteParserFOREIGN_ = 76
  1300. SQLiteParserFROM_ = 77
  1301. SQLiteParserFULL_ = 78
  1302. SQLiteParserGLOB_ = 79
  1303. SQLiteParserGROUP_ = 80
  1304. SQLiteParserHAVING_ = 81
  1305. SQLiteParserIF_ = 82
  1306. SQLiteParserIGNORE_ = 83
  1307. SQLiteParserIMMEDIATE_ = 84
  1308. SQLiteParserIN_ = 85
  1309. SQLiteParserINDEX_ = 86
  1310. SQLiteParserINDEXED_ = 87
  1311. SQLiteParserINITIALLY_ = 88
  1312. SQLiteParserINNER_ = 89
  1313. SQLiteParserINSERT_ = 90
  1314. SQLiteParserINSTEAD_ = 91
  1315. SQLiteParserINTERSECT_ = 92
  1316. SQLiteParserINTO_ = 93
  1317. SQLiteParserIS_ = 94
  1318. SQLiteParserISNULL_ = 95
  1319. SQLiteParserJOIN_ = 96
  1320. SQLiteParserKEY_ = 97
  1321. SQLiteParserLEFT_ = 98
  1322. SQLiteParserLIKE_ = 99
  1323. SQLiteParserLIMIT_ = 100
  1324. SQLiteParserMATCH_ = 101
  1325. SQLiteParserNATURAL_ = 102
  1326. SQLiteParserNO_ = 103
  1327. SQLiteParserNOT_ = 104
  1328. SQLiteParserNOTNULL_ = 105
  1329. SQLiteParserNULL_ = 106
  1330. SQLiteParserOF_ = 107
  1331. SQLiteParserOFFSET_ = 108
  1332. SQLiteParserON_ = 109
  1333. SQLiteParserOR_ = 110
  1334. SQLiteParserORDER_ = 111
  1335. SQLiteParserOUTER_ = 112
  1336. SQLiteParserPLAN_ = 113
  1337. SQLiteParserPRAGMA_ = 114
  1338. SQLiteParserPRIMARY_ = 115
  1339. SQLiteParserQUERY_ = 116
  1340. SQLiteParserRAISE_ = 117
  1341. SQLiteParserRECURSIVE_ = 118
  1342. SQLiteParserREFERENCES_ = 119
  1343. SQLiteParserREGEXP_ = 120
  1344. SQLiteParserREINDEX_ = 121
  1345. SQLiteParserRELEASE_ = 122
  1346. SQLiteParserRENAME_ = 123
  1347. SQLiteParserREPLACE_ = 124
  1348. SQLiteParserRESTRICT_ = 125
  1349. SQLiteParserRETURNING_ = 126
  1350. SQLiteParserRIGHT_ = 127
  1351. SQLiteParserROLLBACK_ = 128
  1352. SQLiteParserROW_ = 129
  1353. SQLiteParserROWS_ = 130
  1354. SQLiteParserSAVEPOINT_ = 131
  1355. SQLiteParserSELECT_ = 132
  1356. SQLiteParserSET_ = 133
  1357. SQLiteParserSTRICT_ = 134
  1358. SQLiteParserTABLE_ = 135
  1359. SQLiteParserTEMP_ = 136
  1360. SQLiteParserTEMPORARY_ = 137
  1361. SQLiteParserTHEN_ = 138
  1362. SQLiteParserTO_ = 139
  1363. SQLiteParserTRANSACTION_ = 140
  1364. SQLiteParserTRIGGER_ = 141
  1365. SQLiteParserUNION_ = 142
  1366. SQLiteParserUNIQUE_ = 143
  1367. SQLiteParserUPDATE_ = 144
  1368. SQLiteParserUSING_ = 145
  1369. SQLiteParserVACUUM_ = 146
  1370. SQLiteParserVALUES_ = 147
  1371. SQLiteParserVIEW_ = 148
  1372. SQLiteParserVIRTUAL_ = 149
  1373. SQLiteParserWHEN_ = 150
  1374. SQLiteParserWHERE_ = 151
  1375. SQLiteParserWITH_ = 152
  1376. SQLiteParserWITHOUT_ = 153
  1377. SQLiteParserFIRST_VALUE_ = 154
  1378. SQLiteParserOVER_ = 155
  1379. SQLiteParserPARTITION_ = 156
  1380. SQLiteParserRANGE_ = 157
  1381. SQLiteParserPRECEDING_ = 158
  1382. SQLiteParserUNBOUNDED_ = 159
  1383. SQLiteParserCURRENT_ = 160
  1384. SQLiteParserFOLLOWING_ = 161
  1385. SQLiteParserCUME_DIST_ = 162
  1386. SQLiteParserDENSE_RANK_ = 163
  1387. SQLiteParserLAG_ = 164
  1388. SQLiteParserLAST_VALUE_ = 165
  1389. SQLiteParserLEAD_ = 166
  1390. SQLiteParserNTH_VALUE_ = 167
  1391. SQLiteParserNTILE_ = 168
  1392. SQLiteParserPERCENT_RANK_ = 169
  1393. SQLiteParserRANK_ = 170
  1394. SQLiteParserROW_NUMBER_ = 171
  1395. SQLiteParserGENERATED_ = 172
  1396. SQLiteParserALWAYS_ = 173
  1397. SQLiteParserSTORED_ = 174
  1398. SQLiteParserTRUE_ = 175
  1399. SQLiteParserFALSE_ = 176
  1400. SQLiteParserWINDOW_ = 177
  1401. SQLiteParserNULLS_ = 178
  1402. SQLiteParserFIRST_ = 179
  1403. SQLiteParserLAST_ = 180
  1404. SQLiteParserFILTER_ = 181
  1405. SQLiteParserGROUPS_ = 182
  1406. SQLiteParserEXCLUDE_ = 183
  1407. SQLiteParserTIES_ = 184
  1408. SQLiteParserOTHERS_ = 185
  1409. SQLiteParserDO_ = 186
  1410. SQLiteParserNOTHING_ = 187
  1411. SQLiteParserIDENTIFIER = 188
  1412. SQLiteParserNUMERIC_LITERAL = 189
  1413. SQLiteParserNUMBERED_BIND_PARAMETER = 190
  1414. SQLiteParserNAMED_BIND_PARAMETER = 191
  1415. SQLiteParserSTRING_LITERAL = 192
  1416. SQLiteParserBLOB_LITERAL = 193
  1417. SQLiteParserSINGLE_LINE_COMMENT = 194
  1418. SQLiteParserMULTILINE_COMMENT = 195
  1419. SQLiteParserSPACES = 196
  1420. SQLiteParserUNEXPECTED_CHAR = 197
  1421. )
  1422. // SQLiteParser rules.
  1423. const (
  1424. SQLiteParserRULE_parse = 0
  1425. SQLiteParserRULE_sql_stmt_list = 1
  1426. SQLiteParserRULE_sql_stmt = 2
  1427. SQLiteParserRULE_alter_table_stmt = 3
  1428. SQLiteParserRULE_analyze_stmt = 4
  1429. SQLiteParserRULE_attach_stmt = 5
  1430. SQLiteParserRULE_begin_stmt = 6
  1431. SQLiteParserRULE_commit_stmt = 7
  1432. SQLiteParserRULE_rollback_stmt = 8
  1433. SQLiteParserRULE_savepoint_stmt = 9
  1434. SQLiteParserRULE_release_stmt = 10
  1435. SQLiteParserRULE_create_index_stmt = 11
  1436. SQLiteParserRULE_indexed_column = 12
  1437. SQLiteParserRULE_table_option = 13
  1438. SQLiteParserRULE_create_table_stmt = 14
  1439. SQLiteParserRULE_column_def = 15
  1440. SQLiteParserRULE_type_name = 16
  1441. SQLiteParserRULE_column_constraint = 17
  1442. SQLiteParserRULE_signed_number = 18
  1443. SQLiteParserRULE_table_constraint = 19
  1444. SQLiteParserRULE_foreign_key_clause = 20
  1445. SQLiteParserRULE_conflict_clause = 21
  1446. SQLiteParserRULE_create_trigger_stmt = 22
  1447. SQLiteParserRULE_create_view_stmt = 23
  1448. SQLiteParserRULE_create_virtual_table_stmt = 24
  1449. SQLiteParserRULE_with_clause = 25
  1450. SQLiteParserRULE_cte_table_name = 26
  1451. SQLiteParserRULE_recursive_cte = 27
  1452. SQLiteParserRULE_common_table_expression = 28
  1453. SQLiteParserRULE_returning_clause = 29
  1454. SQLiteParserRULE_delete_stmt = 30
  1455. SQLiteParserRULE_delete_stmt_limited = 31
  1456. SQLiteParserRULE_detach_stmt = 32
  1457. SQLiteParserRULE_drop_stmt = 33
  1458. SQLiteParserRULE_expr = 34
  1459. SQLiteParserRULE_raise_function = 35
  1460. SQLiteParserRULE_literal_value = 36
  1461. SQLiteParserRULE_insert_stmt = 37
  1462. SQLiteParserRULE_upsert_clause = 38
  1463. SQLiteParserRULE_pragma_stmt = 39
  1464. SQLiteParserRULE_pragma_value = 40
  1465. SQLiteParserRULE_reindex_stmt = 41
  1466. SQLiteParserRULE_select_stmt = 42
  1467. SQLiteParserRULE_join_clause = 43
  1468. SQLiteParserRULE_select_core = 44
  1469. SQLiteParserRULE_factored_select_stmt = 45
  1470. SQLiteParserRULE_simple_select_stmt = 46
  1471. SQLiteParserRULE_compound_select_stmt = 47
  1472. SQLiteParserRULE_table_or_subquery = 48
  1473. SQLiteParserRULE_result_column = 49
  1474. SQLiteParserRULE_join_operator = 50
  1475. SQLiteParserRULE_join_constraint = 51
  1476. SQLiteParserRULE_compound_operator = 52
  1477. SQLiteParserRULE_update_stmt = 53
  1478. SQLiteParserRULE_column_name_list = 54
  1479. SQLiteParserRULE_update_stmt_limited = 55
  1480. SQLiteParserRULE_qualified_table_name = 56
  1481. SQLiteParserRULE_vacuum_stmt = 57
  1482. SQLiteParserRULE_filter_clause = 58
  1483. SQLiteParserRULE_window_defn = 59
  1484. SQLiteParserRULE_over_clause = 60
  1485. SQLiteParserRULE_frame_spec = 61
  1486. SQLiteParserRULE_frame_clause = 62
  1487. SQLiteParserRULE_simple_function_invocation = 63
  1488. SQLiteParserRULE_aggregate_function_invocation = 64
  1489. SQLiteParserRULE_window_function_invocation = 65
  1490. SQLiteParserRULE_common_table_stmt = 66
  1491. SQLiteParserRULE_order_by_stmt = 67
  1492. SQLiteParserRULE_limit_stmt = 68
  1493. SQLiteParserRULE_ordering_term = 69
  1494. SQLiteParserRULE_asc_desc = 70
  1495. SQLiteParserRULE_frame_left = 71
  1496. SQLiteParserRULE_frame_right = 72
  1497. SQLiteParserRULE_frame_single = 73
  1498. SQLiteParserRULE_window_function = 74
  1499. SQLiteParserRULE_of_OF_fset = 75
  1500. SQLiteParserRULE_default_DEFAULT__value = 76
  1501. SQLiteParserRULE_partition_by = 77
  1502. SQLiteParserRULE_order_by_expr = 78
  1503. SQLiteParserRULE_order_by_expr_asc_desc = 79
  1504. SQLiteParserRULE_expr_asc_desc = 80
  1505. SQLiteParserRULE_initial_select = 81
  1506. SQLiteParserRULE_recursive__select = 82
  1507. SQLiteParserRULE_unary_operator = 83
  1508. SQLiteParserRULE_error_message = 84
  1509. SQLiteParserRULE_module_argument = 85
  1510. SQLiteParserRULE_column_alias = 86
  1511. SQLiteParserRULE_keyword = 87
  1512. SQLiteParserRULE_name = 88
  1513. SQLiteParserRULE_function_name = 89
  1514. SQLiteParserRULE_qualified_function_name = 90
  1515. SQLiteParserRULE_schema_name = 91
  1516. SQLiteParserRULE_table_name = 92
  1517. SQLiteParserRULE_table_or_index_name = 93
  1518. SQLiteParserRULE_new_table_name = 94
  1519. SQLiteParserRULE_column_name = 95
  1520. SQLiteParserRULE_collation_name = 96
  1521. SQLiteParserRULE_foreign_table = 97
  1522. SQLiteParserRULE_index_name = 98
  1523. SQLiteParserRULE_trigger_name = 99
  1524. SQLiteParserRULE_view_name = 100
  1525. SQLiteParserRULE_module_name = 101
  1526. SQLiteParserRULE_pragma_name = 102
  1527. SQLiteParserRULE_savepoint_name = 103
  1528. SQLiteParserRULE_table_alias = 104
  1529. SQLiteParserRULE_table_alias_fallback = 105
  1530. SQLiteParserRULE_transaction_name = 106
  1531. SQLiteParserRULE_window_name = 107
  1532. SQLiteParserRULE_alias = 108
  1533. SQLiteParserRULE_filename = 109
  1534. SQLiteParserRULE_base_window_name = 110
  1535. SQLiteParserRULE_simple_func = 111
  1536. SQLiteParserRULE_aggregate_func = 112
  1537. SQLiteParserRULE_table_function_name = 113
  1538. SQLiteParserRULE_any_name = 114
  1539. )
  1540. // IParseContext is an interface to support dynamic dispatch.
  1541. type IParseContext interface {
  1542. antlr.ParserRuleContext
  1543. // GetParser returns the parser.
  1544. GetParser() antlr.Parser
  1545. // Getter signatures
  1546. EOF() antlr.TerminalNode
  1547. AllSql_stmt_list() []ISql_stmt_listContext
  1548. Sql_stmt_list(i int) ISql_stmt_listContext
  1549. // IsParseContext differentiates from other interfaces.
  1550. IsParseContext()
  1551. }
  1552. type ParseContext struct {
  1553. *antlr.BaseParserRuleContext
  1554. parser antlr.Parser
  1555. }
  1556. func NewEmptyParseContext() *ParseContext {
  1557. var p = new(ParseContext)
  1558. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  1559. p.RuleIndex = SQLiteParserRULE_parse
  1560. return p
  1561. }
  1562. func (*ParseContext) IsParseContext() {}
  1563. func NewParseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParseContext {
  1564. var p = new(ParseContext)
  1565. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  1566. p.parser = parser
  1567. p.RuleIndex = SQLiteParserRULE_parse
  1568. return p
  1569. }
  1570. func (s *ParseContext) GetParser() antlr.Parser { return s.parser }
  1571. func (s *ParseContext) EOF() antlr.TerminalNode {
  1572. return s.GetToken(SQLiteParserEOF, 0)
  1573. }
  1574. func (s *ParseContext) AllSql_stmt_list() []ISql_stmt_listContext {
  1575. children := s.GetChildren()
  1576. len := 0
  1577. for _, ctx := range children {
  1578. if _, ok := ctx.(ISql_stmt_listContext); ok {
  1579. len++
  1580. }
  1581. }
  1582. tst := make([]ISql_stmt_listContext, len)
  1583. i := 0
  1584. for _, ctx := range children {
  1585. if t, ok := ctx.(ISql_stmt_listContext); ok {
  1586. tst[i] = t.(ISql_stmt_listContext)
  1587. i++
  1588. }
  1589. }
  1590. return tst
  1591. }
  1592. func (s *ParseContext) Sql_stmt_list(i int) ISql_stmt_listContext {
  1593. var t antlr.RuleContext
  1594. j := 0
  1595. for _, ctx := range s.GetChildren() {
  1596. if _, ok := ctx.(ISql_stmt_listContext); ok {
  1597. if j == i {
  1598. t = ctx.(antlr.RuleContext)
  1599. break
  1600. }
  1601. j++
  1602. }
  1603. }
  1604. if t == nil {
  1605. return nil
  1606. }
  1607. return t.(ISql_stmt_listContext)
  1608. }
  1609. func (s *ParseContext) GetRuleContext() antlr.RuleContext {
  1610. return s
  1611. }
  1612. func (s *ParseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  1613. return antlr.TreesStringTree(s, ruleNames, recog)
  1614. }
  1615. func (s *ParseContext) EnterRule(listener antlr.ParseTreeListener) {
  1616. if listenerT, ok := listener.(SQLiteParserListener); ok {
  1617. listenerT.EnterParse(s)
  1618. }
  1619. }
  1620. func (s *ParseContext) ExitRule(listener antlr.ParseTreeListener) {
  1621. if listenerT, ok := listener.(SQLiteParserListener); ok {
  1622. listenerT.ExitParse(s)
  1623. }
  1624. }
  1625. func (p *SQLiteParser) Parse() (localctx IParseContext) {
  1626. this := p
  1627. _ = this
  1628. localctx = NewParseContext(p, p.GetParserRuleContext(), p.GetState())
  1629. p.EnterRule(localctx, 0, SQLiteParserRULE_parse)
  1630. var _la int
  1631. defer func() {
  1632. p.ExitRule()
  1633. }()
  1634. defer func() {
  1635. if err := recover(); err != nil {
  1636. if v, ok := err.(antlr.RecognitionException); ok {
  1637. localctx.SetException(v)
  1638. p.GetErrorHandler().ReportError(p, v)
  1639. p.GetErrorHandler().Recover(p, v)
  1640. } else {
  1641. panic(err)
  1642. }
  1643. }
  1644. }()
  1645. p.EnterOuterAlt(localctx, 1)
  1646. p.SetState(233)
  1647. p.GetErrorHandler().Sync(p)
  1648. _la = p.GetTokenStream().LA(1)
  1649. for ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-6624230852073095166) != 0) || ((int64((_la-65)) & ^0x3f) == 0 && ((int64(1)<<(_la-65))&-8430175552450592503) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&2203651) != 0) {
  1650. {
  1651. p.SetState(230)
  1652. p.Sql_stmt_list()
  1653. }
  1654. p.SetState(235)
  1655. p.GetErrorHandler().Sync(p)
  1656. _la = p.GetTokenStream().LA(1)
  1657. }
  1658. {
  1659. p.SetState(236)
  1660. p.Match(SQLiteParserEOF)
  1661. }
  1662. return localctx
  1663. }
  1664. // ISql_stmt_listContext is an interface to support dynamic dispatch.
  1665. type ISql_stmt_listContext interface {
  1666. antlr.ParserRuleContext
  1667. // GetParser returns the parser.
  1668. GetParser() antlr.Parser
  1669. // Getter signatures
  1670. AllSql_stmt() []ISql_stmtContext
  1671. Sql_stmt(i int) ISql_stmtContext
  1672. AllSCOL() []antlr.TerminalNode
  1673. SCOL(i int) antlr.TerminalNode
  1674. // IsSql_stmt_listContext differentiates from other interfaces.
  1675. IsSql_stmt_listContext()
  1676. }
  1677. type Sql_stmt_listContext struct {
  1678. *antlr.BaseParserRuleContext
  1679. parser antlr.Parser
  1680. }
  1681. func NewEmptySql_stmt_listContext() *Sql_stmt_listContext {
  1682. var p = new(Sql_stmt_listContext)
  1683. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  1684. p.RuleIndex = SQLiteParserRULE_sql_stmt_list
  1685. return p
  1686. }
  1687. func (*Sql_stmt_listContext) IsSql_stmt_listContext() {}
  1688. func NewSql_stmt_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Sql_stmt_listContext {
  1689. var p = new(Sql_stmt_listContext)
  1690. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  1691. p.parser = parser
  1692. p.RuleIndex = SQLiteParserRULE_sql_stmt_list
  1693. return p
  1694. }
  1695. func (s *Sql_stmt_listContext) GetParser() antlr.Parser { return s.parser }
  1696. func (s *Sql_stmt_listContext) AllSql_stmt() []ISql_stmtContext {
  1697. children := s.GetChildren()
  1698. len := 0
  1699. for _, ctx := range children {
  1700. if _, ok := ctx.(ISql_stmtContext); ok {
  1701. len++
  1702. }
  1703. }
  1704. tst := make([]ISql_stmtContext, len)
  1705. i := 0
  1706. for _, ctx := range children {
  1707. if t, ok := ctx.(ISql_stmtContext); ok {
  1708. tst[i] = t.(ISql_stmtContext)
  1709. i++
  1710. }
  1711. }
  1712. return tst
  1713. }
  1714. func (s *Sql_stmt_listContext) Sql_stmt(i int) ISql_stmtContext {
  1715. var t antlr.RuleContext
  1716. j := 0
  1717. for _, ctx := range s.GetChildren() {
  1718. if _, ok := ctx.(ISql_stmtContext); ok {
  1719. if j == i {
  1720. t = ctx.(antlr.RuleContext)
  1721. break
  1722. }
  1723. j++
  1724. }
  1725. }
  1726. if t == nil {
  1727. return nil
  1728. }
  1729. return t.(ISql_stmtContext)
  1730. }
  1731. func (s *Sql_stmt_listContext) AllSCOL() []antlr.TerminalNode {
  1732. return s.GetTokens(SQLiteParserSCOL)
  1733. }
  1734. func (s *Sql_stmt_listContext) SCOL(i int) antlr.TerminalNode {
  1735. return s.GetToken(SQLiteParserSCOL, i)
  1736. }
  1737. func (s *Sql_stmt_listContext) GetRuleContext() antlr.RuleContext {
  1738. return s
  1739. }
  1740. func (s *Sql_stmt_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  1741. return antlr.TreesStringTree(s, ruleNames, recog)
  1742. }
  1743. func (s *Sql_stmt_listContext) EnterRule(listener antlr.ParseTreeListener) {
  1744. if listenerT, ok := listener.(SQLiteParserListener); ok {
  1745. listenerT.EnterSql_stmt_list(s)
  1746. }
  1747. }
  1748. func (s *Sql_stmt_listContext) ExitRule(listener antlr.ParseTreeListener) {
  1749. if listenerT, ok := listener.(SQLiteParserListener); ok {
  1750. listenerT.ExitSql_stmt_list(s)
  1751. }
  1752. }
  1753. func (p *SQLiteParser) Sql_stmt_list() (localctx ISql_stmt_listContext) {
  1754. this := p
  1755. _ = this
  1756. localctx = NewSql_stmt_listContext(p, p.GetParserRuleContext(), p.GetState())
  1757. p.EnterRule(localctx, 2, SQLiteParserRULE_sql_stmt_list)
  1758. var _la int
  1759. defer func() {
  1760. p.ExitRule()
  1761. }()
  1762. defer func() {
  1763. if err := recover(); err != nil {
  1764. if v, ok := err.(antlr.RecognitionException); ok {
  1765. localctx.SetException(v)
  1766. p.GetErrorHandler().ReportError(p, v)
  1767. p.GetErrorHandler().Recover(p, v)
  1768. } else {
  1769. panic(err)
  1770. }
  1771. }
  1772. }()
  1773. var _alt int
  1774. p.EnterOuterAlt(localctx, 1)
  1775. p.SetState(241)
  1776. p.GetErrorHandler().Sync(p)
  1777. _la = p.GetTokenStream().LA(1)
  1778. for _la == SQLiteParserSCOL {
  1779. {
  1780. p.SetState(238)
  1781. p.Match(SQLiteParserSCOL)
  1782. }
  1783. p.SetState(243)
  1784. p.GetErrorHandler().Sync(p)
  1785. _la = p.GetTokenStream().LA(1)
  1786. }
  1787. {
  1788. p.SetState(244)
  1789. p.Sql_stmt()
  1790. }
  1791. p.SetState(253)
  1792. p.GetErrorHandler().Sync(p)
  1793. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext())
  1794. for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
  1795. if _alt == 1 {
  1796. p.SetState(246)
  1797. p.GetErrorHandler().Sync(p)
  1798. _la = p.GetTokenStream().LA(1)
  1799. for ok := true; ok; ok = _la == SQLiteParserSCOL {
  1800. {
  1801. p.SetState(245)
  1802. p.Match(SQLiteParserSCOL)
  1803. }
  1804. p.SetState(248)
  1805. p.GetErrorHandler().Sync(p)
  1806. _la = p.GetTokenStream().LA(1)
  1807. }
  1808. {
  1809. p.SetState(250)
  1810. p.Sql_stmt()
  1811. }
  1812. }
  1813. p.SetState(255)
  1814. p.GetErrorHandler().Sync(p)
  1815. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 3, p.GetParserRuleContext())
  1816. }
  1817. p.SetState(259)
  1818. p.GetErrorHandler().Sync(p)
  1819. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext())
  1820. for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
  1821. if _alt == 1 {
  1822. {
  1823. p.SetState(256)
  1824. p.Match(SQLiteParserSCOL)
  1825. }
  1826. }
  1827. p.SetState(261)
  1828. p.GetErrorHandler().Sync(p)
  1829. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 4, p.GetParserRuleContext())
  1830. }
  1831. return localctx
  1832. }
  1833. // ISql_stmtContext is an interface to support dynamic dispatch.
  1834. type ISql_stmtContext interface {
  1835. antlr.ParserRuleContext
  1836. // GetParser returns the parser.
  1837. GetParser() antlr.Parser
  1838. // Getter signatures
  1839. Alter_table_stmt() IAlter_table_stmtContext
  1840. Analyze_stmt() IAnalyze_stmtContext
  1841. Attach_stmt() IAttach_stmtContext
  1842. Begin_stmt() IBegin_stmtContext
  1843. Commit_stmt() ICommit_stmtContext
  1844. Create_index_stmt() ICreate_index_stmtContext
  1845. Create_table_stmt() ICreate_table_stmtContext
  1846. Create_trigger_stmt() ICreate_trigger_stmtContext
  1847. Create_view_stmt() ICreate_view_stmtContext
  1848. Create_virtual_table_stmt() ICreate_virtual_table_stmtContext
  1849. Delete_stmt() IDelete_stmtContext
  1850. Delete_stmt_limited() IDelete_stmt_limitedContext
  1851. Detach_stmt() IDetach_stmtContext
  1852. Drop_stmt() IDrop_stmtContext
  1853. Insert_stmt() IInsert_stmtContext
  1854. Pragma_stmt() IPragma_stmtContext
  1855. Reindex_stmt() IReindex_stmtContext
  1856. Release_stmt() IRelease_stmtContext
  1857. Rollback_stmt() IRollback_stmtContext
  1858. Savepoint_stmt() ISavepoint_stmtContext
  1859. Select_stmt() ISelect_stmtContext
  1860. Update_stmt() IUpdate_stmtContext
  1861. Update_stmt_limited() IUpdate_stmt_limitedContext
  1862. Vacuum_stmt() IVacuum_stmtContext
  1863. EXPLAIN_() antlr.TerminalNode
  1864. QUERY_() antlr.TerminalNode
  1865. PLAN_() antlr.TerminalNode
  1866. // IsSql_stmtContext differentiates from other interfaces.
  1867. IsSql_stmtContext()
  1868. }
  1869. type Sql_stmtContext struct {
  1870. *antlr.BaseParserRuleContext
  1871. parser antlr.Parser
  1872. }
  1873. func NewEmptySql_stmtContext() *Sql_stmtContext {
  1874. var p = new(Sql_stmtContext)
  1875. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  1876. p.RuleIndex = SQLiteParserRULE_sql_stmt
  1877. return p
  1878. }
  1879. func (*Sql_stmtContext) IsSql_stmtContext() {}
  1880. func NewSql_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Sql_stmtContext {
  1881. var p = new(Sql_stmtContext)
  1882. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  1883. p.parser = parser
  1884. p.RuleIndex = SQLiteParserRULE_sql_stmt
  1885. return p
  1886. }
  1887. func (s *Sql_stmtContext) GetParser() antlr.Parser { return s.parser }
  1888. func (s *Sql_stmtContext) Alter_table_stmt() IAlter_table_stmtContext {
  1889. var t antlr.RuleContext
  1890. for _, ctx := range s.GetChildren() {
  1891. if _, ok := ctx.(IAlter_table_stmtContext); ok {
  1892. t = ctx.(antlr.RuleContext)
  1893. break
  1894. }
  1895. }
  1896. if t == nil {
  1897. return nil
  1898. }
  1899. return t.(IAlter_table_stmtContext)
  1900. }
  1901. func (s *Sql_stmtContext) Analyze_stmt() IAnalyze_stmtContext {
  1902. var t antlr.RuleContext
  1903. for _, ctx := range s.GetChildren() {
  1904. if _, ok := ctx.(IAnalyze_stmtContext); ok {
  1905. t = ctx.(antlr.RuleContext)
  1906. break
  1907. }
  1908. }
  1909. if t == nil {
  1910. return nil
  1911. }
  1912. return t.(IAnalyze_stmtContext)
  1913. }
  1914. func (s *Sql_stmtContext) Attach_stmt() IAttach_stmtContext {
  1915. var t antlr.RuleContext
  1916. for _, ctx := range s.GetChildren() {
  1917. if _, ok := ctx.(IAttach_stmtContext); ok {
  1918. t = ctx.(antlr.RuleContext)
  1919. break
  1920. }
  1921. }
  1922. if t == nil {
  1923. return nil
  1924. }
  1925. return t.(IAttach_stmtContext)
  1926. }
  1927. func (s *Sql_stmtContext) Begin_stmt() IBegin_stmtContext {
  1928. var t antlr.RuleContext
  1929. for _, ctx := range s.GetChildren() {
  1930. if _, ok := ctx.(IBegin_stmtContext); ok {
  1931. t = ctx.(antlr.RuleContext)
  1932. break
  1933. }
  1934. }
  1935. if t == nil {
  1936. return nil
  1937. }
  1938. return t.(IBegin_stmtContext)
  1939. }
  1940. func (s *Sql_stmtContext) Commit_stmt() ICommit_stmtContext {
  1941. var t antlr.RuleContext
  1942. for _, ctx := range s.GetChildren() {
  1943. if _, ok := ctx.(ICommit_stmtContext); ok {
  1944. t = ctx.(antlr.RuleContext)
  1945. break
  1946. }
  1947. }
  1948. if t == nil {
  1949. return nil
  1950. }
  1951. return t.(ICommit_stmtContext)
  1952. }
  1953. func (s *Sql_stmtContext) Create_index_stmt() ICreate_index_stmtContext {
  1954. var t antlr.RuleContext
  1955. for _, ctx := range s.GetChildren() {
  1956. if _, ok := ctx.(ICreate_index_stmtContext); ok {
  1957. t = ctx.(antlr.RuleContext)
  1958. break
  1959. }
  1960. }
  1961. if t == nil {
  1962. return nil
  1963. }
  1964. return t.(ICreate_index_stmtContext)
  1965. }
  1966. func (s *Sql_stmtContext) Create_table_stmt() ICreate_table_stmtContext {
  1967. var t antlr.RuleContext
  1968. for _, ctx := range s.GetChildren() {
  1969. if _, ok := ctx.(ICreate_table_stmtContext); ok {
  1970. t = ctx.(antlr.RuleContext)
  1971. break
  1972. }
  1973. }
  1974. if t == nil {
  1975. return nil
  1976. }
  1977. return t.(ICreate_table_stmtContext)
  1978. }
  1979. func (s *Sql_stmtContext) Create_trigger_stmt() ICreate_trigger_stmtContext {
  1980. var t antlr.RuleContext
  1981. for _, ctx := range s.GetChildren() {
  1982. if _, ok := ctx.(ICreate_trigger_stmtContext); ok {
  1983. t = ctx.(antlr.RuleContext)
  1984. break
  1985. }
  1986. }
  1987. if t == nil {
  1988. return nil
  1989. }
  1990. return t.(ICreate_trigger_stmtContext)
  1991. }
  1992. func (s *Sql_stmtContext) Create_view_stmt() ICreate_view_stmtContext {
  1993. var t antlr.RuleContext
  1994. for _, ctx := range s.GetChildren() {
  1995. if _, ok := ctx.(ICreate_view_stmtContext); ok {
  1996. t = ctx.(antlr.RuleContext)
  1997. break
  1998. }
  1999. }
  2000. if t == nil {
  2001. return nil
  2002. }
  2003. return t.(ICreate_view_stmtContext)
  2004. }
  2005. func (s *Sql_stmtContext) Create_virtual_table_stmt() ICreate_virtual_table_stmtContext {
  2006. var t antlr.RuleContext
  2007. for _, ctx := range s.GetChildren() {
  2008. if _, ok := ctx.(ICreate_virtual_table_stmtContext); ok {
  2009. t = ctx.(antlr.RuleContext)
  2010. break
  2011. }
  2012. }
  2013. if t == nil {
  2014. return nil
  2015. }
  2016. return t.(ICreate_virtual_table_stmtContext)
  2017. }
  2018. func (s *Sql_stmtContext) Delete_stmt() IDelete_stmtContext {
  2019. var t antlr.RuleContext
  2020. for _, ctx := range s.GetChildren() {
  2021. if _, ok := ctx.(IDelete_stmtContext); ok {
  2022. t = ctx.(antlr.RuleContext)
  2023. break
  2024. }
  2025. }
  2026. if t == nil {
  2027. return nil
  2028. }
  2029. return t.(IDelete_stmtContext)
  2030. }
  2031. func (s *Sql_stmtContext) Delete_stmt_limited() IDelete_stmt_limitedContext {
  2032. var t antlr.RuleContext
  2033. for _, ctx := range s.GetChildren() {
  2034. if _, ok := ctx.(IDelete_stmt_limitedContext); ok {
  2035. t = ctx.(antlr.RuleContext)
  2036. break
  2037. }
  2038. }
  2039. if t == nil {
  2040. return nil
  2041. }
  2042. return t.(IDelete_stmt_limitedContext)
  2043. }
  2044. func (s *Sql_stmtContext) Detach_stmt() IDetach_stmtContext {
  2045. var t antlr.RuleContext
  2046. for _, ctx := range s.GetChildren() {
  2047. if _, ok := ctx.(IDetach_stmtContext); ok {
  2048. t = ctx.(antlr.RuleContext)
  2049. break
  2050. }
  2051. }
  2052. if t == nil {
  2053. return nil
  2054. }
  2055. return t.(IDetach_stmtContext)
  2056. }
  2057. func (s *Sql_stmtContext) Drop_stmt() IDrop_stmtContext {
  2058. var t antlr.RuleContext
  2059. for _, ctx := range s.GetChildren() {
  2060. if _, ok := ctx.(IDrop_stmtContext); ok {
  2061. t = ctx.(antlr.RuleContext)
  2062. break
  2063. }
  2064. }
  2065. if t == nil {
  2066. return nil
  2067. }
  2068. return t.(IDrop_stmtContext)
  2069. }
  2070. func (s *Sql_stmtContext) Insert_stmt() IInsert_stmtContext {
  2071. var t antlr.RuleContext
  2072. for _, ctx := range s.GetChildren() {
  2073. if _, ok := ctx.(IInsert_stmtContext); ok {
  2074. t = ctx.(antlr.RuleContext)
  2075. break
  2076. }
  2077. }
  2078. if t == nil {
  2079. return nil
  2080. }
  2081. return t.(IInsert_stmtContext)
  2082. }
  2083. func (s *Sql_stmtContext) Pragma_stmt() IPragma_stmtContext {
  2084. var t antlr.RuleContext
  2085. for _, ctx := range s.GetChildren() {
  2086. if _, ok := ctx.(IPragma_stmtContext); ok {
  2087. t = ctx.(antlr.RuleContext)
  2088. break
  2089. }
  2090. }
  2091. if t == nil {
  2092. return nil
  2093. }
  2094. return t.(IPragma_stmtContext)
  2095. }
  2096. func (s *Sql_stmtContext) Reindex_stmt() IReindex_stmtContext {
  2097. var t antlr.RuleContext
  2098. for _, ctx := range s.GetChildren() {
  2099. if _, ok := ctx.(IReindex_stmtContext); ok {
  2100. t = ctx.(antlr.RuleContext)
  2101. break
  2102. }
  2103. }
  2104. if t == nil {
  2105. return nil
  2106. }
  2107. return t.(IReindex_stmtContext)
  2108. }
  2109. func (s *Sql_stmtContext) Release_stmt() IRelease_stmtContext {
  2110. var t antlr.RuleContext
  2111. for _, ctx := range s.GetChildren() {
  2112. if _, ok := ctx.(IRelease_stmtContext); ok {
  2113. t = ctx.(antlr.RuleContext)
  2114. break
  2115. }
  2116. }
  2117. if t == nil {
  2118. return nil
  2119. }
  2120. return t.(IRelease_stmtContext)
  2121. }
  2122. func (s *Sql_stmtContext) Rollback_stmt() IRollback_stmtContext {
  2123. var t antlr.RuleContext
  2124. for _, ctx := range s.GetChildren() {
  2125. if _, ok := ctx.(IRollback_stmtContext); ok {
  2126. t = ctx.(antlr.RuleContext)
  2127. break
  2128. }
  2129. }
  2130. if t == nil {
  2131. return nil
  2132. }
  2133. return t.(IRollback_stmtContext)
  2134. }
  2135. func (s *Sql_stmtContext) Savepoint_stmt() ISavepoint_stmtContext {
  2136. var t antlr.RuleContext
  2137. for _, ctx := range s.GetChildren() {
  2138. if _, ok := ctx.(ISavepoint_stmtContext); ok {
  2139. t = ctx.(antlr.RuleContext)
  2140. break
  2141. }
  2142. }
  2143. if t == nil {
  2144. return nil
  2145. }
  2146. return t.(ISavepoint_stmtContext)
  2147. }
  2148. func (s *Sql_stmtContext) Select_stmt() ISelect_stmtContext {
  2149. var t antlr.RuleContext
  2150. for _, ctx := range s.GetChildren() {
  2151. if _, ok := ctx.(ISelect_stmtContext); ok {
  2152. t = ctx.(antlr.RuleContext)
  2153. break
  2154. }
  2155. }
  2156. if t == nil {
  2157. return nil
  2158. }
  2159. return t.(ISelect_stmtContext)
  2160. }
  2161. func (s *Sql_stmtContext) Update_stmt() IUpdate_stmtContext {
  2162. var t antlr.RuleContext
  2163. for _, ctx := range s.GetChildren() {
  2164. if _, ok := ctx.(IUpdate_stmtContext); ok {
  2165. t = ctx.(antlr.RuleContext)
  2166. break
  2167. }
  2168. }
  2169. if t == nil {
  2170. return nil
  2171. }
  2172. return t.(IUpdate_stmtContext)
  2173. }
  2174. func (s *Sql_stmtContext) Update_stmt_limited() IUpdate_stmt_limitedContext {
  2175. var t antlr.RuleContext
  2176. for _, ctx := range s.GetChildren() {
  2177. if _, ok := ctx.(IUpdate_stmt_limitedContext); ok {
  2178. t = ctx.(antlr.RuleContext)
  2179. break
  2180. }
  2181. }
  2182. if t == nil {
  2183. return nil
  2184. }
  2185. return t.(IUpdate_stmt_limitedContext)
  2186. }
  2187. func (s *Sql_stmtContext) Vacuum_stmt() IVacuum_stmtContext {
  2188. var t antlr.RuleContext
  2189. for _, ctx := range s.GetChildren() {
  2190. if _, ok := ctx.(IVacuum_stmtContext); ok {
  2191. t = ctx.(antlr.RuleContext)
  2192. break
  2193. }
  2194. }
  2195. if t == nil {
  2196. return nil
  2197. }
  2198. return t.(IVacuum_stmtContext)
  2199. }
  2200. func (s *Sql_stmtContext) EXPLAIN_() antlr.TerminalNode {
  2201. return s.GetToken(SQLiteParserEXPLAIN_, 0)
  2202. }
  2203. func (s *Sql_stmtContext) QUERY_() antlr.TerminalNode {
  2204. return s.GetToken(SQLiteParserQUERY_, 0)
  2205. }
  2206. func (s *Sql_stmtContext) PLAN_() antlr.TerminalNode {
  2207. return s.GetToken(SQLiteParserPLAN_, 0)
  2208. }
  2209. func (s *Sql_stmtContext) GetRuleContext() antlr.RuleContext {
  2210. return s
  2211. }
  2212. func (s *Sql_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  2213. return antlr.TreesStringTree(s, ruleNames, recog)
  2214. }
  2215. func (s *Sql_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  2216. if listenerT, ok := listener.(SQLiteParserListener); ok {
  2217. listenerT.EnterSql_stmt(s)
  2218. }
  2219. }
  2220. func (s *Sql_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  2221. if listenerT, ok := listener.(SQLiteParserListener); ok {
  2222. listenerT.ExitSql_stmt(s)
  2223. }
  2224. }
  2225. func (p *SQLiteParser) Sql_stmt() (localctx ISql_stmtContext) {
  2226. this := p
  2227. _ = this
  2228. localctx = NewSql_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  2229. p.EnterRule(localctx, 4, SQLiteParserRULE_sql_stmt)
  2230. var _la int
  2231. defer func() {
  2232. p.ExitRule()
  2233. }()
  2234. defer func() {
  2235. if err := recover(); err != nil {
  2236. if v, ok := err.(antlr.RecognitionException); ok {
  2237. localctx.SetException(v)
  2238. p.GetErrorHandler().ReportError(p, v)
  2239. p.GetErrorHandler().Recover(p, v)
  2240. } else {
  2241. panic(err)
  2242. }
  2243. }
  2244. }()
  2245. p.EnterOuterAlt(localctx, 1)
  2246. p.SetState(267)
  2247. p.GetErrorHandler().Sync(p)
  2248. _la = p.GetTokenStream().LA(1)
  2249. if _la == SQLiteParserEXPLAIN_ {
  2250. {
  2251. p.SetState(262)
  2252. p.Match(SQLiteParserEXPLAIN_)
  2253. }
  2254. p.SetState(265)
  2255. p.GetErrorHandler().Sync(p)
  2256. _la = p.GetTokenStream().LA(1)
  2257. if _la == SQLiteParserQUERY_ {
  2258. {
  2259. p.SetState(263)
  2260. p.Match(SQLiteParserQUERY_)
  2261. }
  2262. {
  2263. p.SetState(264)
  2264. p.Match(SQLiteParserPLAN_)
  2265. }
  2266. }
  2267. }
  2268. p.SetState(293)
  2269. p.GetErrorHandler().Sync(p)
  2270. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 7, p.GetParserRuleContext()) {
  2271. case 1:
  2272. {
  2273. p.SetState(269)
  2274. p.Alter_table_stmt()
  2275. }
  2276. case 2:
  2277. {
  2278. p.SetState(270)
  2279. p.Analyze_stmt()
  2280. }
  2281. case 3:
  2282. {
  2283. p.SetState(271)
  2284. p.Attach_stmt()
  2285. }
  2286. case 4:
  2287. {
  2288. p.SetState(272)
  2289. p.Begin_stmt()
  2290. }
  2291. case 5:
  2292. {
  2293. p.SetState(273)
  2294. p.Commit_stmt()
  2295. }
  2296. case 6:
  2297. {
  2298. p.SetState(274)
  2299. p.Create_index_stmt()
  2300. }
  2301. case 7:
  2302. {
  2303. p.SetState(275)
  2304. p.Create_table_stmt()
  2305. }
  2306. case 8:
  2307. {
  2308. p.SetState(276)
  2309. p.Create_trigger_stmt()
  2310. }
  2311. case 9:
  2312. {
  2313. p.SetState(277)
  2314. p.Create_view_stmt()
  2315. }
  2316. case 10:
  2317. {
  2318. p.SetState(278)
  2319. p.Create_virtual_table_stmt()
  2320. }
  2321. case 11:
  2322. {
  2323. p.SetState(279)
  2324. p.Delete_stmt()
  2325. }
  2326. case 12:
  2327. {
  2328. p.SetState(280)
  2329. p.Delete_stmt_limited()
  2330. }
  2331. case 13:
  2332. {
  2333. p.SetState(281)
  2334. p.Detach_stmt()
  2335. }
  2336. case 14:
  2337. {
  2338. p.SetState(282)
  2339. p.Drop_stmt()
  2340. }
  2341. case 15:
  2342. {
  2343. p.SetState(283)
  2344. p.Insert_stmt()
  2345. }
  2346. case 16:
  2347. {
  2348. p.SetState(284)
  2349. p.Pragma_stmt()
  2350. }
  2351. case 17:
  2352. {
  2353. p.SetState(285)
  2354. p.Reindex_stmt()
  2355. }
  2356. case 18:
  2357. {
  2358. p.SetState(286)
  2359. p.Release_stmt()
  2360. }
  2361. case 19:
  2362. {
  2363. p.SetState(287)
  2364. p.Rollback_stmt()
  2365. }
  2366. case 20:
  2367. {
  2368. p.SetState(288)
  2369. p.Savepoint_stmt()
  2370. }
  2371. case 21:
  2372. {
  2373. p.SetState(289)
  2374. p.Select_stmt()
  2375. }
  2376. case 22:
  2377. {
  2378. p.SetState(290)
  2379. p.Update_stmt()
  2380. }
  2381. case 23:
  2382. {
  2383. p.SetState(291)
  2384. p.Update_stmt_limited()
  2385. }
  2386. case 24:
  2387. {
  2388. p.SetState(292)
  2389. p.Vacuum_stmt()
  2390. }
  2391. }
  2392. return localctx
  2393. }
  2394. // IAlter_table_stmtContext is an interface to support dynamic dispatch.
  2395. type IAlter_table_stmtContext interface {
  2396. antlr.ParserRuleContext
  2397. // GetParser returns the parser.
  2398. GetParser() antlr.Parser
  2399. // GetOld_column_name returns the old_column_name rule contexts.
  2400. GetOld_column_name() IColumn_nameContext
  2401. // GetNew_column_name returns the new_column_name rule contexts.
  2402. GetNew_column_name() IColumn_nameContext
  2403. // SetOld_column_name sets the old_column_name rule contexts.
  2404. SetOld_column_name(IColumn_nameContext)
  2405. // SetNew_column_name sets the new_column_name rule contexts.
  2406. SetNew_column_name(IColumn_nameContext)
  2407. // Getter signatures
  2408. ALTER_() antlr.TerminalNode
  2409. TABLE_() antlr.TerminalNode
  2410. Table_name() ITable_nameContext
  2411. RENAME_() antlr.TerminalNode
  2412. ADD_() antlr.TerminalNode
  2413. Column_def() IColumn_defContext
  2414. DROP_() antlr.TerminalNode
  2415. AllColumn_name() []IColumn_nameContext
  2416. Column_name(i int) IColumn_nameContext
  2417. Schema_name() ISchema_nameContext
  2418. DOT() antlr.TerminalNode
  2419. TO_() antlr.TerminalNode
  2420. New_table_name() INew_table_nameContext
  2421. COLUMN_() antlr.TerminalNode
  2422. // IsAlter_table_stmtContext differentiates from other interfaces.
  2423. IsAlter_table_stmtContext()
  2424. }
  2425. type Alter_table_stmtContext struct {
  2426. *antlr.BaseParserRuleContext
  2427. parser antlr.Parser
  2428. old_column_name IColumn_nameContext
  2429. new_column_name IColumn_nameContext
  2430. }
  2431. func NewEmptyAlter_table_stmtContext() *Alter_table_stmtContext {
  2432. var p = new(Alter_table_stmtContext)
  2433. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  2434. p.RuleIndex = SQLiteParserRULE_alter_table_stmt
  2435. return p
  2436. }
  2437. func (*Alter_table_stmtContext) IsAlter_table_stmtContext() {}
  2438. func NewAlter_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Alter_table_stmtContext {
  2439. var p = new(Alter_table_stmtContext)
  2440. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  2441. p.parser = parser
  2442. p.RuleIndex = SQLiteParserRULE_alter_table_stmt
  2443. return p
  2444. }
  2445. func (s *Alter_table_stmtContext) GetParser() antlr.Parser { return s.parser }
  2446. func (s *Alter_table_stmtContext) GetOld_column_name() IColumn_nameContext { return s.old_column_name }
  2447. func (s *Alter_table_stmtContext) GetNew_column_name() IColumn_nameContext { return s.new_column_name }
  2448. func (s *Alter_table_stmtContext) SetOld_column_name(v IColumn_nameContext) { s.old_column_name = v }
  2449. func (s *Alter_table_stmtContext) SetNew_column_name(v IColumn_nameContext) { s.new_column_name = v }
  2450. func (s *Alter_table_stmtContext) ALTER_() antlr.TerminalNode {
  2451. return s.GetToken(SQLiteParserALTER_, 0)
  2452. }
  2453. func (s *Alter_table_stmtContext) TABLE_() antlr.TerminalNode {
  2454. return s.GetToken(SQLiteParserTABLE_, 0)
  2455. }
  2456. func (s *Alter_table_stmtContext) Table_name() ITable_nameContext {
  2457. var t antlr.RuleContext
  2458. for _, ctx := range s.GetChildren() {
  2459. if _, ok := ctx.(ITable_nameContext); ok {
  2460. t = ctx.(antlr.RuleContext)
  2461. break
  2462. }
  2463. }
  2464. if t == nil {
  2465. return nil
  2466. }
  2467. return t.(ITable_nameContext)
  2468. }
  2469. func (s *Alter_table_stmtContext) RENAME_() antlr.TerminalNode {
  2470. return s.GetToken(SQLiteParserRENAME_, 0)
  2471. }
  2472. func (s *Alter_table_stmtContext) ADD_() antlr.TerminalNode {
  2473. return s.GetToken(SQLiteParserADD_, 0)
  2474. }
  2475. func (s *Alter_table_stmtContext) Column_def() IColumn_defContext {
  2476. var t antlr.RuleContext
  2477. for _, ctx := range s.GetChildren() {
  2478. if _, ok := ctx.(IColumn_defContext); ok {
  2479. t = ctx.(antlr.RuleContext)
  2480. break
  2481. }
  2482. }
  2483. if t == nil {
  2484. return nil
  2485. }
  2486. return t.(IColumn_defContext)
  2487. }
  2488. func (s *Alter_table_stmtContext) DROP_() antlr.TerminalNode {
  2489. return s.GetToken(SQLiteParserDROP_, 0)
  2490. }
  2491. func (s *Alter_table_stmtContext) AllColumn_name() []IColumn_nameContext {
  2492. children := s.GetChildren()
  2493. len := 0
  2494. for _, ctx := range children {
  2495. if _, ok := ctx.(IColumn_nameContext); ok {
  2496. len++
  2497. }
  2498. }
  2499. tst := make([]IColumn_nameContext, len)
  2500. i := 0
  2501. for _, ctx := range children {
  2502. if t, ok := ctx.(IColumn_nameContext); ok {
  2503. tst[i] = t.(IColumn_nameContext)
  2504. i++
  2505. }
  2506. }
  2507. return tst
  2508. }
  2509. func (s *Alter_table_stmtContext) Column_name(i int) IColumn_nameContext {
  2510. var t antlr.RuleContext
  2511. j := 0
  2512. for _, ctx := range s.GetChildren() {
  2513. if _, ok := ctx.(IColumn_nameContext); ok {
  2514. if j == i {
  2515. t = ctx.(antlr.RuleContext)
  2516. break
  2517. }
  2518. j++
  2519. }
  2520. }
  2521. if t == nil {
  2522. return nil
  2523. }
  2524. return t.(IColumn_nameContext)
  2525. }
  2526. func (s *Alter_table_stmtContext) Schema_name() ISchema_nameContext {
  2527. var t antlr.RuleContext
  2528. for _, ctx := range s.GetChildren() {
  2529. if _, ok := ctx.(ISchema_nameContext); ok {
  2530. t = ctx.(antlr.RuleContext)
  2531. break
  2532. }
  2533. }
  2534. if t == nil {
  2535. return nil
  2536. }
  2537. return t.(ISchema_nameContext)
  2538. }
  2539. func (s *Alter_table_stmtContext) DOT() antlr.TerminalNode {
  2540. return s.GetToken(SQLiteParserDOT, 0)
  2541. }
  2542. func (s *Alter_table_stmtContext) TO_() antlr.TerminalNode {
  2543. return s.GetToken(SQLiteParserTO_, 0)
  2544. }
  2545. func (s *Alter_table_stmtContext) New_table_name() INew_table_nameContext {
  2546. var t antlr.RuleContext
  2547. for _, ctx := range s.GetChildren() {
  2548. if _, ok := ctx.(INew_table_nameContext); ok {
  2549. t = ctx.(antlr.RuleContext)
  2550. break
  2551. }
  2552. }
  2553. if t == nil {
  2554. return nil
  2555. }
  2556. return t.(INew_table_nameContext)
  2557. }
  2558. func (s *Alter_table_stmtContext) COLUMN_() antlr.TerminalNode {
  2559. return s.GetToken(SQLiteParserCOLUMN_, 0)
  2560. }
  2561. func (s *Alter_table_stmtContext) GetRuleContext() antlr.RuleContext {
  2562. return s
  2563. }
  2564. func (s *Alter_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  2565. return antlr.TreesStringTree(s, ruleNames, recog)
  2566. }
  2567. func (s *Alter_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  2568. if listenerT, ok := listener.(SQLiteParserListener); ok {
  2569. listenerT.EnterAlter_table_stmt(s)
  2570. }
  2571. }
  2572. func (s *Alter_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  2573. if listenerT, ok := listener.(SQLiteParserListener); ok {
  2574. listenerT.ExitAlter_table_stmt(s)
  2575. }
  2576. }
  2577. func (p *SQLiteParser) Alter_table_stmt() (localctx IAlter_table_stmtContext) {
  2578. this := p
  2579. _ = this
  2580. localctx = NewAlter_table_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  2581. p.EnterRule(localctx, 6, SQLiteParserRULE_alter_table_stmt)
  2582. defer func() {
  2583. p.ExitRule()
  2584. }()
  2585. defer func() {
  2586. if err := recover(); err != nil {
  2587. if v, ok := err.(antlr.RecognitionException); ok {
  2588. localctx.SetException(v)
  2589. p.GetErrorHandler().ReportError(p, v)
  2590. p.GetErrorHandler().Recover(p, v)
  2591. } else {
  2592. panic(err)
  2593. }
  2594. }
  2595. }()
  2596. p.EnterOuterAlt(localctx, 1)
  2597. {
  2598. p.SetState(295)
  2599. p.Match(SQLiteParserALTER_)
  2600. }
  2601. {
  2602. p.SetState(296)
  2603. p.Match(SQLiteParserTABLE_)
  2604. }
  2605. p.SetState(300)
  2606. p.GetErrorHandler().Sync(p)
  2607. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 8, p.GetParserRuleContext()) == 1 {
  2608. {
  2609. p.SetState(297)
  2610. p.Schema_name()
  2611. }
  2612. {
  2613. p.SetState(298)
  2614. p.Match(SQLiteParserDOT)
  2615. }
  2616. }
  2617. {
  2618. p.SetState(302)
  2619. p.Table_name()
  2620. }
  2621. p.SetState(325)
  2622. p.GetErrorHandler().Sync(p)
  2623. switch p.GetTokenStream().LA(1) {
  2624. case SQLiteParserRENAME_:
  2625. {
  2626. p.SetState(303)
  2627. p.Match(SQLiteParserRENAME_)
  2628. }
  2629. p.SetState(313)
  2630. p.GetErrorHandler().Sync(p)
  2631. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 10, p.GetParserRuleContext()) {
  2632. case 1:
  2633. {
  2634. p.SetState(304)
  2635. p.Match(SQLiteParserTO_)
  2636. }
  2637. {
  2638. p.SetState(305)
  2639. p.New_table_name()
  2640. }
  2641. case 2:
  2642. p.SetState(307)
  2643. p.GetErrorHandler().Sync(p)
  2644. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 9, p.GetParserRuleContext()) == 1 {
  2645. {
  2646. p.SetState(306)
  2647. p.Match(SQLiteParserCOLUMN_)
  2648. }
  2649. }
  2650. {
  2651. p.SetState(309)
  2652. var _x = p.Column_name()
  2653. localctx.(*Alter_table_stmtContext).old_column_name = _x
  2654. }
  2655. {
  2656. p.SetState(310)
  2657. p.Match(SQLiteParserTO_)
  2658. }
  2659. {
  2660. p.SetState(311)
  2661. var _x = p.Column_name()
  2662. localctx.(*Alter_table_stmtContext).new_column_name = _x
  2663. }
  2664. }
  2665. case SQLiteParserADD_:
  2666. {
  2667. p.SetState(315)
  2668. p.Match(SQLiteParserADD_)
  2669. }
  2670. p.SetState(317)
  2671. p.GetErrorHandler().Sync(p)
  2672. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 11, p.GetParserRuleContext()) == 1 {
  2673. {
  2674. p.SetState(316)
  2675. p.Match(SQLiteParserCOLUMN_)
  2676. }
  2677. }
  2678. {
  2679. p.SetState(319)
  2680. p.Column_def()
  2681. }
  2682. case SQLiteParserDROP_:
  2683. {
  2684. p.SetState(320)
  2685. p.Match(SQLiteParserDROP_)
  2686. }
  2687. p.SetState(322)
  2688. p.GetErrorHandler().Sync(p)
  2689. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 12, p.GetParserRuleContext()) == 1 {
  2690. {
  2691. p.SetState(321)
  2692. p.Match(SQLiteParserCOLUMN_)
  2693. }
  2694. }
  2695. {
  2696. p.SetState(324)
  2697. p.Column_name()
  2698. }
  2699. default:
  2700. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  2701. }
  2702. return localctx
  2703. }
  2704. // IAnalyze_stmtContext is an interface to support dynamic dispatch.
  2705. type IAnalyze_stmtContext interface {
  2706. antlr.ParserRuleContext
  2707. // GetParser returns the parser.
  2708. GetParser() antlr.Parser
  2709. // Getter signatures
  2710. ANALYZE_() antlr.TerminalNode
  2711. Schema_name() ISchema_nameContext
  2712. Table_or_index_name() ITable_or_index_nameContext
  2713. DOT() antlr.TerminalNode
  2714. // IsAnalyze_stmtContext differentiates from other interfaces.
  2715. IsAnalyze_stmtContext()
  2716. }
  2717. type Analyze_stmtContext struct {
  2718. *antlr.BaseParserRuleContext
  2719. parser antlr.Parser
  2720. }
  2721. func NewEmptyAnalyze_stmtContext() *Analyze_stmtContext {
  2722. var p = new(Analyze_stmtContext)
  2723. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  2724. p.RuleIndex = SQLiteParserRULE_analyze_stmt
  2725. return p
  2726. }
  2727. func (*Analyze_stmtContext) IsAnalyze_stmtContext() {}
  2728. func NewAnalyze_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Analyze_stmtContext {
  2729. var p = new(Analyze_stmtContext)
  2730. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  2731. p.parser = parser
  2732. p.RuleIndex = SQLiteParserRULE_analyze_stmt
  2733. return p
  2734. }
  2735. func (s *Analyze_stmtContext) GetParser() antlr.Parser { return s.parser }
  2736. func (s *Analyze_stmtContext) ANALYZE_() antlr.TerminalNode {
  2737. return s.GetToken(SQLiteParserANALYZE_, 0)
  2738. }
  2739. func (s *Analyze_stmtContext) Schema_name() ISchema_nameContext {
  2740. var t antlr.RuleContext
  2741. for _, ctx := range s.GetChildren() {
  2742. if _, ok := ctx.(ISchema_nameContext); ok {
  2743. t = ctx.(antlr.RuleContext)
  2744. break
  2745. }
  2746. }
  2747. if t == nil {
  2748. return nil
  2749. }
  2750. return t.(ISchema_nameContext)
  2751. }
  2752. func (s *Analyze_stmtContext) Table_or_index_name() ITable_or_index_nameContext {
  2753. var t antlr.RuleContext
  2754. for _, ctx := range s.GetChildren() {
  2755. if _, ok := ctx.(ITable_or_index_nameContext); ok {
  2756. t = ctx.(antlr.RuleContext)
  2757. break
  2758. }
  2759. }
  2760. if t == nil {
  2761. return nil
  2762. }
  2763. return t.(ITable_or_index_nameContext)
  2764. }
  2765. func (s *Analyze_stmtContext) DOT() antlr.TerminalNode {
  2766. return s.GetToken(SQLiteParserDOT, 0)
  2767. }
  2768. func (s *Analyze_stmtContext) GetRuleContext() antlr.RuleContext {
  2769. return s
  2770. }
  2771. func (s *Analyze_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  2772. return antlr.TreesStringTree(s, ruleNames, recog)
  2773. }
  2774. func (s *Analyze_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  2775. if listenerT, ok := listener.(SQLiteParserListener); ok {
  2776. listenerT.EnterAnalyze_stmt(s)
  2777. }
  2778. }
  2779. func (s *Analyze_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  2780. if listenerT, ok := listener.(SQLiteParserListener); ok {
  2781. listenerT.ExitAnalyze_stmt(s)
  2782. }
  2783. }
  2784. func (p *SQLiteParser) Analyze_stmt() (localctx IAnalyze_stmtContext) {
  2785. this := p
  2786. _ = this
  2787. localctx = NewAnalyze_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  2788. p.EnterRule(localctx, 8, SQLiteParserRULE_analyze_stmt)
  2789. defer func() {
  2790. p.ExitRule()
  2791. }()
  2792. defer func() {
  2793. if err := recover(); err != nil {
  2794. if v, ok := err.(antlr.RecognitionException); ok {
  2795. localctx.SetException(v)
  2796. p.GetErrorHandler().ReportError(p, v)
  2797. p.GetErrorHandler().Recover(p, v)
  2798. } else {
  2799. panic(err)
  2800. }
  2801. }
  2802. }()
  2803. p.EnterOuterAlt(localctx, 1)
  2804. {
  2805. p.SetState(327)
  2806. p.Match(SQLiteParserANALYZE_)
  2807. }
  2808. p.SetState(335)
  2809. p.GetErrorHandler().Sync(p)
  2810. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 15, p.GetParserRuleContext()) == 1 {
  2811. {
  2812. p.SetState(328)
  2813. p.Schema_name()
  2814. }
  2815. } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 15, p.GetParserRuleContext()) == 2 {
  2816. p.SetState(332)
  2817. p.GetErrorHandler().Sync(p)
  2818. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 14, p.GetParserRuleContext()) == 1 {
  2819. {
  2820. p.SetState(329)
  2821. p.Schema_name()
  2822. }
  2823. {
  2824. p.SetState(330)
  2825. p.Match(SQLiteParserDOT)
  2826. }
  2827. }
  2828. {
  2829. p.SetState(334)
  2830. p.Table_or_index_name()
  2831. }
  2832. }
  2833. return localctx
  2834. }
  2835. // IAttach_stmtContext is an interface to support dynamic dispatch.
  2836. type IAttach_stmtContext interface {
  2837. antlr.ParserRuleContext
  2838. // GetParser returns the parser.
  2839. GetParser() antlr.Parser
  2840. // Getter signatures
  2841. ATTACH_() antlr.TerminalNode
  2842. Expr() IExprContext
  2843. AS_() antlr.TerminalNode
  2844. Schema_name() ISchema_nameContext
  2845. DATABASE_() antlr.TerminalNode
  2846. // IsAttach_stmtContext differentiates from other interfaces.
  2847. IsAttach_stmtContext()
  2848. }
  2849. type Attach_stmtContext struct {
  2850. *antlr.BaseParserRuleContext
  2851. parser antlr.Parser
  2852. }
  2853. func NewEmptyAttach_stmtContext() *Attach_stmtContext {
  2854. var p = new(Attach_stmtContext)
  2855. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  2856. p.RuleIndex = SQLiteParserRULE_attach_stmt
  2857. return p
  2858. }
  2859. func (*Attach_stmtContext) IsAttach_stmtContext() {}
  2860. func NewAttach_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Attach_stmtContext {
  2861. var p = new(Attach_stmtContext)
  2862. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  2863. p.parser = parser
  2864. p.RuleIndex = SQLiteParserRULE_attach_stmt
  2865. return p
  2866. }
  2867. func (s *Attach_stmtContext) GetParser() antlr.Parser { return s.parser }
  2868. func (s *Attach_stmtContext) ATTACH_() antlr.TerminalNode {
  2869. return s.GetToken(SQLiteParserATTACH_, 0)
  2870. }
  2871. func (s *Attach_stmtContext) Expr() IExprContext {
  2872. var t antlr.RuleContext
  2873. for _, ctx := range s.GetChildren() {
  2874. if _, ok := ctx.(IExprContext); ok {
  2875. t = ctx.(antlr.RuleContext)
  2876. break
  2877. }
  2878. }
  2879. if t == nil {
  2880. return nil
  2881. }
  2882. return t.(IExprContext)
  2883. }
  2884. func (s *Attach_stmtContext) AS_() antlr.TerminalNode {
  2885. return s.GetToken(SQLiteParserAS_, 0)
  2886. }
  2887. func (s *Attach_stmtContext) Schema_name() ISchema_nameContext {
  2888. var t antlr.RuleContext
  2889. for _, ctx := range s.GetChildren() {
  2890. if _, ok := ctx.(ISchema_nameContext); ok {
  2891. t = ctx.(antlr.RuleContext)
  2892. break
  2893. }
  2894. }
  2895. if t == nil {
  2896. return nil
  2897. }
  2898. return t.(ISchema_nameContext)
  2899. }
  2900. func (s *Attach_stmtContext) DATABASE_() antlr.TerminalNode {
  2901. return s.GetToken(SQLiteParserDATABASE_, 0)
  2902. }
  2903. func (s *Attach_stmtContext) GetRuleContext() antlr.RuleContext {
  2904. return s
  2905. }
  2906. func (s *Attach_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  2907. return antlr.TreesStringTree(s, ruleNames, recog)
  2908. }
  2909. func (s *Attach_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  2910. if listenerT, ok := listener.(SQLiteParserListener); ok {
  2911. listenerT.EnterAttach_stmt(s)
  2912. }
  2913. }
  2914. func (s *Attach_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  2915. if listenerT, ok := listener.(SQLiteParserListener); ok {
  2916. listenerT.ExitAttach_stmt(s)
  2917. }
  2918. }
  2919. func (p *SQLiteParser) Attach_stmt() (localctx IAttach_stmtContext) {
  2920. this := p
  2921. _ = this
  2922. localctx = NewAttach_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  2923. p.EnterRule(localctx, 10, SQLiteParserRULE_attach_stmt)
  2924. defer func() {
  2925. p.ExitRule()
  2926. }()
  2927. defer func() {
  2928. if err := recover(); err != nil {
  2929. if v, ok := err.(antlr.RecognitionException); ok {
  2930. localctx.SetException(v)
  2931. p.GetErrorHandler().ReportError(p, v)
  2932. p.GetErrorHandler().Recover(p, v)
  2933. } else {
  2934. panic(err)
  2935. }
  2936. }
  2937. }()
  2938. p.EnterOuterAlt(localctx, 1)
  2939. {
  2940. p.SetState(337)
  2941. p.Match(SQLiteParserATTACH_)
  2942. }
  2943. p.SetState(339)
  2944. p.GetErrorHandler().Sync(p)
  2945. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 16, p.GetParserRuleContext()) == 1 {
  2946. {
  2947. p.SetState(338)
  2948. p.Match(SQLiteParserDATABASE_)
  2949. }
  2950. }
  2951. {
  2952. p.SetState(341)
  2953. p.expr(0)
  2954. }
  2955. {
  2956. p.SetState(342)
  2957. p.Match(SQLiteParserAS_)
  2958. }
  2959. {
  2960. p.SetState(343)
  2961. p.Schema_name()
  2962. }
  2963. return localctx
  2964. }
  2965. // IBegin_stmtContext is an interface to support dynamic dispatch.
  2966. type IBegin_stmtContext interface {
  2967. antlr.ParserRuleContext
  2968. // GetParser returns the parser.
  2969. GetParser() antlr.Parser
  2970. // Getter signatures
  2971. BEGIN_() antlr.TerminalNode
  2972. TRANSACTION_() antlr.TerminalNode
  2973. DEFERRED_() antlr.TerminalNode
  2974. IMMEDIATE_() antlr.TerminalNode
  2975. EXCLUSIVE_() antlr.TerminalNode
  2976. Transaction_name() ITransaction_nameContext
  2977. // IsBegin_stmtContext differentiates from other interfaces.
  2978. IsBegin_stmtContext()
  2979. }
  2980. type Begin_stmtContext struct {
  2981. *antlr.BaseParserRuleContext
  2982. parser antlr.Parser
  2983. }
  2984. func NewEmptyBegin_stmtContext() *Begin_stmtContext {
  2985. var p = new(Begin_stmtContext)
  2986. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  2987. p.RuleIndex = SQLiteParserRULE_begin_stmt
  2988. return p
  2989. }
  2990. func (*Begin_stmtContext) IsBegin_stmtContext() {}
  2991. func NewBegin_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Begin_stmtContext {
  2992. var p = new(Begin_stmtContext)
  2993. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  2994. p.parser = parser
  2995. p.RuleIndex = SQLiteParserRULE_begin_stmt
  2996. return p
  2997. }
  2998. func (s *Begin_stmtContext) GetParser() antlr.Parser { return s.parser }
  2999. func (s *Begin_stmtContext) BEGIN_() antlr.TerminalNode {
  3000. return s.GetToken(SQLiteParserBEGIN_, 0)
  3001. }
  3002. func (s *Begin_stmtContext) TRANSACTION_() antlr.TerminalNode {
  3003. return s.GetToken(SQLiteParserTRANSACTION_, 0)
  3004. }
  3005. func (s *Begin_stmtContext) DEFERRED_() antlr.TerminalNode {
  3006. return s.GetToken(SQLiteParserDEFERRED_, 0)
  3007. }
  3008. func (s *Begin_stmtContext) IMMEDIATE_() antlr.TerminalNode {
  3009. return s.GetToken(SQLiteParserIMMEDIATE_, 0)
  3010. }
  3011. func (s *Begin_stmtContext) EXCLUSIVE_() antlr.TerminalNode {
  3012. return s.GetToken(SQLiteParserEXCLUSIVE_, 0)
  3013. }
  3014. func (s *Begin_stmtContext) Transaction_name() ITransaction_nameContext {
  3015. var t antlr.RuleContext
  3016. for _, ctx := range s.GetChildren() {
  3017. if _, ok := ctx.(ITransaction_nameContext); ok {
  3018. t = ctx.(antlr.RuleContext)
  3019. break
  3020. }
  3021. }
  3022. if t == nil {
  3023. return nil
  3024. }
  3025. return t.(ITransaction_nameContext)
  3026. }
  3027. func (s *Begin_stmtContext) GetRuleContext() antlr.RuleContext {
  3028. return s
  3029. }
  3030. func (s *Begin_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  3031. return antlr.TreesStringTree(s, ruleNames, recog)
  3032. }
  3033. func (s *Begin_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  3034. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3035. listenerT.EnterBegin_stmt(s)
  3036. }
  3037. }
  3038. func (s *Begin_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  3039. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3040. listenerT.ExitBegin_stmt(s)
  3041. }
  3042. }
  3043. func (p *SQLiteParser) Begin_stmt() (localctx IBegin_stmtContext) {
  3044. this := p
  3045. _ = this
  3046. localctx = NewBegin_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  3047. p.EnterRule(localctx, 12, SQLiteParserRULE_begin_stmt)
  3048. var _la int
  3049. defer func() {
  3050. p.ExitRule()
  3051. }()
  3052. defer func() {
  3053. if err := recover(); err != nil {
  3054. if v, ok := err.(antlr.RecognitionException); ok {
  3055. localctx.SetException(v)
  3056. p.GetErrorHandler().ReportError(p, v)
  3057. p.GetErrorHandler().Recover(p, v)
  3058. } else {
  3059. panic(err)
  3060. }
  3061. }
  3062. }()
  3063. p.EnterOuterAlt(localctx, 1)
  3064. {
  3065. p.SetState(345)
  3066. p.Match(SQLiteParserBEGIN_)
  3067. }
  3068. p.SetState(347)
  3069. p.GetErrorHandler().Sync(p)
  3070. _la = p.GetTokenStream().LA(1)
  3071. if (int64((_la-60)) & ^0x3f) == 0 && ((int64(1)<<(_la-60))&16779265) != 0 {
  3072. {
  3073. p.SetState(346)
  3074. _la = p.GetTokenStream().LA(1)
  3075. if !((int64((_la-60)) & ^0x3f) == 0 && ((int64(1)<<(_la-60))&16779265) != 0) {
  3076. p.GetErrorHandler().RecoverInline(p)
  3077. } else {
  3078. p.GetErrorHandler().ReportMatch(p)
  3079. p.Consume()
  3080. }
  3081. }
  3082. }
  3083. p.SetState(353)
  3084. p.GetErrorHandler().Sync(p)
  3085. _la = p.GetTokenStream().LA(1)
  3086. if _la == SQLiteParserTRANSACTION_ {
  3087. {
  3088. p.SetState(349)
  3089. p.Match(SQLiteParserTRANSACTION_)
  3090. }
  3091. p.SetState(351)
  3092. p.GetErrorHandler().Sync(p)
  3093. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 18, p.GetParserRuleContext()) == 1 {
  3094. {
  3095. p.SetState(350)
  3096. p.Transaction_name()
  3097. }
  3098. }
  3099. }
  3100. return localctx
  3101. }
  3102. // ICommit_stmtContext is an interface to support dynamic dispatch.
  3103. type ICommit_stmtContext interface {
  3104. antlr.ParserRuleContext
  3105. // GetParser returns the parser.
  3106. GetParser() antlr.Parser
  3107. // Getter signatures
  3108. COMMIT_() antlr.TerminalNode
  3109. END_() antlr.TerminalNode
  3110. TRANSACTION_() antlr.TerminalNode
  3111. // IsCommit_stmtContext differentiates from other interfaces.
  3112. IsCommit_stmtContext()
  3113. }
  3114. type Commit_stmtContext struct {
  3115. *antlr.BaseParserRuleContext
  3116. parser antlr.Parser
  3117. }
  3118. func NewEmptyCommit_stmtContext() *Commit_stmtContext {
  3119. var p = new(Commit_stmtContext)
  3120. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  3121. p.RuleIndex = SQLiteParserRULE_commit_stmt
  3122. return p
  3123. }
  3124. func (*Commit_stmtContext) IsCommit_stmtContext() {}
  3125. func NewCommit_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Commit_stmtContext {
  3126. var p = new(Commit_stmtContext)
  3127. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  3128. p.parser = parser
  3129. p.RuleIndex = SQLiteParserRULE_commit_stmt
  3130. return p
  3131. }
  3132. func (s *Commit_stmtContext) GetParser() antlr.Parser { return s.parser }
  3133. func (s *Commit_stmtContext) COMMIT_() antlr.TerminalNode {
  3134. return s.GetToken(SQLiteParserCOMMIT_, 0)
  3135. }
  3136. func (s *Commit_stmtContext) END_() antlr.TerminalNode {
  3137. return s.GetToken(SQLiteParserEND_, 0)
  3138. }
  3139. func (s *Commit_stmtContext) TRANSACTION_() antlr.TerminalNode {
  3140. return s.GetToken(SQLiteParserTRANSACTION_, 0)
  3141. }
  3142. func (s *Commit_stmtContext) GetRuleContext() antlr.RuleContext {
  3143. return s
  3144. }
  3145. func (s *Commit_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  3146. return antlr.TreesStringTree(s, ruleNames, recog)
  3147. }
  3148. func (s *Commit_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  3149. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3150. listenerT.EnterCommit_stmt(s)
  3151. }
  3152. }
  3153. func (s *Commit_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  3154. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3155. listenerT.ExitCommit_stmt(s)
  3156. }
  3157. }
  3158. func (p *SQLiteParser) Commit_stmt() (localctx ICommit_stmtContext) {
  3159. this := p
  3160. _ = this
  3161. localctx = NewCommit_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  3162. p.EnterRule(localctx, 14, SQLiteParserRULE_commit_stmt)
  3163. var _la int
  3164. defer func() {
  3165. p.ExitRule()
  3166. }()
  3167. defer func() {
  3168. if err := recover(); err != nil {
  3169. if v, ok := err.(antlr.RecognitionException); ok {
  3170. localctx.SetException(v)
  3171. p.GetErrorHandler().ReportError(p, v)
  3172. p.GetErrorHandler().Recover(p, v)
  3173. } else {
  3174. panic(err)
  3175. }
  3176. }
  3177. }()
  3178. p.EnterOuterAlt(localctx, 1)
  3179. {
  3180. p.SetState(355)
  3181. _la = p.GetTokenStream().LA(1)
  3182. if !(_la == SQLiteParserCOMMIT_ || _la == SQLiteParserEND_) {
  3183. p.GetErrorHandler().RecoverInline(p)
  3184. } else {
  3185. p.GetErrorHandler().ReportMatch(p)
  3186. p.Consume()
  3187. }
  3188. }
  3189. p.SetState(357)
  3190. p.GetErrorHandler().Sync(p)
  3191. _la = p.GetTokenStream().LA(1)
  3192. if _la == SQLiteParserTRANSACTION_ {
  3193. {
  3194. p.SetState(356)
  3195. p.Match(SQLiteParserTRANSACTION_)
  3196. }
  3197. }
  3198. return localctx
  3199. }
  3200. // IRollback_stmtContext is an interface to support dynamic dispatch.
  3201. type IRollback_stmtContext interface {
  3202. antlr.ParserRuleContext
  3203. // GetParser returns the parser.
  3204. GetParser() antlr.Parser
  3205. // Getter signatures
  3206. ROLLBACK_() antlr.TerminalNode
  3207. TRANSACTION_() antlr.TerminalNode
  3208. TO_() antlr.TerminalNode
  3209. Savepoint_name() ISavepoint_nameContext
  3210. SAVEPOINT_() antlr.TerminalNode
  3211. // IsRollback_stmtContext differentiates from other interfaces.
  3212. IsRollback_stmtContext()
  3213. }
  3214. type Rollback_stmtContext struct {
  3215. *antlr.BaseParserRuleContext
  3216. parser antlr.Parser
  3217. }
  3218. func NewEmptyRollback_stmtContext() *Rollback_stmtContext {
  3219. var p = new(Rollback_stmtContext)
  3220. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  3221. p.RuleIndex = SQLiteParserRULE_rollback_stmt
  3222. return p
  3223. }
  3224. func (*Rollback_stmtContext) IsRollback_stmtContext() {}
  3225. func NewRollback_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Rollback_stmtContext {
  3226. var p = new(Rollback_stmtContext)
  3227. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  3228. p.parser = parser
  3229. p.RuleIndex = SQLiteParserRULE_rollback_stmt
  3230. return p
  3231. }
  3232. func (s *Rollback_stmtContext) GetParser() antlr.Parser { return s.parser }
  3233. func (s *Rollback_stmtContext) ROLLBACK_() antlr.TerminalNode {
  3234. return s.GetToken(SQLiteParserROLLBACK_, 0)
  3235. }
  3236. func (s *Rollback_stmtContext) TRANSACTION_() antlr.TerminalNode {
  3237. return s.GetToken(SQLiteParserTRANSACTION_, 0)
  3238. }
  3239. func (s *Rollback_stmtContext) TO_() antlr.TerminalNode {
  3240. return s.GetToken(SQLiteParserTO_, 0)
  3241. }
  3242. func (s *Rollback_stmtContext) Savepoint_name() ISavepoint_nameContext {
  3243. var t antlr.RuleContext
  3244. for _, ctx := range s.GetChildren() {
  3245. if _, ok := ctx.(ISavepoint_nameContext); ok {
  3246. t = ctx.(antlr.RuleContext)
  3247. break
  3248. }
  3249. }
  3250. if t == nil {
  3251. return nil
  3252. }
  3253. return t.(ISavepoint_nameContext)
  3254. }
  3255. func (s *Rollback_stmtContext) SAVEPOINT_() antlr.TerminalNode {
  3256. return s.GetToken(SQLiteParserSAVEPOINT_, 0)
  3257. }
  3258. func (s *Rollback_stmtContext) GetRuleContext() antlr.RuleContext {
  3259. return s
  3260. }
  3261. func (s *Rollback_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  3262. return antlr.TreesStringTree(s, ruleNames, recog)
  3263. }
  3264. func (s *Rollback_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  3265. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3266. listenerT.EnterRollback_stmt(s)
  3267. }
  3268. }
  3269. func (s *Rollback_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  3270. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3271. listenerT.ExitRollback_stmt(s)
  3272. }
  3273. }
  3274. func (p *SQLiteParser) Rollback_stmt() (localctx IRollback_stmtContext) {
  3275. this := p
  3276. _ = this
  3277. localctx = NewRollback_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  3278. p.EnterRule(localctx, 16, SQLiteParserRULE_rollback_stmt)
  3279. var _la int
  3280. defer func() {
  3281. p.ExitRule()
  3282. }()
  3283. defer func() {
  3284. if err := recover(); err != nil {
  3285. if v, ok := err.(antlr.RecognitionException); ok {
  3286. localctx.SetException(v)
  3287. p.GetErrorHandler().ReportError(p, v)
  3288. p.GetErrorHandler().Recover(p, v)
  3289. } else {
  3290. panic(err)
  3291. }
  3292. }
  3293. }()
  3294. p.EnterOuterAlt(localctx, 1)
  3295. {
  3296. p.SetState(359)
  3297. p.Match(SQLiteParserROLLBACK_)
  3298. }
  3299. p.SetState(361)
  3300. p.GetErrorHandler().Sync(p)
  3301. _la = p.GetTokenStream().LA(1)
  3302. if _la == SQLiteParserTRANSACTION_ {
  3303. {
  3304. p.SetState(360)
  3305. p.Match(SQLiteParserTRANSACTION_)
  3306. }
  3307. }
  3308. p.SetState(368)
  3309. p.GetErrorHandler().Sync(p)
  3310. _la = p.GetTokenStream().LA(1)
  3311. if _la == SQLiteParserTO_ {
  3312. {
  3313. p.SetState(363)
  3314. p.Match(SQLiteParserTO_)
  3315. }
  3316. p.SetState(365)
  3317. p.GetErrorHandler().Sync(p)
  3318. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 22, p.GetParserRuleContext()) == 1 {
  3319. {
  3320. p.SetState(364)
  3321. p.Match(SQLiteParserSAVEPOINT_)
  3322. }
  3323. }
  3324. {
  3325. p.SetState(367)
  3326. p.Savepoint_name()
  3327. }
  3328. }
  3329. return localctx
  3330. }
  3331. // ISavepoint_stmtContext is an interface to support dynamic dispatch.
  3332. type ISavepoint_stmtContext interface {
  3333. antlr.ParserRuleContext
  3334. // GetParser returns the parser.
  3335. GetParser() antlr.Parser
  3336. // Getter signatures
  3337. SAVEPOINT_() antlr.TerminalNode
  3338. Savepoint_name() ISavepoint_nameContext
  3339. // IsSavepoint_stmtContext differentiates from other interfaces.
  3340. IsSavepoint_stmtContext()
  3341. }
  3342. type Savepoint_stmtContext struct {
  3343. *antlr.BaseParserRuleContext
  3344. parser antlr.Parser
  3345. }
  3346. func NewEmptySavepoint_stmtContext() *Savepoint_stmtContext {
  3347. var p = new(Savepoint_stmtContext)
  3348. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  3349. p.RuleIndex = SQLiteParserRULE_savepoint_stmt
  3350. return p
  3351. }
  3352. func (*Savepoint_stmtContext) IsSavepoint_stmtContext() {}
  3353. func NewSavepoint_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Savepoint_stmtContext {
  3354. var p = new(Savepoint_stmtContext)
  3355. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  3356. p.parser = parser
  3357. p.RuleIndex = SQLiteParserRULE_savepoint_stmt
  3358. return p
  3359. }
  3360. func (s *Savepoint_stmtContext) GetParser() antlr.Parser { return s.parser }
  3361. func (s *Savepoint_stmtContext) SAVEPOINT_() antlr.TerminalNode {
  3362. return s.GetToken(SQLiteParserSAVEPOINT_, 0)
  3363. }
  3364. func (s *Savepoint_stmtContext) Savepoint_name() ISavepoint_nameContext {
  3365. var t antlr.RuleContext
  3366. for _, ctx := range s.GetChildren() {
  3367. if _, ok := ctx.(ISavepoint_nameContext); ok {
  3368. t = ctx.(antlr.RuleContext)
  3369. break
  3370. }
  3371. }
  3372. if t == nil {
  3373. return nil
  3374. }
  3375. return t.(ISavepoint_nameContext)
  3376. }
  3377. func (s *Savepoint_stmtContext) GetRuleContext() antlr.RuleContext {
  3378. return s
  3379. }
  3380. func (s *Savepoint_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  3381. return antlr.TreesStringTree(s, ruleNames, recog)
  3382. }
  3383. func (s *Savepoint_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  3384. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3385. listenerT.EnterSavepoint_stmt(s)
  3386. }
  3387. }
  3388. func (s *Savepoint_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  3389. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3390. listenerT.ExitSavepoint_stmt(s)
  3391. }
  3392. }
  3393. func (p *SQLiteParser) Savepoint_stmt() (localctx ISavepoint_stmtContext) {
  3394. this := p
  3395. _ = this
  3396. localctx = NewSavepoint_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  3397. p.EnterRule(localctx, 18, SQLiteParserRULE_savepoint_stmt)
  3398. defer func() {
  3399. p.ExitRule()
  3400. }()
  3401. defer func() {
  3402. if err := recover(); err != nil {
  3403. if v, ok := err.(antlr.RecognitionException); ok {
  3404. localctx.SetException(v)
  3405. p.GetErrorHandler().ReportError(p, v)
  3406. p.GetErrorHandler().Recover(p, v)
  3407. } else {
  3408. panic(err)
  3409. }
  3410. }
  3411. }()
  3412. p.EnterOuterAlt(localctx, 1)
  3413. {
  3414. p.SetState(370)
  3415. p.Match(SQLiteParserSAVEPOINT_)
  3416. }
  3417. {
  3418. p.SetState(371)
  3419. p.Savepoint_name()
  3420. }
  3421. return localctx
  3422. }
  3423. // IRelease_stmtContext is an interface to support dynamic dispatch.
  3424. type IRelease_stmtContext interface {
  3425. antlr.ParserRuleContext
  3426. // GetParser returns the parser.
  3427. GetParser() antlr.Parser
  3428. // Getter signatures
  3429. RELEASE_() antlr.TerminalNode
  3430. Savepoint_name() ISavepoint_nameContext
  3431. SAVEPOINT_() antlr.TerminalNode
  3432. // IsRelease_stmtContext differentiates from other interfaces.
  3433. IsRelease_stmtContext()
  3434. }
  3435. type Release_stmtContext struct {
  3436. *antlr.BaseParserRuleContext
  3437. parser antlr.Parser
  3438. }
  3439. func NewEmptyRelease_stmtContext() *Release_stmtContext {
  3440. var p = new(Release_stmtContext)
  3441. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  3442. p.RuleIndex = SQLiteParserRULE_release_stmt
  3443. return p
  3444. }
  3445. func (*Release_stmtContext) IsRelease_stmtContext() {}
  3446. func NewRelease_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Release_stmtContext {
  3447. var p = new(Release_stmtContext)
  3448. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  3449. p.parser = parser
  3450. p.RuleIndex = SQLiteParserRULE_release_stmt
  3451. return p
  3452. }
  3453. func (s *Release_stmtContext) GetParser() antlr.Parser { return s.parser }
  3454. func (s *Release_stmtContext) RELEASE_() antlr.TerminalNode {
  3455. return s.GetToken(SQLiteParserRELEASE_, 0)
  3456. }
  3457. func (s *Release_stmtContext) Savepoint_name() ISavepoint_nameContext {
  3458. var t antlr.RuleContext
  3459. for _, ctx := range s.GetChildren() {
  3460. if _, ok := ctx.(ISavepoint_nameContext); ok {
  3461. t = ctx.(antlr.RuleContext)
  3462. break
  3463. }
  3464. }
  3465. if t == nil {
  3466. return nil
  3467. }
  3468. return t.(ISavepoint_nameContext)
  3469. }
  3470. func (s *Release_stmtContext) SAVEPOINT_() antlr.TerminalNode {
  3471. return s.GetToken(SQLiteParserSAVEPOINT_, 0)
  3472. }
  3473. func (s *Release_stmtContext) GetRuleContext() antlr.RuleContext {
  3474. return s
  3475. }
  3476. func (s *Release_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  3477. return antlr.TreesStringTree(s, ruleNames, recog)
  3478. }
  3479. func (s *Release_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  3480. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3481. listenerT.EnterRelease_stmt(s)
  3482. }
  3483. }
  3484. func (s *Release_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  3485. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3486. listenerT.ExitRelease_stmt(s)
  3487. }
  3488. }
  3489. func (p *SQLiteParser) Release_stmt() (localctx IRelease_stmtContext) {
  3490. this := p
  3491. _ = this
  3492. localctx = NewRelease_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  3493. p.EnterRule(localctx, 20, SQLiteParserRULE_release_stmt)
  3494. defer func() {
  3495. p.ExitRule()
  3496. }()
  3497. defer func() {
  3498. if err := recover(); err != nil {
  3499. if v, ok := err.(antlr.RecognitionException); ok {
  3500. localctx.SetException(v)
  3501. p.GetErrorHandler().ReportError(p, v)
  3502. p.GetErrorHandler().Recover(p, v)
  3503. } else {
  3504. panic(err)
  3505. }
  3506. }
  3507. }()
  3508. p.EnterOuterAlt(localctx, 1)
  3509. {
  3510. p.SetState(373)
  3511. p.Match(SQLiteParserRELEASE_)
  3512. }
  3513. p.SetState(375)
  3514. p.GetErrorHandler().Sync(p)
  3515. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 24, p.GetParserRuleContext()) == 1 {
  3516. {
  3517. p.SetState(374)
  3518. p.Match(SQLiteParserSAVEPOINT_)
  3519. }
  3520. }
  3521. {
  3522. p.SetState(377)
  3523. p.Savepoint_name()
  3524. }
  3525. return localctx
  3526. }
  3527. // ICreate_index_stmtContext is an interface to support dynamic dispatch.
  3528. type ICreate_index_stmtContext interface {
  3529. antlr.ParserRuleContext
  3530. // GetParser returns the parser.
  3531. GetParser() antlr.Parser
  3532. // Getter signatures
  3533. CREATE_() antlr.TerminalNode
  3534. INDEX_() antlr.TerminalNode
  3535. Index_name() IIndex_nameContext
  3536. ON_() antlr.TerminalNode
  3537. Table_name() ITable_nameContext
  3538. OPEN_PAR() antlr.TerminalNode
  3539. AllIndexed_column() []IIndexed_columnContext
  3540. Indexed_column(i int) IIndexed_columnContext
  3541. CLOSE_PAR() antlr.TerminalNode
  3542. UNIQUE_() antlr.TerminalNode
  3543. IF_() antlr.TerminalNode
  3544. NOT_() antlr.TerminalNode
  3545. EXISTS_() antlr.TerminalNode
  3546. Schema_name() ISchema_nameContext
  3547. DOT() antlr.TerminalNode
  3548. AllCOMMA() []antlr.TerminalNode
  3549. COMMA(i int) antlr.TerminalNode
  3550. WHERE_() antlr.TerminalNode
  3551. Expr() IExprContext
  3552. // IsCreate_index_stmtContext differentiates from other interfaces.
  3553. IsCreate_index_stmtContext()
  3554. }
  3555. type Create_index_stmtContext struct {
  3556. *antlr.BaseParserRuleContext
  3557. parser antlr.Parser
  3558. }
  3559. func NewEmptyCreate_index_stmtContext() *Create_index_stmtContext {
  3560. var p = new(Create_index_stmtContext)
  3561. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  3562. p.RuleIndex = SQLiteParserRULE_create_index_stmt
  3563. return p
  3564. }
  3565. func (*Create_index_stmtContext) IsCreate_index_stmtContext() {}
  3566. func NewCreate_index_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_index_stmtContext {
  3567. var p = new(Create_index_stmtContext)
  3568. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  3569. p.parser = parser
  3570. p.RuleIndex = SQLiteParserRULE_create_index_stmt
  3571. return p
  3572. }
  3573. func (s *Create_index_stmtContext) GetParser() antlr.Parser { return s.parser }
  3574. func (s *Create_index_stmtContext) CREATE_() antlr.TerminalNode {
  3575. return s.GetToken(SQLiteParserCREATE_, 0)
  3576. }
  3577. func (s *Create_index_stmtContext) INDEX_() antlr.TerminalNode {
  3578. return s.GetToken(SQLiteParserINDEX_, 0)
  3579. }
  3580. func (s *Create_index_stmtContext) Index_name() IIndex_nameContext {
  3581. var t antlr.RuleContext
  3582. for _, ctx := range s.GetChildren() {
  3583. if _, ok := ctx.(IIndex_nameContext); ok {
  3584. t = ctx.(antlr.RuleContext)
  3585. break
  3586. }
  3587. }
  3588. if t == nil {
  3589. return nil
  3590. }
  3591. return t.(IIndex_nameContext)
  3592. }
  3593. func (s *Create_index_stmtContext) ON_() antlr.TerminalNode {
  3594. return s.GetToken(SQLiteParserON_, 0)
  3595. }
  3596. func (s *Create_index_stmtContext) Table_name() ITable_nameContext {
  3597. var t antlr.RuleContext
  3598. for _, ctx := range s.GetChildren() {
  3599. if _, ok := ctx.(ITable_nameContext); ok {
  3600. t = ctx.(antlr.RuleContext)
  3601. break
  3602. }
  3603. }
  3604. if t == nil {
  3605. return nil
  3606. }
  3607. return t.(ITable_nameContext)
  3608. }
  3609. func (s *Create_index_stmtContext) OPEN_PAR() antlr.TerminalNode {
  3610. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  3611. }
  3612. func (s *Create_index_stmtContext) AllIndexed_column() []IIndexed_columnContext {
  3613. children := s.GetChildren()
  3614. len := 0
  3615. for _, ctx := range children {
  3616. if _, ok := ctx.(IIndexed_columnContext); ok {
  3617. len++
  3618. }
  3619. }
  3620. tst := make([]IIndexed_columnContext, len)
  3621. i := 0
  3622. for _, ctx := range children {
  3623. if t, ok := ctx.(IIndexed_columnContext); ok {
  3624. tst[i] = t.(IIndexed_columnContext)
  3625. i++
  3626. }
  3627. }
  3628. return tst
  3629. }
  3630. func (s *Create_index_stmtContext) Indexed_column(i int) IIndexed_columnContext {
  3631. var t antlr.RuleContext
  3632. j := 0
  3633. for _, ctx := range s.GetChildren() {
  3634. if _, ok := ctx.(IIndexed_columnContext); ok {
  3635. if j == i {
  3636. t = ctx.(antlr.RuleContext)
  3637. break
  3638. }
  3639. j++
  3640. }
  3641. }
  3642. if t == nil {
  3643. return nil
  3644. }
  3645. return t.(IIndexed_columnContext)
  3646. }
  3647. func (s *Create_index_stmtContext) CLOSE_PAR() antlr.TerminalNode {
  3648. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  3649. }
  3650. func (s *Create_index_stmtContext) UNIQUE_() antlr.TerminalNode {
  3651. return s.GetToken(SQLiteParserUNIQUE_, 0)
  3652. }
  3653. func (s *Create_index_stmtContext) IF_() antlr.TerminalNode {
  3654. return s.GetToken(SQLiteParserIF_, 0)
  3655. }
  3656. func (s *Create_index_stmtContext) NOT_() antlr.TerminalNode {
  3657. return s.GetToken(SQLiteParserNOT_, 0)
  3658. }
  3659. func (s *Create_index_stmtContext) EXISTS_() antlr.TerminalNode {
  3660. return s.GetToken(SQLiteParserEXISTS_, 0)
  3661. }
  3662. func (s *Create_index_stmtContext) Schema_name() ISchema_nameContext {
  3663. var t antlr.RuleContext
  3664. for _, ctx := range s.GetChildren() {
  3665. if _, ok := ctx.(ISchema_nameContext); ok {
  3666. t = ctx.(antlr.RuleContext)
  3667. break
  3668. }
  3669. }
  3670. if t == nil {
  3671. return nil
  3672. }
  3673. return t.(ISchema_nameContext)
  3674. }
  3675. func (s *Create_index_stmtContext) DOT() antlr.TerminalNode {
  3676. return s.GetToken(SQLiteParserDOT, 0)
  3677. }
  3678. func (s *Create_index_stmtContext) AllCOMMA() []antlr.TerminalNode {
  3679. return s.GetTokens(SQLiteParserCOMMA)
  3680. }
  3681. func (s *Create_index_stmtContext) COMMA(i int) antlr.TerminalNode {
  3682. return s.GetToken(SQLiteParserCOMMA, i)
  3683. }
  3684. func (s *Create_index_stmtContext) WHERE_() antlr.TerminalNode {
  3685. return s.GetToken(SQLiteParserWHERE_, 0)
  3686. }
  3687. func (s *Create_index_stmtContext) Expr() IExprContext {
  3688. var t antlr.RuleContext
  3689. for _, ctx := range s.GetChildren() {
  3690. if _, ok := ctx.(IExprContext); ok {
  3691. t = ctx.(antlr.RuleContext)
  3692. break
  3693. }
  3694. }
  3695. if t == nil {
  3696. return nil
  3697. }
  3698. return t.(IExprContext)
  3699. }
  3700. func (s *Create_index_stmtContext) GetRuleContext() antlr.RuleContext {
  3701. return s
  3702. }
  3703. func (s *Create_index_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  3704. return antlr.TreesStringTree(s, ruleNames, recog)
  3705. }
  3706. func (s *Create_index_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  3707. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3708. listenerT.EnterCreate_index_stmt(s)
  3709. }
  3710. }
  3711. func (s *Create_index_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  3712. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3713. listenerT.ExitCreate_index_stmt(s)
  3714. }
  3715. }
  3716. func (p *SQLiteParser) Create_index_stmt() (localctx ICreate_index_stmtContext) {
  3717. this := p
  3718. _ = this
  3719. localctx = NewCreate_index_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  3720. p.EnterRule(localctx, 22, SQLiteParserRULE_create_index_stmt)
  3721. var _la int
  3722. defer func() {
  3723. p.ExitRule()
  3724. }()
  3725. defer func() {
  3726. if err := recover(); err != nil {
  3727. if v, ok := err.(antlr.RecognitionException); ok {
  3728. localctx.SetException(v)
  3729. p.GetErrorHandler().ReportError(p, v)
  3730. p.GetErrorHandler().Recover(p, v)
  3731. } else {
  3732. panic(err)
  3733. }
  3734. }
  3735. }()
  3736. p.EnterOuterAlt(localctx, 1)
  3737. {
  3738. p.SetState(379)
  3739. p.Match(SQLiteParserCREATE_)
  3740. }
  3741. p.SetState(381)
  3742. p.GetErrorHandler().Sync(p)
  3743. _la = p.GetTokenStream().LA(1)
  3744. if _la == SQLiteParserUNIQUE_ {
  3745. {
  3746. p.SetState(380)
  3747. p.Match(SQLiteParserUNIQUE_)
  3748. }
  3749. }
  3750. {
  3751. p.SetState(383)
  3752. p.Match(SQLiteParserINDEX_)
  3753. }
  3754. p.SetState(387)
  3755. p.GetErrorHandler().Sync(p)
  3756. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 26, p.GetParserRuleContext()) == 1 {
  3757. {
  3758. p.SetState(384)
  3759. p.Match(SQLiteParserIF_)
  3760. }
  3761. {
  3762. p.SetState(385)
  3763. p.Match(SQLiteParserNOT_)
  3764. }
  3765. {
  3766. p.SetState(386)
  3767. p.Match(SQLiteParserEXISTS_)
  3768. }
  3769. }
  3770. p.SetState(392)
  3771. p.GetErrorHandler().Sync(p)
  3772. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 27, p.GetParserRuleContext()) == 1 {
  3773. {
  3774. p.SetState(389)
  3775. p.Schema_name()
  3776. }
  3777. {
  3778. p.SetState(390)
  3779. p.Match(SQLiteParserDOT)
  3780. }
  3781. }
  3782. {
  3783. p.SetState(394)
  3784. p.Index_name()
  3785. }
  3786. {
  3787. p.SetState(395)
  3788. p.Match(SQLiteParserON_)
  3789. }
  3790. {
  3791. p.SetState(396)
  3792. p.Table_name()
  3793. }
  3794. {
  3795. p.SetState(397)
  3796. p.Match(SQLiteParserOPEN_PAR)
  3797. }
  3798. {
  3799. p.SetState(398)
  3800. p.Indexed_column()
  3801. }
  3802. p.SetState(403)
  3803. p.GetErrorHandler().Sync(p)
  3804. _la = p.GetTokenStream().LA(1)
  3805. for _la == SQLiteParserCOMMA {
  3806. {
  3807. p.SetState(399)
  3808. p.Match(SQLiteParserCOMMA)
  3809. }
  3810. {
  3811. p.SetState(400)
  3812. p.Indexed_column()
  3813. }
  3814. p.SetState(405)
  3815. p.GetErrorHandler().Sync(p)
  3816. _la = p.GetTokenStream().LA(1)
  3817. }
  3818. {
  3819. p.SetState(406)
  3820. p.Match(SQLiteParserCLOSE_PAR)
  3821. }
  3822. p.SetState(409)
  3823. p.GetErrorHandler().Sync(p)
  3824. _la = p.GetTokenStream().LA(1)
  3825. if _la == SQLiteParserWHERE_ {
  3826. {
  3827. p.SetState(407)
  3828. p.Match(SQLiteParserWHERE_)
  3829. }
  3830. {
  3831. p.SetState(408)
  3832. p.expr(0)
  3833. }
  3834. }
  3835. return localctx
  3836. }
  3837. // IIndexed_columnContext is an interface to support dynamic dispatch.
  3838. type IIndexed_columnContext interface {
  3839. antlr.ParserRuleContext
  3840. // GetParser returns the parser.
  3841. GetParser() antlr.Parser
  3842. // Getter signatures
  3843. Column_name() IColumn_nameContext
  3844. Expr() IExprContext
  3845. COLLATE_() antlr.TerminalNode
  3846. Collation_name() ICollation_nameContext
  3847. Asc_desc() IAsc_descContext
  3848. // IsIndexed_columnContext differentiates from other interfaces.
  3849. IsIndexed_columnContext()
  3850. }
  3851. type Indexed_columnContext struct {
  3852. *antlr.BaseParserRuleContext
  3853. parser antlr.Parser
  3854. }
  3855. func NewEmptyIndexed_columnContext() *Indexed_columnContext {
  3856. var p = new(Indexed_columnContext)
  3857. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  3858. p.RuleIndex = SQLiteParserRULE_indexed_column
  3859. return p
  3860. }
  3861. func (*Indexed_columnContext) IsIndexed_columnContext() {}
  3862. func NewIndexed_columnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Indexed_columnContext {
  3863. var p = new(Indexed_columnContext)
  3864. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  3865. p.parser = parser
  3866. p.RuleIndex = SQLiteParserRULE_indexed_column
  3867. return p
  3868. }
  3869. func (s *Indexed_columnContext) GetParser() antlr.Parser { return s.parser }
  3870. func (s *Indexed_columnContext) Column_name() IColumn_nameContext {
  3871. var t antlr.RuleContext
  3872. for _, ctx := range s.GetChildren() {
  3873. if _, ok := ctx.(IColumn_nameContext); ok {
  3874. t = ctx.(antlr.RuleContext)
  3875. break
  3876. }
  3877. }
  3878. if t == nil {
  3879. return nil
  3880. }
  3881. return t.(IColumn_nameContext)
  3882. }
  3883. func (s *Indexed_columnContext) Expr() IExprContext {
  3884. var t antlr.RuleContext
  3885. for _, ctx := range s.GetChildren() {
  3886. if _, ok := ctx.(IExprContext); ok {
  3887. t = ctx.(antlr.RuleContext)
  3888. break
  3889. }
  3890. }
  3891. if t == nil {
  3892. return nil
  3893. }
  3894. return t.(IExprContext)
  3895. }
  3896. func (s *Indexed_columnContext) COLLATE_() antlr.TerminalNode {
  3897. return s.GetToken(SQLiteParserCOLLATE_, 0)
  3898. }
  3899. func (s *Indexed_columnContext) Collation_name() ICollation_nameContext {
  3900. var t antlr.RuleContext
  3901. for _, ctx := range s.GetChildren() {
  3902. if _, ok := ctx.(ICollation_nameContext); ok {
  3903. t = ctx.(antlr.RuleContext)
  3904. break
  3905. }
  3906. }
  3907. if t == nil {
  3908. return nil
  3909. }
  3910. return t.(ICollation_nameContext)
  3911. }
  3912. func (s *Indexed_columnContext) Asc_desc() IAsc_descContext {
  3913. var t antlr.RuleContext
  3914. for _, ctx := range s.GetChildren() {
  3915. if _, ok := ctx.(IAsc_descContext); ok {
  3916. t = ctx.(antlr.RuleContext)
  3917. break
  3918. }
  3919. }
  3920. if t == nil {
  3921. return nil
  3922. }
  3923. return t.(IAsc_descContext)
  3924. }
  3925. func (s *Indexed_columnContext) GetRuleContext() antlr.RuleContext {
  3926. return s
  3927. }
  3928. func (s *Indexed_columnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  3929. return antlr.TreesStringTree(s, ruleNames, recog)
  3930. }
  3931. func (s *Indexed_columnContext) EnterRule(listener antlr.ParseTreeListener) {
  3932. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3933. listenerT.EnterIndexed_column(s)
  3934. }
  3935. }
  3936. func (s *Indexed_columnContext) ExitRule(listener antlr.ParseTreeListener) {
  3937. if listenerT, ok := listener.(SQLiteParserListener); ok {
  3938. listenerT.ExitIndexed_column(s)
  3939. }
  3940. }
  3941. func (p *SQLiteParser) Indexed_column() (localctx IIndexed_columnContext) {
  3942. this := p
  3943. _ = this
  3944. localctx = NewIndexed_columnContext(p, p.GetParserRuleContext(), p.GetState())
  3945. p.EnterRule(localctx, 24, SQLiteParserRULE_indexed_column)
  3946. var _la int
  3947. defer func() {
  3948. p.ExitRule()
  3949. }()
  3950. defer func() {
  3951. if err := recover(); err != nil {
  3952. if v, ok := err.(antlr.RecognitionException); ok {
  3953. localctx.SetException(v)
  3954. p.GetErrorHandler().ReportError(p, v)
  3955. p.GetErrorHandler().Recover(p, v)
  3956. } else {
  3957. panic(err)
  3958. }
  3959. }
  3960. }()
  3961. p.EnterOuterAlt(localctx, 1)
  3962. p.SetState(413)
  3963. p.GetErrorHandler().Sync(p)
  3964. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 30, p.GetParserRuleContext()) {
  3965. case 1:
  3966. {
  3967. p.SetState(411)
  3968. p.Column_name()
  3969. }
  3970. case 2:
  3971. {
  3972. p.SetState(412)
  3973. p.expr(0)
  3974. }
  3975. }
  3976. p.SetState(417)
  3977. p.GetErrorHandler().Sync(p)
  3978. _la = p.GetTokenStream().LA(1)
  3979. if _la == SQLiteParserCOLLATE_ {
  3980. {
  3981. p.SetState(415)
  3982. p.Match(SQLiteParserCOLLATE_)
  3983. }
  3984. {
  3985. p.SetState(416)
  3986. p.Collation_name()
  3987. }
  3988. }
  3989. p.SetState(420)
  3990. p.GetErrorHandler().Sync(p)
  3991. _la = p.GetTokenStream().LA(1)
  3992. if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ {
  3993. {
  3994. p.SetState(419)
  3995. p.Asc_desc()
  3996. }
  3997. }
  3998. return localctx
  3999. }
  4000. // ITable_optionContext is an interface to support dynamic dispatch.
  4001. type ITable_optionContext interface {
  4002. antlr.ParserRuleContext
  4003. // GetParser returns the parser.
  4004. GetParser() antlr.Parser
  4005. // GetRow_ROW_ID returns the row_ROW_ID token.
  4006. GetRow_ROW_ID() antlr.Token
  4007. // SetRow_ROW_ID sets the row_ROW_ID token.
  4008. SetRow_ROW_ID(antlr.Token)
  4009. // Getter signatures
  4010. WITHOUT_() antlr.TerminalNode
  4011. IDENTIFIER() antlr.TerminalNode
  4012. STRICT_() antlr.TerminalNode
  4013. // IsTable_optionContext differentiates from other interfaces.
  4014. IsTable_optionContext()
  4015. }
  4016. type Table_optionContext struct {
  4017. *antlr.BaseParserRuleContext
  4018. parser antlr.Parser
  4019. row_ROW_ID antlr.Token
  4020. }
  4021. func NewEmptyTable_optionContext() *Table_optionContext {
  4022. var p = new(Table_optionContext)
  4023. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  4024. p.RuleIndex = SQLiteParserRULE_table_option
  4025. return p
  4026. }
  4027. func (*Table_optionContext) IsTable_optionContext() {}
  4028. func NewTable_optionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_optionContext {
  4029. var p = new(Table_optionContext)
  4030. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  4031. p.parser = parser
  4032. p.RuleIndex = SQLiteParserRULE_table_option
  4033. return p
  4034. }
  4035. func (s *Table_optionContext) GetParser() antlr.Parser { return s.parser }
  4036. func (s *Table_optionContext) GetRow_ROW_ID() antlr.Token { return s.row_ROW_ID }
  4037. func (s *Table_optionContext) SetRow_ROW_ID(v antlr.Token) { s.row_ROW_ID = v }
  4038. func (s *Table_optionContext) WITHOUT_() antlr.TerminalNode {
  4039. return s.GetToken(SQLiteParserWITHOUT_, 0)
  4040. }
  4041. func (s *Table_optionContext) IDENTIFIER() antlr.TerminalNode {
  4042. return s.GetToken(SQLiteParserIDENTIFIER, 0)
  4043. }
  4044. func (s *Table_optionContext) STRICT_() antlr.TerminalNode {
  4045. return s.GetToken(SQLiteParserSTRICT_, 0)
  4046. }
  4047. func (s *Table_optionContext) GetRuleContext() antlr.RuleContext {
  4048. return s
  4049. }
  4050. func (s *Table_optionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  4051. return antlr.TreesStringTree(s, ruleNames, recog)
  4052. }
  4053. func (s *Table_optionContext) EnterRule(listener antlr.ParseTreeListener) {
  4054. if listenerT, ok := listener.(SQLiteParserListener); ok {
  4055. listenerT.EnterTable_option(s)
  4056. }
  4057. }
  4058. func (s *Table_optionContext) ExitRule(listener antlr.ParseTreeListener) {
  4059. if listenerT, ok := listener.(SQLiteParserListener); ok {
  4060. listenerT.ExitTable_option(s)
  4061. }
  4062. }
  4063. func (p *SQLiteParser) Table_option() (localctx ITable_optionContext) {
  4064. this := p
  4065. _ = this
  4066. localctx = NewTable_optionContext(p, p.GetParserRuleContext(), p.GetState())
  4067. p.EnterRule(localctx, 26, SQLiteParserRULE_table_option)
  4068. defer func() {
  4069. p.ExitRule()
  4070. }()
  4071. defer func() {
  4072. if err := recover(); err != nil {
  4073. if v, ok := err.(antlr.RecognitionException); ok {
  4074. localctx.SetException(v)
  4075. p.GetErrorHandler().ReportError(p, v)
  4076. p.GetErrorHandler().Recover(p, v)
  4077. } else {
  4078. panic(err)
  4079. }
  4080. }
  4081. }()
  4082. p.SetState(425)
  4083. p.GetErrorHandler().Sync(p)
  4084. switch p.GetTokenStream().LA(1) {
  4085. case SQLiteParserWITHOUT_:
  4086. p.EnterOuterAlt(localctx, 1)
  4087. {
  4088. p.SetState(422)
  4089. p.Match(SQLiteParserWITHOUT_)
  4090. }
  4091. {
  4092. p.SetState(423)
  4093. var _m = p.Match(SQLiteParserIDENTIFIER)
  4094. localctx.(*Table_optionContext).row_ROW_ID = _m
  4095. }
  4096. case SQLiteParserSTRICT_:
  4097. p.EnterOuterAlt(localctx, 2)
  4098. {
  4099. p.SetState(424)
  4100. p.Match(SQLiteParserSTRICT_)
  4101. }
  4102. default:
  4103. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  4104. }
  4105. return localctx
  4106. }
  4107. // ICreate_table_stmtContext is an interface to support dynamic dispatch.
  4108. type ICreate_table_stmtContext interface {
  4109. antlr.ParserRuleContext
  4110. // GetParser returns the parser.
  4111. GetParser() antlr.Parser
  4112. // Getter signatures
  4113. CREATE_() antlr.TerminalNode
  4114. TABLE_() antlr.TerminalNode
  4115. Table_name() ITable_nameContext
  4116. OPEN_PAR() antlr.TerminalNode
  4117. AllColumn_def() []IColumn_defContext
  4118. Column_def(i int) IColumn_defContext
  4119. CLOSE_PAR() antlr.TerminalNode
  4120. AS_() antlr.TerminalNode
  4121. Select_stmt() ISelect_stmtContext
  4122. IF_() antlr.TerminalNode
  4123. NOT_() antlr.TerminalNode
  4124. EXISTS_() antlr.TerminalNode
  4125. Schema_name() ISchema_nameContext
  4126. DOT() antlr.TerminalNode
  4127. TEMP_() antlr.TerminalNode
  4128. TEMPORARY_() antlr.TerminalNode
  4129. AllCOMMA() []antlr.TerminalNode
  4130. COMMA(i int) antlr.TerminalNode
  4131. AllTable_constraint() []ITable_constraintContext
  4132. Table_constraint(i int) ITable_constraintContext
  4133. AllTable_option() []ITable_optionContext
  4134. Table_option(i int) ITable_optionContext
  4135. // IsCreate_table_stmtContext differentiates from other interfaces.
  4136. IsCreate_table_stmtContext()
  4137. }
  4138. type Create_table_stmtContext struct {
  4139. *antlr.BaseParserRuleContext
  4140. parser antlr.Parser
  4141. }
  4142. func NewEmptyCreate_table_stmtContext() *Create_table_stmtContext {
  4143. var p = new(Create_table_stmtContext)
  4144. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  4145. p.RuleIndex = SQLiteParserRULE_create_table_stmt
  4146. return p
  4147. }
  4148. func (*Create_table_stmtContext) IsCreate_table_stmtContext() {}
  4149. func NewCreate_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_table_stmtContext {
  4150. var p = new(Create_table_stmtContext)
  4151. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  4152. p.parser = parser
  4153. p.RuleIndex = SQLiteParserRULE_create_table_stmt
  4154. return p
  4155. }
  4156. func (s *Create_table_stmtContext) GetParser() antlr.Parser { return s.parser }
  4157. func (s *Create_table_stmtContext) CREATE_() antlr.TerminalNode {
  4158. return s.GetToken(SQLiteParserCREATE_, 0)
  4159. }
  4160. func (s *Create_table_stmtContext) TABLE_() antlr.TerminalNode {
  4161. return s.GetToken(SQLiteParserTABLE_, 0)
  4162. }
  4163. func (s *Create_table_stmtContext) Table_name() ITable_nameContext {
  4164. var t antlr.RuleContext
  4165. for _, ctx := range s.GetChildren() {
  4166. if _, ok := ctx.(ITable_nameContext); ok {
  4167. t = ctx.(antlr.RuleContext)
  4168. break
  4169. }
  4170. }
  4171. if t == nil {
  4172. return nil
  4173. }
  4174. return t.(ITable_nameContext)
  4175. }
  4176. func (s *Create_table_stmtContext) OPEN_PAR() antlr.TerminalNode {
  4177. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  4178. }
  4179. func (s *Create_table_stmtContext) AllColumn_def() []IColumn_defContext {
  4180. children := s.GetChildren()
  4181. len := 0
  4182. for _, ctx := range children {
  4183. if _, ok := ctx.(IColumn_defContext); ok {
  4184. len++
  4185. }
  4186. }
  4187. tst := make([]IColumn_defContext, len)
  4188. i := 0
  4189. for _, ctx := range children {
  4190. if t, ok := ctx.(IColumn_defContext); ok {
  4191. tst[i] = t.(IColumn_defContext)
  4192. i++
  4193. }
  4194. }
  4195. return tst
  4196. }
  4197. func (s *Create_table_stmtContext) Column_def(i int) IColumn_defContext {
  4198. var t antlr.RuleContext
  4199. j := 0
  4200. for _, ctx := range s.GetChildren() {
  4201. if _, ok := ctx.(IColumn_defContext); ok {
  4202. if j == i {
  4203. t = ctx.(antlr.RuleContext)
  4204. break
  4205. }
  4206. j++
  4207. }
  4208. }
  4209. if t == nil {
  4210. return nil
  4211. }
  4212. return t.(IColumn_defContext)
  4213. }
  4214. func (s *Create_table_stmtContext) CLOSE_PAR() antlr.TerminalNode {
  4215. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  4216. }
  4217. func (s *Create_table_stmtContext) AS_() antlr.TerminalNode {
  4218. return s.GetToken(SQLiteParserAS_, 0)
  4219. }
  4220. func (s *Create_table_stmtContext) Select_stmt() ISelect_stmtContext {
  4221. var t antlr.RuleContext
  4222. for _, ctx := range s.GetChildren() {
  4223. if _, ok := ctx.(ISelect_stmtContext); ok {
  4224. t = ctx.(antlr.RuleContext)
  4225. break
  4226. }
  4227. }
  4228. if t == nil {
  4229. return nil
  4230. }
  4231. return t.(ISelect_stmtContext)
  4232. }
  4233. func (s *Create_table_stmtContext) IF_() antlr.TerminalNode {
  4234. return s.GetToken(SQLiteParserIF_, 0)
  4235. }
  4236. func (s *Create_table_stmtContext) NOT_() antlr.TerminalNode {
  4237. return s.GetToken(SQLiteParserNOT_, 0)
  4238. }
  4239. func (s *Create_table_stmtContext) EXISTS_() antlr.TerminalNode {
  4240. return s.GetToken(SQLiteParserEXISTS_, 0)
  4241. }
  4242. func (s *Create_table_stmtContext) Schema_name() ISchema_nameContext {
  4243. var t antlr.RuleContext
  4244. for _, ctx := range s.GetChildren() {
  4245. if _, ok := ctx.(ISchema_nameContext); ok {
  4246. t = ctx.(antlr.RuleContext)
  4247. break
  4248. }
  4249. }
  4250. if t == nil {
  4251. return nil
  4252. }
  4253. return t.(ISchema_nameContext)
  4254. }
  4255. func (s *Create_table_stmtContext) DOT() antlr.TerminalNode {
  4256. return s.GetToken(SQLiteParserDOT, 0)
  4257. }
  4258. func (s *Create_table_stmtContext) TEMP_() antlr.TerminalNode {
  4259. return s.GetToken(SQLiteParserTEMP_, 0)
  4260. }
  4261. func (s *Create_table_stmtContext) TEMPORARY_() antlr.TerminalNode {
  4262. return s.GetToken(SQLiteParserTEMPORARY_, 0)
  4263. }
  4264. func (s *Create_table_stmtContext) AllCOMMA() []antlr.TerminalNode {
  4265. return s.GetTokens(SQLiteParserCOMMA)
  4266. }
  4267. func (s *Create_table_stmtContext) COMMA(i int) antlr.TerminalNode {
  4268. return s.GetToken(SQLiteParserCOMMA, i)
  4269. }
  4270. func (s *Create_table_stmtContext) AllTable_constraint() []ITable_constraintContext {
  4271. children := s.GetChildren()
  4272. len := 0
  4273. for _, ctx := range children {
  4274. if _, ok := ctx.(ITable_constraintContext); ok {
  4275. len++
  4276. }
  4277. }
  4278. tst := make([]ITable_constraintContext, len)
  4279. i := 0
  4280. for _, ctx := range children {
  4281. if t, ok := ctx.(ITable_constraintContext); ok {
  4282. tst[i] = t.(ITable_constraintContext)
  4283. i++
  4284. }
  4285. }
  4286. return tst
  4287. }
  4288. func (s *Create_table_stmtContext) Table_constraint(i int) ITable_constraintContext {
  4289. var t antlr.RuleContext
  4290. j := 0
  4291. for _, ctx := range s.GetChildren() {
  4292. if _, ok := ctx.(ITable_constraintContext); ok {
  4293. if j == i {
  4294. t = ctx.(antlr.RuleContext)
  4295. break
  4296. }
  4297. j++
  4298. }
  4299. }
  4300. if t == nil {
  4301. return nil
  4302. }
  4303. return t.(ITable_constraintContext)
  4304. }
  4305. func (s *Create_table_stmtContext) AllTable_option() []ITable_optionContext {
  4306. children := s.GetChildren()
  4307. len := 0
  4308. for _, ctx := range children {
  4309. if _, ok := ctx.(ITable_optionContext); ok {
  4310. len++
  4311. }
  4312. }
  4313. tst := make([]ITable_optionContext, len)
  4314. i := 0
  4315. for _, ctx := range children {
  4316. if t, ok := ctx.(ITable_optionContext); ok {
  4317. tst[i] = t.(ITable_optionContext)
  4318. i++
  4319. }
  4320. }
  4321. return tst
  4322. }
  4323. func (s *Create_table_stmtContext) Table_option(i int) ITable_optionContext {
  4324. var t antlr.RuleContext
  4325. j := 0
  4326. for _, ctx := range s.GetChildren() {
  4327. if _, ok := ctx.(ITable_optionContext); ok {
  4328. if j == i {
  4329. t = ctx.(antlr.RuleContext)
  4330. break
  4331. }
  4332. j++
  4333. }
  4334. }
  4335. if t == nil {
  4336. return nil
  4337. }
  4338. return t.(ITable_optionContext)
  4339. }
  4340. func (s *Create_table_stmtContext) GetRuleContext() antlr.RuleContext {
  4341. return s
  4342. }
  4343. func (s *Create_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  4344. return antlr.TreesStringTree(s, ruleNames, recog)
  4345. }
  4346. func (s *Create_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  4347. if listenerT, ok := listener.(SQLiteParserListener); ok {
  4348. listenerT.EnterCreate_table_stmt(s)
  4349. }
  4350. }
  4351. func (s *Create_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  4352. if listenerT, ok := listener.(SQLiteParserListener); ok {
  4353. listenerT.ExitCreate_table_stmt(s)
  4354. }
  4355. }
  4356. func (p *SQLiteParser) Create_table_stmt() (localctx ICreate_table_stmtContext) {
  4357. this := p
  4358. _ = this
  4359. localctx = NewCreate_table_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  4360. p.EnterRule(localctx, 28, SQLiteParserRULE_create_table_stmt)
  4361. var _la int
  4362. defer func() {
  4363. p.ExitRule()
  4364. }()
  4365. defer func() {
  4366. if err := recover(); err != nil {
  4367. if v, ok := err.(antlr.RecognitionException); ok {
  4368. localctx.SetException(v)
  4369. p.GetErrorHandler().ReportError(p, v)
  4370. p.GetErrorHandler().Recover(p, v)
  4371. } else {
  4372. panic(err)
  4373. }
  4374. }
  4375. }()
  4376. var _alt int
  4377. p.EnterOuterAlt(localctx, 1)
  4378. {
  4379. p.SetState(427)
  4380. p.Match(SQLiteParserCREATE_)
  4381. }
  4382. p.SetState(429)
  4383. p.GetErrorHandler().Sync(p)
  4384. _la = p.GetTokenStream().LA(1)
  4385. if _la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_ {
  4386. {
  4387. p.SetState(428)
  4388. _la = p.GetTokenStream().LA(1)
  4389. if !(_la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_) {
  4390. p.GetErrorHandler().RecoverInline(p)
  4391. } else {
  4392. p.GetErrorHandler().ReportMatch(p)
  4393. p.Consume()
  4394. }
  4395. }
  4396. }
  4397. {
  4398. p.SetState(431)
  4399. p.Match(SQLiteParserTABLE_)
  4400. }
  4401. p.SetState(435)
  4402. p.GetErrorHandler().Sync(p)
  4403. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 35, p.GetParserRuleContext()) == 1 {
  4404. {
  4405. p.SetState(432)
  4406. p.Match(SQLiteParserIF_)
  4407. }
  4408. {
  4409. p.SetState(433)
  4410. p.Match(SQLiteParserNOT_)
  4411. }
  4412. {
  4413. p.SetState(434)
  4414. p.Match(SQLiteParserEXISTS_)
  4415. }
  4416. }
  4417. p.SetState(440)
  4418. p.GetErrorHandler().Sync(p)
  4419. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 36, p.GetParserRuleContext()) == 1 {
  4420. {
  4421. p.SetState(437)
  4422. p.Schema_name()
  4423. }
  4424. {
  4425. p.SetState(438)
  4426. p.Match(SQLiteParserDOT)
  4427. }
  4428. }
  4429. {
  4430. p.SetState(442)
  4431. p.Table_name()
  4432. }
  4433. p.SetState(472)
  4434. p.GetErrorHandler().Sync(p)
  4435. switch p.GetTokenStream().LA(1) {
  4436. case SQLiteParserOPEN_PAR:
  4437. {
  4438. p.SetState(443)
  4439. p.Match(SQLiteParserOPEN_PAR)
  4440. }
  4441. {
  4442. p.SetState(444)
  4443. p.Column_def()
  4444. }
  4445. p.SetState(449)
  4446. p.GetErrorHandler().Sync(p)
  4447. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 37, p.GetParserRuleContext())
  4448. for _alt != 1 && _alt != antlr.ATNInvalidAltNumber {
  4449. if _alt == 1+1 {
  4450. {
  4451. p.SetState(445)
  4452. p.Match(SQLiteParserCOMMA)
  4453. }
  4454. {
  4455. p.SetState(446)
  4456. p.Column_def()
  4457. }
  4458. }
  4459. p.SetState(451)
  4460. p.GetErrorHandler().Sync(p)
  4461. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 37, p.GetParserRuleContext())
  4462. }
  4463. p.SetState(456)
  4464. p.GetErrorHandler().Sync(p)
  4465. _la = p.GetTokenStream().LA(1)
  4466. for _la == SQLiteParserCOMMA {
  4467. {
  4468. p.SetState(452)
  4469. p.Match(SQLiteParserCOMMA)
  4470. }
  4471. {
  4472. p.SetState(453)
  4473. p.Table_constraint()
  4474. }
  4475. p.SetState(458)
  4476. p.GetErrorHandler().Sync(p)
  4477. _la = p.GetTokenStream().LA(1)
  4478. }
  4479. {
  4480. p.SetState(459)
  4481. p.Match(SQLiteParserCLOSE_PAR)
  4482. }
  4483. p.SetState(468)
  4484. p.GetErrorHandler().Sync(p)
  4485. _la = p.GetTokenStream().LA(1)
  4486. if _la == SQLiteParserSTRICT_ || _la == SQLiteParserWITHOUT_ {
  4487. {
  4488. p.SetState(460)
  4489. p.Table_option()
  4490. }
  4491. p.SetState(465)
  4492. p.GetErrorHandler().Sync(p)
  4493. _la = p.GetTokenStream().LA(1)
  4494. for _la == SQLiteParserCOMMA {
  4495. {
  4496. p.SetState(461)
  4497. p.Match(SQLiteParserCOMMA)
  4498. }
  4499. {
  4500. p.SetState(462)
  4501. p.Table_option()
  4502. }
  4503. p.SetState(467)
  4504. p.GetErrorHandler().Sync(p)
  4505. _la = p.GetTokenStream().LA(1)
  4506. }
  4507. }
  4508. case SQLiteParserAS_:
  4509. {
  4510. p.SetState(470)
  4511. p.Match(SQLiteParserAS_)
  4512. }
  4513. {
  4514. p.SetState(471)
  4515. p.Select_stmt()
  4516. }
  4517. default:
  4518. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  4519. }
  4520. return localctx
  4521. }
  4522. // IColumn_defContext is an interface to support dynamic dispatch.
  4523. type IColumn_defContext interface {
  4524. antlr.ParserRuleContext
  4525. // GetParser returns the parser.
  4526. GetParser() antlr.Parser
  4527. // Getter signatures
  4528. Column_name() IColumn_nameContext
  4529. Type_name() IType_nameContext
  4530. AllColumn_constraint() []IColumn_constraintContext
  4531. Column_constraint(i int) IColumn_constraintContext
  4532. // IsColumn_defContext differentiates from other interfaces.
  4533. IsColumn_defContext()
  4534. }
  4535. type Column_defContext struct {
  4536. *antlr.BaseParserRuleContext
  4537. parser antlr.Parser
  4538. }
  4539. func NewEmptyColumn_defContext() *Column_defContext {
  4540. var p = new(Column_defContext)
  4541. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  4542. p.RuleIndex = SQLiteParserRULE_column_def
  4543. return p
  4544. }
  4545. func (*Column_defContext) IsColumn_defContext() {}
  4546. func NewColumn_defContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_defContext {
  4547. var p = new(Column_defContext)
  4548. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  4549. p.parser = parser
  4550. p.RuleIndex = SQLiteParserRULE_column_def
  4551. return p
  4552. }
  4553. func (s *Column_defContext) GetParser() antlr.Parser { return s.parser }
  4554. func (s *Column_defContext) Column_name() IColumn_nameContext {
  4555. var t antlr.RuleContext
  4556. for _, ctx := range s.GetChildren() {
  4557. if _, ok := ctx.(IColumn_nameContext); ok {
  4558. t = ctx.(antlr.RuleContext)
  4559. break
  4560. }
  4561. }
  4562. if t == nil {
  4563. return nil
  4564. }
  4565. return t.(IColumn_nameContext)
  4566. }
  4567. func (s *Column_defContext) Type_name() IType_nameContext {
  4568. var t antlr.RuleContext
  4569. for _, ctx := range s.GetChildren() {
  4570. if _, ok := ctx.(IType_nameContext); ok {
  4571. t = ctx.(antlr.RuleContext)
  4572. break
  4573. }
  4574. }
  4575. if t == nil {
  4576. return nil
  4577. }
  4578. return t.(IType_nameContext)
  4579. }
  4580. func (s *Column_defContext) AllColumn_constraint() []IColumn_constraintContext {
  4581. children := s.GetChildren()
  4582. len := 0
  4583. for _, ctx := range children {
  4584. if _, ok := ctx.(IColumn_constraintContext); ok {
  4585. len++
  4586. }
  4587. }
  4588. tst := make([]IColumn_constraintContext, len)
  4589. i := 0
  4590. for _, ctx := range children {
  4591. if t, ok := ctx.(IColumn_constraintContext); ok {
  4592. tst[i] = t.(IColumn_constraintContext)
  4593. i++
  4594. }
  4595. }
  4596. return tst
  4597. }
  4598. func (s *Column_defContext) Column_constraint(i int) IColumn_constraintContext {
  4599. var t antlr.RuleContext
  4600. j := 0
  4601. for _, ctx := range s.GetChildren() {
  4602. if _, ok := ctx.(IColumn_constraintContext); ok {
  4603. if j == i {
  4604. t = ctx.(antlr.RuleContext)
  4605. break
  4606. }
  4607. j++
  4608. }
  4609. }
  4610. if t == nil {
  4611. return nil
  4612. }
  4613. return t.(IColumn_constraintContext)
  4614. }
  4615. func (s *Column_defContext) GetRuleContext() antlr.RuleContext {
  4616. return s
  4617. }
  4618. func (s *Column_defContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  4619. return antlr.TreesStringTree(s, ruleNames, recog)
  4620. }
  4621. func (s *Column_defContext) EnterRule(listener antlr.ParseTreeListener) {
  4622. if listenerT, ok := listener.(SQLiteParserListener); ok {
  4623. listenerT.EnterColumn_def(s)
  4624. }
  4625. }
  4626. func (s *Column_defContext) ExitRule(listener antlr.ParseTreeListener) {
  4627. if listenerT, ok := listener.(SQLiteParserListener); ok {
  4628. listenerT.ExitColumn_def(s)
  4629. }
  4630. }
  4631. func (p *SQLiteParser) Column_def() (localctx IColumn_defContext) {
  4632. this := p
  4633. _ = this
  4634. localctx = NewColumn_defContext(p, p.GetParserRuleContext(), p.GetState())
  4635. p.EnterRule(localctx, 30, SQLiteParserRULE_column_def)
  4636. defer func() {
  4637. p.ExitRule()
  4638. }()
  4639. defer func() {
  4640. if err := recover(); err != nil {
  4641. if v, ok := err.(antlr.RecognitionException); ok {
  4642. localctx.SetException(v)
  4643. p.GetErrorHandler().ReportError(p, v)
  4644. p.GetErrorHandler().Recover(p, v)
  4645. } else {
  4646. panic(err)
  4647. }
  4648. }
  4649. }()
  4650. var _alt int
  4651. p.EnterOuterAlt(localctx, 1)
  4652. {
  4653. p.SetState(474)
  4654. p.Column_name()
  4655. }
  4656. p.SetState(476)
  4657. p.GetErrorHandler().Sync(p)
  4658. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 42, p.GetParserRuleContext()) == 1 {
  4659. {
  4660. p.SetState(475)
  4661. p.Type_name()
  4662. }
  4663. }
  4664. p.SetState(481)
  4665. p.GetErrorHandler().Sync(p)
  4666. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 43, p.GetParserRuleContext())
  4667. for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
  4668. if _alt == 1 {
  4669. {
  4670. p.SetState(478)
  4671. p.Column_constraint()
  4672. }
  4673. }
  4674. p.SetState(483)
  4675. p.GetErrorHandler().Sync(p)
  4676. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 43, p.GetParserRuleContext())
  4677. }
  4678. return localctx
  4679. }
  4680. // IType_nameContext is an interface to support dynamic dispatch.
  4681. type IType_nameContext interface {
  4682. antlr.ParserRuleContext
  4683. // GetParser returns the parser.
  4684. GetParser() antlr.Parser
  4685. // Getter signatures
  4686. AllName() []INameContext
  4687. Name(i int) INameContext
  4688. OPEN_PAR() antlr.TerminalNode
  4689. AllSigned_number() []ISigned_numberContext
  4690. Signed_number(i int) ISigned_numberContext
  4691. CLOSE_PAR() antlr.TerminalNode
  4692. COMMA() antlr.TerminalNode
  4693. // IsType_nameContext differentiates from other interfaces.
  4694. IsType_nameContext()
  4695. }
  4696. type Type_nameContext struct {
  4697. *antlr.BaseParserRuleContext
  4698. parser antlr.Parser
  4699. }
  4700. func NewEmptyType_nameContext() *Type_nameContext {
  4701. var p = new(Type_nameContext)
  4702. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  4703. p.RuleIndex = SQLiteParserRULE_type_name
  4704. return p
  4705. }
  4706. func (*Type_nameContext) IsType_nameContext() {}
  4707. func NewType_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Type_nameContext {
  4708. var p = new(Type_nameContext)
  4709. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  4710. p.parser = parser
  4711. p.RuleIndex = SQLiteParserRULE_type_name
  4712. return p
  4713. }
  4714. func (s *Type_nameContext) GetParser() antlr.Parser { return s.parser }
  4715. func (s *Type_nameContext) AllName() []INameContext {
  4716. children := s.GetChildren()
  4717. len := 0
  4718. for _, ctx := range children {
  4719. if _, ok := ctx.(INameContext); ok {
  4720. len++
  4721. }
  4722. }
  4723. tst := make([]INameContext, len)
  4724. i := 0
  4725. for _, ctx := range children {
  4726. if t, ok := ctx.(INameContext); ok {
  4727. tst[i] = t.(INameContext)
  4728. i++
  4729. }
  4730. }
  4731. return tst
  4732. }
  4733. func (s *Type_nameContext) Name(i int) INameContext {
  4734. var t antlr.RuleContext
  4735. j := 0
  4736. for _, ctx := range s.GetChildren() {
  4737. if _, ok := ctx.(INameContext); ok {
  4738. if j == i {
  4739. t = ctx.(antlr.RuleContext)
  4740. break
  4741. }
  4742. j++
  4743. }
  4744. }
  4745. if t == nil {
  4746. return nil
  4747. }
  4748. return t.(INameContext)
  4749. }
  4750. func (s *Type_nameContext) OPEN_PAR() antlr.TerminalNode {
  4751. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  4752. }
  4753. func (s *Type_nameContext) AllSigned_number() []ISigned_numberContext {
  4754. children := s.GetChildren()
  4755. len := 0
  4756. for _, ctx := range children {
  4757. if _, ok := ctx.(ISigned_numberContext); ok {
  4758. len++
  4759. }
  4760. }
  4761. tst := make([]ISigned_numberContext, len)
  4762. i := 0
  4763. for _, ctx := range children {
  4764. if t, ok := ctx.(ISigned_numberContext); ok {
  4765. tst[i] = t.(ISigned_numberContext)
  4766. i++
  4767. }
  4768. }
  4769. return tst
  4770. }
  4771. func (s *Type_nameContext) Signed_number(i int) ISigned_numberContext {
  4772. var t antlr.RuleContext
  4773. j := 0
  4774. for _, ctx := range s.GetChildren() {
  4775. if _, ok := ctx.(ISigned_numberContext); ok {
  4776. if j == i {
  4777. t = ctx.(antlr.RuleContext)
  4778. break
  4779. }
  4780. j++
  4781. }
  4782. }
  4783. if t == nil {
  4784. return nil
  4785. }
  4786. return t.(ISigned_numberContext)
  4787. }
  4788. func (s *Type_nameContext) CLOSE_PAR() antlr.TerminalNode {
  4789. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  4790. }
  4791. func (s *Type_nameContext) COMMA() antlr.TerminalNode {
  4792. return s.GetToken(SQLiteParserCOMMA, 0)
  4793. }
  4794. func (s *Type_nameContext) GetRuleContext() antlr.RuleContext {
  4795. return s
  4796. }
  4797. func (s *Type_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  4798. return antlr.TreesStringTree(s, ruleNames, recog)
  4799. }
  4800. func (s *Type_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  4801. if listenerT, ok := listener.(SQLiteParserListener); ok {
  4802. listenerT.EnterType_name(s)
  4803. }
  4804. }
  4805. func (s *Type_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  4806. if listenerT, ok := listener.(SQLiteParserListener); ok {
  4807. listenerT.ExitType_name(s)
  4808. }
  4809. }
  4810. func (p *SQLiteParser) Type_name() (localctx IType_nameContext) {
  4811. this := p
  4812. _ = this
  4813. localctx = NewType_nameContext(p, p.GetParserRuleContext(), p.GetState())
  4814. p.EnterRule(localctx, 32, SQLiteParserRULE_type_name)
  4815. defer func() {
  4816. p.ExitRule()
  4817. }()
  4818. defer func() {
  4819. if err := recover(); err != nil {
  4820. if v, ok := err.(antlr.RecognitionException); ok {
  4821. localctx.SetException(v)
  4822. p.GetErrorHandler().ReportError(p, v)
  4823. p.GetErrorHandler().Recover(p, v)
  4824. } else {
  4825. panic(err)
  4826. }
  4827. }
  4828. }()
  4829. var _alt int
  4830. p.EnterOuterAlt(localctx, 1)
  4831. p.SetState(485)
  4832. p.GetErrorHandler().Sync(p)
  4833. _alt = 1 + 1
  4834. for ok := true; ok; ok = _alt != 1 && _alt != antlr.ATNInvalidAltNumber {
  4835. switch _alt {
  4836. case 1 + 1:
  4837. {
  4838. p.SetState(484)
  4839. p.Name()
  4840. }
  4841. default:
  4842. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  4843. }
  4844. p.SetState(487)
  4845. p.GetErrorHandler().Sync(p)
  4846. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 44, p.GetParserRuleContext())
  4847. }
  4848. p.SetState(499)
  4849. p.GetErrorHandler().Sync(p)
  4850. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 45, p.GetParserRuleContext()) == 1 {
  4851. {
  4852. p.SetState(489)
  4853. p.Match(SQLiteParserOPEN_PAR)
  4854. }
  4855. {
  4856. p.SetState(490)
  4857. p.Signed_number()
  4858. }
  4859. {
  4860. p.SetState(491)
  4861. p.Match(SQLiteParserCLOSE_PAR)
  4862. }
  4863. } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 45, p.GetParserRuleContext()) == 2 {
  4864. {
  4865. p.SetState(493)
  4866. p.Match(SQLiteParserOPEN_PAR)
  4867. }
  4868. {
  4869. p.SetState(494)
  4870. p.Signed_number()
  4871. }
  4872. {
  4873. p.SetState(495)
  4874. p.Match(SQLiteParserCOMMA)
  4875. }
  4876. {
  4877. p.SetState(496)
  4878. p.Signed_number()
  4879. }
  4880. {
  4881. p.SetState(497)
  4882. p.Match(SQLiteParserCLOSE_PAR)
  4883. }
  4884. }
  4885. return localctx
  4886. }
  4887. // IColumn_constraintContext is an interface to support dynamic dispatch.
  4888. type IColumn_constraintContext interface {
  4889. antlr.ParserRuleContext
  4890. // GetParser returns the parser.
  4891. GetParser() antlr.Parser
  4892. // Getter signatures
  4893. CHECK_() antlr.TerminalNode
  4894. OPEN_PAR() antlr.TerminalNode
  4895. Expr() IExprContext
  4896. CLOSE_PAR() antlr.TerminalNode
  4897. DEFAULT_() antlr.TerminalNode
  4898. COLLATE_() antlr.TerminalNode
  4899. Collation_name() ICollation_nameContext
  4900. Foreign_key_clause() IForeign_key_clauseContext
  4901. AS_() antlr.TerminalNode
  4902. CONSTRAINT_() antlr.TerminalNode
  4903. Name() INameContext
  4904. PRIMARY_() antlr.TerminalNode
  4905. KEY_() antlr.TerminalNode
  4906. NOT_() antlr.TerminalNode
  4907. NULL_() antlr.TerminalNode
  4908. UNIQUE_() antlr.TerminalNode
  4909. Signed_number() ISigned_numberContext
  4910. Literal_value() ILiteral_valueContext
  4911. Conflict_clause() IConflict_clauseContext
  4912. GENERATED_() antlr.TerminalNode
  4913. ALWAYS_() antlr.TerminalNode
  4914. STORED_() antlr.TerminalNode
  4915. VIRTUAL_() antlr.TerminalNode
  4916. Asc_desc() IAsc_descContext
  4917. AUTOINCREMENT_() antlr.TerminalNode
  4918. // IsColumn_constraintContext differentiates from other interfaces.
  4919. IsColumn_constraintContext()
  4920. }
  4921. type Column_constraintContext struct {
  4922. *antlr.BaseParserRuleContext
  4923. parser antlr.Parser
  4924. }
  4925. func NewEmptyColumn_constraintContext() *Column_constraintContext {
  4926. var p = new(Column_constraintContext)
  4927. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  4928. p.RuleIndex = SQLiteParserRULE_column_constraint
  4929. return p
  4930. }
  4931. func (*Column_constraintContext) IsColumn_constraintContext() {}
  4932. func NewColumn_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_constraintContext {
  4933. var p = new(Column_constraintContext)
  4934. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  4935. p.parser = parser
  4936. p.RuleIndex = SQLiteParserRULE_column_constraint
  4937. return p
  4938. }
  4939. func (s *Column_constraintContext) GetParser() antlr.Parser { return s.parser }
  4940. func (s *Column_constraintContext) CHECK_() antlr.TerminalNode {
  4941. return s.GetToken(SQLiteParserCHECK_, 0)
  4942. }
  4943. func (s *Column_constraintContext) OPEN_PAR() antlr.TerminalNode {
  4944. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  4945. }
  4946. func (s *Column_constraintContext) Expr() IExprContext {
  4947. var t antlr.RuleContext
  4948. for _, ctx := range s.GetChildren() {
  4949. if _, ok := ctx.(IExprContext); ok {
  4950. t = ctx.(antlr.RuleContext)
  4951. break
  4952. }
  4953. }
  4954. if t == nil {
  4955. return nil
  4956. }
  4957. return t.(IExprContext)
  4958. }
  4959. func (s *Column_constraintContext) CLOSE_PAR() antlr.TerminalNode {
  4960. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  4961. }
  4962. func (s *Column_constraintContext) DEFAULT_() antlr.TerminalNode {
  4963. return s.GetToken(SQLiteParserDEFAULT_, 0)
  4964. }
  4965. func (s *Column_constraintContext) COLLATE_() antlr.TerminalNode {
  4966. return s.GetToken(SQLiteParserCOLLATE_, 0)
  4967. }
  4968. func (s *Column_constraintContext) Collation_name() ICollation_nameContext {
  4969. var t antlr.RuleContext
  4970. for _, ctx := range s.GetChildren() {
  4971. if _, ok := ctx.(ICollation_nameContext); ok {
  4972. t = ctx.(antlr.RuleContext)
  4973. break
  4974. }
  4975. }
  4976. if t == nil {
  4977. return nil
  4978. }
  4979. return t.(ICollation_nameContext)
  4980. }
  4981. func (s *Column_constraintContext) Foreign_key_clause() IForeign_key_clauseContext {
  4982. var t antlr.RuleContext
  4983. for _, ctx := range s.GetChildren() {
  4984. if _, ok := ctx.(IForeign_key_clauseContext); ok {
  4985. t = ctx.(antlr.RuleContext)
  4986. break
  4987. }
  4988. }
  4989. if t == nil {
  4990. return nil
  4991. }
  4992. return t.(IForeign_key_clauseContext)
  4993. }
  4994. func (s *Column_constraintContext) AS_() antlr.TerminalNode {
  4995. return s.GetToken(SQLiteParserAS_, 0)
  4996. }
  4997. func (s *Column_constraintContext) CONSTRAINT_() antlr.TerminalNode {
  4998. return s.GetToken(SQLiteParserCONSTRAINT_, 0)
  4999. }
  5000. func (s *Column_constraintContext) Name() INameContext {
  5001. var t antlr.RuleContext
  5002. for _, ctx := range s.GetChildren() {
  5003. if _, ok := ctx.(INameContext); ok {
  5004. t = ctx.(antlr.RuleContext)
  5005. break
  5006. }
  5007. }
  5008. if t == nil {
  5009. return nil
  5010. }
  5011. return t.(INameContext)
  5012. }
  5013. func (s *Column_constraintContext) PRIMARY_() antlr.TerminalNode {
  5014. return s.GetToken(SQLiteParserPRIMARY_, 0)
  5015. }
  5016. func (s *Column_constraintContext) KEY_() antlr.TerminalNode {
  5017. return s.GetToken(SQLiteParserKEY_, 0)
  5018. }
  5019. func (s *Column_constraintContext) NOT_() antlr.TerminalNode {
  5020. return s.GetToken(SQLiteParserNOT_, 0)
  5021. }
  5022. func (s *Column_constraintContext) NULL_() antlr.TerminalNode {
  5023. return s.GetToken(SQLiteParserNULL_, 0)
  5024. }
  5025. func (s *Column_constraintContext) UNIQUE_() antlr.TerminalNode {
  5026. return s.GetToken(SQLiteParserUNIQUE_, 0)
  5027. }
  5028. func (s *Column_constraintContext) Signed_number() ISigned_numberContext {
  5029. var t antlr.RuleContext
  5030. for _, ctx := range s.GetChildren() {
  5031. if _, ok := ctx.(ISigned_numberContext); ok {
  5032. t = ctx.(antlr.RuleContext)
  5033. break
  5034. }
  5035. }
  5036. if t == nil {
  5037. return nil
  5038. }
  5039. return t.(ISigned_numberContext)
  5040. }
  5041. func (s *Column_constraintContext) Literal_value() ILiteral_valueContext {
  5042. var t antlr.RuleContext
  5043. for _, ctx := range s.GetChildren() {
  5044. if _, ok := ctx.(ILiteral_valueContext); ok {
  5045. t = ctx.(antlr.RuleContext)
  5046. break
  5047. }
  5048. }
  5049. if t == nil {
  5050. return nil
  5051. }
  5052. return t.(ILiteral_valueContext)
  5053. }
  5054. func (s *Column_constraintContext) Conflict_clause() IConflict_clauseContext {
  5055. var t antlr.RuleContext
  5056. for _, ctx := range s.GetChildren() {
  5057. if _, ok := ctx.(IConflict_clauseContext); ok {
  5058. t = ctx.(antlr.RuleContext)
  5059. break
  5060. }
  5061. }
  5062. if t == nil {
  5063. return nil
  5064. }
  5065. return t.(IConflict_clauseContext)
  5066. }
  5067. func (s *Column_constraintContext) GENERATED_() antlr.TerminalNode {
  5068. return s.GetToken(SQLiteParserGENERATED_, 0)
  5069. }
  5070. func (s *Column_constraintContext) ALWAYS_() antlr.TerminalNode {
  5071. return s.GetToken(SQLiteParserALWAYS_, 0)
  5072. }
  5073. func (s *Column_constraintContext) STORED_() antlr.TerminalNode {
  5074. return s.GetToken(SQLiteParserSTORED_, 0)
  5075. }
  5076. func (s *Column_constraintContext) VIRTUAL_() antlr.TerminalNode {
  5077. return s.GetToken(SQLiteParserVIRTUAL_, 0)
  5078. }
  5079. func (s *Column_constraintContext) Asc_desc() IAsc_descContext {
  5080. var t antlr.RuleContext
  5081. for _, ctx := range s.GetChildren() {
  5082. if _, ok := ctx.(IAsc_descContext); ok {
  5083. t = ctx.(antlr.RuleContext)
  5084. break
  5085. }
  5086. }
  5087. if t == nil {
  5088. return nil
  5089. }
  5090. return t.(IAsc_descContext)
  5091. }
  5092. func (s *Column_constraintContext) AUTOINCREMENT_() antlr.TerminalNode {
  5093. return s.GetToken(SQLiteParserAUTOINCREMENT_, 0)
  5094. }
  5095. func (s *Column_constraintContext) GetRuleContext() antlr.RuleContext {
  5096. return s
  5097. }
  5098. func (s *Column_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  5099. return antlr.TreesStringTree(s, ruleNames, recog)
  5100. }
  5101. func (s *Column_constraintContext) EnterRule(listener antlr.ParseTreeListener) {
  5102. if listenerT, ok := listener.(SQLiteParserListener); ok {
  5103. listenerT.EnterColumn_constraint(s)
  5104. }
  5105. }
  5106. func (s *Column_constraintContext) ExitRule(listener antlr.ParseTreeListener) {
  5107. if listenerT, ok := listener.(SQLiteParserListener); ok {
  5108. listenerT.ExitColumn_constraint(s)
  5109. }
  5110. }
  5111. func (p *SQLiteParser) Column_constraint() (localctx IColumn_constraintContext) {
  5112. this := p
  5113. _ = this
  5114. localctx = NewColumn_constraintContext(p, p.GetParserRuleContext(), p.GetState())
  5115. p.EnterRule(localctx, 34, SQLiteParserRULE_column_constraint)
  5116. var _la int
  5117. defer func() {
  5118. p.ExitRule()
  5119. }()
  5120. defer func() {
  5121. if err := recover(); err != nil {
  5122. if v, ok := err.(antlr.RecognitionException); ok {
  5123. localctx.SetException(v)
  5124. p.GetErrorHandler().ReportError(p, v)
  5125. p.GetErrorHandler().Recover(p, v)
  5126. } else {
  5127. panic(err)
  5128. }
  5129. }
  5130. }()
  5131. p.EnterOuterAlt(localctx, 1)
  5132. p.SetState(503)
  5133. p.GetErrorHandler().Sync(p)
  5134. _la = p.GetTokenStream().LA(1)
  5135. if _la == SQLiteParserCONSTRAINT_ {
  5136. {
  5137. p.SetState(501)
  5138. p.Match(SQLiteParserCONSTRAINT_)
  5139. }
  5140. {
  5141. p.SetState(502)
  5142. p.Name()
  5143. }
  5144. }
  5145. p.SetState(552)
  5146. p.GetErrorHandler().Sync(p)
  5147. switch p.GetTokenStream().LA(1) {
  5148. case SQLiteParserPRIMARY_:
  5149. {
  5150. p.SetState(505)
  5151. p.Match(SQLiteParserPRIMARY_)
  5152. }
  5153. {
  5154. p.SetState(506)
  5155. p.Match(SQLiteParserKEY_)
  5156. }
  5157. p.SetState(508)
  5158. p.GetErrorHandler().Sync(p)
  5159. _la = p.GetTokenStream().LA(1)
  5160. if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ {
  5161. {
  5162. p.SetState(507)
  5163. p.Asc_desc()
  5164. }
  5165. }
  5166. p.SetState(511)
  5167. p.GetErrorHandler().Sync(p)
  5168. _la = p.GetTokenStream().LA(1)
  5169. if _la == SQLiteParserON_ {
  5170. {
  5171. p.SetState(510)
  5172. p.Conflict_clause()
  5173. }
  5174. }
  5175. p.SetState(514)
  5176. p.GetErrorHandler().Sync(p)
  5177. _la = p.GetTokenStream().LA(1)
  5178. if _la == SQLiteParserAUTOINCREMENT_ {
  5179. {
  5180. p.SetState(513)
  5181. p.Match(SQLiteParserAUTOINCREMENT_)
  5182. }
  5183. }
  5184. case SQLiteParserNOT_, SQLiteParserUNIQUE_:
  5185. p.SetState(519)
  5186. p.GetErrorHandler().Sync(p)
  5187. switch p.GetTokenStream().LA(1) {
  5188. case SQLiteParserNOT_:
  5189. {
  5190. p.SetState(516)
  5191. p.Match(SQLiteParserNOT_)
  5192. }
  5193. {
  5194. p.SetState(517)
  5195. p.Match(SQLiteParserNULL_)
  5196. }
  5197. case SQLiteParserUNIQUE_:
  5198. {
  5199. p.SetState(518)
  5200. p.Match(SQLiteParserUNIQUE_)
  5201. }
  5202. default:
  5203. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  5204. }
  5205. p.SetState(522)
  5206. p.GetErrorHandler().Sync(p)
  5207. _la = p.GetTokenStream().LA(1)
  5208. if _la == SQLiteParserON_ {
  5209. {
  5210. p.SetState(521)
  5211. p.Conflict_clause()
  5212. }
  5213. }
  5214. case SQLiteParserCHECK_:
  5215. {
  5216. p.SetState(524)
  5217. p.Match(SQLiteParserCHECK_)
  5218. }
  5219. {
  5220. p.SetState(525)
  5221. p.Match(SQLiteParserOPEN_PAR)
  5222. }
  5223. {
  5224. p.SetState(526)
  5225. p.expr(0)
  5226. }
  5227. {
  5228. p.SetState(527)
  5229. p.Match(SQLiteParserCLOSE_PAR)
  5230. }
  5231. case SQLiteParserDEFAULT_:
  5232. {
  5233. p.SetState(529)
  5234. p.Match(SQLiteParserDEFAULT_)
  5235. }
  5236. p.SetState(536)
  5237. p.GetErrorHandler().Sync(p)
  5238. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 52, p.GetParserRuleContext()) {
  5239. case 1:
  5240. {
  5241. p.SetState(530)
  5242. p.Signed_number()
  5243. }
  5244. case 2:
  5245. {
  5246. p.SetState(531)
  5247. p.Literal_value()
  5248. }
  5249. case 3:
  5250. {
  5251. p.SetState(532)
  5252. p.Match(SQLiteParserOPEN_PAR)
  5253. }
  5254. {
  5255. p.SetState(533)
  5256. p.expr(0)
  5257. }
  5258. {
  5259. p.SetState(534)
  5260. p.Match(SQLiteParserCLOSE_PAR)
  5261. }
  5262. }
  5263. case SQLiteParserCOLLATE_:
  5264. {
  5265. p.SetState(538)
  5266. p.Match(SQLiteParserCOLLATE_)
  5267. }
  5268. {
  5269. p.SetState(539)
  5270. p.Collation_name()
  5271. }
  5272. case SQLiteParserREFERENCES_:
  5273. {
  5274. p.SetState(540)
  5275. p.Foreign_key_clause()
  5276. }
  5277. case SQLiteParserAS_, SQLiteParserGENERATED_:
  5278. p.SetState(543)
  5279. p.GetErrorHandler().Sync(p)
  5280. _la = p.GetTokenStream().LA(1)
  5281. if _la == SQLiteParserGENERATED_ {
  5282. {
  5283. p.SetState(541)
  5284. p.Match(SQLiteParserGENERATED_)
  5285. }
  5286. {
  5287. p.SetState(542)
  5288. p.Match(SQLiteParserALWAYS_)
  5289. }
  5290. }
  5291. {
  5292. p.SetState(545)
  5293. p.Match(SQLiteParserAS_)
  5294. }
  5295. {
  5296. p.SetState(546)
  5297. p.Match(SQLiteParserOPEN_PAR)
  5298. }
  5299. {
  5300. p.SetState(547)
  5301. p.expr(0)
  5302. }
  5303. {
  5304. p.SetState(548)
  5305. p.Match(SQLiteParserCLOSE_PAR)
  5306. }
  5307. p.SetState(550)
  5308. p.GetErrorHandler().Sync(p)
  5309. _la = p.GetTokenStream().LA(1)
  5310. if _la == SQLiteParserVIRTUAL_ || _la == SQLiteParserSTORED_ {
  5311. {
  5312. p.SetState(549)
  5313. _la = p.GetTokenStream().LA(1)
  5314. if !(_la == SQLiteParserVIRTUAL_ || _la == SQLiteParserSTORED_) {
  5315. p.GetErrorHandler().RecoverInline(p)
  5316. } else {
  5317. p.GetErrorHandler().ReportMatch(p)
  5318. p.Consume()
  5319. }
  5320. }
  5321. }
  5322. default:
  5323. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  5324. }
  5325. return localctx
  5326. }
  5327. // ISigned_numberContext is an interface to support dynamic dispatch.
  5328. type ISigned_numberContext interface {
  5329. antlr.ParserRuleContext
  5330. // GetParser returns the parser.
  5331. GetParser() antlr.Parser
  5332. // Getter signatures
  5333. NUMERIC_LITERAL() antlr.TerminalNode
  5334. PLUS() antlr.TerminalNode
  5335. MINUS() antlr.TerminalNode
  5336. // IsSigned_numberContext differentiates from other interfaces.
  5337. IsSigned_numberContext()
  5338. }
  5339. type Signed_numberContext struct {
  5340. *antlr.BaseParserRuleContext
  5341. parser antlr.Parser
  5342. }
  5343. func NewEmptySigned_numberContext() *Signed_numberContext {
  5344. var p = new(Signed_numberContext)
  5345. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  5346. p.RuleIndex = SQLiteParserRULE_signed_number
  5347. return p
  5348. }
  5349. func (*Signed_numberContext) IsSigned_numberContext() {}
  5350. func NewSigned_numberContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Signed_numberContext {
  5351. var p = new(Signed_numberContext)
  5352. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  5353. p.parser = parser
  5354. p.RuleIndex = SQLiteParserRULE_signed_number
  5355. return p
  5356. }
  5357. func (s *Signed_numberContext) GetParser() antlr.Parser { return s.parser }
  5358. func (s *Signed_numberContext) NUMERIC_LITERAL() antlr.TerminalNode {
  5359. return s.GetToken(SQLiteParserNUMERIC_LITERAL, 0)
  5360. }
  5361. func (s *Signed_numberContext) PLUS() antlr.TerminalNode {
  5362. return s.GetToken(SQLiteParserPLUS, 0)
  5363. }
  5364. func (s *Signed_numberContext) MINUS() antlr.TerminalNode {
  5365. return s.GetToken(SQLiteParserMINUS, 0)
  5366. }
  5367. func (s *Signed_numberContext) GetRuleContext() antlr.RuleContext {
  5368. return s
  5369. }
  5370. func (s *Signed_numberContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  5371. return antlr.TreesStringTree(s, ruleNames, recog)
  5372. }
  5373. func (s *Signed_numberContext) EnterRule(listener antlr.ParseTreeListener) {
  5374. if listenerT, ok := listener.(SQLiteParserListener); ok {
  5375. listenerT.EnterSigned_number(s)
  5376. }
  5377. }
  5378. func (s *Signed_numberContext) ExitRule(listener antlr.ParseTreeListener) {
  5379. if listenerT, ok := listener.(SQLiteParserListener); ok {
  5380. listenerT.ExitSigned_number(s)
  5381. }
  5382. }
  5383. func (p *SQLiteParser) Signed_number() (localctx ISigned_numberContext) {
  5384. this := p
  5385. _ = this
  5386. localctx = NewSigned_numberContext(p, p.GetParserRuleContext(), p.GetState())
  5387. p.EnterRule(localctx, 36, SQLiteParserRULE_signed_number)
  5388. var _la int
  5389. defer func() {
  5390. p.ExitRule()
  5391. }()
  5392. defer func() {
  5393. if err := recover(); err != nil {
  5394. if v, ok := err.(antlr.RecognitionException); ok {
  5395. localctx.SetException(v)
  5396. p.GetErrorHandler().ReportError(p, v)
  5397. p.GetErrorHandler().Recover(p, v)
  5398. } else {
  5399. panic(err)
  5400. }
  5401. }
  5402. }()
  5403. p.EnterOuterAlt(localctx, 1)
  5404. p.SetState(555)
  5405. p.GetErrorHandler().Sync(p)
  5406. _la = p.GetTokenStream().LA(1)
  5407. if _la == SQLiteParserPLUS || _la == SQLiteParserMINUS {
  5408. {
  5409. p.SetState(554)
  5410. _la = p.GetTokenStream().LA(1)
  5411. if !(_la == SQLiteParserPLUS || _la == SQLiteParserMINUS) {
  5412. p.GetErrorHandler().RecoverInline(p)
  5413. } else {
  5414. p.GetErrorHandler().ReportMatch(p)
  5415. p.Consume()
  5416. }
  5417. }
  5418. }
  5419. {
  5420. p.SetState(557)
  5421. p.Match(SQLiteParserNUMERIC_LITERAL)
  5422. }
  5423. return localctx
  5424. }
  5425. // ITable_constraintContext is an interface to support dynamic dispatch.
  5426. type ITable_constraintContext interface {
  5427. antlr.ParserRuleContext
  5428. // GetParser returns the parser.
  5429. GetParser() antlr.Parser
  5430. // Getter signatures
  5431. OPEN_PAR() antlr.TerminalNode
  5432. AllIndexed_column() []IIndexed_columnContext
  5433. Indexed_column(i int) IIndexed_columnContext
  5434. CLOSE_PAR() antlr.TerminalNode
  5435. CHECK_() antlr.TerminalNode
  5436. Expr() IExprContext
  5437. FOREIGN_() antlr.TerminalNode
  5438. KEY_() antlr.TerminalNode
  5439. AllColumn_name() []IColumn_nameContext
  5440. Column_name(i int) IColumn_nameContext
  5441. Foreign_key_clause() IForeign_key_clauseContext
  5442. CONSTRAINT_() antlr.TerminalNode
  5443. Name() INameContext
  5444. PRIMARY_() antlr.TerminalNode
  5445. UNIQUE_() antlr.TerminalNode
  5446. AllCOMMA() []antlr.TerminalNode
  5447. COMMA(i int) antlr.TerminalNode
  5448. Conflict_clause() IConflict_clauseContext
  5449. // IsTable_constraintContext differentiates from other interfaces.
  5450. IsTable_constraintContext()
  5451. }
  5452. type Table_constraintContext struct {
  5453. *antlr.BaseParserRuleContext
  5454. parser antlr.Parser
  5455. }
  5456. func NewEmptyTable_constraintContext() *Table_constraintContext {
  5457. var p = new(Table_constraintContext)
  5458. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  5459. p.RuleIndex = SQLiteParserRULE_table_constraint
  5460. return p
  5461. }
  5462. func (*Table_constraintContext) IsTable_constraintContext() {}
  5463. func NewTable_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_constraintContext {
  5464. var p = new(Table_constraintContext)
  5465. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  5466. p.parser = parser
  5467. p.RuleIndex = SQLiteParserRULE_table_constraint
  5468. return p
  5469. }
  5470. func (s *Table_constraintContext) GetParser() antlr.Parser { return s.parser }
  5471. func (s *Table_constraintContext) OPEN_PAR() antlr.TerminalNode {
  5472. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  5473. }
  5474. func (s *Table_constraintContext) AllIndexed_column() []IIndexed_columnContext {
  5475. children := s.GetChildren()
  5476. len := 0
  5477. for _, ctx := range children {
  5478. if _, ok := ctx.(IIndexed_columnContext); ok {
  5479. len++
  5480. }
  5481. }
  5482. tst := make([]IIndexed_columnContext, len)
  5483. i := 0
  5484. for _, ctx := range children {
  5485. if t, ok := ctx.(IIndexed_columnContext); ok {
  5486. tst[i] = t.(IIndexed_columnContext)
  5487. i++
  5488. }
  5489. }
  5490. return tst
  5491. }
  5492. func (s *Table_constraintContext) Indexed_column(i int) IIndexed_columnContext {
  5493. var t antlr.RuleContext
  5494. j := 0
  5495. for _, ctx := range s.GetChildren() {
  5496. if _, ok := ctx.(IIndexed_columnContext); ok {
  5497. if j == i {
  5498. t = ctx.(antlr.RuleContext)
  5499. break
  5500. }
  5501. j++
  5502. }
  5503. }
  5504. if t == nil {
  5505. return nil
  5506. }
  5507. return t.(IIndexed_columnContext)
  5508. }
  5509. func (s *Table_constraintContext) CLOSE_PAR() antlr.TerminalNode {
  5510. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  5511. }
  5512. func (s *Table_constraintContext) CHECK_() antlr.TerminalNode {
  5513. return s.GetToken(SQLiteParserCHECK_, 0)
  5514. }
  5515. func (s *Table_constraintContext) Expr() IExprContext {
  5516. var t antlr.RuleContext
  5517. for _, ctx := range s.GetChildren() {
  5518. if _, ok := ctx.(IExprContext); ok {
  5519. t = ctx.(antlr.RuleContext)
  5520. break
  5521. }
  5522. }
  5523. if t == nil {
  5524. return nil
  5525. }
  5526. return t.(IExprContext)
  5527. }
  5528. func (s *Table_constraintContext) FOREIGN_() antlr.TerminalNode {
  5529. return s.GetToken(SQLiteParserFOREIGN_, 0)
  5530. }
  5531. func (s *Table_constraintContext) KEY_() antlr.TerminalNode {
  5532. return s.GetToken(SQLiteParserKEY_, 0)
  5533. }
  5534. func (s *Table_constraintContext) AllColumn_name() []IColumn_nameContext {
  5535. children := s.GetChildren()
  5536. len := 0
  5537. for _, ctx := range children {
  5538. if _, ok := ctx.(IColumn_nameContext); ok {
  5539. len++
  5540. }
  5541. }
  5542. tst := make([]IColumn_nameContext, len)
  5543. i := 0
  5544. for _, ctx := range children {
  5545. if t, ok := ctx.(IColumn_nameContext); ok {
  5546. tst[i] = t.(IColumn_nameContext)
  5547. i++
  5548. }
  5549. }
  5550. return tst
  5551. }
  5552. func (s *Table_constraintContext) Column_name(i int) IColumn_nameContext {
  5553. var t antlr.RuleContext
  5554. j := 0
  5555. for _, ctx := range s.GetChildren() {
  5556. if _, ok := ctx.(IColumn_nameContext); ok {
  5557. if j == i {
  5558. t = ctx.(antlr.RuleContext)
  5559. break
  5560. }
  5561. j++
  5562. }
  5563. }
  5564. if t == nil {
  5565. return nil
  5566. }
  5567. return t.(IColumn_nameContext)
  5568. }
  5569. func (s *Table_constraintContext) Foreign_key_clause() IForeign_key_clauseContext {
  5570. var t antlr.RuleContext
  5571. for _, ctx := range s.GetChildren() {
  5572. if _, ok := ctx.(IForeign_key_clauseContext); ok {
  5573. t = ctx.(antlr.RuleContext)
  5574. break
  5575. }
  5576. }
  5577. if t == nil {
  5578. return nil
  5579. }
  5580. return t.(IForeign_key_clauseContext)
  5581. }
  5582. func (s *Table_constraintContext) CONSTRAINT_() antlr.TerminalNode {
  5583. return s.GetToken(SQLiteParserCONSTRAINT_, 0)
  5584. }
  5585. func (s *Table_constraintContext) Name() INameContext {
  5586. var t antlr.RuleContext
  5587. for _, ctx := range s.GetChildren() {
  5588. if _, ok := ctx.(INameContext); ok {
  5589. t = ctx.(antlr.RuleContext)
  5590. break
  5591. }
  5592. }
  5593. if t == nil {
  5594. return nil
  5595. }
  5596. return t.(INameContext)
  5597. }
  5598. func (s *Table_constraintContext) PRIMARY_() antlr.TerminalNode {
  5599. return s.GetToken(SQLiteParserPRIMARY_, 0)
  5600. }
  5601. func (s *Table_constraintContext) UNIQUE_() antlr.TerminalNode {
  5602. return s.GetToken(SQLiteParserUNIQUE_, 0)
  5603. }
  5604. func (s *Table_constraintContext) AllCOMMA() []antlr.TerminalNode {
  5605. return s.GetTokens(SQLiteParserCOMMA)
  5606. }
  5607. func (s *Table_constraintContext) COMMA(i int) antlr.TerminalNode {
  5608. return s.GetToken(SQLiteParserCOMMA, i)
  5609. }
  5610. func (s *Table_constraintContext) Conflict_clause() IConflict_clauseContext {
  5611. var t antlr.RuleContext
  5612. for _, ctx := range s.GetChildren() {
  5613. if _, ok := ctx.(IConflict_clauseContext); ok {
  5614. t = ctx.(antlr.RuleContext)
  5615. break
  5616. }
  5617. }
  5618. if t == nil {
  5619. return nil
  5620. }
  5621. return t.(IConflict_clauseContext)
  5622. }
  5623. func (s *Table_constraintContext) GetRuleContext() antlr.RuleContext {
  5624. return s
  5625. }
  5626. func (s *Table_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  5627. return antlr.TreesStringTree(s, ruleNames, recog)
  5628. }
  5629. func (s *Table_constraintContext) EnterRule(listener antlr.ParseTreeListener) {
  5630. if listenerT, ok := listener.(SQLiteParserListener); ok {
  5631. listenerT.EnterTable_constraint(s)
  5632. }
  5633. }
  5634. func (s *Table_constraintContext) ExitRule(listener antlr.ParseTreeListener) {
  5635. if listenerT, ok := listener.(SQLiteParserListener); ok {
  5636. listenerT.ExitTable_constraint(s)
  5637. }
  5638. }
  5639. func (p *SQLiteParser) Table_constraint() (localctx ITable_constraintContext) {
  5640. this := p
  5641. _ = this
  5642. localctx = NewTable_constraintContext(p, p.GetParserRuleContext(), p.GetState())
  5643. p.EnterRule(localctx, 38, SQLiteParserRULE_table_constraint)
  5644. var _la int
  5645. defer func() {
  5646. p.ExitRule()
  5647. }()
  5648. defer func() {
  5649. if err := recover(); err != nil {
  5650. if v, ok := err.(antlr.RecognitionException); ok {
  5651. localctx.SetException(v)
  5652. p.GetErrorHandler().ReportError(p, v)
  5653. p.GetErrorHandler().Recover(p, v)
  5654. } else {
  5655. panic(err)
  5656. }
  5657. }
  5658. }()
  5659. p.EnterOuterAlt(localctx, 1)
  5660. p.SetState(561)
  5661. p.GetErrorHandler().Sync(p)
  5662. _la = p.GetTokenStream().LA(1)
  5663. if _la == SQLiteParserCONSTRAINT_ {
  5664. {
  5665. p.SetState(559)
  5666. p.Match(SQLiteParserCONSTRAINT_)
  5667. }
  5668. {
  5669. p.SetState(560)
  5670. p.Name()
  5671. }
  5672. }
  5673. p.SetState(600)
  5674. p.GetErrorHandler().Sync(p)
  5675. switch p.GetTokenStream().LA(1) {
  5676. case SQLiteParserPRIMARY_, SQLiteParserUNIQUE_:
  5677. p.SetState(566)
  5678. p.GetErrorHandler().Sync(p)
  5679. switch p.GetTokenStream().LA(1) {
  5680. case SQLiteParserPRIMARY_:
  5681. {
  5682. p.SetState(563)
  5683. p.Match(SQLiteParserPRIMARY_)
  5684. }
  5685. {
  5686. p.SetState(564)
  5687. p.Match(SQLiteParserKEY_)
  5688. }
  5689. case SQLiteParserUNIQUE_:
  5690. {
  5691. p.SetState(565)
  5692. p.Match(SQLiteParserUNIQUE_)
  5693. }
  5694. default:
  5695. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  5696. }
  5697. {
  5698. p.SetState(568)
  5699. p.Match(SQLiteParserOPEN_PAR)
  5700. }
  5701. {
  5702. p.SetState(569)
  5703. p.Indexed_column()
  5704. }
  5705. p.SetState(574)
  5706. p.GetErrorHandler().Sync(p)
  5707. _la = p.GetTokenStream().LA(1)
  5708. for _la == SQLiteParserCOMMA {
  5709. {
  5710. p.SetState(570)
  5711. p.Match(SQLiteParserCOMMA)
  5712. }
  5713. {
  5714. p.SetState(571)
  5715. p.Indexed_column()
  5716. }
  5717. p.SetState(576)
  5718. p.GetErrorHandler().Sync(p)
  5719. _la = p.GetTokenStream().LA(1)
  5720. }
  5721. {
  5722. p.SetState(577)
  5723. p.Match(SQLiteParserCLOSE_PAR)
  5724. }
  5725. p.SetState(579)
  5726. p.GetErrorHandler().Sync(p)
  5727. _la = p.GetTokenStream().LA(1)
  5728. if _la == SQLiteParserON_ {
  5729. {
  5730. p.SetState(578)
  5731. p.Conflict_clause()
  5732. }
  5733. }
  5734. case SQLiteParserCHECK_:
  5735. {
  5736. p.SetState(581)
  5737. p.Match(SQLiteParserCHECK_)
  5738. }
  5739. {
  5740. p.SetState(582)
  5741. p.Match(SQLiteParserOPEN_PAR)
  5742. }
  5743. {
  5744. p.SetState(583)
  5745. p.expr(0)
  5746. }
  5747. {
  5748. p.SetState(584)
  5749. p.Match(SQLiteParserCLOSE_PAR)
  5750. }
  5751. case SQLiteParserFOREIGN_:
  5752. {
  5753. p.SetState(586)
  5754. p.Match(SQLiteParserFOREIGN_)
  5755. }
  5756. {
  5757. p.SetState(587)
  5758. p.Match(SQLiteParserKEY_)
  5759. }
  5760. {
  5761. p.SetState(588)
  5762. p.Match(SQLiteParserOPEN_PAR)
  5763. }
  5764. {
  5765. p.SetState(589)
  5766. p.Column_name()
  5767. }
  5768. p.SetState(594)
  5769. p.GetErrorHandler().Sync(p)
  5770. _la = p.GetTokenStream().LA(1)
  5771. for _la == SQLiteParserCOMMA {
  5772. {
  5773. p.SetState(590)
  5774. p.Match(SQLiteParserCOMMA)
  5775. }
  5776. {
  5777. p.SetState(591)
  5778. p.Column_name()
  5779. }
  5780. p.SetState(596)
  5781. p.GetErrorHandler().Sync(p)
  5782. _la = p.GetTokenStream().LA(1)
  5783. }
  5784. {
  5785. p.SetState(597)
  5786. p.Match(SQLiteParserCLOSE_PAR)
  5787. }
  5788. {
  5789. p.SetState(598)
  5790. p.Foreign_key_clause()
  5791. }
  5792. default:
  5793. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  5794. }
  5795. return localctx
  5796. }
  5797. // IForeign_key_clauseContext is an interface to support dynamic dispatch.
  5798. type IForeign_key_clauseContext interface {
  5799. antlr.ParserRuleContext
  5800. // GetParser returns the parser.
  5801. GetParser() antlr.Parser
  5802. // Getter signatures
  5803. REFERENCES_() antlr.TerminalNode
  5804. Foreign_table() IForeign_tableContext
  5805. OPEN_PAR() antlr.TerminalNode
  5806. AllColumn_name() []IColumn_nameContext
  5807. Column_name(i int) IColumn_nameContext
  5808. CLOSE_PAR() antlr.TerminalNode
  5809. AllON_() []antlr.TerminalNode
  5810. ON_(i int) antlr.TerminalNode
  5811. AllMATCH_() []antlr.TerminalNode
  5812. MATCH_(i int) antlr.TerminalNode
  5813. AllName() []INameContext
  5814. Name(i int) INameContext
  5815. DEFERRABLE_() antlr.TerminalNode
  5816. AllDELETE_() []antlr.TerminalNode
  5817. DELETE_(i int) antlr.TerminalNode
  5818. AllUPDATE_() []antlr.TerminalNode
  5819. UPDATE_(i int) antlr.TerminalNode
  5820. AllSET_() []antlr.TerminalNode
  5821. SET_(i int) antlr.TerminalNode
  5822. AllCASCADE_() []antlr.TerminalNode
  5823. CASCADE_(i int) antlr.TerminalNode
  5824. AllRESTRICT_() []antlr.TerminalNode
  5825. RESTRICT_(i int) antlr.TerminalNode
  5826. AllNO_() []antlr.TerminalNode
  5827. NO_(i int) antlr.TerminalNode
  5828. AllACTION_() []antlr.TerminalNode
  5829. ACTION_(i int) antlr.TerminalNode
  5830. AllCOMMA() []antlr.TerminalNode
  5831. COMMA(i int) antlr.TerminalNode
  5832. AllNULL_() []antlr.TerminalNode
  5833. NULL_(i int) antlr.TerminalNode
  5834. AllDEFAULT_() []antlr.TerminalNode
  5835. DEFAULT_(i int) antlr.TerminalNode
  5836. NOT_() antlr.TerminalNode
  5837. INITIALLY_() antlr.TerminalNode
  5838. DEFERRED_() antlr.TerminalNode
  5839. IMMEDIATE_() antlr.TerminalNode
  5840. // IsForeign_key_clauseContext differentiates from other interfaces.
  5841. IsForeign_key_clauseContext()
  5842. }
  5843. type Foreign_key_clauseContext struct {
  5844. *antlr.BaseParserRuleContext
  5845. parser antlr.Parser
  5846. }
  5847. func NewEmptyForeign_key_clauseContext() *Foreign_key_clauseContext {
  5848. var p = new(Foreign_key_clauseContext)
  5849. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  5850. p.RuleIndex = SQLiteParserRULE_foreign_key_clause
  5851. return p
  5852. }
  5853. func (*Foreign_key_clauseContext) IsForeign_key_clauseContext() {}
  5854. func NewForeign_key_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_key_clauseContext {
  5855. var p = new(Foreign_key_clauseContext)
  5856. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  5857. p.parser = parser
  5858. p.RuleIndex = SQLiteParserRULE_foreign_key_clause
  5859. return p
  5860. }
  5861. func (s *Foreign_key_clauseContext) GetParser() antlr.Parser { return s.parser }
  5862. func (s *Foreign_key_clauseContext) REFERENCES_() antlr.TerminalNode {
  5863. return s.GetToken(SQLiteParserREFERENCES_, 0)
  5864. }
  5865. func (s *Foreign_key_clauseContext) Foreign_table() IForeign_tableContext {
  5866. var t antlr.RuleContext
  5867. for _, ctx := range s.GetChildren() {
  5868. if _, ok := ctx.(IForeign_tableContext); ok {
  5869. t = ctx.(antlr.RuleContext)
  5870. break
  5871. }
  5872. }
  5873. if t == nil {
  5874. return nil
  5875. }
  5876. return t.(IForeign_tableContext)
  5877. }
  5878. func (s *Foreign_key_clauseContext) OPEN_PAR() antlr.TerminalNode {
  5879. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  5880. }
  5881. func (s *Foreign_key_clauseContext) AllColumn_name() []IColumn_nameContext {
  5882. children := s.GetChildren()
  5883. len := 0
  5884. for _, ctx := range children {
  5885. if _, ok := ctx.(IColumn_nameContext); ok {
  5886. len++
  5887. }
  5888. }
  5889. tst := make([]IColumn_nameContext, len)
  5890. i := 0
  5891. for _, ctx := range children {
  5892. if t, ok := ctx.(IColumn_nameContext); ok {
  5893. tst[i] = t.(IColumn_nameContext)
  5894. i++
  5895. }
  5896. }
  5897. return tst
  5898. }
  5899. func (s *Foreign_key_clauseContext) Column_name(i int) IColumn_nameContext {
  5900. var t antlr.RuleContext
  5901. j := 0
  5902. for _, ctx := range s.GetChildren() {
  5903. if _, ok := ctx.(IColumn_nameContext); ok {
  5904. if j == i {
  5905. t = ctx.(antlr.RuleContext)
  5906. break
  5907. }
  5908. j++
  5909. }
  5910. }
  5911. if t == nil {
  5912. return nil
  5913. }
  5914. return t.(IColumn_nameContext)
  5915. }
  5916. func (s *Foreign_key_clauseContext) CLOSE_PAR() antlr.TerminalNode {
  5917. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  5918. }
  5919. func (s *Foreign_key_clauseContext) AllON_() []antlr.TerminalNode {
  5920. return s.GetTokens(SQLiteParserON_)
  5921. }
  5922. func (s *Foreign_key_clauseContext) ON_(i int) antlr.TerminalNode {
  5923. return s.GetToken(SQLiteParserON_, i)
  5924. }
  5925. func (s *Foreign_key_clauseContext) AllMATCH_() []antlr.TerminalNode {
  5926. return s.GetTokens(SQLiteParserMATCH_)
  5927. }
  5928. func (s *Foreign_key_clauseContext) MATCH_(i int) antlr.TerminalNode {
  5929. return s.GetToken(SQLiteParserMATCH_, i)
  5930. }
  5931. func (s *Foreign_key_clauseContext) AllName() []INameContext {
  5932. children := s.GetChildren()
  5933. len := 0
  5934. for _, ctx := range children {
  5935. if _, ok := ctx.(INameContext); ok {
  5936. len++
  5937. }
  5938. }
  5939. tst := make([]INameContext, len)
  5940. i := 0
  5941. for _, ctx := range children {
  5942. if t, ok := ctx.(INameContext); ok {
  5943. tst[i] = t.(INameContext)
  5944. i++
  5945. }
  5946. }
  5947. return tst
  5948. }
  5949. func (s *Foreign_key_clauseContext) Name(i int) INameContext {
  5950. var t antlr.RuleContext
  5951. j := 0
  5952. for _, ctx := range s.GetChildren() {
  5953. if _, ok := ctx.(INameContext); ok {
  5954. if j == i {
  5955. t = ctx.(antlr.RuleContext)
  5956. break
  5957. }
  5958. j++
  5959. }
  5960. }
  5961. if t == nil {
  5962. return nil
  5963. }
  5964. return t.(INameContext)
  5965. }
  5966. func (s *Foreign_key_clauseContext) DEFERRABLE_() antlr.TerminalNode {
  5967. return s.GetToken(SQLiteParserDEFERRABLE_, 0)
  5968. }
  5969. func (s *Foreign_key_clauseContext) AllDELETE_() []antlr.TerminalNode {
  5970. return s.GetTokens(SQLiteParserDELETE_)
  5971. }
  5972. func (s *Foreign_key_clauseContext) DELETE_(i int) antlr.TerminalNode {
  5973. return s.GetToken(SQLiteParserDELETE_, i)
  5974. }
  5975. func (s *Foreign_key_clauseContext) AllUPDATE_() []antlr.TerminalNode {
  5976. return s.GetTokens(SQLiteParserUPDATE_)
  5977. }
  5978. func (s *Foreign_key_clauseContext) UPDATE_(i int) antlr.TerminalNode {
  5979. return s.GetToken(SQLiteParserUPDATE_, i)
  5980. }
  5981. func (s *Foreign_key_clauseContext) AllSET_() []antlr.TerminalNode {
  5982. return s.GetTokens(SQLiteParserSET_)
  5983. }
  5984. func (s *Foreign_key_clauseContext) SET_(i int) antlr.TerminalNode {
  5985. return s.GetToken(SQLiteParserSET_, i)
  5986. }
  5987. func (s *Foreign_key_clauseContext) AllCASCADE_() []antlr.TerminalNode {
  5988. return s.GetTokens(SQLiteParserCASCADE_)
  5989. }
  5990. func (s *Foreign_key_clauseContext) CASCADE_(i int) antlr.TerminalNode {
  5991. return s.GetToken(SQLiteParserCASCADE_, i)
  5992. }
  5993. func (s *Foreign_key_clauseContext) AllRESTRICT_() []antlr.TerminalNode {
  5994. return s.GetTokens(SQLiteParserRESTRICT_)
  5995. }
  5996. func (s *Foreign_key_clauseContext) RESTRICT_(i int) antlr.TerminalNode {
  5997. return s.GetToken(SQLiteParserRESTRICT_, i)
  5998. }
  5999. func (s *Foreign_key_clauseContext) AllNO_() []antlr.TerminalNode {
  6000. return s.GetTokens(SQLiteParserNO_)
  6001. }
  6002. func (s *Foreign_key_clauseContext) NO_(i int) antlr.TerminalNode {
  6003. return s.GetToken(SQLiteParserNO_, i)
  6004. }
  6005. func (s *Foreign_key_clauseContext) AllACTION_() []antlr.TerminalNode {
  6006. return s.GetTokens(SQLiteParserACTION_)
  6007. }
  6008. func (s *Foreign_key_clauseContext) ACTION_(i int) antlr.TerminalNode {
  6009. return s.GetToken(SQLiteParserACTION_, i)
  6010. }
  6011. func (s *Foreign_key_clauseContext) AllCOMMA() []antlr.TerminalNode {
  6012. return s.GetTokens(SQLiteParserCOMMA)
  6013. }
  6014. func (s *Foreign_key_clauseContext) COMMA(i int) antlr.TerminalNode {
  6015. return s.GetToken(SQLiteParserCOMMA, i)
  6016. }
  6017. func (s *Foreign_key_clauseContext) AllNULL_() []antlr.TerminalNode {
  6018. return s.GetTokens(SQLiteParserNULL_)
  6019. }
  6020. func (s *Foreign_key_clauseContext) NULL_(i int) antlr.TerminalNode {
  6021. return s.GetToken(SQLiteParserNULL_, i)
  6022. }
  6023. func (s *Foreign_key_clauseContext) AllDEFAULT_() []antlr.TerminalNode {
  6024. return s.GetTokens(SQLiteParserDEFAULT_)
  6025. }
  6026. func (s *Foreign_key_clauseContext) DEFAULT_(i int) antlr.TerminalNode {
  6027. return s.GetToken(SQLiteParserDEFAULT_, i)
  6028. }
  6029. func (s *Foreign_key_clauseContext) NOT_() antlr.TerminalNode {
  6030. return s.GetToken(SQLiteParserNOT_, 0)
  6031. }
  6032. func (s *Foreign_key_clauseContext) INITIALLY_() antlr.TerminalNode {
  6033. return s.GetToken(SQLiteParserINITIALLY_, 0)
  6034. }
  6035. func (s *Foreign_key_clauseContext) DEFERRED_() antlr.TerminalNode {
  6036. return s.GetToken(SQLiteParserDEFERRED_, 0)
  6037. }
  6038. func (s *Foreign_key_clauseContext) IMMEDIATE_() antlr.TerminalNode {
  6039. return s.GetToken(SQLiteParserIMMEDIATE_, 0)
  6040. }
  6041. func (s *Foreign_key_clauseContext) GetRuleContext() antlr.RuleContext {
  6042. return s
  6043. }
  6044. func (s *Foreign_key_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  6045. return antlr.TreesStringTree(s, ruleNames, recog)
  6046. }
  6047. func (s *Foreign_key_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
  6048. if listenerT, ok := listener.(SQLiteParserListener); ok {
  6049. listenerT.EnterForeign_key_clause(s)
  6050. }
  6051. }
  6052. func (s *Foreign_key_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
  6053. if listenerT, ok := listener.(SQLiteParserListener); ok {
  6054. listenerT.ExitForeign_key_clause(s)
  6055. }
  6056. }
  6057. func (p *SQLiteParser) Foreign_key_clause() (localctx IForeign_key_clauseContext) {
  6058. this := p
  6059. _ = this
  6060. localctx = NewForeign_key_clauseContext(p, p.GetParserRuleContext(), p.GetState())
  6061. p.EnterRule(localctx, 40, SQLiteParserRULE_foreign_key_clause)
  6062. var _la int
  6063. defer func() {
  6064. p.ExitRule()
  6065. }()
  6066. defer func() {
  6067. if err := recover(); err != nil {
  6068. if v, ok := err.(antlr.RecognitionException); ok {
  6069. localctx.SetException(v)
  6070. p.GetErrorHandler().ReportError(p, v)
  6071. p.GetErrorHandler().Recover(p, v)
  6072. } else {
  6073. panic(err)
  6074. }
  6075. }
  6076. }()
  6077. p.EnterOuterAlt(localctx, 1)
  6078. {
  6079. p.SetState(602)
  6080. p.Match(SQLiteParserREFERENCES_)
  6081. }
  6082. {
  6083. p.SetState(603)
  6084. p.Foreign_table()
  6085. }
  6086. p.SetState(615)
  6087. p.GetErrorHandler().Sync(p)
  6088. _la = p.GetTokenStream().LA(1)
  6089. if _la == SQLiteParserOPEN_PAR {
  6090. {
  6091. p.SetState(604)
  6092. p.Match(SQLiteParserOPEN_PAR)
  6093. }
  6094. {
  6095. p.SetState(605)
  6096. p.Column_name()
  6097. }
  6098. p.SetState(610)
  6099. p.GetErrorHandler().Sync(p)
  6100. _la = p.GetTokenStream().LA(1)
  6101. for _la == SQLiteParserCOMMA {
  6102. {
  6103. p.SetState(606)
  6104. p.Match(SQLiteParserCOMMA)
  6105. }
  6106. {
  6107. p.SetState(607)
  6108. p.Column_name()
  6109. }
  6110. p.SetState(612)
  6111. p.GetErrorHandler().Sync(p)
  6112. _la = p.GetTokenStream().LA(1)
  6113. }
  6114. {
  6115. p.SetState(613)
  6116. p.Match(SQLiteParserCLOSE_PAR)
  6117. }
  6118. }
  6119. p.SetState(631)
  6120. p.GetErrorHandler().Sync(p)
  6121. _la = p.GetTokenStream().LA(1)
  6122. for _la == SQLiteParserMATCH_ || _la == SQLiteParserON_ {
  6123. p.SetState(629)
  6124. p.GetErrorHandler().Sync(p)
  6125. switch p.GetTokenStream().LA(1) {
  6126. case SQLiteParserON_:
  6127. {
  6128. p.SetState(617)
  6129. p.Match(SQLiteParserON_)
  6130. }
  6131. {
  6132. p.SetState(618)
  6133. _la = p.GetTokenStream().LA(1)
  6134. if !(_la == SQLiteParserDELETE_ || _la == SQLiteParserUPDATE_) {
  6135. p.GetErrorHandler().RecoverInline(p)
  6136. } else {
  6137. p.GetErrorHandler().ReportMatch(p)
  6138. p.Consume()
  6139. }
  6140. }
  6141. p.SetState(625)
  6142. p.GetErrorHandler().Sync(p)
  6143. switch p.GetTokenStream().LA(1) {
  6144. case SQLiteParserSET_:
  6145. {
  6146. p.SetState(619)
  6147. p.Match(SQLiteParserSET_)
  6148. }
  6149. {
  6150. p.SetState(620)
  6151. _la = p.GetTokenStream().LA(1)
  6152. if !(_la == SQLiteParserDEFAULT_ || _la == SQLiteParserNULL_) {
  6153. p.GetErrorHandler().RecoverInline(p)
  6154. } else {
  6155. p.GetErrorHandler().ReportMatch(p)
  6156. p.Consume()
  6157. }
  6158. }
  6159. case SQLiteParserCASCADE_:
  6160. {
  6161. p.SetState(621)
  6162. p.Match(SQLiteParserCASCADE_)
  6163. }
  6164. case SQLiteParserRESTRICT_:
  6165. {
  6166. p.SetState(622)
  6167. p.Match(SQLiteParserRESTRICT_)
  6168. }
  6169. case SQLiteParserNO_:
  6170. {
  6171. p.SetState(623)
  6172. p.Match(SQLiteParserNO_)
  6173. }
  6174. {
  6175. p.SetState(624)
  6176. p.Match(SQLiteParserACTION_)
  6177. }
  6178. default:
  6179. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  6180. }
  6181. case SQLiteParserMATCH_:
  6182. {
  6183. p.SetState(627)
  6184. p.Match(SQLiteParserMATCH_)
  6185. }
  6186. {
  6187. p.SetState(628)
  6188. p.Name()
  6189. }
  6190. default:
  6191. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  6192. }
  6193. p.SetState(633)
  6194. p.GetErrorHandler().Sync(p)
  6195. _la = p.GetTokenStream().LA(1)
  6196. }
  6197. p.SetState(642)
  6198. p.GetErrorHandler().Sync(p)
  6199. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 70, p.GetParserRuleContext()) == 1 {
  6200. p.SetState(635)
  6201. p.GetErrorHandler().Sync(p)
  6202. _la = p.GetTokenStream().LA(1)
  6203. if _la == SQLiteParserNOT_ {
  6204. {
  6205. p.SetState(634)
  6206. p.Match(SQLiteParserNOT_)
  6207. }
  6208. }
  6209. {
  6210. p.SetState(637)
  6211. p.Match(SQLiteParserDEFERRABLE_)
  6212. }
  6213. p.SetState(640)
  6214. p.GetErrorHandler().Sync(p)
  6215. _la = p.GetTokenStream().LA(1)
  6216. if _la == SQLiteParserINITIALLY_ {
  6217. {
  6218. p.SetState(638)
  6219. p.Match(SQLiteParserINITIALLY_)
  6220. }
  6221. {
  6222. p.SetState(639)
  6223. _la = p.GetTokenStream().LA(1)
  6224. if !(_la == SQLiteParserDEFERRED_ || _la == SQLiteParserIMMEDIATE_) {
  6225. p.GetErrorHandler().RecoverInline(p)
  6226. } else {
  6227. p.GetErrorHandler().ReportMatch(p)
  6228. p.Consume()
  6229. }
  6230. }
  6231. }
  6232. }
  6233. return localctx
  6234. }
  6235. // IConflict_clauseContext is an interface to support dynamic dispatch.
  6236. type IConflict_clauseContext interface {
  6237. antlr.ParserRuleContext
  6238. // GetParser returns the parser.
  6239. GetParser() antlr.Parser
  6240. // Getter signatures
  6241. ON_() antlr.TerminalNode
  6242. CONFLICT_() antlr.TerminalNode
  6243. ROLLBACK_() antlr.TerminalNode
  6244. ABORT_() antlr.TerminalNode
  6245. FAIL_() antlr.TerminalNode
  6246. IGNORE_() antlr.TerminalNode
  6247. REPLACE_() antlr.TerminalNode
  6248. // IsConflict_clauseContext differentiates from other interfaces.
  6249. IsConflict_clauseContext()
  6250. }
  6251. type Conflict_clauseContext struct {
  6252. *antlr.BaseParserRuleContext
  6253. parser antlr.Parser
  6254. }
  6255. func NewEmptyConflict_clauseContext() *Conflict_clauseContext {
  6256. var p = new(Conflict_clauseContext)
  6257. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  6258. p.RuleIndex = SQLiteParserRULE_conflict_clause
  6259. return p
  6260. }
  6261. func (*Conflict_clauseContext) IsConflict_clauseContext() {}
  6262. func NewConflict_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Conflict_clauseContext {
  6263. var p = new(Conflict_clauseContext)
  6264. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  6265. p.parser = parser
  6266. p.RuleIndex = SQLiteParserRULE_conflict_clause
  6267. return p
  6268. }
  6269. func (s *Conflict_clauseContext) GetParser() antlr.Parser { return s.parser }
  6270. func (s *Conflict_clauseContext) ON_() antlr.TerminalNode {
  6271. return s.GetToken(SQLiteParserON_, 0)
  6272. }
  6273. func (s *Conflict_clauseContext) CONFLICT_() antlr.TerminalNode {
  6274. return s.GetToken(SQLiteParserCONFLICT_, 0)
  6275. }
  6276. func (s *Conflict_clauseContext) ROLLBACK_() antlr.TerminalNode {
  6277. return s.GetToken(SQLiteParserROLLBACK_, 0)
  6278. }
  6279. func (s *Conflict_clauseContext) ABORT_() antlr.TerminalNode {
  6280. return s.GetToken(SQLiteParserABORT_, 0)
  6281. }
  6282. func (s *Conflict_clauseContext) FAIL_() antlr.TerminalNode {
  6283. return s.GetToken(SQLiteParserFAIL_, 0)
  6284. }
  6285. func (s *Conflict_clauseContext) IGNORE_() antlr.TerminalNode {
  6286. return s.GetToken(SQLiteParserIGNORE_, 0)
  6287. }
  6288. func (s *Conflict_clauseContext) REPLACE_() antlr.TerminalNode {
  6289. return s.GetToken(SQLiteParserREPLACE_, 0)
  6290. }
  6291. func (s *Conflict_clauseContext) GetRuleContext() antlr.RuleContext {
  6292. return s
  6293. }
  6294. func (s *Conflict_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  6295. return antlr.TreesStringTree(s, ruleNames, recog)
  6296. }
  6297. func (s *Conflict_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
  6298. if listenerT, ok := listener.(SQLiteParserListener); ok {
  6299. listenerT.EnterConflict_clause(s)
  6300. }
  6301. }
  6302. func (s *Conflict_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
  6303. if listenerT, ok := listener.(SQLiteParserListener); ok {
  6304. listenerT.ExitConflict_clause(s)
  6305. }
  6306. }
  6307. func (p *SQLiteParser) Conflict_clause() (localctx IConflict_clauseContext) {
  6308. this := p
  6309. _ = this
  6310. localctx = NewConflict_clauseContext(p, p.GetParserRuleContext(), p.GetState())
  6311. p.EnterRule(localctx, 42, SQLiteParserRULE_conflict_clause)
  6312. var _la int
  6313. defer func() {
  6314. p.ExitRule()
  6315. }()
  6316. defer func() {
  6317. if err := recover(); err != nil {
  6318. if v, ok := err.(antlr.RecognitionException); ok {
  6319. localctx.SetException(v)
  6320. p.GetErrorHandler().ReportError(p, v)
  6321. p.GetErrorHandler().Recover(p, v)
  6322. } else {
  6323. panic(err)
  6324. }
  6325. }
  6326. }()
  6327. p.EnterOuterAlt(localctx, 1)
  6328. {
  6329. p.SetState(644)
  6330. p.Match(SQLiteParserON_)
  6331. }
  6332. {
  6333. p.SetState(645)
  6334. p.Match(SQLiteParserCONFLICT_)
  6335. }
  6336. {
  6337. p.SetState(646)
  6338. _la = p.GetTokenStream().LA(1)
  6339. if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) {
  6340. p.GetErrorHandler().RecoverInline(p)
  6341. } else {
  6342. p.GetErrorHandler().ReportMatch(p)
  6343. p.Consume()
  6344. }
  6345. }
  6346. return localctx
  6347. }
  6348. // ICreate_trigger_stmtContext is an interface to support dynamic dispatch.
  6349. type ICreate_trigger_stmtContext interface {
  6350. antlr.ParserRuleContext
  6351. // GetParser returns the parser.
  6352. GetParser() antlr.Parser
  6353. // Getter signatures
  6354. CREATE_() antlr.TerminalNode
  6355. TRIGGER_() antlr.TerminalNode
  6356. Trigger_name() ITrigger_nameContext
  6357. ON_() antlr.TerminalNode
  6358. Table_name() ITable_nameContext
  6359. BEGIN_() antlr.TerminalNode
  6360. END_() antlr.TerminalNode
  6361. DELETE_() antlr.TerminalNode
  6362. INSERT_() antlr.TerminalNode
  6363. UPDATE_() antlr.TerminalNode
  6364. IF_() antlr.TerminalNode
  6365. NOT_() antlr.TerminalNode
  6366. EXISTS_() antlr.TerminalNode
  6367. Schema_name() ISchema_nameContext
  6368. DOT() antlr.TerminalNode
  6369. BEFORE_() antlr.TerminalNode
  6370. AFTER_() antlr.TerminalNode
  6371. INSTEAD_() antlr.TerminalNode
  6372. AllOF_() []antlr.TerminalNode
  6373. OF_(i int) antlr.TerminalNode
  6374. FOR_() antlr.TerminalNode
  6375. EACH_() antlr.TerminalNode
  6376. ROW_() antlr.TerminalNode
  6377. WHEN_() antlr.TerminalNode
  6378. Expr() IExprContext
  6379. AllSCOL() []antlr.TerminalNode
  6380. SCOL(i int) antlr.TerminalNode
  6381. TEMP_() antlr.TerminalNode
  6382. TEMPORARY_() antlr.TerminalNode
  6383. AllColumn_name() []IColumn_nameContext
  6384. Column_name(i int) IColumn_nameContext
  6385. AllUpdate_stmt() []IUpdate_stmtContext
  6386. Update_stmt(i int) IUpdate_stmtContext
  6387. AllInsert_stmt() []IInsert_stmtContext
  6388. Insert_stmt(i int) IInsert_stmtContext
  6389. AllDelete_stmt() []IDelete_stmtContext
  6390. Delete_stmt(i int) IDelete_stmtContext
  6391. AllSelect_stmt() []ISelect_stmtContext
  6392. Select_stmt(i int) ISelect_stmtContext
  6393. AllCOMMA() []antlr.TerminalNode
  6394. COMMA(i int) antlr.TerminalNode
  6395. // IsCreate_trigger_stmtContext differentiates from other interfaces.
  6396. IsCreate_trigger_stmtContext()
  6397. }
  6398. type Create_trigger_stmtContext struct {
  6399. *antlr.BaseParserRuleContext
  6400. parser antlr.Parser
  6401. }
  6402. func NewEmptyCreate_trigger_stmtContext() *Create_trigger_stmtContext {
  6403. var p = new(Create_trigger_stmtContext)
  6404. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  6405. p.RuleIndex = SQLiteParserRULE_create_trigger_stmt
  6406. return p
  6407. }
  6408. func (*Create_trigger_stmtContext) IsCreate_trigger_stmtContext() {}
  6409. func NewCreate_trigger_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_trigger_stmtContext {
  6410. var p = new(Create_trigger_stmtContext)
  6411. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  6412. p.parser = parser
  6413. p.RuleIndex = SQLiteParserRULE_create_trigger_stmt
  6414. return p
  6415. }
  6416. func (s *Create_trigger_stmtContext) GetParser() antlr.Parser { return s.parser }
  6417. func (s *Create_trigger_stmtContext) CREATE_() antlr.TerminalNode {
  6418. return s.GetToken(SQLiteParserCREATE_, 0)
  6419. }
  6420. func (s *Create_trigger_stmtContext) TRIGGER_() antlr.TerminalNode {
  6421. return s.GetToken(SQLiteParserTRIGGER_, 0)
  6422. }
  6423. func (s *Create_trigger_stmtContext) Trigger_name() ITrigger_nameContext {
  6424. var t antlr.RuleContext
  6425. for _, ctx := range s.GetChildren() {
  6426. if _, ok := ctx.(ITrigger_nameContext); ok {
  6427. t = ctx.(antlr.RuleContext)
  6428. break
  6429. }
  6430. }
  6431. if t == nil {
  6432. return nil
  6433. }
  6434. return t.(ITrigger_nameContext)
  6435. }
  6436. func (s *Create_trigger_stmtContext) ON_() antlr.TerminalNode {
  6437. return s.GetToken(SQLiteParserON_, 0)
  6438. }
  6439. func (s *Create_trigger_stmtContext) Table_name() ITable_nameContext {
  6440. var t antlr.RuleContext
  6441. for _, ctx := range s.GetChildren() {
  6442. if _, ok := ctx.(ITable_nameContext); ok {
  6443. t = ctx.(antlr.RuleContext)
  6444. break
  6445. }
  6446. }
  6447. if t == nil {
  6448. return nil
  6449. }
  6450. return t.(ITable_nameContext)
  6451. }
  6452. func (s *Create_trigger_stmtContext) BEGIN_() antlr.TerminalNode {
  6453. return s.GetToken(SQLiteParserBEGIN_, 0)
  6454. }
  6455. func (s *Create_trigger_stmtContext) END_() antlr.TerminalNode {
  6456. return s.GetToken(SQLiteParserEND_, 0)
  6457. }
  6458. func (s *Create_trigger_stmtContext) DELETE_() antlr.TerminalNode {
  6459. return s.GetToken(SQLiteParserDELETE_, 0)
  6460. }
  6461. func (s *Create_trigger_stmtContext) INSERT_() antlr.TerminalNode {
  6462. return s.GetToken(SQLiteParserINSERT_, 0)
  6463. }
  6464. func (s *Create_trigger_stmtContext) UPDATE_() antlr.TerminalNode {
  6465. return s.GetToken(SQLiteParserUPDATE_, 0)
  6466. }
  6467. func (s *Create_trigger_stmtContext) IF_() antlr.TerminalNode {
  6468. return s.GetToken(SQLiteParserIF_, 0)
  6469. }
  6470. func (s *Create_trigger_stmtContext) NOT_() antlr.TerminalNode {
  6471. return s.GetToken(SQLiteParserNOT_, 0)
  6472. }
  6473. func (s *Create_trigger_stmtContext) EXISTS_() antlr.TerminalNode {
  6474. return s.GetToken(SQLiteParserEXISTS_, 0)
  6475. }
  6476. func (s *Create_trigger_stmtContext) Schema_name() ISchema_nameContext {
  6477. var t antlr.RuleContext
  6478. for _, ctx := range s.GetChildren() {
  6479. if _, ok := ctx.(ISchema_nameContext); ok {
  6480. t = ctx.(antlr.RuleContext)
  6481. break
  6482. }
  6483. }
  6484. if t == nil {
  6485. return nil
  6486. }
  6487. return t.(ISchema_nameContext)
  6488. }
  6489. func (s *Create_trigger_stmtContext) DOT() antlr.TerminalNode {
  6490. return s.GetToken(SQLiteParserDOT, 0)
  6491. }
  6492. func (s *Create_trigger_stmtContext) BEFORE_() antlr.TerminalNode {
  6493. return s.GetToken(SQLiteParserBEFORE_, 0)
  6494. }
  6495. func (s *Create_trigger_stmtContext) AFTER_() antlr.TerminalNode {
  6496. return s.GetToken(SQLiteParserAFTER_, 0)
  6497. }
  6498. func (s *Create_trigger_stmtContext) INSTEAD_() antlr.TerminalNode {
  6499. return s.GetToken(SQLiteParserINSTEAD_, 0)
  6500. }
  6501. func (s *Create_trigger_stmtContext) AllOF_() []antlr.TerminalNode {
  6502. return s.GetTokens(SQLiteParserOF_)
  6503. }
  6504. func (s *Create_trigger_stmtContext) OF_(i int) antlr.TerminalNode {
  6505. return s.GetToken(SQLiteParserOF_, i)
  6506. }
  6507. func (s *Create_trigger_stmtContext) FOR_() antlr.TerminalNode {
  6508. return s.GetToken(SQLiteParserFOR_, 0)
  6509. }
  6510. func (s *Create_trigger_stmtContext) EACH_() antlr.TerminalNode {
  6511. return s.GetToken(SQLiteParserEACH_, 0)
  6512. }
  6513. func (s *Create_trigger_stmtContext) ROW_() antlr.TerminalNode {
  6514. return s.GetToken(SQLiteParserROW_, 0)
  6515. }
  6516. func (s *Create_trigger_stmtContext) WHEN_() antlr.TerminalNode {
  6517. return s.GetToken(SQLiteParserWHEN_, 0)
  6518. }
  6519. func (s *Create_trigger_stmtContext) Expr() IExprContext {
  6520. var t antlr.RuleContext
  6521. for _, ctx := range s.GetChildren() {
  6522. if _, ok := ctx.(IExprContext); ok {
  6523. t = ctx.(antlr.RuleContext)
  6524. break
  6525. }
  6526. }
  6527. if t == nil {
  6528. return nil
  6529. }
  6530. return t.(IExprContext)
  6531. }
  6532. func (s *Create_trigger_stmtContext) AllSCOL() []antlr.TerminalNode {
  6533. return s.GetTokens(SQLiteParserSCOL)
  6534. }
  6535. func (s *Create_trigger_stmtContext) SCOL(i int) antlr.TerminalNode {
  6536. return s.GetToken(SQLiteParserSCOL, i)
  6537. }
  6538. func (s *Create_trigger_stmtContext) TEMP_() antlr.TerminalNode {
  6539. return s.GetToken(SQLiteParserTEMP_, 0)
  6540. }
  6541. func (s *Create_trigger_stmtContext) TEMPORARY_() antlr.TerminalNode {
  6542. return s.GetToken(SQLiteParserTEMPORARY_, 0)
  6543. }
  6544. func (s *Create_trigger_stmtContext) AllColumn_name() []IColumn_nameContext {
  6545. children := s.GetChildren()
  6546. len := 0
  6547. for _, ctx := range children {
  6548. if _, ok := ctx.(IColumn_nameContext); ok {
  6549. len++
  6550. }
  6551. }
  6552. tst := make([]IColumn_nameContext, len)
  6553. i := 0
  6554. for _, ctx := range children {
  6555. if t, ok := ctx.(IColumn_nameContext); ok {
  6556. tst[i] = t.(IColumn_nameContext)
  6557. i++
  6558. }
  6559. }
  6560. return tst
  6561. }
  6562. func (s *Create_trigger_stmtContext) Column_name(i int) IColumn_nameContext {
  6563. var t antlr.RuleContext
  6564. j := 0
  6565. for _, ctx := range s.GetChildren() {
  6566. if _, ok := ctx.(IColumn_nameContext); ok {
  6567. if j == i {
  6568. t = ctx.(antlr.RuleContext)
  6569. break
  6570. }
  6571. j++
  6572. }
  6573. }
  6574. if t == nil {
  6575. return nil
  6576. }
  6577. return t.(IColumn_nameContext)
  6578. }
  6579. func (s *Create_trigger_stmtContext) AllUpdate_stmt() []IUpdate_stmtContext {
  6580. children := s.GetChildren()
  6581. len := 0
  6582. for _, ctx := range children {
  6583. if _, ok := ctx.(IUpdate_stmtContext); ok {
  6584. len++
  6585. }
  6586. }
  6587. tst := make([]IUpdate_stmtContext, len)
  6588. i := 0
  6589. for _, ctx := range children {
  6590. if t, ok := ctx.(IUpdate_stmtContext); ok {
  6591. tst[i] = t.(IUpdate_stmtContext)
  6592. i++
  6593. }
  6594. }
  6595. return tst
  6596. }
  6597. func (s *Create_trigger_stmtContext) Update_stmt(i int) IUpdate_stmtContext {
  6598. var t antlr.RuleContext
  6599. j := 0
  6600. for _, ctx := range s.GetChildren() {
  6601. if _, ok := ctx.(IUpdate_stmtContext); ok {
  6602. if j == i {
  6603. t = ctx.(antlr.RuleContext)
  6604. break
  6605. }
  6606. j++
  6607. }
  6608. }
  6609. if t == nil {
  6610. return nil
  6611. }
  6612. return t.(IUpdate_stmtContext)
  6613. }
  6614. func (s *Create_trigger_stmtContext) AllInsert_stmt() []IInsert_stmtContext {
  6615. children := s.GetChildren()
  6616. len := 0
  6617. for _, ctx := range children {
  6618. if _, ok := ctx.(IInsert_stmtContext); ok {
  6619. len++
  6620. }
  6621. }
  6622. tst := make([]IInsert_stmtContext, len)
  6623. i := 0
  6624. for _, ctx := range children {
  6625. if t, ok := ctx.(IInsert_stmtContext); ok {
  6626. tst[i] = t.(IInsert_stmtContext)
  6627. i++
  6628. }
  6629. }
  6630. return tst
  6631. }
  6632. func (s *Create_trigger_stmtContext) Insert_stmt(i int) IInsert_stmtContext {
  6633. var t antlr.RuleContext
  6634. j := 0
  6635. for _, ctx := range s.GetChildren() {
  6636. if _, ok := ctx.(IInsert_stmtContext); ok {
  6637. if j == i {
  6638. t = ctx.(antlr.RuleContext)
  6639. break
  6640. }
  6641. j++
  6642. }
  6643. }
  6644. if t == nil {
  6645. return nil
  6646. }
  6647. return t.(IInsert_stmtContext)
  6648. }
  6649. func (s *Create_trigger_stmtContext) AllDelete_stmt() []IDelete_stmtContext {
  6650. children := s.GetChildren()
  6651. len := 0
  6652. for _, ctx := range children {
  6653. if _, ok := ctx.(IDelete_stmtContext); ok {
  6654. len++
  6655. }
  6656. }
  6657. tst := make([]IDelete_stmtContext, len)
  6658. i := 0
  6659. for _, ctx := range children {
  6660. if t, ok := ctx.(IDelete_stmtContext); ok {
  6661. tst[i] = t.(IDelete_stmtContext)
  6662. i++
  6663. }
  6664. }
  6665. return tst
  6666. }
  6667. func (s *Create_trigger_stmtContext) Delete_stmt(i int) IDelete_stmtContext {
  6668. var t antlr.RuleContext
  6669. j := 0
  6670. for _, ctx := range s.GetChildren() {
  6671. if _, ok := ctx.(IDelete_stmtContext); ok {
  6672. if j == i {
  6673. t = ctx.(antlr.RuleContext)
  6674. break
  6675. }
  6676. j++
  6677. }
  6678. }
  6679. if t == nil {
  6680. return nil
  6681. }
  6682. return t.(IDelete_stmtContext)
  6683. }
  6684. func (s *Create_trigger_stmtContext) AllSelect_stmt() []ISelect_stmtContext {
  6685. children := s.GetChildren()
  6686. len := 0
  6687. for _, ctx := range children {
  6688. if _, ok := ctx.(ISelect_stmtContext); ok {
  6689. len++
  6690. }
  6691. }
  6692. tst := make([]ISelect_stmtContext, len)
  6693. i := 0
  6694. for _, ctx := range children {
  6695. if t, ok := ctx.(ISelect_stmtContext); ok {
  6696. tst[i] = t.(ISelect_stmtContext)
  6697. i++
  6698. }
  6699. }
  6700. return tst
  6701. }
  6702. func (s *Create_trigger_stmtContext) Select_stmt(i int) ISelect_stmtContext {
  6703. var t antlr.RuleContext
  6704. j := 0
  6705. for _, ctx := range s.GetChildren() {
  6706. if _, ok := ctx.(ISelect_stmtContext); ok {
  6707. if j == i {
  6708. t = ctx.(antlr.RuleContext)
  6709. break
  6710. }
  6711. j++
  6712. }
  6713. }
  6714. if t == nil {
  6715. return nil
  6716. }
  6717. return t.(ISelect_stmtContext)
  6718. }
  6719. func (s *Create_trigger_stmtContext) AllCOMMA() []antlr.TerminalNode {
  6720. return s.GetTokens(SQLiteParserCOMMA)
  6721. }
  6722. func (s *Create_trigger_stmtContext) COMMA(i int) antlr.TerminalNode {
  6723. return s.GetToken(SQLiteParserCOMMA, i)
  6724. }
  6725. func (s *Create_trigger_stmtContext) GetRuleContext() antlr.RuleContext {
  6726. return s
  6727. }
  6728. func (s *Create_trigger_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  6729. return antlr.TreesStringTree(s, ruleNames, recog)
  6730. }
  6731. func (s *Create_trigger_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  6732. if listenerT, ok := listener.(SQLiteParserListener); ok {
  6733. listenerT.EnterCreate_trigger_stmt(s)
  6734. }
  6735. }
  6736. func (s *Create_trigger_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  6737. if listenerT, ok := listener.(SQLiteParserListener); ok {
  6738. listenerT.ExitCreate_trigger_stmt(s)
  6739. }
  6740. }
  6741. func (p *SQLiteParser) Create_trigger_stmt() (localctx ICreate_trigger_stmtContext) {
  6742. this := p
  6743. _ = this
  6744. localctx = NewCreate_trigger_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  6745. p.EnterRule(localctx, 44, SQLiteParserRULE_create_trigger_stmt)
  6746. var _la int
  6747. defer func() {
  6748. p.ExitRule()
  6749. }()
  6750. defer func() {
  6751. if err := recover(); err != nil {
  6752. if v, ok := err.(antlr.RecognitionException); ok {
  6753. localctx.SetException(v)
  6754. p.GetErrorHandler().ReportError(p, v)
  6755. p.GetErrorHandler().Recover(p, v)
  6756. } else {
  6757. panic(err)
  6758. }
  6759. }
  6760. }()
  6761. p.EnterOuterAlt(localctx, 1)
  6762. {
  6763. p.SetState(648)
  6764. p.Match(SQLiteParserCREATE_)
  6765. }
  6766. p.SetState(650)
  6767. p.GetErrorHandler().Sync(p)
  6768. _la = p.GetTokenStream().LA(1)
  6769. if _la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_ {
  6770. {
  6771. p.SetState(649)
  6772. _la = p.GetTokenStream().LA(1)
  6773. if !(_la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_) {
  6774. p.GetErrorHandler().RecoverInline(p)
  6775. } else {
  6776. p.GetErrorHandler().ReportMatch(p)
  6777. p.Consume()
  6778. }
  6779. }
  6780. }
  6781. {
  6782. p.SetState(652)
  6783. p.Match(SQLiteParserTRIGGER_)
  6784. }
  6785. p.SetState(656)
  6786. p.GetErrorHandler().Sync(p)
  6787. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 72, p.GetParserRuleContext()) == 1 {
  6788. {
  6789. p.SetState(653)
  6790. p.Match(SQLiteParserIF_)
  6791. }
  6792. {
  6793. p.SetState(654)
  6794. p.Match(SQLiteParserNOT_)
  6795. }
  6796. {
  6797. p.SetState(655)
  6798. p.Match(SQLiteParserEXISTS_)
  6799. }
  6800. }
  6801. p.SetState(661)
  6802. p.GetErrorHandler().Sync(p)
  6803. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 73, p.GetParserRuleContext()) == 1 {
  6804. {
  6805. p.SetState(658)
  6806. p.Schema_name()
  6807. }
  6808. {
  6809. p.SetState(659)
  6810. p.Match(SQLiteParserDOT)
  6811. }
  6812. }
  6813. {
  6814. p.SetState(663)
  6815. p.Trigger_name()
  6816. }
  6817. p.SetState(668)
  6818. p.GetErrorHandler().Sync(p)
  6819. switch p.GetTokenStream().LA(1) {
  6820. case SQLiteParserBEFORE_:
  6821. {
  6822. p.SetState(664)
  6823. p.Match(SQLiteParserBEFORE_)
  6824. }
  6825. case SQLiteParserAFTER_:
  6826. {
  6827. p.SetState(665)
  6828. p.Match(SQLiteParserAFTER_)
  6829. }
  6830. case SQLiteParserINSTEAD_:
  6831. {
  6832. p.SetState(666)
  6833. p.Match(SQLiteParserINSTEAD_)
  6834. }
  6835. {
  6836. p.SetState(667)
  6837. p.Match(SQLiteParserOF_)
  6838. }
  6839. case SQLiteParserDELETE_, SQLiteParserINSERT_, SQLiteParserUPDATE_:
  6840. default:
  6841. }
  6842. p.SetState(684)
  6843. p.GetErrorHandler().Sync(p)
  6844. switch p.GetTokenStream().LA(1) {
  6845. case SQLiteParserDELETE_:
  6846. {
  6847. p.SetState(670)
  6848. p.Match(SQLiteParserDELETE_)
  6849. }
  6850. case SQLiteParserINSERT_:
  6851. {
  6852. p.SetState(671)
  6853. p.Match(SQLiteParserINSERT_)
  6854. }
  6855. case SQLiteParserUPDATE_:
  6856. {
  6857. p.SetState(672)
  6858. p.Match(SQLiteParserUPDATE_)
  6859. }
  6860. p.SetState(682)
  6861. p.GetErrorHandler().Sync(p)
  6862. _la = p.GetTokenStream().LA(1)
  6863. if _la == SQLiteParserOF_ {
  6864. {
  6865. p.SetState(673)
  6866. p.Match(SQLiteParserOF_)
  6867. }
  6868. {
  6869. p.SetState(674)
  6870. p.Column_name()
  6871. }
  6872. p.SetState(679)
  6873. p.GetErrorHandler().Sync(p)
  6874. _la = p.GetTokenStream().LA(1)
  6875. for _la == SQLiteParserCOMMA {
  6876. {
  6877. p.SetState(675)
  6878. p.Match(SQLiteParserCOMMA)
  6879. }
  6880. {
  6881. p.SetState(676)
  6882. p.Column_name()
  6883. }
  6884. p.SetState(681)
  6885. p.GetErrorHandler().Sync(p)
  6886. _la = p.GetTokenStream().LA(1)
  6887. }
  6888. }
  6889. default:
  6890. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  6891. }
  6892. {
  6893. p.SetState(686)
  6894. p.Match(SQLiteParserON_)
  6895. }
  6896. {
  6897. p.SetState(687)
  6898. p.Table_name()
  6899. }
  6900. p.SetState(691)
  6901. p.GetErrorHandler().Sync(p)
  6902. _la = p.GetTokenStream().LA(1)
  6903. if _la == SQLiteParserFOR_ {
  6904. {
  6905. p.SetState(688)
  6906. p.Match(SQLiteParserFOR_)
  6907. }
  6908. {
  6909. p.SetState(689)
  6910. p.Match(SQLiteParserEACH_)
  6911. }
  6912. {
  6913. p.SetState(690)
  6914. p.Match(SQLiteParserROW_)
  6915. }
  6916. }
  6917. p.SetState(695)
  6918. p.GetErrorHandler().Sync(p)
  6919. _la = p.GetTokenStream().LA(1)
  6920. if _la == SQLiteParserWHEN_ {
  6921. {
  6922. p.SetState(693)
  6923. p.Match(SQLiteParserWHEN_)
  6924. }
  6925. {
  6926. p.SetState(694)
  6927. p.expr(0)
  6928. }
  6929. }
  6930. {
  6931. p.SetState(697)
  6932. p.Match(SQLiteParserBEGIN_)
  6933. }
  6934. p.SetState(706)
  6935. p.GetErrorHandler().Sync(p)
  6936. _la = p.GetTokenStream().LA(1)
  6937. for ok := true; ok; ok = _la == SQLiteParserDEFAULT_ || _la == SQLiteParserDELETE_ || ((int64((_la-90)) & ^0x3f) == 0 && ((int64(1)<<(_la-90))&4773820020239106049) != 0) {
  6938. p.SetState(702)
  6939. p.GetErrorHandler().Sync(p)
  6940. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 80, p.GetParserRuleContext()) {
  6941. case 1:
  6942. {
  6943. p.SetState(698)
  6944. p.Update_stmt()
  6945. }
  6946. case 2:
  6947. {
  6948. p.SetState(699)
  6949. p.Insert_stmt()
  6950. }
  6951. case 3:
  6952. {
  6953. p.SetState(700)
  6954. p.Delete_stmt()
  6955. }
  6956. case 4:
  6957. {
  6958. p.SetState(701)
  6959. p.Select_stmt()
  6960. }
  6961. }
  6962. {
  6963. p.SetState(704)
  6964. p.Match(SQLiteParserSCOL)
  6965. }
  6966. p.SetState(708)
  6967. p.GetErrorHandler().Sync(p)
  6968. _la = p.GetTokenStream().LA(1)
  6969. }
  6970. {
  6971. p.SetState(710)
  6972. p.Match(SQLiteParserEND_)
  6973. }
  6974. return localctx
  6975. }
  6976. // ICreate_view_stmtContext is an interface to support dynamic dispatch.
  6977. type ICreate_view_stmtContext interface {
  6978. antlr.ParserRuleContext
  6979. // GetParser returns the parser.
  6980. GetParser() antlr.Parser
  6981. // Getter signatures
  6982. CREATE_() antlr.TerminalNode
  6983. VIEW_() antlr.TerminalNode
  6984. View_name() IView_nameContext
  6985. AS_() antlr.TerminalNode
  6986. Select_stmt() ISelect_stmtContext
  6987. IF_() antlr.TerminalNode
  6988. NOT_() antlr.TerminalNode
  6989. EXISTS_() antlr.TerminalNode
  6990. Schema_name() ISchema_nameContext
  6991. DOT() antlr.TerminalNode
  6992. OPEN_PAR() antlr.TerminalNode
  6993. AllColumn_name() []IColumn_nameContext
  6994. Column_name(i int) IColumn_nameContext
  6995. CLOSE_PAR() antlr.TerminalNode
  6996. TEMP_() antlr.TerminalNode
  6997. TEMPORARY_() antlr.TerminalNode
  6998. AllCOMMA() []antlr.TerminalNode
  6999. COMMA(i int) antlr.TerminalNode
  7000. // IsCreate_view_stmtContext differentiates from other interfaces.
  7001. IsCreate_view_stmtContext()
  7002. }
  7003. type Create_view_stmtContext struct {
  7004. *antlr.BaseParserRuleContext
  7005. parser antlr.Parser
  7006. }
  7007. func NewEmptyCreate_view_stmtContext() *Create_view_stmtContext {
  7008. var p = new(Create_view_stmtContext)
  7009. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  7010. p.RuleIndex = SQLiteParserRULE_create_view_stmt
  7011. return p
  7012. }
  7013. func (*Create_view_stmtContext) IsCreate_view_stmtContext() {}
  7014. func NewCreate_view_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_view_stmtContext {
  7015. var p = new(Create_view_stmtContext)
  7016. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  7017. p.parser = parser
  7018. p.RuleIndex = SQLiteParserRULE_create_view_stmt
  7019. return p
  7020. }
  7021. func (s *Create_view_stmtContext) GetParser() antlr.Parser { return s.parser }
  7022. func (s *Create_view_stmtContext) CREATE_() antlr.TerminalNode {
  7023. return s.GetToken(SQLiteParserCREATE_, 0)
  7024. }
  7025. func (s *Create_view_stmtContext) VIEW_() antlr.TerminalNode {
  7026. return s.GetToken(SQLiteParserVIEW_, 0)
  7027. }
  7028. func (s *Create_view_stmtContext) View_name() IView_nameContext {
  7029. var t antlr.RuleContext
  7030. for _, ctx := range s.GetChildren() {
  7031. if _, ok := ctx.(IView_nameContext); ok {
  7032. t = ctx.(antlr.RuleContext)
  7033. break
  7034. }
  7035. }
  7036. if t == nil {
  7037. return nil
  7038. }
  7039. return t.(IView_nameContext)
  7040. }
  7041. func (s *Create_view_stmtContext) AS_() antlr.TerminalNode {
  7042. return s.GetToken(SQLiteParserAS_, 0)
  7043. }
  7044. func (s *Create_view_stmtContext) Select_stmt() ISelect_stmtContext {
  7045. var t antlr.RuleContext
  7046. for _, ctx := range s.GetChildren() {
  7047. if _, ok := ctx.(ISelect_stmtContext); ok {
  7048. t = ctx.(antlr.RuleContext)
  7049. break
  7050. }
  7051. }
  7052. if t == nil {
  7053. return nil
  7054. }
  7055. return t.(ISelect_stmtContext)
  7056. }
  7057. func (s *Create_view_stmtContext) IF_() antlr.TerminalNode {
  7058. return s.GetToken(SQLiteParserIF_, 0)
  7059. }
  7060. func (s *Create_view_stmtContext) NOT_() antlr.TerminalNode {
  7061. return s.GetToken(SQLiteParserNOT_, 0)
  7062. }
  7063. func (s *Create_view_stmtContext) EXISTS_() antlr.TerminalNode {
  7064. return s.GetToken(SQLiteParserEXISTS_, 0)
  7065. }
  7066. func (s *Create_view_stmtContext) Schema_name() ISchema_nameContext {
  7067. var t antlr.RuleContext
  7068. for _, ctx := range s.GetChildren() {
  7069. if _, ok := ctx.(ISchema_nameContext); ok {
  7070. t = ctx.(antlr.RuleContext)
  7071. break
  7072. }
  7073. }
  7074. if t == nil {
  7075. return nil
  7076. }
  7077. return t.(ISchema_nameContext)
  7078. }
  7079. func (s *Create_view_stmtContext) DOT() antlr.TerminalNode {
  7080. return s.GetToken(SQLiteParserDOT, 0)
  7081. }
  7082. func (s *Create_view_stmtContext) OPEN_PAR() antlr.TerminalNode {
  7083. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  7084. }
  7085. func (s *Create_view_stmtContext) AllColumn_name() []IColumn_nameContext {
  7086. children := s.GetChildren()
  7087. len := 0
  7088. for _, ctx := range children {
  7089. if _, ok := ctx.(IColumn_nameContext); ok {
  7090. len++
  7091. }
  7092. }
  7093. tst := make([]IColumn_nameContext, len)
  7094. i := 0
  7095. for _, ctx := range children {
  7096. if t, ok := ctx.(IColumn_nameContext); ok {
  7097. tst[i] = t.(IColumn_nameContext)
  7098. i++
  7099. }
  7100. }
  7101. return tst
  7102. }
  7103. func (s *Create_view_stmtContext) Column_name(i int) IColumn_nameContext {
  7104. var t antlr.RuleContext
  7105. j := 0
  7106. for _, ctx := range s.GetChildren() {
  7107. if _, ok := ctx.(IColumn_nameContext); ok {
  7108. if j == i {
  7109. t = ctx.(antlr.RuleContext)
  7110. break
  7111. }
  7112. j++
  7113. }
  7114. }
  7115. if t == nil {
  7116. return nil
  7117. }
  7118. return t.(IColumn_nameContext)
  7119. }
  7120. func (s *Create_view_stmtContext) CLOSE_PAR() antlr.TerminalNode {
  7121. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  7122. }
  7123. func (s *Create_view_stmtContext) TEMP_() antlr.TerminalNode {
  7124. return s.GetToken(SQLiteParserTEMP_, 0)
  7125. }
  7126. func (s *Create_view_stmtContext) TEMPORARY_() antlr.TerminalNode {
  7127. return s.GetToken(SQLiteParserTEMPORARY_, 0)
  7128. }
  7129. func (s *Create_view_stmtContext) AllCOMMA() []antlr.TerminalNode {
  7130. return s.GetTokens(SQLiteParserCOMMA)
  7131. }
  7132. func (s *Create_view_stmtContext) COMMA(i int) antlr.TerminalNode {
  7133. return s.GetToken(SQLiteParserCOMMA, i)
  7134. }
  7135. func (s *Create_view_stmtContext) GetRuleContext() antlr.RuleContext {
  7136. return s
  7137. }
  7138. func (s *Create_view_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  7139. return antlr.TreesStringTree(s, ruleNames, recog)
  7140. }
  7141. func (s *Create_view_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  7142. if listenerT, ok := listener.(SQLiteParserListener); ok {
  7143. listenerT.EnterCreate_view_stmt(s)
  7144. }
  7145. }
  7146. func (s *Create_view_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  7147. if listenerT, ok := listener.(SQLiteParserListener); ok {
  7148. listenerT.ExitCreate_view_stmt(s)
  7149. }
  7150. }
  7151. func (p *SQLiteParser) Create_view_stmt() (localctx ICreate_view_stmtContext) {
  7152. this := p
  7153. _ = this
  7154. localctx = NewCreate_view_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  7155. p.EnterRule(localctx, 46, SQLiteParserRULE_create_view_stmt)
  7156. var _la int
  7157. defer func() {
  7158. p.ExitRule()
  7159. }()
  7160. defer func() {
  7161. if err := recover(); err != nil {
  7162. if v, ok := err.(antlr.RecognitionException); ok {
  7163. localctx.SetException(v)
  7164. p.GetErrorHandler().ReportError(p, v)
  7165. p.GetErrorHandler().Recover(p, v)
  7166. } else {
  7167. panic(err)
  7168. }
  7169. }
  7170. }()
  7171. p.EnterOuterAlt(localctx, 1)
  7172. {
  7173. p.SetState(712)
  7174. p.Match(SQLiteParserCREATE_)
  7175. }
  7176. p.SetState(714)
  7177. p.GetErrorHandler().Sync(p)
  7178. _la = p.GetTokenStream().LA(1)
  7179. if _la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_ {
  7180. {
  7181. p.SetState(713)
  7182. _la = p.GetTokenStream().LA(1)
  7183. if !(_la == SQLiteParserTEMP_ || _la == SQLiteParserTEMPORARY_) {
  7184. p.GetErrorHandler().RecoverInline(p)
  7185. } else {
  7186. p.GetErrorHandler().ReportMatch(p)
  7187. p.Consume()
  7188. }
  7189. }
  7190. }
  7191. {
  7192. p.SetState(716)
  7193. p.Match(SQLiteParserVIEW_)
  7194. }
  7195. p.SetState(720)
  7196. p.GetErrorHandler().Sync(p)
  7197. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 83, p.GetParserRuleContext()) == 1 {
  7198. {
  7199. p.SetState(717)
  7200. p.Match(SQLiteParserIF_)
  7201. }
  7202. {
  7203. p.SetState(718)
  7204. p.Match(SQLiteParserNOT_)
  7205. }
  7206. {
  7207. p.SetState(719)
  7208. p.Match(SQLiteParserEXISTS_)
  7209. }
  7210. }
  7211. p.SetState(725)
  7212. p.GetErrorHandler().Sync(p)
  7213. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 84, p.GetParserRuleContext()) == 1 {
  7214. {
  7215. p.SetState(722)
  7216. p.Schema_name()
  7217. }
  7218. {
  7219. p.SetState(723)
  7220. p.Match(SQLiteParserDOT)
  7221. }
  7222. }
  7223. {
  7224. p.SetState(727)
  7225. p.View_name()
  7226. }
  7227. p.SetState(739)
  7228. p.GetErrorHandler().Sync(p)
  7229. _la = p.GetTokenStream().LA(1)
  7230. if _la == SQLiteParserOPEN_PAR {
  7231. {
  7232. p.SetState(728)
  7233. p.Match(SQLiteParserOPEN_PAR)
  7234. }
  7235. {
  7236. p.SetState(729)
  7237. p.Column_name()
  7238. }
  7239. p.SetState(734)
  7240. p.GetErrorHandler().Sync(p)
  7241. _la = p.GetTokenStream().LA(1)
  7242. for _la == SQLiteParserCOMMA {
  7243. {
  7244. p.SetState(730)
  7245. p.Match(SQLiteParserCOMMA)
  7246. }
  7247. {
  7248. p.SetState(731)
  7249. p.Column_name()
  7250. }
  7251. p.SetState(736)
  7252. p.GetErrorHandler().Sync(p)
  7253. _la = p.GetTokenStream().LA(1)
  7254. }
  7255. {
  7256. p.SetState(737)
  7257. p.Match(SQLiteParserCLOSE_PAR)
  7258. }
  7259. }
  7260. {
  7261. p.SetState(741)
  7262. p.Match(SQLiteParserAS_)
  7263. }
  7264. {
  7265. p.SetState(742)
  7266. p.Select_stmt()
  7267. }
  7268. return localctx
  7269. }
  7270. // ICreate_virtual_table_stmtContext is an interface to support dynamic dispatch.
  7271. type ICreate_virtual_table_stmtContext interface {
  7272. antlr.ParserRuleContext
  7273. // GetParser returns the parser.
  7274. GetParser() antlr.Parser
  7275. // Getter signatures
  7276. CREATE_() antlr.TerminalNode
  7277. VIRTUAL_() antlr.TerminalNode
  7278. TABLE_() antlr.TerminalNode
  7279. Table_name() ITable_nameContext
  7280. USING_() antlr.TerminalNode
  7281. Module_name() IModule_nameContext
  7282. IF_() antlr.TerminalNode
  7283. NOT_() antlr.TerminalNode
  7284. EXISTS_() antlr.TerminalNode
  7285. Schema_name() ISchema_nameContext
  7286. DOT() antlr.TerminalNode
  7287. OPEN_PAR() antlr.TerminalNode
  7288. AllModule_argument() []IModule_argumentContext
  7289. Module_argument(i int) IModule_argumentContext
  7290. CLOSE_PAR() antlr.TerminalNode
  7291. AllCOMMA() []antlr.TerminalNode
  7292. COMMA(i int) antlr.TerminalNode
  7293. // IsCreate_virtual_table_stmtContext differentiates from other interfaces.
  7294. IsCreate_virtual_table_stmtContext()
  7295. }
  7296. type Create_virtual_table_stmtContext struct {
  7297. *antlr.BaseParserRuleContext
  7298. parser antlr.Parser
  7299. }
  7300. func NewEmptyCreate_virtual_table_stmtContext() *Create_virtual_table_stmtContext {
  7301. var p = new(Create_virtual_table_stmtContext)
  7302. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  7303. p.RuleIndex = SQLiteParserRULE_create_virtual_table_stmt
  7304. return p
  7305. }
  7306. func (*Create_virtual_table_stmtContext) IsCreate_virtual_table_stmtContext() {}
  7307. func NewCreate_virtual_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Create_virtual_table_stmtContext {
  7308. var p = new(Create_virtual_table_stmtContext)
  7309. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  7310. p.parser = parser
  7311. p.RuleIndex = SQLiteParserRULE_create_virtual_table_stmt
  7312. return p
  7313. }
  7314. func (s *Create_virtual_table_stmtContext) GetParser() antlr.Parser { return s.parser }
  7315. func (s *Create_virtual_table_stmtContext) CREATE_() antlr.TerminalNode {
  7316. return s.GetToken(SQLiteParserCREATE_, 0)
  7317. }
  7318. func (s *Create_virtual_table_stmtContext) VIRTUAL_() antlr.TerminalNode {
  7319. return s.GetToken(SQLiteParserVIRTUAL_, 0)
  7320. }
  7321. func (s *Create_virtual_table_stmtContext) TABLE_() antlr.TerminalNode {
  7322. return s.GetToken(SQLiteParserTABLE_, 0)
  7323. }
  7324. func (s *Create_virtual_table_stmtContext) Table_name() ITable_nameContext {
  7325. var t antlr.RuleContext
  7326. for _, ctx := range s.GetChildren() {
  7327. if _, ok := ctx.(ITable_nameContext); ok {
  7328. t = ctx.(antlr.RuleContext)
  7329. break
  7330. }
  7331. }
  7332. if t == nil {
  7333. return nil
  7334. }
  7335. return t.(ITable_nameContext)
  7336. }
  7337. func (s *Create_virtual_table_stmtContext) USING_() antlr.TerminalNode {
  7338. return s.GetToken(SQLiteParserUSING_, 0)
  7339. }
  7340. func (s *Create_virtual_table_stmtContext) Module_name() IModule_nameContext {
  7341. var t antlr.RuleContext
  7342. for _, ctx := range s.GetChildren() {
  7343. if _, ok := ctx.(IModule_nameContext); ok {
  7344. t = ctx.(antlr.RuleContext)
  7345. break
  7346. }
  7347. }
  7348. if t == nil {
  7349. return nil
  7350. }
  7351. return t.(IModule_nameContext)
  7352. }
  7353. func (s *Create_virtual_table_stmtContext) IF_() antlr.TerminalNode {
  7354. return s.GetToken(SQLiteParserIF_, 0)
  7355. }
  7356. func (s *Create_virtual_table_stmtContext) NOT_() antlr.TerminalNode {
  7357. return s.GetToken(SQLiteParserNOT_, 0)
  7358. }
  7359. func (s *Create_virtual_table_stmtContext) EXISTS_() antlr.TerminalNode {
  7360. return s.GetToken(SQLiteParserEXISTS_, 0)
  7361. }
  7362. func (s *Create_virtual_table_stmtContext) Schema_name() ISchema_nameContext {
  7363. var t antlr.RuleContext
  7364. for _, ctx := range s.GetChildren() {
  7365. if _, ok := ctx.(ISchema_nameContext); ok {
  7366. t = ctx.(antlr.RuleContext)
  7367. break
  7368. }
  7369. }
  7370. if t == nil {
  7371. return nil
  7372. }
  7373. return t.(ISchema_nameContext)
  7374. }
  7375. func (s *Create_virtual_table_stmtContext) DOT() antlr.TerminalNode {
  7376. return s.GetToken(SQLiteParserDOT, 0)
  7377. }
  7378. func (s *Create_virtual_table_stmtContext) OPEN_PAR() antlr.TerminalNode {
  7379. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  7380. }
  7381. func (s *Create_virtual_table_stmtContext) AllModule_argument() []IModule_argumentContext {
  7382. children := s.GetChildren()
  7383. len := 0
  7384. for _, ctx := range children {
  7385. if _, ok := ctx.(IModule_argumentContext); ok {
  7386. len++
  7387. }
  7388. }
  7389. tst := make([]IModule_argumentContext, len)
  7390. i := 0
  7391. for _, ctx := range children {
  7392. if t, ok := ctx.(IModule_argumentContext); ok {
  7393. tst[i] = t.(IModule_argumentContext)
  7394. i++
  7395. }
  7396. }
  7397. return tst
  7398. }
  7399. func (s *Create_virtual_table_stmtContext) Module_argument(i int) IModule_argumentContext {
  7400. var t antlr.RuleContext
  7401. j := 0
  7402. for _, ctx := range s.GetChildren() {
  7403. if _, ok := ctx.(IModule_argumentContext); ok {
  7404. if j == i {
  7405. t = ctx.(antlr.RuleContext)
  7406. break
  7407. }
  7408. j++
  7409. }
  7410. }
  7411. if t == nil {
  7412. return nil
  7413. }
  7414. return t.(IModule_argumentContext)
  7415. }
  7416. func (s *Create_virtual_table_stmtContext) CLOSE_PAR() antlr.TerminalNode {
  7417. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  7418. }
  7419. func (s *Create_virtual_table_stmtContext) AllCOMMA() []antlr.TerminalNode {
  7420. return s.GetTokens(SQLiteParserCOMMA)
  7421. }
  7422. func (s *Create_virtual_table_stmtContext) COMMA(i int) antlr.TerminalNode {
  7423. return s.GetToken(SQLiteParserCOMMA, i)
  7424. }
  7425. func (s *Create_virtual_table_stmtContext) GetRuleContext() antlr.RuleContext {
  7426. return s
  7427. }
  7428. func (s *Create_virtual_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  7429. return antlr.TreesStringTree(s, ruleNames, recog)
  7430. }
  7431. func (s *Create_virtual_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  7432. if listenerT, ok := listener.(SQLiteParserListener); ok {
  7433. listenerT.EnterCreate_virtual_table_stmt(s)
  7434. }
  7435. }
  7436. func (s *Create_virtual_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  7437. if listenerT, ok := listener.(SQLiteParserListener); ok {
  7438. listenerT.ExitCreate_virtual_table_stmt(s)
  7439. }
  7440. }
  7441. func (p *SQLiteParser) Create_virtual_table_stmt() (localctx ICreate_virtual_table_stmtContext) {
  7442. this := p
  7443. _ = this
  7444. localctx = NewCreate_virtual_table_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  7445. p.EnterRule(localctx, 48, SQLiteParserRULE_create_virtual_table_stmt)
  7446. var _la int
  7447. defer func() {
  7448. p.ExitRule()
  7449. }()
  7450. defer func() {
  7451. if err := recover(); err != nil {
  7452. if v, ok := err.(antlr.RecognitionException); ok {
  7453. localctx.SetException(v)
  7454. p.GetErrorHandler().ReportError(p, v)
  7455. p.GetErrorHandler().Recover(p, v)
  7456. } else {
  7457. panic(err)
  7458. }
  7459. }
  7460. }()
  7461. p.EnterOuterAlt(localctx, 1)
  7462. {
  7463. p.SetState(744)
  7464. p.Match(SQLiteParserCREATE_)
  7465. }
  7466. {
  7467. p.SetState(745)
  7468. p.Match(SQLiteParserVIRTUAL_)
  7469. }
  7470. {
  7471. p.SetState(746)
  7472. p.Match(SQLiteParserTABLE_)
  7473. }
  7474. p.SetState(750)
  7475. p.GetErrorHandler().Sync(p)
  7476. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 87, p.GetParserRuleContext()) == 1 {
  7477. {
  7478. p.SetState(747)
  7479. p.Match(SQLiteParserIF_)
  7480. }
  7481. {
  7482. p.SetState(748)
  7483. p.Match(SQLiteParserNOT_)
  7484. }
  7485. {
  7486. p.SetState(749)
  7487. p.Match(SQLiteParserEXISTS_)
  7488. }
  7489. }
  7490. p.SetState(755)
  7491. p.GetErrorHandler().Sync(p)
  7492. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 88, p.GetParserRuleContext()) == 1 {
  7493. {
  7494. p.SetState(752)
  7495. p.Schema_name()
  7496. }
  7497. {
  7498. p.SetState(753)
  7499. p.Match(SQLiteParserDOT)
  7500. }
  7501. }
  7502. {
  7503. p.SetState(757)
  7504. p.Table_name()
  7505. }
  7506. {
  7507. p.SetState(758)
  7508. p.Match(SQLiteParserUSING_)
  7509. }
  7510. {
  7511. p.SetState(759)
  7512. p.Module_name()
  7513. }
  7514. p.SetState(771)
  7515. p.GetErrorHandler().Sync(p)
  7516. _la = p.GetTokenStream().LA(1)
  7517. if _la == SQLiteParserOPEN_PAR {
  7518. {
  7519. p.SetState(760)
  7520. p.Match(SQLiteParserOPEN_PAR)
  7521. }
  7522. {
  7523. p.SetState(761)
  7524. p.Module_argument()
  7525. }
  7526. p.SetState(766)
  7527. p.GetErrorHandler().Sync(p)
  7528. _la = p.GetTokenStream().LA(1)
  7529. for _la == SQLiteParserCOMMA {
  7530. {
  7531. p.SetState(762)
  7532. p.Match(SQLiteParserCOMMA)
  7533. }
  7534. {
  7535. p.SetState(763)
  7536. p.Module_argument()
  7537. }
  7538. p.SetState(768)
  7539. p.GetErrorHandler().Sync(p)
  7540. _la = p.GetTokenStream().LA(1)
  7541. }
  7542. {
  7543. p.SetState(769)
  7544. p.Match(SQLiteParserCLOSE_PAR)
  7545. }
  7546. }
  7547. return localctx
  7548. }
  7549. // IWith_clauseContext is an interface to support dynamic dispatch.
  7550. type IWith_clauseContext interface {
  7551. antlr.ParserRuleContext
  7552. // GetParser returns the parser.
  7553. GetParser() antlr.Parser
  7554. // Getter signatures
  7555. WITH_() antlr.TerminalNode
  7556. AllCte_table_name() []ICte_table_nameContext
  7557. Cte_table_name(i int) ICte_table_nameContext
  7558. AllAS_() []antlr.TerminalNode
  7559. AS_(i int) antlr.TerminalNode
  7560. AllOPEN_PAR() []antlr.TerminalNode
  7561. OPEN_PAR(i int) antlr.TerminalNode
  7562. AllSelect_stmt() []ISelect_stmtContext
  7563. Select_stmt(i int) ISelect_stmtContext
  7564. AllCLOSE_PAR() []antlr.TerminalNode
  7565. CLOSE_PAR(i int) antlr.TerminalNode
  7566. RECURSIVE_() antlr.TerminalNode
  7567. AllCOMMA() []antlr.TerminalNode
  7568. COMMA(i int) antlr.TerminalNode
  7569. // IsWith_clauseContext differentiates from other interfaces.
  7570. IsWith_clauseContext()
  7571. }
  7572. type With_clauseContext struct {
  7573. *antlr.BaseParserRuleContext
  7574. parser antlr.Parser
  7575. }
  7576. func NewEmptyWith_clauseContext() *With_clauseContext {
  7577. var p = new(With_clauseContext)
  7578. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  7579. p.RuleIndex = SQLiteParserRULE_with_clause
  7580. return p
  7581. }
  7582. func (*With_clauseContext) IsWith_clauseContext() {}
  7583. func NewWith_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *With_clauseContext {
  7584. var p = new(With_clauseContext)
  7585. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  7586. p.parser = parser
  7587. p.RuleIndex = SQLiteParserRULE_with_clause
  7588. return p
  7589. }
  7590. func (s *With_clauseContext) GetParser() antlr.Parser { return s.parser }
  7591. func (s *With_clauseContext) WITH_() antlr.TerminalNode {
  7592. return s.GetToken(SQLiteParserWITH_, 0)
  7593. }
  7594. func (s *With_clauseContext) AllCte_table_name() []ICte_table_nameContext {
  7595. children := s.GetChildren()
  7596. len := 0
  7597. for _, ctx := range children {
  7598. if _, ok := ctx.(ICte_table_nameContext); ok {
  7599. len++
  7600. }
  7601. }
  7602. tst := make([]ICte_table_nameContext, len)
  7603. i := 0
  7604. for _, ctx := range children {
  7605. if t, ok := ctx.(ICte_table_nameContext); ok {
  7606. tst[i] = t.(ICte_table_nameContext)
  7607. i++
  7608. }
  7609. }
  7610. return tst
  7611. }
  7612. func (s *With_clauseContext) Cte_table_name(i int) ICte_table_nameContext {
  7613. var t antlr.RuleContext
  7614. j := 0
  7615. for _, ctx := range s.GetChildren() {
  7616. if _, ok := ctx.(ICte_table_nameContext); ok {
  7617. if j == i {
  7618. t = ctx.(antlr.RuleContext)
  7619. break
  7620. }
  7621. j++
  7622. }
  7623. }
  7624. if t == nil {
  7625. return nil
  7626. }
  7627. return t.(ICte_table_nameContext)
  7628. }
  7629. func (s *With_clauseContext) AllAS_() []antlr.TerminalNode {
  7630. return s.GetTokens(SQLiteParserAS_)
  7631. }
  7632. func (s *With_clauseContext) AS_(i int) antlr.TerminalNode {
  7633. return s.GetToken(SQLiteParserAS_, i)
  7634. }
  7635. func (s *With_clauseContext) AllOPEN_PAR() []antlr.TerminalNode {
  7636. return s.GetTokens(SQLiteParserOPEN_PAR)
  7637. }
  7638. func (s *With_clauseContext) OPEN_PAR(i int) antlr.TerminalNode {
  7639. return s.GetToken(SQLiteParserOPEN_PAR, i)
  7640. }
  7641. func (s *With_clauseContext) AllSelect_stmt() []ISelect_stmtContext {
  7642. children := s.GetChildren()
  7643. len := 0
  7644. for _, ctx := range children {
  7645. if _, ok := ctx.(ISelect_stmtContext); ok {
  7646. len++
  7647. }
  7648. }
  7649. tst := make([]ISelect_stmtContext, len)
  7650. i := 0
  7651. for _, ctx := range children {
  7652. if t, ok := ctx.(ISelect_stmtContext); ok {
  7653. tst[i] = t.(ISelect_stmtContext)
  7654. i++
  7655. }
  7656. }
  7657. return tst
  7658. }
  7659. func (s *With_clauseContext) Select_stmt(i int) ISelect_stmtContext {
  7660. var t antlr.RuleContext
  7661. j := 0
  7662. for _, ctx := range s.GetChildren() {
  7663. if _, ok := ctx.(ISelect_stmtContext); ok {
  7664. if j == i {
  7665. t = ctx.(antlr.RuleContext)
  7666. break
  7667. }
  7668. j++
  7669. }
  7670. }
  7671. if t == nil {
  7672. return nil
  7673. }
  7674. return t.(ISelect_stmtContext)
  7675. }
  7676. func (s *With_clauseContext) AllCLOSE_PAR() []antlr.TerminalNode {
  7677. return s.GetTokens(SQLiteParserCLOSE_PAR)
  7678. }
  7679. func (s *With_clauseContext) CLOSE_PAR(i int) antlr.TerminalNode {
  7680. return s.GetToken(SQLiteParserCLOSE_PAR, i)
  7681. }
  7682. func (s *With_clauseContext) RECURSIVE_() antlr.TerminalNode {
  7683. return s.GetToken(SQLiteParserRECURSIVE_, 0)
  7684. }
  7685. func (s *With_clauseContext) AllCOMMA() []antlr.TerminalNode {
  7686. return s.GetTokens(SQLiteParserCOMMA)
  7687. }
  7688. func (s *With_clauseContext) COMMA(i int) antlr.TerminalNode {
  7689. return s.GetToken(SQLiteParserCOMMA, i)
  7690. }
  7691. func (s *With_clauseContext) GetRuleContext() antlr.RuleContext {
  7692. return s
  7693. }
  7694. func (s *With_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  7695. return antlr.TreesStringTree(s, ruleNames, recog)
  7696. }
  7697. func (s *With_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
  7698. if listenerT, ok := listener.(SQLiteParserListener); ok {
  7699. listenerT.EnterWith_clause(s)
  7700. }
  7701. }
  7702. func (s *With_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
  7703. if listenerT, ok := listener.(SQLiteParserListener); ok {
  7704. listenerT.ExitWith_clause(s)
  7705. }
  7706. }
  7707. func (p *SQLiteParser) With_clause() (localctx IWith_clauseContext) {
  7708. this := p
  7709. _ = this
  7710. localctx = NewWith_clauseContext(p, p.GetParserRuleContext(), p.GetState())
  7711. p.EnterRule(localctx, 50, SQLiteParserRULE_with_clause)
  7712. var _la int
  7713. defer func() {
  7714. p.ExitRule()
  7715. }()
  7716. defer func() {
  7717. if err := recover(); err != nil {
  7718. if v, ok := err.(antlr.RecognitionException); ok {
  7719. localctx.SetException(v)
  7720. p.GetErrorHandler().ReportError(p, v)
  7721. p.GetErrorHandler().Recover(p, v)
  7722. } else {
  7723. panic(err)
  7724. }
  7725. }
  7726. }()
  7727. p.EnterOuterAlt(localctx, 1)
  7728. {
  7729. p.SetState(773)
  7730. p.Match(SQLiteParserWITH_)
  7731. }
  7732. p.SetState(775)
  7733. p.GetErrorHandler().Sync(p)
  7734. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 91, p.GetParserRuleContext()) == 1 {
  7735. {
  7736. p.SetState(774)
  7737. p.Match(SQLiteParserRECURSIVE_)
  7738. }
  7739. }
  7740. {
  7741. p.SetState(777)
  7742. p.Cte_table_name()
  7743. }
  7744. {
  7745. p.SetState(778)
  7746. p.Match(SQLiteParserAS_)
  7747. }
  7748. {
  7749. p.SetState(779)
  7750. p.Match(SQLiteParserOPEN_PAR)
  7751. }
  7752. {
  7753. p.SetState(780)
  7754. p.Select_stmt()
  7755. }
  7756. {
  7757. p.SetState(781)
  7758. p.Match(SQLiteParserCLOSE_PAR)
  7759. }
  7760. p.SetState(791)
  7761. p.GetErrorHandler().Sync(p)
  7762. _la = p.GetTokenStream().LA(1)
  7763. for _la == SQLiteParserCOMMA {
  7764. {
  7765. p.SetState(782)
  7766. p.Match(SQLiteParserCOMMA)
  7767. }
  7768. {
  7769. p.SetState(783)
  7770. p.Cte_table_name()
  7771. }
  7772. {
  7773. p.SetState(784)
  7774. p.Match(SQLiteParserAS_)
  7775. }
  7776. {
  7777. p.SetState(785)
  7778. p.Match(SQLiteParserOPEN_PAR)
  7779. }
  7780. {
  7781. p.SetState(786)
  7782. p.Select_stmt()
  7783. }
  7784. {
  7785. p.SetState(787)
  7786. p.Match(SQLiteParserCLOSE_PAR)
  7787. }
  7788. p.SetState(793)
  7789. p.GetErrorHandler().Sync(p)
  7790. _la = p.GetTokenStream().LA(1)
  7791. }
  7792. return localctx
  7793. }
  7794. // ICte_table_nameContext is an interface to support dynamic dispatch.
  7795. type ICte_table_nameContext interface {
  7796. antlr.ParserRuleContext
  7797. // GetParser returns the parser.
  7798. GetParser() antlr.Parser
  7799. // Getter signatures
  7800. Table_name() ITable_nameContext
  7801. OPEN_PAR() antlr.TerminalNode
  7802. AllColumn_name() []IColumn_nameContext
  7803. Column_name(i int) IColumn_nameContext
  7804. CLOSE_PAR() antlr.TerminalNode
  7805. AllCOMMA() []antlr.TerminalNode
  7806. COMMA(i int) antlr.TerminalNode
  7807. // IsCte_table_nameContext differentiates from other interfaces.
  7808. IsCte_table_nameContext()
  7809. }
  7810. type Cte_table_nameContext struct {
  7811. *antlr.BaseParserRuleContext
  7812. parser antlr.Parser
  7813. }
  7814. func NewEmptyCte_table_nameContext() *Cte_table_nameContext {
  7815. var p = new(Cte_table_nameContext)
  7816. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  7817. p.RuleIndex = SQLiteParserRULE_cte_table_name
  7818. return p
  7819. }
  7820. func (*Cte_table_nameContext) IsCte_table_nameContext() {}
  7821. func NewCte_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Cte_table_nameContext {
  7822. var p = new(Cte_table_nameContext)
  7823. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  7824. p.parser = parser
  7825. p.RuleIndex = SQLiteParserRULE_cte_table_name
  7826. return p
  7827. }
  7828. func (s *Cte_table_nameContext) GetParser() antlr.Parser { return s.parser }
  7829. func (s *Cte_table_nameContext) Table_name() ITable_nameContext {
  7830. var t antlr.RuleContext
  7831. for _, ctx := range s.GetChildren() {
  7832. if _, ok := ctx.(ITable_nameContext); ok {
  7833. t = ctx.(antlr.RuleContext)
  7834. break
  7835. }
  7836. }
  7837. if t == nil {
  7838. return nil
  7839. }
  7840. return t.(ITable_nameContext)
  7841. }
  7842. func (s *Cte_table_nameContext) OPEN_PAR() antlr.TerminalNode {
  7843. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  7844. }
  7845. func (s *Cte_table_nameContext) AllColumn_name() []IColumn_nameContext {
  7846. children := s.GetChildren()
  7847. len := 0
  7848. for _, ctx := range children {
  7849. if _, ok := ctx.(IColumn_nameContext); ok {
  7850. len++
  7851. }
  7852. }
  7853. tst := make([]IColumn_nameContext, len)
  7854. i := 0
  7855. for _, ctx := range children {
  7856. if t, ok := ctx.(IColumn_nameContext); ok {
  7857. tst[i] = t.(IColumn_nameContext)
  7858. i++
  7859. }
  7860. }
  7861. return tst
  7862. }
  7863. func (s *Cte_table_nameContext) Column_name(i int) IColumn_nameContext {
  7864. var t antlr.RuleContext
  7865. j := 0
  7866. for _, ctx := range s.GetChildren() {
  7867. if _, ok := ctx.(IColumn_nameContext); ok {
  7868. if j == i {
  7869. t = ctx.(antlr.RuleContext)
  7870. break
  7871. }
  7872. j++
  7873. }
  7874. }
  7875. if t == nil {
  7876. return nil
  7877. }
  7878. return t.(IColumn_nameContext)
  7879. }
  7880. func (s *Cte_table_nameContext) CLOSE_PAR() antlr.TerminalNode {
  7881. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  7882. }
  7883. func (s *Cte_table_nameContext) AllCOMMA() []antlr.TerminalNode {
  7884. return s.GetTokens(SQLiteParserCOMMA)
  7885. }
  7886. func (s *Cte_table_nameContext) COMMA(i int) antlr.TerminalNode {
  7887. return s.GetToken(SQLiteParserCOMMA, i)
  7888. }
  7889. func (s *Cte_table_nameContext) GetRuleContext() antlr.RuleContext {
  7890. return s
  7891. }
  7892. func (s *Cte_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  7893. return antlr.TreesStringTree(s, ruleNames, recog)
  7894. }
  7895. func (s *Cte_table_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  7896. if listenerT, ok := listener.(SQLiteParserListener); ok {
  7897. listenerT.EnterCte_table_name(s)
  7898. }
  7899. }
  7900. func (s *Cte_table_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  7901. if listenerT, ok := listener.(SQLiteParserListener); ok {
  7902. listenerT.ExitCte_table_name(s)
  7903. }
  7904. }
  7905. func (p *SQLiteParser) Cte_table_name() (localctx ICte_table_nameContext) {
  7906. this := p
  7907. _ = this
  7908. localctx = NewCte_table_nameContext(p, p.GetParserRuleContext(), p.GetState())
  7909. p.EnterRule(localctx, 52, SQLiteParserRULE_cte_table_name)
  7910. var _la int
  7911. defer func() {
  7912. p.ExitRule()
  7913. }()
  7914. defer func() {
  7915. if err := recover(); err != nil {
  7916. if v, ok := err.(antlr.RecognitionException); ok {
  7917. localctx.SetException(v)
  7918. p.GetErrorHandler().ReportError(p, v)
  7919. p.GetErrorHandler().Recover(p, v)
  7920. } else {
  7921. panic(err)
  7922. }
  7923. }
  7924. }()
  7925. p.EnterOuterAlt(localctx, 1)
  7926. {
  7927. p.SetState(794)
  7928. p.Table_name()
  7929. }
  7930. p.SetState(806)
  7931. p.GetErrorHandler().Sync(p)
  7932. _la = p.GetTokenStream().LA(1)
  7933. if _la == SQLiteParserOPEN_PAR {
  7934. {
  7935. p.SetState(795)
  7936. p.Match(SQLiteParserOPEN_PAR)
  7937. }
  7938. {
  7939. p.SetState(796)
  7940. p.Column_name()
  7941. }
  7942. p.SetState(801)
  7943. p.GetErrorHandler().Sync(p)
  7944. _la = p.GetTokenStream().LA(1)
  7945. for _la == SQLiteParserCOMMA {
  7946. {
  7947. p.SetState(797)
  7948. p.Match(SQLiteParserCOMMA)
  7949. }
  7950. {
  7951. p.SetState(798)
  7952. p.Column_name()
  7953. }
  7954. p.SetState(803)
  7955. p.GetErrorHandler().Sync(p)
  7956. _la = p.GetTokenStream().LA(1)
  7957. }
  7958. {
  7959. p.SetState(804)
  7960. p.Match(SQLiteParserCLOSE_PAR)
  7961. }
  7962. }
  7963. return localctx
  7964. }
  7965. // IRecursive_cteContext is an interface to support dynamic dispatch.
  7966. type IRecursive_cteContext interface {
  7967. antlr.ParserRuleContext
  7968. // GetParser returns the parser.
  7969. GetParser() antlr.Parser
  7970. // Getter signatures
  7971. Cte_table_name() ICte_table_nameContext
  7972. AS_() antlr.TerminalNode
  7973. OPEN_PAR() antlr.TerminalNode
  7974. Initial_select() IInitial_selectContext
  7975. UNION_() antlr.TerminalNode
  7976. Recursive__select() IRecursive__selectContext
  7977. CLOSE_PAR() antlr.TerminalNode
  7978. ALL_() antlr.TerminalNode
  7979. // IsRecursive_cteContext differentiates from other interfaces.
  7980. IsRecursive_cteContext()
  7981. }
  7982. type Recursive_cteContext struct {
  7983. *antlr.BaseParserRuleContext
  7984. parser antlr.Parser
  7985. }
  7986. func NewEmptyRecursive_cteContext() *Recursive_cteContext {
  7987. var p = new(Recursive_cteContext)
  7988. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  7989. p.RuleIndex = SQLiteParserRULE_recursive_cte
  7990. return p
  7991. }
  7992. func (*Recursive_cteContext) IsRecursive_cteContext() {}
  7993. func NewRecursive_cteContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Recursive_cteContext {
  7994. var p = new(Recursive_cteContext)
  7995. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  7996. p.parser = parser
  7997. p.RuleIndex = SQLiteParserRULE_recursive_cte
  7998. return p
  7999. }
  8000. func (s *Recursive_cteContext) GetParser() antlr.Parser { return s.parser }
  8001. func (s *Recursive_cteContext) Cte_table_name() ICte_table_nameContext {
  8002. var t antlr.RuleContext
  8003. for _, ctx := range s.GetChildren() {
  8004. if _, ok := ctx.(ICte_table_nameContext); ok {
  8005. t = ctx.(antlr.RuleContext)
  8006. break
  8007. }
  8008. }
  8009. if t == nil {
  8010. return nil
  8011. }
  8012. return t.(ICte_table_nameContext)
  8013. }
  8014. func (s *Recursive_cteContext) AS_() antlr.TerminalNode {
  8015. return s.GetToken(SQLiteParserAS_, 0)
  8016. }
  8017. func (s *Recursive_cteContext) OPEN_PAR() antlr.TerminalNode {
  8018. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  8019. }
  8020. func (s *Recursive_cteContext) Initial_select() IInitial_selectContext {
  8021. var t antlr.RuleContext
  8022. for _, ctx := range s.GetChildren() {
  8023. if _, ok := ctx.(IInitial_selectContext); ok {
  8024. t = ctx.(antlr.RuleContext)
  8025. break
  8026. }
  8027. }
  8028. if t == nil {
  8029. return nil
  8030. }
  8031. return t.(IInitial_selectContext)
  8032. }
  8033. func (s *Recursive_cteContext) UNION_() antlr.TerminalNode {
  8034. return s.GetToken(SQLiteParserUNION_, 0)
  8035. }
  8036. func (s *Recursive_cteContext) Recursive__select() IRecursive__selectContext {
  8037. var t antlr.RuleContext
  8038. for _, ctx := range s.GetChildren() {
  8039. if _, ok := ctx.(IRecursive__selectContext); ok {
  8040. t = ctx.(antlr.RuleContext)
  8041. break
  8042. }
  8043. }
  8044. if t == nil {
  8045. return nil
  8046. }
  8047. return t.(IRecursive__selectContext)
  8048. }
  8049. func (s *Recursive_cteContext) CLOSE_PAR() antlr.TerminalNode {
  8050. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  8051. }
  8052. func (s *Recursive_cteContext) ALL_() antlr.TerminalNode {
  8053. return s.GetToken(SQLiteParserALL_, 0)
  8054. }
  8055. func (s *Recursive_cteContext) GetRuleContext() antlr.RuleContext {
  8056. return s
  8057. }
  8058. func (s *Recursive_cteContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  8059. return antlr.TreesStringTree(s, ruleNames, recog)
  8060. }
  8061. func (s *Recursive_cteContext) EnterRule(listener antlr.ParseTreeListener) {
  8062. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8063. listenerT.EnterRecursive_cte(s)
  8064. }
  8065. }
  8066. func (s *Recursive_cteContext) ExitRule(listener antlr.ParseTreeListener) {
  8067. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8068. listenerT.ExitRecursive_cte(s)
  8069. }
  8070. }
  8071. func (p *SQLiteParser) Recursive_cte() (localctx IRecursive_cteContext) {
  8072. this := p
  8073. _ = this
  8074. localctx = NewRecursive_cteContext(p, p.GetParserRuleContext(), p.GetState())
  8075. p.EnterRule(localctx, 54, SQLiteParserRULE_recursive_cte)
  8076. var _la int
  8077. defer func() {
  8078. p.ExitRule()
  8079. }()
  8080. defer func() {
  8081. if err := recover(); err != nil {
  8082. if v, ok := err.(antlr.RecognitionException); ok {
  8083. localctx.SetException(v)
  8084. p.GetErrorHandler().ReportError(p, v)
  8085. p.GetErrorHandler().Recover(p, v)
  8086. } else {
  8087. panic(err)
  8088. }
  8089. }
  8090. }()
  8091. p.EnterOuterAlt(localctx, 1)
  8092. {
  8093. p.SetState(808)
  8094. p.Cte_table_name()
  8095. }
  8096. {
  8097. p.SetState(809)
  8098. p.Match(SQLiteParserAS_)
  8099. }
  8100. {
  8101. p.SetState(810)
  8102. p.Match(SQLiteParserOPEN_PAR)
  8103. }
  8104. {
  8105. p.SetState(811)
  8106. p.Initial_select()
  8107. }
  8108. {
  8109. p.SetState(812)
  8110. p.Match(SQLiteParserUNION_)
  8111. }
  8112. p.SetState(814)
  8113. p.GetErrorHandler().Sync(p)
  8114. _la = p.GetTokenStream().LA(1)
  8115. if _la == SQLiteParserALL_ {
  8116. {
  8117. p.SetState(813)
  8118. p.Match(SQLiteParserALL_)
  8119. }
  8120. }
  8121. {
  8122. p.SetState(816)
  8123. p.Recursive__select()
  8124. }
  8125. {
  8126. p.SetState(817)
  8127. p.Match(SQLiteParserCLOSE_PAR)
  8128. }
  8129. return localctx
  8130. }
  8131. // ICommon_table_expressionContext is an interface to support dynamic dispatch.
  8132. type ICommon_table_expressionContext interface {
  8133. antlr.ParserRuleContext
  8134. // GetParser returns the parser.
  8135. GetParser() antlr.Parser
  8136. // Getter signatures
  8137. Table_name() ITable_nameContext
  8138. AS_() antlr.TerminalNode
  8139. AllOPEN_PAR() []antlr.TerminalNode
  8140. OPEN_PAR(i int) antlr.TerminalNode
  8141. Select_stmt() ISelect_stmtContext
  8142. AllCLOSE_PAR() []antlr.TerminalNode
  8143. CLOSE_PAR(i int) antlr.TerminalNode
  8144. AllColumn_name() []IColumn_nameContext
  8145. Column_name(i int) IColumn_nameContext
  8146. AllCOMMA() []antlr.TerminalNode
  8147. COMMA(i int) antlr.TerminalNode
  8148. // IsCommon_table_expressionContext differentiates from other interfaces.
  8149. IsCommon_table_expressionContext()
  8150. }
  8151. type Common_table_expressionContext struct {
  8152. *antlr.BaseParserRuleContext
  8153. parser antlr.Parser
  8154. }
  8155. func NewEmptyCommon_table_expressionContext() *Common_table_expressionContext {
  8156. var p = new(Common_table_expressionContext)
  8157. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  8158. p.RuleIndex = SQLiteParserRULE_common_table_expression
  8159. return p
  8160. }
  8161. func (*Common_table_expressionContext) IsCommon_table_expressionContext() {}
  8162. func NewCommon_table_expressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Common_table_expressionContext {
  8163. var p = new(Common_table_expressionContext)
  8164. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  8165. p.parser = parser
  8166. p.RuleIndex = SQLiteParserRULE_common_table_expression
  8167. return p
  8168. }
  8169. func (s *Common_table_expressionContext) GetParser() antlr.Parser { return s.parser }
  8170. func (s *Common_table_expressionContext) Table_name() ITable_nameContext {
  8171. var t antlr.RuleContext
  8172. for _, ctx := range s.GetChildren() {
  8173. if _, ok := ctx.(ITable_nameContext); ok {
  8174. t = ctx.(antlr.RuleContext)
  8175. break
  8176. }
  8177. }
  8178. if t == nil {
  8179. return nil
  8180. }
  8181. return t.(ITable_nameContext)
  8182. }
  8183. func (s *Common_table_expressionContext) AS_() antlr.TerminalNode {
  8184. return s.GetToken(SQLiteParserAS_, 0)
  8185. }
  8186. func (s *Common_table_expressionContext) AllOPEN_PAR() []antlr.TerminalNode {
  8187. return s.GetTokens(SQLiteParserOPEN_PAR)
  8188. }
  8189. func (s *Common_table_expressionContext) OPEN_PAR(i int) antlr.TerminalNode {
  8190. return s.GetToken(SQLiteParserOPEN_PAR, i)
  8191. }
  8192. func (s *Common_table_expressionContext) Select_stmt() ISelect_stmtContext {
  8193. var t antlr.RuleContext
  8194. for _, ctx := range s.GetChildren() {
  8195. if _, ok := ctx.(ISelect_stmtContext); ok {
  8196. t = ctx.(antlr.RuleContext)
  8197. break
  8198. }
  8199. }
  8200. if t == nil {
  8201. return nil
  8202. }
  8203. return t.(ISelect_stmtContext)
  8204. }
  8205. func (s *Common_table_expressionContext) AllCLOSE_PAR() []antlr.TerminalNode {
  8206. return s.GetTokens(SQLiteParserCLOSE_PAR)
  8207. }
  8208. func (s *Common_table_expressionContext) CLOSE_PAR(i int) antlr.TerminalNode {
  8209. return s.GetToken(SQLiteParserCLOSE_PAR, i)
  8210. }
  8211. func (s *Common_table_expressionContext) AllColumn_name() []IColumn_nameContext {
  8212. children := s.GetChildren()
  8213. len := 0
  8214. for _, ctx := range children {
  8215. if _, ok := ctx.(IColumn_nameContext); ok {
  8216. len++
  8217. }
  8218. }
  8219. tst := make([]IColumn_nameContext, len)
  8220. i := 0
  8221. for _, ctx := range children {
  8222. if t, ok := ctx.(IColumn_nameContext); ok {
  8223. tst[i] = t.(IColumn_nameContext)
  8224. i++
  8225. }
  8226. }
  8227. return tst
  8228. }
  8229. func (s *Common_table_expressionContext) Column_name(i int) IColumn_nameContext {
  8230. var t antlr.RuleContext
  8231. j := 0
  8232. for _, ctx := range s.GetChildren() {
  8233. if _, ok := ctx.(IColumn_nameContext); ok {
  8234. if j == i {
  8235. t = ctx.(antlr.RuleContext)
  8236. break
  8237. }
  8238. j++
  8239. }
  8240. }
  8241. if t == nil {
  8242. return nil
  8243. }
  8244. return t.(IColumn_nameContext)
  8245. }
  8246. func (s *Common_table_expressionContext) AllCOMMA() []antlr.TerminalNode {
  8247. return s.GetTokens(SQLiteParserCOMMA)
  8248. }
  8249. func (s *Common_table_expressionContext) COMMA(i int) antlr.TerminalNode {
  8250. return s.GetToken(SQLiteParserCOMMA, i)
  8251. }
  8252. func (s *Common_table_expressionContext) GetRuleContext() antlr.RuleContext {
  8253. return s
  8254. }
  8255. func (s *Common_table_expressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  8256. return antlr.TreesStringTree(s, ruleNames, recog)
  8257. }
  8258. func (s *Common_table_expressionContext) EnterRule(listener antlr.ParseTreeListener) {
  8259. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8260. listenerT.EnterCommon_table_expression(s)
  8261. }
  8262. }
  8263. func (s *Common_table_expressionContext) ExitRule(listener antlr.ParseTreeListener) {
  8264. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8265. listenerT.ExitCommon_table_expression(s)
  8266. }
  8267. }
  8268. func (p *SQLiteParser) Common_table_expression() (localctx ICommon_table_expressionContext) {
  8269. this := p
  8270. _ = this
  8271. localctx = NewCommon_table_expressionContext(p, p.GetParserRuleContext(), p.GetState())
  8272. p.EnterRule(localctx, 56, SQLiteParserRULE_common_table_expression)
  8273. var _la int
  8274. defer func() {
  8275. p.ExitRule()
  8276. }()
  8277. defer func() {
  8278. if err := recover(); err != nil {
  8279. if v, ok := err.(antlr.RecognitionException); ok {
  8280. localctx.SetException(v)
  8281. p.GetErrorHandler().ReportError(p, v)
  8282. p.GetErrorHandler().Recover(p, v)
  8283. } else {
  8284. panic(err)
  8285. }
  8286. }
  8287. }()
  8288. p.EnterOuterAlt(localctx, 1)
  8289. {
  8290. p.SetState(819)
  8291. p.Table_name()
  8292. }
  8293. p.SetState(831)
  8294. p.GetErrorHandler().Sync(p)
  8295. _la = p.GetTokenStream().LA(1)
  8296. if _la == SQLiteParserOPEN_PAR {
  8297. {
  8298. p.SetState(820)
  8299. p.Match(SQLiteParserOPEN_PAR)
  8300. }
  8301. {
  8302. p.SetState(821)
  8303. p.Column_name()
  8304. }
  8305. p.SetState(826)
  8306. p.GetErrorHandler().Sync(p)
  8307. _la = p.GetTokenStream().LA(1)
  8308. for _la == SQLiteParserCOMMA {
  8309. {
  8310. p.SetState(822)
  8311. p.Match(SQLiteParserCOMMA)
  8312. }
  8313. {
  8314. p.SetState(823)
  8315. p.Column_name()
  8316. }
  8317. p.SetState(828)
  8318. p.GetErrorHandler().Sync(p)
  8319. _la = p.GetTokenStream().LA(1)
  8320. }
  8321. {
  8322. p.SetState(829)
  8323. p.Match(SQLiteParserCLOSE_PAR)
  8324. }
  8325. }
  8326. {
  8327. p.SetState(833)
  8328. p.Match(SQLiteParserAS_)
  8329. }
  8330. {
  8331. p.SetState(834)
  8332. p.Match(SQLiteParserOPEN_PAR)
  8333. }
  8334. {
  8335. p.SetState(835)
  8336. p.Select_stmt()
  8337. }
  8338. {
  8339. p.SetState(836)
  8340. p.Match(SQLiteParserCLOSE_PAR)
  8341. }
  8342. return localctx
  8343. }
  8344. // IReturning_clauseContext is an interface to support dynamic dispatch.
  8345. type IReturning_clauseContext interface {
  8346. antlr.ParserRuleContext
  8347. // GetParser returns the parser.
  8348. GetParser() antlr.Parser
  8349. // Getter signatures
  8350. RETURNING_() antlr.TerminalNode
  8351. AllSTAR() []antlr.TerminalNode
  8352. STAR(i int) antlr.TerminalNode
  8353. AllExpr() []IExprContext
  8354. Expr(i int) IExprContext
  8355. AllCOMMA() []antlr.TerminalNode
  8356. COMMA(i int) antlr.TerminalNode
  8357. AllColumn_alias() []IColumn_aliasContext
  8358. Column_alias(i int) IColumn_aliasContext
  8359. AllAS_() []antlr.TerminalNode
  8360. AS_(i int) antlr.TerminalNode
  8361. // IsReturning_clauseContext differentiates from other interfaces.
  8362. IsReturning_clauseContext()
  8363. }
  8364. type Returning_clauseContext struct {
  8365. *antlr.BaseParserRuleContext
  8366. parser antlr.Parser
  8367. }
  8368. func NewEmptyReturning_clauseContext() *Returning_clauseContext {
  8369. var p = new(Returning_clauseContext)
  8370. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  8371. p.RuleIndex = SQLiteParserRULE_returning_clause
  8372. return p
  8373. }
  8374. func (*Returning_clauseContext) IsReturning_clauseContext() {}
  8375. func NewReturning_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Returning_clauseContext {
  8376. var p = new(Returning_clauseContext)
  8377. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  8378. p.parser = parser
  8379. p.RuleIndex = SQLiteParserRULE_returning_clause
  8380. return p
  8381. }
  8382. func (s *Returning_clauseContext) GetParser() antlr.Parser { return s.parser }
  8383. func (s *Returning_clauseContext) RETURNING_() antlr.TerminalNode {
  8384. return s.GetToken(SQLiteParserRETURNING_, 0)
  8385. }
  8386. func (s *Returning_clauseContext) AllSTAR() []antlr.TerminalNode {
  8387. return s.GetTokens(SQLiteParserSTAR)
  8388. }
  8389. func (s *Returning_clauseContext) STAR(i int) antlr.TerminalNode {
  8390. return s.GetToken(SQLiteParserSTAR, i)
  8391. }
  8392. func (s *Returning_clauseContext) AllExpr() []IExprContext {
  8393. children := s.GetChildren()
  8394. len := 0
  8395. for _, ctx := range children {
  8396. if _, ok := ctx.(IExprContext); ok {
  8397. len++
  8398. }
  8399. }
  8400. tst := make([]IExprContext, len)
  8401. i := 0
  8402. for _, ctx := range children {
  8403. if t, ok := ctx.(IExprContext); ok {
  8404. tst[i] = t.(IExprContext)
  8405. i++
  8406. }
  8407. }
  8408. return tst
  8409. }
  8410. func (s *Returning_clauseContext) Expr(i int) IExprContext {
  8411. var t antlr.RuleContext
  8412. j := 0
  8413. for _, ctx := range s.GetChildren() {
  8414. if _, ok := ctx.(IExprContext); ok {
  8415. if j == i {
  8416. t = ctx.(antlr.RuleContext)
  8417. break
  8418. }
  8419. j++
  8420. }
  8421. }
  8422. if t == nil {
  8423. return nil
  8424. }
  8425. return t.(IExprContext)
  8426. }
  8427. func (s *Returning_clauseContext) AllCOMMA() []antlr.TerminalNode {
  8428. return s.GetTokens(SQLiteParserCOMMA)
  8429. }
  8430. func (s *Returning_clauseContext) COMMA(i int) antlr.TerminalNode {
  8431. return s.GetToken(SQLiteParserCOMMA, i)
  8432. }
  8433. func (s *Returning_clauseContext) AllColumn_alias() []IColumn_aliasContext {
  8434. children := s.GetChildren()
  8435. len := 0
  8436. for _, ctx := range children {
  8437. if _, ok := ctx.(IColumn_aliasContext); ok {
  8438. len++
  8439. }
  8440. }
  8441. tst := make([]IColumn_aliasContext, len)
  8442. i := 0
  8443. for _, ctx := range children {
  8444. if t, ok := ctx.(IColumn_aliasContext); ok {
  8445. tst[i] = t.(IColumn_aliasContext)
  8446. i++
  8447. }
  8448. }
  8449. return tst
  8450. }
  8451. func (s *Returning_clauseContext) Column_alias(i int) IColumn_aliasContext {
  8452. var t antlr.RuleContext
  8453. j := 0
  8454. for _, ctx := range s.GetChildren() {
  8455. if _, ok := ctx.(IColumn_aliasContext); ok {
  8456. if j == i {
  8457. t = ctx.(antlr.RuleContext)
  8458. break
  8459. }
  8460. j++
  8461. }
  8462. }
  8463. if t == nil {
  8464. return nil
  8465. }
  8466. return t.(IColumn_aliasContext)
  8467. }
  8468. func (s *Returning_clauseContext) AllAS_() []antlr.TerminalNode {
  8469. return s.GetTokens(SQLiteParserAS_)
  8470. }
  8471. func (s *Returning_clauseContext) AS_(i int) antlr.TerminalNode {
  8472. return s.GetToken(SQLiteParserAS_, i)
  8473. }
  8474. func (s *Returning_clauseContext) GetRuleContext() antlr.RuleContext {
  8475. return s
  8476. }
  8477. func (s *Returning_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  8478. return antlr.TreesStringTree(s, ruleNames, recog)
  8479. }
  8480. func (s *Returning_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
  8481. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8482. listenerT.EnterReturning_clause(s)
  8483. }
  8484. }
  8485. func (s *Returning_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
  8486. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8487. listenerT.ExitReturning_clause(s)
  8488. }
  8489. }
  8490. func (p *SQLiteParser) Returning_clause() (localctx IReturning_clauseContext) {
  8491. this := p
  8492. _ = this
  8493. localctx = NewReturning_clauseContext(p, p.GetParserRuleContext(), p.GetState())
  8494. p.EnterRule(localctx, 58, SQLiteParserRULE_returning_clause)
  8495. var _la int
  8496. defer func() {
  8497. p.ExitRule()
  8498. }()
  8499. defer func() {
  8500. if err := recover(); err != nil {
  8501. if v, ok := err.(antlr.RecognitionException); ok {
  8502. localctx.SetException(v)
  8503. p.GetErrorHandler().ReportError(p, v)
  8504. p.GetErrorHandler().Recover(p, v)
  8505. } else {
  8506. panic(err)
  8507. }
  8508. }
  8509. }()
  8510. p.EnterOuterAlt(localctx, 1)
  8511. {
  8512. p.SetState(838)
  8513. p.Match(SQLiteParserRETURNING_)
  8514. }
  8515. p.SetState(847)
  8516. p.GetErrorHandler().Sync(p)
  8517. switch p.GetTokenStream().LA(1) {
  8518. case SQLiteParserSTAR:
  8519. {
  8520. p.SetState(839)
  8521. p.Match(SQLiteParserSTAR)
  8522. }
  8523. case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL:
  8524. {
  8525. p.SetState(840)
  8526. p.expr(0)
  8527. }
  8528. p.SetState(845)
  8529. p.GetErrorHandler().Sync(p)
  8530. _la = p.GetTokenStream().LA(1)
  8531. if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL {
  8532. p.SetState(842)
  8533. p.GetErrorHandler().Sync(p)
  8534. _la = p.GetTokenStream().LA(1)
  8535. if _la == SQLiteParserAS_ {
  8536. {
  8537. p.SetState(841)
  8538. p.Match(SQLiteParserAS_)
  8539. }
  8540. }
  8541. {
  8542. p.SetState(844)
  8543. p.Column_alias()
  8544. }
  8545. }
  8546. default:
  8547. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  8548. }
  8549. p.SetState(862)
  8550. p.GetErrorHandler().Sync(p)
  8551. _la = p.GetTokenStream().LA(1)
  8552. for _la == SQLiteParserCOMMA {
  8553. {
  8554. p.SetState(849)
  8555. p.Match(SQLiteParserCOMMA)
  8556. }
  8557. p.SetState(858)
  8558. p.GetErrorHandler().Sync(p)
  8559. switch p.GetTokenStream().LA(1) {
  8560. case SQLiteParserSTAR:
  8561. {
  8562. p.SetState(850)
  8563. p.Match(SQLiteParserSTAR)
  8564. }
  8565. case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL:
  8566. {
  8567. p.SetState(851)
  8568. p.expr(0)
  8569. }
  8570. p.SetState(856)
  8571. p.GetErrorHandler().Sync(p)
  8572. _la = p.GetTokenStream().LA(1)
  8573. if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL {
  8574. p.SetState(853)
  8575. p.GetErrorHandler().Sync(p)
  8576. _la = p.GetTokenStream().LA(1)
  8577. if _la == SQLiteParserAS_ {
  8578. {
  8579. p.SetState(852)
  8580. p.Match(SQLiteParserAS_)
  8581. }
  8582. }
  8583. {
  8584. p.SetState(855)
  8585. p.Column_alias()
  8586. }
  8587. }
  8588. default:
  8589. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  8590. }
  8591. p.SetState(864)
  8592. p.GetErrorHandler().Sync(p)
  8593. _la = p.GetTokenStream().LA(1)
  8594. }
  8595. return localctx
  8596. }
  8597. // IDelete_stmtContext is an interface to support dynamic dispatch.
  8598. type IDelete_stmtContext interface {
  8599. antlr.ParserRuleContext
  8600. // GetParser returns the parser.
  8601. GetParser() antlr.Parser
  8602. // Getter signatures
  8603. DELETE_() antlr.TerminalNode
  8604. FROM_() antlr.TerminalNode
  8605. Qualified_table_name() IQualified_table_nameContext
  8606. With_clause() IWith_clauseContext
  8607. WHERE_() antlr.TerminalNode
  8608. Expr() IExprContext
  8609. Returning_clause() IReturning_clauseContext
  8610. // IsDelete_stmtContext differentiates from other interfaces.
  8611. IsDelete_stmtContext()
  8612. }
  8613. type Delete_stmtContext struct {
  8614. *antlr.BaseParserRuleContext
  8615. parser antlr.Parser
  8616. }
  8617. func NewEmptyDelete_stmtContext() *Delete_stmtContext {
  8618. var p = new(Delete_stmtContext)
  8619. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  8620. p.RuleIndex = SQLiteParserRULE_delete_stmt
  8621. return p
  8622. }
  8623. func (*Delete_stmtContext) IsDelete_stmtContext() {}
  8624. func NewDelete_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Delete_stmtContext {
  8625. var p = new(Delete_stmtContext)
  8626. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  8627. p.parser = parser
  8628. p.RuleIndex = SQLiteParserRULE_delete_stmt
  8629. return p
  8630. }
  8631. func (s *Delete_stmtContext) GetParser() antlr.Parser { return s.parser }
  8632. func (s *Delete_stmtContext) DELETE_() antlr.TerminalNode {
  8633. return s.GetToken(SQLiteParserDELETE_, 0)
  8634. }
  8635. func (s *Delete_stmtContext) FROM_() antlr.TerminalNode {
  8636. return s.GetToken(SQLiteParserFROM_, 0)
  8637. }
  8638. func (s *Delete_stmtContext) Qualified_table_name() IQualified_table_nameContext {
  8639. var t antlr.RuleContext
  8640. for _, ctx := range s.GetChildren() {
  8641. if _, ok := ctx.(IQualified_table_nameContext); ok {
  8642. t = ctx.(antlr.RuleContext)
  8643. break
  8644. }
  8645. }
  8646. if t == nil {
  8647. return nil
  8648. }
  8649. return t.(IQualified_table_nameContext)
  8650. }
  8651. func (s *Delete_stmtContext) With_clause() IWith_clauseContext {
  8652. var t antlr.RuleContext
  8653. for _, ctx := range s.GetChildren() {
  8654. if _, ok := ctx.(IWith_clauseContext); ok {
  8655. t = ctx.(antlr.RuleContext)
  8656. break
  8657. }
  8658. }
  8659. if t == nil {
  8660. return nil
  8661. }
  8662. return t.(IWith_clauseContext)
  8663. }
  8664. func (s *Delete_stmtContext) WHERE_() antlr.TerminalNode {
  8665. return s.GetToken(SQLiteParserWHERE_, 0)
  8666. }
  8667. func (s *Delete_stmtContext) Expr() IExprContext {
  8668. var t antlr.RuleContext
  8669. for _, ctx := range s.GetChildren() {
  8670. if _, ok := ctx.(IExprContext); ok {
  8671. t = ctx.(antlr.RuleContext)
  8672. break
  8673. }
  8674. }
  8675. if t == nil {
  8676. return nil
  8677. }
  8678. return t.(IExprContext)
  8679. }
  8680. func (s *Delete_stmtContext) Returning_clause() IReturning_clauseContext {
  8681. var t antlr.RuleContext
  8682. for _, ctx := range s.GetChildren() {
  8683. if _, ok := ctx.(IReturning_clauseContext); ok {
  8684. t = ctx.(antlr.RuleContext)
  8685. break
  8686. }
  8687. }
  8688. if t == nil {
  8689. return nil
  8690. }
  8691. return t.(IReturning_clauseContext)
  8692. }
  8693. func (s *Delete_stmtContext) GetRuleContext() antlr.RuleContext {
  8694. return s
  8695. }
  8696. func (s *Delete_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  8697. return antlr.TreesStringTree(s, ruleNames, recog)
  8698. }
  8699. func (s *Delete_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  8700. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8701. listenerT.EnterDelete_stmt(s)
  8702. }
  8703. }
  8704. func (s *Delete_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  8705. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8706. listenerT.ExitDelete_stmt(s)
  8707. }
  8708. }
  8709. func (p *SQLiteParser) Delete_stmt() (localctx IDelete_stmtContext) {
  8710. this := p
  8711. _ = this
  8712. localctx = NewDelete_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  8713. p.EnterRule(localctx, 60, SQLiteParserRULE_delete_stmt)
  8714. var _la int
  8715. defer func() {
  8716. p.ExitRule()
  8717. }()
  8718. defer func() {
  8719. if err := recover(); err != nil {
  8720. if v, ok := err.(antlr.RecognitionException); ok {
  8721. localctx.SetException(v)
  8722. p.GetErrorHandler().ReportError(p, v)
  8723. p.GetErrorHandler().Recover(p, v)
  8724. } else {
  8725. panic(err)
  8726. }
  8727. }
  8728. }()
  8729. p.EnterOuterAlt(localctx, 1)
  8730. p.SetState(866)
  8731. p.GetErrorHandler().Sync(p)
  8732. _la = p.GetTokenStream().LA(1)
  8733. if _la == SQLiteParserWITH_ {
  8734. {
  8735. p.SetState(865)
  8736. p.With_clause()
  8737. }
  8738. }
  8739. {
  8740. p.SetState(868)
  8741. p.Match(SQLiteParserDELETE_)
  8742. }
  8743. {
  8744. p.SetState(869)
  8745. p.Match(SQLiteParserFROM_)
  8746. }
  8747. {
  8748. p.SetState(870)
  8749. p.Qualified_table_name()
  8750. }
  8751. p.SetState(873)
  8752. p.GetErrorHandler().Sync(p)
  8753. _la = p.GetTokenStream().LA(1)
  8754. if _la == SQLiteParserWHERE_ {
  8755. {
  8756. p.SetState(871)
  8757. p.Match(SQLiteParserWHERE_)
  8758. }
  8759. {
  8760. p.SetState(872)
  8761. p.expr(0)
  8762. }
  8763. }
  8764. p.SetState(876)
  8765. p.GetErrorHandler().Sync(p)
  8766. _la = p.GetTokenStream().LA(1)
  8767. if _la == SQLiteParserRETURNING_ {
  8768. {
  8769. p.SetState(875)
  8770. p.Returning_clause()
  8771. }
  8772. }
  8773. return localctx
  8774. }
  8775. // IDelete_stmt_limitedContext is an interface to support dynamic dispatch.
  8776. type IDelete_stmt_limitedContext interface {
  8777. antlr.ParserRuleContext
  8778. // GetParser returns the parser.
  8779. GetParser() antlr.Parser
  8780. // Getter signatures
  8781. DELETE_() antlr.TerminalNode
  8782. FROM_() antlr.TerminalNode
  8783. Qualified_table_name() IQualified_table_nameContext
  8784. With_clause() IWith_clauseContext
  8785. WHERE_() antlr.TerminalNode
  8786. Expr() IExprContext
  8787. Limit_stmt() ILimit_stmtContext
  8788. Returning_clause() IReturning_clauseContext
  8789. Order_by_stmt() IOrder_by_stmtContext
  8790. // IsDelete_stmt_limitedContext differentiates from other interfaces.
  8791. IsDelete_stmt_limitedContext()
  8792. }
  8793. type Delete_stmt_limitedContext struct {
  8794. *antlr.BaseParserRuleContext
  8795. parser antlr.Parser
  8796. }
  8797. func NewEmptyDelete_stmt_limitedContext() *Delete_stmt_limitedContext {
  8798. var p = new(Delete_stmt_limitedContext)
  8799. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  8800. p.RuleIndex = SQLiteParserRULE_delete_stmt_limited
  8801. return p
  8802. }
  8803. func (*Delete_stmt_limitedContext) IsDelete_stmt_limitedContext() {}
  8804. func NewDelete_stmt_limitedContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Delete_stmt_limitedContext {
  8805. var p = new(Delete_stmt_limitedContext)
  8806. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  8807. p.parser = parser
  8808. p.RuleIndex = SQLiteParserRULE_delete_stmt_limited
  8809. return p
  8810. }
  8811. func (s *Delete_stmt_limitedContext) GetParser() antlr.Parser { return s.parser }
  8812. func (s *Delete_stmt_limitedContext) DELETE_() antlr.TerminalNode {
  8813. return s.GetToken(SQLiteParserDELETE_, 0)
  8814. }
  8815. func (s *Delete_stmt_limitedContext) FROM_() antlr.TerminalNode {
  8816. return s.GetToken(SQLiteParserFROM_, 0)
  8817. }
  8818. func (s *Delete_stmt_limitedContext) Qualified_table_name() IQualified_table_nameContext {
  8819. var t antlr.RuleContext
  8820. for _, ctx := range s.GetChildren() {
  8821. if _, ok := ctx.(IQualified_table_nameContext); ok {
  8822. t = ctx.(antlr.RuleContext)
  8823. break
  8824. }
  8825. }
  8826. if t == nil {
  8827. return nil
  8828. }
  8829. return t.(IQualified_table_nameContext)
  8830. }
  8831. func (s *Delete_stmt_limitedContext) With_clause() IWith_clauseContext {
  8832. var t antlr.RuleContext
  8833. for _, ctx := range s.GetChildren() {
  8834. if _, ok := ctx.(IWith_clauseContext); ok {
  8835. t = ctx.(antlr.RuleContext)
  8836. break
  8837. }
  8838. }
  8839. if t == nil {
  8840. return nil
  8841. }
  8842. return t.(IWith_clauseContext)
  8843. }
  8844. func (s *Delete_stmt_limitedContext) WHERE_() antlr.TerminalNode {
  8845. return s.GetToken(SQLiteParserWHERE_, 0)
  8846. }
  8847. func (s *Delete_stmt_limitedContext) Expr() IExprContext {
  8848. var t antlr.RuleContext
  8849. for _, ctx := range s.GetChildren() {
  8850. if _, ok := ctx.(IExprContext); ok {
  8851. t = ctx.(antlr.RuleContext)
  8852. break
  8853. }
  8854. }
  8855. if t == nil {
  8856. return nil
  8857. }
  8858. return t.(IExprContext)
  8859. }
  8860. func (s *Delete_stmt_limitedContext) Limit_stmt() ILimit_stmtContext {
  8861. var t antlr.RuleContext
  8862. for _, ctx := range s.GetChildren() {
  8863. if _, ok := ctx.(ILimit_stmtContext); ok {
  8864. t = ctx.(antlr.RuleContext)
  8865. break
  8866. }
  8867. }
  8868. if t == nil {
  8869. return nil
  8870. }
  8871. return t.(ILimit_stmtContext)
  8872. }
  8873. func (s *Delete_stmt_limitedContext) Returning_clause() IReturning_clauseContext {
  8874. var t antlr.RuleContext
  8875. for _, ctx := range s.GetChildren() {
  8876. if _, ok := ctx.(IReturning_clauseContext); ok {
  8877. t = ctx.(antlr.RuleContext)
  8878. break
  8879. }
  8880. }
  8881. if t == nil {
  8882. return nil
  8883. }
  8884. return t.(IReturning_clauseContext)
  8885. }
  8886. func (s *Delete_stmt_limitedContext) Order_by_stmt() IOrder_by_stmtContext {
  8887. var t antlr.RuleContext
  8888. for _, ctx := range s.GetChildren() {
  8889. if _, ok := ctx.(IOrder_by_stmtContext); ok {
  8890. t = ctx.(antlr.RuleContext)
  8891. break
  8892. }
  8893. }
  8894. if t == nil {
  8895. return nil
  8896. }
  8897. return t.(IOrder_by_stmtContext)
  8898. }
  8899. func (s *Delete_stmt_limitedContext) GetRuleContext() antlr.RuleContext {
  8900. return s
  8901. }
  8902. func (s *Delete_stmt_limitedContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  8903. return antlr.TreesStringTree(s, ruleNames, recog)
  8904. }
  8905. func (s *Delete_stmt_limitedContext) EnterRule(listener antlr.ParseTreeListener) {
  8906. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8907. listenerT.EnterDelete_stmt_limited(s)
  8908. }
  8909. }
  8910. func (s *Delete_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) {
  8911. if listenerT, ok := listener.(SQLiteParserListener); ok {
  8912. listenerT.ExitDelete_stmt_limited(s)
  8913. }
  8914. }
  8915. func (p *SQLiteParser) Delete_stmt_limited() (localctx IDelete_stmt_limitedContext) {
  8916. this := p
  8917. _ = this
  8918. localctx = NewDelete_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState())
  8919. p.EnterRule(localctx, 62, SQLiteParserRULE_delete_stmt_limited)
  8920. var _la int
  8921. defer func() {
  8922. p.ExitRule()
  8923. }()
  8924. defer func() {
  8925. if err := recover(); err != nil {
  8926. if v, ok := err.(antlr.RecognitionException); ok {
  8927. localctx.SetException(v)
  8928. p.GetErrorHandler().ReportError(p, v)
  8929. p.GetErrorHandler().Recover(p, v)
  8930. } else {
  8931. panic(err)
  8932. }
  8933. }
  8934. }()
  8935. p.EnterOuterAlt(localctx, 1)
  8936. p.SetState(879)
  8937. p.GetErrorHandler().Sync(p)
  8938. _la = p.GetTokenStream().LA(1)
  8939. if _la == SQLiteParserWITH_ {
  8940. {
  8941. p.SetState(878)
  8942. p.With_clause()
  8943. }
  8944. }
  8945. {
  8946. p.SetState(881)
  8947. p.Match(SQLiteParserDELETE_)
  8948. }
  8949. {
  8950. p.SetState(882)
  8951. p.Match(SQLiteParserFROM_)
  8952. }
  8953. {
  8954. p.SetState(883)
  8955. p.Qualified_table_name()
  8956. }
  8957. p.SetState(886)
  8958. p.GetErrorHandler().Sync(p)
  8959. _la = p.GetTokenStream().LA(1)
  8960. if _la == SQLiteParserWHERE_ {
  8961. {
  8962. p.SetState(884)
  8963. p.Match(SQLiteParserWHERE_)
  8964. }
  8965. {
  8966. p.SetState(885)
  8967. p.expr(0)
  8968. }
  8969. }
  8970. p.SetState(892)
  8971. p.GetErrorHandler().Sync(p)
  8972. _la = p.GetTokenStream().LA(1)
  8973. if _la == SQLiteParserLIMIT_ || _la == SQLiteParserORDER_ {
  8974. p.SetState(889)
  8975. p.GetErrorHandler().Sync(p)
  8976. _la = p.GetTokenStream().LA(1)
  8977. if _la == SQLiteParserORDER_ {
  8978. {
  8979. p.SetState(888)
  8980. p.Order_by_stmt()
  8981. }
  8982. }
  8983. {
  8984. p.SetState(891)
  8985. p.Limit_stmt()
  8986. }
  8987. }
  8988. p.SetState(895)
  8989. p.GetErrorHandler().Sync(p)
  8990. _la = p.GetTokenStream().LA(1)
  8991. if _la == SQLiteParserRETURNING_ {
  8992. {
  8993. p.SetState(894)
  8994. p.Returning_clause()
  8995. }
  8996. }
  8997. return localctx
  8998. }
  8999. // IDetach_stmtContext is an interface to support dynamic dispatch.
  9000. type IDetach_stmtContext interface {
  9001. antlr.ParserRuleContext
  9002. // GetParser returns the parser.
  9003. GetParser() antlr.Parser
  9004. // Getter signatures
  9005. DETACH_() antlr.TerminalNode
  9006. Schema_name() ISchema_nameContext
  9007. DATABASE_() antlr.TerminalNode
  9008. // IsDetach_stmtContext differentiates from other interfaces.
  9009. IsDetach_stmtContext()
  9010. }
  9011. type Detach_stmtContext struct {
  9012. *antlr.BaseParserRuleContext
  9013. parser antlr.Parser
  9014. }
  9015. func NewEmptyDetach_stmtContext() *Detach_stmtContext {
  9016. var p = new(Detach_stmtContext)
  9017. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  9018. p.RuleIndex = SQLiteParserRULE_detach_stmt
  9019. return p
  9020. }
  9021. func (*Detach_stmtContext) IsDetach_stmtContext() {}
  9022. func NewDetach_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Detach_stmtContext {
  9023. var p = new(Detach_stmtContext)
  9024. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  9025. p.parser = parser
  9026. p.RuleIndex = SQLiteParserRULE_detach_stmt
  9027. return p
  9028. }
  9029. func (s *Detach_stmtContext) GetParser() antlr.Parser { return s.parser }
  9030. func (s *Detach_stmtContext) DETACH_() antlr.TerminalNode {
  9031. return s.GetToken(SQLiteParserDETACH_, 0)
  9032. }
  9033. func (s *Detach_stmtContext) Schema_name() ISchema_nameContext {
  9034. var t antlr.RuleContext
  9035. for _, ctx := range s.GetChildren() {
  9036. if _, ok := ctx.(ISchema_nameContext); ok {
  9037. t = ctx.(antlr.RuleContext)
  9038. break
  9039. }
  9040. }
  9041. if t == nil {
  9042. return nil
  9043. }
  9044. return t.(ISchema_nameContext)
  9045. }
  9046. func (s *Detach_stmtContext) DATABASE_() antlr.TerminalNode {
  9047. return s.GetToken(SQLiteParserDATABASE_, 0)
  9048. }
  9049. func (s *Detach_stmtContext) GetRuleContext() antlr.RuleContext {
  9050. return s
  9051. }
  9052. func (s *Detach_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  9053. return antlr.TreesStringTree(s, ruleNames, recog)
  9054. }
  9055. func (s *Detach_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  9056. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9057. listenerT.EnterDetach_stmt(s)
  9058. }
  9059. }
  9060. func (s *Detach_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  9061. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9062. listenerT.ExitDetach_stmt(s)
  9063. }
  9064. }
  9065. func (p *SQLiteParser) Detach_stmt() (localctx IDetach_stmtContext) {
  9066. this := p
  9067. _ = this
  9068. localctx = NewDetach_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  9069. p.EnterRule(localctx, 64, SQLiteParserRULE_detach_stmt)
  9070. defer func() {
  9071. p.ExitRule()
  9072. }()
  9073. defer func() {
  9074. if err := recover(); err != nil {
  9075. if v, ok := err.(antlr.RecognitionException); ok {
  9076. localctx.SetException(v)
  9077. p.GetErrorHandler().ReportError(p, v)
  9078. p.GetErrorHandler().Recover(p, v)
  9079. } else {
  9080. panic(err)
  9081. }
  9082. }
  9083. }()
  9084. p.EnterOuterAlt(localctx, 1)
  9085. {
  9086. p.SetState(897)
  9087. p.Match(SQLiteParserDETACH_)
  9088. }
  9089. p.SetState(899)
  9090. p.GetErrorHandler().Sync(p)
  9091. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 113, p.GetParserRuleContext()) == 1 {
  9092. {
  9093. p.SetState(898)
  9094. p.Match(SQLiteParserDATABASE_)
  9095. }
  9096. }
  9097. {
  9098. p.SetState(901)
  9099. p.Schema_name()
  9100. }
  9101. return localctx
  9102. }
  9103. // IDrop_stmtContext is an interface to support dynamic dispatch.
  9104. type IDrop_stmtContext interface {
  9105. antlr.ParserRuleContext
  9106. // GetParser returns the parser.
  9107. GetParser() antlr.Parser
  9108. // GetObject returns the object token.
  9109. GetObject() antlr.Token
  9110. // SetObject sets the object token.
  9111. SetObject(antlr.Token)
  9112. // Getter signatures
  9113. DROP_() antlr.TerminalNode
  9114. Any_name() IAny_nameContext
  9115. INDEX_() antlr.TerminalNode
  9116. TABLE_() antlr.TerminalNode
  9117. TRIGGER_() antlr.TerminalNode
  9118. VIEW_() antlr.TerminalNode
  9119. IF_() antlr.TerminalNode
  9120. EXISTS_() antlr.TerminalNode
  9121. Schema_name() ISchema_nameContext
  9122. DOT() antlr.TerminalNode
  9123. // IsDrop_stmtContext differentiates from other interfaces.
  9124. IsDrop_stmtContext()
  9125. }
  9126. type Drop_stmtContext struct {
  9127. *antlr.BaseParserRuleContext
  9128. parser antlr.Parser
  9129. object antlr.Token
  9130. }
  9131. func NewEmptyDrop_stmtContext() *Drop_stmtContext {
  9132. var p = new(Drop_stmtContext)
  9133. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  9134. p.RuleIndex = SQLiteParserRULE_drop_stmt
  9135. return p
  9136. }
  9137. func (*Drop_stmtContext) IsDrop_stmtContext() {}
  9138. func NewDrop_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Drop_stmtContext {
  9139. var p = new(Drop_stmtContext)
  9140. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  9141. p.parser = parser
  9142. p.RuleIndex = SQLiteParserRULE_drop_stmt
  9143. return p
  9144. }
  9145. func (s *Drop_stmtContext) GetParser() antlr.Parser { return s.parser }
  9146. func (s *Drop_stmtContext) GetObject() antlr.Token { return s.object }
  9147. func (s *Drop_stmtContext) SetObject(v antlr.Token) { s.object = v }
  9148. func (s *Drop_stmtContext) DROP_() antlr.TerminalNode {
  9149. return s.GetToken(SQLiteParserDROP_, 0)
  9150. }
  9151. func (s *Drop_stmtContext) Any_name() IAny_nameContext {
  9152. var t antlr.RuleContext
  9153. for _, ctx := range s.GetChildren() {
  9154. if _, ok := ctx.(IAny_nameContext); ok {
  9155. t = ctx.(antlr.RuleContext)
  9156. break
  9157. }
  9158. }
  9159. if t == nil {
  9160. return nil
  9161. }
  9162. return t.(IAny_nameContext)
  9163. }
  9164. func (s *Drop_stmtContext) INDEX_() antlr.TerminalNode {
  9165. return s.GetToken(SQLiteParserINDEX_, 0)
  9166. }
  9167. func (s *Drop_stmtContext) TABLE_() antlr.TerminalNode {
  9168. return s.GetToken(SQLiteParserTABLE_, 0)
  9169. }
  9170. func (s *Drop_stmtContext) TRIGGER_() antlr.TerminalNode {
  9171. return s.GetToken(SQLiteParserTRIGGER_, 0)
  9172. }
  9173. func (s *Drop_stmtContext) VIEW_() antlr.TerminalNode {
  9174. return s.GetToken(SQLiteParserVIEW_, 0)
  9175. }
  9176. func (s *Drop_stmtContext) IF_() antlr.TerminalNode {
  9177. return s.GetToken(SQLiteParserIF_, 0)
  9178. }
  9179. func (s *Drop_stmtContext) EXISTS_() antlr.TerminalNode {
  9180. return s.GetToken(SQLiteParserEXISTS_, 0)
  9181. }
  9182. func (s *Drop_stmtContext) Schema_name() ISchema_nameContext {
  9183. var t antlr.RuleContext
  9184. for _, ctx := range s.GetChildren() {
  9185. if _, ok := ctx.(ISchema_nameContext); ok {
  9186. t = ctx.(antlr.RuleContext)
  9187. break
  9188. }
  9189. }
  9190. if t == nil {
  9191. return nil
  9192. }
  9193. return t.(ISchema_nameContext)
  9194. }
  9195. func (s *Drop_stmtContext) DOT() antlr.TerminalNode {
  9196. return s.GetToken(SQLiteParserDOT, 0)
  9197. }
  9198. func (s *Drop_stmtContext) GetRuleContext() antlr.RuleContext {
  9199. return s
  9200. }
  9201. func (s *Drop_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  9202. return antlr.TreesStringTree(s, ruleNames, recog)
  9203. }
  9204. func (s *Drop_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  9205. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9206. listenerT.EnterDrop_stmt(s)
  9207. }
  9208. }
  9209. func (s *Drop_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  9210. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9211. listenerT.ExitDrop_stmt(s)
  9212. }
  9213. }
  9214. func (p *SQLiteParser) Drop_stmt() (localctx IDrop_stmtContext) {
  9215. this := p
  9216. _ = this
  9217. localctx = NewDrop_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  9218. p.EnterRule(localctx, 66, SQLiteParserRULE_drop_stmt)
  9219. var _la int
  9220. defer func() {
  9221. p.ExitRule()
  9222. }()
  9223. defer func() {
  9224. if err := recover(); err != nil {
  9225. if v, ok := err.(antlr.RecognitionException); ok {
  9226. localctx.SetException(v)
  9227. p.GetErrorHandler().ReportError(p, v)
  9228. p.GetErrorHandler().Recover(p, v)
  9229. } else {
  9230. panic(err)
  9231. }
  9232. }
  9233. }()
  9234. p.EnterOuterAlt(localctx, 1)
  9235. {
  9236. p.SetState(903)
  9237. p.Match(SQLiteParserDROP_)
  9238. }
  9239. {
  9240. p.SetState(904)
  9241. var _lt = p.GetTokenStream().LT(1)
  9242. localctx.(*Drop_stmtContext).object = _lt
  9243. _la = p.GetTokenStream().LA(1)
  9244. if !((int64((_la-86)) & ^0x3f) == 0 && ((int64(1)<<(_la-86))&4648277765399773185) != 0) {
  9245. var _ri = p.GetErrorHandler().RecoverInline(p)
  9246. localctx.(*Drop_stmtContext).object = _ri
  9247. } else {
  9248. p.GetErrorHandler().ReportMatch(p)
  9249. p.Consume()
  9250. }
  9251. }
  9252. p.SetState(907)
  9253. p.GetErrorHandler().Sync(p)
  9254. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 114, p.GetParserRuleContext()) == 1 {
  9255. {
  9256. p.SetState(905)
  9257. p.Match(SQLiteParserIF_)
  9258. }
  9259. {
  9260. p.SetState(906)
  9261. p.Match(SQLiteParserEXISTS_)
  9262. }
  9263. }
  9264. p.SetState(912)
  9265. p.GetErrorHandler().Sync(p)
  9266. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 115, p.GetParserRuleContext()) == 1 {
  9267. {
  9268. p.SetState(909)
  9269. p.Schema_name()
  9270. }
  9271. {
  9272. p.SetState(910)
  9273. p.Match(SQLiteParserDOT)
  9274. }
  9275. }
  9276. {
  9277. p.SetState(914)
  9278. p.Any_name()
  9279. }
  9280. return localctx
  9281. }
  9282. // IExprContext is an interface to support dynamic dispatch.
  9283. type IExprContext interface {
  9284. antlr.ParserRuleContext
  9285. // GetParser returns the parser.
  9286. GetParser() antlr.Parser
  9287. // IsExprContext differentiates from other interfaces.
  9288. IsExprContext()
  9289. }
  9290. type ExprContext struct {
  9291. *antlr.BaseParserRuleContext
  9292. parser antlr.Parser
  9293. }
  9294. func NewEmptyExprContext() *ExprContext {
  9295. var p = new(ExprContext)
  9296. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  9297. p.RuleIndex = SQLiteParserRULE_expr
  9298. return p
  9299. }
  9300. func (*ExprContext) IsExprContext() {}
  9301. func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext {
  9302. var p = new(ExprContext)
  9303. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  9304. p.parser = parser
  9305. p.RuleIndex = SQLiteParserRULE_expr
  9306. return p
  9307. }
  9308. func (s *ExprContext) GetParser() antlr.Parser { return s.parser }
  9309. func (s *ExprContext) CopyFrom(ctx *ExprContext) {
  9310. s.BaseParserRuleContext.CopyFrom(ctx.BaseParserRuleContext)
  9311. }
  9312. func (s *ExprContext) GetRuleContext() antlr.RuleContext {
  9313. return s
  9314. }
  9315. func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  9316. return antlr.TreesStringTree(s, ruleNames, recog)
  9317. }
  9318. type Expr_caseContext struct {
  9319. *ExprContext
  9320. }
  9321. func NewExpr_caseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_caseContext {
  9322. var p = new(Expr_caseContext)
  9323. p.ExprContext = NewEmptyExprContext()
  9324. p.parser = parser
  9325. p.CopyFrom(ctx.(*ExprContext))
  9326. return p
  9327. }
  9328. func (s *Expr_caseContext) GetRuleContext() antlr.RuleContext {
  9329. return s
  9330. }
  9331. func (s *Expr_caseContext) CASE_() antlr.TerminalNode {
  9332. return s.GetToken(SQLiteParserCASE_, 0)
  9333. }
  9334. func (s *Expr_caseContext) END_() antlr.TerminalNode {
  9335. return s.GetToken(SQLiteParserEND_, 0)
  9336. }
  9337. func (s *Expr_caseContext) AllExpr() []IExprContext {
  9338. children := s.GetChildren()
  9339. len := 0
  9340. for _, ctx := range children {
  9341. if _, ok := ctx.(IExprContext); ok {
  9342. len++
  9343. }
  9344. }
  9345. tst := make([]IExprContext, len)
  9346. i := 0
  9347. for _, ctx := range children {
  9348. if t, ok := ctx.(IExprContext); ok {
  9349. tst[i] = t.(IExprContext)
  9350. i++
  9351. }
  9352. }
  9353. return tst
  9354. }
  9355. func (s *Expr_caseContext) Expr(i int) IExprContext {
  9356. var t antlr.RuleContext
  9357. j := 0
  9358. for _, ctx := range s.GetChildren() {
  9359. if _, ok := ctx.(IExprContext); ok {
  9360. if j == i {
  9361. t = ctx.(antlr.RuleContext)
  9362. break
  9363. }
  9364. j++
  9365. }
  9366. }
  9367. if t == nil {
  9368. return nil
  9369. }
  9370. return t.(IExprContext)
  9371. }
  9372. func (s *Expr_caseContext) AllWHEN_() []antlr.TerminalNode {
  9373. return s.GetTokens(SQLiteParserWHEN_)
  9374. }
  9375. func (s *Expr_caseContext) WHEN_(i int) antlr.TerminalNode {
  9376. return s.GetToken(SQLiteParserWHEN_, i)
  9377. }
  9378. func (s *Expr_caseContext) AllTHEN_() []antlr.TerminalNode {
  9379. return s.GetTokens(SQLiteParserTHEN_)
  9380. }
  9381. func (s *Expr_caseContext) THEN_(i int) antlr.TerminalNode {
  9382. return s.GetToken(SQLiteParserTHEN_, i)
  9383. }
  9384. func (s *Expr_caseContext) ELSE_() antlr.TerminalNode {
  9385. return s.GetToken(SQLiteParserELSE_, 0)
  9386. }
  9387. func (s *Expr_caseContext) EnterRule(listener antlr.ParseTreeListener) {
  9388. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9389. listenerT.EnterExpr_case(s)
  9390. }
  9391. }
  9392. func (s *Expr_caseContext) ExitRule(listener antlr.ParseTreeListener) {
  9393. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9394. listenerT.ExitExpr_case(s)
  9395. }
  9396. }
  9397. type Expr_raiseContext struct {
  9398. *ExprContext
  9399. }
  9400. func NewExpr_raiseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_raiseContext {
  9401. var p = new(Expr_raiseContext)
  9402. p.ExprContext = NewEmptyExprContext()
  9403. p.parser = parser
  9404. p.CopyFrom(ctx.(*ExprContext))
  9405. return p
  9406. }
  9407. func (s *Expr_raiseContext) GetRuleContext() antlr.RuleContext {
  9408. return s
  9409. }
  9410. func (s *Expr_raiseContext) Raise_function() IRaise_functionContext {
  9411. var t antlr.RuleContext
  9412. for _, ctx := range s.GetChildren() {
  9413. if _, ok := ctx.(IRaise_functionContext); ok {
  9414. t = ctx.(antlr.RuleContext)
  9415. break
  9416. }
  9417. }
  9418. if t == nil {
  9419. return nil
  9420. }
  9421. return t.(IRaise_functionContext)
  9422. }
  9423. func (s *Expr_raiseContext) EnterRule(listener antlr.ParseTreeListener) {
  9424. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9425. listenerT.EnterExpr_raise(s)
  9426. }
  9427. }
  9428. func (s *Expr_raiseContext) ExitRule(listener antlr.ParseTreeListener) {
  9429. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9430. listenerT.ExitExpr_raise(s)
  9431. }
  9432. }
  9433. type Expr_functionContext struct {
  9434. *ExprContext
  9435. }
  9436. func NewExpr_functionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_functionContext {
  9437. var p = new(Expr_functionContext)
  9438. p.ExprContext = NewEmptyExprContext()
  9439. p.parser = parser
  9440. p.CopyFrom(ctx.(*ExprContext))
  9441. return p
  9442. }
  9443. func (s *Expr_functionContext) GetRuleContext() antlr.RuleContext {
  9444. return s
  9445. }
  9446. func (s *Expr_functionContext) Qualified_function_name() IQualified_function_nameContext {
  9447. var t antlr.RuleContext
  9448. for _, ctx := range s.GetChildren() {
  9449. if _, ok := ctx.(IQualified_function_nameContext); ok {
  9450. t = ctx.(antlr.RuleContext)
  9451. break
  9452. }
  9453. }
  9454. if t == nil {
  9455. return nil
  9456. }
  9457. return t.(IQualified_function_nameContext)
  9458. }
  9459. func (s *Expr_functionContext) OPEN_PAR() antlr.TerminalNode {
  9460. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  9461. }
  9462. func (s *Expr_functionContext) CLOSE_PAR() antlr.TerminalNode {
  9463. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  9464. }
  9465. func (s *Expr_functionContext) STAR() antlr.TerminalNode {
  9466. return s.GetToken(SQLiteParserSTAR, 0)
  9467. }
  9468. func (s *Expr_functionContext) Filter_clause() IFilter_clauseContext {
  9469. var t antlr.RuleContext
  9470. for _, ctx := range s.GetChildren() {
  9471. if _, ok := ctx.(IFilter_clauseContext); ok {
  9472. t = ctx.(antlr.RuleContext)
  9473. break
  9474. }
  9475. }
  9476. if t == nil {
  9477. return nil
  9478. }
  9479. return t.(IFilter_clauseContext)
  9480. }
  9481. func (s *Expr_functionContext) Over_clause() IOver_clauseContext {
  9482. var t antlr.RuleContext
  9483. for _, ctx := range s.GetChildren() {
  9484. if _, ok := ctx.(IOver_clauseContext); ok {
  9485. t = ctx.(antlr.RuleContext)
  9486. break
  9487. }
  9488. }
  9489. if t == nil {
  9490. return nil
  9491. }
  9492. return t.(IOver_clauseContext)
  9493. }
  9494. func (s *Expr_functionContext) AllExpr() []IExprContext {
  9495. children := s.GetChildren()
  9496. len := 0
  9497. for _, ctx := range children {
  9498. if _, ok := ctx.(IExprContext); ok {
  9499. len++
  9500. }
  9501. }
  9502. tst := make([]IExprContext, len)
  9503. i := 0
  9504. for _, ctx := range children {
  9505. if t, ok := ctx.(IExprContext); ok {
  9506. tst[i] = t.(IExprContext)
  9507. i++
  9508. }
  9509. }
  9510. return tst
  9511. }
  9512. func (s *Expr_functionContext) Expr(i int) IExprContext {
  9513. var t antlr.RuleContext
  9514. j := 0
  9515. for _, ctx := range s.GetChildren() {
  9516. if _, ok := ctx.(IExprContext); ok {
  9517. if j == i {
  9518. t = ctx.(antlr.RuleContext)
  9519. break
  9520. }
  9521. j++
  9522. }
  9523. }
  9524. if t == nil {
  9525. return nil
  9526. }
  9527. return t.(IExprContext)
  9528. }
  9529. func (s *Expr_functionContext) DISTINCT_() antlr.TerminalNode {
  9530. return s.GetToken(SQLiteParserDISTINCT_, 0)
  9531. }
  9532. func (s *Expr_functionContext) AllCOMMA() []antlr.TerminalNode {
  9533. return s.GetTokens(SQLiteParserCOMMA)
  9534. }
  9535. func (s *Expr_functionContext) COMMA(i int) antlr.TerminalNode {
  9536. return s.GetToken(SQLiteParserCOMMA, i)
  9537. }
  9538. func (s *Expr_functionContext) EnterRule(listener antlr.ParseTreeListener) {
  9539. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9540. listenerT.EnterExpr_function(s)
  9541. }
  9542. }
  9543. func (s *Expr_functionContext) ExitRule(listener antlr.ParseTreeListener) {
  9544. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9545. listenerT.ExitExpr_function(s)
  9546. }
  9547. }
  9548. type Expr_comparisonContext struct {
  9549. *ExprContext
  9550. }
  9551. func NewExpr_comparisonContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_comparisonContext {
  9552. var p = new(Expr_comparisonContext)
  9553. p.ExprContext = NewEmptyExprContext()
  9554. p.parser = parser
  9555. p.CopyFrom(ctx.(*ExprContext))
  9556. return p
  9557. }
  9558. func (s *Expr_comparisonContext) GetRuleContext() antlr.RuleContext {
  9559. return s
  9560. }
  9561. func (s *Expr_comparisonContext) AllExpr() []IExprContext {
  9562. children := s.GetChildren()
  9563. len := 0
  9564. for _, ctx := range children {
  9565. if _, ok := ctx.(IExprContext); ok {
  9566. len++
  9567. }
  9568. }
  9569. tst := make([]IExprContext, len)
  9570. i := 0
  9571. for _, ctx := range children {
  9572. if t, ok := ctx.(IExprContext); ok {
  9573. tst[i] = t.(IExprContext)
  9574. i++
  9575. }
  9576. }
  9577. return tst
  9578. }
  9579. func (s *Expr_comparisonContext) Expr(i int) IExprContext {
  9580. var t antlr.RuleContext
  9581. j := 0
  9582. for _, ctx := range s.GetChildren() {
  9583. if _, ok := ctx.(IExprContext); ok {
  9584. if j == i {
  9585. t = ctx.(antlr.RuleContext)
  9586. break
  9587. }
  9588. j++
  9589. }
  9590. }
  9591. if t == nil {
  9592. return nil
  9593. }
  9594. return t.(IExprContext)
  9595. }
  9596. func (s *Expr_comparisonContext) LT2() antlr.TerminalNode {
  9597. return s.GetToken(SQLiteParserLT2, 0)
  9598. }
  9599. func (s *Expr_comparisonContext) GT2() antlr.TerminalNode {
  9600. return s.GetToken(SQLiteParserGT2, 0)
  9601. }
  9602. func (s *Expr_comparisonContext) AMP() antlr.TerminalNode {
  9603. return s.GetToken(SQLiteParserAMP, 0)
  9604. }
  9605. func (s *Expr_comparisonContext) PIPE() antlr.TerminalNode {
  9606. return s.GetToken(SQLiteParserPIPE, 0)
  9607. }
  9608. func (s *Expr_comparisonContext) LT() antlr.TerminalNode {
  9609. return s.GetToken(SQLiteParserLT, 0)
  9610. }
  9611. func (s *Expr_comparisonContext) LT_EQ() antlr.TerminalNode {
  9612. return s.GetToken(SQLiteParserLT_EQ, 0)
  9613. }
  9614. func (s *Expr_comparisonContext) GT() antlr.TerminalNode {
  9615. return s.GetToken(SQLiteParserGT, 0)
  9616. }
  9617. func (s *Expr_comparisonContext) GT_EQ() antlr.TerminalNode {
  9618. return s.GetToken(SQLiteParserGT_EQ, 0)
  9619. }
  9620. func (s *Expr_comparisonContext) ASSIGN() antlr.TerminalNode {
  9621. return s.GetToken(SQLiteParserASSIGN, 0)
  9622. }
  9623. func (s *Expr_comparisonContext) EQ() antlr.TerminalNode {
  9624. return s.GetToken(SQLiteParserEQ, 0)
  9625. }
  9626. func (s *Expr_comparisonContext) NOT_EQ1() antlr.TerminalNode {
  9627. return s.GetToken(SQLiteParserNOT_EQ1, 0)
  9628. }
  9629. func (s *Expr_comparisonContext) NOT_EQ2() antlr.TerminalNode {
  9630. return s.GetToken(SQLiteParserNOT_EQ2, 0)
  9631. }
  9632. func (s *Expr_comparisonContext) IS_() antlr.TerminalNode {
  9633. return s.GetToken(SQLiteParserIS_, 0)
  9634. }
  9635. func (s *Expr_comparisonContext) NOT_() antlr.TerminalNode {
  9636. return s.GetToken(SQLiteParserNOT_, 0)
  9637. }
  9638. func (s *Expr_comparisonContext) IN_() antlr.TerminalNode {
  9639. return s.GetToken(SQLiteParserIN_, 0)
  9640. }
  9641. func (s *Expr_comparisonContext) LIKE_() antlr.TerminalNode {
  9642. return s.GetToken(SQLiteParserLIKE_, 0)
  9643. }
  9644. func (s *Expr_comparisonContext) GLOB_() antlr.TerminalNode {
  9645. return s.GetToken(SQLiteParserGLOB_, 0)
  9646. }
  9647. func (s *Expr_comparisonContext) MATCH_() antlr.TerminalNode {
  9648. return s.GetToken(SQLiteParserMATCH_, 0)
  9649. }
  9650. func (s *Expr_comparisonContext) REGEXP_() antlr.TerminalNode {
  9651. return s.GetToken(SQLiteParserREGEXP_, 0)
  9652. }
  9653. func (s *Expr_comparisonContext) ESCAPE_() antlr.TerminalNode {
  9654. return s.GetToken(SQLiteParserESCAPE_, 0)
  9655. }
  9656. func (s *Expr_comparisonContext) EnterRule(listener antlr.ParseTreeListener) {
  9657. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9658. listenerT.EnterExpr_comparison(s)
  9659. }
  9660. }
  9661. func (s *Expr_comparisonContext) ExitRule(listener antlr.ParseTreeListener) {
  9662. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9663. listenerT.ExitExpr_comparison(s)
  9664. }
  9665. }
  9666. type Expr_boolContext struct {
  9667. *ExprContext
  9668. }
  9669. func NewExpr_boolContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_boolContext {
  9670. var p = new(Expr_boolContext)
  9671. p.ExprContext = NewEmptyExprContext()
  9672. p.parser = parser
  9673. p.CopyFrom(ctx.(*ExprContext))
  9674. return p
  9675. }
  9676. func (s *Expr_boolContext) GetRuleContext() antlr.RuleContext {
  9677. return s
  9678. }
  9679. func (s *Expr_boolContext) AllExpr() []IExprContext {
  9680. children := s.GetChildren()
  9681. len := 0
  9682. for _, ctx := range children {
  9683. if _, ok := ctx.(IExprContext); ok {
  9684. len++
  9685. }
  9686. }
  9687. tst := make([]IExprContext, len)
  9688. i := 0
  9689. for _, ctx := range children {
  9690. if t, ok := ctx.(IExprContext); ok {
  9691. tst[i] = t.(IExprContext)
  9692. i++
  9693. }
  9694. }
  9695. return tst
  9696. }
  9697. func (s *Expr_boolContext) Expr(i int) IExprContext {
  9698. var t antlr.RuleContext
  9699. j := 0
  9700. for _, ctx := range s.GetChildren() {
  9701. if _, ok := ctx.(IExprContext); ok {
  9702. if j == i {
  9703. t = ctx.(antlr.RuleContext)
  9704. break
  9705. }
  9706. j++
  9707. }
  9708. }
  9709. if t == nil {
  9710. return nil
  9711. }
  9712. return t.(IExprContext)
  9713. }
  9714. func (s *Expr_boolContext) AND_() antlr.TerminalNode {
  9715. return s.GetToken(SQLiteParserAND_, 0)
  9716. }
  9717. func (s *Expr_boolContext) OR_() antlr.TerminalNode {
  9718. return s.GetToken(SQLiteParserOR_, 0)
  9719. }
  9720. func (s *Expr_boolContext) EnterRule(listener antlr.ParseTreeListener) {
  9721. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9722. listenerT.EnterExpr_bool(s)
  9723. }
  9724. }
  9725. func (s *Expr_boolContext) ExitRule(listener antlr.ParseTreeListener) {
  9726. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9727. listenerT.ExitExpr_bool(s)
  9728. }
  9729. }
  9730. type Expr_binaryContext struct {
  9731. *ExprContext
  9732. }
  9733. func NewExpr_binaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_binaryContext {
  9734. var p = new(Expr_binaryContext)
  9735. p.ExprContext = NewEmptyExprContext()
  9736. p.parser = parser
  9737. p.CopyFrom(ctx.(*ExprContext))
  9738. return p
  9739. }
  9740. func (s *Expr_binaryContext) GetRuleContext() antlr.RuleContext {
  9741. return s
  9742. }
  9743. func (s *Expr_binaryContext) AllExpr() []IExprContext {
  9744. children := s.GetChildren()
  9745. len := 0
  9746. for _, ctx := range children {
  9747. if _, ok := ctx.(IExprContext); ok {
  9748. len++
  9749. }
  9750. }
  9751. tst := make([]IExprContext, len)
  9752. i := 0
  9753. for _, ctx := range children {
  9754. if t, ok := ctx.(IExprContext); ok {
  9755. tst[i] = t.(IExprContext)
  9756. i++
  9757. }
  9758. }
  9759. return tst
  9760. }
  9761. func (s *Expr_binaryContext) Expr(i int) IExprContext {
  9762. var t antlr.RuleContext
  9763. j := 0
  9764. for _, ctx := range s.GetChildren() {
  9765. if _, ok := ctx.(IExprContext); ok {
  9766. if j == i {
  9767. t = ctx.(antlr.RuleContext)
  9768. break
  9769. }
  9770. j++
  9771. }
  9772. }
  9773. if t == nil {
  9774. return nil
  9775. }
  9776. return t.(IExprContext)
  9777. }
  9778. func (s *Expr_binaryContext) PIPE2() antlr.TerminalNode {
  9779. return s.GetToken(SQLiteParserPIPE2, 0)
  9780. }
  9781. func (s *Expr_binaryContext) PTR() antlr.TerminalNode {
  9782. return s.GetToken(SQLiteParserPTR, 0)
  9783. }
  9784. func (s *Expr_binaryContext) PTR2() antlr.TerminalNode {
  9785. return s.GetToken(SQLiteParserPTR2, 0)
  9786. }
  9787. func (s *Expr_binaryContext) STAR() antlr.TerminalNode {
  9788. return s.GetToken(SQLiteParserSTAR, 0)
  9789. }
  9790. func (s *Expr_binaryContext) DIV() antlr.TerminalNode {
  9791. return s.GetToken(SQLiteParserDIV, 0)
  9792. }
  9793. func (s *Expr_binaryContext) MOD() antlr.TerminalNode {
  9794. return s.GetToken(SQLiteParserMOD, 0)
  9795. }
  9796. func (s *Expr_binaryContext) PLUS() antlr.TerminalNode {
  9797. return s.GetToken(SQLiteParserPLUS, 0)
  9798. }
  9799. func (s *Expr_binaryContext) MINUS() antlr.TerminalNode {
  9800. return s.GetToken(SQLiteParserMINUS, 0)
  9801. }
  9802. func (s *Expr_binaryContext) EnterRule(listener antlr.ParseTreeListener) {
  9803. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9804. listenerT.EnterExpr_binary(s)
  9805. }
  9806. }
  9807. func (s *Expr_binaryContext) ExitRule(listener antlr.ParseTreeListener) {
  9808. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9809. listenerT.ExitExpr_binary(s)
  9810. }
  9811. }
  9812. type Expr_literalContext struct {
  9813. *ExprContext
  9814. }
  9815. func NewExpr_literalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_literalContext {
  9816. var p = new(Expr_literalContext)
  9817. p.ExprContext = NewEmptyExprContext()
  9818. p.parser = parser
  9819. p.CopyFrom(ctx.(*ExprContext))
  9820. return p
  9821. }
  9822. func (s *Expr_literalContext) GetRuleContext() antlr.RuleContext {
  9823. return s
  9824. }
  9825. func (s *Expr_literalContext) Literal_value() ILiteral_valueContext {
  9826. var t antlr.RuleContext
  9827. for _, ctx := range s.GetChildren() {
  9828. if _, ok := ctx.(ILiteral_valueContext); ok {
  9829. t = ctx.(antlr.RuleContext)
  9830. break
  9831. }
  9832. }
  9833. if t == nil {
  9834. return nil
  9835. }
  9836. return t.(ILiteral_valueContext)
  9837. }
  9838. func (s *Expr_literalContext) EnterRule(listener antlr.ParseTreeListener) {
  9839. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9840. listenerT.EnterExpr_literal(s)
  9841. }
  9842. }
  9843. func (s *Expr_literalContext) ExitRule(listener antlr.ParseTreeListener) {
  9844. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9845. listenerT.ExitExpr_literal(s)
  9846. }
  9847. }
  9848. type Expr_castContext struct {
  9849. *ExprContext
  9850. }
  9851. func NewExpr_castContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_castContext {
  9852. var p = new(Expr_castContext)
  9853. p.ExprContext = NewEmptyExprContext()
  9854. p.parser = parser
  9855. p.CopyFrom(ctx.(*ExprContext))
  9856. return p
  9857. }
  9858. func (s *Expr_castContext) GetRuleContext() antlr.RuleContext {
  9859. return s
  9860. }
  9861. func (s *Expr_castContext) CAST_() antlr.TerminalNode {
  9862. return s.GetToken(SQLiteParserCAST_, 0)
  9863. }
  9864. func (s *Expr_castContext) OPEN_PAR() antlr.TerminalNode {
  9865. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  9866. }
  9867. func (s *Expr_castContext) Expr() IExprContext {
  9868. var t antlr.RuleContext
  9869. for _, ctx := range s.GetChildren() {
  9870. if _, ok := ctx.(IExprContext); ok {
  9871. t = ctx.(antlr.RuleContext)
  9872. break
  9873. }
  9874. }
  9875. if t == nil {
  9876. return nil
  9877. }
  9878. return t.(IExprContext)
  9879. }
  9880. func (s *Expr_castContext) AS_() antlr.TerminalNode {
  9881. return s.GetToken(SQLiteParserAS_, 0)
  9882. }
  9883. func (s *Expr_castContext) Type_name() IType_nameContext {
  9884. var t antlr.RuleContext
  9885. for _, ctx := range s.GetChildren() {
  9886. if _, ok := ctx.(IType_nameContext); ok {
  9887. t = ctx.(antlr.RuleContext)
  9888. break
  9889. }
  9890. }
  9891. if t == nil {
  9892. return nil
  9893. }
  9894. return t.(IType_nameContext)
  9895. }
  9896. func (s *Expr_castContext) CLOSE_PAR() antlr.TerminalNode {
  9897. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  9898. }
  9899. func (s *Expr_castContext) EnterRule(listener antlr.ParseTreeListener) {
  9900. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9901. listenerT.EnterExpr_cast(s)
  9902. }
  9903. }
  9904. func (s *Expr_castContext) ExitRule(listener antlr.ParseTreeListener) {
  9905. if listenerT, ok := listener.(SQLiteParserListener); ok {
  9906. listenerT.ExitExpr_cast(s)
  9907. }
  9908. }
  9909. type Expr_in_selectContext struct {
  9910. *ExprContext
  9911. }
  9912. func NewExpr_in_selectContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_in_selectContext {
  9913. var p = new(Expr_in_selectContext)
  9914. p.ExprContext = NewEmptyExprContext()
  9915. p.parser = parser
  9916. p.CopyFrom(ctx.(*ExprContext))
  9917. return p
  9918. }
  9919. func (s *Expr_in_selectContext) GetRuleContext() antlr.RuleContext {
  9920. return s
  9921. }
  9922. func (s *Expr_in_selectContext) OPEN_PAR() antlr.TerminalNode {
  9923. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  9924. }
  9925. func (s *Expr_in_selectContext) Select_stmt() ISelect_stmtContext {
  9926. var t antlr.RuleContext
  9927. for _, ctx := range s.GetChildren() {
  9928. if _, ok := ctx.(ISelect_stmtContext); ok {
  9929. t = ctx.(antlr.RuleContext)
  9930. break
  9931. }
  9932. }
  9933. if t == nil {
  9934. return nil
  9935. }
  9936. return t.(ISelect_stmtContext)
  9937. }
  9938. func (s *Expr_in_selectContext) CLOSE_PAR() antlr.TerminalNode {
  9939. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  9940. }
  9941. func (s *Expr_in_selectContext) EXISTS_() antlr.TerminalNode {
  9942. return s.GetToken(SQLiteParserEXISTS_, 0)
  9943. }
  9944. func (s *Expr_in_selectContext) NOT_() antlr.TerminalNode {
  9945. return s.GetToken(SQLiteParserNOT_, 0)
  9946. }
  9947. func (s *Expr_in_selectContext) AllExpr() []IExprContext {
  9948. children := s.GetChildren()
  9949. len := 0
  9950. for _, ctx := range children {
  9951. if _, ok := ctx.(IExprContext); ok {
  9952. len++
  9953. }
  9954. }
  9955. tst := make([]IExprContext, len)
  9956. i := 0
  9957. for _, ctx := range children {
  9958. if t, ok := ctx.(IExprContext); ok {
  9959. tst[i] = t.(IExprContext)
  9960. i++
  9961. }
  9962. }
  9963. return tst
  9964. }
  9965. func (s *Expr_in_selectContext) Expr(i int) IExprContext {
  9966. var t antlr.RuleContext
  9967. j := 0
  9968. for _, ctx := range s.GetChildren() {
  9969. if _, ok := ctx.(IExprContext); ok {
  9970. if j == i {
  9971. t = ctx.(antlr.RuleContext)
  9972. break
  9973. }
  9974. j++
  9975. }
  9976. }
  9977. if t == nil {
  9978. return nil
  9979. }
  9980. return t.(IExprContext)
  9981. }
  9982. func (s *Expr_in_selectContext) IN_() antlr.TerminalNode {
  9983. return s.GetToken(SQLiteParserIN_, 0)
  9984. }
  9985. func (s *Expr_in_selectContext) Table_name() ITable_nameContext {
  9986. var t antlr.RuleContext
  9987. for _, ctx := range s.GetChildren() {
  9988. if _, ok := ctx.(ITable_nameContext); ok {
  9989. t = ctx.(antlr.RuleContext)
  9990. break
  9991. }
  9992. }
  9993. if t == nil {
  9994. return nil
  9995. }
  9996. return t.(ITable_nameContext)
  9997. }
  9998. func (s *Expr_in_selectContext) Table_function_name() ITable_function_nameContext {
  9999. var t antlr.RuleContext
  10000. for _, ctx := range s.GetChildren() {
  10001. if _, ok := ctx.(ITable_function_nameContext); ok {
  10002. t = ctx.(antlr.RuleContext)
  10003. break
  10004. }
  10005. }
  10006. if t == nil {
  10007. return nil
  10008. }
  10009. return t.(ITable_function_nameContext)
  10010. }
  10011. func (s *Expr_in_selectContext) Schema_name() ISchema_nameContext {
  10012. var t antlr.RuleContext
  10013. for _, ctx := range s.GetChildren() {
  10014. if _, ok := ctx.(ISchema_nameContext); ok {
  10015. t = ctx.(antlr.RuleContext)
  10016. break
  10017. }
  10018. }
  10019. if t == nil {
  10020. return nil
  10021. }
  10022. return t.(ISchema_nameContext)
  10023. }
  10024. func (s *Expr_in_selectContext) DOT() antlr.TerminalNode {
  10025. return s.GetToken(SQLiteParserDOT, 0)
  10026. }
  10027. func (s *Expr_in_selectContext) AllCOMMA() []antlr.TerminalNode {
  10028. return s.GetTokens(SQLiteParserCOMMA)
  10029. }
  10030. func (s *Expr_in_selectContext) COMMA(i int) antlr.TerminalNode {
  10031. return s.GetToken(SQLiteParserCOMMA, i)
  10032. }
  10033. func (s *Expr_in_selectContext) EnterRule(listener antlr.ParseTreeListener) {
  10034. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10035. listenerT.EnterExpr_in_select(s)
  10036. }
  10037. }
  10038. func (s *Expr_in_selectContext) ExitRule(listener antlr.ParseTreeListener) {
  10039. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10040. listenerT.ExitExpr_in_select(s)
  10041. }
  10042. }
  10043. type Expr_listContext struct {
  10044. *ExprContext
  10045. }
  10046. func NewExpr_listContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_listContext {
  10047. var p = new(Expr_listContext)
  10048. p.ExprContext = NewEmptyExprContext()
  10049. p.parser = parser
  10050. p.CopyFrom(ctx.(*ExprContext))
  10051. return p
  10052. }
  10053. func (s *Expr_listContext) GetRuleContext() antlr.RuleContext {
  10054. return s
  10055. }
  10056. func (s *Expr_listContext) OPEN_PAR() antlr.TerminalNode {
  10057. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  10058. }
  10059. func (s *Expr_listContext) AllExpr() []IExprContext {
  10060. children := s.GetChildren()
  10061. len := 0
  10062. for _, ctx := range children {
  10063. if _, ok := ctx.(IExprContext); ok {
  10064. len++
  10065. }
  10066. }
  10067. tst := make([]IExprContext, len)
  10068. i := 0
  10069. for _, ctx := range children {
  10070. if t, ok := ctx.(IExprContext); ok {
  10071. tst[i] = t.(IExprContext)
  10072. i++
  10073. }
  10074. }
  10075. return tst
  10076. }
  10077. func (s *Expr_listContext) Expr(i int) IExprContext {
  10078. var t antlr.RuleContext
  10079. j := 0
  10080. for _, ctx := range s.GetChildren() {
  10081. if _, ok := ctx.(IExprContext); ok {
  10082. if j == i {
  10083. t = ctx.(antlr.RuleContext)
  10084. break
  10085. }
  10086. j++
  10087. }
  10088. }
  10089. if t == nil {
  10090. return nil
  10091. }
  10092. return t.(IExprContext)
  10093. }
  10094. func (s *Expr_listContext) CLOSE_PAR() antlr.TerminalNode {
  10095. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  10096. }
  10097. func (s *Expr_listContext) AllCOMMA() []antlr.TerminalNode {
  10098. return s.GetTokens(SQLiteParserCOMMA)
  10099. }
  10100. func (s *Expr_listContext) COMMA(i int) antlr.TerminalNode {
  10101. return s.GetToken(SQLiteParserCOMMA, i)
  10102. }
  10103. func (s *Expr_listContext) EnterRule(listener antlr.ParseTreeListener) {
  10104. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10105. listenerT.EnterExpr_list(s)
  10106. }
  10107. }
  10108. func (s *Expr_listContext) ExitRule(listener antlr.ParseTreeListener) {
  10109. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10110. listenerT.ExitExpr_list(s)
  10111. }
  10112. }
  10113. type Expr_betweenContext struct {
  10114. *ExprContext
  10115. }
  10116. func NewExpr_betweenContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_betweenContext {
  10117. var p = new(Expr_betweenContext)
  10118. p.ExprContext = NewEmptyExprContext()
  10119. p.parser = parser
  10120. p.CopyFrom(ctx.(*ExprContext))
  10121. return p
  10122. }
  10123. func (s *Expr_betweenContext) GetRuleContext() antlr.RuleContext {
  10124. return s
  10125. }
  10126. func (s *Expr_betweenContext) AllExpr() []IExprContext {
  10127. children := s.GetChildren()
  10128. len := 0
  10129. for _, ctx := range children {
  10130. if _, ok := ctx.(IExprContext); ok {
  10131. len++
  10132. }
  10133. }
  10134. tst := make([]IExprContext, len)
  10135. i := 0
  10136. for _, ctx := range children {
  10137. if t, ok := ctx.(IExprContext); ok {
  10138. tst[i] = t.(IExprContext)
  10139. i++
  10140. }
  10141. }
  10142. return tst
  10143. }
  10144. func (s *Expr_betweenContext) Expr(i int) IExprContext {
  10145. var t antlr.RuleContext
  10146. j := 0
  10147. for _, ctx := range s.GetChildren() {
  10148. if _, ok := ctx.(IExprContext); ok {
  10149. if j == i {
  10150. t = ctx.(antlr.RuleContext)
  10151. break
  10152. }
  10153. j++
  10154. }
  10155. }
  10156. if t == nil {
  10157. return nil
  10158. }
  10159. return t.(IExprContext)
  10160. }
  10161. func (s *Expr_betweenContext) BETWEEN_() antlr.TerminalNode {
  10162. return s.GetToken(SQLiteParserBETWEEN_, 0)
  10163. }
  10164. func (s *Expr_betweenContext) AND_() antlr.TerminalNode {
  10165. return s.GetToken(SQLiteParserAND_, 0)
  10166. }
  10167. func (s *Expr_betweenContext) NOT_() antlr.TerminalNode {
  10168. return s.GetToken(SQLiteParserNOT_, 0)
  10169. }
  10170. func (s *Expr_betweenContext) EnterRule(listener antlr.ParseTreeListener) {
  10171. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10172. listenerT.EnterExpr_between(s)
  10173. }
  10174. }
  10175. func (s *Expr_betweenContext) ExitRule(listener antlr.ParseTreeListener) {
  10176. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10177. listenerT.ExitExpr_between(s)
  10178. }
  10179. }
  10180. type Expr_collateContext struct {
  10181. *ExprContext
  10182. }
  10183. func NewExpr_collateContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_collateContext {
  10184. var p = new(Expr_collateContext)
  10185. p.ExprContext = NewEmptyExprContext()
  10186. p.parser = parser
  10187. p.CopyFrom(ctx.(*ExprContext))
  10188. return p
  10189. }
  10190. func (s *Expr_collateContext) GetRuleContext() antlr.RuleContext {
  10191. return s
  10192. }
  10193. func (s *Expr_collateContext) Expr() IExprContext {
  10194. var t antlr.RuleContext
  10195. for _, ctx := range s.GetChildren() {
  10196. if _, ok := ctx.(IExprContext); ok {
  10197. t = ctx.(antlr.RuleContext)
  10198. break
  10199. }
  10200. }
  10201. if t == nil {
  10202. return nil
  10203. }
  10204. return t.(IExprContext)
  10205. }
  10206. func (s *Expr_collateContext) COLLATE_() antlr.TerminalNode {
  10207. return s.GetToken(SQLiteParserCOLLATE_, 0)
  10208. }
  10209. func (s *Expr_collateContext) Collation_name() ICollation_nameContext {
  10210. var t antlr.RuleContext
  10211. for _, ctx := range s.GetChildren() {
  10212. if _, ok := ctx.(ICollation_nameContext); ok {
  10213. t = ctx.(antlr.RuleContext)
  10214. break
  10215. }
  10216. }
  10217. if t == nil {
  10218. return nil
  10219. }
  10220. return t.(ICollation_nameContext)
  10221. }
  10222. func (s *Expr_collateContext) EnterRule(listener antlr.ParseTreeListener) {
  10223. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10224. listenerT.EnterExpr_collate(s)
  10225. }
  10226. }
  10227. func (s *Expr_collateContext) ExitRule(listener antlr.ParseTreeListener) {
  10228. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10229. listenerT.ExitExpr_collate(s)
  10230. }
  10231. }
  10232. type Expr_qualified_column_nameContext struct {
  10233. *ExprContext
  10234. }
  10235. func NewExpr_qualified_column_nameContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_qualified_column_nameContext {
  10236. var p = new(Expr_qualified_column_nameContext)
  10237. p.ExprContext = NewEmptyExprContext()
  10238. p.parser = parser
  10239. p.CopyFrom(ctx.(*ExprContext))
  10240. return p
  10241. }
  10242. func (s *Expr_qualified_column_nameContext) GetRuleContext() antlr.RuleContext {
  10243. return s
  10244. }
  10245. func (s *Expr_qualified_column_nameContext) Column_name() IColumn_nameContext {
  10246. var t antlr.RuleContext
  10247. for _, ctx := range s.GetChildren() {
  10248. if _, ok := ctx.(IColumn_nameContext); ok {
  10249. t = ctx.(antlr.RuleContext)
  10250. break
  10251. }
  10252. }
  10253. if t == nil {
  10254. return nil
  10255. }
  10256. return t.(IColumn_nameContext)
  10257. }
  10258. func (s *Expr_qualified_column_nameContext) Table_name() ITable_nameContext {
  10259. var t antlr.RuleContext
  10260. for _, ctx := range s.GetChildren() {
  10261. if _, ok := ctx.(ITable_nameContext); ok {
  10262. t = ctx.(antlr.RuleContext)
  10263. break
  10264. }
  10265. }
  10266. if t == nil {
  10267. return nil
  10268. }
  10269. return t.(ITable_nameContext)
  10270. }
  10271. func (s *Expr_qualified_column_nameContext) AllDOT() []antlr.TerminalNode {
  10272. return s.GetTokens(SQLiteParserDOT)
  10273. }
  10274. func (s *Expr_qualified_column_nameContext) DOT(i int) antlr.TerminalNode {
  10275. return s.GetToken(SQLiteParserDOT, i)
  10276. }
  10277. func (s *Expr_qualified_column_nameContext) Schema_name() ISchema_nameContext {
  10278. var t antlr.RuleContext
  10279. for _, ctx := range s.GetChildren() {
  10280. if _, ok := ctx.(ISchema_nameContext); ok {
  10281. t = ctx.(antlr.RuleContext)
  10282. break
  10283. }
  10284. }
  10285. if t == nil {
  10286. return nil
  10287. }
  10288. return t.(ISchema_nameContext)
  10289. }
  10290. func (s *Expr_qualified_column_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  10291. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10292. listenerT.EnterExpr_qualified_column_name(s)
  10293. }
  10294. }
  10295. func (s *Expr_qualified_column_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  10296. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10297. listenerT.ExitExpr_qualified_column_name(s)
  10298. }
  10299. }
  10300. type Expr_unaryContext struct {
  10301. *ExprContext
  10302. }
  10303. func NewExpr_unaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_unaryContext {
  10304. var p = new(Expr_unaryContext)
  10305. p.ExprContext = NewEmptyExprContext()
  10306. p.parser = parser
  10307. p.CopyFrom(ctx.(*ExprContext))
  10308. return p
  10309. }
  10310. func (s *Expr_unaryContext) GetRuleContext() antlr.RuleContext {
  10311. return s
  10312. }
  10313. func (s *Expr_unaryContext) Unary_operator() IUnary_operatorContext {
  10314. var t antlr.RuleContext
  10315. for _, ctx := range s.GetChildren() {
  10316. if _, ok := ctx.(IUnary_operatorContext); ok {
  10317. t = ctx.(antlr.RuleContext)
  10318. break
  10319. }
  10320. }
  10321. if t == nil {
  10322. return nil
  10323. }
  10324. return t.(IUnary_operatorContext)
  10325. }
  10326. func (s *Expr_unaryContext) Expr() IExprContext {
  10327. var t antlr.RuleContext
  10328. for _, ctx := range s.GetChildren() {
  10329. if _, ok := ctx.(IExprContext); ok {
  10330. t = ctx.(antlr.RuleContext)
  10331. break
  10332. }
  10333. }
  10334. if t == nil {
  10335. return nil
  10336. }
  10337. return t.(IExprContext)
  10338. }
  10339. func (s *Expr_unaryContext) EnterRule(listener antlr.ParseTreeListener) {
  10340. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10341. listenerT.EnterExpr_unary(s)
  10342. }
  10343. }
  10344. func (s *Expr_unaryContext) ExitRule(listener antlr.ParseTreeListener) {
  10345. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10346. listenerT.ExitExpr_unary(s)
  10347. }
  10348. }
  10349. type Expr_null_compContext struct {
  10350. *ExprContext
  10351. }
  10352. func NewExpr_null_compContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_null_compContext {
  10353. var p = new(Expr_null_compContext)
  10354. p.ExprContext = NewEmptyExprContext()
  10355. p.parser = parser
  10356. p.CopyFrom(ctx.(*ExprContext))
  10357. return p
  10358. }
  10359. func (s *Expr_null_compContext) GetRuleContext() antlr.RuleContext {
  10360. return s
  10361. }
  10362. func (s *Expr_null_compContext) Expr() IExprContext {
  10363. var t antlr.RuleContext
  10364. for _, ctx := range s.GetChildren() {
  10365. if _, ok := ctx.(IExprContext); ok {
  10366. t = ctx.(antlr.RuleContext)
  10367. break
  10368. }
  10369. }
  10370. if t == nil {
  10371. return nil
  10372. }
  10373. return t.(IExprContext)
  10374. }
  10375. func (s *Expr_null_compContext) ISNULL_() antlr.TerminalNode {
  10376. return s.GetToken(SQLiteParserISNULL_, 0)
  10377. }
  10378. func (s *Expr_null_compContext) NOTNULL_() antlr.TerminalNode {
  10379. return s.GetToken(SQLiteParserNOTNULL_, 0)
  10380. }
  10381. func (s *Expr_null_compContext) NOT_() antlr.TerminalNode {
  10382. return s.GetToken(SQLiteParserNOT_, 0)
  10383. }
  10384. func (s *Expr_null_compContext) NULL_() antlr.TerminalNode {
  10385. return s.GetToken(SQLiteParserNULL_, 0)
  10386. }
  10387. func (s *Expr_null_compContext) EnterRule(listener antlr.ParseTreeListener) {
  10388. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10389. listenerT.EnterExpr_null_comp(s)
  10390. }
  10391. }
  10392. func (s *Expr_null_compContext) ExitRule(listener antlr.ParseTreeListener) {
  10393. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10394. listenerT.ExitExpr_null_comp(s)
  10395. }
  10396. }
  10397. type Expr_bindContext struct {
  10398. *ExprContext
  10399. }
  10400. func NewExpr_bindContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *Expr_bindContext {
  10401. var p = new(Expr_bindContext)
  10402. p.ExprContext = NewEmptyExprContext()
  10403. p.parser = parser
  10404. p.CopyFrom(ctx.(*ExprContext))
  10405. return p
  10406. }
  10407. func (s *Expr_bindContext) GetRuleContext() antlr.RuleContext {
  10408. return s
  10409. }
  10410. func (s *Expr_bindContext) NUMBERED_BIND_PARAMETER() antlr.TerminalNode {
  10411. return s.GetToken(SQLiteParserNUMBERED_BIND_PARAMETER, 0)
  10412. }
  10413. func (s *Expr_bindContext) NAMED_BIND_PARAMETER() antlr.TerminalNode {
  10414. return s.GetToken(SQLiteParserNAMED_BIND_PARAMETER, 0)
  10415. }
  10416. func (s *Expr_bindContext) EnterRule(listener antlr.ParseTreeListener) {
  10417. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10418. listenerT.EnterExpr_bind(s)
  10419. }
  10420. }
  10421. func (s *Expr_bindContext) ExitRule(listener antlr.ParseTreeListener) {
  10422. if listenerT, ok := listener.(SQLiteParserListener); ok {
  10423. listenerT.ExitExpr_bind(s)
  10424. }
  10425. }
  10426. func (p *SQLiteParser) Expr() (localctx IExprContext) {
  10427. return p.expr(0)
  10428. }
  10429. func (p *SQLiteParser) expr(_p int) (localctx IExprContext) {
  10430. this := p
  10431. _ = this
  10432. var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
  10433. _parentState := p.GetState()
  10434. localctx = NewExprContext(p, p.GetParserRuleContext(), _parentState)
  10435. var _prevctx IExprContext = localctx
  10436. var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
  10437. _startState := 68
  10438. p.EnterRecursionRule(localctx, 68, SQLiteParserRULE_expr, _p)
  10439. var _la int
  10440. defer func() {
  10441. p.UnrollRecursionContexts(_parentctx)
  10442. }()
  10443. defer func() {
  10444. if err := recover(); err != nil {
  10445. if v, ok := err.(antlr.RecognitionException); ok {
  10446. localctx.SetException(v)
  10447. p.GetErrorHandler().ReportError(p, v)
  10448. p.GetErrorHandler().Recover(p, v)
  10449. } else {
  10450. panic(err)
  10451. }
  10452. }
  10453. }()
  10454. var _alt int
  10455. p.EnterOuterAlt(localctx, 1)
  10456. p.SetState(1005)
  10457. p.GetErrorHandler().Sync(p)
  10458. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 129, p.GetParserRuleContext()) {
  10459. case 1:
  10460. localctx = NewExpr_literalContext(p, localctx)
  10461. p.SetParserRuleContext(localctx)
  10462. _prevctx = localctx
  10463. {
  10464. p.SetState(917)
  10465. p.Literal_value()
  10466. }
  10467. case 2:
  10468. localctx = NewExpr_bindContext(p, localctx)
  10469. p.SetParserRuleContext(localctx)
  10470. _prevctx = localctx
  10471. {
  10472. p.SetState(918)
  10473. p.Match(SQLiteParserNUMBERED_BIND_PARAMETER)
  10474. }
  10475. case 3:
  10476. localctx = NewExpr_bindContext(p, localctx)
  10477. p.SetParserRuleContext(localctx)
  10478. _prevctx = localctx
  10479. {
  10480. p.SetState(919)
  10481. p.Match(SQLiteParserNAMED_BIND_PARAMETER)
  10482. }
  10483. case 4:
  10484. localctx = NewExpr_qualified_column_nameContext(p, localctx)
  10485. p.SetParserRuleContext(localctx)
  10486. _prevctx = localctx
  10487. p.SetState(928)
  10488. p.GetErrorHandler().Sync(p)
  10489. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 117, p.GetParserRuleContext()) == 1 {
  10490. p.SetState(923)
  10491. p.GetErrorHandler().Sync(p)
  10492. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 116, p.GetParserRuleContext()) == 1 {
  10493. {
  10494. p.SetState(920)
  10495. p.Schema_name()
  10496. }
  10497. {
  10498. p.SetState(921)
  10499. p.Match(SQLiteParserDOT)
  10500. }
  10501. }
  10502. {
  10503. p.SetState(925)
  10504. p.Table_name()
  10505. }
  10506. {
  10507. p.SetState(926)
  10508. p.Match(SQLiteParserDOT)
  10509. }
  10510. }
  10511. {
  10512. p.SetState(930)
  10513. p.Column_name()
  10514. }
  10515. case 5:
  10516. localctx = NewExpr_unaryContext(p, localctx)
  10517. p.SetParserRuleContext(localctx)
  10518. _prevctx = localctx
  10519. {
  10520. p.SetState(931)
  10521. p.Unary_operator()
  10522. }
  10523. {
  10524. p.SetState(932)
  10525. p.expr(21)
  10526. }
  10527. case 6:
  10528. localctx = NewExpr_functionContext(p, localctx)
  10529. p.SetParserRuleContext(localctx)
  10530. _prevctx = localctx
  10531. {
  10532. p.SetState(934)
  10533. p.Qualified_function_name()
  10534. }
  10535. {
  10536. p.SetState(935)
  10537. p.Match(SQLiteParserOPEN_PAR)
  10538. }
  10539. p.SetState(948)
  10540. p.GetErrorHandler().Sync(p)
  10541. switch p.GetTokenStream().LA(1) {
  10542. case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL:
  10543. p.SetState(937)
  10544. p.GetErrorHandler().Sync(p)
  10545. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 118, p.GetParserRuleContext()) == 1 {
  10546. {
  10547. p.SetState(936)
  10548. p.Match(SQLiteParserDISTINCT_)
  10549. }
  10550. }
  10551. {
  10552. p.SetState(939)
  10553. p.expr(0)
  10554. }
  10555. p.SetState(944)
  10556. p.GetErrorHandler().Sync(p)
  10557. _la = p.GetTokenStream().LA(1)
  10558. for _la == SQLiteParserCOMMA {
  10559. {
  10560. p.SetState(940)
  10561. p.Match(SQLiteParserCOMMA)
  10562. }
  10563. {
  10564. p.SetState(941)
  10565. p.expr(0)
  10566. }
  10567. p.SetState(946)
  10568. p.GetErrorHandler().Sync(p)
  10569. _la = p.GetTokenStream().LA(1)
  10570. }
  10571. case SQLiteParserSTAR:
  10572. {
  10573. p.SetState(947)
  10574. p.Match(SQLiteParserSTAR)
  10575. }
  10576. case SQLiteParserCLOSE_PAR:
  10577. default:
  10578. }
  10579. {
  10580. p.SetState(950)
  10581. p.Match(SQLiteParserCLOSE_PAR)
  10582. }
  10583. p.SetState(952)
  10584. p.GetErrorHandler().Sync(p)
  10585. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 121, p.GetParserRuleContext()) == 1 {
  10586. {
  10587. p.SetState(951)
  10588. p.Filter_clause()
  10589. }
  10590. }
  10591. p.SetState(955)
  10592. p.GetErrorHandler().Sync(p)
  10593. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 122, p.GetParserRuleContext()) == 1 {
  10594. {
  10595. p.SetState(954)
  10596. p.Over_clause()
  10597. }
  10598. }
  10599. case 7:
  10600. localctx = NewExpr_listContext(p, localctx)
  10601. p.SetParserRuleContext(localctx)
  10602. _prevctx = localctx
  10603. {
  10604. p.SetState(957)
  10605. p.Match(SQLiteParserOPEN_PAR)
  10606. }
  10607. {
  10608. p.SetState(958)
  10609. p.expr(0)
  10610. }
  10611. p.SetState(963)
  10612. p.GetErrorHandler().Sync(p)
  10613. _la = p.GetTokenStream().LA(1)
  10614. for _la == SQLiteParserCOMMA {
  10615. {
  10616. p.SetState(959)
  10617. p.Match(SQLiteParserCOMMA)
  10618. }
  10619. {
  10620. p.SetState(960)
  10621. p.expr(0)
  10622. }
  10623. p.SetState(965)
  10624. p.GetErrorHandler().Sync(p)
  10625. _la = p.GetTokenStream().LA(1)
  10626. }
  10627. {
  10628. p.SetState(966)
  10629. p.Match(SQLiteParserCLOSE_PAR)
  10630. }
  10631. case 8:
  10632. localctx = NewExpr_castContext(p, localctx)
  10633. p.SetParserRuleContext(localctx)
  10634. _prevctx = localctx
  10635. {
  10636. p.SetState(968)
  10637. p.Match(SQLiteParserCAST_)
  10638. }
  10639. {
  10640. p.SetState(969)
  10641. p.Match(SQLiteParserOPEN_PAR)
  10642. }
  10643. {
  10644. p.SetState(970)
  10645. p.expr(0)
  10646. }
  10647. {
  10648. p.SetState(971)
  10649. p.Match(SQLiteParserAS_)
  10650. }
  10651. {
  10652. p.SetState(972)
  10653. p.Type_name()
  10654. }
  10655. {
  10656. p.SetState(973)
  10657. p.Match(SQLiteParserCLOSE_PAR)
  10658. }
  10659. case 9:
  10660. localctx = NewExpr_in_selectContext(p, localctx)
  10661. p.SetParserRuleContext(localctx)
  10662. _prevctx = localctx
  10663. p.SetState(979)
  10664. p.GetErrorHandler().Sync(p)
  10665. _la = p.GetTokenStream().LA(1)
  10666. if _la == SQLiteParserEXISTS_ || _la == SQLiteParserNOT_ {
  10667. p.SetState(976)
  10668. p.GetErrorHandler().Sync(p)
  10669. _la = p.GetTokenStream().LA(1)
  10670. if _la == SQLiteParserNOT_ {
  10671. {
  10672. p.SetState(975)
  10673. p.Match(SQLiteParserNOT_)
  10674. }
  10675. }
  10676. {
  10677. p.SetState(978)
  10678. p.Match(SQLiteParserEXISTS_)
  10679. }
  10680. }
  10681. {
  10682. p.SetState(981)
  10683. p.Match(SQLiteParserOPEN_PAR)
  10684. }
  10685. {
  10686. p.SetState(982)
  10687. p.Select_stmt()
  10688. }
  10689. {
  10690. p.SetState(983)
  10691. p.Match(SQLiteParserCLOSE_PAR)
  10692. }
  10693. case 10:
  10694. localctx = NewExpr_caseContext(p, localctx)
  10695. p.SetParserRuleContext(localctx)
  10696. _prevctx = localctx
  10697. {
  10698. p.SetState(985)
  10699. p.Match(SQLiteParserCASE_)
  10700. }
  10701. p.SetState(987)
  10702. p.GetErrorHandler().Sync(p)
  10703. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 126, p.GetParserRuleContext()) == 1 {
  10704. {
  10705. p.SetState(986)
  10706. p.expr(0)
  10707. }
  10708. }
  10709. p.SetState(994)
  10710. p.GetErrorHandler().Sync(p)
  10711. _la = p.GetTokenStream().LA(1)
  10712. for ok := true; ok; ok = _la == SQLiteParserWHEN_ {
  10713. {
  10714. p.SetState(989)
  10715. p.Match(SQLiteParserWHEN_)
  10716. }
  10717. {
  10718. p.SetState(990)
  10719. p.expr(0)
  10720. }
  10721. {
  10722. p.SetState(991)
  10723. p.Match(SQLiteParserTHEN_)
  10724. }
  10725. {
  10726. p.SetState(992)
  10727. p.expr(0)
  10728. }
  10729. p.SetState(996)
  10730. p.GetErrorHandler().Sync(p)
  10731. _la = p.GetTokenStream().LA(1)
  10732. }
  10733. p.SetState(1000)
  10734. p.GetErrorHandler().Sync(p)
  10735. _la = p.GetTokenStream().LA(1)
  10736. if _la == SQLiteParserELSE_ {
  10737. {
  10738. p.SetState(998)
  10739. p.Match(SQLiteParserELSE_)
  10740. }
  10741. {
  10742. p.SetState(999)
  10743. p.expr(0)
  10744. }
  10745. }
  10746. {
  10747. p.SetState(1002)
  10748. p.Match(SQLiteParserEND_)
  10749. }
  10750. case 11:
  10751. localctx = NewExpr_raiseContext(p, localctx)
  10752. p.SetParserRuleContext(localctx)
  10753. _prevctx = localctx
  10754. {
  10755. p.SetState(1004)
  10756. p.Raise_function()
  10757. }
  10758. }
  10759. p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
  10760. p.SetState(1126)
  10761. p.GetErrorHandler().Sync(p)
  10762. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 145, p.GetParserRuleContext())
  10763. for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
  10764. if _alt == 1 {
  10765. if p.GetParseListeners() != nil {
  10766. p.TriggerExitRuleEvent()
  10767. }
  10768. _prevctx = localctx
  10769. p.SetState(1124)
  10770. p.GetErrorHandler().Sync(p)
  10771. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 144, p.GetParserRuleContext()) {
  10772. case 1:
  10773. localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState))
  10774. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  10775. p.SetState(1007)
  10776. if !(p.Precpred(p.GetParserRuleContext(), 20)) {
  10777. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 20)", ""))
  10778. }
  10779. {
  10780. p.SetState(1008)
  10781. p.Match(SQLiteParserPIPE2)
  10782. }
  10783. {
  10784. p.SetState(1009)
  10785. p.expr(21)
  10786. }
  10787. case 2:
  10788. localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState))
  10789. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  10790. p.SetState(1010)
  10791. if !(p.Precpred(p.GetParserRuleContext(), 19)) {
  10792. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 19)", ""))
  10793. }
  10794. {
  10795. p.SetState(1011)
  10796. _la = p.GetTokenStream().LA(1)
  10797. if !(_la == SQLiteParserPTR2 || _la == SQLiteParserPTR) {
  10798. p.GetErrorHandler().RecoverInline(p)
  10799. } else {
  10800. p.GetErrorHandler().ReportMatch(p)
  10801. p.Consume()
  10802. }
  10803. }
  10804. {
  10805. p.SetState(1012)
  10806. p.expr(20)
  10807. }
  10808. case 3:
  10809. localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState))
  10810. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  10811. p.SetState(1013)
  10812. if !(p.Precpred(p.GetParserRuleContext(), 18)) {
  10813. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 18)", ""))
  10814. }
  10815. {
  10816. p.SetState(1014)
  10817. _la = p.GetTokenStream().LA(1)
  10818. if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&49280) != 0) {
  10819. p.GetErrorHandler().RecoverInline(p)
  10820. } else {
  10821. p.GetErrorHandler().ReportMatch(p)
  10822. p.Consume()
  10823. }
  10824. }
  10825. {
  10826. p.SetState(1015)
  10827. p.expr(19)
  10828. }
  10829. case 4:
  10830. localctx = NewExpr_binaryContext(p, NewExprContext(p, _parentctx, _parentState))
  10831. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  10832. p.SetState(1016)
  10833. if !(p.Precpred(p.GetParserRuleContext(), 17)) {
  10834. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", ""))
  10835. }
  10836. {
  10837. p.SetState(1017)
  10838. _la = p.GetTokenStream().LA(1)
  10839. if !(_la == SQLiteParserPLUS || _la == SQLiteParserMINUS) {
  10840. p.GetErrorHandler().RecoverInline(p)
  10841. } else {
  10842. p.GetErrorHandler().ReportMatch(p)
  10843. p.Consume()
  10844. }
  10845. }
  10846. {
  10847. p.SetState(1018)
  10848. p.expr(18)
  10849. }
  10850. case 5:
  10851. localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState))
  10852. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  10853. p.SetState(1019)
  10854. if !(p.Precpred(p.GetParserRuleContext(), 16)) {
  10855. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", ""))
  10856. }
  10857. {
  10858. p.SetState(1020)
  10859. _la = p.GetTokenStream().LA(1)
  10860. if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&983040) != 0) {
  10861. p.GetErrorHandler().RecoverInline(p)
  10862. } else {
  10863. p.GetErrorHandler().ReportMatch(p)
  10864. p.Consume()
  10865. }
  10866. }
  10867. {
  10868. p.SetState(1021)
  10869. p.expr(17)
  10870. }
  10871. case 6:
  10872. localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState))
  10873. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  10874. p.SetState(1022)
  10875. if !(p.Precpred(p.GetParserRuleContext(), 15)) {
  10876. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 15)", ""))
  10877. }
  10878. {
  10879. p.SetState(1023)
  10880. _la = p.GetTokenStream().LA(1)
  10881. if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&15728640) != 0) {
  10882. p.GetErrorHandler().RecoverInline(p)
  10883. } else {
  10884. p.GetErrorHandler().ReportMatch(p)
  10885. p.Consume()
  10886. }
  10887. }
  10888. {
  10889. p.SetState(1024)
  10890. p.expr(16)
  10891. }
  10892. case 7:
  10893. localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState))
  10894. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  10895. p.SetState(1025)
  10896. if !(p.Precpred(p.GetParserRuleContext(), 14)) {
  10897. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 14)", ""))
  10898. }
  10899. p.SetState(1041)
  10900. p.GetErrorHandler().Sync(p)
  10901. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 131, p.GetParserRuleContext()) {
  10902. case 1:
  10903. {
  10904. p.SetState(1026)
  10905. p.Match(SQLiteParserASSIGN)
  10906. }
  10907. case 2:
  10908. {
  10909. p.SetState(1027)
  10910. p.Match(SQLiteParserEQ)
  10911. }
  10912. case 3:
  10913. {
  10914. p.SetState(1028)
  10915. p.Match(SQLiteParserNOT_EQ1)
  10916. }
  10917. case 4:
  10918. {
  10919. p.SetState(1029)
  10920. p.Match(SQLiteParserNOT_EQ2)
  10921. }
  10922. case 5:
  10923. {
  10924. p.SetState(1030)
  10925. p.Match(SQLiteParserIS_)
  10926. }
  10927. case 6:
  10928. {
  10929. p.SetState(1031)
  10930. p.Match(SQLiteParserIS_)
  10931. }
  10932. {
  10933. p.SetState(1032)
  10934. p.Match(SQLiteParserNOT_)
  10935. }
  10936. case 7:
  10937. p.SetState(1034)
  10938. p.GetErrorHandler().Sync(p)
  10939. _la = p.GetTokenStream().LA(1)
  10940. if _la == SQLiteParserNOT_ {
  10941. {
  10942. p.SetState(1033)
  10943. p.Match(SQLiteParserNOT_)
  10944. }
  10945. }
  10946. {
  10947. p.SetState(1036)
  10948. p.Match(SQLiteParserIN_)
  10949. }
  10950. case 8:
  10951. {
  10952. p.SetState(1037)
  10953. p.Match(SQLiteParserLIKE_)
  10954. }
  10955. case 9:
  10956. {
  10957. p.SetState(1038)
  10958. p.Match(SQLiteParserGLOB_)
  10959. }
  10960. case 10:
  10961. {
  10962. p.SetState(1039)
  10963. p.Match(SQLiteParserMATCH_)
  10964. }
  10965. case 11:
  10966. {
  10967. p.SetState(1040)
  10968. p.Match(SQLiteParserREGEXP_)
  10969. }
  10970. }
  10971. {
  10972. p.SetState(1043)
  10973. p.expr(15)
  10974. }
  10975. case 8:
  10976. localctx = NewExpr_boolContext(p, NewExprContext(p, _parentctx, _parentState))
  10977. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  10978. p.SetState(1044)
  10979. if !(p.Precpred(p.GetParserRuleContext(), 12)) {
  10980. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 12)", ""))
  10981. }
  10982. {
  10983. p.SetState(1045)
  10984. p.Match(SQLiteParserAND_)
  10985. }
  10986. {
  10987. p.SetState(1046)
  10988. p.expr(13)
  10989. }
  10990. case 9:
  10991. localctx = NewExpr_boolContext(p, NewExprContext(p, _parentctx, _parentState))
  10992. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  10993. p.SetState(1047)
  10994. if !(p.Precpred(p.GetParserRuleContext(), 11)) {
  10995. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", ""))
  10996. }
  10997. {
  10998. p.SetState(1048)
  10999. p.Match(SQLiteParserOR_)
  11000. }
  11001. {
  11002. p.SetState(1049)
  11003. p.expr(12)
  11004. }
  11005. case 10:
  11006. localctx = NewExpr_betweenContext(p, NewExprContext(p, _parentctx, _parentState))
  11007. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  11008. p.SetState(1050)
  11009. if !(p.Precpred(p.GetParserRuleContext(), 4)) {
  11010. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", ""))
  11011. }
  11012. p.SetState(1052)
  11013. p.GetErrorHandler().Sync(p)
  11014. _la = p.GetTokenStream().LA(1)
  11015. if _la == SQLiteParserNOT_ {
  11016. {
  11017. p.SetState(1051)
  11018. p.Match(SQLiteParserNOT_)
  11019. }
  11020. }
  11021. {
  11022. p.SetState(1054)
  11023. p.Match(SQLiteParserBETWEEN_)
  11024. }
  11025. {
  11026. p.SetState(1055)
  11027. p.expr(0)
  11028. }
  11029. {
  11030. p.SetState(1056)
  11031. p.Match(SQLiteParserAND_)
  11032. }
  11033. {
  11034. p.SetState(1057)
  11035. p.expr(5)
  11036. }
  11037. case 11:
  11038. localctx = NewExpr_in_selectContext(p, NewExprContext(p, _parentctx, _parentState))
  11039. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  11040. p.SetState(1059)
  11041. if !(p.Precpred(p.GetParserRuleContext(), 13)) {
  11042. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 13)", ""))
  11043. }
  11044. p.SetState(1061)
  11045. p.GetErrorHandler().Sync(p)
  11046. _la = p.GetTokenStream().LA(1)
  11047. if _la == SQLiteParserNOT_ {
  11048. {
  11049. p.SetState(1060)
  11050. p.Match(SQLiteParserNOT_)
  11051. }
  11052. }
  11053. {
  11054. p.SetState(1063)
  11055. p.Match(SQLiteParserIN_)
  11056. }
  11057. p.SetState(1102)
  11058. p.GetErrorHandler().Sync(p)
  11059. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 140, p.GetParserRuleContext()) {
  11060. case 1:
  11061. {
  11062. p.SetState(1064)
  11063. p.Match(SQLiteParserOPEN_PAR)
  11064. }
  11065. p.SetState(1074)
  11066. p.GetErrorHandler().Sync(p)
  11067. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 135, p.GetParserRuleContext()) == 1 {
  11068. {
  11069. p.SetState(1065)
  11070. p.Select_stmt()
  11071. }
  11072. } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 135, p.GetParserRuleContext()) == 2 {
  11073. {
  11074. p.SetState(1066)
  11075. p.expr(0)
  11076. }
  11077. p.SetState(1071)
  11078. p.GetErrorHandler().Sync(p)
  11079. _la = p.GetTokenStream().LA(1)
  11080. for _la == SQLiteParserCOMMA {
  11081. {
  11082. p.SetState(1067)
  11083. p.Match(SQLiteParserCOMMA)
  11084. }
  11085. {
  11086. p.SetState(1068)
  11087. p.expr(0)
  11088. }
  11089. p.SetState(1073)
  11090. p.GetErrorHandler().Sync(p)
  11091. _la = p.GetTokenStream().LA(1)
  11092. }
  11093. }
  11094. {
  11095. p.SetState(1076)
  11096. p.Match(SQLiteParserCLOSE_PAR)
  11097. }
  11098. case 2:
  11099. p.SetState(1080)
  11100. p.GetErrorHandler().Sync(p)
  11101. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 136, p.GetParserRuleContext()) == 1 {
  11102. {
  11103. p.SetState(1077)
  11104. p.Schema_name()
  11105. }
  11106. {
  11107. p.SetState(1078)
  11108. p.Match(SQLiteParserDOT)
  11109. }
  11110. }
  11111. {
  11112. p.SetState(1082)
  11113. p.Table_name()
  11114. }
  11115. case 3:
  11116. p.SetState(1086)
  11117. p.GetErrorHandler().Sync(p)
  11118. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 137, p.GetParserRuleContext()) == 1 {
  11119. {
  11120. p.SetState(1083)
  11121. p.Schema_name()
  11122. }
  11123. {
  11124. p.SetState(1084)
  11125. p.Match(SQLiteParserDOT)
  11126. }
  11127. }
  11128. {
  11129. p.SetState(1088)
  11130. p.Table_function_name()
  11131. }
  11132. {
  11133. p.SetState(1089)
  11134. p.Match(SQLiteParserOPEN_PAR)
  11135. }
  11136. p.SetState(1098)
  11137. p.GetErrorHandler().Sync(p)
  11138. _la = p.GetTokenStream().LA(1)
  11139. if ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-16776415) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&-1) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&9088264048033660927) != 0) {
  11140. {
  11141. p.SetState(1090)
  11142. p.expr(0)
  11143. }
  11144. p.SetState(1095)
  11145. p.GetErrorHandler().Sync(p)
  11146. _la = p.GetTokenStream().LA(1)
  11147. for _la == SQLiteParserCOMMA {
  11148. {
  11149. p.SetState(1091)
  11150. p.Match(SQLiteParserCOMMA)
  11151. }
  11152. {
  11153. p.SetState(1092)
  11154. p.expr(0)
  11155. }
  11156. p.SetState(1097)
  11157. p.GetErrorHandler().Sync(p)
  11158. _la = p.GetTokenStream().LA(1)
  11159. }
  11160. }
  11161. {
  11162. p.SetState(1100)
  11163. p.Match(SQLiteParserCLOSE_PAR)
  11164. }
  11165. }
  11166. case 12:
  11167. localctx = NewExpr_collateContext(p, NewExprContext(p, _parentctx, _parentState))
  11168. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  11169. p.SetState(1104)
  11170. if !(p.Precpred(p.GetParserRuleContext(), 7)) {
  11171. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", ""))
  11172. }
  11173. {
  11174. p.SetState(1105)
  11175. p.Match(SQLiteParserCOLLATE_)
  11176. }
  11177. {
  11178. p.SetState(1106)
  11179. p.Collation_name()
  11180. }
  11181. case 13:
  11182. localctx = NewExpr_comparisonContext(p, NewExprContext(p, _parentctx, _parentState))
  11183. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  11184. p.SetState(1107)
  11185. if !(p.Precpred(p.GetParserRuleContext(), 6)) {
  11186. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", ""))
  11187. }
  11188. p.SetState(1109)
  11189. p.GetErrorHandler().Sync(p)
  11190. _la = p.GetTokenStream().LA(1)
  11191. if _la == SQLiteParserNOT_ {
  11192. {
  11193. p.SetState(1108)
  11194. p.Match(SQLiteParserNOT_)
  11195. }
  11196. }
  11197. {
  11198. p.SetState(1111)
  11199. _la = p.GetTokenStream().LA(1)
  11200. if !((int64((_la-79)) & ^0x3f) == 0 && ((int64(1)<<(_la-79))&2199028498433) != 0) {
  11201. p.GetErrorHandler().RecoverInline(p)
  11202. } else {
  11203. p.GetErrorHandler().ReportMatch(p)
  11204. p.Consume()
  11205. }
  11206. }
  11207. {
  11208. p.SetState(1112)
  11209. p.expr(0)
  11210. }
  11211. p.SetState(1115)
  11212. p.GetErrorHandler().Sync(p)
  11213. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 142, p.GetParserRuleContext()) == 1 {
  11214. {
  11215. p.SetState(1113)
  11216. p.Match(SQLiteParserESCAPE_)
  11217. }
  11218. {
  11219. p.SetState(1114)
  11220. p.expr(0)
  11221. }
  11222. }
  11223. case 14:
  11224. localctx = NewExpr_null_compContext(p, NewExprContext(p, _parentctx, _parentState))
  11225. p.PushNewRecursionContext(localctx, _startState, SQLiteParserRULE_expr)
  11226. p.SetState(1117)
  11227. if !(p.Precpred(p.GetParserRuleContext(), 5)) {
  11228. panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", ""))
  11229. }
  11230. p.SetState(1122)
  11231. p.GetErrorHandler().Sync(p)
  11232. switch p.GetTokenStream().LA(1) {
  11233. case SQLiteParserISNULL_:
  11234. {
  11235. p.SetState(1118)
  11236. p.Match(SQLiteParserISNULL_)
  11237. }
  11238. case SQLiteParserNOTNULL_:
  11239. {
  11240. p.SetState(1119)
  11241. p.Match(SQLiteParserNOTNULL_)
  11242. }
  11243. case SQLiteParserNOT_:
  11244. {
  11245. p.SetState(1120)
  11246. p.Match(SQLiteParserNOT_)
  11247. }
  11248. {
  11249. p.SetState(1121)
  11250. p.Match(SQLiteParserNULL_)
  11251. }
  11252. default:
  11253. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  11254. }
  11255. }
  11256. }
  11257. p.SetState(1128)
  11258. p.GetErrorHandler().Sync(p)
  11259. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 145, p.GetParserRuleContext())
  11260. }
  11261. return localctx
  11262. }
  11263. // IRaise_functionContext is an interface to support dynamic dispatch.
  11264. type IRaise_functionContext interface {
  11265. antlr.ParserRuleContext
  11266. // GetParser returns the parser.
  11267. GetParser() antlr.Parser
  11268. // Getter signatures
  11269. RAISE_() antlr.TerminalNode
  11270. OPEN_PAR() antlr.TerminalNode
  11271. CLOSE_PAR() antlr.TerminalNode
  11272. IGNORE_() antlr.TerminalNode
  11273. COMMA() antlr.TerminalNode
  11274. Error_message() IError_messageContext
  11275. ROLLBACK_() antlr.TerminalNode
  11276. ABORT_() antlr.TerminalNode
  11277. FAIL_() antlr.TerminalNode
  11278. // IsRaise_functionContext differentiates from other interfaces.
  11279. IsRaise_functionContext()
  11280. }
  11281. type Raise_functionContext struct {
  11282. *antlr.BaseParserRuleContext
  11283. parser antlr.Parser
  11284. }
  11285. func NewEmptyRaise_functionContext() *Raise_functionContext {
  11286. var p = new(Raise_functionContext)
  11287. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  11288. p.RuleIndex = SQLiteParserRULE_raise_function
  11289. return p
  11290. }
  11291. func (*Raise_functionContext) IsRaise_functionContext() {}
  11292. func NewRaise_functionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Raise_functionContext {
  11293. var p = new(Raise_functionContext)
  11294. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  11295. p.parser = parser
  11296. p.RuleIndex = SQLiteParserRULE_raise_function
  11297. return p
  11298. }
  11299. func (s *Raise_functionContext) GetParser() antlr.Parser { return s.parser }
  11300. func (s *Raise_functionContext) RAISE_() antlr.TerminalNode {
  11301. return s.GetToken(SQLiteParserRAISE_, 0)
  11302. }
  11303. func (s *Raise_functionContext) OPEN_PAR() antlr.TerminalNode {
  11304. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  11305. }
  11306. func (s *Raise_functionContext) CLOSE_PAR() antlr.TerminalNode {
  11307. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  11308. }
  11309. func (s *Raise_functionContext) IGNORE_() antlr.TerminalNode {
  11310. return s.GetToken(SQLiteParserIGNORE_, 0)
  11311. }
  11312. func (s *Raise_functionContext) COMMA() antlr.TerminalNode {
  11313. return s.GetToken(SQLiteParserCOMMA, 0)
  11314. }
  11315. func (s *Raise_functionContext) Error_message() IError_messageContext {
  11316. var t antlr.RuleContext
  11317. for _, ctx := range s.GetChildren() {
  11318. if _, ok := ctx.(IError_messageContext); ok {
  11319. t = ctx.(antlr.RuleContext)
  11320. break
  11321. }
  11322. }
  11323. if t == nil {
  11324. return nil
  11325. }
  11326. return t.(IError_messageContext)
  11327. }
  11328. func (s *Raise_functionContext) ROLLBACK_() antlr.TerminalNode {
  11329. return s.GetToken(SQLiteParserROLLBACK_, 0)
  11330. }
  11331. func (s *Raise_functionContext) ABORT_() antlr.TerminalNode {
  11332. return s.GetToken(SQLiteParserABORT_, 0)
  11333. }
  11334. func (s *Raise_functionContext) FAIL_() antlr.TerminalNode {
  11335. return s.GetToken(SQLiteParserFAIL_, 0)
  11336. }
  11337. func (s *Raise_functionContext) GetRuleContext() antlr.RuleContext {
  11338. return s
  11339. }
  11340. func (s *Raise_functionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  11341. return antlr.TreesStringTree(s, ruleNames, recog)
  11342. }
  11343. func (s *Raise_functionContext) EnterRule(listener antlr.ParseTreeListener) {
  11344. if listenerT, ok := listener.(SQLiteParserListener); ok {
  11345. listenerT.EnterRaise_function(s)
  11346. }
  11347. }
  11348. func (s *Raise_functionContext) ExitRule(listener antlr.ParseTreeListener) {
  11349. if listenerT, ok := listener.(SQLiteParserListener); ok {
  11350. listenerT.ExitRaise_function(s)
  11351. }
  11352. }
  11353. func (p *SQLiteParser) Raise_function() (localctx IRaise_functionContext) {
  11354. this := p
  11355. _ = this
  11356. localctx = NewRaise_functionContext(p, p.GetParserRuleContext(), p.GetState())
  11357. p.EnterRule(localctx, 70, SQLiteParserRULE_raise_function)
  11358. var _la int
  11359. defer func() {
  11360. p.ExitRule()
  11361. }()
  11362. defer func() {
  11363. if err := recover(); err != nil {
  11364. if v, ok := err.(antlr.RecognitionException); ok {
  11365. localctx.SetException(v)
  11366. p.GetErrorHandler().ReportError(p, v)
  11367. p.GetErrorHandler().Recover(p, v)
  11368. } else {
  11369. panic(err)
  11370. }
  11371. }
  11372. }()
  11373. p.EnterOuterAlt(localctx, 1)
  11374. {
  11375. p.SetState(1129)
  11376. p.Match(SQLiteParserRAISE_)
  11377. }
  11378. {
  11379. p.SetState(1130)
  11380. p.Match(SQLiteParserOPEN_PAR)
  11381. }
  11382. p.SetState(1135)
  11383. p.GetErrorHandler().Sync(p)
  11384. switch p.GetTokenStream().LA(1) {
  11385. case SQLiteParserIGNORE_:
  11386. {
  11387. p.SetState(1131)
  11388. p.Match(SQLiteParserIGNORE_)
  11389. }
  11390. case SQLiteParserABORT_, SQLiteParserFAIL_, SQLiteParserROLLBACK_:
  11391. {
  11392. p.SetState(1132)
  11393. _la = p.GetTokenStream().LA(1)
  11394. if !(_la == SQLiteParserABORT_ || _la == SQLiteParserFAIL_ || _la == SQLiteParserROLLBACK_) {
  11395. p.GetErrorHandler().RecoverInline(p)
  11396. } else {
  11397. p.GetErrorHandler().ReportMatch(p)
  11398. p.Consume()
  11399. }
  11400. }
  11401. {
  11402. p.SetState(1133)
  11403. p.Match(SQLiteParserCOMMA)
  11404. }
  11405. {
  11406. p.SetState(1134)
  11407. p.Error_message()
  11408. }
  11409. default:
  11410. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  11411. }
  11412. {
  11413. p.SetState(1137)
  11414. p.Match(SQLiteParserCLOSE_PAR)
  11415. }
  11416. return localctx
  11417. }
  11418. // ILiteral_valueContext is an interface to support dynamic dispatch.
  11419. type ILiteral_valueContext interface {
  11420. antlr.ParserRuleContext
  11421. // GetParser returns the parser.
  11422. GetParser() antlr.Parser
  11423. // Getter signatures
  11424. NUMERIC_LITERAL() antlr.TerminalNode
  11425. STRING_LITERAL() antlr.TerminalNode
  11426. BLOB_LITERAL() antlr.TerminalNode
  11427. NULL_() antlr.TerminalNode
  11428. TRUE_() antlr.TerminalNode
  11429. FALSE_() antlr.TerminalNode
  11430. CURRENT_TIME_() antlr.TerminalNode
  11431. CURRENT_DATE_() antlr.TerminalNode
  11432. CURRENT_TIMESTAMP_() antlr.TerminalNode
  11433. // IsLiteral_valueContext differentiates from other interfaces.
  11434. IsLiteral_valueContext()
  11435. }
  11436. type Literal_valueContext struct {
  11437. *antlr.BaseParserRuleContext
  11438. parser antlr.Parser
  11439. }
  11440. func NewEmptyLiteral_valueContext() *Literal_valueContext {
  11441. var p = new(Literal_valueContext)
  11442. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  11443. p.RuleIndex = SQLiteParserRULE_literal_value
  11444. return p
  11445. }
  11446. func (*Literal_valueContext) IsLiteral_valueContext() {}
  11447. func NewLiteral_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Literal_valueContext {
  11448. var p = new(Literal_valueContext)
  11449. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  11450. p.parser = parser
  11451. p.RuleIndex = SQLiteParserRULE_literal_value
  11452. return p
  11453. }
  11454. func (s *Literal_valueContext) GetParser() antlr.Parser { return s.parser }
  11455. func (s *Literal_valueContext) NUMERIC_LITERAL() antlr.TerminalNode {
  11456. return s.GetToken(SQLiteParserNUMERIC_LITERAL, 0)
  11457. }
  11458. func (s *Literal_valueContext) STRING_LITERAL() antlr.TerminalNode {
  11459. return s.GetToken(SQLiteParserSTRING_LITERAL, 0)
  11460. }
  11461. func (s *Literal_valueContext) BLOB_LITERAL() antlr.TerminalNode {
  11462. return s.GetToken(SQLiteParserBLOB_LITERAL, 0)
  11463. }
  11464. func (s *Literal_valueContext) NULL_() antlr.TerminalNode {
  11465. return s.GetToken(SQLiteParserNULL_, 0)
  11466. }
  11467. func (s *Literal_valueContext) TRUE_() antlr.TerminalNode {
  11468. return s.GetToken(SQLiteParserTRUE_, 0)
  11469. }
  11470. func (s *Literal_valueContext) FALSE_() antlr.TerminalNode {
  11471. return s.GetToken(SQLiteParserFALSE_, 0)
  11472. }
  11473. func (s *Literal_valueContext) CURRENT_TIME_() antlr.TerminalNode {
  11474. return s.GetToken(SQLiteParserCURRENT_TIME_, 0)
  11475. }
  11476. func (s *Literal_valueContext) CURRENT_DATE_() antlr.TerminalNode {
  11477. return s.GetToken(SQLiteParserCURRENT_DATE_, 0)
  11478. }
  11479. func (s *Literal_valueContext) CURRENT_TIMESTAMP_() antlr.TerminalNode {
  11480. return s.GetToken(SQLiteParserCURRENT_TIMESTAMP_, 0)
  11481. }
  11482. func (s *Literal_valueContext) GetRuleContext() antlr.RuleContext {
  11483. return s
  11484. }
  11485. func (s *Literal_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  11486. return antlr.TreesStringTree(s, ruleNames, recog)
  11487. }
  11488. func (s *Literal_valueContext) EnterRule(listener antlr.ParseTreeListener) {
  11489. if listenerT, ok := listener.(SQLiteParserListener); ok {
  11490. listenerT.EnterLiteral_value(s)
  11491. }
  11492. }
  11493. func (s *Literal_valueContext) ExitRule(listener antlr.ParseTreeListener) {
  11494. if listenerT, ok := listener.(SQLiteParserListener); ok {
  11495. listenerT.ExitLiteral_value(s)
  11496. }
  11497. }
  11498. func (p *SQLiteParser) Literal_value() (localctx ILiteral_valueContext) {
  11499. this := p
  11500. _ = this
  11501. localctx = NewLiteral_valueContext(p, p.GetParserRuleContext(), p.GetState())
  11502. p.EnterRule(localctx, 72, SQLiteParserRULE_literal_value)
  11503. var _la int
  11504. defer func() {
  11505. p.ExitRule()
  11506. }()
  11507. defer func() {
  11508. if err := recover(); err != nil {
  11509. if v, ok := err.(antlr.RecognitionException); ok {
  11510. localctx.SetException(v)
  11511. p.GetErrorHandler().ReportError(p, v)
  11512. p.GetErrorHandler().Recover(p, v)
  11513. } else {
  11514. panic(err)
  11515. }
  11516. }
  11517. }()
  11518. p.EnterOuterAlt(localctx, 1)
  11519. {
  11520. p.SetState(1139)
  11521. _la = p.GetTokenStream().LA(1)
  11522. if !(((int64((_la-54)) & ^0x3f) == 0 && ((int64(1)<<(_la-54))&4503599627370503) != 0) || ((int64((_la-175)) & ^0x3f) == 0 && ((int64(1)<<(_la-175))&409603) != 0)) {
  11523. p.GetErrorHandler().RecoverInline(p)
  11524. } else {
  11525. p.GetErrorHandler().ReportMatch(p)
  11526. p.Consume()
  11527. }
  11528. }
  11529. return localctx
  11530. }
  11531. // IInsert_stmtContext is an interface to support dynamic dispatch.
  11532. type IInsert_stmtContext interface {
  11533. antlr.ParserRuleContext
  11534. // GetParser returns the parser.
  11535. GetParser() antlr.Parser
  11536. // Getter signatures
  11537. INTO_() antlr.TerminalNode
  11538. Table_name() ITable_nameContext
  11539. INSERT_() antlr.TerminalNode
  11540. REPLACE_() antlr.TerminalNode
  11541. OR_() antlr.TerminalNode
  11542. With_clause() IWith_clauseContext
  11543. ROLLBACK_() antlr.TerminalNode
  11544. ABORT_() antlr.TerminalNode
  11545. FAIL_() antlr.TerminalNode
  11546. IGNORE_() antlr.TerminalNode
  11547. Schema_name() ISchema_nameContext
  11548. DOT() antlr.TerminalNode
  11549. AS_() antlr.TerminalNode
  11550. Table_alias() ITable_aliasContext
  11551. AllOPEN_PAR() []antlr.TerminalNode
  11552. OPEN_PAR(i int) antlr.TerminalNode
  11553. AllColumn_name() []IColumn_nameContext
  11554. Column_name(i int) IColumn_nameContext
  11555. AllCLOSE_PAR() []antlr.TerminalNode
  11556. CLOSE_PAR(i int) antlr.TerminalNode
  11557. VALUES_() antlr.TerminalNode
  11558. AllExpr() []IExprContext
  11559. Expr(i int) IExprContext
  11560. Select_stmt() ISelect_stmtContext
  11561. Upsert_clause() IUpsert_clauseContext
  11562. Returning_clause() IReturning_clauseContext
  11563. AllCOMMA() []antlr.TerminalNode
  11564. COMMA(i int) antlr.TerminalNode
  11565. DEFAULT_() antlr.TerminalNode
  11566. // IsInsert_stmtContext differentiates from other interfaces.
  11567. IsInsert_stmtContext()
  11568. }
  11569. type Insert_stmtContext struct {
  11570. *antlr.BaseParserRuleContext
  11571. parser antlr.Parser
  11572. }
  11573. func NewEmptyInsert_stmtContext() *Insert_stmtContext {
  11574. var p = new(Insert_stmtContext)
  11575. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  11576. p.RuleIndex = SQLiteParserRULE_insert_stmt
  11577. return p
  11578. }
  11579. func (*Insert_stmtContext) IsInsert_stmtContext() {}
  11580. func NewInsert_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Insert_stmtContext {
  11581. var p = new(Insert_stmtContext)
  11582. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  11583. p.parser = parser
  11584. p.RuleIndex = SQLiteParserRULE_insert_stmt
  11585. return p
  11586. }
  11587. func (s *Insert_stmtContext) GetParser() antlr.Parser { return s.parser }
  11588. func (s *Insert_stmtContext) INTO_() antlr.TerminalNode {
  11589. return s.GetToken(SQLiteParserINTO_, 0)
  11590. }
  11591. func (s *Insert_stmtContext) Table_name() ITable_nameContext {
  11592. var t antlr.RuleContext
  11593. for _, ctx := range s.GetChildren() {
  11594. if _, ok := ctx.(ITable_nameContext); ok {
  11595. t = ctx.(antlr.RuleContext)
  11596. break
  11597. }
  11598. }
  11599. if t == nil {
  11600. return nil
  11601. }
  11602. return t.(ITable_nameContext)
  11603. }
  11604. func (s *Insert_stmtContext) INSERT_() antlr.TerminalNode {
  11605. return s.GetToken(SQLiteParserINSERT_, 0)
  11606. }
  11607. func (s *Insert_stmtContext) REPLACE_() antlr.TerminalNode {
  11608. return s.GetToken(SQLiteParserREPLACE_, 0)
  11609. }
  11610. func (s *Insert_stmtContext) OR_() antlr.TerminalNode {
  11611. return s.GetToken(SQLiteParserOR_, 0)
  11612. }
  11613. func (s *Insert_stmtContext) With_clause() IWith_clauseContext {
  11614. var t antlr.RuleContext
  11615. for _, ctx := range s.GetChildren() {
  11616. if _, ok := ctx.(IWith_clauseContext); ok {
  11617. t = ctx.(antlr.RuleContext)
  11618. break
  11619. }
  11620. }
  11621. if t == nil {
  11622. return nil
  11623. }
  11624. return t.(IWith_clauseContext)
  11625. }
  11626. func (s *Insert_stmtContext) ROLLBACK_() antlr.TerminalNode {
  11627. return s.GetToken(SQLiteParserROLLBACK_, 0)
  11628. }
  11629. func (s *Insert_stmtContext) ABORT_() antlr.TerminalNode {
  11630. return s.GetToken(SQLiteParserABORT_, 0)
  11631. }
  11632. func (s *Insert_stmtContext) FAIL_() antlr.TerminalNode {
  11633. return s.GetToken(SQLiteParserFAIL_, 0)
  11634. }
  11635. func (s *Insert_stmtContext) IGNORE_() antlr.TerminalNode {
  11636. return s.GetToken(SQLiteParserIGNORE_, 0)
  11637. }
  11638. func (s *Insert_stmtContext) Schema_name() ISchema_nameContext {
  11639. var t antlr.RuleContext
  11640. for _, ctx := range s.GetChildren() {
  11641. if _, ok := ctx.(ISchema_nameContext); ok {
  11642. t = ctx.(antlr.RuleContext)
  11643. break
  11644. }
  11645. }
  11646. if t == nil {
  11647. return nil
  11648. }
  11649. return t.(ISchema_nameContext)
  11650. }
  11651. func (s *Insert_stmtContext) DOT() antlr.TerminalNode {
  11652. return s.GetToken(SQLiteParserDOT, 0)
  11653. }
  11654. func (s *Insert_stmtContext) AS_() antlr.TerminalNode {
  11655. return s.GetToken(SQLiteParserAS_, 0)
  11656. }
  11657. func (s *Insert_stmtContext) Table_alias() ITable_aliasContext {
  11658. var t antlr.RuleContext
  11659. for _, ctx := range s.GetChildren() {
  11660. if _, ok := ctx.(ITable_aliasContext); ok {
  11661. t = ctx.(antlr.RuleContext)
  11662. break
  11663. }
  11664. }
  11665. if t == nil {
  11666. return nil
  11667. }
  11668. return t.(ITable_aliasContext)
  11669. }
  11670. func (s *Insert_stmtContext) AllOPEN_PAR() []antlr.TerminalNode {
  11671. return s.GetTokens(SQLiteParserOPEN_PAR)
  11672. }
  11673. func (s *Insert_stmtContext) OPEN_PAR(i int) antlr.TerminalNode {
  11674. return s.GetToken(SQLiteParserOPEN_PAR, i)
  11675. }
  11676. func (s *Insert_stmtContext) AllColumn_name() []IColumn_nameContext {
  11677. children := s.GetChildren()
  11678. len := 0
  11679. for _, ctx := range children {
  11680. if _, ok := ctx.(IColumn_nameContext); ok {
  11681. len++
  11682. }
  11683. }
  11684. tst := make([]IColumn_nameContext, len)
  11685. i := 0
  11686. for _, ctx := range children {
  11687. if t, ok := ctx.(IColumn_nameContext); ok {
  11688. tst[i] = t.(IColumn_nameContext)
  11689. i++
  11690. }
  11691. }
  11692. return tst
  11693. }
  11694. func (s *Insert_stmtContext) Column_name(i int) IColumn_nameContext {
  11695. var t antlr.RuleContext
  11696. j := 0
  11697. for _, ctx := range s.GetChildren() {
  11698. if _, ok := ctx.(IColumn_nameContext); ok {
  11699. if j == i {
  11700. t = ctx.(antlr.RuleContext)
  11701. break
  11702. }
  11703. j++
  11704. }
  11705. }
  11706. if t == nil {
  11707. return nil
  11708. }
  11709. return t.(IColumn_nameContext)
  11710. }
  11711. func (s *Insert_stmtContext) AllCLOSE_PAR() []antlr.TerminalNode {
  11712. return s.GetTokens(SQLiteParserCLOSE_PAR)
  11713. }
  11714. func (s *Insert_stmtContext) CLOSE_PAR(i int) antlr.TerminalNode {
  11715. return s.GetToken(SQLiteParserCLOSE_PAR, i)
  11716. }
  11717. func (s *Insert_stmtContext) VALUES_() antlr.TerminalNode {
  11718. return s.GetToken(SQLiteParserVALUES_, 0)
  11719. }
  11720. func (s *Insert_stmtContext) AllExpr() []IExprContext {
  11721. children := s.GetChildren()
  11722. len := 0
  11723. for _, ctx := range children {
  11724. if _, ok := ctx.(IExprContext); ok {
  11725. len++
  11726. }
  11727. }
  11728. tst := make([]IExprContext, len)
  11729. i := 0
  11730. for _, ctx := range children {
  11731. if t, ok := ctx.(IExprContext); ok {
  11732. tst[i] = t.(IExprContext)
  11733. i++
  11734. }
  11735. }
  11736. return tst
  11737. }
  11738. func (s *Insert_stmtContext) Expr(i int) IExprContext {
  11739. var t antlr.RuleContext
  11740. j := 0
  11741. for _, ctx := range s.GetChildren() {
  11742. if _, ok := ctx.(IExprContext); ok {
  11743. if j == i {
  11744. t = ctx.(antlr.RuleContext)
  11745. break
  11746. }
  11747. j++
  11748. }
  11749. }
  11750. if t == nil {
  11751. return nil
  11752. }
  11753. return t.(IExprContext)
  11754. }
  11755. func (s *Insert_stmtContext) Select_stmt() ISelect_stmtContext {
  11756. var t antlr.RuleContext
  11757. for _, ctx := range s.GetChildren() {
  11758. if _, ok := ctx.(ISelect_stmtContext); ok {
  11759. t = ctx.(antlr.RuleContext)
  11760. break
  11761. }
  11762. }
  11763. if t == nil {
  11764. return nil
  11765. }
  11766. return t.(ISelect_stmtContext)
  11767. }
  11768. func (s *Insert_stmtContext) Upsert_clause() IUpsert_clauseContext {
  11769. var t antlr.RuleContext
  11770. for _, ctx := range s.GetChildren() {
  11771. if _, ok := ctx.(IUpsert_clauseContext); ok {
  11772. t = ctx.(antlr.RuleContext)
  11773. break
  11774. }
  11775. }
  11776. if t == nil {
  11777. return nil
  11778. }
  11779. return t.(IUpsert_clauseContext)
  11780. }
  11781. func (s *Insert_stmtContext) Returning_clause() IReturning_clauseContext {
  11782. var t antlr.RuleContext
  11783. for _, ctx := range s.GetChildren() {
  11784. if _, ok := ctx.(IReturning_clauseContext); ok {
  11785. t = ctx.(antlr.RuleContext)
  11786. break
  11787. }
  11788. }
  11789. if t == nil {
  11790. return nil
  11791. }
  11792. return t.(IReturning_clauseContext)
  11793. }
  11794. func (s *Insert_stmtContext) AllCOMMA() []antlr.TerminalNode {
  11795. return s.GetTokens(SQLiteParserCOMMA)
  11796. }
  11797. func (s *Insert_stmtContext) COMMA(i int) antlr.TerminalNode {
  11798. return s.GetToken(SQLiteParserCOMMA, i)
  11799. }
  11800. func (s *Insert_stmtContext) DEFAULT_() antlr.TerminalNode {
  11801. return s.GetToken(SQLiteParserDEFAULT_, 0)
  11802. }
  11803. func (s *Insert_stmtContext) GetRuleContext() antlr.RuleContext {
  11804. return s
  11805. }
  11806. func (s *Insert_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  11807. return antlr.TreesStringTree(s, ruleNames, recog)
  11808. }
  11809. func (s *Insert_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  11810. if listenerT, ok := listener.(SQLiteParserListener); ok {
  11811. listenerT.EnterInsert_stmt(s)
  11812. }
  11813. }
  11814. func (s *Insert_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  11815. if listenerT, ok := listener.(SQLiteParserListener); ok {
  11816. listenerT.ExitInsert_stmt(s)
  11817. }
  11818. }
  11819. func (p *SQLiteParser) Insert_stmt() (localctx IInsert_stmtContext) {
  11820. this := p
  11821. _ = this
  11822. localctx = NewInsert_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  11823. p.EnterRule(localctx, 74, SQLiteParserRULE_insert_stmt)
  11824. var _la int
  11825. defer func() {
  11826. p.ExitRule()
  11827. }()
  11828. defer func() {
  11829. if err := recover(); err != nil {
  11830. if v, ok := err.(antlr.RecognitionException); ok {
  11831. localctx.SetException(v)
  11832. p.GetErrorHandler().ReportError(p, v)
  11833. p.GetErrorHandler().Recover(p, v)
  11834. } else {
  11835. panic(err)
  11836. }
  11837. }
  11838. }()
  11839. p.SetState(1214)
  11840. p.GetErrorHandler().Sync(p)
  11841. switch p.GetTokenStream().LA(1) {
  11842. case SQLiteParserINSERT_, SQLiteParserREPLACE_, SQLiteParserWITH_:
  11843. p.EnterOuterAlt(localctx, 1)
  11844. p.SetState(1142)
  11845. p.GetErrorHandler().Sync(p)
  11846. _la = p.GetTokenStream().LA(1)
  11847. if _la == SQLiteParserWITH_ {
  11848. {
  11849. p.SetState(1141)
  11850. p.With_clause()
  11851. }
  11852. }
  11853. p.SetState(1149)
  11854. p.GetErrorHandler().Sync(p)
  11855. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 148, p.GetParserRuleContext()) {
  11856. case 1:
  11857. {
  11858. p.SetState(1144)
  11859. p.Match(SQLiteParserINSERT_)
  11860. }
  11861. case 2:
  11862. {
  11863. p.SetState(1145)
  11864. p.Match(SQLiteParserREPLACE_)
  11865. }
  11866. case 3:
  11867. {
  11868. p.SetState(1146)
  11869. p.Match(SQLiteParserINSERT_)
  11870. }
  11871. {
  11872. p.SetState(1147)
  11873. p.Match(SQLiteParserOR_)
  11874. }
  11875. {
  11876. p.SetState(1148)
  11877. _la = p.GetTokenStream().LA(1)
  11878. if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) {
  11879. p.GetErrorHandler().RecoverInline(p)
  11880. } else {
  11881. p.GetErrorHandler().ReportMatch(p)
  11882. p.Consume()
  11883. }
  11884. }
  11885. }
  11886. {
  11887. p.SetState(1151)
  11888. p.Match(SQLiteParserINTO_)
  11889. }
  11890. p.SetState(1155)
  11891. p.GetErrorHandler().Sync(p)
  11892. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 149, p.GetParserRuleContext()) == 1 {
  11893. {
  11894. p.SetState(1152)
  11895. p.Schema_name()
  11896. }
  11897. {
  11898. p.SetState(1153)
  11899. p.Match(SQLiteParserDOT)
  11900. }
  11901. }
  11902. {
  11903. p.SetState(1157)
  11904. p.Table_name()
  11905. }
  11906. p.SetState(1160)
  11907. p.GetErrorHandler().Sync(p)
  11908. _la = p.GetTokenStream().LA(1)
  11909. if _la == SQLiteParserAS_ {
  11910. {
  11911. p.SetState(1158)
  11912. p.Match(SQLiteParserAS_)
  11913. }
  11914. {
  11915. p.SetState(1159)
  11916. p.Table_alias()
  11917. }
  11918. }
  11919. p.SetState(1173)
  11920. p.GetErrorHandler().Sync(p)
  11921. _la = p.GetTokenStream().LA(1)
  11922. if _la == SQLiteParserOPEN_PAR {
  11923. {
  11924. p.SetState(1162)
  11925. p.Match(SQLiteParserOPEN_PAR)
  11926. }
  11927. {
  11928. p.SetState(1163)
  11929. p.Column_name()
  11930. }
  11931. p.SetState(1168)
  11932. p.GetErrorHandler().Sync(p)
  11933. _la = p.GetTokenStream().LA(1)
  11934. for _la == SQLiteParserCOMMA {
  11935. {
  11936. p.SetState(1164)
  11937. p.Match(SQLiteParserCOMMA)
  11938. }
  11939. {
  11940. p.SetState(1165)
  11941. p.Column_name()
  11942. }
  11943. p.SetState(1170)
  11944. p.GetErrorHandler().Sync(p)
  11945. _la = p.GetTokenStream().LA(1)
  11946. }
  11947. {
  11948. p.SetState(1171)
  11949. p.Match(SQLiteParserCLOSE_PAR)
  11950. }
  11951. }
  11952. p.SetState(1204)
  11953. p.GetErrorHandler().Sync(p)
  11954. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 156, p.GetParserRuleContext()) {
  11955. case 1:
  11956. {
  11957. p.SetState(1175)
  11958. p.Match(SQLiteParserVALUES_)
  11959. }
  11960. {
  11961. p.SetState(1176)
  11962. p.Match(SQLiteParserOPEN_PAR)
  11963. }
  11964. {
  11965. p.SetState(1177)
  11966. p.expr(0)
  11967. }
  11968. p.SetState(1182)
  11969. p.GetErrorHandler().Sync(p)
  11970. _la = p.GetTokenStream().LA(1)
  11971. for _la == SQLiteParserCOMMA {
  11972. {
  11973. p.SetState(1178)
  11974. p.Match(SQLiteParserCOMMA)
  11975. }
  11976. {
  11977. p.SetState(1179)
  11978. p.expr(0)
  11979. }
  11980. p.SetState(1184)
  11981. p.GetErrorHandler().Sync(p)
  11982. _la = p.GetTokenStream().LA(1)
  11983. }
  11984. {
  11985. p.SetState(1185)
  11986. p.Match(SQLiteParserCLOSE_PAR)
  11987. }
  11988. p.SetState(1200)
  11989. p.GetErrorHandler().Sync(p)
  11990. _la = p.GetTokenStream().LA(1)
  11991. for _la == SQLiteParserCOMMA {
  11992. {
  11993. p.SetState(1186)
  11994. p.Match(SQLiteParserCOMMA)
  11995. }
  11996. {
  11997. p.SetState(1187)
  11998. p.Match(SQLiteParserOPEN_PAR)
  11999. }
  12000. {
  12001. p.SetState(1188)
  12002. p.expr(0)
  12003. }
  12004. p.SetState(1193)
  12005. p.GetErrorHandler().Sync(p)
  12006. _la = p.GetTokenStream().LA(1)
  12007. for _la == SQLiteParserCOMMA {
  12008. {
  12009. p.SetState(1189)
  12010. p.Match(SQLiteParserCOMMA)
  12011. }
  12012. {
  12013. p.SetState(1190)
  12014. p.expr(0)
  12015. }
  12016. p.SetState(1195)
  12017. p.GetErrorHandler().Sync(p)
  12018. _la = p.GetTokenStream().LA(1)
  12019. }
  12020. {
  12021. p.SetState(1196)
  12022. p.Match(SQLiteParserCLOSE_PAR)
  12023. }
  12024. p.SetState(1202)
  12025. p.GetErrorHandler().Sync(p)
  12026. _la = p.GetTokenStream().LA(1)
  12027. }
  12028. case 2:
  12029. {
  12030. p.SetState(1203)
  12031. p.Select_stmt()
  12032. }
  12033. }
  12034. p.SetState(1207)
  12035. p.GetErrorHandler().Sync(p)
  12036. _la = p.GetTokenStream().LA(1)
  12037. if _la == SQLiteParserON_ {
  12038. {
  12039. p.SetState(1206)
  12040. p.Upsert_clause()
  12041. }
  12042. }
  12043. p.SetState(1210)
  12044. p.GetErrorHandler().Sync(p)
  12045. _la = p.GetTokenStream().LA(1)
  12046. if _la == SQLiteParserRETURNING_ {
  12047. {
  12048. p.SetState(1209)
  12049. p.Returning_clause()
  12050. }
  12051. }
  12052. case SQLiteParserDEFAULT_:
  12053. p.EnterOuterAlt(localctx, 2)
  12054. {
  12055. p.SetState(1212)
  12056. p.Match(SQLiteParserDEFAULT_)
  12057. }
  12058. {
  12059. p.SetState(1213)
  12060. p.Match(SQLiteParserVALUES_)
  12061. }
  12062. default:
  12063. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  12064. }
  12065. return localctx
  12066. }
  12067. // IUpsert_clauseContext is an interface to support dynamic dispatch.
  12068. type IUpsert_clauseContext interface {
  12069. antlr.ParserRuleContext
  12070. // GetParser returns the parser.
  12071. GetParser() antlr.Parser
  12072. // Getter signatures
  12073. ON_() antlr.TerminalNode
  12074. CONFLICT_() antlr.TerminalNode
  12075. DO_() antlr.TerminalNode
  12076. NOTHING_() antlr.TerminalNode
  12077. UPDATE_() antlr.TerminalNode
  12078. SET_() antlr.TerminalNode
  12079. OPEN_PAR() antlr.TerminalNode
  12080. AllIndexed_column() []IIndexed_columnContext
  12081. Indexed_column(i int) IIndexed_columnContext
  12082. CLOSE_PAR() antlr.TerminalNode
  12083. AllASSIGN() []antlr.TerminalNode
  12084. ASSIGN(i int) antlr.TerminalNode
  12085. AllExpr() []IExprContext
  12086. Expr(i int) IExprContext
  12087. AllCOMMA() []antlr.TerminalNode
  12088. COMMA(i int) antlr.TerminalNode
  12089. AllWHERE_() []antlr.TerminalNode
  12090. WHERE_(i int) antlr.TerminalNode
  12091. AllColumn_name() []IColumn_nameContext
  12092. Column_name(i int) IColumn_nameContext
  12093. AllColumn_name_list() []IColumn_name_listContext
  12094. Column_name_list(i int) IColumn_name_listContext
  12095. // IsUpsert_clauseContext differentiates from other interfaces.
  12096. IsUpsert_clauseContext()
  12097. }
  12098. type Upsert_clauseContext struct {
  12099. *antlr.BaseParserRuleContext
  12100. parser antlr.Parser
  12101. }
  12102. func NewEmptyUpsert_clauseContext() *Upsert_clauseContext {
  12103. var p = new(Upsert_clauseContext)
  12104. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  12105. p.RuleIndex = SQLiteParserRULE_upsert_clause
  12106. return p
  12107. }
  12108. func (*Upsert_clauseContext) IsUpsert_clauseContext() {}
  12109. func NewUpsert_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Upsert_clauseContext {
  12110. var p = new(Upsert_clauseContext)
  12111. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  12112. p.parser = parser
  12113. p.RuleIndex = SQLiteParserRULE_upsert_clause
  12114. return p
  12115. }
  12116. func (s *Upsert_clauseContext) GetParser() antlr.Parser { return s.parser }
  12117. func (s *Upsert_clauseContext) ON_() antlr.TerminalNode {
  12118. return s.GetToken(SQLiteParserON_, 0)
  12119. }
  12120. func (s *Upsert_clauseContext) CONFLICT_() antlr.TerminalNode {
  12121. return s.GetToken(SQLiteParserCONFLICT_, 0)
  12122. }
  12123. func (s *Upsert_clauseContext) DO_() antlr.TerminalNode {
  12124. return s.GetToken(SQLiteParserDO_, 0)
  12125. }
  12126. func (s *Upsert_clauseContext) NOTHING_() antlr.TerminalNode {
  12127. return s.GetToken(SQLiteParserNOTHING_, 0)
  12128. }
  12129. func (s *Upsert_clauseContext) UPDATE_() antlr.TerminalNode {
  12130. return s.GetToken(SQLiteParserUPDATE_, 0)
  12131. }
  12132. func (s *Upsert_clauseContext) SET_() antlr.TerminalNode {
  12133. return s.GetToken(SQLiteParserSET_, 0)
  12134. }
  12135. func (s *Upsert_clauseContext) OPEN_PAR() antlr.TerminalNode {
  12136. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  12137. }
  12138. func (s *Upsert_clauseContext) AllIndexed_column() []IIndexed_columnContext {
  12139. children := s.GetChildren()
  12140. len := 0
  12141. for _, ctx := range children {
  12142. if _, ok := ctx.(IIndexed_columnContext); ok {
  12143. len++
  12144. }
  12145. }
  12146. tst := make([]IIndexed_columnContext, len)
  12147. i := 0
  12148. for _, ctx := range children {
  12149. if t, ok := ctx.(IIndexed_columnContext); ok {
  12150. tst[i] = t.(IIndexed_columnContext)
  12151. i++
  12152. }
  12153. }
  12154. return tst
  12155. }
  12156. func (s *Upsert_clauseContext) Indexed_column(i int) IIndexed_columnContext {
  12157. var t antlr.RuleContext
  12158. j := 0
  12159. for _, ctx := range s.GetChildren() {
  12160. if _, ok := ctx.(IIndexed_columnContext); ok {
  12161. if j == i {
  12162. t = ctx.(antlr.RuleContext)
  12163. break
  12164. }
  12165. j++
  12166. }
  12167. }
  12168. if t == nil {
  12169. return nil
  12170. }
  12171. return t.(IIndexed_columnContext)
  12172. }
  12173. func (s *Upsert_clauseContext) CLOSE_PAR() antlr.TerminalNode {
  12174. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  12175. }
  12176. func (s *Upsert_clauseContext) AllASSIGN() []antlr.TerminalNode {
  12177. return s.GetTokens(SQLiteParserASSIGN)
  12178. }
  12179. func (s *Upsert_clauseContext) ASSIGN(i int) antlr.TerminalNode {
  12180. return s.GetToken(SQLiteParserASSIGN, i)
  12181. }
  12182. func (s *Upsert_clauseContext) AllExpr() []IExprContext {
  12183. children := s.GetChildren()
  12184. len := 0
  12185. for _, ctx := range children {
  12186. if _, ok := ctx.(IExprContext); ok {
  12187. len++
  12188. }
  12189. }
  12190. tst := make([]IExprContext, len)
  12191. i := 0
  12192. for _, ctx := range children {
  12193. if t, ok := ctx.(IExprContext); ok {
  12194. tst[i] = t.(IExprContext)
  12195. i++
  12196. }
  12197. }
  12198. return tst
  12199. }
  12200. func (s *Upsert_clauseContext) Expr(i int) IExprContext {
  12201. var t antlr.RuleContext
  12202. j := 0
  12203. for _, ctx := range s.GetChildren() {
  12204. if _, ok := ctx.(IExprContext); ok {
  12205. if j == i {
  12206. t = ctx.(antlr.RuleContext)
  12207. break
  12208. }
  12209. j++
  12210. }
  12211. }
  12212. if t == nil {
  12213. return nil
  12214. }
  12215. return t.(IExprContext)
  12216. }
  12217. func (s *Upsert_clauseContext) AllCOMMA() []antlr.TerminalNode {
  12218. return s.GetTokens(SQLiteParserCOMMA)
  12219. }
  12220. func (s *Upsert_clauseContext) COMMA(i int) antlr.TerminalNode {
  12221. return s.GetToken(SQLiteParserCOMMA, i)
  12222. }
  12223. func (s *Upsert_clauseContext) AllWHERE_() []antlr.TerminalNode {
  12224. return s.GetTokens(SQLiteParserWHERE_)
  12225. }
  12226. func (s *Upsert_clauseContext) WHERE_(i int) antlr.TerminalNode {
  12227. return s.GetToken(SQLiteParserWHERE_, i)
  12228. }
  12229. func (s *Upsert_clauseContext) AllColumn_name() []IColumn_nameContext {
  12230. children := s.GetChildren()
  12231. len := 0
  12232. for _, ctx := range children {
  12233. if _, ok := ctx.(IColumn_nameContext); ok {
  12234. len++
  12235. }
  12236. }
  12237. tst := make([]IColumn_nameContext, len)
  12238. i := 0
  12239. for _, ctx := range children {
  12240. if t, ok := ctx.(IColumn_nameContext); ok {
  12241. tst[i] = t.(IColumn_nameContext)
  12242. i++
  12243. }
  12244. }
  12245. return tst
  12246. }
  12247. func (s *Upsert_clauseContext) Column_name(i int) IColumn_nameContext {
  12248. var t antlr.RuleContext
  12249. j := 0
  12250. for _, ctx := range s.GetChildren() {
  12251. if _, ok := ctx.(IColumn_nameContext); ok {
  12252. if j == i {
  12253. t = ctx.(antlr.RuleContext)
  12254. break
  12255. }
  12256. j++
  12257. }
  12258. }
  12259. if t == nil {
  12260. return nil
  12261. }
  12262. return t.(IColumn_nameContext)
  12263. }
  12264. func (s *Upsert_clauseContext) AllColumn_name_list() []IColumn_name_listContext {
  12265. children := s.GetChildren()
  12266. len := 0
  12267. for _, ctx := range children {
  12268. if _, ok := ctx.(IColumn_name_listContext); ok {
  12269. len++
  12270. }
  12271. }
  12272. tst := make([]IColumn_name_listContext, len)
  12273. i := 0
  12274. for _, ctx := range children {
  12275. if t, ok := ctx.(IColumn_name_listContext); ok {
  12276. tst[i] = t.(IColumn_name_listContext)
  12277. i++
  12278. }
  12279. }
  12280. return tst
  12281. }
  12282. func (s *Upsert_clauseContext) Column_name_list(i int) IColumn_name_listContext {
  12283. var t antlr.RuleContext
  12284. j := 0
  12285. for _, ctx := range s.GetChildren() {
  12286. if _, ok := ctx.(IColumn_name_listContext); ok {
  12287. if j == i {
  12288. t = ctx.(antlr.RuleContext)
  12289. break
  12290. }
  12291. j++
  12292. }
  12293. }
  12294. if t == nil {
  12295. return nil
  12296. }
  12297. return t.(IColumn_name_listContext)
  12298. }
  12299. func (s *Upsert_clauseContext) GetRuleContext() antlr.RuleContext {
  12300. return s
  12301. }
  12302. func (s *Upsert_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  12303. return antlr.TreesStringTree(s, ruleNames, recog)
  12304. }
  12305. func (s *Upsert_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
  12306. if listenerT, ok := listener.(SQLiteParserListener); ok {
  12307. listenerT.EnterUpsert_clause(s)
  12308. }
  12309. }
  12310. func (s *Upsert_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
  12311. if listenerT, ok := listener.(SQLiteParserListener); ok {
  12312. listenerT.ExitUpsert_clause(s)
  12313. }
  12314. }
  12315. func (p *SQLiteParser) Upsert_clause() (localctx IUpsert_clauseContext) {
  12316. this := p
  12317. _ = this
  12318. localctx = NewUpsert_clauseContext(p, p.GetParserRuleContext(), p.GetState())
  12319. p.EnterRule(localctx, 76, SQLiteParserRULE_upsert_clause)
  12320. var _la int
  12321. defer func() {
  12322. p.ExitRule()
  12323. }()
  12324. defer func() {
  12325. if err := recover(); err != nil {
  12326. if v, ok := err.(antlr.RecognitionException); ok {
  12327. localctx.SetException(v)
  12328. p.GetErrorHandler().ReportError(p, v)
  12329. p.GetErrorHandler().Recover(p, v)
  12330. } else {
  12331. panic(err)
  12332. }
  12333. }
  12334. }()
  12335. p.EnterOuterAlt(localctx, 1)
  12336. {
  12337. p.SetState(1216)
  12338. p.Match(SQLiteParserON_)
  12339. }
  12340. {
  12341. p.SetState(1217)
  12342. p.Match(SQLiteParserCONFLICT_)
  12343. }
  12344. p.SetState(1232)
  12345. p.GetErrorHandler().Sync(p)
  12346. _la = p.GetTokenStream().LA(1)
  12347. if _la == SQLiteParserOPEN_PAR {
  12348. {
  12349. p.SetState(1218)
  12350. p.Match(SQLiteParserOPEN_PAR)
  12351. }
  12352. {
  12353. p.SetState(1219)
  12354. p.Indexed_column()
  12355. }
  12356. p.SetState(1224)
  12357. p.GetErrorHandler().Sync(p)
  12358. _la = p.GetTokenStream().LA(1)
  12359. for _la == SQLiteParserCOMMA {
  12360. {
  12361. p.SetState(1220)
  12362. p.Match(SQLiteParserCOMMA)
  12363. }
  12364. {
  12365. p.SetState(1221)
  12366. p.Indexed_column()
  12367. }
  12368. p.SetState(1226)
  12369. p.GetErrorHandler().Sync(p)
  12370. _la = p.GetTokenStream().LA(1)
  12371. }
  12372. {
  12373. p.SetState(1227)
  12374. p.Match(SQLiteParserCLOSE_PAR)
  12375. }
  12376. p.SetState(1230)
  12377. p.GetErrorHandler().Sync(p)
  12378. _la = p.GetTokenStream().LA(1)
  12379. if _la == SQLiteParserWHERE_ {
  12380. {
  12381. p.SetState(1228)
  12382. p.Match(SQLiteParserWHERE_)
  12383. }
  12384. {
  12385. p.SetState(1229)
  12386. p.expr(0)
  12387. }
  12388. }
  12389. }
  12390. {
  12391. p.SetState(1234)
  12392. p.Match(SQLiteParserDO_)
  12393. }
  12394. p.SetState(1261)
  12395. p.GetErrorHandler().Sync(p)
  12396. switch p.GetTokenStream().LA(1) {
  12397. case SQLiteParserNOTHING_:
  12398. {
  12399. p.SetState(1235)
  12400. p.Match(SQLiteParserNOTHING_)
  12401. }
  12402. case SQLiteParserUPDATE_:
  12403. {
  12404. p.SetState(1236)
  12405. p.Match(SQLiteParserUPDATE_)
  12406. }
  12407. {
  12408. p.SetState(1237)
  12409. p.Match(SQLiteParserSET_)
  12410. }
  12411. p.SetState(1240)
  12412. p.GetErrorHandler().Sync(p)
  12413. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 163, p.GetParserRuleContext()) {
  12414. case 1:
  12415. {
  12416. p.SetState(1238)
  12417. p.Column_name()
  12418. }
  12419. case 2:
  12420. {
  12421. p.SetState(1239)
  12422. p.Column_name_list()
  12423. }
  12424. }
  12425. {
  12426. p.SetState(1242)
  12427. p.Match(SQLiteParserASSIGN)
  12428. }
  12429. {
  12430. p.SetState(1243)
  12431. p.expr(0)
  12432. }
  12433. p.SetState(1254)
  12434. p.GetErrorHandler().Sync(p)
  12435. _la = p.GetTokenStream().LA(1)
  12436. for _la == SQLiteParserCOMMA {
  12437. {
  12438. p.SetState(1244)
  12439. p.Match(SQLiteParserCOMMA)
  12440. }
  12441. p.SetState(1247)
  12442. p.GetErrorHandler().Sync(p)
  12443. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 164, p.GetParserRuleContext()) {
  12444. case 1:
  12445. {
  12446. p.SetState(1245)
  12447. p.Column_name()
  12448. }
  12449. case 2:
  12450. {
  12451. p.SetState(1246)
  12452. p.Column_name_list()
  12453. }
  12454. }
  12455. {
  12456. p.SetState(1249)
  12457. p.Match(SQLiteParserASSIGN)
  12458. }
  12459. {
  12460. p.SetState(1250)
  12461. p.expr(0)
  12462. }
  12463. p.SetState(1256)
  12464. p.GetErrorHandler().Sync(p)
  12465. _la = p.GetTokenStream().LA(1)
  12466. }
  12467. p.SetState(1259)
  12468. p.GetErrorHandler().Sync(p)
  12469. _la = p.GetTokenStream().LA(1)
  12470. if _la == SQLiteParserWHERE_ {
  12471. {
  12472. p.SetState(1257)
  12473. p.Match(SQLiteParserWHERE_)
  12474. }
  12475. {
  12476. p.SetState(1258)
  12477. p.expr(0)
  12478. }
  12479. }
  12480. default:
  12481. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  12482. }
  12483. return localctx
  12484. }
  12485. // IPragma_stmtContext is an interface to support dynamic dispatch.
  12486. type IPragma_stmtContext interface {
  12487. antlr.ParserRuleContext
  12488. // GetParser returns the parser.
  12489. GetParser() antlr.Parser
  12490. // Getter signatures
  12491. PRAGMA_() antlr.TerminalNode
  12492. Pragma_name() IPragma_nameContext
  12493. Schema_name() ISchema_nameContext
  12494. DOT() antlr.TerminalNode
  12495. ASSIGN() antlr.TerminalNode
  12496. Pragma_value() IPragma_valueContext
  12497. OPEN_PAR() antlr.TerminalNode
  12498. CLOSE_PAR() antlr.TerminalNode
  12499. // IsPragma_stmtContext differentiates from other interfaces.
  12500. IsPragma_stmtContext()
  12501. }
  12502. type Pragma_stmtContext struct {
  12503. *antlr.BaseParserRuleContext
  12504. parser antlr.Parser
  12505. }
  12506. func NewEmptyPragma_stmtContext() *Pragma_stmtContext {
  12507. var p = new(Pragma_stmtContext)
  12508. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  12509. p.RuleIndex = SQLiteParserRULE_pragma_stmt
  12510. return p
  12511. }
  12512. func (*Pragma_stmtContext) IsPragma_stmtContext() {}
  12513. func NewPragma_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_stmtContext {
  12514. var p = new(Pragma_stmtContext)
  12515. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  12516. p.parser = parser
  12517. p.RuleIndex = SQLiteParserRULE_pragma_stmt
  12518. return p
  12519. }
  12520. func (s *Pragma_stmtContext) GetParser() antlr.Parser { return s.parser }
  12521. func (s *Pragma_stmtContext) PRAGMA_() antlr.TerminalNode {
  12522. return s.GetToken(SQLiteParserPRAGMA_, 0)
  12523. }
  12524. func (s *Pragma_stmtContext) Pragma_name() IPragma_nameContext {
  12525. var t antlr.RuleContext
  12526. for _, ctx := range s.GetChildren() {
  12527. if _, ok := ctx.(IPragma_nameContext); ok {
  12528. t = ctx.(antlr.RuleContext)
  12529. break
  12530. }
  12531. }
  12532. if t == nil {
  12533. return nil
  12534. }
  12535. return t.(IPragma_nameContext)
  12536. }
  12537. func (s *Pragma_stmtContext) Schema_name() ISchema_nameContext {
  12538. var t antlr.RuleContext
  12539. for _, ctx := range s.GetChildren() {
  12540. if _, ok := ctx.(ISchema_nameContext); ok {
  12541. t = ctx.(antlr.RuleContext)
  12542. break
  12543. }
  12544. }
  12545. if t == nil {
  12546. return nil
  12547. }
  12548. return t.(ISchema_nameContext)
  12549. }
  12550. func (s *Pragma_stmtContext) DOT() antlr.TerminalNode {
  12551. return s.GetToken(SQLiteParserDOT, 0)
  12552. }
  12553. func (s *Pragma_stmtContext) ASSIGN() antlr.TerminalNode {
  12554. return s.GetToken(SQLiteParserASSIGN, 0)
  12555. }
  12556. func (s *Pragma_stmtContext) Pragma_value() IPragma_valueContext {
  12557. var t antlr.RuleContext
  12558. for _, ctx := range s.GetChildren() {
  12559. if _, ok := ctx.(IPragma_valueContext); ok {
  12560. t = ctx.(antlr.RuleContext)
  12561. break
  12562. }
  12563. }
  12564. if t == nil {
  12565. return nil
  12566. }
  12567. return t.(IPragma_valueContext)
  12568. }
  12569. func (s *Pragma_stmtContext) OPEN_PAR() antlr.TerminalNode {
  12570. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  12571. }
  12572. func (s *Pragma_stmtContext) CLOSE_PAR() antlr.TerminalNode {
  12573. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  12574. }
  12575. func (s *Pragma_stmtContext) GetRuleContext() antlr.RuleContext {
  12576. return s
  12577. }
  12578. func (s *Pragma_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  12579. return antlr.TreesStringTree(s, ruleNames, recog)
  12580. }
  12581. func (s *Pragma_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  12582. if listenerT, ok := listener.(SQLiteParserListener); ok {
  12583. listenerT.EnterPragma_stmt(s)
  12584. }
  12585. }
  12586. func (s *Pragma_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  12587. if listenerT, ok := listener.(SQLiteParserListener); ok {
  12588. listenerT.ExitPragma_stmt(s)
  12589. }
  12590. }
  12591. func (p *SQLiteParser) Pragma_stmt() (localctx IPragma_stmtContext) {
  12592. this := p
  12593. _ = this
  12594. localctx = NewPragma_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  12595. p.EnterRule(localctx, 78, SQLiteParserRULE_pragma_stmt)
  12596. defer func() {
  12597. p.ExitRule()
  12598. }()
  12599. defer func() {
  12600. if err := recover(); err != nil {
  12601. if v, ok := err.(antlr.RecognitionException); ok {
  12602. localctx.SetException(v)
  12603. p.GetErrorHandler().ReportError(p, v)
  12604. p.GetErrorHandler().Recover(p, v)
  12605. } else {
  12606. panic(err)
  12607. }
  12608. }
  12609. }()
  12610. p.EnterOuterAlt(localctx, 1)
  12611. {
  12612. p.SetState(1263)
  12613. p.Match(SQLiteParserPRAGMA_)
  12614. }
  12615. p.SetState(1267)
  12616. p.GetErrorHandler().Sync(p)
  12617. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 168, p.GetParserRuleContext()) == 1 {
  12618. {
  12619. p.SetState(1264)
  12620. p.Schema_name()
  12621. }
  12622. {
  12623. p.SetState(1265)
  12624. p.Match(SQLiteParserDOT)
  12625. }
  12626. }
  12627. {
  12628. p.SetState(1269)
  12629. p.Pragma_name()
  12630. }
  12631. p.SetState(1276)
  12632. p.GetErrorHandler().Sync(p)
  12633. switch p.GetTokenStream().LA(1) {
  12634. case SQLiteParserASSIGN:
  12635. {
  12636. p.SetState(1270)
  12637. p.Match(SQLiteParserASSIGN)
  12638. }
  12639. {
  12640. p.SetState(1271)
  12641. p.Pragma_value()
  12642. }
  12643. case SQLiteParserOPEN_PAR:
  12644. {
  12645. p.SetState(1272)
  12646. p.Match(SQLiteParserOPEN_PAR)
  12647. }
  12648. {
  12649. p.SetState(1273)
  12650. p.Pragma_value()
  12651. }
  12652. {
  12653. p.SetState(1274)
  12654. p.Match(SQLiteParserCLOSE_PAR)
  12655. }
  12656. case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserDEFAULT_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXPLAIN_, SQLiteParserINSERT_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUPDATE_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWITH_:
  12657. default:
  12658. }
  12659. return localctx
  12660. }
  12661. // IPragma_valueContext is an interface to support dynamic dispatch.
  12662. type IPragma_valueContext interface {
  12663. antlr.ParserRuleContext
  12664. // GetParser returns the parser.
  12665. GetParser() antlr.Parser
  12666. // Getter signatures
  12667. Signed_number() ISigned_numberContext
  12668. Name() INameContext
  12669. STRING_LITERAL() antlr.TerminalNode
  12670. // IsPragma_valueContext differentiates from other interfaces.
  12671. IsPragma_valueContext()
  12672. }
  12673. type Pragma_valueContext struct {
  12674. *antlr.BaseParserRuleContext
  12675. parser antlr.Parser
  12676. }
  12677. func NewEmptyPragma_valueContext() *Pragma_valueContext {
  12678. var p = new(Pragma_valueContext)
  12679. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  12680. p.RuleIndex = SQLiteParserRULE_pragma_value
  12681. return p
  12682. }
  12683. func (*Pragma_valueContext) IsPragma_valueContext() {}
  12684. func NewPragma_valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_valueContext {
  12685. var p = new(Pragma_valueContext)
  12686. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  12687. p.parser = parser
  12688. p.RuleIndex = SQLiteParserRULE_pragma_value
  12689. return p
  12690. }
  12691. func (s *Pragma_valueContext) GetParser() antlr.Parser { return s.parser }
  12692. func (s *Pragma_valueContext) Signed_number() ISigned_numberContext {
  12693. var t antlr.RuleContext
  12694. for _, ctx := range s.GetChildren() {
  12695. if _, ok := ctx.(ISigned_numberContext); ok {
  12696. t = ctx.(antlr.RuleContext)
  12697. break
  12698. }
  12699. }
  12700. if t == nil {
  12701. return nil
  12702. }
  12703. return t.(ISigned_numberContext)
  12704. }
  12705. func (s *Pragma_valueContext) Name() INameContext {
  12706. var t antlr.RuleContext
  12707. for _, ctx := range s.GetChildren() {
  12708. if _, ok := ctx.(INameContext); ok {
  12709. t = ctx.(antlr.RuleContext)
  12710. break
  12711. }
  12712. }
  12713. if t == nil {
  12714. return nil
  12715. }
  12716. return t.(INameContext)
  12717. }
  12718. func (s *Pragma_valueContext) STRING_LITERAL() antlr.TerminalNode {
  12719. return s.GetToken(SQLiteParserSTRING_LITERAL, 0)
  12720. }
  12721. func (s *Pragma_valueContext) GetRuleContext() antlr.RuleContext {
  12722. return s
  12723. }
  12724. func (s *Pragma_valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  12725. return antlr.TreesStringTree(s, ruleNames, recog)
  12726. }
  12727. func (s *Pragma_valueContext) EnterRule(listener antlr.ParseTreeListener) {
  12728. if listenerT, ok := listener.(SQLiteParserListener); ok {
  12729. listenerT.EnterPragma_value(s)
  12730. }
  12731. }
  12732. func (s *Pragma_valueContext) ExitRule(listener antlr.ParseTreeListener) {
  12733. if listenerT, ok := listener.(SQLiteParserListener); ok {
  12734. listenerT.ExitPragma_value(s)
  12735. }
  12736. }
  12737. func (p *SQLiteParser) Pragma_value() (localctx IPragma_valueContext) {
  12738. this := p
  12739. _ = this
  12740. localctx = NewPragma_valueContext(p, p.GetParserRuleContext(), p.GetState())
  12741. p.EnterRule(localctx, 80, SQLiteParserRULE_pragma_value)
  12742. defer func() {
  12743. p.ExitRule()
  12744. }()
  12745. defer func() {
  12746. if err := recover(); err != nil {
  12747. if v, ok := err.(antlr.RecognitionException); ok {
  12748. localctx.SetException(v)
  12749. p.GetErrorHandler().ReportError(p, v)
  12750. p.GetErrorHandler().Recover(p, v)
  12751. } else {
  12752. panic(err)
  12753. }
  12754. }
  12755. }()
  12756. p.SetState(1281)
  12757. p.GetErrorHandler().Sync(p)
  12758. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 170, p.GetParserRuleContext()) {
  12759. case 1:
  12760. p.EnterOuterAlt(localctx, 1)
  12761. {
  12762. p.SetState(1278)
  12763. p.Signed_number()
  12764. }
  12765. case 2:
  12766. p.EnterOuterAlt(localctx, 2)
  12767. {
  12768. p.SetState(1279)
  12769. p.Name()
  12770. }
  12771. case 3:
  12772. p.EnterOuterAlt(localctx, 3)
  12773. {
  12774. p.SetState(1280)
  12775. p.Match(SQLiteParserSTRING_LITERAL)
  12776. }
  12777. }
  12778. return localctx
  12779. }
  12780. // IReindex_stmtContext is an interface to support dynamic dispatch.
  12781. type IReindex_stmtContext interface {
  12782. antlr.ParserRuleContext
  12783. // GetParser returns the parser.
  12784. GetParser() antlr.Parser
  12785. // Getter signatures
  12786. REINDEX_() antlr.TerminalNode
  12787. Collation_name() ICollation_nameContext
  12788. Table_name() ITable_nameContext
  12789. Index_name() IIndex_nameContext
  12790. Schema_name() ISchema_nameContext
  12791. DOT() antlr.TerminalNode
  12792. // IsReindex_stmtContext differentiates from other interfaces.
  12793. IsReindex_stmtContext()
  12794. }
  12795. type Reindex_stmtContext struct {
  12796. *antlr.BaseParserRuleContext
  12797. parser antlr.Parser
  12798. }
  12799. func NewEmptyReindex_stmtContext() *Reindex_stmtContext {
  12800. var p = new(Reindex_stmtContext)
  12801. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  12802. p.RuleIndex = SQLiteParserRULE_reindex_stmt
  12803. return p
  12804. }
  12805. func (*Reindex_stmtContext) IsReindex_stmtContext() {}
  12806. func NewReindex_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Reindex_stmtContext {
  12807. var p = new(Reindex_stmtContext)
  12808. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  12809. p.parser = parser
  12810. p.RuleIndex = SQLiteParserRULE_reindex_stmt
  12811. return p
  12812. }
  12813. func (s *Reindex_stmtContext) GetParser() antlr.Parser { return s.parser }
  12814. func (s *Reindex_stmtContext) REINDEX_() antlr.TerminalNode {
  12815. return s.GetToken(SQLiteParserREINDEX_, 0)
  12816. }
  12817. func (s *Reindex_stmtContext) Collation_name() ICollation_nameContext {
  12818. var t antlr.RuleContext
  12819. for _, ctx := range s.GetChildren() {
  12820. if _, ok := ctx.(ICollation_nameContext); ok {
  12821. t = ctx.(antlr.RuleContext)
  12822. break
  12823. }
  12824. }
  12825. if t == nil {
  12826. return nil
  12827. }
  12828. return t.(ICollation_nameContext)
  12829. }
  12830. func (s *Reindex_stmtContext) Table_name() ITable_nameContext {
  12831. var t antlr.RuleContext
  12832. for _, ctx := range s.GetChildren() {
  12833. if _, ok := ctx.(ITable_nameContext); ok {
  12834. t = ctx.(antlr.RuleContext)
  12835. break
  12836. }
  12837. }
  12838. if t == nil {
  12839. return nil
  12840. }
  12841. return t.(ITable_nameContext)
  12842. }
  12843. func (s *Reindex_stmtContext) Index_name() IIndex_nameContext {
  12844. var t antlr.RuleContext
  12845. for _, ctx := range s.GetChildren() {
  12846. if _, ok := ctx.(IIndex_nameContext); ok {
  12847. t = ctx.(antlr.RuleContext)
  12848. break
  12849. }
  12850. }
  12851. if t == nil {
  12852. return nil
  12853. }
  12854. return t.(IIndex_nameContext)
  12855. }
  12856. func (s *Reindex_stmtContext) Schema_name() ISchema_nameContext {
  12857. var t antlr.RuleContext
  12858. for _, ctx := range s.GetChildren() {
  12859. if _, ok := ctx.(ISchema_nameContext); ok {
  12860. t = ctx.(antlr.RuleContext)
  12861. break
  12862. }
  12863. }
  12864. if t == nil {
  12865. return nil
  12866. }
  12867. return t.(ISchema_nameContext)
  12868. }
  12869. func (s *Reindex_stmtContext) DOT() antlr.TerminalNode {
  12870. return s.GetToken(SQLiteParserDOT, 0)
  12871. }
  12872. func (s *Reindex_stmtContext) GetRuleContext() antlr.RuleContext {
  12873. return s
  12874. }
  12875. func (s *Reindex_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  12876. return antlr.TreesStringTree(s, ruleNames, recog)
  12877. }
  12878. func (s *Reindex_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  12879. if listenerT, ok := listener.(SQLiteParserListener); ok {
  12880. listenerT.EnterReindex_stmt(s)
  12881. }
  12882. }
  12883. func (s *Reindex_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  12884. if listenerT, ok := listener.(SQLiteParserListener); ok {
  12885. listenerT.ExitReindex_stmt(s)
  12886. }
  12887. }
  12888. func (p *SQLiteParser) Reindex_stmt() (localctx IReindex_stmtContext) {
  12889. this := p
  12890. _ = this
  12891. localctx = NewReindex_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  12892. p.EnterRule(localctx, 82, SQLiteParserRULE_reindex_stmt)
  12893. defer func() {
  12894. p.ExitRule()
  12895. }()
  12896. defer func() {
  12897. if err := recover(); err != nil {
  12898. if v, ok := err.(antlr.RecognitionException); ok {
  12899. localctx.SetException(v)
  12900. p.GetErrorHandler().ReportError(p, v)
  12901. p.GetErrorHandler().Recover(p, v)
  12902. } else {
  12903. panic(err)
  12904. }
  12905. }
  12906. }()
  12907. p.EnterOuterAlt(localctx, 1)
  12908. {
  12909. p.SetState(1283)
  12910. p.Match(SQLiteParserREINDEX_)
  12911. }
  12912. p.SetState(1294)
  12913. p.GetErrorHandler().Sync(p)
  12914. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 173, p.GetParserRuleContext()) == 1 {
  12915. {
  12916. p.SetState(1284)
  12917. p.Collation_name()
  12918. }
  12919. } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 173, p.GetParserRuleContext()) == 2 {
  12920. p.SetState(1288)
  12921. p.GetErrorHandler().Sync(p)
  12922. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 171, p.GetParserRuleContext()) == 1 {
  12923. {
  12924. p.SetState(1285)
  12925. p.Schema_name()
  12926. }
  12927. {
  12928. p.SetState(1286)
  12929. p.Match(SQLiteParserDOT)
  12930. }
  12931. }
  12932. p.SetState(1292)
  12933. p.GetErrorHandler().Sync(p)
  12934. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 172, p.GetParserRuleContext()) {
  12935. case 1:
  12936. {
  12937. p.SetState(1290)
  12938. p.Table_name()
  12939. }
  12940. case 2:
  12941. {
  12942. p.SetState(1291)
  12943. p.Index_name()
  12944. }
  12945. }
  12946. }
  12947. return localctx
  12948. }
  12949. // ISelect_stmtContext is an interface to support dynamic dispatch.
  12950. type ISelect_stmtContext interface {
  12951. antlr.ParserRuleContext
  12952. // GetParser returns the parser.
  12953. GetParser() antlr.Parser
  12954. // Getter signatures
  12955. AllSelect_core() []ISelect_coreContext
  12956. Select_core(i int) ISelect_coreContext
  12957. Common_table_stmt() ICommon_table_stmtContext
  12958. AllCompound_operator() []ICompound_operatorContext
  12959. Compound_operator(i int) ICompound_operatorContext
  12960. Order_by_stmt() IOrder_by_stmtContext
  12961. Limit_stmt() ILimit_stmtContext
  12962. // IsSelect_stmtContext differentiates from other interfaces.
  12963. IsSelect_stmtContext()
  12964. }
  12965. type Select_stmtContext struct {
  12966. *antlr.BaseParserRuleContext
  12967. parser antlr.Parser
  12968. }
  12969. func NewEmptySelect_stmtContext() *Select_stmtContext {
  12970. var p = new(Select_stmtContext)
  12971. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  12972. p.RuleIndex = SQLiteParserRULE_select_stmt
  12973. return p
  12974. }
  12975. func (*Select_stmtContext) IsSelect_stmtContext() {}
  12976. func NewSelect_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Select_stmtContext {
  12977. var p = new(Select_stmtContext)
  12978. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  12979. p.parser = parser
  12980. p.RuleIndex = SQLiteParserRULE_select_stmt
  12981. return p
  12982. }
  12983. func (s *Select_stmtContext) GetParser() antlr.Parser { return s.parser }
  12984. func (s *Select_stmtContext) AllSelect_core() []ISelect_coreContext {
  12985. children := s.GetChildren()
  12986. len := 0
  12987. for _, ctx := range children {
  12988. if _, ok := ctx.(ISelect_coreContext); ok {
  12989. len++
  12990. }
  12991. }
  12992. tst := make([]ISelect_coreContext, len)
  12993. i := 0
  12994. for _, ctx := range children {
  12995. if t, ok := ctx.(ISelect_coreContext); ok {
  12996. tst[i] = t.(ISelect_coreContext)
  12997. i++
  12998. }
  12999. }
  13000. return tst
  13001. }
  13002. func (s *Select_stmtContext) Select_core(i int) ISelect_coreContext {
  13003. var t antlr.RuleContext
  13004. j := 0
  13005. for _, ctx := range s.GetChildren() {
  13006. if _, ok := ctx.(ISelect_coreContext); ok {
  13007. if j == i {
  13008. t = ctx.(antlr.RuleContext)
  13009. break
  13010. }
  13011. j++
  13012. }
  13013. }
  13014. if t == nil {
  13015. return nil
  13016. }
  13017. return t.(ISelect_coreContext)
  13018. }
  13019. func (s *Select_stmtContext) Common_table_stmt() ICommon_table_stmtContext {
  13020. var t antlr.RuleContext
  13021. for _, ctx := range s.GetChildren() {
  13022. if _, ok := ctx.(ICommon_table_stmtContext); ok {
  13023. t = ctx.(antlr.RuleContext)
  13024. break
  13025. }
  13026. }
  13027. if t == nil {
  13028. return nil
  13029. }
  13030. return t.(ICommon_table_stmtContext)
  13031. }
  13032. func (s *Select_stmtContext) AllCompound_operator() []ICompound_operatorContext {
  13033. children := s.GetChildren()
  13034. len := 0
  13035. for _, ctx := range children {
  13036. if _, ok := ctx.(ICompound_operatorContext); ok {
  13037. len++
  13038. }
  13039. }
  13040. tst := make([]ICompound_operatorContext, len)
  13041. i := 0
  13042. for _, ctx := range children {
  13043. if t, ok := ctx.(ICompound_operatorContext); ok {
  13044. tst[i] = t.(ICompound_operatorContext)
  13045. i++
  13046. }
  13047. }
  13048. return tst
  13049. }
  13050. func (s *Select_stmtContext) Compound_operator(i int) ICompound_operatorContext {
  13051. var t antlr.RuleContext
  13052. j := 0
  13053. for _, ctx := range s.GetChildren() {
  13054. if _, ok := ctx.(ICompound_operatorContext); ok {
  13055. if j == i {
  13056. t = ctx.(antlr.RuleContext)
  13057. break
  13058. }
  13059. j++
  13060. }
  13061. }
  13062. if t == nil {
  13063. return nil
  13064. }
  13065. return t.(ICompound_operatorContext)
  13066. }
  13067. func (s *Select_stmtContext) Order_by_stmt() IOrder_by_stmtContext {
  13068. var t antlr.RuleContext
  13069. for _, ctx := range s.GetChildren() {
  13070. if _, ok := ctx.(IOrder_by_stmtContext); ok {
  13071. t = ctx.(antlr.RuleContext)
  13072. break
  13073. }
  13074. }
  13075. if t == nil {
  13076. return nil
  13077. }
  13078. return t.(IOrder_by_stmtContext)
  13079. }
  13080. func (s *Select_stmtContext) Limit_stmt() ILimit_stmtContext {
  13081. var t antlr.RuleContext
  13082. for _, ctx := range s.GetChildren() {
  13083. if _, ok := ctx.(ILimit_stmtContext); ok {
  13084. t = ctx.(antlr.RuleContext)
  13085. break
  13086. }
  13087. }
  13088. if t == nil {
  13089. return nil
  13090. }
  13091. return t.(ILimit_stmtContext)
  13092. }
  13093. func (s *Select_stmtContext) GetRuleContext() antlr.RuleContext {
  13094. return s
  13095. }
  13096. func (s *Select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  13097. return antlr.TreesStringTree(s, ruleNames, recog)
  13098. }
  13099. func (s *Select_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  13100. if listenerT, ok := listener.(SQLiteParserListener); ok {
  13101. listenerT.EnterSelect_stmt(s)
  13102. }
  13103. }
  13104. func (s *Select_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  13105. if listenerT, ok := listener.(SQLiteParserListener); ok {
  13106. listenerT.ExitSelect_stmt(s)
  13107. }
  13108. }
  13109. func (p *SQLiteParser) Select_stmt() (localctx ISelect_stmtContext) {
  13110. this := p
  13111. _ = this
  13112. localctx = NewSelect_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  13113. p.EnterRule(localctx, 84, SQLiteParserRULE_select_stmt)
  13114. var _la int
  13115. defer func() {
  13116. p.ExitRule()
  13117. }()
  13118. defer func() {
  13119. if err := recover(); err != nil {
  13120. if v, ok := err.(antlr.RecognitionException); ok {
  13121. localctx.SetException(v)
  13122. p.GetErrorHandler().ReportError(p, v)
  13123. p.GetErrorHandler().Recover(p, v)
  13124. } else {
  13125. panic(err)
  13126. }
  13127. }
  13128. }()
  13129. var _alt int
  13130. p.EnterOuterAlt(localctx, 1)
  13131. p.SetState(1297)
  13132. p.GetErrorHandler().Sync(p)
  13133. _la = p.GetTokenStream().LA(1)
  13134. if _la == SQLiteParserWITH_ {
  13135. {
  13136. p.SetState(1296)
  13137. p.Common_table_stmt()
  13138. }
  13139. }
  13140. {
  13141. p.SetState(1299)
  13142. p.Select_core()
  13143. }
  13144. p.SetState(1305)
  13145. p.GetErrorHandler().Sync(p)
  13146. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 175, p.GetParserRuleContext())
  13147. for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
  13148. if _alt == 1 {
  13149. {
  13150. p.SetState(1300)
  13151. p.Compound_operator()
  13152. }
  13153. {
  13154. p.SetState(1301)
  13155. p.Select_core()
  13156. }
  13157. }
  13158. p.SetState(1307)
  13159. p.GetErrorHandler().Sync(p)
  13160. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 175, p.GetParserRuleContext())
  13161. }
  13162. p.SetState(1309)
  13163. p.GetErrorHandler().Sync(p)
  13164. _la = p.GetTokenStream().LA(1)
  13165. if _la == SQLiteParserORDER_ {
  13166. {
  13167. p.SetState(1308)
  13168. p.Order_by_stmt()
  13169. }
  13170. }
  13171. p.SetState(1312)
  13172. p.GetErrorHandler().Sync(p)
  13173. _la = p.GetTokenStream().LA(1)
  13174. if _la == SQLiteParserLIMIT_ {
  13175. {
  13176. p.SetState(1311)
  13177. p.Limit_stmt()
  13178. }
  13179. }
  13180. return localctx
  13181. }
  13182. // IJoin_clauseContext is an interface to support dynamic dispatch.
  13183. type IJoin_clauseContext interface {
  13184. antlr.ParserRuleContext
  13185. // GetParser returns the parser.
  13186. GetParser() antlr.Parser
  13187. // Getter signatures
  13188. AllTable_or_subquery() []ITable_or_subqueryContext
  13189. Table_or_subquery(i int) ITable_or_subqueryContext
  13190. AllJoin_operator() []IJoin_operatorContext
  13191. Join_operator(i int) IJoin_operatorContext
  13192. AllJoin_constraint() []IJoin_constraintContext
  13193. Join_constraint(i int) IJoin_constraintContext
  13194. // IsJoin_clauseContext differentiates from other interfaces.
  13195. IsJoin_clauseContext()
  13196. }
  13197. type Join_clauseContext struct {
  13198. *antlr.BaseParserRuleContext
  13199. parser antlr.Parser
  13200. }
  13201. func NewEmptyJoin_clauseContext() *Join_clauseContext {
  13202. var p = new(Join_clauseContext)
  13203. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  13204. p.RuleIndex = SQLiteParserRULE_join_clause
  13205. return p
  13206. }
  13207. func (*Join_clauseContext) IsJoin_clauseContext() {}
  13208. func NewJoin_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_clauseContext {
  13209. var p = new(Join_clauseContext)
  13210. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  13211. p.parser = parser
  13212. p.RuleIndex = SQLiteParserRULE_join_clause
  13213. return p
  13214. }
  13215. func (s *Join_clauseContext) GetParser() antlr.Parser { return s.parser }
  13216. func (s *Join_clauseContext) AllTable_or_subquery() []ITable_or_subqueryContext {
  13217. children := s.GetChildren()
  13218. len := 0
  13219. for _, ctx := range children {
  13220. if _, ok := ctx.(ITable_or_subqueryContext); ok {
  13221. len++
  13222. }
  13223. }
  13224. tst := make([]ITable_or_subqueryContext, len)
  13225. i := 0
  13226. for _, ctx := range children {
  13227. if t, ok := ctx.(ITable_or_subqueryContext); ok {
  13228. tst[i] = t.(ITable_or_subqueryContext)
  13229. i++
  13230. }
  13231. }
  13232. return tst
  13233. }
  13234. func (s *Join_clauseContext) Table_or_subquery(i int) ITable_or_subqueryContext {
  13235. var t antlr.RuleContext
  13236. j := 0
  13237. for _, ctx := range s.GetChildren() {
  13238. if _, ok := ctx.(ITable_or_subqueryContext); ok {
  13239. if j == i {
  13240. t = ctx.(antlr.RuleContext)
  13241. break
  13242. }
  13243. j++
  13244. }
  13245. }
  13246. if t == nil {
  13247. return nil
  13248. }
  13249. return t.(ITable_or_subqueryContext)
  13250. }
  13251. func (s *Join_clauseContext) AllJoin_operator() []IJoin_operatorContext {
  13252. children := s.GetChildren()
  13253. len := 0
  13254. for _, ctx := range children {
  13255. if _, ok := ctx.(IJoin_operatorContext); ok {
  13256. len++
  13257. }
  13258. }
  13259. tst := make([]IJoin_operatorContext, len)
  13260. i := 0
  13261. for _, ctx := range children {
  13262. if t, ok := ctx.(IJoin_operatorContext); ok {
  13263. tst[i] = t.(IJoin_operatorContext)
  13264. i++
  13265. }
  13266. }
  13267. return tst
  13268. }
  13269. func (s *Join_clauseContext) Join_operator(i int) IJoin_operatorContext {
  13270. var t antlr.RuleContext
  13271. j := 0
  13272. for _, ctx := range s.GetChildren() {
  13273. if _, ok := ctx.(IJoin_operatorContext); ok {
  13274. if j == i {
  13275. t = ctx.(antlr.RuleContext)
  13276. break
  13277. }
  13278. j++
  13279. }
  13280. }
  13281. if t == nil {
  13282. return nil
  13283. }
  13284. return t.(IJoin_operatorContext)
  13285. }
  13286. func (s *Join_clauseContext) AllJoin_constraint() []IJoin_constraintContext {
  13287. children := s.GetChildren()
  13288. len := 0
  13289. for _, ctx := range children {
  13290. if _, ok := ctx.(IJoin_constraintContext); ok {
  13291. len++
  13292. }
  13293. }
  13294. tst := make([]IJoin_constraintContext, len)
  13295. i := 0
  13296. for _, ctx := range children {
  13297. if t, ok := ctx.(IJoin_constraintContext); ok {
  13298. tst[i] = t.(IJoin_constraintContext)
  13299. i++
  13300. }
  13301. }
  13302. return tst
  13303. }
  13304. func (s *Join_clauseContext) Join_constraint(i int) IJoin_constraintContext {
  13305. var t antlr.RuleContext
  13306. j := 0
  13307. for _, ctx := range s.GetChildren() {
  13308. if _, ok := ctx.(IJoin_constraintContext); ok {
  13309. if j == i {
  13310. t = ctx.(antlr.RuleContext)
  13311. break
  13312. }
  13313. j++
  13314. }
  13315. }
  13316. if t == nil {
  13317. return nil
  13318. }
  13319. return t.(IJoin_constraintContext)
  13320. }
  13321. func (s *Join_clauseContext) GetRuleContext() antlr.RuleContext {
  13322. return s
  13323. }
  13324. func (s *Join_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  13325. return antlr.TreesStringTree(s, ruleNames, recog)
  13326. }
  13327. func (s *Join_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
  13328. if listenerT, ok := listener.(SQLiteParserListener); ok {
  13329. listenerT.EnterJoin_clause(s)
  13330. }
  13331. }
  13332. func (s *Join_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
  13333. if listenerT, ok := listener.(SQLiteParserListener); ok {
  13334. listenerT.ExitJoin_clause(s)
  13335. }
  13336. }
  13337. func (p *SQLiteParser) Join_clause() (localctx IJoin_clauseContext) {
  13338. this := p
  13339. _ = this
  13340. localctx = NewJoin_clauseContext(p, p.GetParserRuleContext(), p.GetState())
  13341. p.EnterRule(localctx, 86, SQLiteParserRULE_join_clause)
  13342. var _la int
  13343. defer func() {
  13344. p.ExitRule()
  13345. }()
  13346. defer func() {
  13347. if err := recover(); err != nil {
  13348. if v, ok := err.(antlr.RecognitionException); ok {
  13349. localctx.SetException(v)
  13350. p.GetErrorHandler().ReportError(p, v)
  13351. p.GetErrorHandler().Recover(p, v)
  13352. } else {
  13353. panic(err)
  13354. }
  13355. }
  13356. }()
  13357. p.EnterOuterAlt(localctx, 1)
  13358. {
  13359. p.SetState(1314)
  13360. p.Table_or_subquery()
  13361. }
  13362. p.SetState(1321)
  13363. p.GetErrorHandler().Sync(p)
  13364. _la = p.GetTokenStream().LA(1)
  13365. for _la == SQLiteParserCOMMA || _la == SQLiteParserCROSS_ || ((int64((_la-78)) & ^0x3f) == 0 && ((int64(1)<<(_la-78))&562949971511297) != 0) {
  13366. {
  13367. p.SetState(1315)
  13368. p.Join_operator()
  13369. }
  13370. {
  13371. p.SetState(1316)
  13372. p.Table_or_subquery()
  13373. }
  13374. {
  13375. p.SetState(1317)
  13376. p.Join_constraint()
  13377. }
  13378. p.SetState(1323)
  13379. p.GetErrorHandler().Sync(p)
  13380. _la = p.GetTokenStream().LA(1)
  13381. }
  13382. return localctx
  13383. }
  13384. // ISelect_coreContext is an interface to support dynamic dispatch.
  13385. type ISelect_coreContext interface {
  13386. antlr.ParserRuleContext
  13387. // GetParser returns the parser.
  13388. GetParser() antlr.Parser
  13389. // Getter signatures
  13390. SELECT_() antlr.TerminalNode
  13391. AllResult_column() []IResult_columnContext
  13392. Result_column(i int) IResult_columnContext
  13393. AllCOMMA() []antlr.TerminalNode
  13394. COMMA(i int) antlr.TerminalNode
  13395. FROM_() antlr.TerminalNode
  13396. WHERE_() antlr.TerminalNode
  13397. AllExpr() []IExprContext
  13398. Expr(i int) IExprContext
  13399. GROUP_() antlr.TerminalNode
  13400. BY_() antlr.TerminalNode
  13401. WINDOW_() antlr.TerminalNode
  13402. AllWindow_name() []IWindow_nameContext
  13403. Window_name(i int) IWindow_nameContext
  13404. AllAS_() []antlr.TerminalNode
  13405. AS_(i int) antlr.TerminalNode
  13406. AllWindow_defn() []IWindow_defnContext
  13407. Window_defn(i int) IWindow_defnContext
  13408. DISTINCT_() antlr.TerminalNode
  13409. ALL_() antlr.TerminalNode
  13410. AllTable_or_subquery() []ITable_or_subqueryContext
  13411. Table_or_subquery(i int) ITable_or_subqueryContext
  13412. Join_clause() IJoin_clauseContext
  13413. HAVING_() antlr.TerminalNode
  13414. VALUES_() antlr.TerminalNode
  13415. AllOPEN_PAR() []antlr.TerminalNode
  13416. OPEN_PAR(i int) antlr.TerminalNode
  13417. AllCLOSE_PAR() []antlr.TerminalNode
  13418. CLOSE_PAR(i int) antlr.TerminalNode
  13419. // IsSelect_coreContext differentiates from other interfaces.
  13420. IsSelect_coreContext()
  13421. }
  13422. type Select_coreContext struct {
  13423. *antlr.BaseParserRuleContext
  13424. parser antlr.Parser
  13425. }
  13426. func NewEmptySelect_coreContext() *Select_coreContext {
  13427. var p = new(Select_coreContext)
  13428. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  13429. p.RuleIndex = SQLiteParserRULE_select_core
  13430. return p
  13431. }
  13432. func (*Select_coreContext) IsSelect_coreContext() {}
  13433. func NewSelect_coreContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Select_coreContext {
  13434. var p = new(Select_coreContext)
  13435. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  13436. p.parser = parser
  13437. p.RuleIndex = SQLiteParserRULE_select_core
  13438. return p
  13439. }
  13440. func (s *Select_coreContext) GetParser() antlr.Parser { return s.parser }
  13441. func (s *Select_coreContext) SELECT_() antlr.TerminalNode {
  13442. return s.GetToken(SQLiteParserSELECT_, 0)
  13443. }
  13444. func (s *Select_coreContext) AllResult_column() []IResult_columnContext {
  13445. children := s.GetChildren()
  13446. len := 0
  13447. for _, ctx := range children {
  13448. if _, ok := ctx.(IResult_columnContext); ok {
  13449. len++
  13450. }
  13451. }
  13452. tst := make([]IResult_columnContext, len)
  13453. i := 0
  13454. for _, ctx := range children {
  13455. if t, ok := ctx.(IResult_columnContext); ok {
  13456. tst[i] = t.(IResult_columnContext)
  13457. i++
  13458. }
  13459. }
  13460. return tst
  13461. }
  13462. func (s *Select_coreContext) Result_column(i int) IResult_columnContext {
  13463. var t antlr.RuleContext
  13464. j := 0
  13465. for _, ctx := range s.GetChildren() {
  13466. if _, ok := ctx.(IResult_columnContext); ok {
  13467. if j == i {
  13468. t = ctx.(antlr.RuleContext)
  13469. break
  13470. }
  13471. j++
  13472. }
  13473. }
  13474. if t == nil {
  13475. return nil
  13476. }
  13477. return t.(IResult_columnContext)
  13478. }
  13479. func (s *Select_coreContext) AllCOMMA() []antlr.TerminalNode {
  13480. return s.GetTokens(SQLiteParserCOMMA)
  13481. }
  13482. func (s *Select_coreContext) COMMA(i int) antlr.TerminalNode {
  13483. return s.GetToken(SQLiteParserCOMMA, i)
  13484. }
  13485. func (s *Select_coreContext) FROM_() antlr.TerminalNode {
  13486. return s.GetToken(SQLiteParserFROM_, 0)
  13487. }
  13488. func (s *Select_coreContext) WHERE_() antlr.TerminalNode {
  13489. return s.GetToken(SQLiteParserWHERE_, 0)
  13490. }
  13491. func (s *Select_coreContext) AllExpr() []IExprContext {
  13492. children := s.GetChildren()
  13493. len := 0
  13494. for _, ctx := range children {
  13495. if _, ok := ctx.(IExprContext); ok {
  13496. len++
  13497. }
  13498. }
  13499. tst := make([]IExprContext, len)
  13500. i := 0
  13501. for _, ctx := range children {
  13502. if t, ok := ctx.(IExprContext); ok {
  13503. tst[i] = t.(IExprContext)
  13504. i++
  13505. }
  13506. }
  13507. return tst
  13508. }
  13509. func (s *Select_coreContext) Expr(i int) IExprContext {
  13510. var t antlr.RuleContext
  13511. j := 0
  13512. for _, ctx := range s.GetChildren() {
  13513. if _, ok := ctx.(IExprContext); ok {
  13514. if j == i {
  13515. t = ctx.(antlr.RuleContext)
  13516. break
  13517. }
  13518. j++
  13519. }
  13520. }
  13521. if t == nil {
  13522. return nil
  13523. }
  13524. return t.(IExprContext)
  13525. }
  13526. func (s *Select_coreContext) GROUP_() antlr.TerminalNode {
  13527. return s.GetToken(SQLiteParserGROUP_, 0)
  13528. }
  13529. func (s *Select_coreContext) BY_() antlr.TerminalNode {
  13530. return s.GetToken(SQLiteParserBY_, 0)
  13531. }
  13532. func (s *Select_coreContext) WINDOW_() antlr.TerminalNode {
  13533. return s.GetToken(SQLiteParserWINDOW_, 0)
  13534. }
  13535. func (s *Select_coreContext) AllWindow_name() []IWindow_nameContext {
  13536. children := s.GetChildren()
  13537. len := 0
  13538. for _, ctx := range children {
  13539. if _, ok := ctx.(IWindow_nameContext); ok {
  13540. len++
  13541. }
  13542. }
  13543. tst := make([]IWindow_nameContext, len)
  13544. i := 0
  13545. for _, ctx := range children {
  13546. if t, ok := ctx.(IWindow_nameContext); ok {
  13547. tst[i] = t.(IWindow_nameContext)
  13548. i++
  13549. }
  13550. }
  13551. return tst
  13552. }
  13553. func (s *Select_coreContext) Window_name(i int) IWindow_nameContext {
  13554. var t antlr.RuleContext
  13555. j := 0
  13556. for _, ctx := range s.GetChildren() {
  13557. if _, ok := ctx.(IWindow_nameContext); ok {
  13558. if j == i {
  13559. t = ctx.(antlr.RuleContext)
  13560. break
  13561. }
  13562. j++
  13563. }
  13564. }
  13565. if t == nil {
  13566. return nil
  13567. }
  13568. return t.(IWindow_nameContext)
  13569. }
  13570. func (s *Select_coreContext) AllAS_() []antlr.TerminalNode {
  13571. return s.GetTokens(SQLiteParserAS_)
  13572. }
  13573. func (s *Select_coreContext) AS_(i int) antlr.TerminalNode {
  13574. return s.GetToken(SQLiteParserAS_, i)
  13575. }
  13576. func (s *Select_coreContext) AllWindow_defn() []IWindow_defnContext {
  13577. children := s.GetChildren()
  13578. len := 0
  13579. for _, ctx := range children {
  13580. if _, ok := ctx.(IWindow_defnContext); ok {
  13581. len++
  13582. }
  13583. }
  13584. tst := make([]IWindow_defnContext, len)
  13585. i := 0
  13586. for _, ctx := range children {
  13587. if t, ok := ctx.(IWindow_defnContext); ok {
  13588. tst[i] = t.(IWindow_defnContext)
  13589. i++
  13590. }
  13591. }
  13592. return tst
  13593. }
  13594. func (s *Select_coreContext) Window_defn(i int) IWindow_defnContext {
  13595. var t antlr.RuleContext
  13596. j := 0
  13597. for _, ctx := range s.GetChildren() {
  13598. if _, ok := ctx.(IWindow_defnContext); ok {
  13599. if j == i {
  13600. t = ctx.(antlr.RuleContext)
  13601. break
  13602. }
  13603. j++
  13604. }
  13605. }
  13606. if t == nil {
  13607. return nil
  13608. }
  13609. return t.(IWindow_defnContext)
  13610. }
  13611. func (s *Select_coreContext) DISTINCT_() antlr.TerminalNode {
  13612. return s.GetToken(SQLiteParserDISTINCT_, 0)
  13613. }
  13614. func (s *Select_coreContext) ALL_() antlr.TerminalNode {
  13615. return s.GetToken(SQLiteParserALL_, 0)
  13616. }
  13617. func (s *Select_coreContext) AllTable_or_subquery() []ITable_or_subqueryContext {
  13618. children := s.GetChildren()
  13619. len := 0
  13620. for _, ctx := range children {
  13621. if _, ok := ctx.(ITable_or_subqueryContext); ok {
  13622. len++
  13623. }
  13624. }
  13625. tst := make([]ITable_or_subqueryContext, len)
  13626. i := 0
  13627. for _, ctx := range children {
  13628. if t, ok := ctx.(ITable_or_subqueryContext); ok {
  13629. tst[i] = t.(ITable_or_subqueryContext)
  13630. i++
  13631. }
  13632. }
  13633. return tst
  13634. }
  13635. func (s *Select_coreContext) Table_or_subquery(i int) ITable_or_subqueryContext {
  13636. var t antlr.RuleContext
  13637. j := 0
  13638. for _, ctx := range s.GetChildren() {
  13639. if _, ok := ctx.(ITable_or_subqueryContext); ok {
  13640. if j == i {
  13641. t = ctx.(antlr.RuleContext)
  13642. break
  13643. }
  13644. j++
  13645. }
  13646. }
  13647. if t == nil {
  13648. return nil
  13649. }
  13650. return t.(ITable_or_subqueryContext)
  13651. }
  13652. func (s *Select_coreContext) Join_clause() IJoin_clauseContext {
  13653. var t antlr.RuleContext
  13654. for _, ctx := range s.GetChildren() {
  13655. if _, ok := ctx.(IJoin_clauseContext); ok {
  13656. t = ctx.(antlr.RuleContext)
  13657. break
  13658. }
  13659. }
  13660. if t == nil {
  13661. return nil
  13662. }
  13663. return t.(IJoin_clauseContext)
  13664. }
  13665. func (s *Select_coreContext) HAVING_() antlr.TerminalNode {
  13666. return s.GetToken(SQLiteParserHAVING_, 0)
  13667. }
  13668. func (s *Select_coreContext) VALUES_() antlr.TerminalNode {
  13669. return s.GetToken(SQLiteParserVALUES_, 0)
  13670. }
  13671. func (s *Select_coreContext) AllOPEN_PAR() []antlr.TerminalNode {
  13672. return s.GetTokens(SQLiteParserOPEN_PAR)
  13673. }
  13674. func (s *Select_coreContext) OPEN_PAR(i int) antlr.TerminalNode {
  13675. return s.GetToken(SQLiteParserOPEN_PAR, i)
  13676. }
  13677. func (s *Select_coreContext) AllCLOSE_PAR() []antlr.TerminalNode {
  13678. return s.GetTokens(SQLiteParserCLOSE_PAR)
  13679. }
  13680. func (s *Select_coreContext) CLOSE_PAR(i int) antlr.TerminalNode {
  13681. return s.GetToken(SQLiteParserCLOSE_PAR, i)
  13682. }
  13683. func (s *Select_coreContext) GetRuleContext() antlr.RuleContext {
  13684. return s
  13685. }
  13686. func (s *Select_coreContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  13687. return antlr.TreesStringTree(s, ruleNames, recog)
  13688. }
  13689. func (s *Select_coreContext) EnterRule(listener antlr.ParseTreeListener) {
  13690. if listenerT, ok := listener.(SQLiteParserListener); ok {
  13691. listenerT.EnterSelect_core(s)
  13692. }
  13693. }
  13694. func (s *Select_coreContext) ExitRule(listener antlr.ParseTreeListener) {
  13695. if listenerT, ok := listener.(SQLiteParserListener); ok {
  13696. listenerT.ExitSelect_core(s)
  13697. }
  13698. }
  13699. func (p *SQLiteParser) Select_core() (localctx ISelect_coreContext) {
  13700. this := p
  13701. _ = this
  13702. localctx = NewSelect_coreContext(p, p.GetParserRuleContext(), p.GetState())
  13703. p.EnterRule(localctx, 88, SQLiteParserRULE_select_core)
  13704. var _la int
  13705. defer func() {
  13706. p.ExitRule()
  13707. }()
  13708. defer func() {
  13709. if err := recover(); err != nil {
  13710. if v, ok := err.(antlr.RecognitionException); ok {
  13711. localctx.SetException(v)
  13712. p.GetErrorHandler().ReportError(p, v)
  13713. p.GetErrorHandler().Recover(p, v)
  13714. } else {
  13715. panic(err)
  13716. }
  13717. }
  13718. }()
  13719. p.SetState(1414)
  13720. p.GetErrorHandler().Sync(p)
  13721. switch p.GetTokenStream().LA(1) {
  13722. case SQLiteParserSELECT_:
  13723. p.EnterOuterAlt(localctx, 1)
  13724. {
  13725. p.SetState(1324)
  13726. p.Match(SQLiteParserSELECT_)
  13727. }
  13728. p.SetState(1326)
  13729. p.GetErrorHandler().Sync(p)
  13730. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 179, p.GetParserRuleContext()) == 1 {
  13731. {
  13732. p.SetState(1325)
  13733. _la = p.GetTokenStream().LA(1)
  13734. if !(_la == SQLiteParserALL_ || _la == SQLiteParserDISTINCT_) {
  13735. p.GetErrorHandler().RecoverInline(p)
  13736. } else {
  13737. p.GetErrorHandler().ReportMatch(p)
  13738. p.Consume()
  13739. }
  13740. }
  13741. }
  13742. {
  13743. p.SetState(1328)
  13744. p.Result_column()
  13745. }
  13746. p.SetState(1333)
  13747. p.GetErrorHandler().Sync(p)
  13748. _la = p.GetTokenStream().LA(1)
  13749. for _la == SQLiteParserCOMMA {
  13750. {
  13751. p.SetState(1329)
  13752. p.Match(SQLiteParserCOMMA)
  13753. }
  13754. {
  13755. p.SetState(1330)
  13756. p.Result_column()
  13757. }
  13758. p.SetState(1335)
  13759. p.GetErrorHandler().Sync(p)
  13760. _la = p.GetTokenStream().LA(1)
  13761. }
  13762. p.SetState(1348)
  13763. p.GetErrorHandler().Sync(p)
  13764. _la = p.GetTokenStream().LA(1)
  13765. if _la == SQLiteParserFROM_ {
  13766. {
  13767. p.SetState(1336)
  13768. p.Match(SQLiteParserFROM_)
  13769. }
  13770. p.SetState(1346)
  13771. p.GetErrorHandler().Sync(p)
  13772. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 182, p.GetParserRuleContext()) {
  13773. case 1:
  13774. {
  13775. p.SetState(1337)
  13776. p.Table_or_subquery()
  13777. }
  13778. p.SetState(1342)
  13779. p.GetErrorHandler().Sync(p)
  13780. _la = p.GetTokenStream().LA(1)
  13781. for _la == SQLiteParserCOMMA {
  13782. {
  13783. p.SetState(1338)
  13784. p.Match(SQLiteParserCOMMA)
  13785. }
  13786. {
  13787. p.SetState(1339)
  13788. p.Table_or_subquery()
  13789. }
  13790. p.SetState(1344)
  13791. p.GetErrorHandler().Sync(p)
  13792. _la = p.GetTokenStream().LA(1)
  13793. }
  13794. case 2:
  13795. {
  13796. p.SetState(1345)
  13797. p.Join_clause()
  13798. }
  13799. }
  13800. }
  13801. p.SetState(1352)
  13802. p.GetErrorHandler().Sync(p)
  13803. _la = p.GetTokenStream().LA(1)
  13804. if _la == SQLiteParserWHERE_ {
  13805. {
  13806. p.SetState(1350)
  13807. p.Match(SQLiteParserWHERE_)
  13808. }
  13809. {
  13810. p.SetState(1351)
  13811. p.expr(0)
  13812. }
  13813. }
  13814. p.SetState(1368)
  13815. p.GetErrorHandler().Sync(p)
  13816. _la = p.GetTokenStream().LA(1)
  13817. if _la == SQLiteParserGROUP_ {
  13818. {
  13819. p.SetState(1354)
  13820. p.Match(SQLiteParserGROUP_)
  13821. }
  13822. {
  13823. p.SetState(1355)
  13824. p.Match(SQLiteParserBY_)
  13825. }
  13826. {
  13827. p.SetState(1356)
  13828. p.expr(0)
  13829. }
  13830. p.SetState(1361)
  13831. p.GetErrorHandler().Sync(p)
  13832. _la = p.GetTokenStream().LA(1)
  13833. for _la == SQLiteParserCOMMA {
  13834. {
  13835. p.SetState(1357)
  13836. p.Match(SQLiteParserCOMMA)
  13837. }
  13838. {
  13839. p.SetState(1358)
  13840. p.expr(0)
  13841. }
  13842. p.SetState(1363)
  13843. p.GetErrorHandler().Sync(p)
  13844. _la = p.GetTokenStream().LA(1)
  13845. }
  13846. p.SetState(1366)
  13847. p.GetErrorHandler().Sync(p)
  13848. _la = p.GetTokenStream().LA(1)
  13849. if _la == SQLiteParserHAVING_ {
  13850. {
  13851. p.SetState(1364)
  13852. p.Match(SQLiteParserHAVING_)
  13853. }
  13854. {
  13855. p.SetState(1365)
  13856. p.expr(0)
  13857. }
  13858. }
  13859. }
  13860. p.SetState(1384)
  13861. p.GetErrorHandler().Sync(p)
  13862. _la = p.GetTokenStream().LA(1)
  13863. if _la == SQLiteParserWINDOW_ {
  13864. {
  13865. p.SetState(1370)
  13866. p.Match(SQLiteParserWINDOW_)
  13867. }
  13868. {
  13869. p.SetState(1371)
  13870. p.Window_name()
  13871. }
  13872. {
  13873. p.SetState(1372)
  13874. p.Match(SQLiteParserAS_)
  13875. }
  13876. {
  13877. p.SetState(1373)
  13878. p.Window_defn()
  13879. }
  13880. p.SetState(1381)
  13881. p.GetErrorHandler().Sync(p)
  13882. _la = p.GetTokenStream().LA(1)
  13883. for _la == SQLiteParserCOMMA {
  13884. {
  13885. p.SetState(1374)
  13886. p.Match(SQLiteParserCOMMA)
  13887. }
  13888. {
  13889. p.SetState(1375)
  13890. p.Window_name()
  13891. }
  13892. {
  13893. p.SetState(1376)
  13894. p.Match(SQLiteParserAS_)
  13895. }
  13896. {
  13897. p.SetState(1377)
  13898. p.Window_defn()
  13899. }
  13900. p.SetState(1383)
  13901. p.GetErrorHandler().Sync(p)
  13902. _la = p.GetTokenStream().LA(1)
  13903. }
  13904. }
  13905. case SQLiteParserVALUES_:
  13906. p.EnterOuterAlt(localctx, 2)
  13907. {
  13908. p.SetState(1386)
  13909. p.Match(SQLiteParserVALUES_)
  13910. }
  13911. {
  13912. p.SetState(1387)
  13913. p.Match(SQLiteParserOPEN_PAR)
  13914. }
  13915. {
  13916. p.SetState(1388)
  13917. p.expr(0)
  13918. }
  13919. p.SetState(1393)
  13920. p.GetErrorHandler().Sync(p)
  13921. _la = p.GetTokenStream().LA(1)
  13922. for _la == SQLiteParserCOMMA {
  13923. {
  13924. p.SetState(1389)
  13925. p.Match(SQLiteParserCOMMA)
  13926. }
  13927. {
  13928. p.SetState(1390)
  13929. p.expr(0)
  13930. }
  13931. p.SetState(1395)
  13932. p.GetErrorHandler().Sync(p)
  13933. _la = p.GetTokenStream().LA(1)
  13934. }
  13935. {
  13936. p.SetState(1396)
  13937. p.Match(SQLiteParserCLOSE_PAR)
  13938. }
  13939. p.SetState(1411)
  13940. p.GetErrorHandler().Sync(p)
  13941. _la = p.GetTokenStream().LA(1)
  13942. for _la == SQLiteParserCOMMA {
  13943. {
  13944. p.SetState(1397)
  13945. p.Match(SQLiteParserCOMMA)
  13946. }
  13947. {
  13948. p.SetState(1398)
  13949. p.Match(SQLiteParserOPEN_PAR)
  13950. }
  13951. {
  13952. p.SetState(1399)
  13953. p.expr(0)
  13954. }
  13955. p.SetState(1404)
  13956. p.GetErrorHandler().Sync(p)
  13957. _la = p.GetTokenStream().LA(1)
  13958. for _la == SQLiteParserCOMMA {
  13959. {
  13960. p.SetState(1400)
  13961. p.Match(SQLiteParserCOMMA)
  13962. }
  13963. {
  13964. p.SetState(1401)
  13965. p.expr(0)
  13966. }
  13967. p.SetState(1406)
  13968. p.GetErrorHandler().Sync(p)
  13969. _la = p.GetTokenStream().LA(1)
  13970. }
  13971. {
  13972. p.SetState(1407)
  13973. p.Match(SQLiteParserCLOSE_PAR)
  13974. }
  13975. p.SetState(1413)
  13976. p.GetErrorHandler().Sync(p)
  13977. _la = p.GetTokenStream().LA(1)
  13978. }
  13979. default:
  13980. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  13981. }
  13982. return localctx
  13983. }
  13984. // IFactored_select_stmtContext is an interface to support dynamic dispatch.
  13985. type IFactored_select_stmtContext interface {
  13986. antlr.ParserRuleContext
  13987. // GetParser returns the parser.
  13988. GetParser() antlr.Parser
  13989. // Getter signatures
  13990. Select_stmt() ISelect_stmtContext
  13991. // IsFactored_select_stmtContext differentiates from other interfaces.
  13992. IsFactored_select_stmtContext()
  13993. }
  13994. type Factored_select_stmtContext struct {
  13995. *antlr.BaseParserRuleContext
  13996. parser antlr.Parser
  13997. }
  13998. func NewEmptyFactored_select_stmtContext() *Factored_select_stmtContext {
  13999. var p = new(Factored_select_stmtContext)
  14000. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  14001. p.RuleIndex = SQLiteParserRULE_factored_select_stmt
  14002. return p
  14003. }
  14004. func (*Factored_select_stmtContext) IsFactored_select_stmtContext() {}
  14005. func NewFactored_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Factored_select_stmtContext {
  14006. var p = new(Factored_select_stmtContext)
  14007. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  14008. p.parser = parser
  14009. p.RuleIndex = SQLiteParserRULE_factored_select_stmt
  14010. return p
  14011. }
  14012. func (s *Factored_select_stmtContext) GetParser() antlr.Parser { return s.parser }
  14013. func (s *Factored_select_stmtContext) Select_stmt() ISelect_stmtContext {
  14014. var t antlr.RuleContext
  14015. for _, ctx := range s.GetChildren() {
  14016. if _, ok := ctx.(ISelect_stmtContext); ok {
  14017. t = ctx.(antlr.RuleContext)
  14018. break
  14019. }
  14020. }
  14021. if t == nil {
  14022. return nil
  14023. }
  14024. return t.(ISelect_stmtContext)
  14025. }
  14026. func (s *Factored_select_stmtContext) GetRuleContext() antlr.RuleContext {
  14027. return s
  14028. }
  14029. func (s *Factored_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  14030. return antlr.TreesStringTree(s, ruleNames, recog)
  14031. }
  14032. func (s *Factored_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  14033. if listenerT, ok := listener.(SQLiteParserListener); ok {
  14034. listenerT.EnterFactored_select_stmt(s)
  14035. }
  14036. }
  14037. func (s *Factored_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  14038. if listenerT, ok := listener.(SQLiteParserListener); ok {
  14039. listenerT.ExitFactored_select_stmt(s)
  14040. }
  14041. }
  14042. func (p *SQLiteParser) Factored_select_stmt() (localctx IFactored_select_stmtContext) {
  14043. this := p
  14044. _ = this
  14045. localctx = NewFactored_select_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  14046. p.EnterRule(localctx, 90, SQLiteParserRULE_factored_select_stmt)
  14047. defer func() {
  14048. p.ExitRule()
  14049. }()
  14050. defer func() {
  14051. if err := recover(); err != nil {
  14052. if v, ok := err.(antlr.RecognitionException); ok {
  14053. localctx.SetException(v)
  14054. p.GetErrorHandler().ReportError(p, v)
  14055. p.GetErrorHandler().Recover(p, v)
  14056. } else {
  14057. panic(err)
  14058. }
  14059. }
  14060. }()
  14061. p.EnterOuterAlt(localctx, 1)
  14062. {
  14063. p.SetState(1416)
  14064. p.Select_stmt()
  14065. }
  14066. return localctx
  14067. }
  14068. // ISimple_select_stmtContext is an interface to support dynamic dispatch.
  14069. type ISimple_select_stmtContext interface {
  14070. antlr.ParserRuleContext
  14071. // GetParser returns the parser.
  14072. GetParser() antlr.Parser
  14073. // Getter signatures
  14074. Select_core() ISelect_coreContext
  14075. Common_table_stmt() ICommon_table_stmtContext
  14076. Order_by_stmt() IOrder_by_stmtContext
  14077. Limit_stmt() ILimit_stmtContext
  14078. // IsSimple_select_stmtContext differentiates from other interfaces.
  14079. IsSimple_select_stmtContext()
  14080. }
  14081. type Simple_select_stmtContext struct {
  14082. *antlr.BaseParserRuleContext
  14083. parser antlr.Parser
  14084. }
  14085. func NewEmptySimple_select_stmtContext() *Simple_select_stmtContext {
  14086. var p = new(Simple_select_stmtContext)
  14087. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  14088. p.RuleIndex = SQLiteParserRULE_simple_select_stmt
  14089. return p
  14090. }
  14091. func (*Simple_select_stmtContext) IsSimple_select_stmtContext() {}
  14092. func NewSimple_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_select_stmtContext {
  14093. var p = new(Simple_select_stmtContext)
  14094. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  14095. p.parser = parser
  14096. p.RuleIndex = SQLiteParserRULE_simple_select_stmt
  14097. return p
  14098. }
  14099. func (s *Simple_select_stmtContext) GetParser() antlr.Parser { return s.parser }
  14100. func (s *Simple_select_stmtContext) Select_core() ISelect_coreContext {
  14101. var t antlr.RuleContext
  14102. for _, ctx := range s.GetChildren() {
  14103. if _, ok := ctx.(ISelect_coreContext); ok {
  14104. t = ctx.(antlr.RuleContext)
  14105. break
  14106. }
  14107. }
  14108. if t == nil {
  14109. return nil
  14110. }
  14111. return t.(ISelect_coreContext)
  14112. }
  14113. func (s *Simple_select_stmtContext) Common_table_stmt() ICommon_table_stmtContext {
  14114. var t antlr.RuleContext
  14115. for _, ctx := range s.GetChildren() {
  14116. if _, ok := ctx.(ICommon_table_stmtContext); ok {
  14117. t = ctx.(antlr.RuleContext)
  14118. break
  14119. }
  14120. }
  14121. if t == nil {
  14122. return nil
  14123. }
  14124. return t.(ICommon_table_stmtContext)
  14125. }
  14126. func (s *Simple_select_stmtContext) Order_by_stmt() IOrder_by_stmtContext {
  14127. var t antlr.RuleContext
  14128. for _, ctx := range s.GetChildren() {
  14129. if _, ok := ctx.(IOrder_by_stmtContext); ok {
  14130. t = ctx.(antlr.RuleContext)
  14131. break
  14132. }
  14133. }
  14134. if t == nil {
  14135. return nil
  14136. }
  14137. return t.(IOrder_by_stmtContext)
  14138. }
  14139. func (s *Simple_select_stmtContext) Limit_stmt() ILimit_stmtContext {
  14140. var t antlr.RuleContext
  14141. for _, ctx := range s.GetChildren() {
  14142. if _, ok := ctx.(ILimit_stmtContext); ok {
  14143. t = ctx.(antlr.RuleContext)
  14144. break
  14145. }
  14146. }
  14147. if t == nil {
  14148. return nil
  14149. }
  14150. return t.(ILimit_stmtContext)
  14151. }
  14152. func (s *Simple_select_stmtContext) GetRuleContext() antlr.RuleContext {
  14153. return s
  14154. }
  14155. func (s *Simple_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  14156. return antlr.TreesStringTree(s, ruleNames, recog)
  14157. }
  14158. func (s *Simple_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  14159. if listenerT, ok := listener.(SQLiteParserListener); ok {
  14160. listenerT.EnterSimple_select_stmt(s)
  14161. }
  14162. }
  14163. func (s *Simple_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  14164. if listenerT, ok := listener.(SQLiteParserListener); ok {
  14165. listenerT.ExitSimple_select_stmt(s)
  14166. }
  14167. }
  14168. func (p *SQLiteParser) Simple_select_stmt() (localctx ISimple_select_stmtContext) {
  14169. this := p
  14170. _ = this
  14171. localctx = NewSimple_select_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  14172. p.EnterRule(localctx, 92, SQLiteParserRULE_simple_select_stmt)
  14173. var _la int
  14174. defer func() {
  14175. p.ExitRule()
  14176. }()
  14177. defer func() {
  14178. if err := recover(); err != nil {
  14179. if v, ok := err.(antlr.RecognitionException); ok {
  14180. localctx.SetException(v)
  14181. p.GetErrorHandler().ReportError(p, v)
  14182. p.GetErrorHandler().Recover(p, v)
  14183. } else {
  14184. panic(err)
  14185. }
  14186. }
  14187. }()
  14188. p.EnterOuterAlt(localctx, 1)
  14189. p.SetState(1419)
  14190. p.GetErrorHandler().Sync(p)
  14191. _la = p.GetTokenStream().LA(1)
  14192. if _la == SQLiteParserWITH_ {
  14193. {
  14194. p.SetState(1418)
  14195. p.Common_table_stmt()
  14196. }
  14197. }
  14198. {
  14199. p.SetState(1421)
  14200. p.Select_core()
  14201. }
  14202. p.SetState(1423)
  14203. p.GetErrorHandler().Sync(p)
  14204. _la = p.GetTokenStream().LA(1)
  14205. if _la == SQLiteParserORDER_ {
  14206. {
  14207. p.SetState(1422)
  14208. p.Order_by_stmt()
  14209. }
  14210. }
  14211. p.SetState(1426)
  14212. p.GetErrorHandler().Sync(p)
  14213. _la = p.GetTokenStream().LA(1)
  14214. if _la == SQLiteParserLIMIT_ {
  14215. {
  14216. p.SetState(1425)
  14217. p.Limit_stmt()
  14218. }
  14219. }
  14220. return localctx
  14221. }
  14222. // ICompound_select_stmtContext is an interface to support dynamic dispatch.
  14223. type ICompound_select_stmtContext interface {
  14224. antlr.ParserRuleContext
  14225. // GetParser returns the parser.
  14226. GetParser() antlr.Parser
  14227. // Getter signatures
  14228. AllSelect_core() []ISelect_coreContext
  14229. Select_core(i int) ISelect_coreContext
  14230. Common_table_stmt() ICommon_table_stmtContext
  14231. Order_by_stmt() IOrder_by_stmtContext
  14232. Limit_stmt() ILimit_stmtContext
  14233. AllUNION_() []antlr.TerminalNode
  14234. UNION_(i int) antlr.TerminalNode
  14235. AllINTERSECT_() []antlr.TerminalNode
  14236. INTERSECT_(i int) antlr.TerminalNode
  14237. AllEXCEPT_() []antlr.TerminalNode
  14238. EXCEPT_(i int) antlr.TerminalNode
  14239. AllALL_() []antlr.TerminalNode
  14240. ALL_(i int) antlr.TerminalNode
  14241. // IsCompound_select_stmtContext differentiates from other interfaces.
  14242. IsCompound_select_stmtContext()
  14243. }
  14244. type Compound_select_stmtContext struct {
  14245. *antlr.BaseParserRuleContext
  14246. parser antlr.Parser
  14247. }
  14248. func NewEmptyCompound_select_stmtContext() *Compound_select_stmtContext {
  14249. var p = new(Compound_select_stmtContext)
  14250. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  14251. p.RuleIndex = SQLiteParserRULE_compound_select_stmt
  14252. return p
  14253. }
  14254. func (*Compound_select_stmtContext) IsCompound_select_stmtContext() {}
  14255. func NewCompound_select_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compound_select_stmtContext {
  14256. var p = new(Compound_select_stmtContext)
  14257. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  14258. p.parser = parser
  14259. p.RuleIndex = SQLiteParserRULE_compound_select_stmt
  14260. return p
  14261. }
  14262. func (s *Compound_select_stmtContext) GetParser() antlr.Parser { return s.parser }
  14263. func (s *Compound_select_stmtContext) AllSelect_core() []ISelect_coreContext {
  14264. children := s.GetChildren()
  14265. len := 0
  14266. for _, ctx := range children {
  14267. if _, ok := ctx.(ISelect_coreContext); ok {
  14268. len++
  14269. }
  14270. }
  14271. tst := make([]ISelect_coreContext, len)
  14272. i := 0
  14273. for _, ctx := range children {
  14274. if t, ok := ctx.(ISelect_coreContext); ok {
  14275. tst[i] = t.(ISelect_coreContext)
  14276. i++
  14277. }
  14278. }
  14279. return tst
  14280. }
  14281. func (s *Compound_select_stmtContext) Select_core(i int) ISelect_coreContext {
  14282. var t antlr.RuleContext
  14283. j := 0
  14284. for _, ctx := range s.GetChildren() {
  14285. if _, ok := ctx.(ISelect_coreContext); ok {
  14286. if j == i {
  14287. t = ctx.(antlr.RuleContext)
  14288. break
  14289. }
  14290. j++
  14291. }
  14292. }
  14293. if t == nil {
  14294. return nil
  14295. }
  14296. return t.(ISelect_coreContext)
  14297. }
  14298. func (s *Compound_select_stmtContext) Common_table_stmt() ICommon_table_stmtContext {
  14299. var t antlr.RuleContext
  14300. for _, ctx := range s.GetChildren() {
  14301. if _, ok := ctx.(ICommon_table_stmtContext); ok {
  14302. t = ctx.(antlr.RuleContext)
  14303. break
  14304. }
  14305. }
  14306. if t == nil {
  14307. return nil
  14308. }
  14309. return t.(ICommon_table_stmtContext)
  14310. }
  14311. func (s *Compound_select_stmtContext) Order_by_stmt() IOrder_by_stmtContext {
  14312. var t antlr.RuleContext
  14313. for _, ctx := range s.GetChildren() {
  14314. if _, ok := ctx.(IOrder_by_stmtContext); ok {
  14315. t = ctx.(antlr.RuleContext)
  14316. break
  14317. }
  14318. }
  14319. if t == nil {
  14320. return nil
  14321. }
  14322. return t.(IOrder_by_stmtContext)
  14323. }
  14324. func (s *Compound_select_stmtContext) Limit_stmt() ILimit_stmtContext {
  14325. var t antlr.RuleContext
  14326. for _, ctx := range s.GetChildren() {
  14327. if _, ok := ctx.(ILimit_stmtContext); ok {
  14328. t = ctx.(antlr.RuleContext)
  14329. break
  14330. }
  14331. }
  14332. if t == nil {
  14333. return nil
  14334. }
  14335. return t.(ILimit_stmtContext)
  14336. }
  14337. func (s *Compound_select_stmtContext) AllUNION_() []antlr.TerminalNode {
  14338. return s.GetTokens(SQLiteParserUNION_)
  14339. }
  14340. func (s *Compound_select_stmtContext) UNION_(i int) antlr.TerminalNode {
  14341. return s.GetToken(SQLiteParserUNION_, i)
  14342. }
  14343. func (s *Compound_select_stmtContext) AllINTERSECT_() []antlr.TerminalNode {
  14344. return s.GetTokens(SQLiteParserINTERSECT_)
  14345. }
  14346. func (s *Compound_select_stmtContext) INTERSECT_(i int) antlr.TerminalNode {
  14347. return s.GetToken(SQLiteParserINTERSECT_, i)
  14348. }
  14349. func (s *Compound_select_stmtContext) AllEXCEPT_() []antlr.TerminalNode {
  14350. return s.GetTokens(SQLiteParserEXCEPT_)
  14351. }
  14352. func (s *Compound_select_stmtContext) EXCEPT_(i int) antlr.TerminalNode {
  14353. return s.GetToken(SQLiteParserEXCEPT_, i)
  14354. }
  14355. func (s *Compound_select_stmtContext) AllALL_() []antlr.TerminalNode {
  14356. return s.GetTokens(SQLiteParserALL_)
  14357. }
  14358. func (s *Compound_select_stmtContext) ALL_(i int) antlr.TerminalNode {
  14359. return s.GetToken(SQLiteParserALL_, i)
  14360. }
  14361. func (s *Compound_select_stmtContext) GetRuleContext() antlr.RuleContext {
  14362. return s
  14363. }
  14364. func (s *Compound_select_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  14365. return antlr.TreesStringTree(s, ruleNames, recog)
  14366. }
  14367. func (s *Compound_select_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  14368. if listenerT, ok := listener.(SQLiteParserListener); ok {
  14369. listenerT.EnterCompound_select_stmt(s)
  14370. }
  14371. }
  14372. func (s *Compound_select_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  14373. if listenerT, ok := listener.(SQLiteParserListener); ok {
  14374. listenerT.ExitCompound_select_stmt(s)
  14375. }
  14376. }
  14377. func (p *SQLiteParser) Compound_select_stmt() (localctx ICompound_select_stmtContext) {
  14378. this := p
  14379. _ = this
  14380. localctx = NewCompound_select_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  14381. p.EnterRule(localctx, 94, SQLiteParserRULE_compound_select_stmt)
  14382. var _la int
  14383. defer func() {
  14384. p.ExitRule()
  14385. }()
  14386. defer func() {
  14387. if err := recover(); err != nil {
  14388. if v, ok := err.(antlr.RecognitionException); ok {
  14389. localctx.SetException(v)
  14390. p.GetErrorHandler().ReportError(p, v)
  14391. p.GetErrorHandler().Recover(p, v)
  14392. } else {
  14393. panic(err)
  14394. }
  14395. }
  14396. }()
  14397. p.EnterOuterAlt(localctx, 1)
  14398. p.SetState(1429)
  14399. p.GetErrorHandler().Sync(p)
  14400. _la = p.GetTokenStream().LA(1)
  14401. if _la == SQLiteParserWITH_ {
  14402. {
  14403. p.SetState(1428)
  14404. p.Common_table_stmt()
  14405. }
  14406. }
  14407. {
  14408. p.SetState(1431)
  14409. p.Select_core()
  14410. }
  14411. p.SetState(1441)
  14412. p.GetErrorHandler().Sync(p)
  14413. _la = p.GetTokenStream().LA(1)
  14414. for ok := true; ok; ok = _la == SQLiteParserEXCEPT_ || _la == SQLiteParserINTERSECT_ || _la == SQLiteParserUNION_ {
  14415. p.SetState(1438)
  14416. p.GetErrorHandler().Sync(p)
  14417. switch p.GetTokenStream().LA(1) {
  14418. case SQLiteParserUNION_:
  14419. {
  14420. p.SetState(1432)
  14421. p.Match(SQLiteParserUNION_)
  14422. }
  14423. p.SetState(1434)
  14424. p.GetErrorHandler().Sync(p)
  14425. _la = p.GetTokenStream().LA(1)
  14426. if _la == SQLiteParserALL_ {
  14427. {
  14428. p.SetState(1433)
  14429. p.Match(SQLiteParserALL_)
  14430. }
  14431. }
  14432. case SQLiteParserINTERSECT_:
  14433. {
  14434. p.SetState(1436)
  14435. p.Match(SQLiteParserINTERSECT_)
  14436. }
  14437. case SQLiteParserEXCEPT_:
  14438. {
  14439. p.SetState(1437)
  14440. p.Match(SQLiteParserEXCEPT_)
  14441. }
  14442. default:
  14443. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  14444. }
  14445. {
  14446. p.SetState(1440)
  14447. p.Select_core()
  14448. }
  14449. p.SetState(1443)
  14450. p.GetErrorHandler().Sync(p)
  14451. _la = p.GetTokenStream().LA(1)
  14452. }
  14453. p.SetState(1446)
  14454. p.GetErrorHandler().Sync(p)
  14455. _la = p.GetTokenStream().LA(1)
  14456. if _la == SQLiteParserORDER_ {
  14457. {
  14458. p.SetState(1445)
  14459. p.Order_by_stmt()
  14460. }
  14461. }
  14462. p.SetState(1449)
  14463. p.GetErrorHandler().Sync(p)
  14464. _la = p.GetTokenStream().LA(1)
  14465. if _la == SQLiteParserLIMIT_ {
  14466. {
  14467. p.SetState(1448)
  14468. p.Limit_stmt()
  14469. }
  14470. }
  14471. return localctx
  14472. }
  14473. // ITable_or_subqueryContext is an interface to support dynamic dispatch.
  14474. type ITable_or_subqueryContext interface {
  14475. antlr.ParserRuleContext
  14476. // GetParser returns the parser.
  14477. GetParser() antlr.Parser
  14478. // Getter signatures
  14479. Table_name() ITable_nameContext
  14480. Schema_name() ISchema_nameContext
  14481. DOT() antlr.TerminalNode
  14482. Table_alias() ITable_aliasContext
  14483. INDEXED_() antlr.TerminalNode
  14484. BY_() antlr.TerminalNode
  14485. Index_name() IIndex_nameContext
  14486. NOT_() antlr.TerminalNode
  14487. AS_() antlr.TerminalNode
  14488. Table_function_name() ITable_function_nameContext
  14489. OPEN_PAR() antlr.TerminalNode
  14490. AllExpr() []IExprContext
  14491. Expr(i int) IExprContext
  14492. CLOSE_PAR() antlr.TerminalNode
  14493. AllCOMMA() []antlr.TerminalNode
  14494. COMMA(i int) antlr.TerminalNode
  14495. AllTable_or_subquery() []ITable_or_subqueryContext
  14496. Table_or_subquery(i int) ITable_or_subqueryContext
  14497. Join_clause() IJoin_clauseContext
  14498. Select_stmt() ISelect_stmtContext
  14499. Table_alias_fallback() ITable_alias_fallbackContext
  14500. // IsTable_or_subqueryContext differentiates from other interfaces.
  14501. IsTable_or_subqueryContext()
  14502. }
  14503. type Table_or_subqueryContext struct {
  14504. *antlr.BaseParserRuleContext
  14505. parser antlr.Parser
  14506. }
  14507. func NewEmptyTable_or_subqueryContext() *Table_or_subqueryContext {
  14508. var p = new(Table_or_subqueryContext)
  14509. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  14510. p.RuleIndex = SQLiteParserRULE_table_or_subquery
  14511. return p
  14512. }
  14513. func (*Table_or_subqueryContext) IsTable_or_subqueryContext() {}
  14514. func NewTable_or_subqueryContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_or_subqueryContext {
  14515. var p = new(Table_or_subqueryContext)
  14516. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  14517. p.parser = parser
  14518. p.RuleIndex = SQLiteParserRULE_table_or_subquery
  14519. return p
  14520. }
  14521. func (s *Table_or_subqueryContext) GetParser() antlr.Parser { return s.parser }
  14522. func (s *Table_or_subqueryContext) Table_name() ITable_nameContext {
  14523. var t antlr.RuleContext
  14524. for _, ctx := range s.GetChildren() {
  14525. if _, ok := ctx.(ITable_nameContext); ok {
  14526. t = ctx.(antlr.RuleContext)
  14527. break
  14528. }
  14529. }
  14530. if t == nil {
  14531. return nil
  14532. }
  14533. return t.(ITable_nameContext)
  14534. }
  14535. func (s *Table_or_subqueryContext) Schema_name() ISchema_nameContext {
  14536. var t antlr.RuleContext
  14537. for _, ctx := range s.GetChildren() {
  14538. if _, ok := ctx.(ISchema_nameContext); ok {
  14539. t = ctx.(antlr.RuleContext)
  14540. break
  14541. }
  14542. }
  14543. if t == nil {
  14544. return nil
  14545. }
  14546. return t.(ISchema_nameContext)
  14547. }
  14548. func (s *Table_or_subqueryContext) DOT() antlr.TerminalNode {
  14549. return s.GetToken(SQLiteParserDOT, 0)
  14550. }
  14551. func (s *Table_or_subqueryContext) Table_alias() ITable_aliasContext {
  14552. var t antlr.RuleContext
  14553. for _, ctx := range s.GetChildren() {
  14554. if _, ok := ctx.(ITable_aliasContext); ok {
  14555. t = ctx.(antlr.RuleContext)
  14556. break
  14557. }
  14558. }
  14559. if t == nil {
  14560. return nil
  14561. }
  14562. return t.(ITable_aliasContext)
  14563. }
  14564. func (s *Table_or_subqueryContext) INDEXED_() antlr.TerminalNode {
  14565. return s.GetToken(SQLiteParserINDEXED_, 0)
  14566. }
  14567. func (s *Table_or_subqueryContext) BY_() antlr.TerminalNode {
  14568. return s.GetToken(SQLiteParserBY_, 0)
  14569. }
  14570. func (s *Table_or_subqueryContext) Index_name() IIndex_nameContext {
  14571. var t antlr.RuleContext
  14572. for _, ctx := range s.GetChildren() {
  14573. if _, ok := ctx.(IIndex_nameContext); ok {
  14574. t = ctx.(antlr.RuleContext)
  14575. break
  14576. }
  14577. }
  14578. if t == nil {
  14579. return nil
  14580. }
  14581. return t.(IIndex_nameContext)
  14582. }
  14583. func (s *Table_or_subqueryContext) NOT_() antlr.TerminalNode {
  14584. return s.GetToken(SQLiteParserNOT_, 0)
  14585. }
  14586. func (s *Table_or_subqueryContext) AS_() antlr.TerminalNode {
  14587. return s.GetToken(SQLiteParserAS_, 0)
  14588. }
  14589. func (s *Table_or_subqueryContext) Table_function_name() ITable_function_nameContext {
  14590. var t antlr.RuleContext
  14591. for _, ctx := range s.GetChildren() {
  14592. if _, ok := ctx.(ITable_function_nameContext); ok {
  14593. t = ctx.(antlr.RuleContext)
  14594. break
  14595. }
  14596. }
  14597. if t == nil {
  14598. return nil
  14599. }
  14600. return t.(ITable_function_nameContext)
  14601. }
  14602. func (s *Table_or_subqueryContext) OPEN_PAR() antlr.TerminalNode {
  14603. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  14604. }
  14605. func (s *Table_or_subqueryContext) AllExpr() []IExprContext {
  14606. children := s.GetChildren()
  14607. len := 0
  14608. for _, ctx := range children {
  14609. if _, ok := ctx.(IExprContext); ok {
  14610. len++
  14611. }
  14612. }
  14613. tst := make([]IExprContext, len)
  14614. i := 0
  14615. for _, ctx := range children {
  14616. if t, ok := ctx.(IExprContext); ok {
  14617. tst[i] = t.(IExprContext)
  14618. i++
  14619. }
  14620. }
  14621. return tst
  14622. }
  14623. func (s *Table_or_subqueryContext) Expr(i int) IExprContext {
  14624. var t antlr.RuleContext
  14625. j := 0
  14626. for _, ctx := range s.GetChildren() {
  14627. if _, ok := ctx.(IExprContext); ok {
  14628. if j == i {
  14629. t = ctx.(antlr.RuleContext)
  14630. break
  14631. }
  14632. j++
  14633. }
  14634. }
  14635. if t == nil {
  14636. return nil
  14637. }
  14638. return t.(IExprContext)
  14639. }
  14640. func (s *Table_or_subqueryContext) CLOSE_PAR() antlr.TerminalNode {
  14641. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  14642. }
  14643. func (s *Table_or_subqueryContext) AllCOMMA() []antlr.TerminalNode {
  14644. return s.GetTokens(SQLiteParserCOMMA)
  14645. }
  14646. func (s *Table_or_subqueryContext) COMMA(i int) antlr.TerminalNode {
  14647. return s.GetToken(SQLiteParserCOMMA, i)
  14648. }
  14649. func (s *Table_or_subqueryContext) AllTable_or_subquery() []ITable_or_subqueryContext {
  14650. children := s.GetChildren()
  14651. len := 0
  14652. for _, ctx := range children {
  14653. if _, ok := ctx.(ITable_or_subqueryContext); ok {
  14654. len++
  14655. }
  14656. }
  14657. tst := make([]ITable_or_subqueryContext, len)
  14658. i := 0
  14659. for _, ctx := range children {
  14660. if t, ok := ctx.(ITable_or_subqueryContext); ok {
  14661. tst[i] = t.(ITable_or_subqueryContext)
  14662. i++
  14663. }
  14664. }
  14665. return tst
  14666. }
  14667. func (s *Table_or_subqueryContext) Table_or_subquery(i int) ITable_or_subqueryContext {
  14668. var t antlr.RuleContext
  14669. j := 0
  14670. for _, ctx := range s.GetChildren() {
  14671. if _, ok := ctx.(ITable_or_subqueryContext); ok {
  14672. if j == i {
  14673. t = ctx.(antlr.RuleContext)
  14674. break
  14675. }
  14676. j++
  14677. }
  14678. }
  14679. if t == nil {
  14680. return nil
  14681. }
  14682. return t.(ITable_or_subqueryContext)
  14683. }
  14684. func (s *Table_or_subqueryContext) Join_clause() IJoin_clauseContext {
  14685. var t antlr.RuleContext
  14686. for _, ctx := range s.GetChildren() {
  14687. if _, ok := ctx.(IJoin_clauseContext); ok {
  14688. t = ctx.(antlr.RuleContext)
  14689. break
  14690. }
  14691. }
  14692. if t == nil {
  14693. return nil
  14694. }
  14695. return t.(IJoin_clauseContext)
  14696. }
  14697. func (s *Table_or_subqueryContext) Select_stmt() ISelect_stmtContext {
  14698. var t antlr.RuleContext
  14699. for _, ctx := range s.GetChildren() {
  14700. if _, ok := ctx.(ISelect_stmtContext); ok {
  14701. t = ctx.(antlr.RuleContext)
  14702. break
  14703. }
  14704. }
  14705. if t == nil {
  14706. return nil
  14707. }
  14708. return t.(ISelect_stmtContext)
  14709. }
  14710. func (s *Table_or_subqueryContext) Table_alias_fallback() ITable_alias_fallbackContext {
  14711. var t antlr.RuleContext
  14712. for _, ctx := range s.GetChildren() {
  14713. if _, ok := ctx.(ITable_alias_fallbackContext); ok {
  14714. t = ctx.(antlr.RuleContext)
  14715. break
  14716. }
  14717. }
  14718. if t == nil {
  14719. return nil
  14720. }
  14721. return t.(ITable_alias_fallbackContext)
  14722. }
  14723. func (s *Table_or_subqueryContext) GetRuleContext() antlr.RuleContext {
  14724. return s
  14725. }
  14726. func (s *Table_or_subqueryContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  14727. return antlr.TreesStringTree(s, ruleNames, recog)
  14728. }
  14729. func (s *Table_or_subqueryContext) EnterRule(listener antlr.ParseTreeListener) {
  14730. if listenerT, ok := listener.(SQLiteParserListener); ok {
  14731. listenerT.EnterTable_or_subquery(s)
  14732. }
  14733. }
  14734. func (s *Table_or_subqueryContext) ExitRule(listener antlr.ParseTreeListener) {
  14735. if listenerT, ok := listener.(SQLiteParserListener); ok {
  14736. listenerT.ExitTable_or_subquery(s)
  14737. }
  14738. }
  14739. func (p *SQLiteParser) Table_or_subquery() (localctx ITable_or_subqueryContext) {
  14740. this := p
  14741. _ = this
  14742. localctx = NewTable_or_subqueryContext(p, p.GetParserRuleContext(), p.GetState())
  14743. p.EnterRule(localctx, 96, SQLiteParserRULE_table_or_subquery)
  14744. var _la int
  14745. defer func() {
  14746. p.ExitRule()
  14747. }()
  14748. defer func() {
  14749. if err := recover(); err != nil {
  14750. if v, ok := err.(antlr.RecognitionException); ok {
  14751. localctx.SetException(v)
  14752. p.GetErrorHandler().ReportError(p, v)
  14753. p.GetErrorHandler().Recover(p, v)
  14754. } else {
  14755. panic(err)
  14756. }
  14757. }
  14758. }()
  14759. p.SetState(1579)
  14760. p.GetErrorHandler().Sync(p)
  14761. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 227, p.GetParserRuleContext()) {
  14762. case 1:
  14763. p.EnterOuterAlt(localctx, 1)
  14764. p.SetState(1454)
  14765. p.GetErrorHandler().Sync(p)
  14766. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 203, p.GetParserRuleContext()) == 1 {
  14767. {
  14768. p.SetState(1451)
  14769. p.Schema_name()
  14770. }
  14771. {
  14772. p.SetState(1452)
  14773. p.Match(SQLiteParserDOT)
  14774. }
  14775. }
  14776. {
  14777. p.SetState(1456)
  14778. p.Table_name()
  14779. }
  14780. p.SetState(1461)
  14781. p.GetErrorHandler().Sync(p)
  14782. _la = p.GetTokenStream().LA(1)
  14783. if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL {
  14784. p.SetState(1458)
  14785. p.GetErrorHandler().Sync(p)
  14786. _la = p.GetTokenStream().LA(1)
  14787. if _la == SQLiteParserAS_ {
  14788. {
  14789. p.SetState(1457)
  14790. p.Match(SQLiteParserAS_)
  14791. }
  14792. }
  14793. {
  14794. p.SetState(1460)
  14795. p.Table_alias()
  14796. }
  14797. }
  14798. p.SetState(1468)
  14799. p.GetErrorHandler().Sync(p)
  14800. switch p.GetTokenStream().LA(1) {
  14801. case SQLiteParserINDEXED_:
  14802. {
  14803. p.SetState(1463)
  14804. p.Match(SQLiteParserINDEXED_)
  14805. }
  14806. {
  14807. p.SetState(1464)
  14808. p.Match(SQLiteParserBY_)
  14809. }
  14810. {
  14811. p.SetState(1465)
  14812. p.Index_name()
  14813. }
  14814. case SQLiteParserNOT_:
  14815. {
  14816. p.SetState(1466)
  14817. p.Match(SQLiteParserNOT_)
  14818. }
  14819. {
  14820. p.SetState(1467)
  14821. p.Match(SQLiteParserINDEXED_)
  14822. }
  14823. case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserCLOSE_PAR, SQLiteParserCOMMA, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserDEFAULT_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXCEPT_, SQLiteParserEXPLAIN_, SQLiteParserFULL_, SQLiteParserGROUP_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINTERSECT_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserLIMIT_, SQLiteParserNATURAL_, SQLiteParserON_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUNION_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWINDOW_:
  14824. default:
  14825. }
  14826. case 2:
  14827. p.EnterOuterAlt(localctx, 2)
  14828. p.SetState(1473)
  14829. p.GetErrorHandler().Sync(p)
  14830. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 207, p.GetParserRuleContext()) == 1 {
  14831. {
  14832. p.SetState(1470)
  14833. p.Schema_name()
  14834. }
  14835. {
  14836. p.SetState(1471)
  14837. p.Match(SQLiteParserDOT)
  14838. }
  14839. }
  14840. {
  14841. p.SetState(1475)
  14842. p.Table_function_name()
  14843. }
  14844. {
  14845. p.SetState(1476)
  14846. p.Match(SQLiteParserOPEN_PAR)
  14847. }
  14848. {
  14849. p.SetState(1477)
  14850. p.expr(0)
  14851. }
  14852. p.SetState(1482)
  14853. p.GetErrorHandler().Sync(p)
  14854. _la = p.GetTokenStream().LA(1)
  14855. for _la == SQLiteParserCOMMA {
  14856. {
  14857. p.SetState(1478)
  14858. p.Match(SQLiteParserCOMMA)
  14859. }
  14860. {
  14861. p.SetState(1479)
  14862. p.expr(0)
  14863. }
  14864. p.SetState(1484)
  14865. p.GetErrorHandler().Sync(p)
  14866. _la = p.GetTokenStream().LA(1)
  14867. }
  14868. {
  14869. p.SetState(1485)
  14870. p.Match(SQLiteParserCLOSE_PAR)
  14871. }
  14872. p.SetState(1490)
  14873. p.GetErrorHandler().Sync(p)
  14874. _la = p.GetTokenStream().LA(1)
  14875. if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL {
  14876. p.SetState(1487)
  14877. p.GetErrorHandler().Sync(p)
  14878. _la = p.GetTokenStream().LA(1)
  14879. if _la == SQLiteParserAS_ {
  14880. {
  14881. p.SetState(1486)
  14882. p.Match(SQLiteParserAS_)
  14883. }
  14884. }
  14885. {
  14886. p.SetState(1489)
  14887. p.Table_alias()
  14888. }
  14889. }
  14890. case 3:
  14891. p.EnterOuterAlt(localctx, 3)
  14892. {
  14893. p.SetState(1492)
  14894. p.Match(SQLiteParserOPEN_PAR)
  14895. }
  14896. p.SetState(1502)
  14897. p.GetErrorHandler().Sync(p)
  14898. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 212, p.GetParserRuleContext()) {
  14899. case 1:
  14900. {
  14901. p.SetState(1493)
  14902. p.Table_or_subquery()
  14903. }
  14904. p.SetState(1498)
  14905. p.GetErrorHandler().Sync(p)
  14906. _la = p.GetTokenStream().LA(1)
  14907. for _la == SQLiteParserCOMMA {
  14908. {
  14909. p.SetState(1494)
  14910. p.Match(SQLiteParserCOMMA)
  14911. }
  14912. {
  14913. p.SetState(1495)
  14914. p.Table_or_subquery()
  14915. }
  14916. p.SetState(1500)
  14917. p.GetErrorHandler().Sync(p)
  14918. _la = p.GetTokenStream().LA(1)
  14919. }
  14920. case 2:
  14921. {
  14922. p.SetState(1501)
  14923. p.Join_clause()
  14924. }
  14925. }
  14926. {
  14927. p.SetState(1504)
  14928. p.Match(SQLiteParserCLOSE_PAR)
  14929. }
  14930. case 4:
  14931. p.EnterOuterAlt(localctx, 4)
  14932. {
  14933. p.SetState(1506)
  14934. p.Match(SQLiteParserOPEN_PAR)
  14935. }
  14936. {
  14937. p.SetState(1507)
  14938. p.Select_stmt()
  14939. }
  14940. {
  14941. p.SetState(1508)
  14942. p.Match(SQLiteParserCLOSE_PAR)
  14943. }
  14944. p.SetState(1513)
  14945. p.GetErrorHandler().Sync(p)
  14946. _la = p.GetTokenStream().LA(1)
  14947. if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL {
  14948. p.SetState(1510)
  14949. p.GetErrorHandler().Sync(p)
  14950. _la = p.GetTokenStream().LA(1)
  14951. if _la == SQLiteParserAS_ {
  14952. {
  14953. p.SetState(1509)
  14954. p.Match(SQLiteParserAS_)
  14955. }
  14956. }
  14957. {
  14958. p.SetState(1512)
  14959. p.Table_alias()
  14960. }
  14961. }
  14962. case 5:
  14963. p.EnterOuterAlt(localctx, 5)
  14964. p.SetState(1518)
  14965. p.GetErrorHandler().Sync(p)
  14966. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 215, p.GetParserRuleContext()) == 1 {
  14967. {
  14968. p.SetState(1515)
  14969. p.Schema_name()
  14970. }
  14971. {
  14972. p.SetState(1516)
  14973. p.Match(SQLiteParserDOT)
  14974. }
  14975. }
  14976. {
  14977. p.SetState(1520)
  14978. p.Table_name()
  14979. }
  14980. p.SetState(1525)
  14981. p.GetErrorHandler().Sync(p)
  14982. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 217, p.GetParserRuleContext()) == 1 {
  14983. p.SetState(1522)
  14984. p.GetErrorHandler().Sync(p)
  14985. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 216, p.GetParserRuleContext()) == 1 {
  14986. {
  14987. p.SetState(1521)
  14988. p.Match(SQLiteParserAS_)
  14989. }
  14990. }
  14991. {
  14992. p.SetState(1524)
  14993. p.Table_alias_fallback()
  14994. }
  14995. }
  14996. p.SetState(1532)
  14997. p.GetErrorHandler().Sync(p)
  14998. switch p.GetTokenStream().LA(1) {
  14999. case SQLiteParserINDEXED_:
  15000. {
  15001. p.SetState(1527)
  15002. p.Match(SQLiteParserINDEXED_)
  15003. }
  15004. {
  15005. p.SetState(1528)
  15006. p.Match(SQLiteParserBY_)
  15007. }
  15008. {
  15009. p.SetState(1529)
  15010. p.Index_name()
  15011. }
  15012. case SQLiteParserNOT_:
  15013. {
  15014. p.SetState(1530)
  15015. p.Match(SQLiteParserNOT_)
  15016. }
  15017. {
  15018. p.SetState(1531)
  15019. p.Match(SQLiteParserINDEXED_)
  15020. }
  15021. case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserCLOSE_PAR, SQLiteParserCOMMA, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserDEFAULT_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXCEPT_, SQLiteParserEXPLAIN_, SQLiteParserFULL_, SQLiteParserGROUP_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINTERSECT_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserLIMIT_, SQLiteParserNATURAL_, SQLiteParserON_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserUNION_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWINDOW_:
  15022. default:
  15023. }
  15024. case 6:
  15025. p.EnterOuterAlt(localctx, 6)
  15026. p.SetState(1537)
  15027. p.GetErrorHandler().Sync(p)
  15028. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 219, p.GetParserRuleContext()) == 1 {
  15029. {
  15030. p.SetState(1534)
  15031. p.Schema_name()
  15032. }
  15033. {
  15034. p.SetState(1535)
  15035. p.Match(SQLiteParserDOT)
  15036. }
  15037. }
  15038. {
  15039. p.SetState(1539)
  15040. p.Table_function_name()
  15041. }
  15042. {
  15043. p.SetState(1540)
  15044. p.Match(SQLiteParserOPEN_PAR)
  15045. }
  15046. {
  15047. p.SetState(1541)
  15048. p.expr(0)
  15049. }
  15050. p.SetState(1546)
  15051. p.GetErrorHandler().Sync(p)
  15052. _la = p.GetTokenStream().LA(1)
  15053. for _la == SQLiteParserCOMMA {
  15054. {
  15055. p.SetState(1542)
  15056. p.Match(SQLiteParserCOMMA)
  15057. }
  15058. {
  15059. p.SetState(1543)
  15060. p.expr(0)
  15061. }
  15062. p.SetState(1548)
  15063. p.GetErrorHandler().Sync(p)
  15064. _la = p.GetTokenStream().LA(1)
  15065. }
  15066. {
  15067. p.SetState(1549)
  15068. p.Match(SQLiteParserCLOSE_PAR)
  15069. }
  15070. p.SetState(1554)
  15071. p.GetErrorHandler().Sync(p)
  15072. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 222, p.GetParserRuleContext()) == 1 {
  15073. p.SetState(1551)
  15074. p.GetErrorHandler().Sync(p)
  15075. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 221, p.GetParserRuleContext()) == 1 {
  15076. {
  15077. p.SetState(1550)
  15078. p.Match(SQLiteParserAS_)
  15079. }
  15080. }
  15081. {
  15082. p.SetState(1553)
  15083. p.Table_alias_fallback()
  15084. }
  15085. }
  15086. case 7:
  15087. p.EnterOuterAlt(localctx, 7)
  15088. {
  15089. p.SetState(1556)
  15090. p.Match(SQLiteParserOPEN_PAR)
  15091. }
  15092. p.SetState(1566)
  15093. p.GetErrorHandler().Sync(p)
  15094. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 224, p.GetParserRuleContext()) {
  15095. case 1:
  15096. {
  15097. p.SetState(1557)
  15098. p.Table_or_subquery()
  15099. }
  15100. p.SetState(1562)
  15101. p.GetErrorHandler().Sync(p)
  15102. _la = p.GetTokenStream().LA(1)
  15103. for _la == SQLiteParserCOMMA {
  15104. {
  15105. p.SetState(1558)
  15106. p.Match(SQLiteParserCOMMA)
  15107. }
  15108. {
  15109. p.SetState(1559)
  15110. p.Table_or_subquery()
  15111. }
  15112. p.SetState(1564)
  15113. p.GetErrorHandler().Sync(p)
  15114. _la = p.GetTokenStream().LA(1)
  15115. }
  15116. case 2:
  15117. {
  15118. p.SetState(1565)
  15119. p.Join_clause()
  15120. }
  15121. }
  15122. {
  15123. p.SetState(1568)
  15124. p.Match(SQLiteParserCLOSE_PAR)
  15125. }
  15126. case 8:
  15127. p.EnterOuterAlt(localctx, 8)
  15128. {
  15129. p.SetState(1570)
  15130. p.Match(SQLiteParserOPEN_PAR)
  15131. }
  15132. {
  15133. p.SetState(1571)
  15134. p.Select_stmt()
  15135. }
  15136. {
  15137. p.SetState(1572)
  15138. p.Match(SQLiteParserCLOSE_PAR)
  15139. }
  15140. p.SetState(1577)
  15141. p.GetErrorHandler().Sync(p)
  15142. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 226, p.GetParserRuleContext()) == 1 {
  15143. p.SetState(1574)
  15144. p.GetErrorHandler().Sync(p)
  15145. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 225, p.GetParserRuleContext()) == 1 {
  15146. {
  15147. p.SetState(1573)
  15148. p.Match(SQLiteParserAS_)
  15149. }
  15150. }
  15151. {
  15152. p.SetState(1576)
  15153. p.Table_alias_fallback()
  15154. }
  15155. }
  15156. }
  15157. return localctx
  15158. }
  15159. // IResult_columnContext is an interface to support dynamic dispatch.
  15160. type IResult_columnContext interface {
  15161. antlr.ParserRuleContext
  15162. // GetParser returns the parser.
  15163. GetParser() antlr.Parser
  15164. // Getter signatures
  15165. STAR() antlr.TerminalNode
  15166. Table_name() ITable_nameContext
  15167. DOT() antlr.TerminalNode
  15168. Expr() IExprContext
  15169. Column_alias() IColumn_aliasContext
  15170. AS_() antlr.TerminalNode
  15171. // IsResult_columnContext differentiates from other interfaces.
  15172. IsResult_columnContext()
  15173. }
  15174. type Result_columnContext struct {
  15175. *antlr.BaseParserRuleContext
  15176. parser antlr.Parser
  15177. }
  15178. func NewEmptyResult_columnContext() *Result_columnContext {
  15179. var p = new(Result_columnContext)
  15180. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  15181. p.RuleIndex = SQLiteParserRULE_result_column
  15182. return p
  15183. }
  15184. func (*Result_columnContext) IsResult_columnContext() {}
  15185. func NewResult_columnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Result_columnContext {
  15186. var p = new(Result_columnContext)
  15187. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  15188. p.parser = parser
  15189. p.RuleIndex = SQLiteParserRULE_result_column
  15190. return p
  15191. }
  15192. func (s *Result_columnContext) GetParser() antlr.Parser { return s.parser }
  15193. func (s *Result_columnContext) STAR() antlr.TerminalNode {
  15194. return s.GetToken(SQLiteParserSTAR, 0)
  15195. }
  15196. func (s *Result_columnContext) Table_name() ITable_nameContext {
  15197. var t antlr.RuleContext
  15198. for _, ctx := range s.GetChildren() {
  15199. if _, ok := ctx.(ITable_nameContext); ok {
  15200. t = ctx.(antlr.RuleContext)
  15201. break
  15202. }
  15203. }
  15204. if t == nil {
  15205. return nil
  15206. }
  15207. return t.(ITable_nameContext)
  15208. }
  15209. func (s *Result_columnContext) DOT() antlr.TerminalNode {
  15210. return s.GetToken(SQLiteParserDOT, 0)
  15211. }
  15212. func (s *Result_columnContext) Expr() IExprContext {
  15213. var t antlr.RuleContext
  15214. for _, ctx := range s.GetChildren() {
  15215. if _, ok := ctx.(IExprContext); ok {
  15216. t = ctx.(antlr.RuleContext)
  15217. break
  15218. }
  15219. }
  15220. if t == nil {
  15221. return nil
  15222. }
  15223. return t.(IExprContext)
  15224. }
  15225. func (s *Result_columnContext) Column_alias() IColumn_aliasContext {
  15226. var t antlr.RuleContext
  15227. for _, ctx := range s.GetChildren() {
  15228. if _, ok := ctx.(IColumn_aliasContext); ok {
  15229. t = ctx.(antlr.RuleContext)
  15230. break
  15231. }
  15232. }
  15233. if t == nil {
  15234. return nil
  15235. }
  15236. return t.(IColumn_aliasContext)
  15237. }
  15238. func (s *Result_columnContext) AS_() antlr.TerminalNode {
  15239. return s.GetToken(SQLiteParserAS_, 0)
  15240. }
  15241. func (s *Result_columnContext) GetRuleContext() antlr.RuleContext {
  15242. return s
  15243. }
  15244. func (s *Result_columnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  15245. return antlr.TreesStringTree(s, ruleNames, recog)
  15246. }
  15247. func (s *Result_columnContext) EnterRule(listener antlr.ParseTreeListener) {
  15248. if listenerT, ok := listener.(SQLiteParserListener); ok {
  15249. listenerT.EnterResult_column(s)
  15250. }
  15251. }
  15252. func (s *Result_columnContext) ExitRule(listener antlr.ParseTreeListener) {
  15253. if listenerT, ok := listener.(SQLiteParserListener); ok {
  15254. listenerT.ExitResult_column(s)
  15255. }
  15256. }
  15257. func (p *SQLiteParser) Result_column() (localctx IResult_columnContext) {
  15258. this := p
  15259. _ = this
  15260. localctx = NewResult_columnContext(p, p.GetParserRuleContext(), p.GetState())
  15261. p.EnterRule(localctx, 98, SQLiteParserRULE_result_column)
  15262. var _la int
  15263. defer func() {
  15264. p.ExitRule()
  15265. }()
  15266. defer func() {
  15267. if err := recover(); err != nil {
  15268. if v, ok := err.(antlr.RecognitionException); ok {
  15269. localctx.SetException(v)
  15270. p.GetErrorHandler().ReportError(p, v)
  15271. p.GetErrorHandler().Recover(p, v)
  15272. } else {
  15273. panic(err)
  15274. }
  15275. }
  15276. }()
  15277. p.SetState(1593)
  15278. p.GetErrorHandler().Sync(p)
  15279. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 230, p.GetParserRuleContext()) {
  15280. case 1:
  15281. p.EnterOuterAlt(localctx, 1)
  15282. {
  15283. p.SetState(1581)
  15284. p.Match(SQLiteParserSTAR)
  15285. }
  15286. case 2:
  15287. p.EnterOuterAlt(localctx, 2)
  15288. {
  15289. p.SetState(1582)
  15290. p.Table_name()
  15291. }
  15292. {
  15293. p.SetState(1583)
  15294. p.Match(SQLiteParserDOT)
  15295. }
  15296. {
  15297. p.SetState(1584)
  15298. p.Match(SQLiteParserSTAR)
  15299. }
  15300. case 3:
  15301. p.EnterOuterAlt(localctx, 3)
  15302. {
  15303. p.SetState(1586)
  15304. p.expr(0)
  15305. }
  15306. p.SetState(1591)
  15307. p.GetErrorHandler().Sync(p)
  15308. _la = p.GetTokenStream().LA(1)
  15309. if _la == SQLiteParserAS_ || _la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL {
  15310. p.SetState(1588)
  15311. p.GetErrorHandler().Sync(p)
  15312. _la = p.GetTokenStream().LA(1)
  15313. if _la == SQLiteParserAS_ {
  15314. {
  15315. p.SetState(1587)
  15316. p.Match(SQLiteParserAS_)
  15317. }
  15318. }
  15319. {
  15320. p.SetState(1590)
  15321. p.Column_alias()
  15322. }
  15323. }
  15324. }
  15325. return localctx
  15326. }
  15327. // IJoin_operatorContext is an interface to support dynamic dispatch.
  15328. type IJoin_operatorContext interface {
  15329. antlr.ParserRuleContext
  15330. // GetParser returns the parser.
  15331. GetParser() antlr.Parser
  15332. // Getter signatures
  15333. COMMA() antlr.TerminalNode
  15334. JOIN_() antlr.TerminalNode
  15335. NATURAL_() antlr.TerminalNode
  15336. INNER_() antlr.TerminalNode
  15337. LEFT_() antlr.TerminalNode
  15338. RIGHT_() antlr.TerminalNode
  15339. FULL_() antlr.TerminalNode
  15340. OUTER_() antlr.TerminalNode
  15341. CROSS_() antlr.TerminalNode
  15342. // IsJoin_operatorContext differentiates from other interfaces.
  15343. IsJoin_operatorContext()
  15344. }
  15345. type Join_operatorContext struct {
  15346. *antlr.BaseParserRuleContext
  15347. parser antlr.Parser
  15348. }
  15349. func NewEmptyJoin_operatorContext() *Join_operatorContext {
  15350. var p = new(Join_operatorContext)
  15351. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  15352. p.RuleIndex = SQLiteParserRULE_join_operator
  15353. return p
  15354. }
  15355. func (*Join_operatorContext) IsJoin_operatorContext() {}
  15356. func NewJoin_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_operatorContext {
  15357. var p = new(Join_operatorContext)
  15358. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  15359. p.parser = parser
  15360. p.RuleIndex = SQLiteParserRULE_join_operator
  15361. return p
  15362. }
  15363. func (s *Join_operatorContext) GetParser() antlr.Parser { return s.parser }
  15364. func (s *Join_operatorContext) COMMA() antlr.TerminalNode {
  15365. return s.GetToken(SQLiteParserCOMMA, 0)
  15366. }
  15367. func (s *Join_operatorContext) JOIN_() antlr.TerminalNode {
  15368. return s.GetToken(SQLiteParserJOIN_, 0)
  15369. }
  15370. func (s *Join_operatorContext) NATURAL_() antlr.TerminalNode {
  15371. return s.GetToken(SQLiteParserNATURAL_, 0)
  15372. }
  15373. func (s *Join_operatorContext) INNER_() antlr.TerminalNode {
  15374. return s.GetToken(SQLiteParserINNER_, 0)
  15375. }
  15376. func (s *Join_operatorContext) LEFT_() antlr.TerminalNode {
  15377. return s.GetToken(SQLiteParserLEFT_, 0)
  15378. }
  15379. func (s *Join_operatorContext) RIGHT_() antlr.TerminalNode {
  15380. return s.GetToken(SQLiteParserRIGHT_, 0)
  15381. }
  15382. func (s *Join_operatorContext) FULL_() antlr.TerminalNode {
  15383. return s.GetToken(SQLiteParserFULL_, 0)
  15384. }
  15385. func (s *Join_operatorContext) OUTER_() antlr.TerminalNode {
  15386. return s.GetToken(SQLiteParserOUTER_, 0)
  15387. }
  15388. func (s *Join_operatorContext) CROSS_() antlr.TerminalNode {
  15389. return s.GetToken(SQLiteParserCROSS_, 0)
  15390. }
  15391. func (s *Join_operatorContext) GetRuleContext() antlr.RuleContext {
  15392. return s
  15393. }
  15394. func (s *Join_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  15395. return antlr.TreesStringTree(s, ruleNames, recog)
  15396. }
  15397. func (s *Join_operatorContext) EnterRule(listener antlr.ParseTreeListener) {
  15398. if listenerT, ok := listener.(SQLiteParserListener); ok {
  15399. listenerT.EnterJoin_operator(s)
  15400. }
  15401. }
  15402. func (s *Join_operatorContext) ExitRule(listener antlr.ParseTreeListener) {
  15403. if listenerT, ok := listener.(SQLiteParserListener); ok {
  15404. listenerT.ExitJoin_operator(s)
  15405. }
  15406. }
  15407. func (p *SQLiteParser) Join_operator() (localctx IJoin_operatorContext) {
  15408. this := p
  15409. _ = this
  15410. localctx = NewJoin_operatorContext(p, p.GetParserRuleContext(), p.GetState())
  15411. p.EnterRule(localctx, 100, SQLiteParserRULE_join_operator)
  15412. var _la int
  15413. defer func() {
  15414. p.ExitRule()
  15415. }()
  15416. defer func() {
  15417. if err := recover(); err != nil {
  15418. if v, ok := err.(antlr.RecognitionException); ok {
  15419. localctx.SetException(v)
  15420. p.GetErrorHandler().ReportError(p, v)
  15421. p.GetErrorHandler().Recover(p, v)
  15422. } else {
  15423. panic(err)
  15424. }
  15425. }
  15426. }()
  15427. p.SetState(1609)
  15428. p.GetErrorHandler().Sync(p)
  15429. switch p.GetTokenStream().LA(1) {
  15430. case SQLiteParserCOMMA:
  15431. p.EnterOuterAlt(localctx, 1)
  15432. {
  15433. p.SetState(1595)
  15434. p.Match(SQLiteParserCOMMA)
  15435. }
  15436. case SQLiteParserFULL_, SQLiteParserINNER_, SQLiteParserJOIN_, SQLiteParserLEFT_, SQLiteParserNATURAL_, SQLiteParserRIGHT_:
  15437. p.EnterOuterAlt(localctx, 2)
  15438. p.SetState(1597)
  15439. p.GetErrorHandler().Sync(p)
  15440. _la = p.GetTokenStream().LA(1)
  15441. if _la == SQLiteParserNATURAL_ {
  15442. {
  15443. p.SetState(1596)
  15444. p.Match(SQLiteParserNATURAL_)
  15445. }
  15446. }
  15447. p.SetState(1604)
  15448. p.GetErrorHandler().Sync(p)
  15449. switch p.GetTokenStream().LA(1) {
  15450. case SQLiteParserFULL_, SQLiteParserLEFT_, SQLiteParserRIGHT_:
  15451. {
  15452. p.SetState(1599)
  15453. _la = p.GetTokenStream().LA(1)
  15454. if !((int64((_la-78)) & ^0x3f) == 0 && ((int64(1)<<(_la-78))&562949954469889) != 0) {
  15455. p.GetErrorHandler().RecoverInline(p)
  15456. } else {
  15457. p.GetErrorHandler().ReportMatch(p)
  15458. p.Consume()
  15459. }
  15460. }
  15461. p.SetState(1601)
  15462. p.GetErrorHandler().Sync(p)
  15463. _la = p.GetTokenStream().LA(1)
  15464. if _la == SQLiteParserOUTER_ {
  15465. {
  15466. p.SetState(1600)
  15467. p.Match(SQLiteParserOUTER_)
  15468. }
  15469. }
  15470. case SQLiteParserINNER_:
  15471. {
  15472. p.SetState(1603)
  15473. p.Match(SQLiteParserINNER_)
  15474. }
  15475. case SQLiteParserJOIN_:
  15476. default:
  15477. }
  15478. {
  15479. p.SetState(1606)
  15480. p.Match(SQLiteParserJOIN_)
  15481. }
  15482. case SQLiteParserCROSS_:
  15483. p.EnterOuterAlt(localctx, 3)
  15484. {
  15485. p.SetState(1607)
  15486. p.Match(SQLiteParserCROSS_)
  15487. }
  15488. {
  15489. p.SetState(1608)
  15490. p.Match(SQLiteParserJOIN_)
  15491. }
  15492. default:
  15493. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  15494. }
  15495. return localctx
  15496. }
  15497. // IJoin_constraintContext is an interface to support dynamic dispatch.
  15498. type IJoin_constraintContext interface {
  15499. antlr.ParserRuleContext
  15500. // GetParser returns the parser.
  15501. GetParser() antlr.Parser
  15502. // Getter signatures
  15503. ON_() antlr.TerminalNode
  15504. Expr() IExprContext
  15505. USING_() antlr.TerminalNode
  15506. OPEN_PAR() antlr.TerminalNode
  15507. AllColumn_name() []IColumn_nameContext
  15508. Column_name(i int) IColumn_nameContext
  15509. CLOSE_PAR() antlr.TerminalNode
  15510. AllCOMMA() []antlr.TerminalNode
  15511. COMMA(i int) antlr.TerminalNode
  15512. // IsJoin_constraintContext differentiates from other interfaces.
  15513. IsJoin_constraintContext()
  15514. }
  15515. type Join_constraintContext struct {
  15516. *antlr.BaseParserRuleContext
  15517. parser antlr.Parser
  15518. }
  15519. func NewEmptyJoin_constraintContext() *Join_constraintContext {
  15520. var p = new(Join_constraintContext)
  15521. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  15522. p.RuleIndex = SQLiteParserRULE_join_constraint
  15523. return p
  15524. }
  15525. func (*Join_constraintContext) IsJoin_constraintContext() {}
  15526. func NewJoin_constraintContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Join_constraintContext {
  15527. var p = new(Join_constraintContext)
  15528. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  15529. p.parser = parser
  15530. p.RuleIndex = SQLiteParserRULE_join_constraint
  15531. return p
  15532. }
  15533. func (s *Join_constraintContext) GetParser() antlr.Parser { return s.parser }
  15534. func (s *Join_constraintContext) ON_() antlr.TerminalNode {
  15535. return s.GetToken(SQLiteParserON_, 0)
  15536. }
  15537. func (s *Join_constraintContext) Expr() IExprContext {
  15538. var t antlr.RuleContext
  15539. for _, ctx := range s.GetChildren() {
  15540. if _, ok := ctx.(IExprContext); ok {
  15541. t = ctx.(antlr.RuleContext)
  15542. break
  15543. }
  15544. }
  15545. if t == nil {
  15546. return nil
  15547. }
  15548. return t.(IExprContext)
  15549. }
  15550. func (s *Join_constraintContext) USING_() antlr.TerminalNode {
  15551. return s.GetToken(SQLiteParserUSING_, 0)
  15552. }
  15553. func (s *Join_constraintContext) OPEN_PAR() antlr.TerminalNode {
  15554. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  15555. }
  15556. func (s *Join_constraintContext) AllColumn_name() []IColumn_nameContext {
  15557. children := s.GetChildren()
  15558. len := 0
  15559. for _, ctx := range children {
  15560. if _, ok := ctx.(IColumn_nameContext); ok {
  15561. len++
  15562. }
  15563. }
  15564. tst := make([]IColumn_nameContext, len)
  15565. i := 0
  15566. for _, ctx := range children {
  15567. if t, ok := ctx.(IColumn_nameContext); ok {
  15568. tst[i] = t.(IColumn_nameContext)
  15569. i++
  15570. }
  15571. }
  15572. return tst
  15573. }
  15574. func (s *Join_constraintContext) Column_name(i int) IColumn_nameContext {
  15575. var t antlr.RuleContext
  15576. j := 0
  15577. for _, ctx := range s.GetChildren() {
  15578. if _, ok := ctx.(IColumn_nameContext); ok {
  15579. if j == i {
  15580. t = ctx.(antlr.RuleContext)
  15581. break
  15582. }
  15583. j++
  15584. }
  15585. }
  15586. if t == nil {
  15587. return nil
  15588. }
  15589. return t.(IColumn_nameContext)
  15590. }
  15591. func (s *Join_constraintContext) CLOSE_PAR() antlr.TerminalNode {
  15592. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  15593. }
  15594. func (s *Join_constraintContext) AllCOMMA() []antlr.TerminalNode {
  15595. return s.GetTokens(SQLiteParserCOMMA)
  15596. }
  15597. func (s *Join_constraintContext) COMMA(i int) antlr.TerminalNode {
  15598. return s.GetToken(SQLiteParserCOMMA, i)
  15599. }
  15600. func (s *Join_constraintContext) GetRuleContext() antlr.RuleContext {
  15601. return s
  15602. }
  15603. func (s *Join_constraintContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  15604. return antlr.TreesStringTree(s, ruleNames, recog)
  15605. }
  15606. func (s *Join_constraintContext) EnterRule(listener antlr.ParseTreeListener) {
  15607. if listenerT, ok := listener.(SQLiteParserListener); ok {
  15608. listenerT.EnterJoin_constraint(s)
  15609. }
  15610. }
  15611. func (s *Join_constraintContext) ExitRule(listener antlr.ParseTreeListener) {
  15612. if listenerT, ok := listener.(SQLiteParserListener); ok {
  15613. listenerT.ExitJoin_constraint(s)
  15614. }
  15615. }
  15616. func (p *SQLiteParser) Join_constraint() (localctx IJoin_constraintContext) {
  15617. this := p
  15618. _ = this
  15619. localctx = NewJoin_constraintContext(p, p.GetParserRuleContext(), p.GetState())
  15620. p.EnterRule(localctx, 102, SQLiteParserRULE_join_constraint)
  15621. var _la int
  15622. defer func() {
  15623. p.ExitRule()
  15624. }()
  15625. defer func() {
  15626. if err := recover(); err != nil {
  15627. if v, ok := err.(antlr.RecognitionException); ok {
  15628. localctx.SetException(v)
  15629. p.GetErrorHandler().ReportError(p, v)
  15630. p.GetErrorHandler().Recover(p, v)
  15631. } else {
  15632. panic(err)
  15633. }
  15634. }
  15635. }()
  15636. p.EnterOuterAlt(localctx, 1)
  15637. p.SetState(1625)
  15638. p.GetErrorHandler().Sync(p)
  15639. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 236, p.GetParserRuleContext()) == 1 {
  15640. {
  15641. p.SetState(1611)
  15642. p.Match(SQLiteParserON_)
  15643. }
  15644. {
  15645. p.SetState(1612)
  15646. p.expr(0)
  15647. }
  15648. } else if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 236, p.GetParserRuleContext()) == 2 {
  15649. {
  15650. p.SetState(1613)
  15651. p.Match(SQLiteParserUSING_)
  15652. }
  15653. {
  15654. p.SetState(1614)
  15655. p.Match(SQLiteParserOPEN_PAR)
  15656. }
  15657. {
  15658. p.SetState(1615)
  15659. p.Column_name()
  15660. }
  15661. p.SetState(1620)
  15662. p.GetErrorHandler().Sync(p)
  15663. _la = p.GetTokenStream().LA(1)
  15664. for _la == SQLiteParserCOMMA {
  15665. {
  15666. p.SetState(1616)
  15667. p.Match(SQLiteParserCOMMA)
  15668. }
  15669. {
  15670. p.SetState(1617)
  15671. p.Column_name()
  15672. }
  15673. p.SetState(1622)
  15674. p.GetErrorHandler().Sync(p)
  15675. _la = p.GetTokenStream().LA(1)
  15676. }
  15677. {
  15678. p.SetState(1623)
  15679. p.Match(SQLiteParserCLOSE_PAR)
  15680. }
  15681. }
  15682. return localctx
  15683. }
  15684. // ICompound_operatorContext is an interface to support dynamic dispatch.
  15685. type ICompound_operatorContext interface {
  15686. antlr.ParserRuleContext
  15687. // GetParser returns the parser.
  15688. GetParser() antlr.Parser
  15689. // Getter signatures
  15690. UNION_() antlr.TerminalNode
  15691. ALL_() antlr.TerminalNode
  15692. INTERSECT_() antlr.TerminalNode
  15693. EXCEPT_() antlr.TerminalNode
  15694. // IsCompound_operatorContext differentiates from other interfaces.
  15695. IsCompound_operatorContext()
  15696. }
  15697. type Compound_operatorContext struct {
  15698. *antlr.BaseParserRuleContext
  15699. parser antlr.Parser
  15700. }
  15701. func NewEmptyCompound_operatorContext() *Compound_operatorContext {
  15702. var p = new(Compound_operatorContext)
  15703. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  15704. p.RuleIndex = SQLiteParserRULE_compound_operator
  15705. return p
  15706. }
  15707. func (*Compound_operatorContext) IsCompound_operatorContext() {}
  15708. func NewCompound_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Compound_operatorContext {
  15709. var p = new(Compound_operatorContext)
  15710. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  15711. p.parser = parser
  15712. p.RuleIndex = SQLiteParserRULE_compound_operator
  15713. return p
  15714. }
  15715. func (s *Compound_operatorContext) GetParser() antlr.Parser { return s.parser }
  15716. func (s *Compound_operatorContext) UNION_() antlr.TerminalNode {
  15717. return s.GetToken(SQLiteParserUNION_, 0)
  15718. }
  15719. func (s *Compound_operatorContext) ALL_() antlr.TerminalNode {
  15720. return s.GetToken(SQLiteParserALL_, 0)
  15721. }
  15722. func (s *Compound_operatorContext) INTERSECT_() antlr.TerminalNode {
  15723. return s.GetToken(SQLiteParserINTERSECT_, 0)
  15724. }
  15725. func (s *Compound_operatorContext) EXCEPT_() antlr.TerminalNode {
  15726. return s.GetToken(SQLiteParserEXCEPT_, 0)
  15727. }
  15728. func (s *Compound_operatorContext) GetRuleContext() antlr.RuleContext {
  15729. return s
  15730. }
  15731. func (s *Compound_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  15732. return antlr.TreesStringTree(s, ruleNames, recog)
  15733. }
  15734. func (s *Compound_operatorContext) EnterRule(listener antlr.ParseTreeListener) {
  15735. if listenerT, ok := listener.(SQLiteParserListener); ok {
  15736. listenerT.EnterCompound_operator(s)
  15737. }
  15738. }
  15739. func (s *Compound_operatorContext) ExitRule(listener antlr.ParseTreeListener) {
  15740. if listenerT, ok := listener.(SQLiteParserListener); ok {
  15741. listenerT.ExitCompound_operator(s)
  15742. }
  15743. }
  15744. func (p *SQLiteParser) Compound_operator() (localctx ICompound_operatorContext) {
  15745. this := p
  15746. _ = this
  15747. localctx = NewCompound_operatorContext(p, p.GetParserRuleContext(), p.GetState())
  15748. p.EnterRule(localctx, 104, SQLiteParserRULE_compound_operator)
  15749. var _la int
  15750. defer func() {
  15751. p.ExitRule()
  15752. }()
  15753. defer func() {
  15754. if err := recover(); err != nil {
  15755. if v, ok := err.(antlr.RecognitionException); ok {
  15756. localctx.SetException(v)
  15757. p.GetErrorHandler().ReportError(p, v)
  15758. p.GetErrorHandler().Recover(p, v)
  15759. } else {
  15760. panic(err)
  15761. }
  15762. }
  15763. }()
  15764. p.SetState(1633)
  15765. p.GetErrorHandler().Sync(p)
  15766. switch p.GetTokenStream().LA(1) {
  15767. case SQLiteParserUNION_:
  15768. p.EnterOuterAlt(localctx, 1)
  15769. {
  15770. p.SetState(1627)
  15771. p.Match(SQLiteParserUNION_)
  15772. }
  15773. p.SetState(1629)
  15774. p.GetErrorHandler().Sync(p)
  15775. _la = p.GetTokenStream().LA(1)
  15776. if _la == SQLiteParserALL_ {
  15777. {
  15778. p.SetState(1628)
  15779. p.Match(SQLiteParserALL_)
  15780. }
  15781. }
  15782. case SQLiteParserINTERSECT_:
  15783. p.EnterOuterAlt(localctx, 2)
  15784. {
  15785. p.SetState(1631)
  15786. p.Match(SQLiteParserINTERSECT_)
  15787. }
  15788. case SQLiteParserEXCEPT_:
  15789. p.EnterOuterAlt(localctx, 3)
  15790. {
  15791. p.SetState(1632)
  15792. p.Match(SQLiteParserEXCEPT_)
  15793. }
  15794. default:
  15795. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  15796. }
  15797. return localctx
  15798. }
  15799. // IUpdate_stmtContext is an interface to support dynamic dispatch.
  15800. type IUpdate_stmtContext interface {
  15801. antlr.ParserRuleContext
  15802. // GetParser returns the parser.
  15803. GetParser() antlr.Parser
  15804. // Getter signatures
  15805. UPDATE_() antlr.TerminalNode
  15806. Qualified_table_name() IQualified_table_nameContext
  15807. SET_() antlr.TerminalNode
  15808. AllASSIGN() []antlr.TerminalNode
  15809. ASSIGN(i int) antlr.TerminalNode
  15810. AllExpr() []IExprContext
  15811. Expr(i int) IExprContext
  15812. AllColumn_name() []IColumn_nameContext
  15813. Column_name(i int) IColumn_nameContext
  15814. AllColumn_name_list() []IColumn_name_listContext
  15815. Column_name_list(i int) IColumn_name_listContext
  15816. With_clause() IWith_clauseContext
  15817. OR_() antlr.TerminalNode
  15818. AllCOMMA() []antlr.TerminalNode
  15819. COMMA(i int) antlr.TerminalNode
  15820. WHERE_() antlr.TerminalNode
  15821. Returning_clause() IReturning_clauseContext
  15822. ROLLBACK_() antlr.TerminalNode
  15823. ABORT_() antlr.TerminalNode
  15824. REPLACE_() antlr.TerminalNode
  15825. FAIL_() antlr.TerminalNode
  15826. IGNORE_() antlr.TerminalNode
  15827. // IsUpdate_stmtContext differentiates from other interfaces.
  15828. IsUpdate_stmtContext()
  15829. }
  15830. type Update_stmtContext struct {
  15831. *antlr.BaseParserRuleContext
  15832. parser antlr.Parser
  15833. }
  15834. func NewEmptyUpdate_stmtContext() *Update_stmtContext {
  15835. var p = new(Update_stmtContext)
  15836. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  15837. p.RuleIndex = SQLiteParserRULE_update_stmt
  15838. return p
  15839. }
  15840. func (*Update_stmtContext) IsUpdate_stmtContext() {}
  15841. func NewUpdate_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Update_stmtContext {
  15842. var p = new(Update_stmtContext)
  15843. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  15844. p.parser = parser
  15845. p.RuleIndex = SQLiteParserRULE_update_stmt
  15846. return p
  15847. }
  15848. func (s *Update_stmtContext) GetParser() antlr.Parser { return s.parser }
  15849. func (s *Update_stmtContext) UPDATE_() antlr.TerminalNode {
  15850. return s.GetToken(SQLiteParserUPDATE_, 0)
  15851. }
  15852. func (s *Update_stmtContext) Qualified_table_name() IQualified_table_nameContext {
  15853. var t antlr.RuleContext
  15854. for _, ctx := range s.GetChildren() {
  15855. if _, ok := ctx.(IQualified_table_nameContext); ok {
  15856. t = ctx.(antlr.RuleContext)
  15857. break
  15858. }
  15859. }
  15860. if t == nil {
  15861. return nil
  15862. }
  15863. return t.(IQualified_table_nameContext)
  15864. }
  15865. func (s *Update_stmtContext) SET_() antlr.TerminalNode {
  15866. return s.GetToken(SQLiteParserSET_, 0)
  15867. }
  15868. func (s *Update_stmtContext) AllASSIGN() []antlr.TerminalNode {
  15869. return s.GetTokens(SQLiteParserASSIGN)
  15870. }
  15871. func (s *Update_stmtContext) ASSIGN(i int) antlr.TerminalNode {
  15872. return s.GetToken(SQLiteParserASSIGN, i)
  15873. }
  15874. func (s *Update_stmtContext) AllExpr() []IExprContext {
  15875. children := s.GetChildren()
  15876. len := 0
  15877. for _, ctx := range children {
  15878. if _, ok := ctx.(IExprContext); ok {
  15879. len++
  15880. }
  15881. }
  15882. tst := make([]IExprContext, len)
  15883. i := 0
  15884. for _, ctx := range children {
  15885. if t, ok := ctx.(IExprContext); ok {
  15886. tst[i] = t.(IExprContext)
  15887. i++
  15888. }
  15889. }
  15890. return tst
  15891. }
  15892. func (s *Update_stmtContext) Expr(i int) IExprContext {
  15893. var t antlr.RuleContext
  15894. j := 0
  15895. for _, ctx := range s.GetChildren() {
  15896. if _, ok := ctx.(IExprContext); ok {
  15897. if j == i {
  15898. t = ctx.(antlr.RuleContext)
  15899. break
  15900. }
  15901. j++
  15902. }
  15903. }
  15904. if t == nil {
  15905. return nil
  15906. }
  15907. return t.(IExprContext)
  15908. }
  15909. func (s *Update_stmtContext) AllColumn_name() []IColumn_nameContext {
  15910. children := s.GetChildren()
  15911. len := 0
  15912. for _, ctx := range children {
  15913. if _, ok := ctx.(IColumn_nameContext); ok {
  15914. len++
  15915. }
  15916. }
  15917. tst := make([]IColumn_nameContext, len)
  15918. i := 0
  15919. for _, ctx := range children {
  15920. if t, ok := ctx.(IColumn_nameContext); ok {
  15921. tst[i] = t.(IColumn_nameContext)
  15922. i++
  15923. }
  15924. }
  15925. return tst
  15926. }
  15927. func (s *Update_stmtContext) Column_name(i int) IColumn_nameContext {
  15928. var t antlr.RuleContext
  15929. j := 0
  15930. for _, ctx := range s.GetChildren() {
  15931. if _, ok := ctx.(IColumn_nameContext); ok {
  15932. if j == i {
  15933. t = ctx.(antlr.RuleContext)
  15934. break
  15935. }
  15936. j++
  15937. }
  15938. }
  15939. if t == nil {
  15940. return nil
  15941. }
  15942. return t.(IColumn_nameContext)
  15943. }
  15944. func (s *Update_stmtContext) AllColumn_name_list() []IColumn_name_listContext {
  15945. children := s.GetChildren()
  15946. len := 0
  15947. for _, ctx := range children {
  15948. if _, ok := ctx.(IColumn_name_listContext); ok {
  15949. len++
  15950. }
  15951. }
  15952. tst := make([]IColumn_name_listContext, len)
  15953. i := 0
  15954. for _, ctx := range children {
  15955. if t, ok := ctx.(IColumn_name_listContext); ok {
  15956. tst[i] = t.(IColumn_name_listContext)
  15957. i++
  15958. }
  15959. }
  15960. return tst
  15961. }
  15962. func (s *Update_stmtContext) Column_name_list(i int) IColumn_name_listContext {
  15963. var t antlr.RuleContext
  15964. j := 0
  15965. for _, ctx := range s.GetChildren() {
  15966. if _, ok := ctx.(IColumn_name_listContext); ok {
  15967. if j == i {
  15968. t = ctx.(antlr.RuleContext)
  15969. break
  15970. }
  15971. j++
  15972. }
  15973. }
  15974. if t == nil {
  15975. return nil
  15976. }
  15977. return t.(IColumn_name_listContext)
  15978. }
  15979. func (s *Update_stmtContext) With_clause() IWith_clauseContext {
  15980. var t antlr.RuleContext
  15981. for _, ctx := range s.GetChildren() {
  15982. if _, ok := ctx.(IWith_clauseContext); ok {
  15983. t = ctx.(antlr.RuleContext)
  15984. break
  15985. }
  15986. }
  15987. if t == nil {
  15988. return nil
  15989. }
  15990. return t.(IWith_clauseContext)
  15991. }
  15992. func (s *Update_stmtContext) OR_() antlr.TerminalNode {
  15993. return s.GetToken(SQLiteParserOR_, 0)
  15994. }
  15995. func (s *Update_stmtContext) AllCOMMA() []antlr.TerminalNode {
  15996. return s.GetTokens(SQLiteParserCOMMA)
  15997. }
  15998. func (s *Update_stmtContext) COMMA(i int) antlr.TerminalNode {
  15999. return s.GetToken(SQLiteParserCOMMA, i)
  16000. }
  16001. func (s *Update_stmtContext) WHERE_() antlr.TerminalNode {
  16002. return s.GetToken(SQLiteParserWHERE_, 0)
  16003. }
  16004. func (s *Update_stmtContext) Returning_clause() IReturning_clauseContext {
  16005. var t antlr.RuleContext
  16006. for _, ctx := range s.GetChildren() {
  16007. if _, ok := ctx.(IReturning_clauseContext); ok {
  16008. t = ctx.(antlr.RuleContext)
  16009. break
  16010. }
  16011. }
  16012. if t == nil {
  16013. return nil
  16014. }
  16015. return t.(IReturning_clauseContext)
  16016. }
  16017. func (s *Update_stmtContext) ROLLBACK_() antlr.TerminalNode {
  16018. return s.GetToken(SQLiteParserROLLBACK_, 0)
  16019. }
  16020. func (s *Update_stmtContext) ABORT_() antlr.TerminalNode {
  16021. return s.GetToken(SQLiteParserABORT_, 0)
  16022. }
  16023. func (s *Update_stmtContext) REPLACE_() antlr.TerminalNode {
  16024. return s.GetToken(SQLiteParserREPLACE_, 0)
  16025. }
  16026. func (s *Update_stmtContext) FAIL_() antlr.TerminalNode {
  16027. return s.GetToken(SQLiteParserFAIL_, 0)
  16028. }
  16029. func (s *Update_stmtContext) IGNORE_() antlr.TerminalNode {
  16030. return s.GetToken(SQLiteParserIGNORE_, 0)
  16031. }
  16032. func (s *Update_stmtContext) GetRuleContext() antlr.RuleContext {
  16033. return s
  16034. }
  16035. func (s *Update_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  16036. return antlr.TreesStringTree(s, ruleNames, recog)
  16037. }
  16038. func (s *Update_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  16039. if listenerT, ok := listener.(SQLiteParserListener); ok {
  16040. listenerT.EnterUpdate_stmt(s)
  16041. }
  16042. }
  16043. func (s *Update_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  16044. if listenerT, ok := listener.(SQLiteParserListener); ok {
  16045. listenerT.ExitUpdate_stmt(s)
  16046. }
  16047. }
  16048. func (p *SQLiteParser) Update_stmt() (localctx IUpdate_stmtContext) {
  16049. this := p
  16050. _ = this
  16051. localctx = NewUpdate_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  16052. p.EnterRule(localctx, 106, SQLiteParserRULE_update_stmt)
  16053. var _la int
  16054. defer func() {
  16055. p.ExitRule()
  16056. }()
  16057. defer func() {
  16058. if err := recover(); err != nil {
  16059. if v, ok := err.(antlr.RecognitionException); ok {
  16060. localctx.SetException(v)
  16061. p.GetErrorHandler().ReportError(p, v)
  16062. p.GetErrorHandler().Recover(p, v)
  16063. } else {
  16064. panic(err)
  16065. }
  16066. }
  16067. }()
  16068. p.EnterOuterAlt(localctx, 1)
  16069. p.SetState(1636)
  16070. p.GetErrorHandler().Sync(p)
  16071. _la = p.GetTokenStream().LA(1)
  16072. if _la == SQLiteParserWITH_ {
  16073. {
  16074. p.SetState(1635)
  16075. p.With_clause()
  16076. }
  16077. }
  16078. {
  16079. p.SetState(1638)
  16080. p.Match(SQLiteParserUPDATE_)
  16081. }
  16082. p.SetState(1641)
  16083. p.GetErrorHandler().Sync(p)
  16084. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 240, p.GetParserRuleContext()) == 1 {
  16085. {
  16086. p.SetState(1639)
  16087. p.Match(SQLiteParserOR_)
  16088. }
  16089. {
  16090. p.SetState(1640)
  16091. _la = p.GetTokenStream().LA(1)
  16092. if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) {
  16093. p.GetErrorHandler().RecoverInline(p)
  16094. } else {
  16095. p.GetErrorHandler().ReportMatch(p)
  16096. p.Consume()
  16097. }
  16098. }
  16099. }
  16100. {
  16101. p.SetState(1643)
  16102. p.Qualified_table_name()
  16103. }
  16104. {
  16105. p.SetState(1644)
  16106. p.Match(SQLiteParserSET_)
  16107. }
  16108. p.SetState(1647)
  16109. p.GetErrorHandler().Sync(p)
  16110. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 241, p.GetParserRuleContext()) {
  16111. case 1:
  16112. {
  16113. p.SetState(1645)
  16114. p.Column_name()
  16115. }
  16116. case 2:
  16117. {
  16118. p.SetState(1646)
  16119. p.Column_name_list()
  16120. }
  16121. }
  16122. {
  16123. p.SetState(1649)
  16124. p.Match(SQLiteParserASSIGN)
  16125. }
  16126. {
  16127. p.SetState(1650)
  16128. p.expr(0)
  16129. }
  16130. p.SetState(1661)
  16131. p.GetErrorHandler().Sync(p)
  16132. _la = p.GetTokenStream().LA(1)
  16133. for _la == SQLiteParserCOMMA {
  16134. {
  16135. p.SetState(1651)
  16136. p.Match(SQLiteParserCOMMA)
  16137. }
  16138. p.SetState(1654)
  16139. p.GetErrorHandler().Sync(p)
  16140. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 242, p.GetParserRuleContext()) {
  16141. case 1:
  16142. {
  16143. p.SetState(1652)
  16144. p.Column_name()
  16145. }
  16146. case 2:
  16147. {
  16148. p.SetState(1653)
  16149. p.Column_name_list()
  16150. }
  16151. }
  16152. {
  16153. p.SetState(1656)
  16154. p.Match(SQLiteParserASSIGN)
  16155. }
  16156. {
  16157. p.SetState(1657)
  16158. p.expr(0)
  16159. }
  16160. p.SetState(1663)
  16161. p.GetErrorHandler().Sync(p)
  16162. _la = p.GetTokenStream().LA(1)
  16163. }
  16164. p.SetState(1666)
  16165. p.GetErrorHandler().Sync(p)
  16166. _la = p.GetTokenStream().LA(1)
  16167. if _la == SQLiteParserWHERE_ {
  16168. {
  16169. p.SetState(1664)
  16170. p.Match(SQLiteParserWHERE_)
  16171. }
  16172. {
  16173. p.SetState(1665)
  16174. p.expr(0)
  16175. }
  16176. }
  16177. p.SetState(1669)
  16178. p.GetErrorHandler().Sync(p)
  16179. _la = p.GetTokenStream().LA(1)
  16180. if _la == SQLiteParserRETURNING_ {
  16181. {
  16182. p.SetState(1668)
  16183. p.Returning_clause()
  16184. }
  16185. }
  16186. return localctx
  16187. }
  16188. // IColumn_name_listContext is an interface to support dynamic dispatch.
  16189. type IColumn_name_listContext interface {
  16190. antlr.ParserRuleContext
  16191. // GetParser returns the parser.
  16192. GetParser() antlr.Parser
  16193. // Getter signatures
  16194. OPEN_PAR() antlr.TerminalNode
  16195. AllColumn_name() []IColumn_nameContext
  16196. Column_name(i int) IColumn_nameContext
  16197. CLOSE_PAR() antlr.TerminalNode
  16198. AllCOMMA() []antlr.TerminalNode
  16199. COMMA(i int) antlr.TerminalNode
  16200. // IsColumn_name_listContext differentiates from other interfaces.
  16201. IsColumn_name_listContext()
  16202. }
  16203. type Column_name_listContext struct {
  16204. *antlr.BaseParserRuleContext
  16205. parser antlr.Parser
  16206. }
  16207. func NewEmptyColumn_name_listContext() *Column_name_listContext {
  16208. var p = new(Column_name_listContext)
  16209. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  16210. p.RuleIndex = SQLiteParserRULE_column_name_list
  16211. return p
  16212. }
  16213. func (*Column_name_listContext) IsColumn_name_listContext() {}
  16214. func NewColumn_name_listContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_name_listContext {
  16215. var p = new(Column_name_listContext)
  16216. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  16217. p.parser = parser
  16218. p.RuleIndex = SQLiteParserRULE_column_name_list
  16219. return p
  16220. }
  16221. func (s *Column_name_listContext) GetParser() antlr.Parser { return s.parser }
  16222. func (s *Column_name_listContext) OPEN_PAR() antlr.TerminalNode {
  16223. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  16224. }
  16225. func (s *Column_name_listContext) AllColumn_name() []IColumn_nameContext {
  16226. children := s.GetChildren()
  16227. len := 0
  16228. for _, ctx := range children {
  16229. if _, ok := ctx.(IColumn_nameContext); ok {
  16230. len++
  16231. }
  16232. }
  16233. tst := make([]IColumn_nameContext, len)
  16234. i := 0
  16235. for _, ctx := range children {
  16236. if t, ok := ctx.(IColumn_nameContext); ok {
  16237. tst[i] = t.(IColumn_nameContext)
  16238. i++
  16239. }
  16240. }
  16241. return tst
  16242. }
  16243. func (s *Column_name_listContext) Column_name(i int) IColumn_nameContext {
  16244. var t antlr.RuleContext
  16245. j := 0
  16246. for _, ctx := range s.GetChildren() {
  16247. if _, ok := ctx.(IColumn_nameContext); ok {
  16248. if j == i {
  16249. t = ctx.(antlr.RuleContext)
  16250. break
  16251. }
  16252. j++
  16253. }
  16254. }
  16255. if t == nil {
  16256. return nil
  16257. }
  16258. return t.(IColumn_nameContext)
  16259. }
  16260. func (s *Column_name_listContext) CLOSE_PAR() antlr.TerminalNode {
  16261. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  16262. }
  16263. func (s *Column_name_listContext) AllCOMMA() []antlr.TerminalNode {
  16264. return s.GetTokens(SQLiteParserCOMMA)
  16265. }
  16266. func (s *Column_name_listContext) COMMA(i int) antlr.TerminalNode {
  16267. return s.GetToken(SQLiteParserCOMMA, i)
  16268. }
  16269. func (s *Column_name_listContext) GetRuleContext() antlr.RuleContext {
  16270. return s
  16271. }
  16272. func (s *Column_name_listContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  16273. return antlr.TreesStringTree(s, ruleNames, recog)
  16274. }
  16275. func (s *Column_name_listContext) EnterRule(listener antlr.ParseTreeListener) {
  16276. if listenerT, ok := listener.(SQLiteParserListener); ok {
  16277. listenerT.EnterColumn_name_list(s)
  16278. }
  16279. }
  16280. func (s *Column_name_listContext) ExitRule(listener antlr.ParseTreeListener) {
  16281. if listenerT, ok := listener.(SQLiteParserListener); ok {
  16282. listenerT.ExitColumn_name_list(s)
  16283. }
  16284. }
  16285. func (p *SQLiteParser) Column_name_list() (localctx IColumn_name_listContext) {
  16286. this := p
  16287. _ = this
  16288. localctx = NewColumn_name_listContext(p, p.GetParserRuleContext(), p.GetState())
  16289. p.EnterRule(localctx, 108, SQLiteParserRULE_column_name_list)
  16290. var _la int
  16291. defer func() {
  16292. p.ExitRule()
  16293. }()
  16294. defer func() {
  16295. if err := recover(); err != nil {
  16296. if v, ok := err.(antlr.RecognitionException); ok {
  16297. localctx.SetException(v)
  16298. p.GetErrorHandler().ReportError(p, v)
  16299. p.GetErrorHandler().Recover(p, v)
  16300. } else {
  16301. panic(err)
  16302. }
  16303. }
  16304. }()
  16305. p.EnterOuterAlt(localctx, 1)
  16306. {
  16307. p.SetState(1671)
  16308. p.Match(SQLiteParserOPEN_PAR)
  16309. }
  16310. {
  16311. p.SetState(1672)
  16312. p.Column_name()
  16313. }
  16314. p.SetState(1677)
  16315. p.GetErrorHandler().Sync(p)
  16316. _la = p.GetTokenStream().LA(1)
  16317. for _la == SQLiteParserCOMMA {
  16318. {
  16319. p.SetState(1673)
  16320. p.Match(SQLiteParserCOMMA)
  16321. }
  16322. {
  16323. p.SetState(1674)
  16324. p.Column_name()
  16325. }
  16326. p.SetState(1679)
  16327. p.GetErrorHandler().Sync(p)
  16328. _la = p.GetTokenStream().LA(1)
  16329. }
  16330. {
  16331. p.SetState(1680)
  16332. p.Match(SQLiteParserCLOSE_PAR)
  16333. }
  16334. return localctx
  16335. }
  16336. // IUpdate_stmt_limitedContext is an interface to support dynamic dispatch.
  16337. type IUpdate_stmt_limitedContext interface {
  16338. antlr.ParserRuleContext
  16339. // GetParser returns the parser.
  16340. GetParser() antlr.Parser
  16341. // Getter signatures
  16342. UPDATE_() antlr.TerminalNode
  16343. Qualified_table_name() IQualified_table_nameContext
  16344. SET_() antlr.TerminalNode
  16345. AllASSIGN() []antlr.TerminalNode
  16346. ASSIGN(i int) antlr.TerminalNode
  16347. AllExpr() []IExprContext
  16348. Expr(i int) IExprContext
  16349. AllColumn_name() []IColumn_nameContext
  16350. Column_name(i int) IColumn_nameContext
  16351. AllColumn_name_list() []IColumn_name_listContext
  16352. Column_name_list(i int) IColumn_name_listContext
  16353. With_clause() IWith_clauseContext
  16354. OR_() antlr.TerminalNode
  16355. AllCOMMA() []antlr.TerminalNode
  16356. COMMA(i int) antlr.TerminalNode
  16357. WHERE_() antlr.TerminalNode
  16358. Limit_stmt() ILimit_stmtContext
  16359. ROLLBACK_() antlr.TerminalNode
  16360. ABORT_() antlr.TerminalNode
  16361. REPLACE_() antlr.TerminalNode
  16362. FAIL_() antlr.TerminalNode
  16363. IGNORE_() antlr.TerminalNode
  16364. Order_by_stmt() IOrder_by_stmtContext
  16365. // IsUpdate_stmt_limitedContext differentiates from other interfaces.
  16366. IsUpdate_stmt_limitedContext()
  16367. }
  16368. type Update_stmt_limitedContext struct {
  16369. *antlr.BaseParserRuleContext
  16370. parser antlr.Parser
  16371. }
  16372. func NewEmptyUpdate_stmt_limitedContext() *Update_stmt_limitedContext {
  16373. var p = new(Update_stmt_limitedContext)
  16374. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  16375. p.RuleIndex = SQLiteParserRULE_update_stmt_limited
  16376. return p
  16377. }
  16378. func (*Update_stmt_limitedContext) IsUpdate_stmt_limitedContext() {}
  16379. func NewUpdate_stmt_limitedContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Update_stmt_limitedContext {
  16380. var p = new(Update_stmt_limitedContext)
  16381. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  16382. p.parser = parser
  16383. p.RuleIndex = SQLiteParserRULE_update_stmt_limited
  16384. return p
  16385. }
  16386. func (s *Update_stmt_limitedContext) GetParser() antlr.Parser { return s.parser }
  16387. func (s *Update_stmt_limitedContext) UPDATE_() antlr.TerminalNode {
  16388. return s.GetToken(SQLiteParserUPDATE_, 0)
  16389. }
  16390. func (s *Update_stmt_limitedContext) Qualified_table_name() IQualified_table_nameContext {
  16391. var t antlr.RuleContext
  16392. for _, ctx := range s.GetChildren() {
  16393. if _, ok := ctx.(IQualified_table_nameContext); ok {
  16394. t = ctx.(antlr.RuleContext)
  16395. break
  16396. }
  16397. }
  16398. if t == nil {
  16399. return nil
  16400. }
  16401. return t.(IQualified_table_nameContext)
  16402. }
  16403. func (s *Update_stmt_limitedContext) SET_() antlr.TerminalNode {
  16404. return s.GetToken(SQLiteParserSET_, 0)
  16405. }
  16406. func (s *Update_stmt_limitedContext) AllASSIGN() []antlr.TerminalNode {
  16407. return s.GetTokens(SQLiteParserASSIGN)
  16408. }
  16409. func (s *Update_stmt_limitedContext) ASSIGN(i int) antlr.TerminalNode {
  16410. return s.GetToken(SQLiteParserASSIGN, i)
  16411. }
  16412. func (s *Update_stmt_limitedContext) AllExpr() []IExprContext {
  16413. children := s.GetChildren()
  16414. len := 0
  16415. for _, ctx := range children {
  16416. if _, ok := ctx.(IExprContext); ok {
  16417. len++
  16418. }
  16419. }
  16420. tst := make([]IExprContext, len)
  16421. i := 0
  16422. for _, ctx := range children {
  16423. if t, ok := ctx.(IExprContext); ok {
  16424. tst[i] = t.(IExprContext)
  16425. i++
  16426. }
  16427. }
  16428. return tst
  16429. }
  16430. func (s *Update_stmt_limitedContext) Expr(i int) IExprContext {
  16431. var t antlr.RuleContext
  16432. j := 0
  16433. for _, ctx := range s.GetChildren() {
  16434. if _, ok := ctx.(IExprContext); ok {
  16435. if j == i {
  16436. t = ctx.(antlr.RuleContext)
  16437. break
  16438. }
  16439. j++
  16440. }
  16441. }
  16442. if t == nil {
  16443. return nil
  16444. }
  16445. return t.(IExprContext)
  16446. }
  16447. func (s *Update_stmt_limitedContext) AllColumn_name() []IColumn_nameContext {
  16448. children := s.GetChildren()
  16449. len := 0
  16450. for _, ctx := range children {
  16451. if _, ok := ctx.(IColumn_nameContext); ok {
  16452. len++
  16453. }
  16454. }
  16455. tst := make([]IColumn_nameContext, len)
  16456. i := 0
  16457. for _, ctx := range children {
  16458. if t, ok := ctx.(IColumn_nameContext); ok {
  16459. tst[i] = t.(IColumn_nameContext)
  16460. i++
  16461. }
  16462. }
  16463. return tst
  16464. }
  16465. func (s *Update_stmt_limitedContext) Column_name(i int) IColumn_nameContext {
  16466. var t antlr.RuleContext
  16467. j := 0
  16468. for _, ctx := range s.GetChildren() {
  16469. if _, ok := ctx.(IColumn_nameContext); ok {
  16470. if j == i {
  16471. t = ctx.(antlr.RuleContext)
  16472. break
  16473. }
  16474. j++
  16475. }
  16476. }
  16477. if t == nil {
  16478. return nil
  16479. }
  16480. return t.(IColumn_nameContext)
  16481. }
  16482. func (s *Update_stmt_limitedContext) AllColumn_name_list() []IColumn_name_listContext {
  16483. children := s.GetChildren()
  16484. len := 0
  16485. for _, ctx := range children {
  16486. if _, ok := ctx.(IColumn_name_listContext); ok {
  16487. len++
  16488. }
  16489. }
  16490. tst := make([]IColumn_name_listContext, len)
  16491. i := 0
  16492. for _, ctx := range children {
  16493. if t, ok := ctx.(IColumn_name_listContext); ok {
  16494. tst[i] = t.(IColumn_name_listContext)
  16495. i++
  16496. }
  16497. }
  16498. return tst
  16499. }
  16500. func (s *Update_stmt_limitedContext) Column_name_list(i int) IColumn_name_listContext {
  16501. var t antlr.RuleContext
  16502. j := 0
  16503. for _, ctx := range s.GetChildren() {
  16504. if _, ok := ctx.(IColumn_name_listContext); ok {
  16505. if j == i {
  16506. t = ctx.(antlr.RuleContext)
  16507. break
  16508. }
  16509. j++
  16510. }
  16511. }
  16512. if t == nil {
  16513. return nil
  16514. }
  16515. return t.(IColumn_name_listContext)
  16516. }
  16517. func (s *Update_stmt_limitedContext) With_clause() IWith_clauseContext {
  16518. var t antlr.RuleContext
  16519. for _, ctx := range s.GetChildren() {
  16520. if _, ok := ctx.(IWith_clauseContext); ok {
  16521. t = ctx.(antlr.RuleContext)
  16522. break
  16523. }
  16524. }
  16525. if t == nil {
  16526. return nil
  16527. }
  16528. return t.(IWith_clauseContext)
  16529. }
  16530. func (s *Update_stmt_limitedContext) OR_() antlr.TerminalNode {
  16531. return s.GetToken(SQLiteParserOR_, 0)
  16532. }
  16533. func (s *Update_stmt_limitedContext) AllCOMMA() []antlr.TerminalNode {
  16534. return s.GetTokens(SQLiteParserCOMMA)
  16535. }
  16536. func (s *Update_stmt_limitedContext) COMMA(i int) antlr.TerminalNode {
  16537. return s.GetToken(SQLiteParserCOMMA, i)
  16538. }
  16539. func (s *Update_stmt_limitedContext) WHERE_() antlr.TerminalNode {
  16540. return s.GetToken(SQLiteParserWHERE_, 0)
  16541. }
  16542. func (s *Update_stmt_limitedContext) Limit_stmt() ILimit_stmtContext {
  16543. var t antlr.RuleContext
  16544. for _, ctx := range s.GetChildren() {
  16545. if _, ok := ctx.(ILimit_stmtContext); ok {
  16546. t = ctx.(antlr.RuleContext)
  16547. break
  16548. }
  16549. }
  16550. if t == nil {
  16551. return nil
  16552. }
  16553. return t.(ILimit_stmtContext)
  16554. }
  16555. func (s *Update_stmt_limitedContext) ROLLBACK_() antlr.TerminalNode {
  16556. return s.GetToken(SQLiteParserROLLBACK_, 0)
  16557. }
  16558. func (s *Update_stmt_limitedContext) ABORT_() antlr.TerminalNode {
  16559. return s.GetToken(SQLiteParserABORT_, 0)
  16560. }
  16561. func (s *Update_stmt_limitedContext) REPLACE_() antlr.TerminalNode {
  16562. return s.GetToken(SQLiteParserREPLACE_, 0)
  16563. }
  16564. func (s *Update_stmt_limitedContext) FAIL_() antlr.TerminalNode {
  16565. return s.GetToken(SQLiteParserFAIL_, 0)
  16566. }
  16567. func (s *Update_stmt_limitedContext) IGNORE_() antlr.TerminalNode {
  16568. return s.GetToken(SQLiteParserIGNORE_, 0)
  16569. }
  16570. func (s *Update_stmt_limitedContext) Order_by_stmt() IOrder_by_stmtContext {
  16571. var t antlr.RuleContext
  16572. for _, ctx := range s.GetChildren() {
  16573. if _, ok := ctx.(IOrder_by_stmtContext); ok {
  16574. t = ctx.(antlr.RuleContext)
  16575. break
  16576. }
  16577. }
  16578. if t == nil {
  16579. return nil
  16580. }
  16581. return t.(IOrder_by_stmtContext)
  16582. }
  16583. func (s *Update_stmt_limitedContext) GetRuleContext() antlr.RuleContext {
  16584. return s
  16585. }
  16586. func (s *Update_stmt_limitedContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  16587. return antlr.TreesStringTree(s, ruleNames, recog)
  16588. }
  16589. func (s *Update_stmt_limitedContext) EnterRule(listener antlr.ParseTreeListener) {
  16590. if listenerT, ok := listener.(SQLiteParserListener); ok {
  16591. listenerT.EnterUpdate_stmt_limited(s)
  16592. }
  16593. }
  16594. func (s *Update_stmt_limitedContext) ExitRule(listener antlr.ParseTreeListener) {
  16595. if listenerT, ok := listener.(SQLiteParserListener); ok {
  16596. listenerT.ExitUpdate_stmt_limited(s)
  16597. }
  16598. }
  16599. func (p *SQLiteParser) Update_stmt_limited() (localctx IUpdate_stmt_limitedContext) {
  16600. this := p
  16601. _ = this
  16602. localctx = NewUpdate_stmt_limitedContext(p, p.GetParserRuleContext(), p.GetState())
  16603. p.EnterRule(localctx, 110, SQLiteParserRULE_update_stmt_limited)
  16604. var _la int
  16605. defer func() {
  16606. p.ExitRule()
  16607. }()
  16608. defer func() {
  16609. if err := recover(); err != nil {
  16610. if v, ok := err.(antlr.RecognitionException); ok {
  16611. localctx.SetException(v)
  16612. p.GetErrorHandler().ReportError(p, v)
  16613. p.GetErrorHandler().Recover(p, v)
  16614. } else {
  16615. panic(err)
  16616. }
  16617. }
  16618. }()
  16619. p.EnterOuterAlt(localctx, 1)
  16620. p.SetState(1683)
  16621. p.GetErrorHandler().Sync(p)
  16622. _la = p.GetTokenStream().LA(1)
  16623. if _la == SQLiteParserWITH_ {
  16624. {
  16625. p.SetState(1682)
  16626. p.With_clause()
  16627. }
  16628. }
  16629. {
  16630. p.SetState(1685)
  16631. p.Match(SQLiteParserUPDATE_)
  16632. }
  16633. p.SetState(1688)
  16634. p.GetErrorHandler().Sync(p)
  16635. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 248, p.GetParserRuleContext()) == 1 {
  16636. {
  16637. p.SetState(1686)
  16638. p.Match(SQLiteParserOR_)
  16639. }
  16640. {
  16641. p.SetState(1687)
  16642. _la = p.GetTokenStream().LA(1)
  16643. if !(_la == SQLiteParserABORT_ || ((int64((_la-74)) & ^0x3f) == 0 && ((int64(1)<<(_la-74))&19140298416325121) != 0)) {
  16644. p.GetErrorHandler().RecoverInline(p)
  16645. } else {
  16646. p.GetErrorHandler().ReportMatch(p)
  16647. p.Consume()
  16648. }
  16649. }
  16650. }
  16651. {
  16652. p.SetState(1690)
  16653. p.Qualified_table_name()
  16654. }
  16655. {
  16656. p.SetState(1691)
  16657. p.Match(SQLiteParserSET_)
  16658. }
  16659. p.SetState(1694)
  16660. p.GetErrorHandler().Sync(p)
  16661. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 249, p.GetParserRuleContext()) {
  16662. case 1:
  16663. {
  16664. p.SetState(1692)
  16665. p.Column_name()
  16666. }
  16667. case 2:
  16668. {
  16669. p.SetState(1693)
  16670. p.Column_name_list()
  16671. }
  16672. }
  16673. {
  16674. p.SetState(1696)
  16675. p.Match(SQLiteParserASSIGN)
  16676. }
  16677. {
  16678. p.SetState(1697)
  16679. p.expr(0)
  16680. }
  16681. p.SetState(1708)
  16682. p.GetErrorHandler().Sync(p)
  16683. _la = p.GetTokenStream().LA(1)
  16684. for _la == SQLiteParserCOMMA {
  16685. {
  16686. p.SetState(1698)
  16687. p.Match(SQLiteParserCOMMA)
  16688. }
  16689. p.SetState(1701)
  16690. p.GetErrorHandler().Sync(p)
  16691. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 250, p.GetParserRuleContext()) {
  16692. case 1:
  16693. {
  16694. p.SetState(1699)
  16695. p.Column_name()
  16696. }
  16697. case 2:
  16698. {
  16699. p.SetState(1700)
  16700. p.Column_name_list()
  16701. }
  16702. }
  16703. {
  16704. p.SetState(1703)
  16705. p.Match(SQLiteParserASSIGN)
  16706. }
  16707. {
  16708. p.SetState(1704)
  16709. p.expr(0)
  16710. }
  16711. p.SetState(1710)
  16712. p.GetErrorHandler().Sync(p)
  16713. _la = p.GetTokenStream().LA(1)
  16714. }
  16715. p.SetState(1713)
  16716. p.GetErrorHandler().Sync(p)
  16717. _la = p.GetTokenStream().LA(1)
  16718. if _la == SQLiteParserWHERE_ {
  16719. {
  16720. p.SetState(1711)
  16721. p.Match(SQLiteParserWHERE_)
  16722. }
  16723. {
  16724. p.SetState(1712)
  16725. p.expr(0)
  16726. }
  16727. }
  16728. p.SetState(1719)
  16729. p.GetErrorHandler().Sync(p)
  16730. _la = p.GetTokenStream().LA(1)
  16731. if _la == SQLiteParserLIMIT_ || _la == SQLiteParserORDER_ {
  16732. p.SetState(1716)
  16733. p.GetErrorHandler().Sync(p)
  16734. _la = p.GetTokenStream().LA(1)
  16735. if _la == SQLiteParserORDER_ {
  16736. {
  16737. p.SetState(1715)
  16738. p.Order_by_stmt()
  16739. }
  16740. }
  16741. {
  16742. p.SetState(1718)
  16743. p.Limit_stmt()
  16744. }
  16745. }
  16746. return localctx
  16747. }
  16748. // IQualified_table_nameContext is an interface to support dynamic dispatch.
  16749. type IQualified_table_nameContext interface {
  16750. antlr.ParserRuleContext
  16751. // GetParser returns the parser.
  16752. GetParser() antlr.Parser
  16753. // Getter signatures
  16754. Table_name() ITable_nameContext
  16755. Schema_name() ISchema_nameContext
  16756. DOT() antlr.TerminalNode
  16757. AS_() antlr.TerminalNode
  16758. Alias() IAliasContext
  16759. INDEXED_() antlr.TerminalNode
  16760. BY_() antlr.TerminalNode
  16761. Index_name() IIndex_nameContext
  16762. NOT_() antlr.TerminalNode
  16763. // IsQualified_table_nameContext differentiates from other interfaces.
  16764. IsQualified_table_nameContext()
  16765. }
  16766. type Qualified_table_nameContext struct {
  16767. *antlr.BaseParserRuleContext
  16768. parser antlr.Parser
  16769. }
  16770. func NewEmptyQualified_table_nameContext() *Qualified_table_nameContext {
  16771. var p = new(Qualified_table_nameContext)
  16772. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  16773. p.RuleIndex = SQLiteParserRULE_qualified_table_name
  16774. return p
  16775. }
  16776. func (*Qualified_table_nameContext) IsQualified_table_nameContext() {}
  16777. func NewQualified_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Qualified_table_nameContext {
  16778. var p = new(Qualified_table_nameContext)
  16779. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  16780. p.parser = parser
  16781. p.RuleIndex = SQLiteParserRULE_qualified_table_name
  16782. return p
  16783. }
  16784. func (s *Qualified_table_nameContext) GetParser() antlr.Parser { return s.parser }
  16785. func (s *Qualified_table_nameContext) Table_name() ITable_nameContext {
  16786. var t antlr.RuleContext
  16787. for _, ctx := range s.GetChildren() {
  16788. if _, ok := ctx.(ITable_nameContext); ok {
  16789. t = ctx.(antlr.RuleContext)
  16790. break
  16791. }
  16792. }
  16793. if t == nil {
  16794. return nil
  16795. }
  16796. return t.(ITable_nameContext)
  16797. }
  16798. func (s *Qualified_table_nameContext) Schema_name() ISchema_nameContext {
  16799. var t antlr.RuleContext
  16800. for _, ctx := range s.GetChildren() {
  16801. if _, ok := ctx.(ISchema_nameContext); ok {
  16802. t = ctx.(antlr.RuleContext)
  16803. break
  16804. }
  16805. }
  16806. if t == nil {
  16807. return nil
  16808. }
  16809. return t.(ISchema_nameContext)
  16810. }
  16811. func (s *Qualified_table_nameContext) DOT() antlr.TerminalNode {
  16812. return s.GetToken(SQLiteParserDOT, 0)
  16813. }
  16814. func (s *Qualified_table_nameContext) AS_() antlr.TerminalNode {
  16815. return s.GetToken(SQLiteParserAS_, 0)
  16816. }
  16817. func (s *Qualified_table_nameContext) Alias() IAliasContext {
  16818. var t antlr.RuleContext
  16819. for _, ctx := range s.GetChildren() {
  16820. if _, ok := ctx.(IAliasContext); ok {
  16821. t = ctx.(antlr.RuleContext)
  16822. break
  16823. }
  16824. }
  16825. if t == nil {
  16826. return nil
  16827. }
  16828. return t.(IAliasContext)
  16829. }
  16830. func (s *Qualified_table_nameContext) INDEXED_() antlr.TerminalNode {
  16831. return s.GetToken(SQLiteParserINDEXED_, 0)
  16832. }
  16833. func (s *Qualified_table_nameContext) BY_() antlr.TerminalNode {
  16834. return s.GetToken(SQLiteParserBY_, 0)
  16835. }
  16836. func (s *Qualified_table_nameContext) Index_name() IIndex_nameContext {
  16837. var t antlr.RuleContext
  16838. for _, ctx := range s.GetChildren() {
  16839. if _, ok := ctx.(IIndex_nameContext); ok {
  16840. t = ctx.(antlr.RuleContext)
  16841. break
  16842. }
  16843. }
  16844. if t == nil {
  16845. return nil
  16846. }
  16847. return t.(IIndex_nameContext)
  16848. }
  16849. func (s *Qualified_table_nameContext) NOT_() antlr.TerminalNode {
  16850. return s.GetToken(SQLiteParserNOT_, 0)
  16851. }
  16852. func (s *Qualified_table_nameContext) GetRuleContext() antlr.RuleContext {
  16853. return s
  16854. }
  16855. func (s *Qualified_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  16856. return antlr.TreesStringTree(s, ruleNames, recog)
  16857. }
  16858. func (s *Qualified_table_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  16859. if listenerT, ok := listener.(SQLiteParserListener); ok {
  16860. listenerT.EnterQualified_table_name(s)
  16861. }
  16862. }
  16863. func (s *Qualified_table_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  16864. if listenerT, ok := listener.(SQLiteParserListener); ok {
  16865. listenerT.ExitQualified_table_name(s)
  16866. }
  16867. }
  16868. func (p *SQLiteParser) Qualified_table_name() (localctx IQualified_table_nameContext) {
  16869. this := p
  16870. _ = this
  16871. localctx = NewQualified_table_nameContext(p, p.GetParserRuleContext(), p.GetState())
  16872. p.EnterRule(localctx, 112, SQLiteParserRULE_qualified_table_name)
  16873. var _la int
  16874. defer func() {
  16875. p.ExitRule()
  16876. }()
  16877. defer func() {
  16878. if err := recover(); err != nil {
  16879. if v, ok := err.(antlr.RecognitionException); ok {
  16880. localctx.SetException(v)
  16881. p.GetErrorHandler().ReportError(p, v)
  16882. p.GetErrorHandler().Recover(p, v)
  16883. } else {
  16884. panic(err)
  16885. }
  16886. }
  16887. }()
  16888. p.EnterOuterAlt(localctx, 1)
  16889. p.SetState(1724)
  16890. p.GetErrorHandler().Sync(p)
  16891. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 255, p.GetParserRuleContext()) == 1 {
  16892. {
  16893. p.SetState(1721)
  16894. p.Schema_name()
  16895. }
  16896. {
  16897. p.SetState(1722)
  16898. p.Match(SQLiteParserDOT)
  16899. }
  16900. }
  16901. {
  16902. p.SetState(1726)
  16903. p.Table_name()
  16904. }
  16905. p.SetState(1729)
  16906. p.GetErrorHandler().Sync(p)
  16907. _la = p.GetTokenStream().LA(1)
  16908. if _la == SQLiteParserAS_ {
  16909. {
  16910. p.SetState(1727)
  16911. p.Match(SQLiteParserAS_)
  16912. }
  16913. {
  16914. p.SetState(1728)
  16915. p.Alias()
  16916. }
  16917. }
  16918. p.SetState(1736)
  16919. p.GetErrorHandler().Sync(p)
  16920. switch p.GetTokenStream().LA(1) {
  16921. case SQLiteParserINDEXED_:
  16922. {
  16923. p.SetState(1731)
  16924. p.Match(SQLiteParserINDEXED_)
  16925. }
  16926. {
  16927. p.SetState(1732)
  16928. p.Match(SQLiteParserBY_)
  16929. }
  16930. {
  16931. p.SetState(1733)
  16932. p.Index_name()
  16933. }
  16934. case SQLiteParserNOT_:
  16935. {
  16936. p.SetState(1734)
  16937. p.Match(SQLiteParserNOT_)
  16938. }
  16939. {
  16940. p.SetState(1735)
  16941. p.Match(SQLiteParserINDEXED_)
  16942. }
  16943. case SQLiteParserEOF, SQLiteParserSCOL, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserATTACH_, SQLiteParserBEGIN_, SQLiteParserCOMMIT_, SQLiteParserCREATE_, SQLiteParserDEFAULT_, SQLiteParserDELETE_, SQLiteParserDETACH_, SQLiteParserDROP_, SQLiteParserEND_, SQLiteParserEXPLAIN_, SQLiteParserINSERT_, SQLiteParserLIMIT_, SQLiteParserORDER_, SQLiteParserPRAGMA_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserREPLACE_, SQLiteParserRETURNING_, SQLiteParserROLLBACK_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserUPDATE_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserWHERE_, SQLiteParserWITH_:
  16944. default:
  16945. }
  16946. return localctx
  16947. }
  16948. // IVacuum_stmtContext is an interface to support dynamic dispatch.
  16949. type IVacuum_stmtContext interface {
  16950. antlr.ParserRuleContext
  16951. // GetParser returns the parser.
  16952. GetParser() antlr.Parser
  16953. // Getter signatures
  16954. VACUUM_() antlr.TerminalNode
  16955. Schema_name() ISchema_nameContext
  16956. INTO_() antlr.TerminalNode
  16957. Filename() IFilenameContext
  16958. // IsVacuum_stmtContext differentiates from other interfaces.
  16959. IsVacuum_stmtContext()
  16960. }
  16961. type Vacuum_stmtContext struct {
  16962. *antlr.BaseParserRuleContext
  16963. parser antlr.Parser
  16964. }
  16965. func NewEmptyVacuum_stmtContext() *Vacuum_stmtContext {
  16966. var p = new(Vacuum_stmtContext)
  16967. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  16968. p.RuleIndex = SQLiteParserRULE_vacuum_stmt
  16969. return p
  16970. }
  16971. func (*Vacuum_stmtContext) IsVacuum_stmtContext() {}
  16972. func NewVacuum_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Vacuum_stmtContext {
  16973. var p = new(Vacuum_stmtContext)
  16974. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  16975. p.parser = parser
  16976. p.RuleIndex = SQLiteParserRULE_vacuum_stmt
  16977. return p
  16978. }
  16979. func (s *Vacuum_stmtContext) GetParser() antlr.Parser { return s.parser }
  16980. func (s *Vacuum_stmtContext) VACUUM_() antlr.TerminalNode {
  16981. return s.GetToken(SQLiteParserVACUUM_, 0)
  16982. }
  16983. func (s *Vacuum_stmtContext) Schema_name() ISchema_nameContext {
  16984. var t antlr.RuleContext
  16985. for _, ctx := range s.GetChildren() {
  16986. if _, ok := ctx.(ISchema_nameContext); ok {
  16987. t = ctx.(antlr.RuleContext)
  16988. break
  16989. }
  16990. }
  16991. if t == nil {
  16992. return nil
  16993. }
  16994. return t.(ISchema_nameContext)
  16995. }
  16996. func (s *Vacuum_stmtContext) INTO_() antlr.TerminalNode {
  16997. return s.GetToken(SQLiteParserINTO_, 0)
  16998. }
  16999. func (s *Vacuum_stmtContext) Filename() IFilenameContext {
  17000. var t antlr.RuleContext
  17001. for _, ctx := range s.GetChildren() {
  17002. if _, ok := ctx.(IFilenameContext); ok {
  17003. t = ctx.(antlr.RuleContext)
  17004. break
  17005. }
  17006. }
  17007. if t == nil {
  17008. return nil
  17009. }
  17010. return t.(IFilenameContext)
  17011. }
  17012. func (s *Vacuum_stmtContext) GetRuleContext() antlr.RuleContext {
  17013. return s
  17014. }
  17015. func (s *Vacuum_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  17016. return antlr.TreesStringTree(s, ruleNames, recog)
  17017. }
  17018. func (s *Vacuum_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  17019. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17020. listenerT.EnterVacuum_stmt(s)
  17021. }
  17022. }
  17023. func (s *Vacuum_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  17024. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17025. listenerT.ExitVacuum_stmt(s)
  17026. }
  17027. }
  17028. func (p *SQLiteParser) Vacuum_stmt() (localctx IVacuum_stmtContext) {
  17029. this := p
  17030. _ = this
  17031. localctx = NewVacuum_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  17032. p.EnterRule(localctx, 114, SQLiteParserRULE_vacuum_stmt)
  17033. var _la int
  17034. defer func() {
  17035. p.ExitRule()
  17036. }()
  17037. defer func() {
  17038. if err := recover(); err != nil {
  17039. if v, ok := err.(antlr.RecognitionException); ok {
  17040. localctx.SetException(v)
  17041. p.GetErrorHandler().ReportError(p, v)
  17042. p.GetErrorHandler().Recover(p, v)
  17043. } else {
  17044. panic(err)
  17045. }
  17046. }
  17047. }()
  17048. p.EnterOuterAlt(localctx, 1)
  17049. {
  17050. p.SetState(1738)
  17051. p.Match(SQLiteParserVACUUM_)
  17052. }
  17053. p.SetState(1740)
  17054. p.GetErrorHandler().Sync(p)
  17055. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 258, p.GetParserRuleContext()) == 1 {
  17056. {
  17057. p.SetState(1739)
  17058. p.Schema_name()
  17059. }
  17060. }
  17061. p.SetState(1744)
  17062. p.GetErrorHandler().Sync(p)
  17063. _la = p.GetTokenStream().LA(1)
  17064. if _la == SQLiteParserINTO_ {
  17065. {
  17066. p.SetState(1742)
  17067. p.Match(SQLiteParserINTO_)
  17068. }
  17069. {
  17070. p.SetState(1743)
  17071. p.Filename()
  17072. }
  17073. }
  17074. return localctx
  17075. }
  17076. // IFilter_clauseContext is an interface to support dynamic dispatch.
  17077. type IFilter_clauseContext interface {
  17078. antlr.ParserRuleContext
  17079. // GetParser returns the parser.
  17080. GetParser() antlr.Parser
  17081. // Getter signatures
  17082. FILTER_() antlr.TerminalNode
  17083. OPEN_PAR() antlr.TerminalNode
  17084. WHERE_() antlr.TerminalNode
  17085. Expr() IExprContext
  17086. CLOSE_PAR() antlr.TerminalNode
  17087. // IsFilter_clauseContext differentiates from other interfaces.
  17088. IsFilter_clauseContext()
  17089. }
  17090. type Filter_clauseContext struct {
  17091. *antlr.BaseParserRuleContext
  17092. parser antlr.Parser
  17093. }
  17094. func NewEmptyFilter_clauseContext() *Filter_clauseContext {
  17095. var p = new(Filter_clauseContext)
  17096. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  17097. p.RuleIndex = SQLiteParserRULE_filter_clause
  17098. return p
  17099. }
  17100. func (*Filter_clauseContext) IsFilter_clauseContext() {}
  17101. func NewFilter_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Filter_clauseContext {
  17102. var p = new(Filter_clauseContext)
  17103. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  17104. p.parser = parser
  17105. p.RuleIndex = SQLiteParserRULE_filter_clause
  17106. return p
  17107. }
  17108. func (s *Filter_clauseContext) GetParser() antlr.Parser { return s.parser }
  17109. func (s *Filter_clauseContext) FILTER_() antlr.TerminalNode {
  17110. return s.GetToken(SQLiteParserFILTER_, 0)
  17111. }
  17112. func (s *Filter_clauseContext) OPEN_PAR() antlr.TerminalNode {
  17113. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  17114. }
  17115. func (s *Filter_clauseContext) WHERE_() antlr.TerminalNode {
  17116. return s.GetToken(SQLiteParserWHERE_, 0)
  17117. }
  17118. func (s *Filter_clauseContext) Expr() IExprContext {
  17119. var t antlr.RuleContext
  17120. for _, ctx := range s.GetChildren() {
  17121. if _, ok := ctx.(IExprContext); ok {
  17122. t = ctx.(antlr.RuleContext)
  17123. break
  17124. }
  17125. }
  17126. if t == nil {
  17127. return nil
  17128. }
  17129. return t.(IExprContext)
  17130. }
  17131. func (s *Filter_clauseContext) CLOSE_PAR() antlr.TerminalNode {
  17132. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  17133. }
  17134. func (s *Filter_clauseContext) GetRuleContext() antlr.RuleContext {
  17135. return s
  17136. }
  17137. func (s *Filter_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  17138. return antlr.TreesStringTree(s, ruleNames, recog)
  17139. }
  17140. func (s *Filter_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
  17141. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17142. listenerT.EnterFilter_clause(s)
  17143. }
  17144. }
  17145. func (s *Filter_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
  17146. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17147. listenerT.ExitFilter_clause(s)
  17148. }
  17149. }
  17150. func (p *SQLiteParser) Filter_clause() (localctx IFilter_clauseContext) {
  17151. this := p
  17152. _ = this
  17153. localctx = NewFilter_clauseContext(p, p.GetParserRuleContext(), p.GetState())
  17154. p.EnterRule(localctx, 116, SQLiteParserRULE_filter_clause)
  17155. defer func() {
  17156. p.ExitRule()
  17157. }()
  17158. defer func() {
  17159. if err := recover(); err != nil {
  17160. if v, ok := err.(antlr.RecognitionException); ok {
  17161. localctx.SetException(v)
  17162. p.GetErrorHandler().ReportError(p, v)
  17163. p.GetErrorHandler().Recover(p, v)
  17164. } else {
  17165. panic(err)
  17166. }
  17167. }
  17168. }()
  17169. p.EnterOuterAlt(localctx, 1)
  17170. {
  17171. p.SetState(1746)
  17172. p.Match(SQLiteParserFILTER_)
  17173. }
  17174. {
  17175. p.SetState(1747)
  17176. p.Match(SQLiteParserOPEN_PAR)
  17177. }
  17178. {
  17179. p.SetState(1748)
  17180. p.Match(SQLiteParserWHERE_)
  17181. }
  17182. {
  17183. p.SetState(1749)
  17184. p.expr(0)
  17185. }
  17186. {
  17187. p.SetState(1750)
  17188. p.Match(SQLiteParserCLOSE_PAR)
  17189. }
  17190. return localctx
  17191. }
  17192. // IWindow_defnContext is an interface to support dynamic dispatch.
  17193. type IWindow_defnContext interface {
  17194. antlr.ParserRuleContext
  17195. // GetParser returns the parser.
  17196. GetParser() antlr.Parser
  17197. // Getter signatures
  17198. OPEN_PAR() antlr.TerminalNode
  17199. CLOSE_PAR() antlr.TerminalNode
  17200. ORDER_() antlr.TerminalNode
  17201. AllBY_() []antlr.TerminalNode
  17202. BY_(i int) antlr.TerminalNode
  17203. AllOrdering_term() []IOrdering_termContext
  17204. Ordering_term(i int) IOrdering_termContext
  17205. Base_window_name() IBase_window_nameContext
  17206. PARTITION_() antlr.TerminalNode
  17207. AllExpr() []IExprContext
  17208. Expr(i int) IExprContext
  17209. Frame_spec() IFrame_specContext
  17210. AllCOMMA() []antlr.TerminalNode
  17211. COMMA(i int) antlr.TerminalNode
  17212. // IsWindow_defnContext differentiates from other interfaces.
  17213. IsWindow_defnContext()
  17214. }
  17215. type Window_defnContext struct {
  17216. *antlr.BaseParserRuleContext
  17217. parser antlr.Parser
  17218. }
  17219. func NewEmptyWindow_defnContext() *Window_defnContext {
  17220. var p = new(Window_defnContext)
  17221. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  17222. p.RuleIndex = SQLiteParserRULE_window_defn
  17223. return p
  17224. }
  17225. func (*Window_defnContext) IsWindow_defnContext() {}
  17226. func NewWindow_defnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_defnContext {
  17227. var p = new(Window_defnContext)
  17228. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  17229. p.parser = parser
  17230. p.RuleIndex = SQLiteParserRULE_window_defn
  17231. return p
  17232. }
  17233. func (s *Window_defnContext) GetParser() antlr.Parser { return s.parser }
  17234. func (s *Window_defnContext) OPEN_PAR() antlr.TerminalNode {
  17235. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  17236. }
  17237. func (s *Window_defnContext) CLOSE_PAR() antlr.TerminalNode {
  17238. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  17239. }
  17240. func (s *Window_defnContext) ORDER_() antlr.TerminalNode {
  17241. return s.GetToken(SQLiteParserORDER_, 0)
  17242. }
  17243. func (s *Window_defnContext) AllBY_() []antlr.TerminalNode {
  17244. return s.GetTokens(SQLiteParserBY_)
  17245. }
  17246. func (s *Window_defnContext) BY_(i int) antlr.TerminalNode {
  17247. return s.GetToken(SQLiteParserBY_, i)
  17248. }
  17249. func (s *Window_defnContext) AllOrdering_term() []IOrdering_termContext {
  17250. children := s.GetChildren()
  17251. len := 0
  17252. for _, ctx := range children {
  17253. if _, ok := ctx.(IOrdering_termContext); ok {
  17254. len++
  17255. }
  17256. }
  17257. tst := make([]IOrdering_termContext, len)
  17258. i := 0
  17259. for _, ctx := range children {
  17260. if t, ok := ctx.(IOrdering_termContext); ok {
  17261. tst[i] = t.(IOrdering_termContext)
  17262. i++
  17263. }
  17264. }
  17265. return tst
  17266. }
  17267. func (s *Window_defnContext) Ordering_term(i int) IOrdering_termContext {
  17268. var t antlr.RuleContext
  17269. j := 0
  17270. for _, ctx := range s.GetChildren() {
  17271. if _, ok := ctx.(IOrdering_termContext); ok {
  17272. if j == i {
  17273. t = ctx.(antlr.RuleContext)
  17274. break
  17275. }
  17276. j++
  17277. }
  17278. }
  17279. if t == nil {
  17280. return nil
  17281. }
  17282. return t.(IOrdering_termContext)
  17283. }
  17284. func (s *Window_defnContext) Base_window_name() IBase_window_nameContext {
  17285. var t antlr.RuleContext
  17286. for _, ctx := range s.GetChildren() {
  17287. if _, ok := ctx.(IBase_window_nameContext); ok {
  17288. t = ctx.(antlr.RuleContext)
  17289. break
  17290. }
  17291. }
  17292. if t == nil {
  17293. return nil
  17294. }
  17295. return t.(IBase_window_nameContext)
  17296. }
  17297. func (s *Window_defnContext) PARTITION_() antlr.TerminalNode {
  17298. return s.GetToken(SQLiteParserPARTITION_, 0)
  17299. }
  17300. func (s *Window_defnContext) AllExpr() []IExprContext {
  17301. children := s.GetChildren()
  17302. len := 0
  17303. for _, ctx := range children {
  17304. if _, ok := ctx.(IExprContext); ok {
  17305. len++
  17306. }
  17307. }
  17308. tst := make([]IExprContext, len)
  17309. i := 0
  17310. for _, ctx := range children {
  17311. if t, ok := ctx.(IExprContext); ok {
  17312. tst[i] = t.(IExprContext)
  17313. i++
  17314. }
  17315. }
  17316. return tst
  17317. }
  17318. func (s *Window_defnContext) Expr(i int) IExprContext {
  17319. var t antlr.RuleContext
  17320. j := 0
  17321. for _, ctx := range s.GetChildren() {
  17322. if _, ok := ctx.(IExprContext); ok {
  17323. if j == i {
  17324. t = ctx.(antlr.RuleContext)
  17325. break
  17326. }
  17327. j++
  17328. }
  17329. }
  17330. if t == nil {
  17331. return nil
  17332. }
  17333. return t.(IExprContext)
  17334. }
  17335. func (s *Window_defnContext) Frame_spec() IFrame_specContext {
  17336. var t antlr.RuleContext
  17337. for _, ctx := range s.GetChildren() {
  17338. if _, ok := ctx.(IFrame_specContext); ok {
  17339. t = ctx.(antlr.RuleContext)
  17340. break
  17341. }
  17342. }
  17343. if t == nil {
  17344. return nil
  17345. }
  17346. return t.(IFrame_specContext)
  17347. }
  17348. func (s *Window_defnContext) AllCOMMA() []antlr.TerminalNode {
  17349. return s.GetTokens(SQLiteParserCOMMA)
  17350. }
  17351. func (s *Window_defnContext) COMMA(i int) antlr.TerminalNode {
  17352. return s.GetToken(SQLiteParserCOMMA, i)
  17353. }
  17354. func (s *Window_defnContext) GetRuleContext() antlr.RuleContext {
  17355. return s
  17356. }
  17357. func (s *Window_defnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  17358. return antlr.TreesStringTree(s, ruleNames, recog)
  17359. }
  17360. func (s *Window_defnContext) EnterRule(listener antlr.ParseTreeListener) {
  17361. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17362. listenerT.EnterWindow_defn(s)
  17363. }
  17364. }
  17365. func (s *Window_defnContext) ExitRule(listener antlr.ParseTreeListener) {
  17366. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17367. listenerT.ExitWindow_defn(s)
  17368. }
  17369. }
  17370. func (p *SQLiteParser) Window_defn() (localctx IWindow_defnContext) {
  17371. this := p
  17372. _ = this
  17373. localctx = NewWindow_defnContext(p, p.GetParserRuleContext(), p.GetState())
  17374. p.EnterRule(localctx, 118, SQLiteParserRULE_window_defn)
  17375. var _la int
  17376. defer func() {
  17377. p.ExitRule()
  17378. }()
  17379. defer func() {
  17380. if err := recover(); err != nil {
  17381. if v, ok := err.(antlr.RecognitionException); ok {
  17382. localctx.SetException(v)
  17383. p.GetErrorHandler().ReportError(p, v)
  17384. p.GetErrorHandler().Recover(p, v)
  17385. } else {
  17386. panic(err)
  17387. }
  17388. }
  17389. }()
  17390. p.EnterOuterAlt(localctx, 1)
  17391. {
  17392. p.SetState(1752)
  17393. p.Match(SQLiteParserOPEN_PAR)
  17394. }
  17395. p.SetState(1754)
  17396. p.GetErrorHandler().Sync(p)
  17397. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 260, p.GetParserRuleContext()) == 1 {
  17398. {
  17399. p.SetState(1753)
  17400. p.Base_window_name()
  17401. }
  17402. }
  17403. p.SetState(1766)
  17404. p.GetErrorHandler().Sync(p)
  17405. _la = p.GetTokenStream().LA(1)
  17406. if _la == SQLiteParserPARTITION_ {
  17407. {
  17408. p.SetState(1756)
  17409. p.Match(SQLiteParserPARTITION_)
  17410. }
  17411. {
  17412. p.SetState(1757)
  17413. p.Match(SQLiteParserBY_)
  17414. }
  17415. {
  17416. p.SetState(1758)
  17417. p.expr(0)
  17418. }
  17419. p.SetState(1763)
  17420. p.GetErrorHandler().Sync(p)
  17421. _la = p.GetTokenStream().LA(1)
  17422. for _la == SQLiteParserCOMMA {
  17423. {
  17424. p.SetState(1759)
  17425. p.Match(SQLiteParserCOMMA)
  17426. }
  17427. {
  17428. p.SetState(1760)
  17429. p.expr(0)
  17430. }
  17431. p.SetState(1765)
  17432. p.GetErrorHandler().Sync(p)
  17433. _la = p.GetTokenStream().LA(1)
  17434. }
  17435. }
  17436. {
  17437. p.SetState(1768)
  17438. p.Match(SQLiteParserORDER_)
  17439. }
  17440. {
  17441. p.SetState(1769)
  17442. p.Match(SQLiteParserBY_)
  17443. }
  17444. {
  17445. p.SetState(1770)
  17446. p.Ordering_term()
  17447. }
  17448. p.SetState(1775)
  17449. p.GetErrorHandler().Sync(p)
  17450. _la = p.GetTokenStream().LA(1)
  17451. for _la == SQLiteParserCOMMA {
  17452. {
  17453. p.SetState(1771)
  17454. p.Match(SQLiteParserCOMMA)
  17455. }
  17456. {
  17457. p.SetState(1772)
  17458. p.Ordering_term()
  17459. }
  17460. p.SetState(1777)
  17461. p.GetErrorHandler().Sync(p)
  17462. _la = p.GetTokenStream().LA(1)
  17463. }
  17464. p.SetState(1779)
  17465. p.GetErrorHandler().Sync(p)
  17466. _la = p.GetTokenStream().LA(1)
  17467. if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 {
  17468. {
  17469. p.SetState(1778)
  17470. p.Frame_spec()
  17471. }
  17472. }
  17473. {
  17474. p.SetState(1781)
  17475. p.Match(SQLiteParserCLOSE_PAR)
  17476. }
  17477. return localctx
  17478. }
  17479. // IOver_clauseContext is an interface to support dynamic dispatch.
  17480. type IOver_clauseContext interface {
  17481. antlr.ParserRuleContext
  17482. // GetParser returns the parser.
  17483. GetParser() antlr.Parser
  17484. // Getter signatures
  17485. OVER_() antlr.TerminalNode
  17486. Window_name() IWindow_nameContext
  17487. OPEN_PAR() antlr.TerminalNode
  17488. CLOSE_PAR() antlr.TerminalNode
  17489. Base_window_name() IBase_window_nameContext
  17490. PARTITION_() antlr.TerminalNode
  17491. AllBY_() []antlr.TerminalNode
  17492. BY_(i int) antlr.TerminalNode
  17493. AllExpr() []IExprContext
  17494. Expr(i int) IExprContext
  17495. ORDER_() antlr.TerminalNode
  17496. AllOrdering_term() []IOrdering_termContext
  17497. Ordering_term(i int) IOrdering_termContext
  17498. Frame_spec() IFrame_specContext
  17499. AllCOMMA() []antlr.TerminalNode
  17500. COMMA(i int) antlr.TerminalNode
  17501. // IsOver_clauseContext differentiates from other interfaces.
  17502. IsOver_clauseContext()
  17503. }
  17504. type Over_clauseContext struct {
  17505. *antlr.BaseParserRuleContext
  17506. parser antlr.Parser
  17507. }
  17508. func NewEmptyOver_clauseContext() *Over_clauseContext {
  17509. var p = new(Over_clauseContext)
  17510. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  17511. p.RuleIndex = SQLiteParserRULE_over_clause
  17512. return p
  17513. }
  17514. func (*Over_clauseContext) IsOver_clauseContext() {}
  17515. func NewOver_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Over_clauseContext {
  17516. var p = new(Over_clauseContext)
  17517. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  17518. p.parser = parser
  17519. p.RuleIndex = SQLiteParserRULE_over_clause
  17520. return p
  17521. }
  17522. func (s *Over_clauseContext) GetParser() antlr.Parser { return s.parser }
  17523. func (s *Over_clauseContext) OVER_() antlr.TerminalNode {
  17524. return s.GetToken(SQLiteParserOVER_, 0)
  17525. }
  17526. func (s *Over_clauseContext) Window_name() IWindow_nameContext {
  17527. var t antlr.RuleContext
  17528. for _, ctx := range s.GetChildren() {
  17529. if _, ok := ctx.(IWindow_nameContext); ok {
  17530. t = ctx.(antlr.RuleContext)
  17531. break
  17532. }
  17533. }
  17534. if t == nil {
  17535. return nil
  17536. }
  17537. return t.(IWindow_nameContext)
  17538. }
  17539. func (s *Over_clauseContext) OPEN_PAR() antlr.TerminalNode {
  17540. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  17541. }
  17542. func (s *Over_clauseContext) CLOSE_PAR() antlr.TerminalNode {
  17543. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  17544. }
  17545. func (s *Over_clauseContext) Base_window_name() IBase_window_nameContext {
  17546. var t antlr.RuleContext
  17547. for _, ctx := range s.GetChildren() {
  17548. if _, ok := ctx.(IBase_window_nameContext); ok {
  17549. t = ctx.(antlr.RuleContext)
  17550. break
  17551. }
  17552. }
  17553. if t == nil {
  17554. return nil
  17555. }
  17556. return t.(IBase_window_nameContext)
  17557. }
  17558. func (s *Over_clauseContext) PARTITION_() antlr.TerminalNode {
  17559. return s.GetToken(SQLiteParserPARTITION_, 0)
  17560. }
  17561. func (s *Over_clauseContext) AllBY_() []antlr.TerminalNode {
  17562. return s.GetTokens(SQLiteParserBY_)
  17563. }
  17564. func (s *Over_clauseContext) BY_(i int) antlr.TerminalNode {
  17565. return s.GetToken(SQLiteParserBY_, i)
  17566. }
  17567. func (s *Over_clauseContext) AllExpr() []IExprContext {
  17568. children := s.GetChildren()
  17569. len := 0
  17570. for _, ctx := range children {
  17571. if _, ok := ctx.(IExprContext); ok {
  17572. len++
  17573. }
  17574. }
  17575. tst := make([]IExprContext, len)
  17576. i := 0
  17577. for _, ctx := range children {
  17578. if t, ok := ctx.(IExprContext); ok {
  17579. tst[i] = t.(IExprContext)
  17580. i++
  17581. }
  17582. }
  17583. return tst
  17584. }
  17585. func (s *Over_clauseContext) Expr(i int) IExprContext {
  17586. var t antlr.RuleContext
  17587. j := 0
  17588. for _, ctx := range s.GetChildren() {
  17589. if _, ok := ctx.(IExprContext); ok {
  17590. if j == i {
  17591. t = ctx.(antlr.RuleContext)
  17592. break
  17593. }
  17594. j++
  17595. }
  17596. }
  17597. if t == nil {
  17598. return nil
  17599. }
  17600. return t.(IExprContext)
  17601. }
  17602. func (s *Over_clauseContext) ORDER_() antlr.TerminalNode {
  17603. return s.GetToken(SQLiteParserORDER_, 0)
  17604. }
  17605. func (s *Over_clauseContext) AllOrdering_term() []IOrdering_termContext {
  17606. children := s.GetChildren()
  17607. len := 0
  17608. for _, ctx := range children {
  17609. if _, ok := ctx.(IOrdering_termContext); ok {
  17610. len++
  17611. }
  17612. }
  17613. tst := make([]IOrdering_termContext, len)
  17614. i := 0
  17615. for _, ctx := range children {
  17616. if t, ok := ctx.(IOrdering_termContext); ok {
  17617. tst[i] = t.(IOrdering_termContext)
  17618. i++
  17619. }
  17620. }
  17621. return tst
  17622. }
  17623. func (s *Over_clauseContext) Ordering_term(i int) IOrdering_termContext {
  17624. var t antlr.RuleContext
  17625. j := 0
  17626. for _, ctx := range s.GetChildren() {
  17627. if _, ok := ctx.(IOrdering_termContext); ok {
  17628. if j == i {
  17629. t = ctx.(antlr.RuleContext)
  17630. break
  17631. }
  17632. j++
  17633. }
  17634. }
  17635. if t == nil {
  17636. return nil
  17637. }
  17638. return t.(IOrdering_termContext)
  17639. }
  17640. func (s *Over_clauseContext) Frame_spec() IFrame_specContext {
  17641. var t antlr.RuleContext
  17642. for _, ctx := range s.GetChildren() {
  17643. if _, ok := ctx.(IFrame_specContext); ok {
  17644. t = ctx.(antlr.RuleContext)
  17645. break
  17646. }
  17647. }
  17648. if t == nil {
  17649. return nil
  17650. }
  17651. return t.(IFrame_specContext)
  17652. }
  17653. func (s *Over_clauseContext) AllCOMMA() []antlr.TerminalNode {
  17654. return s.GetTokens(SQLiteParserCOMMA)
  17655. }
  17656. func (s *Over_clauseContext) COMMA(i int) antlr.TerminalNode {
  17657. return s.GetToken(SQLiteParserCOMMA, i)
  17658. }
  17659. func (s *Over_clauseContext) GetRuleContext() antlr.RuleContext {
  17660. return s
  17661. }
  17662. func (s *Over_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  17663. return antlr.TreesStringTree(s, ruleNames, recog)
  17664. }
  17665. func (s *Over_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
  17666. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17667. listenerT.EnterOver_clause(s)
  17668. }
  17669. }
  17670. func (s *Over_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
  17671. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17672. listenerT.ExitOver_clause(s)
  17673. }
  17674. }
  17675. func (p *SQLiteParser) Over_clause() (localctx IOver_clauseContext) {
  17676. this := p
  17677. _ = this
  17678. localctx = NewOver_clauseContext(p, p.GetParserRuleContext(), p.GetState())
  17679. p.EnterRule(localctx, 120, SQLiteParserRULE_over_clause)
  17680. var _la int
  17681. defer func() {
  17682. p.ExitRule()
  17683. }()
  17684. defer func() {
  17685. if err := recover(); err != nil {
  17686. if v, ok := err.(antlr.RecognitionException); ok {
  17687. localctx.SetException(v)
  17688. p.GetErrorHandler().ReportError(p, v)
  17689. p.GetErrorHandler().Recover(p, v)
  17690. } else {
  17691. panic(err)
  17692. }
  17693. }
  17694. }()
  17695. p.EnterOuterAlt(localctx, 1)
  17696. {
  17697. p.SetState(1783)
  17698. p.Match(SQLiteParserOVER_)
  17699. }
  17700. p.SetState(1817)
  17701. p.GetErrorHandler().Sync(p)
  17702. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 271, p.GetParserRuleContext()) {
  17703. case 1:
  17704. {
  17705. p.SetState(1784)
  17706. p.Window_name()
  17707. }
  17708. case 2:
  17709. {
  17710. p.SetState(1785)
  17711. p.Match(SQLiteParserOPEN_PAR)
  17712. }
  17713. p.SetState(1787)
  17714. p.GetErrorHandler().Sync(p)
  17715. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 265, p.GetParserRuleContext()) == 1 {
  17716. {
  17717. p.SetState(1786)
  17718. p.Base_window_name()
  17719. }
  17720. }
  17721. p.SetState(1799)
  17722. p.GetErrorHandler().Sync(p)
  17723. _la = p.GetTokenStream().LA(1)
  17724. if _la == SQLiteParserPARTITION_ {
  17725. {
  17726. p.SetState(1789)
  17727. p.Match(SQLiteParserPARTITION_)
  17728. }
  17729. {
  17730. p.SetState(1790)
  17731. p.Match(SQLiteParserBY_)
  17732. }
  17733. {
  17734. p.SetState(1791)
  17735. p.expr(0)
  17736. }
  17737. p.SetState(1796)
  17738. p.GetErrorHandler().Sync(p)
  17739. _la = p.GetTokenStream().LA(1)
  17740. for _la == SQLiteParserCOMMA {
  17741. {
  17742. p.SetState(1792)
  17743. p.Match(SQLiteParserCOMMA)
  17744. }
  17745. {
  17746. p.SetState(1793)
  17747. p.expr(0)
  17748. }
  17749. p.SetState(1798)
  17750. p.GetErrorHandler().Sync(p)
  17751. _la = p.GetTokenStream().LA(1)
  17752. }
  17753. }
  17754. p.SetState(1811)
  17755. p.GetErrorHandler().Sync(p)
  17756. _la = p.GetTokenStream().LA(1)
  17757. if _la == SQLiteParserORDER_ {
  17758. {
  17759. p.SetState(1801)
  17760. p.Match(SQLiteParserORDER_)
  17761. }
  17762. {
  17763. p.SetState(1802)
  17764. p.Match(SQLiteParserBY_)
  17765. }
  17766. {
  17767. p.SetState(1803)
  17768. p.Ordering_term()
  17769. }
  17770. p.SetState(1808)
  17771. p.GetErrorHandler().Sync(p)
  17772. _la = p.GetTokenStream().LA(1)
  17773. for _la == SQLiteParserCOMMA {
  17774. {
  17775. p.SetState(1804)
  17776. p.Match(SQLiteParserCOMMA)
  17777. }
  17778. {
  17779. p.SetState(1805)
  17780. p.Ordering_term()
  17781. }
  17782. p.SetState(1810)
  17783. p.GetErrorHandler().Sync(p)
  17784. _la = p.GetTokenStream().LA(1)
  17785. }
  17786. }
  17787. p.SetState(1814)
  17788. p.GetErrorHandler().Sync(p)
  17789. _la = p.GetTokenStream().LA(1)
  17790. if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 {
  17791. {
  17792. p.SetState(1813)
  17793. p.Frame_spec()
  17794. }
  17795. }
  17796. {
  17797. p.SetState(1816)
  17798. p.Match(SQLiteParserCLOSE_PAR)
  17799. }
  17800. }
  17801. return localctx
  17802. }
  17803. // IFrame_specContext is an interface to support dynamic dispatch.
  17804. type IFrame_specContext interface {
  17805. antlr.ParserRuleContext
  17806. // GetParser returns the parser.
  17807. GetParser() antlr.Parser
  17808. // Getter signatures
  17809. Frame_clause() IFrame_clauseContext
  17810. EXCLUDE_() antlr.TerminalNode
  17811. CURRENT_() antlr.TerminalNode
  17812. ROW_() antlr.TerminalNode
  17813. GROUP_() antlr.TerminalNode
  17814. TIES_() antlr.TerminalNode
  17815. NO_() antlr.TerminalNode
  17816. OTHERS_() antlr.TerminalNode
  17817. // IsFrame_specContext differentiates from other interfaces.
  17818. IsFrame_specContext()
  17819. }
  17820. type Frame_specContext struct {
  17821. *antlr.BaseParserRuleContext
  17822. parser antlr.Parser
  17823. }
  17824. func NewEmptyFrame_specContext() *Frame_specContext {
  17825. var p = new(Frame_specContext)
  17826. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  17827. p.RuleIndex = SQLiteParserRULE_frame_spec
  17828. return p
  17829. }
  17830. func (*Frame_specContext) IsFrame_specContext() {}
  17831. func NewFrame_specContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_specContext {
  17832. var p = new(Frame_specContext)
  17833. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  17834. p.parser = parser
  17835. p.RuleIndex = SQLiteParserRULE_frame_spec
  17836. return p
  17837. }
  17838. func (s *Frame_specContext) GetParser() antlr.Parser { return s.parser }
  17839. func (s *Frame_specContext) Frame_clause() IFrame_clauseContext {
  17840. var t antlr.RuleContext
  17841. for _, ctx := range s.GetChildren() {
  17842. if _, ok := ctx.(IFrame_clauseContext); ok {
  17843. t = ctx.(antlr.RuleContext)
  17844. break
  17845. }
  17846. }
  17847. if t == nil {
  17848. return nil
  17849. }
  17850. return t.(IFrame_clauseContext)
  17851. }
  17852. func (s *Frame_specContext) EXCLUDE_() antlr.TerminalNode {
  17853. return s.GetToken(SQLiteParserEXCLUDE_, 0)
  17854. }
  17855. func (s *Frame_specContext) CURRENT_() antlr.TerminalNode {
  17856. return s.GetToken(SQLiteParserCURRENT_, 0)
  17857. }
  17858. func (s *Frame_specContext) ROW_() antlr.TerminalNode {
  17859. return s.GetToken(SQLiteParserROW_, 0)
  17860. }
  17861. func (s *Frame_specContext) GROUP_() antlr.TerminalNode {
  17862. return s.GetToken(SQLiteParserGROUP_, 0)
  17863. }
  17864. func (s *Frame_specContext) TIES_() antlr.TerminalNode {
  17865. return s.GetToken(SQLiteParserTIES_, 0)
  17866. }
  17867. func (s *Frame_specContext) NO_() antlr.TerminalNode {
  17868. return s.GetToken(SQLiteParserNO_, 0)
  17869. }
  17870. func (s *Frame_specContext) OTHERS_() antlr.TerminalNode {
  17871. return s.GetToken(SQLiteParserOTHERS_, 0)
  17872. }
  17873. func (s *Frame_specContext) GetRuleContext() antlr.RuleContext {
  17874. return s
  17875. }
  17876. func (s *Frame_specContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  17877. return antlr.TreesStringTree(s, ruleNames, recog)
  17878. }
  17879. func (s *Frame_specContext) EnterRule(listener antlr.ParseTreeListener) {
  17880. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17881. listenerT.EnterFrame_spec(s)
  17882. }
  17883. }
  17884. func (s *Frame_specContext) ExitRule(listener antlr.ParseTreeListener) {
  17885. if listenerT, ok := listener.(SQLiteParserListener); ok {
  17886. listenerT.ExitFrame_spec(s)
  17887. }
  17888. }
  17889. func (p *SQLiteParser) Frame_spec() (localctx IFrame_specContext) {
  17890. this := p
  17891. _ = this
  17892. localctx = NewFrame_specContext(p, p.GetParserRuleContext(), p.GetState())
  17893. p.EnterRule(localctx, 122, SQLiteParserRULE_frame_spec)
  17894. defer func() {
  17895. p.ExitRule()
  17896. }()
  17897. defer func() {
  17898. if err := recover(); err != nil {
  17899. if v, ok := err.(antlr.RecognitionException); ok {
  17900. localctx.SetException(v)
  17901. p.GetErrorHandler().ReportError(p, v)
  17902. p.GetErrorHandler().Recover(p, v)
  17903. } else {
  17904. panic(err)
  17905. }
  17906. }
  17907. }()
  17908. p.EnterOuterAlt(localctx, 1)
  17909. {
  17910. p.SetState(1819)
  17911. p.Frame_clause()
  17912. }
  17913. p.SetState(1827)
  17914. p.GetErrorHandler().Sync(p)
  17915. switch p.GetTokenStream().LA(1) {
  17916. case SQLiteParserEXCLUDE_:
  17917. {
  17918. p.SetState(1820)
  17919. p.Match(SQLiteParserEXCLUDE_)
  17920. }
  17921. {
  17922. p.SetState(1821)
  17923. p.Match(SQLiteParserNO_)
  17924. }
  17925. {
  17926. p.SetState(1822)
  17927. p.Match(SQLiteParserOTHERS_)
  17928. }
  17929. case SQLiteParserCURRENT_:
  17930. {
  17931. p.SetState(1823)
  17932. p.Match(SQLiteParserCURRENT_)
  17933. }
  17934. {
  17935. p.SetState(1824)
  17936. p.Match(SQLiteParserROW_)
  17937. }
  17938. case SQLiteParserGROUP_:
  17939. {
  17940. p.SetState(1825)
  17941. p.Match(SQLiteParserGROUP_)
  17942. }
  17943. case SQLiteParserTIES_:
  17944. {
  17945. p.SetState(1826)
  17946. p.Match(SQLiteParserTIES_)
  17947. }
  17948. case SQLiteParserCLOSE_PAR:
  17949. default:
  17950. }
  17951. return localctx
  17952. }
  17953. // IFrame_clauseContext is an interface to support dynamic dispatch.
  17954. type IFrame_clauseContext interface {
  17955. antlr.ParserRuleContext
  17956. // GetParser returns the parser.
  17957. GetParser() antlr.Parser
  17958. // Getter signatures
  17959. RANGE_() antlr.TerminalNode
  17960. ROWS_() antlr.TerminalNode
  17961. GROUPS_() antlr.TerminalNode
  17962. Frame_single() IFrame_singleContext
  17963. BETWEEN_() antlr.TerminalNode
  17964. Frame_left() IFrame_leftContext
  17965. AND_() antlr.TerminalNode
  17966. Frame_right() IFrame_rightContext
  17967. // IsFrame_clauseContext differentiates from other interfaces.
  17968. IsFrame_clauseContext()
  17969. }
  17970. type Frame_clauseContext struct {
  17971. *antlr.BaseParserRuleContext
  17972. parser antlr.Parser
  17973. }
  17974. func NewEmptyFrame_clauseContext() *Frame_clauseContext {
  17975. var p = new(Frame_clauseContext)
  17976. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  17977. p.RuleIndex = SQLiteParserRULE_frame_clause
  17978. return p
  17979. }
  17980. func (*Frame_clauseContext) IsFrame_clauseContext() {}
  17981. func NewFrame_clauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_clauseContext {
  17982. var p = new(Frame_clauseContext)
  17983. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  17984. p.parser = parser
  17985. p.RuleIndex = SQLiteParserRULE_frame_clause
  17986. return p
  17987. }
  17988. func (s *Frame_clauseContext) GetParser() antlr.Parser { return s.parser }
  17989. func (s *Frame_clauseContext) RANGE_() antlr.TerminalNode {
  17990. return s.GetToken(SQLiteParserRANGE_, 0)
  17991. }
  17992. func (s *Frame_clauseContext) ROWS_() antlr.TerminalNode {
  17993. return s.GetToken(SQLiteParserROWS_, 0)
  17994. }
  17995. func (s *Frame_clauseContext) GROUPS_() antlr.TerminalNode {
  17996. return s.GetToken(SQLiteParserGROUPS_, 0)
  17997. }
  17998. func (s *Frame_clauseContext) Frame_single() IFrame_singleContext {
  17999. var t antlr.RuleContext
  18000. for _, ctx := range s.GetChildren() {
  18001. if _, ok := ctx.(IFrame_singleContext); ok {
  18002. t = ctx.(antlr.RuleContext)
  18003. break
  18004. }
  18005. }
  18006. if t == nil {
  18007. return nil
  18008. }
  18009. return t.(IFrame_singleContext)
  18010. }
  18011. func (s *Frame_clauseContext) BETWEEN_() antlr.TerminalNode {
  18012. return s.GetToken(SQLiteParserBETWEEN_, 0)
  18013. }
  18014. func (s *Frame_clauseContext) Frame_left() IFrame_leftContext {
  18015. var t antlr.RuleContext
  18016. for _, ctx := range s.GetChildren() {
  18017. if _, ok := ctx.(IFrame_leftContext); ok {
  18018. t = ctx.(antlr.RuleContext)
  18019. break
  18020. }
  18021. }
  18022. if t == nil {
  18023. return nil
  18024. }
  18025. return t.(IFrame_leftContext)
  18026. }
  18027. func (s *Frame_clauseContext) AND_() antlr.TerminalNode {
  18028. return s.GetToken(SQLiteParserAND_, 0)
  18029. }
  18030. func (s *Frame_clauseContext) Frame_right() IFrame_rightContext {
  18031. var t antlr.RuleContext
  18032. for _, ctx := range s.GetChildren() {
  18033. if _, ok := ctx.(IFrame_rightContext); ok {
  18034. t = ctx.(antlr.RuleContext)
  18035. break
  18036. }
  18037. }
  18038. if t == nil {
  18039. return nil
  18040. }
  18041. return t.(IFrame_rightContext)
  18042. }
  18043. func (s *Frame_clauseContext) GetRuleContext() antlr.RuleContext {
  18044. return s
  18045. }
  18046. func (s *Frame_clauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  18047. return antlr.TreesStringTree(s, ruleNames, recog)
  18048. }
  18049. func (s *Frame_clauseContext) EnterRule(listener antlr.ParseTreeListener) {
  18050. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18051. listenerT.EnterFrame_clause(s)
  18052. }
  18053. }
  18054. func (s *Frame_clauseContext) ExitRule(listener antlr.ParseTreeListener) {
  18055. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18056. listenerT.ExitFrame_clause(s)
  18057. }
  18058. }
  18059. func (p *SQLiteParser) Frame_clause() (localctx IFrame_clauseContext) {
  18060. this := p
  18061. _ = this
  18062. localctx = NewFrame_clauseContext(p, p.GetParserRuleContext(), p.GetState())
  18063. p.EnterRule(localctx, 124, SQLiteParserRULE_frame_clause)
  18064. var _la int
  18065. defer func() {
  18066. p.ExitRule()
  18067. }()
  18068. defer func() {
  18069. if err := recover(); err != nil {
  18070. if v, ok := err.(antlr.RecognitionException); ok {
  18071. localctx.SetException(v)
  18072. p.GetErrorHandler().ReportError(p, v)
  18073. p.GetErrorHandler().Recover(p, v)
  18074. } else {
  18075. panic(err)
  18076. }
  18077. }
  18078. }()
  18079. p.EnterOuterAlt(localctx, 1)
  18080. {
  18081. p.SetState(1829)
  18082. _la = p.GetTokenStream().LA(1)
  18083. if !((int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0) {
  18084. p.GetErrorHandler().RecoverInline(p)
  18085. } else {
  18086. p.GetErrorHandler().ReportMatch(p)
  18087. p.Consume()
  18088. }
  18089. }
  18090. p.SetState(1836)
  18091. p.GetErrorHandler().Sync(p)
  18092. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 273, p.GetParserRuleContext()) {
  18093. case 1:
  18094. {
  18095. p.SetState(1830)
  18096. p.Frame_single()
  18097. }
  18098. case 2:
  18099. {
  18100. p.SetState(1831)
  18101. p.Match(SQLiteParserBETWEEN_)
  18102. }
  18103. {
  18104. p.SetState(1832)
  18105. p.Frame_left()
  18106. }
  18107. {
  18108. p.SetState(1833)
  18109. p.Match(SQLiteParserAND_)
  18110. }
  18111. {
  18112. p.SetState(1834)
  18113. p.Frame_right()
  18114. }
  18115. }
  18116. return localctx
  18117. }
  18118. // ISimple_function_invocationContext is an interface to support dynamic dispatch.
  18119. type ISimple_function_invocationContext interface {
  18120. antlr.ParserRuleContext
  18121. // GetParser returns the parser.
  18122. GetParser() antlr.Parser
  18123. // Getter signatures
  18124. Simple_func() ISimple_funcContext
  18125. OPEN_PAR() antlr.TerminalNode
  18126. CLOSE_PAR() antlr.TerminalNode
  18127. AllExpr() []IExprContext
  18128. Expr(i int) IExprContext
  18129. STAR() antlr.TerminalNode
  18130. AllCOMMA() []antlr.TerminalNode
  18131. COMMA(i int) antlr.TerminalNode
  18132. // IsSimple_function_invocationContext differentiates from other interfaces.
  18133. IsSimple_function_invocationContext()
  18134. }
  18135. type Simple_function_invocationContext struct {
  18136. *antlr.BaseParserRuleContext
  18137. parser antlr.Parser
  18138. }
  18139. func NewEmptySimple_function_invocationContext() *Simple_function_invocationContext {
  18140. var p = new(Simple_function_invocationContext)
  18141. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  18142. p.RuleIndex = SQLiteParserRULE_simple_function_invocation
  18143. return p
  18144. }
  18145. func (*Simple_function_invocationContext) IsSimple_function_invocationContext() {}
  18146. func NewSimple_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_function_invocationContext {
  18147. var p = new(Simple_function_invocationContext)
  18148. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  18149. p.parser = parser
  18150. p.RuleIndex = SQLiteParserRULE_simple_function_invocation
  18151. return p
  18152. }
  18153. func (s *Simple_function_invocationContext) GetParser() antlr.Parser { return s.parser }
  18154. func (s *Simple_function_invocationContext) Simple_func() ISimple_funcContext {
  18155. var t antlr.RuleContext
  18156. for _, ctx := range s.GetChildren() {
  18157. if _, ok := ctx.(ISimple_funcContext); ok {
  18158. t = ctx.(antlr.RuleContext)
  18159. break
  18160. }
  18161. }
  18162. if t == nil {
  18163. return nil
  18164. }
  18165. return t.(ISimple_funcContext)
  18166. }
  18167. func (s *Simple_function_invocationContext) OPEN_PAR() antlr.TerminalNode {
  18168. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  18169. }
  18170. func (s *Simple_function_invocationContext) CLOSE_PAR() antlr.TerminalNode {
  18171. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  18172. }
  18173. func (s *Simple_function_invocationContext) AllExpr() []IExprContext {
  18174. children := s.GetChildren()
  18175. len := 0
  18176. for _, ctx := range children {
  18177. if _, ok := ctx.(IExprContext); ok {
  18178. len++
  18179. }
  18180. }
  18181. tst := make([]IExprContext, len)
  18182. i := 0
  18183. for _, ctx := range children {
  18184. if t, ok := ctx.(IExprContext); ok {
  18185. tst[i] = t.(IExprContext)
  18186. i++
  18187. }
  18188. }
  18189. return tst
  18190. }
  18191. func (s *Simple_function_invocationContext) Expr(i int) IExprContext {
  18192. var t antlr.RuleContext
  18193. j := 0
  18194. for _, ctx := range s.GetChildren() {
  18195. if _, ok := ctx.(IExprContext); ok {
  18196. if j == i {
  18197. t = ctx.(antlr.RuleContext)
  18198. break
  18199. }
  18200. j++
  18201. }
  18202. }
  18203. if t == nil {
  18204. return nil
  18205. }
  18206. return t.(IExprContext)
  18207. }
  18208. func (s *Simple_function_invocationContext) STAR() antlr.TerminalNode {
  18209. return s.GetToken(SQLiteParserSTAR, 0)
  18210. }
  18211. func (s *Simple_function_invocationContext) AllCOMMA() []antlr.TerminalNode {
  18212. return s.GetTokens(SQLiteParserCOMMA)
  18213. }
  18214. func (s *Simple_function_invocationContext) COMMA(i int) antlr.TerminalNode {
  18215. return s.GetToken(SQLiteParserCOMMA, i)
  18216. }
  18217. func (s *Simple_function_invocationContext) GetRuleContext() antlr.RuleContext {
  18218. return s
  18219. }
  18220. func (s *Simple_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  18221. return antlr.TreesStringTree(s, ruleNames, recog)
  18222. }
  18223. func (s *Simple_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) {
  18224. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18225. listenerT.EnterSimple_function_invocation(s)
  18226. }
  18227. }
  18228. func (s *Simple_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) {
  18229. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18230. listenerT.ExitSimple_function_invocation(s)
  18231. }
  18232. }
  18233. func (p *SQLiteParser) Simple_function_invocation() (localctx ISimple_function_invocationContext) {
  18234. this := p
  18235. _ = this
  18236. localctx = NewSimple_function_invocationContext(p, p.GetParserRuleContext(), p.GetState())
  18237. p.EnterRule(localctx, 126, SQLiteParserRULE_simple_function_invocation)
  18238. var _la int
  18239. defer func() {
  18240. p.ExitRule()
  18241. }()
  18242. defer func() {
  18243. if err := recover(); err != nil {
  18244. if v, ok := err.(antlr.RecognitionException); ok {
  18245. localctx.SetException(v)
  18246. p.GetErrorHandler().ReportError(p, v)
  18247. p.GetErrorHandler().Recover(p, v)
  18248. } else {
  18249. panic(err)
  18250. }
  18251. }
  18252. }()
  18253. p.EnterOuterAlt(localctx, 1)
  18254. {
  18255. p.SetState(1838)
  18256. p.Simple_func()
  18257. }
  18258. {
  18259. p.SetState(1839)
  18260. p.Match(SQLiteParserOPEN_PAR)
  18261. }
  18262. p.SetState(1849)
  18263. p.GetErrorHandler().Sync(p)
  18264. switch p.GetTokenStream().LA(1) {
  18265. case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL:
  18266. {
  18267. p.SetState(1840)
  18268. p.expr(0)
  18269. }
  18270. p.SetState(1845)
  18271. p.GetErrorHandler().Sync(p)
  18272. _la = p.GetTokenStream().LA(1)
  18273. for _la == SQLiteParserCOMMA {
  18274. {
  18275. p.SetState(1841)
  18276. p.Match(SQLiteParserCOMMA)
  18277. }
  18278. {
  18279. p.SetState(1842)
  18280. p.expr(0)
  18281. }
  18282. p.SetState(1847)
  18283. p.GetErrorHandler().Sync(p)
  18284. _la = p.GetTokenStream().LA(1)
  18285. }
  18286. case SQLiteParserSTAR:
  18287. {
  18288. p.SetState(1848)
  18289. p.Match(SQLiteParserSTAR)
  18290. }
  18291. default:
  18292. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  18293. }
  18294. {
  18295. p.SetState(1851)
  18296. p.Match(SQLiteParserCLOSE_PAR)
  18297. }
  18298. return localctx
  18299. }
  18300. // IAggregate_function_invocationContext is an interface to support dynamic dispatch.
  18301. type IAggregate_function_invocationContext interface {
  18302. antlr.ParserRuleContext
  18303. // GetParser returns the parser.
  18304. GetParser() antlr.Parser
  18305. // Getter signatures
  18306. Aggregate_func() IAggregate_funcContext
  18307. OPEN_PAR() antlr.TerminalNode
  18308. CLOSE_PAR() antlr.TerminalNode
  18309. AllExpr() []IExprContext
  18310. Expr(i int) IExprContext
  18311. STAR() antlr.TerminalNode
  18312. Filter_clause() IFilter_clauseContext
  18313. DISTINCT_() antlr.TerminalNode
  18314. AllCOMMA() []antlr.TerminalNode
  18315. COMMA(i int) antlr.TerminalNode
  18316. // IsAggregate_function_invocationContext differentiates from other interfaces.
  18317. IsAggregate_function_invocationContext()
  18318. }
  18319. type Aggregate_function_invocationContext struct {
  18320. *antlr.BaseParserRuleContext
  18321. parser antlr.Parser
  18322. }
  18323. func NewEmptyAggregate_function_invocationContext() *Aggregate_function_invocationContext {
  18324. var p = new(Aggregate_function_invocationContext)
  18325. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  18326. p.RuleIndex = SQLiteParserRULE_aggregate_function_invocation
  18327. return p
  18328. }
  18329. func (*Aggregate_function_invocationContext) IsAggregate_function_invocationContext() {}
  18330. func NewAggregate_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Aggregate_function_invocationContext {
  18331. var p = new(Aggregate_function_invocationContext)
  18332. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  18333. p.parser = parser
  18334. p.RuleIndex = SQLiteParserRULE_aggregate_function_invocation
  18335. return p
  18336. }
  18337. func (s *Aggregate_function_invocationContext) GetParser() antlr.Parser { return s.parser }
  18338. func (s *Aggregate_function_invocationContext) Aggregate_func() IAggregate_funcContext {
  18339. var t antlr.RuleContext
  18340. for _, ctx := range s.GetChildren() {
  18341. if _, ok := ctx.(IAggregate_funcContext); ok {
  18342. t = ctx.(antlr.RuleContext)
  18343. break
  18344. }
  18345. }
  18346. if t == nil {
  18347. return nil
  18348. }
  18349. return t.(IAggregate_funcContext)
  18350. }
  18351. func (s *Aggregate_function_invocationContext) OPEN_PAR() antlr.TerminalNode {
  18352. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  18353. }
  18354. func (s *Aggregate_function_invocationContext) CLOSE_PAR() antlr.TerminalNode {
  18355. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  18356. }
  18357. func (s *Aggregate_function_invocationContext) AllExpr() []IExprContext {
  18358. children := s.GetChildren()
  18359. len := 0
  18360. for _, ctx := range children {
  18361. if _, ok := ctx.(IExprContext); ok {
  18362. len++
  18363. }
  18364. }
  18365. tst := make([]IExprContext, len)
  18366. i := 0
  18367. for _, ctx := range children {
  18368. if t, ok := ctx.(IExprContext); ok {
  18369. tst[i] = t.(IExprContext)
  18370. i++
  18371. }
  18372. }
  18373. return tst
  18374. }
  18375. func (s *Aggregate_function_invocationContext) Expr(i int) IExprContext {
  18376. var t antlr.RuleContext
  18377. j := 0
  18378. for _, ctx := range s.GetChildren() {
  18379. if _, ok := ctx.(IExprContext); ok {
  18380. if j == i {
  18381. t = ctx.(antlr.RuleContext)
  18382. break
  18383. }
  18384. j++
  18385. }
  18386. }
  18387. if t == nil {
  18388. return nil
  18389. }
  18390. return t.(IExprContext)
  18391. }
  18392. func (s *Aggregate_function_invocationContext) STAR() antlr.TerminalNode {
  18393. return s.GetToken(SQLiteParserSTAR, 0)
  18394. }
  18395. func (s *Aggregate_function_invocationContext) Filter_clause() IFilter_clauseContext {
  18396. var t antlr.RuleContext
  18397. for _, ctx := range s.GetChildren() {
  18398. if _, ok := ctx.(IFilter_clauseContext); ok {
  18399. t = ctx.(antlr.RuleContext)
  18400. break
  18401. }
  18402. }
  18403. if t == nil {
  18404. return nil
  18405. }
  18406. return t.(IFilter_clauseContext)
  18407. }
  18408. func (s *Aggregate_function_invocationContext) DISTINCT_() antlr.TerminalNode {
  18409. return s.GetToken(SQLiteParserDISTINCT_, 0)
  18410. }
  18411. func (s *Aggregate_function_invocationContext) AllCOMMA() []antlr.TerminalNode {
  18412. return s.GetTokens(SQLiteParserCOMMA)
  18413. }
  18414. func (s *Aggregate_function_invocationContext) COMMA(i int) antlr.TerminalNode {
  18415. return s.GetToken(SQLiteParserCOMMA, i)
  18416. }
  18417. func (s *Aggregate_function_invocationContext) GetRuleContext() antlr.RuleContext {
  18418. return s
  18419. }
  18420. func (s *Aggregate_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  18421. return antlr.TreesStringTree(s, ruleNames, recog)
  18422. }
  18423. func (s *Aggregate_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) {
  18424. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18425. listenerT.EnterAggregate_function_invocation(s)
  18426. }
  18427. }
  18428. func (s *Aggregate_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) {
  18429. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18430. listenerT.ExitAggregate_function_invocation(s)
  18431. }
  18432. }
  18433. func (p *SQLiteParser) Aggregate_function_invocation() (localctx IAggregate_function_invocationContext) {
  18434. this := p
  18435. _ = this
  18436. localctx = NewAggregate_function_invocationContext(p, p.GetParserRuleContext(), p.GetState())
  18437. p.EnterRule(localctx, 128, SQLiteParserRULE_aggregate_function_invocation)
  18438. var _la int
  18439. defer func() {
  18440. p.ExitRule()
  18441. }()
  18442. defer func() {
  18443. if err := recover(); err != nil {
  18444. if v, ok := err.(antlr.RecognitionException); ok {
  18445. localctx.SetException(v)
  18446. p.GetErrorHandler().ReportError(p, v)
  18447. p.GetErrorHandler().Recover(p, v)
  18448. } else {
  18449. panic(err)
  18450. }
  18451. }
  18452. }()
  18453. p.EnterOuterAlt(localctx, 1)
  18454. {
  18455. p.SetState(1853)
  18456. p.Aggregate_func()
  18457. }
  18458. {
  18459. p.SetState(1854)
  18460. p.Match(SQLiteParserOPEN_PAR)
  18461. }
  18462. p.SetState(1867)
  18463. p.GetErrorHandler().Sync(p)
  18464. switch p.GetTokenStream().LA(1) {
  18465. case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL:
  18466. p.SetState(1856)
  18467. p.GetErrorHandler().Sync(p)
  18468. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 276, p.GetParserRuleContext()) == 1 {
  18469. {
  18470. p.SetState(1855)
  18471. p.Match(SQLiteParserDISTINCT_)
  18472. }
  18473. }
  18474. {
  18475. p.SetState(1858)
  18476. p.expr(0)
  18477. }
  18478. p.SetState(1863)
  18479. p.GetErrorHandler().Sync(p)
  18480. _la = p.GetTokenStream().LA(1)
  18481. for _la == SQLiteParserCOMMA {
  18482. {
  18483. p.SetState(1859)
  18484. p.Match(SQLiteParserCOMMA)
  18485. }
  18486. {
  18487. p.SetState(1860)
  18488. p.expr(0)
  18489. }
  18490. p.SetState(1865)
  18491. p.GetErrorHandler().Sync(p)
  18492. _la = p.GetTokenStream().LA(1)
  18493. }
  18494. case SQLiteParserSTAR:
  18495. {
  18496. p.SetState(1866)
  18497. p.Match(SQLiteParserSTAR)
  18498. }
  18499. case SQLiteParserCLOSE_PAR:
  18500. default:
  18501. }
  18502. {
  18503. p.SetState(1869)
  18504. p.Match(SQLiteParserCLOSE_PAR)
  18505. }
  18506. p.SetState(1871)
  18507. p.GetErrorHandler().Sync(p)
  18508. _la = p.GetTokenStream().LA(1)
  18509. if _la == SQLiteParserFILTER_ {
  18510. {
  18511. p.SetState(1870)
  18512. p.Filter_clause()
  18513. }
  18514. }
  18515. return localctx
  18516. }
  18517. // IWindow_function_invocationContext is an interface to support dynamic dispatch.
  18518. type IWindow_function_invocationContext interface {
  18519. antlr.ParserRuleContext
  18520. // GetParser returns the parser.
  18521. GetParser() antlr.Parser
  18522. // Getter signatures
  18523. Window_function() IWindow_functionContext
  18524. OPEN_PAR() antlr.TerminalNode
  18525. CLOSE_PAR() antlr.TerminalNode
  18526. OVER_() antlr.TerminalNode
  18527. Window_defn() IWindow_defnContext
  18528. Window_name() IWindow_nameContext
  18529. AllExpr() []IExprContext
  18530. Expr(i int) IExprContext
  18531. STAR() antlr.TerminalNode
  18532. Filter_clause() IFilter_clauseContext
  18533. AllCOMMA() []antlr.TerminalNode
  18534. COMMA(i int) antlr.TerminalNode
  18535. // IsWindow_function_invocationContext differentiates from other interfaces.
  18536. IsWindow_function_invocationContext()
  18537. }
  18538. type Window_function_invocationContext struct {
  18539. *antlr.BaseParserRuleContext
  18540. parser antlr.Parser
  18541. }
  18542. func NewEmptyWindow_function_invocationContext() *Window_function_invocationContext {
  18543. var p = new(Window_function_invocationContext)
  18544. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  18545. p.RuleIndex = SQLiteParserRULE_window_function_invocation
  18546. return p
  18547. }
  18548. func (*Window_function_invocationContext) IsWindow_function_invocationContext() {}
  18549. func NewWindow_function_invocationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_function_invocationContext {
  18550. var p = new(Window_function_invocationContext)
  18551. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  18552. p.parser = parser
  18553. p.RuleIndex = SQLiteParserRULE_window_function_invocation
  18554. return p
  18555. }
  18556. func (s *Window_function_invocationContext) GetParser() antlr.Parser { return s.parser }
  18557. func (s *Window_function_invocationContext) Window_function() IWindow_functionContext {
  18558. var t antlr.RuleContext
  18559. for _, ctx := range s.GetChildren() {
  18560. if _, ok := ctx.(IWindow_functionContext); ok {
  18561. t = ctx.(antlr.RuleContext)
  18562. break
  18563. }
  18564. }
  18565. if t == nil {
  18566. return nil
  18567. }
  18568. return t.(IWindow_functionContext)
  18569. }
  18570. func (s *Window_function_invocationContext) OPEN_PAR() antlr.TerminalNode {
  18571. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  18572. }
  18573. func (s *Window_function_invocationContext) CLOSE_PAR() antlr.TerminalNode {
  18574. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  18575. }
  18576. func (s *Window_function_invocationContext) OVER_() antlr.TerminalNode {
  18577. return s.GetToken(SQLiteParserOVER_, 0)
  18578. }
  18579. func (s *Window_function_invocationContext) Window_defn() IWindow_defnContext {
  18580. var t antlr.RuleContext
  18581. for _, ctx := range s.GetChildren() {
  18582. if _, ok := ctx.(IWindow_defnContext); ok {
  18583. t = ctx.(antlr.RuleContext)
  18584. break
  18585. }
  18586. }
  18587. if t == nil {
  18588. return nil
  18589. }
  18590. return t.(IWindow_defnContext)
  18591. }
  18592. func (s *Window_function_invocationContext) Window_name() IWindow_nameContext {
  18593. var t antlr.RuleContext
  18594. for _, ctx := range s.GetChildren() {
  18595. if _, ok := ctx.(IWindow_nameContext); ok {
  18596. t = ctx.(antlr.RuleContext)
  18597. break
  18598. }
  18599. }
  18600. if t == nil {
  18601. return nil
  18602. }
  18603. return t.(IWindow_nameContext)
  18604. }
  18605. func (s *Window_function_invocationContext) AllExpr() []IExprContext {
  18606. children := s.GetChildren()
  18607. len := 0
  18608. for _, ctx := range children {
  18609. if _, ok := ctx.(IExprContext); ok {
  18610. len++
  18611. }
  18612. }
  18613. tst := make([]IExprContext, len)
  18614. i := 0
  18615. for _, ctx := range children {
  18616. if t, ok := ctx.(IExprContext); ok {
  18617. tst[i] = t.(IExprContext)
  18618. i++
  18619. }
  18620. }
  18621. return tst
  18622. }
  18623. func (s *Window_function_invocationContext) Expr(i int) IExprContext {
  18624. var t antlr.RuleContext
  18625. j := 0
  18626. for _, ctx := range s.GetChildren() {
  18627. if _, ok := ctx.(IExprContext); ok {
  18628. if j == i {
  18629. t = ctx.(antlr.RuleContext)
  18630. break
  18631. }
  18632. j++
  18633. }
  18634. }
  18635. if t == nil {
  18636. return nil
  18637. }
  18638. return t.(IExprContext)
  18639. }
  18640. func (s *Window_function_invocationContext) STAR() antlr.TerminalNode {
  18641. return s.GetToken(SQLiteParserSTAR, 0)
  18642. }
  18643. func (s *Window_function_invocationContext) Filter_clause() IFilter_clauseContext {
  18644. var t antlr.RuleContext
  18645. for _, ctx := range s.GetChildren() {
  18646. if _, ok := ctx.(IFilter_clauseContext); ok {
  18647. t = ctx.(antlr.RuleContext)
  18648. break
  18649. }
  18650. }
  18651. if t == nil {
  18652. return nil
  18653. }
  18654. return t.(IFilter_clauseContext)
  18655. }
  18656. func (s *Window_function_invocationContext) AllCOMMA() []antlr.TerminalNode {
  18657. return s.GetTokens(SQLiteParserCOMMA)
  18658. }
  18659. func (s *Window_function_invocationContext) COMMA(i int) antlr.TerminalNode {
  18660. return s.GetToken(SQLiteParserCOMMA, i)
  18661. }
  18662. func (s *Window_function_invocationContext) GetRuleContext() antlr.RuleContext {
  18663. return s
  18664. }
  18665. func (s *Window_function_invocationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  18666. return antlr.TreesStringTree(s, ruleNames, recog)
  18667. }
  18668. func (s *Window_function_invocationContext) EnterRule(listener antlr.ParseTreeListener) {
  18669. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18670. listenerT.EnterWindow_function_invocation(s)
  18671. }
  18672. }
  18673. func (s *Window_function_invocationContext) ExitRule(listener antlr.ParseTreeListener) {
  18674. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18675. listenerT.ExitWindow_function_invocation(s)
  18676. }
  18677. }
  18678. func (p *SQLiteParser) Window_function_invocation() (localctx IWindow_function_invocationContext) {
  18679. this := p
  18680. _ = this
  18681. localctx = NewWindow_function_invocationContext(p, p.GetParserRuleContext(), p.GetState())
  18682. p.EnterRule(localctx, 130, SQLiteParserRULE_window_function_invocation)
  18683. var _la int
  18684. defer func() {
  18685. p.ExitRule()
  18686. }()
  18687. defer func() {
  18688. if err := recover(); err != nil {
  18689. if v, ok := err.(antlr.RecognitionException); ok {
  18690. localctx.SetException(v)
  18691. p.GetErrorHandler().ReportError(p, v)
  18692. p.GetErrorHandler().Recover(p, v)
  18693. } else {
  18694. panic(err)
  18695. }
  18696. }
  18697. }()
  18698. p.EnterOuterAlt(localctx, 1)
  18699. {
  18700. p.SetState(1873)
  18701. p.Window_function()
  18702. }
  18703. {
  18704. p.SetState(1874)
  18705. p.Match(SQLiteParserOPEN_PAR)
  18706. }
  18707. p.SetState(1884)
  18708. p.GetErrorHandler().Sync(p)
  18709. switch p.GetTokenStream().LA(1) {
  18710. case SQLiteParserOPEN_PAR, SQLiteParserPLUS, SQLiteParserMINUS, SQLiteParserTILDE, SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_, SQLiteParserIDENTIFIER, SQLiteParserNUMERIC_LITERAL, SQLiteParserNUMBERED_BIND_PARAMETER, SQLiteParserNAMED_BIND_PARAMETER, SQLiteParserSTRING_LITERAL, SQLiteParserBLOB_LITERAL:
  18711. {
  18712. p.SetState(1875)
  18713. p.expr(0)
  18714. }
  18715. p.SetState(1880)
  18716. p.GetErrorHandler().Sync(p)
  18717. _la = p.GetTokenStream().LA(1)
  18718. for _la == SQLiteParserCOMMA {
  18719. {
  18720. p.SetState(1876)
  18721. p.Match(SQLiteParserCOMMA)
  18722. }
  18723. {
  18724. p.SetState(1877)
  18725. p.expr(0)
  18726. }
  18727. p.SetState(1882)
  18728. p.GetErrorHandler().Sync(p)
  18729. _la = p.GetTokenStream().LA(1)
  18730. }
  18731. case SQLiteParserSTAR:
  18732. {
  18733. p.SetState(1883)
  18734. p.Match(SQLiteParserSTAR)
  18735. }
  18736. case SQLiteParserCLOSE_PAR:
  18737. default:
  18738. }
  18739. {
  18740. p.SetState(1886)
  18741. p.Match(SQLiteParserCLOSE_PAR)
  18742. }
  18743. p.SetState(1888)
  18744. p.GetErrorHandler().Sync(p)
  18745. _la = p.GetTokenStream().LA(1)
  18746. if _la == SQLiteParserFILTER_ {
  18747. {
  18748. p.SetState(1887)
  18749. p.Filter_clause()
  18750. }
  18751. }
  18752. {
  18753. p.SetState(1890)
  18754. p.Match(SQLiteParserOVER_)
  18755. }
  18756. p.SetState(1893)
  18757. p.GetErrorHandler().Sync(p)
  18758. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 283, p.GetParserRuleContext()) {
  18759. case 1:
  18760. {
  18761. p.SetState(1891)
  18762. p.Window_defn()
  18763. }
  18764. case 2:
  18765. {
  18766. p.SetState(1892)
  18767. p.Window_name()
  18768. }
  18769. }
  18770. return localctx
  18771. }
  18772. // ICommon_table_stmtContext is an interface to support dynamic dispatch.
  18773. type ICommon_table_stmtContext interface {
  18774. antlr.ParserRuleContext
  18775. // GetParser returns the parser.
  18776. GetParser() antlr.Parser
  18777. // Getter signatures
  18778. WITH_() antlr.TerminalNode
  18779. AllCommon_table_expression() []ICommon_table_expressionContext
  18780. Common_table_expression(i int) ICommon_table_expressionContext
  18781. RECURSIVE_() antlr.TerminalNode
  18782. AllCOMMA() []antlr.TerminalNode
  18783. COMMA(i int) antlr.TerminalNode
  18784. // IsCommon_table_stmtContext differentiates from other interfaces.
  18785. IsCommon_table_stmtContext()
  18786. }
  18787. type Common_table_stmtContext struct {
  18788. *antlr.BaseParserRuleContext
  18789. parser antlr.Parser
  18790. }
  18791. func NewEmptyCommon_table_stmtContext() *Common_table_stmtContext {
  18792. var p = new(Common_table_stmtContext)
  18793. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  18794. p.RuleIndex = SQLiteParserRULE_common_table_stmt
  18795. return p
  18796. }
  18797. func (*Common_table_stmtContext) IsCommon_table_stmtContext() {}
  18798. func NewCommon_table_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Common_table_stmtContext {
  18799. var p = new(Common_table_stmtContext)
  18800. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  18801. p.parser = parser
  18802. p.RuleIndex = SQLiteParserRULE_common_table_stmt
  18803. return p
  18804. }
  18805. func (s *Common_table_stmtContext) GetParser() antlr.Parser { return s.parser }
  18806. func (s *Common_table_stmtContext) WITH_() antlr.TerminalNode {
  18807. return s.GetToken(SQLiteParserWITH_, 0)
  18808. }
  18809. func (s *Common_table_stmtContext) AllCommon_table_expression() []ICommon_table_expressionContext {
  18810. children := s.GetChildren()
  18811. len := 0
  18812. for _, ctx := range children {
  18813. if _, ok := ctx.(ICommon_table_expressionContext); ok {
  18814. len++
  18815. }
  18816. }
  18817. tst := make([]ICommon_table_expressionContext, len)
  18818. i := 0
  18819. for _, ctx := range children {
  18820. if t, ok := ctx.(ICommon_table_expressionContext); ok {
  18821. tst[i] = t.(ICommon_table_expressionContext)
  18822. i++
  18823. }
  18824. }
  18825. return tst
  18826. }
  18827. func (s *Common_table_stmtContext) Common_table_expression(i int) ICommon_table_expressionContext {
  18828. var t antlr.RuleContext
  18829. j := 0
  18830. for _, ctx := range s.GetChildren() {
  18831. if _, ok := ctx.(ICommon_table_expressionContext); ok {
  18832. if j == i {
  18833. t = ctx.(antlr.RuleContext)
  18834. break
  18835. }
  18836. j++
  18837. }
  18838. }
  18839. if t == nil {
  18840. return nil
  18841. }
  18842. return t.(ICommon_table_expressionContext)
  18843. }
  18844. func (s *Common_table_stmtContext) RECURSIVE_() antlr.TerminalNode {
  18845. return s.GetToken(SQLiteParserRECURSIVE_, 0)
  18846. }
  18847. func (s *Common_table_stmtContext) AllCOMMA() []antlr.TerminalNode {
  18848. return s.GetTokens(SQLiteParserCOMMA)
  18849. }
  18850. func (s *Common_table_stmtContext) COMMA(i int) antlr.TerminalNode {
  18851. return s.GetToken(SQLiteParserCOMMA, i)
  18852. }
  18853. func (s *Common_table_stmtContext) GetRuleContext() antlr.RuleContext {
  18854. return s
  18855. }
  18856. func (s *Common_table_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  18857. return antlr.TreesStringTree(s, ruleNames, recog)
  18858. }
  18859. func (s *Common_table_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  18860. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18861. listenerT.EnterCommon_table_stmt(s)
  18862. }
  18863. }
  18864. func (s *Common_table_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  18865. if listenerT, ok := listener.(SQLiteParserListener); ok {
  18866. listenerT.ExitCommon_table_stmt(s)
  18867. }
  18868. }
  18869. func (p *SQLiteParser) Common_table_stmt() (localctx ICommon_table_stmtContext) {
  18870. this := p
  18871. _ = this
  18872. localctx = NewCommon_table_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  18873. p.EnterRule(localctx, 132, SQLiteParserRULE_common_table_stmt)
  18874. var _la int
  18875. defer func() {
  18876. p.ExitRule()
  18877. }()
  18878. defer func() {
  18879. if err := recover(); err != nil {
  18880. if v, ok := err.(antlr.RecognitionException); ok {
  18881. localctx.SetException(v)
  18882. p.GetErrorHandler().ReportError(p, v)
  18883. p.GetErrorHandler().Recover(p, v)
  18884. } else {
  18885. panic(err)
  18886. }
  18887. }
  18888. }()
  18889. p.EnterOuterAlt(localctx, 1)
  18890. {
  18891. p.SetState(1895)
  18892. p.Match(SQLiteParserWITH_)
  18893. }
  18894. p.SetState(1897)
  18895. p.GetErrorHandler().Sync(p)
  18896. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 284, p.GetParserRuleContext()) == 1 {
  18897. {
  18898. p.SetState(1896)
  18899. p.Match(SQLiteParserRECURSIVE_)
  18900. }
  18901. }
  18902. {
  18903. p.SetState(1899)
  18904. p.Common_table_expression()
  18905. }
  18906. p.SetState(1904)
  18907. p.GetErrorHandler().Sync(p)
  18908. _la = p.GetTokenStream().LA(1)
  18909. for _la == SQLiteParserCOMMA {
  18910. {
  18911. p.SetState(1900)
  18912. p.Match(SQLiteParserCOMMA)
  18913. }
  18914. {
  18915. p.SetState(1901)
  18916. p.Common_table_expression()
  18917. }
  18918. p.SetState(1906)
  18919. p.GetErrorHandler().Sync(p)
  18920. _la = p.GetTokenStream().LA(1)
  18921. }
  18922. return localctx
  18923. }
  18924. // IOrder_by_stmtContext is an interface to support dynamic dispatch.
  18925. type IOrder_by_stmtContext interface {
  18926. antlr.ParserRuleContext
  18927. // GetParser returns the parser.
  18928. GetParser() antlr.Parser
  18929. // Getter signatures
  18930. ORDER_() antlr.TerminalNode
  18931. BY_() antlr.TerminalNode
  18932. AllOrdering_term() []IOrdering_termContext
  18933. Ordering_term(i int) IOrdering_termContext
  18934. AllCOMMA() []antlr.TerminalNode
  18935. COMMA(i int) antlr.TerminalNode
  18936. // IsOrder_by_stmtContext differentiates from other interfaces.
  18937. IsOrder_by_stmtContext()
  18938. }
  18939. type Order_by_stmtContext struct {
  18940. *antlr.BaseParserRuleContext
  18941. parser antlr.Parser
  18942. }
  18943. func NewEmptyOrder_by_stmtContext() *Order_by_stmtContext {
  18944. var p = new(Order_by_stmtContext)
  18945. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  18946. p.RuleIndex = SQLiteParserRULE_order_by_stmt
  18947. return p
  18948. }
  18949. func (*Order_by_stmtContext) IsOrder_by_stmtContext() {}
  18950. func NewOrder_by_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_stmtContext {
  18951. var p = new(Order_by_stmtContext)
  18952. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  18953. p.parser = parser
  18954. p.RuleIndex = SQLiteParserRULE_order_by_stmt
  18955. return p
  18956. }
  18957. func (s *Order_by_stmtContext) GetParser() antlr.Parser { return s.parser }
  18958. func (s *Order_by_stmtContext) ORDER_() antlr.TerminalNode {
  18959. return s.GetToken(SQLiteParserORDER_, 0)
  18960. }
  18961. func (s *Order_by_stmtContext) BY_() antlr.TerminalNode {
  18962. return s.GetToken(SQLiteParserBY_, 0)
  18963. }
  18964. func (s *Order_by_stmtContext) AllOrdering_term() []IOrdering_termContext {
  18965. children := s.GetChildren()
  18966. len := 0
  18967. for _, ctx := range children {
  18968. if _, ok := ctx.(IOrdering_termContext); ok {
  18969. len++
  18970. }
  18971. }
  18972. tst := make([]IOrdering_termContext, len)
  18973. i := 0
  18974. for _, ctx := range children {
  18975. if t, ok := ctx.(IOrdering_termContext); ok {
  18976. tst[i] = t.(IOrdering_termContext)
  18977. i++
  18978. }
  18979. }
  18980. return tst
  18981. }
  18982. func (s *Order_by_stmtContext) Ordering_term(i int) IOrdering_termContext {
  18983. var t antlr.RuleContext
  18984. j := 0
  18985. for _, ctx := range s.GetChildren() {
  18986. if _, ok := ctx.(IOrdering_termContext); ok {
  18987. if j == i {
  18988. t = ctx.(antlr.RuleContext)
  18989. break
  18990. }
  18991. j++
  18992. }
  18993. }
  18994. if t == nil {
  18995. return nil
  18996. }
  18997. return t.(IOrdering_termContext)
  18998. }
  18999. func (s *Order_by_stmtContext) AllCOMMA() []antlr.TerminalNode {
  19000. return s.GetTokens(SQLiteParserCOMMA)
  19001. }
  19002. func (s *Order_by_stmtContext) COMMA(i int) antlr.TerminalNode {
  19003. return s.GetToken(SQLiteParserCOMMA, i)
  19004. }
  19005. func (s *Order_by_stmtContext) GetRuleContext() antlr.RuleContext {
  19006. return s
  19007. }
  19008. func (s *Order_by_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  19009. return antlr.TreesStringTree(s, ruleNames, recog)
  19010. }
  19011. func (s *Order_by_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  19012. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19013. listenerT.EnterOrder_by_stmt(s)
  19014. }
  19015. }
  19016. func (s *Order_by_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  19017. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19018. listenerT.ExitOrder_by_stmt(s)
  19019. }
  19020. }
  19021. func (p *SQLiteParser) Order_by_stmt() (localctx IOrder_by_stmtContext) {
  19022. this := p
  19023. _ = this
  19024. localctx = NewOrder_by_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  19025. p.EnterRule(localctx, 134, SQLiteParserRULE_order_by_stmt)
  19026. var _la int
  19027. defer func() {
  19028. p.ExitRule()
  19029. }()
  19030. defer func() {
  19031. if err := recover(); err != nil {
  19032. if v, ok := err.(antlr.RecognitionException); ok {
  19033. localctx.SetException(v)
  19034. p.GetErrorHandler().ReportError(p, v)
  19035. p.GetErrorHandler().Recover(p, v)
  19036. } else {
  19037. panic(err)
  19038. }
  19039. }
  19040. }()
  19041. p.EnterOuterAlt(localctx, 1)
  19042. {
  19043. p.SetState(1907)
  19044. p.Match(SQLiteParserORDER_)
  19045. }
  19046. {
  19047. p.SetState(1908)
  19048. p.Match(SQLiteParserBY_)
  19049. }
  19050. {
  19051. p.SetState(1909)
  19052. p.Ordering_term()
  19053. }
  19054. p.SetState(1914)
  19055. p.GetErrorHandler().Sync(p)
  19056. _la = p.GetTokenStream().LA(1)
  19057. for _la == SQLiteParserCOMMA {
  19058. {
  19059. p.SetState(1910)
  19060. p.Match(SQLiteParserCOMMA)
  19061. }
  19062. {
  19063. p.SetState(1911)
  19064. p.Ordering_term()
  19065. }
  19066. p.SetState(1916)
  19067. p.GetErrorHandler().Sync(p)
  19068. _la = p.GetTokenStream().LA(1)
  19069. }
  19070. return localctx
  19071. }
  19072. // ILimit_stmtContext is an interface to support dynamic dispatch.
  19073. type ILimit_stmtContext interface {
  19074. antlr.ParserRuleContext
  19075. // GetParser returns the parser.
  19076. GetParser() antlr.Parser
  19077. // Getter signatures
  19078. LIMIT_() antlr.TerminalNode
  19079. AllExpr() []IExprContext
  19080. Expr(i int) IExprContext
  19081. OFFSET_() antlr.TerminalNode
  19082. COMMA() antlr.TerminalNode
  19083. // IsLimit_stmtContext differentiates from other interfaces.
  19084. IsLimit_stmtContext()
  19085. }
  19086. type Limit_stmtContext struct {
  19087. *antlr.BaseParserRuleContext
  19088. parser antlr.Parser
  19089. }
  19090. func NewEmptyLimit_stmtContext() *Limit_stmtContext {
  19091. var p = new(Limit_stmtContext)
  19092. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  19093. p.RuleIndex = SQLiteParserRULE_limit_stmt
  19094. return p
  19095. }
  19096. func (*Limit_stmtContext) IsLimit_stmtContext() {}
  19097. func NewLimit_stmtContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Limit_stmtContext {
  19098. var p = new(Limit_stmtContext)
  19099. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  19100. p.parser = parser
  19101. p.RuleIndex = SQLiteParserRULE_limit_stmt
  19102. return p
  19103. }
  19104. func (s *Limit_stmtContext) GetParser() antlr.Parser { return s.parser }
  19105. func (s *Limit_stmtContext) LIMIT_() antlr.TerminalNode {
  19106. return s.GetToken(SQLiteParserLIMIT_, 0)
  19107. }
  19108. func (s *Limit_stmtContext) AllExpr() []IExprContext {
  19109. children := s.GetChildren()
  19110. len := 0
  19111. for _, ctx := range children {
  19112. if _, ok := ctx.(IExprContext); ok {
  19113. len++
  19114. }
  19115. }
  19116. tst := make([]IExprContext, len)
  19117. i := 0
  19118. for _, ctx := range children {
  19119. if t, ok := ctx.(IExprContext); ok {
  19120. tst[i] = t.(IExprContext)
  19121. i++
  19122. }
  19123. }
  19124. return tst
  19125. }
  19126. func (s *Limit_stmtContext) Expr(i int) IExprContext {
  19127. var t antlr.RuleContext
  19128. j := 0
  19129. for _, ctx := range s.GetChildren() {
  19130. if _, ok := ctx.(IExprContext); ok {
  19131. if j == i {
  19132. t = ctx.(antlr.RuleContext)
  19133. break
  19134. }
  19135. j++
  19136. }
  19137. }
  19138. if t == nil {
  19139. return nil
  19140. }
  19141. return t.(IExprContext)
  19142. }
  19143. func (s *Limit_stmtContext) OFFSET_() antlr.TerminalNode {
  19144. return s.GetToken(SQLiteParserOFFSET_, 0)
  19145. }
  19146. func (s *Limit_stmtContext) COMMA() antlr.TerminalNode {
  19147. return s.GetToken(SQLiteParserCOMMA, 0)
  19148. }
  19149. func (s *Limit_stmtContext) GetRuleContext() antlr.RuleContext {
  19150. return s
  19151. }
  19152. func (s *Limit_stmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  19153. return antlr.TreesStringTree(s, ruleNames, recog)
  19154. }
  19155. func (s *Limit_stmtContext) EnterRule(listener antlr.ParseTreeListener) {
  19156. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19157. listenerT.EnterLimit_stmt(s)
  19158. }
  19159. }
  19160. func (s *Limit_stmtContext) ExitRule(listener antlr.ParseTreeListener) {
  19161. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19162. listenerT.ExitLimit_stmt(s)
  19163. }
  19164. }
  19165. func (p *SQLiteParser) Limit_stmt() (localctx ILimit_stmtContext) {
  19166. this := p
  19167. _ = this
  19168. localctx = NewLimit_stmtContext(p, p.GetParserRuleContext(), p.GetState())
  19169. p.EnterRule(localctx, 136, SQLiteParserRULE_limit_stmt)
  19170. var _la int
  19171. defer func() {
  19172. p.ExitRule()
  19173. }()
  19174. defer func() {
  19175. if err := recover(); err != nil {
  19176. if v, ok := err.(antlr.RecognitionException); ok {
  19177. localctx.SetException(v)
  19178. p.GetErrorHandler().ReportError(p, v)
  19179. p.GetErrorHandler().Recover(p, v)
  19180. } else {
  19181. panic(err)
  19182. }
  19183. }
  19184. }()
  19185. p.EnterOuterAlt(localctx, 1)
  19186. {
  19187. p.SetState(1917)
  19188. p.Match(SQLiteParserLIMIT_)
  19189. }
  19190. {
  19191. p.SetState(1918)
  19192. p.expr(0)
  19193. }
  19194. p.SetState(1921)
  19195. p.GetErrorHandler().Sync(p)
  19196. _la = p.GetTokenStream().LA(1)
  19197. if _la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_ {
  19198. {
  19199. p.SetState(1919)
  19200. _la = p.GetTokenStream().LA(1)
  19201. if !(_la == SQLiteParserCOMMA || _la == SQLiteParserOFFSET_) {
  19202. p.GetErrorHandler().RecoverInline(p)
  19203. } else {
  19204. p.GetErrorHandler().ReportMatch(p)
  19205. p.Consume()
  19206. }
  19207. }
  19208. {
  19209. p.SetState(1920)
  19210. p.expr(0)
  19211. }
  19212. }
  19213. return localctx
  19214. }
  19215. // IOrdering_termContext is an interface to support dynamic dispatch.
  19216. type IOrdering_termContext interface {
  19217. antlr.ParserRuleContext
  19218. // GetParser returns the parser.
  19219. GetParser() antlr.Parser
  19220. // Getter signatures
  19221. Expr() IExprContext
  19222. COLLATE_() antlr.TerminalNode
  19223. Collation_name() ICollation_nameContext
  19224. Asc_desc() IAsc_descContext
  19225. NULLS_() antlr.TerminalNode
  19226. FIRST_() antlr.TerminalNode
  19227. LAST_() antlr.TerminalNode
  19228. // IsOrdering_termContext differentiates from other interfaces.
  19229. IsOrdering_termContext()
  19230. }
  19231. type Ordering_termContext struct {
  19232. *antlr.BaseParserRuleContext
  19233. parser antlr.Parser
  19234. }
  19235. func NewEmptyOrdering_termContext() *Ordering_termContext {
  19236. var p = new(Ordering_termContext)
  19237. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  19238. p.RuleIndex = SQLiteParserRULE_ordering_term
  19239. return p
  19240. }
  19241. func (*Ordering_termContext) IsOrdering_termContext() {}
  19242. func NewOrdering_termContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Ordering_termContext {
  19243. var p = new(Ordering_termContext)
  19244. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  19245. p.parser = parser
  19246. p.RuleIndex = SQLiteParserRULE_ordering_term
  19247. return p
  19248. }
  19249. func (s *Ordering_termContext) GetParser() antlr.Parser { return s.parser }
  19250. func (s *Ordering_termContext) Expr() IExprContext {
  19251. var t antlr.RuleContext
  19252. for _, ctx := range s.GetChildren() {
  19253. if _, ok := ctx.(IExprContext); ok {
  19254. t = ctx.(antlr.RuleContext)
  19255. break
  19256. }
  19257. }
  19258. if t == nil {
  19259. return nil
  19260. }
  19261. return t.(IExprContext)
  19262. }
  19263. func (s *Ordering_termContext) COLLATE_() antlr.TerminalNode {
  19264. return s.GetToken(SQLiteParserCOLLATE_, 0)
  19265. }
  19266. func (s *Ordering_termContext) Collation_name() ICollation_nameContext {
  19267. var t antlr.RuleContext
  19268. for _, ctx := range s.GetChildren() {
  19269. if _, ok := ctx.(ICollation_nameContext); ok {
  19270. t = ctx.(antlr.RuleContext)
  19271. break
  19272. }
  19273. }
  19274. if t == nil {
  19275. return nil
  19276. }
  19277. return t.(ICollation_nameContext)
  19278. }
  19279. func (s *Ordering_termContext) Asc_desc() IAsc_descContext {
  19280. var t antlr.RuleContext
  19281. for _, ctx := range s.GetChildren() {
  19282. if _, ok := ctx.(IAsc_descContext); ok {
  19283. t = ctx.(antlr.RuleContext)
  19284. break
  19285. }
  19286. }
  19287. if t == nil {
  19288. return nil
  19289. }
  19290. return t.(IAsc_descContext)
  19291. }
  19292. func (s *Ordering_termContext) NULLS_() antlr.TerminalNode {
  19293. return s.GetToken(SQLiteParserNULLS_, 0)
  19294. }
  19295. func (s *Ordering_termContext) FIRST_() antlr.TerminalNode {
  19296. return s.GetToken(SQLiteParserFIRST_, 0)
  19297. }
  19298. func (s *Ordering_termContext) LAST_() antlr.TerminalNode {
  19299. return s.GetToken(SQLiteParserLAST_, 0)
  19300. }
  19301. func (s *Ordering_termContext) GetRuleContext() antlr.RuleContext {
  19302. return s
  19303. }
  19304. func (s *Ordering_termContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  19305. return antlr.TreesStringTree(s, ruleNames, recog)
  19306. }
  19307. func (s *Ordering_termContext) EnterRule(listener antlr.ParseTreeListener) {
  19308. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19309. listenerT.EnterOrdering_term(s)
  19310. }
  19311. }
  19312. func (s *Ordering_termContext) ExitRule(listener antlr.ParseTreeListener) {
  19313. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19314. listenerT.ExitOrdering_term(s)
  19315. }
  19316. }
  19317. func (p *SQLiteParser) Ordering_term() (localctx IOrdering_termContext) {
  19318. this := p
  19319. _ = this
  19320. localctx = NewOrdering_termContext(p, p.GetParserRuleContext(), p.GetState())
  19321. p.EnterRule(localctx, 138, SQLiteParserRULE_ordering_term)
  19322. var _la int
  19323. defer func() {
  19324. p.ExitRule()
  19325. }()
  19326. defer func() {
  19327. if err := recover(); err != nil {
  19328. if v, ok := err.(antlr.RecognitionException); ok {
  19329. localctx.SetException(v)
  19330. p.GetErrorHandler().ReportError(p, v)
  19331. p.GetErrorHandler().Recover(p, v)
  19332. } else {
  19333. panic(err)
  19334. }
  19335. }
  19336. }()
  19337. p.EnterOuterAlt(localctx, 1)
  19338. {
  19339. p.SetState(1923)
  19340. p.expr(0)
  19341. }
  19342. p.SetState(1926)
  19343. p.GetErrorHandler().Sync(p)
  19344. _la = p.GetTokenStream().LA(1)
  19345. if _la == SQLiteParserCOLLATE_ {
  19346. {
  19347. p.SetState(1924)
  19348. p.Match(SQLiteParserCOLLATE_)
  19349. }
  19350. {
  19351. p.SetState(1925)
  19352. p.Collation_name()
  19353. }
  19354. }
  19355. p.SetState(1929)
  19356. p.GetErrorHandler().Sync(p)
  19357. _la = p.GetTokenStream().LA(1)
  19358. if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ {
  19359. {
  19360. p.SetState(1928)
  19361. p.Asc_desc()
  19362. }
  19363. }
  19364. p.SetState(1933)
  19365. p.GetErrorHandler().Sync(p)
  19366. _la = p.GetTokenStream().LA(1)
  19367. if _la == SQLiteParserNULLS_ {
  19368. {
  19369. p.SetState(1931)
  19370. p.Match(SQLiteParserNULLS_)
  19371. }
  19372. {
  19373. p.SetState(1932)
  19374. _la = p.GetTokenStream().LA(1)
  19375. if !(_la == SQLiteParserFIRST_ || _la == SQLiteParserLAST_) {
  19376. p.GetErrorHandler().RecoverInline(p)
  19377. } else {
  19378. p.GetErrorHandler().ReportMatch(p)
  19379. p.Consume()
  19380. }
  19381. }
  19382. }
  19383. return localctx
  19384. }
  19385. // IAsc_descContext is an interface to support dynamic dispatch.
  19386. type IAsc_descContext interface {
  19387. antlr.ParserRuleContext
  19388. // GetParser returns the parser.
  19389. GetParser() antlr.Parser
  19390. // Getter signatures
  19391. ASC_() antlr.TerminalNode
  19392. DESC_() antlr.TerminalNode
  19393. // IsAsc_descContext differentiates from other interfaces.
  19394. IsAsc_descContext()
  19395. }
  19396. type Asc_descContext struct {
  19397. *antlr.BaseParserRuleContext
  19398. parser antlr.Parser
  19399. }
  19400. func NewEmptyAsc_descContext() *Asc_descContext {
  19401. var p = new(Asc_descContext)
  19402. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  19403. p.RuleIndex = SQLiteParserRULE_asc_desc
  19404. return p
  19405. }
  19406. func (*Asc_descContext) IsAsc_descContext() {}
  19407. func NewAsc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Asc_descContext {
  19408. var p = new(Asc_descContext)
  19409. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  19410. p.parser = parser
  19411. p.RuleIndex = SQLiteParserRULE_asc_desc
  19412. return p
  19413. }
  19414. func (s *Asc_descContext) GetParser() antlr.Parser { return s.parser }
  19415. func (s *Asc_descContext) ASC_() antlr.TerminalNode {
  19416. return s.GetToken(SQLiteParserASC_, 0)
  19417. }
  19418. func (s *Asc_descContext) DESC_() antlr.TerminalNode {
  19419. return s.GetToken(SQLiteParserDESC_, 0)
  19420. }
  19421. func (s *Asc_descContext) GetRuleContext() antlr.RuleContext {
  19422. return s
  19423. }
  19424. func (s *Asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  19425. return antlr.TreesStringTree(s, ruleNames, recog)
  19426. }
  19427. func (s *Asc_descContext) EnterRule(listener antlr.ParseTreeListener) {
  19428. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19429. listenerT.EnterAsc_desc(s)
  19430. }
  19431. }
  19432. func (s *Asc_descContext) ExitRule(listener antlr.ParseTreeListener) {
  19433. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19434. listenerT.ExitAsc_desc(s)
  19435. }
  19436. }
  19437. func (p *SQLiteParser) Asc_desc() (localctx IAsc_descContext) {
  19438. this := p
  19439. _ = this
  19440. localctx = NewAsc_descContext(p, p.GetParserRuleContext(), p.GetState())
  19441. p.EnterRule(localctx, 140, SQLiteParserRULE_asc_desc)
  19442. var _la int
  19443. defer func() {
  19444. p.ExitRule()
  19445. }()
  19446. defer func() {
  19447. if err := recover(); err != nil {
  19448. if v, ok := err.(antlr.RecognitionException); ok {
  19449. localctx.SetException(v)
  19450. p.GetErrorHandler().ReportError(p, v)
  19451. p.GetErrorHandler().Recover(p, v)
  19452. } else {
  19453. panic(err)
  19454. }
  19455. }
  19456. }()
  19457. p.EnterOuterAlt(localctx, 1)
  19458. {
  19459. p.SetState(1935)
  19460. _la = p.GetTokenStream().LA(1)
  19461. if !(_la == SQLiteParserASC_ || _la == SQLiteParserDESC_) {
  19462. p.GetErrorHandler().RecoverInline(p)
  19463. } else {
  19464. p.GetErrorHandler().ReportMatch(p)
  19465. p.Consume()
  19466. }
  19467. }
  19468. return localctx
  19469. }
  19470. // IFrame_leftContext is an interface to support dynamic dispatch.
  19471. type IFrame_leftContext interface {
  19472. antlr.ParserRuleContext
  19473. // GetParser returns the parser.
  19474. GetParser() antlr.Parser
  19475. // Getter signatures
  19476. Expr() IExprContext
  19477. PRECEDING_() antlr.TerminalNode
  19478. FOLLOWING_() antlr.TerminalNode
  19479. CURRENT_() antlr.TerminalNode
  19480. ROW_() antlr.TerminalNode
  19481. UNBOUNDED_() antlr.TerminalNode
  19482. // IsFrame_leftContext differentiates from other interfaces.
  19483. IsFrame_leftContext()
  19484. }
  19485. type Frame_leftContext struct {
  19486. *antlr.BaseParserRuleContext
  19487. parser antlr.Parser
  19488. }
  19489. func NewEmptyFrame_leftContext() *Frame_leftContext {
  19490. var p = new(Frame_leftContext)
  19491. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  19492. p.RuleIndex = SQLiteParserRULE_frame_left
  19493. return p
  19494. }
  19495. func (*Frame_leftContext) IsFrame_leftContext() {}
  19496. func NewFrame_leftContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_leftContext {
  19497. var p = new(Frame_leftContext)
  19498. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  19499. p.parser = parser
  19500. p.RuleIndex = SQLiteParserRULE_frame_left
  19501. return p
  19502. }
  19503. func (s *Frame_leftContext) GetParser() antlr.Parser { return s.parser }
  19504. func (s *Frame_leftContext) Expr() IExprContext {
  19505. var t antlr.RuleContext
  19506. for _, ctx := range s.GetChildren() {
  19507. if _, ok := ctx.(IExprContext); ok {
  19508. t = ctx.(antlr.RuleContext)
  19509. break
  19510. }
  19511. }
  19512. if t == nil {
  19513. return nil
  19514. }
  19515. return t.(IExprContext)
  19516. }
  19517. func (s *Frame_leftContext) PRECEDING_() antlr.TerminalNode {
  19518. return s.GetToken(SQLiteParserPRECEDING_, 0)
  19519. }
  19520. func (s *Frame_leftContext) FOLLOWING_() antlr.TerminalNode {
  19521. return s.GetToken(SQLiteParserFOLLOWING_, 0)
  19522. }
  19523. func (s *Frame_leftContext) CURRENT_() antlr.TerminalNode {
  19524. return s.GetToken(SQLiteParserCURRENT_, 0)
  19525. }
  19526. func (s *Frame_leftContext) ROW_() antlr.TerminalNode {
  19527. return s.GetToken(SQLiteParserROW_, 0)
  19528. }
  19529. func (s *Frame_leftContext) UNBOUNDED_() antlr.TerminalNode {
  19530. return s.GetToken(SQLiteParserUNBOUNDED_, 0)
  19531. }
  19532. func (s *Frame_leftContext) GetRuleContext() antlr.RuleContext {
  19533. return s
  19534. }
  19535. func (s *Frame_leftContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  19536. return antlr.TreesStringTree(s, ruleNames, recog)
  19537. }
  19538. func (s *Frame_leftContext) EnterRule(listener antlr.ParseTreeListener) {
  19539. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19540. listenerT.EnterFrame_left(s)
  19541. }
  19542. }
  19543. func (s *Frame_leftContext) ExitRule(listener antlr.ParseTreeListener) {
  19544. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19545. listenerT.ExitFrame_left(s)
  19546. }
  19547. }
  19548. func (p *SQLiteParser) Frame_left() (localctx IFrame_leftContext) {
  19549. this := p
  19550. _ = this
  19551. localctx = NewFrame_leftContext(p, p.GetParserRuleContext(), p.GetState())
  19552. p.EnterRule(localctx, 142, SQLiteParserRULE_frame_left)
  19553. defer func() {
  19554. p.ExitRule()
  19555. }()
  19556. defer func() {
  19557. if err := recover(); err != nil {
  19558. if v, ok := err.(antlr.RecognitionException); ok {
  19559. localctx.SetException(v)
  19560. p.GetErrorHandler().ReportError(p, v)
  19561. p.GetErrorHandler().Recover(p, v)
  19562. } else {
  19563. panic(err)
  19564. }
  19565. }
  19566. }()
  19567. p.SetState(1947)
  19568. p.GetErrorHandler().Sync(p)
  19569. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 291, p.GetParserRuleContext()) {
  19570. case 1:
  19571. p.EnterOuterAlt(localctx, 1)
  19572. {
  19573. p.SetState(1937)
  19574. p.expr(0)
  19575. }
  19576. {
  19577. p.SetState(1938)
  19578. p.Match(SQLiteParserPRECEDING_)
  19579. }
  19580. case 2:
  19581. p.EnterOuterAlt(localctx, 2)
  19582. {
  19583. p.SetState(1940)
  19584. p.expr(0)
  19585. }
  19586. {
  19587. p.SetState(1941)
  19588. p.Match(SQLiteParserFOLLOWING_)
  19589. }
  19590. case 3:
  19591. p.EnterOuterAlt(localctx, 3)
  19592. {
  19593. p.SetState(1943)
  19594. p.Match(SQLiteParserCURRENT_)
  19595. }
  19596. {
  19597. p.SetState(1944)
  19598. p.Match(SQLiteParserROW_)
  19599. }
  19600. case 4:
  19601. p.EnterOuterAlt(localctx, 4)
  19602. {
  19603. p.SetState(1945)
  19604. p.Match(SQLiteParserUNBOUNDED_)
  19605. }
  19606. {
  19607. p.SetState(1946)
  19608. p.Match(SQLiteParserPRECEDING_)
  19609. }
  19610. }
  19611. return localctx
  19612. }
  19613. // IFrame_rightContext is an interface to support dynamic dispatch.
  19614. type IFrame_rightContext interface {
  19615. antlr.ParserRuleContext
  19616. // GetParser returns the parser.
  19617. GetParser() antlr.Parser
  19618. // Getter signatures
  19619. Expr() IExprContext
  19620. PRECEDING_() antlr.TerminalNode
  19621. FOLLOWING_() antlr.TerminalNode
  19622. CURRENT_() antlr.TerminalNode
  19623. ROW_() antlr.TerminalNode
  19624. UNBOUNDED_() antlr.TerminalNode
  19625. // IsFrame_rightContext differentiates from other interfaces.
  19626. IsFrame_rightContext()
  19627. }
  19628. type Frame_rightContext struct {
  19629. *antlr.BaseParserRuleContext
  19630. parser antlr.Parser
  19631. }
  19632. func NewEmptyFrame_rightContext() *Frame_rightContext {
  19633. var p = new(Frame_rightContext)
  19634. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  19635. p.RuleIndex = SQLiteParserRULE_frame_right
  19636. return p
  19637. }
  19638. func (*Frame_rightContext) IsFrame_rightContext() {}
  19639. func NewFrame_rightContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_rightContext {
  19640. var p = new(Frame_rightContext)
  19641. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  19642. p.parser = parser
  19643. p.RuleIndex = SQLiteParserRULE_frame_right
  19644. return p
  19645. }
  19646. func (s *Frame_rightContext) GetParser() antlr.Parser { return s.parser }
  19647. func (s *Frame_rightContext) Expr() IExprContext {
  19648. var t antlr.RuleContext
  19649. for _, ctx := range s.GetChildren() {
  19650. if _, ok := ctx.(IExprContext); ok {
  19651. t = ctx.(antlr.RuleContext)
  19652. break
  19653. }
  19654. }
  19655. if t == nil {
  19656. return nil
  19657. }
  19658. return t.(IExprContext)
  19659. }
  19660. func (s *Frame_rightContext) PRECEDING_() antlr.TerminalNode {
  19661. return s.GetToken(SQLiteParserPRECEDING_, 0)
  19662. }
  19663. func (s *Frame_rightContext) FOLLOWING_() antlr.TerminalNode {
  19664. return s.GetToken(SQLiteParserFOLLOWING_, 0)
  19665. }
  19666. func (s *Frame_rightContext) CURRENT_() antlr.TerminalNode {
  19667. return s.GetToken(SQLiteParserCURRENT_, 0)
  19668. }
  19669. func (s *Frame_rightContext) ROW_() antlr.TerminalNode {
  19670. return s.GetToken(SQLiteParserROW_, 0)
  19671. }
  19672. func (s *Frame_rightContext) UNBOUNDED_() antlr.TerminalNode {
  19673. return s.GetToken(SQLiteParserUNBOUNDED_, 0)
  19674. }
  19675. func (s *Frame_rightContext) GetRuleContext() antlr.RuleContext {
  19676. return s
  19677. }
  19678. func (s *Frame_rightContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  19679. return antlr.TreesStringTree(s, ruleNames, recog)
  19680. }
  19681. func (s *Frame_rightContext) EnterRule(listener antlr.ParseTreeListener) {
  19682. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19683. listenerT.EnterFrame_right(s)
  19684. }
  19685. }
  19686. func (s *Frame_rightContext) ExitRule(listener antlr.ParseTreeListener) {
  19687. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19688. listenerT.ExitFrame_right(s)
  19689. }
  19690. }
  19691. func (p *SQLiteParser) Frame_right() (localctx IFrame_rightContext) {
  19692. this := p
  19693. _ = this
  19694. localctx = NewFrame_rightContext(p, p.GetParserRuleContext(), p.GetState())
  19695. p.EnterRule(localctx, 144, SQLiteParserRULE_frame_right)
  19696. defer func() {
  19697. p.ExitRule()
  19698. }()
  19699. defer func() {
  19700. if err := recover(); err != nil {
  19701. if v, ok := err.(antlr.RecognitionException); ok {
  19702. localctx.SetException(v)
  19703. p.GetErrorHandler().ReportError(p, v)
  19704. p.GetErrorHandler().Recover(p, v)
  19705. } else {
  19706. panic(err)
  19707. }
  19708. }
  19709. }()
  19710. p.SetState(1959)
  19711. p.GetErrorHandler().Sync(p)
  19712. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 292, p.GetParserRuleContext()) {
  19713. case 1:
  19714. p.EnterOuterAlt(localctx, 1)
  19715. {
  19716. p.SetState(1949)
  19717. p.expr(0)
  19718. }
  19719. {
  19720. p.SetState(1950)
  19721. p.Match(SQLiteParserPRECEDING_)
  19722. }
  19723. case 2:
  19724. p.EnterOuterAlt(localctx, 2)
  19725. {
  19726. p.SetState(1952)
  19727. p.expr(0)
  19728. }
  19729. {
  19730. p.SetState(1953)
  19731. p.Match(SQLiteParserFOLLOWING_)
  19732. }
  19733. case 3:
  19734. p.EnterOuterAlt(localctx, 3)
  19735. {
  19736. p.SetState(1955)
  19737. p.Match(SQLiteParserCURRENT_)
  19738. }
  19739. {
  19740. p.SetState(1956)
  19741. p.Match(SQLiteParserROW_)
  19742. }
  19743. case 4:
  19744. p.EnterOuterAlt(localctx, 4)
  19745. {
  19746. p.SetState(1957)
  19747. p.Match(SQLiteParserUNBOUNDED_)
  19748. }
  19749. {
  19750. p.SetState(1958)
  19751. p.Match(SQLiteParserFOLLOWING_)
  19752. }
  19753. }
  19754. return localctx
  19755. }
  19756. // IFrame_singleContext is an interface to support dynamic dispatch.
  19757. type IFrame_singleContext interface {
  19758. antlr.ParserRuleContext
  19759. // GetParser returns the parser.
  19760. GetParser() antlr.Parser
  19761. // Getter signatures
  19762. Expr() IExprContext
  19763. PRECEDING_() antlr.TerminalNode
  19764. UNBOUNDED_() antlr.TerminalNode
  19765. CURRENT_() antlr.TerminalNode
  19766. ROW_() antlr.TerminalNode
  19767. // IsFrame_singleContext differentiates from other interfaces.
  19768. IsFrame_singleContext()
  19769. }
  19770. type Frame_singleContext struct {
  19771. *antlr.BaseParserRuleContext
  19772. parser antlr.Parser
  19773. }
  19774. func NewEmptyFrame_singleContext() *Frame_singleContext {
  19775. var p = new(Frame_singleContext)
  19776. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  19777. p.RuleIndex = SQLiteParserRULE_frame_single
  19778. return p
  19779. }
  19780. func (*Frame_singleContext) IsFrame_singleContext() {}
  19781. func NewFrame_singleContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Frame_singleContext {
  19782. var p = new(Frame_singleContext)
  19783. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  19784. p.parser = parser
  19785. p.RuleIndex = SQLiteParserRULE_frame_single
  19786. return p
  19787. }
  19788. func (s *Frame_singleContext) GetParser() antlr.Parser { return s.parser }
  19789. func (s *Frame_singleContext) Expr() IExprContext {
  19790. var t antlr.RuleContext
  19791. for _, ctx := range s.GetChildren() {
  19792. if _, ok := ctx.(IExprContext); ok {
  19793. t = ctx.(antlr.RuleContext)
  19794. break
  19795. }
  19796. }
  19797. if t == nil {
  19798. return nil
  19799. }
  19800. return t.(IExprContext)
  19801. }
  19802. func (s *Frame_singleContext) PRECEDING_() antlr.TerminalNode {
  19803. return s.GetToken(SQLiteParserPRECEDING_, 0)
  19804. }
  19805. func (s *Frame_singleContext) UNBOUNDED_() antlr.TerminalNode {
  19806. return s.GetToken(SQLiteParserUNBOUNDED_, 0)
  19807. }
  19808. func (s *Frame_singleContext) CURRENT_() antlr.TerminalNode {
  19809. return s.GetToken(SQLiteParserCURRENT_, 0)
  19810. }
  19811. func (s *Frame_singleContext) ROW_() antlr.TerminalNode {
  19812. return s.GetToken(SQLiteParserROW_, 0)
  19813. }
  19814. func (s *Frame_singleContext) GetRuleContext() antlr.RuleContext {
  19815. return s
  19816. }
  19817. func (s *Frame_singleContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  19818. return antlr.TreesStringTree(s, ruleNames, recog)
  19819. }
  19820. func (s *Frame_singleContext) EnterRule(listener antlr.ParseTreeListener) {
  19821. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19822. listenerT.EnterFrame_single(s)
  19823. }
  19824. }
  19825. func (s *Frame_singleContext) ExitRule(listener antlr.ParseTreeListener) {
  19826. if listenerT, ok := listener.(SQLiteParserListener); ok {
  19827. listenerT.ExitFrame_single(s)
  19828. }
  19829. }
  19830. func (p *SQLiteParser) Frame_single() (localctx IFrame_singleContext) {
  19831. this := p
  19832. _ = this
  19833. localctx = NewFrame_singleContext(p, p.GetParserRuleContext(), p.GetState())
  19834. p.EnterRule(localctx, 146, SQLiteParserRULE_frame_single)
  19835. defer func() {
  19836. p.ExitRule()
  19837. }()
  19838. defer func() {
  19839. if err := recover(); err != nil {
  19840. if v, ok := err.(antlr.RecognitionException); ok {
  19841. localctx.SetException(v)
  19842. p.GetErrorHandler().ReportError(p, v)
  19843. p.GetErrorHandler().Recover(p, v)
  19844. } else {
  19845. panic(err)
  19846. }
  19847. }
  19848. }()
  19849. p.SetState(1968)
  19850. p.GetErrorHandler().Sync(p)
  19851. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 293, p.GetParserRuleContext()) {
  19852. case 1:
  19853. p.EnterOuterAlt(localctx, 1)
  19854. {
  19855. p.SetState(1961)
  19856. p.expr(0)
  19857. }
  19858. {
  19859. p.SetState(1962)
  19860. p.Match(SQLiteParserPRECEDING_)
  19861. }
  19862. case 2:
  19863. p.EnterOuterAlt(localctx, 2)
  19864. {
  19865. p.SetState(1964)
  19866. p.Match(SQLiteParserUNBOUNDED_)
  19867. }
  19868. {
  19869. p.SetState(1965)
  19870. p.Match(SQLiteParserPRECEDING_)
  19871. }
  19872. case 3:
  19873. p.EnterOuterAlt(localctx, 3)
  19874. {
  19875. p.SetState(1966)
  19876. p.Match(SQLiteParserCURRENT_)
  19877. }
  19878. {
  19879. p.SetState(1967)
  19880. p.Match(SQLiteParserROW_)
  19881. }
  19882. }
  19883. return localctx
  19884. }
  19885. // IWindow_functionContext is an interface to support dynamic dispatch.
  19886. type IWindow_functionContext interface {
  19887. antlr.ParserRuleContext
  19888. // GetParser returns the parser.
  19889. GetParser() antlr.Parser
  19890. // Getter signatures
  19891. AllOPEN_PAR() []antlr.TerminalNode
  19892. OPEN_PAR(i int) antlr.TerminalNode
  19893. Expr() IExprContext
  19894. AllCLOSE_PAR() []antlr.TerminalNode
  19895. CLOSE_PAR(i int) antlr.TerminalNode
  19896. OVER_() antlr.TerminalNode
  19897. Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext
  19898. FIRST_VALUE_() antlr.TerminalNode
  19899. LAST_VALUE_() antlr.TerminalNode
  19900. Partition_by() IPartition_byContext
  19901. Frame_clause() IFrame_clauseContext
  19902. CUME_DIST_() antlr.TerminalNode
  19903. PERCENT_RANK_() antlr.TerminalNode
  19904. Order_by_expr() IOrder_by_exprContext
  19905. DENSE_RANK_() antlr.TerminalNode
  19906. RANK_() antlr.TerminalNode
  19907. ROW_NUMBER_() antlr.TerminalNode
  19908. LAG_() antlr.TerminalNode
  19909. LEAD_() antlr.TerminalNode
  19910. Of_OF_fset() IOf_OF_fsetContext
  19911. Default_DEFAULT__value() IDefault_DEFAULT__valueContext
  19912. NTH_VALUE_() antlr.TerminalNode
  19913. COMMA() antlr.TerminalNode
  19914. Signed_number() ISigned_numberContext
  19915. NTILE_() antlr.TerminalNode
  19916. // IsWindow_functionContext differentiates from other interfaces.
  19917. IsWindow_functionContext()
  19918. }
  19919. type Window_functionContext struct {
  19920. *antlr.BaseParserRuleContext
  19921. parser antlr.Parser
  19922. }
  19923. func NewEmptyWindow_functionContext() *Window_functionContext {
  19924. var p = new(Window_functionContext)
  19925. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  19926. p.RuleIndex = SQLiteParserRULE_window_function
  19927. return p
  19928. }
  19929. func (*Window_functionContext) IsWindow_functionContext() {}
  19930. func NewWindow_functionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_functionContext {
  19931. var p = new(Window_functionContext)
  19932. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  19933. p.parser = parser
  19934. p.RuleIndex = SQLiteParserRULE_window_function
  19935. return p
  19936. }
  19937. func (s *Window_functionContext) GetParser() antlr.Parser { return s.parser }
  19938. func (s *Window_functionContext) AllOPEN_PAR() []antlr.TerminalNode {
  19939. return s.GetTokens(SQLiteParserOPEN_PAR)
  19940. }
  19941. func (s *Window_functionContext) OPEN_PAR(i int) antlr.TerminalNode {
  19942. return s.GetToken(SQLiteParserOPEN_PAR, i)
  19943. }
  19944. func (s *Window_functionContext) Expr() IExprContext {
  19945. var t antlr.RuleContext
  19946. for _, ctx := range s.GetChildren() {
  19947. if _, ok := ctx.(IExprContext); ok {
  19948. t = ctx.(antlr.RuleContext)
  19949. break
  19950. }
  19951. }
  19952. if t == nil {
  19953. return nil
  19954. }
  19955. return t.(IExprContext)
  19956. }
  19957. func (s *Window_functionContext) AllCLOSE_PAR() []antlr.TerminalNode {
  19958. return s.GetTokens(SQLiteParserCLOSE_PAR)
  19959. }
  19960. func (s *Window_functionContext) CLOSE_PAR(i int) antlr.TerminalNode {
  19961. return s.GetToken(SQLiteParserCLOSE_PAR, i)
  19962. }
  19963. func (s *Window_functionContext) OVER_() antlr.TerminalNode {
  19964. return s.GetToken(SQLiteParserOVER_, 0)
  19965. }
  19966. func (s *Window_functionContext) Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext {
  19967. var t antlr.RuleContext
  19968. for _, ctx := range s.GetChildren() {
  19969. if _, ok := ctx.(IOrder_by_expr_asc_descContext); ok {
  19970. t = ctx.(antlr.RuleContext)
  19971. break
  19972. }
  19973. }
  19974. if t == nil {
  19975. return nil
  19976. }
  19977. return t.(IOrder_by_expr_asc_descContext)
  19978. }
  19979. func (s *Window_functionContext) FIRST_VALUE_() antlr.TerminalNode {
  19980. return s.GetToken(SQLiteParserFIRST_VALUE_, 0)
  19981. }
  19982. func (s *Window_functionContext) LAST_VALUE_() antlr.TerminalNode {
  19983. return s.GetToken(SQLiteParserLAST_VALUE_, 0)
  19984. }
  19985. func (s *Window_functionContext) Partition_by() IPartition_byContext {
  19986. var t antlr.RuleContext
  19987. for _, ctx := range s.GetChildren() {
  19988. if _, ok := ctx.(IPartition_byContext); ok {
  19989. t = ctx.(antlr.RuleContext)
  19990. break
  19991. }
  19992. }
  19993. if t == nil {
  19994. return nil
  19995. }
  19996. return t.(IPartition_byContext)
  19997. }
  19998. func (s *Window_functionContext) Frame_clause() IFrame_clauseContext {
  19999. var t antlr.RuleContext
  20000. for _, ctx := range s.GetChildren() {
  20001. if _, ok := ctx.(IFrame_clauseContext); ok {
  20002. t = ctx.(antlr.RuleContext)
  20003. break
  20004. }
  20005. }
  20006. if t == nil {
  20007. return nil
  20008. }
  20009. return t.(IFrame_clauseContext)
  20010. }
  20011. func (s *Window_functionContext) CUME_DIST_() antlr.TerminalNode {
  20012. return s.GetToken(SQLiteParserCUME_DIST_, 0)
  20013. }
  20014. func (s *Window_functionContext) PERCENT_RANK_() antlr.TerminalNode {
  20015. return s.GetToken(SQLiteParserPERCENT_RANK_, 0)
  20016. }
  20017. func (s *Window_functionContext) Order_by_expr() IOrder_by_exprContext {
  20018. var t antlr.RuleContext
  20019. for _, ctx := range s.GetChildren() {
  20020. if _, ok := ctx.(IOrder_by_exprContext); ok {
  20021. t = ctx.(antlr.RuleContext)
  20022. break
  20023. }
  20024. }
  20025. if t == nil {
  20026. return nil
  20027. }
  20028. return t.(IOrder_by_exprContext)
  20029. }
  20030. func (s *Window_functionContext) DENSE_RANK_() antlr.TerminalNode {
  20031. return s.GetToken(SQLiteParserDENSE_RANK_, 0)
  20032. }
  20033. func (s *Window_functionContext) RANK_() antlr.TerminalNode {
  20034. return s.GetToken(SQLiteParserRANK_, 0)
  20035. }
  20036. func (s *Window_functionContext) ROW_NUMBER_() antlr.TerminalNode {
  20037. return s.GetToken(SQLiteParserROW_NUMBER_, 0)
  20038. }
  20039. func (s *Window_functionContext) LAG_() antlr.TerminalNode {
  20040. return s.GetToken(SQLiteParserLAG_, 0)
  20041. }
  20042. func (s *Window_functionContext) LEAD_() antlr.TerminalNode {
  20043. return s.GetToken(SQLiteParserLEAD_, 0)
  20044. }
  20045. func (s *Window_functionContext) Of_OF_fset() IOf_OF_fsetContext {
  20046. var t antlr.RuleContext
  20047. for _, ctx := range s.GetChildren() {
  20048. if _, ok := ctx.(IOf_OF_fsetContext); ok {
  20049. t = ctx.(antlr.RuleContext)
  20050. break
  20051. }
  20052. }
  20053. if t == nil {
  20054. return nil
  20055. }
  20056. return t.(IOf_OF_fsetContext)
  20057. }
  20058. func (s *Window_functionContext) Default_DEFAULT__value() IDefault_DEFAULT__valueContext {
  20059. var t antlr.RuleContext
  20060. for _, ctx := range s.GetChildren() {
  20061. if _, ok := ctx.(IDefault_DEFAULT__valueContext); ok {
  20062. t = ctx.(antlr.RuleContext)
  20063. break
  20064. }
  20065. }
  20066. if t == nil {
  20067. return nil
  20068. }
  20069. return t.(IDefault_DEFAULT__valueContext)
  20070. }
  20071. func (s *Window_functionContext) NTH_VALUE_() antlr.TerminalNode {
  20072. return s.GetToken(SQLiteParserNTH_VALUE_, 0)
  20073. }
  20074. func (s *Window_functionContext) COMMA() antlr.TerminalNode {
  20075. return s.GetToken(SQLiteParserCOMMA, 0)
  20076. }
  20077. func (s *Window_functionContext) Signed_number() ISigned_numberContext {
  20078. var t antlr.RuleContext
  20079. for _, ctx := range s.GetChildren() {
  20080. if _, ok := ctx.(ISigned_numberContext); ok {
  20081. t = ctx.(antlr.RuleContext)
  20082. break
  20083. }
  20084. }
  20085. if t == nil {
  20086. return nil
  20087. }
  20088. return t.(ISigned_numberContext)
  20089. }
  20090. func (s *Window_functionContext) NTILE_() antlr.TerminalNode {
  20091. return s.GetToken(SQLiteParserNTILE_, 0)
  20092. }
  20093. func (s *Window_functionContext) GetRuleContext() antlr.RuleContext {
  20094. return s
  20095. }
  20096. func (s *Window_functionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  20097. return antlr.TreesStringTree(s, ruleNames, recog)
  20098. }
  20099. func (s *Window_functionContext) EnterRule(listener antlr.ParseTreeListener) {
  20100. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20101. listenerT.EnterWindow_function(s)
  20102. }
  20103. }
  20104. func (s *Window_functionContext) ExitRule(listener antlr.ParseTreeListener) {
  20105. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20106. listenerT.ExitWindow_function(s)
  20107. }
  20108. }
  20109. func (p *SQLiteParser) Window_function() (localctx IWindow_functionContext) {
  20110. this := p
  20111. _ = this
  20112. localctx = NewWindow_functionContext(p, p.GetParserRuleContext(), p.GetState())
  20113. p.EnterRule(localctx, 148, SQLiteParserRULE_window_function)
  20114. var _la int
  20115. defer func() {
  20116. p.ExitRule()
  20117. }()
  20118. defer func() {
  20119. if err := recover(); err != nil {
  20120. if v, ok := err.(antlr.RecognitionException); ok {
  20121. localctx.SetException(v)
  20122. p.GetErrorHandler().ReportError(p, v)
  20123. p.GetErrorHandler().Recover(p, v)
  20124. } else {
  20125. panic(err)
  20126. }
  20127. }
  20128. }()
  20129. p.SetState(2055)
  20130. p.GetErrorHandler().Sync(p)
  20131. switch p.GetTokenStream().LA(1) {
  20132. case SQLiteParserFIRST_VALUE_, SQLiteParserLAST_VALUE_:
  20133. p.EnterOuterAlt(localctx, 1)
  20134. {
  20135. p.SetState(1970)
  20136. _la = p.GetTokenStream().LA(1)
  20137. if !(_la == SQLiteParserFIRST_VALUE_ || _la == SQLiteParserLAST_VALUE_) {
  20138. p.GetErrorHandler().RecoverInline(p)
  20139. } else {
  20140. p.GetErrorHandler().ReportMatch(p)
  20141. p.Consume()
  20142. }
  20143. }
  20144. {
  20145. p.SetState(1971)
  20146. p.Match(SQLiteParserOPEN_PAR)
  20147. }
  20148. {
  20149. p.SetState(1972)
  20150. p.expr(0)
  20151. }
  20152. {
  20153. p.SetState(1973)
  20154. p.Match(SQLiteParserCLOSE_PAR)
  20155. }
  20156. {
  20157. p.SetState(1974)
  20158. p.Match(SQLiteParserOVER_)
  20159. }
  20160. {
  20161. p.SetState(1975)
  20162. p.Match(SQLiteParserOPEN_PAR)
  20163. }
  20164. p.SetState(1977)
  20165. p.GetErrorHandler().Sync(p)
  20166. _la = p.GetTokenStream().LA(1)
  20167. if _la == SQLiteParserPARTITION_ {
  20168. {
  20169. p.SetState(1976)
  20170. p.Partition_by()
  20171. }
  20172. }
  20173. {
  20174. p.SetState(1979)
  20175. p.Order_by_expr_asc_desc()
  20176. }
  20177. p.SetState(1981)
  20178. p.GetErrorHandler().Sync(p)
  20179. _la = p.GetTokenStream().LA(1)
  20180. if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 {
  20181. {
  20182. p.SetState(1980)
  20183. p.Frame_clause()
  20184. }
  20185. }
  20186. {
  20187. p.SetState(1983)
  20188. p.Match(SQLiteParserCLOSE_PAR)
  20189. }
  20190. case SQLiteParserCUME_DIST_, SQLiteParserPERCENT_RANK_:
  20191. p.EnterOuterAlt(localctx, 2)
  20192. {
  20193. p.SetState(1985)
  20194. _la = p.GetTokenStream().LA(1)
  20195. if !(_la == SQLiteParserCUME_DIST_ || _la == SQLiteParserPERCENT_RANK_) {
  20196. p.GetErrorHandler().RecoverInline(p)
  20197. } else {
  20198. p.GetErrorHandler().ReportMatch(p)
  20199. p.Consume()
  20200. }
  20201. }
  20202. {
  20203. p.SetState(1986)
  20204. p.Match(SQLiteParserOPEN_PAR)
  20205. }
  20206. {
  20207. p.SetState(1987)
  20208. p.Match(SQLiteParserCLOSE_PAR)
  20209. }
  20210. {
  20211. p.SetState(1988)
  20212. p.Match(SQLiteParserOVER_)
  20213. }
  20214. {
  20215. p.SetState(1989)
  20216. p.Match(SQLiteParserOPEN_PAR)
  20217. }
  20218. p.SetState(1991)
  20219. p.GetErrorHandler().Sync(p)
  20220. _la = p.GetTokenStream().LA(1)
  20221. if _la == SQLiteParserPARTITION_ {
  20222. {
  20223. p.SetState(1990)
  20224. p.Partition_by()
  20225. }
  20226. }
  20227. p.SetState(1994)
  20228. p.GetErrorHandler().Sync(p)
  20229. _la = p.GetTokenStream().LA(1)
  20230. if _la == SQLiteParserORDER_ {
  20231. {
  20232. p.SetState(1993)
  20233. p.Order_by_expr()
  20234. }
  20235. }
  20236. {
  20237. p.SetState(1996)
  20238. p.Match(SQLiteParserCLOSE_PAR)
  20239. }
  20240. case SQLiteParserDENSE_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_:
  20241. p.EnterOuterAlt(localctx, 3)
  20242. {
  20243. p.SetState(1997)
  20244. _la = p.GetTokenStream().LA(1)
  20245. if !((int64((_la-163)) & ^0x3f) == 0 && ((int64(1)<<(_la-163))&385) != 0) {
  20246. p.GetErrorHandler().RecoverInline(p)
  20247. } else {
  20248. p.GetErrorHandler().ReportMatch(p)
  20249. p.Consume()
  20250. }
  20251. }
  20252. {
  20253. p.SetState(1998)
  20254. p.Match(SQLiteParserOPEN_PAR)
  20255. }
  20256. {
  20257. p.SetState(1999)
  20258. p.Match(SQLiteParserCLOSE_PAR)
  20259. }
  20260. {
  20261. p.SetState(2000)
  20262. p.Match(SQLiteParserOVER_)
  20263. }
  20264. {
  20265. p.SetState(2001)
  20266. p.Match(SQLiteParserOPEN_PAR)
  20267. }
  20268. p.SetState(2003)
  20269. p.GetErrorHandler().Sync(p)
  20270. _la = p.GetTokenStream().LA(1)
  20271. if _la == SQLiteParserPARTITION_ {
  20272. {
  20273. p.SetState(2002)
  20274. p.Partition_by()
  20275. }
  20276. }
  20277. {
  20278. p.SetState(2005)
  20279. p.Order_by_expr_asc_desc()
  20280. }
  20281. {
  20282. p.SetState(2006)
  20283. p.Match(SQLiteParserCLOSE_PAR)
  20284. }
  20285. case SQLiteParserLAG_, SQLiteParserLEAD_:
  20286. p.EnterOuterAlt(localctx, 4)
  20287. {
  20288. p.SetState(2008)
  20289. _la = p.GetTokenStream().LA(1)
  20290. if !(_la == SQLiteParserLAG_ || _la == SQLiteParserLEAD_) {
  20291. p.GetErrorHandler().RecoverInline(p)
  20292. } else {
  20293. p.GetErrorHandler().ReportMatch(p)
  20294. p.Consume()
  20295. }
  20296. }
  20297. {
  20298. p.SetState(2009)
  20299. p.Match(SQLiteParserOPEN_PAR)
  20300. }
  20301. {
  20302. p.SetState(2010)
  20303. p.expr(0)
  20304. }
  20305. p.SetState(2012)
  20306. p.GetErrorHandler().Sync(p)
  20307. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 299, p.GetParserRuleContext()) == 1 {
  20308. {
  20309. p.SetState(2011)
  20310. p.Of_OF_fset()
  20311. }
  20312. }
  20313. p.SetState(2015)
  20314. p.GetErrorHandler().Sync(p)
  20315. _la = p.GetTokenStream().LA(1)
  20316. if _la == SQLiteParserCOMMA {
  20317. {
  20318. p.SetState(2014)
  20319. p.Default_DEFAULT__value()
  20320. }
  20321. }
  20322. {
  20323. p.SetState(2017)
  20324. p.Match(SQLiteParserCLOSE_PAR)
  20325. }
  20326. {
  20327. p.SetState(2018)
  20328. p.Match(SQLiteParserOVER_)
  20329. }
  20330. {
  20331. p.SetState(2019)
  20332. p.Match(SQLiteParserOPEN_PAR)
  20333. }
  20334. p.SetState(2021)
  20335. p.GetErrorHandler().Sync(p)
  20336. _la = p.GetTokenStream().LA(1)
  20337. if _la == SQLiteParserPARTITION_ {
  20338. {
  20339. p.SetState(2020)
  20340. p.Partition_by()
  20341. }
  20342. }
  20343. {
  20344. p.SetState(2023)
  20345. p.Order_by_expr_asc_desc()
  20346. }
  20347. {
  20348. p.SetState(2024)
  20349. p.Match(SQLiteParserCLOSE_PAR)
  20350. }
  20351. case SQLiteParserNTH_VALUE_:
  20352. p.EnterOuterAlt(localctx, 5)
  20353. {
  20354. p.SetState(2026)
  20355. p.Match(SQLiteParserNTH_VALUE_)
  20356. }
  20357. {
  20358. p.SetState(2027)
  20359. p.Match(SQLiteParserOPEN_PAR)
  20360. }
  20361. {
  20362. p.SetState(2028)
  20363. p.expr(0)
  20364. }
  20365. {
  20366. p.SetState(2029)
  20367. p.Match(SQLiteParserCOMMA)
  20368. }
  20369. {
  20370. p.SetState(2030)
  20371. p.Signed_number()
  20372. }
  20373. {
  20374. p.SetState(2031)
  20375. p.Match(SQLiteParserCLOSE_PAR)
  20376. }
  20377. {
  20378. p.SetState(2032)
  20379. p.Match(SQLiteParserOVER_)
  20380. }
  20381. {
  20382. p.SetState(2033)
  20383. p.Match(SQLiteParserOPEN_PAR)
  20384. }
  20385. p.SetState(2035)
  20386. p.GetErrorHandler().Sync(p)
  20387. _la = p.GetTokenStream().LA(1)
  20388. if _la == SQLiteParserPARTITION_ {
  20389. {
  20390. p.SetState(2034)
  20391. p.Partition_by()
  20392. }
  20393. }
  20394. {
  20395. p.SetState(2037)
  20396. p.Order_by_expr_asc_desc()
  20397. }
  20398. p.SetState(2039)
  20399. p.GetErrorHandler().Sync(p)
  20400. _la = p.GetTokenStream().LA(1)
  20401. if (int64((_la-130)) & ^0x3f) == 0 && ((int64(1)<<(_la-130))&4503599761588225) != 0 {
  20402. {
  20403. p.SetState(2038)
  20404. p.Frame_clause()
  20405. }
  20406. }
  20407. {
  20408. p.SetState(2041)
  20409. p.Match(SQLiteParserCLOSE_PAR)
  20410. }
  20411. case SQLiteParserNTILE_:
  20412. p.EnterOuterAlt(localctx, 6)
  20413. {
  20414. p.SetState(2043)
  20415. p.Match(SQLiteParserNTILE_)
  20416. }
  20417. {
  20418. p.SetState(2044)
  20419. p.Match(SQLiteParserOPEN_PAR)
  20420. }
  20421. {
  20422. p.SetState(2045)
  20423. p.expr(0)
  20424. }
  20425. {
  20426. p.SetState(2046)
  20427. p.Match(SQLiteParserCLOSE_PAR)
  20428. }
  20429. {
  20430. p.SetState(2047)
  20431. p.Match(SQLiteParserOVER_)
  20432. }
  20433. {
  20434. p.SetState(2048)
  20435. p.Match(SQLiteParserOPEN_PAR)
  20436. }
  20437. p.SetState(2050)
  20438. p.GetErrorHandler().Sync(p)
  20439. _la = p.GetTokenStream().LA(1)
  20440. if _la == SQLiteParserPARTITION_ {
  20441. {
  20442. p.SetState(2049)
  20443. p.Partition_by()
  20444. }
  20445. }
  20446. {
  20447. p.SetState(2052)
  20448. p.Order_by_expr_asc_desc()
  20449. }
  20450. {
  20451. p.SetState(2053)
  20452. p.Match(SQLiteParserCLOSE_PAR)
  20453. }
  20454. default:
  20455. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  20456. }
  20457. return localctx
  20458. }
  20459. // IOf_OF_fsetContext is an interface to support dynamic dispatch.
  20460. type IOf_OF_fsetContext interface {
  20461. antlr.ParserRuleContext
  20462. // GetParser returns the parser.
  20463. GetParser() antlr.Parser
  20464. // Getter signatures
  20465. COMMA() antlr.TerminalNode
  20466. Signed_number() ISigned_numberContext
  20467. // IsOf_OF_fsetContext differentiates from other interfaces.
  20468. IsOf_OF_fsetContext()
  20469. }
  20470. type Of_OF_fsetContext struct {
  20471. *antlr.BaseParserRuleContext
  20472. parser antlr.Parser
  20473. }
  20474. func NewEmptyOf_OF_fsetContext() *Of_OF_fsetContext {
  20475. var p = new(Of_OF_fsetContext)
  20476. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  20477. p.RuleIndex = SQLiteParserRULE_of_OF_fset
  20478. return p
  20479. }
  20480. func (*Of_OF_fsetContext) IsOf_OF_fsetContext() {}
  20481. func NewOf_OF_fsetContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Of_OF_fsetContext {
  20482. var p = new(Of_OF_fsetContext)
  20483. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  20484. p.parser = parser
  20485. p.RuleIndex = SQLiteParserRULE_of_OF_fset
  20486. return p
  20487. }
  20488. func (s *Of_OF_fsetContext) GetParser() antlr.Parser { return s.parser }
  20489. func (s *Of_OF_fsetContext) COMMA() antlr.TerminalNode {
  20490. return s.GetToken(SQLiteParserCOMMA, 0)
  20491. }
  20492. func (s *Of_OF_fsetContext) Signed_number() ISigned_numberContext {
  20493. var t antlr.RuleContext
  20494. for _, ctx := range s.GetChildren() {
  20495. if _, ok := ctx.(ISigned_numberContext); ok {
  20496. t = ctx.(antlr.RuleContext)
  20497. break
  20498. }
  20499. }
  20500. if t == nil {
  20501. return nil
  20502. }
  20503. return t.(ISigned_numberContext)
  20504. }
  20505. func (s *Of_OF_fsetContext) GetRuleContext() antlr.RuleContext {
  20506. return s
  20507. }
  20508. func (s *Of_OF_fsetContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  20509. return antlr.TreesStringTree(s, ruleNames, recog)
  20510. }
  20511. func (s *Of_OF_fsetContext) EnterRule(listener antlr.ParseTreeListener) {
  20512. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20513. listenerT.EnterOf_OF_fset(s)
  20514. }
  20515. }
  20516. func (s *Of_OF_fsetContext) ExitRule(listener antlr.ParseTreeListener) {
  20517. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20518. listenerT.ExitOf_OF_fset(s)
  20519. }
  20520. }
  20521. func (p *SQLiteParser) Of_OF_fset() (localctx IOf_OF_fsetContext) {
  20522. this := p
  20523. _ = this
  20524. localctx = NewOf_OF_fsetContext(p, p.GetParserRuleContext(), p.GetState())
  20525. p.EnterRule(localctx, 150, SQLiteParserRULE_of_OF_fset)
  20526. defer func() {
  20527. p.ExitRule()
  20528. }()
  20529. defer func() {
  20530. if err := recover(); err != nil {
  20531. if v, ok := err.(antlr.RecognitionException); ok {
  20532. localctx.SetException(v)
  20533. p.GetErrorHandler().ReportError(p, v)
  20534. p.GetErrorHandler().Recover(p, v)
  20535. } else {
  20536. panic(err)
  20537. }
  20538. }
  20539. }()
  20540. p.EnterOuterAlt(localctx, 1)
  20541. {
  20542. p.SetState(2057)
  20543. p.Match(SQLiteParserCOMMA)
  20544. }
  20545. {
  20546. p.SetState(2058)
  20547. p.Signed_number()
  20548. }
  20549. return localctx
  20550. }
  20551. // IDefault_DEFAULT__valueContext is an interface to support dynamic dispatch.
  20552. type IDefault_DEFAULT__valueContext interface {
  20553. antlr.ParserRuleContext
  20554. // GetParser returns the parser.
  20555. GetParser() antlr.Parser
  20556. // Getter signatures
  20557. COMMA() antlr.TerminalNode
  20558. Signed_number() ISigned_numberContext
  20559. // IsDefault_DEFAULT__valueContext differentiates from other interfaces.
  20560. IsDefault_DEFAULT__valueContext()
  20561. }
  20562. type Default_DEFAULT__valueContext struct {
  20563. *antlr.BaseParserRuleContext
  20564. parser antlr.Parser
  20565. }
  20566. func NewEmptyDefault_DEFAULT__valueContext() *Default_DEFAULT__valueContext {
  20567. var p = new(Default_DEFAULT__valueContext)
  20568. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  20569. p.RuleIndex = SQLiteParserRULE_default_DEFAULT__value
  20570. return p
  20571. }
  20572. func (*Default_DEFAULT__valueContext) IsDefault_DEFAULT__valueContext() {}
  20573. func NewDefault_DEFAULT__valueContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Default_DEFAULT__valueContext {
  20574. var p = new(Default_DEFAULT__valueContext)
  20575. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  20576. p.parser = parser
  20577. p.RuleIndex = SQLiteParserRULE_default_DEFAULT__value
  20578. return p
  20579. }
  20580. func (s *Default_DEFAULT__valueContext) GetParser() antlr.Parser { return s.parser }
  20581. func (s *Default_DEFAULT__valueContext) COMMA() antlr.TerminalNode {
  20582. return s.GetToken(SQLiteParserCOMMA, 0)
  20583. }
  20584. func (s *Default_DEFAULT__valueContext) Signed_number() ISigned_numberContext {
  20585. var t antlr.RuleContext
  20586. for _, ctx := range s.GetChildren() {
  20587. if _, ok := ctx.(ISigned_numberContext); ok {
  20588. t = ctx.(antlr.RuleContext)
  20589. break
  20590. }
  20591. }
  20592. if t == nil {
  20593. return nil
  20594. }
  20595. return t.(ISigned_numberContext)
  20596. }
  20597. func (s *Default_DEFAULT__valueContext) GetRuleContext() antlr.RuleContext {
  20598. return s
  20599. }
  20600. func (s *Default_DEFAULT__valueContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  20601. return antlr.TreesStringTree(s, ruleNames, recog)
  20602. }
  20603. func (s *Default_DEFAULT__valueContext) EnterRule(listener antlr.ParseTreeListener) {
  20604. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20605. listenerT.EnterDefault_DEFAULT__value(s)
  20606. }
  20607. }
  20608. func (s *Default_DEFAULT__valueContext) ExitRule(listener antlr.ParseTreeListener) {
  20609. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20610. listenerT.ExitDefault_DEFAULT__value(s)
  20611. }
  20612. }
  20613. func (p *SQLiteParser) Default_DEFAULT__value() (localctx IDefault_DEFAULT__valueContext) {
  20614. this := p
  20615. _ = this
  20616. localctx = NewDefault_DEFAULT__valueContext(p, p.GetParserRuleContext(), p.GetState())
  20617. p.EnterRule(localctx, 152, SQLiteParserRULE_default_DEFAULT__value)
  20618. defer func() {
  20619. p.ExitRule()
  20620. }()
  20621. defer func() {
  20622. if err := recover(); err != nil {
  20623. if v, ok := err.(antlr.RecognitionException); ok {
  20624. localctx.SetException(v)
  20625. p.GetErrorHandler().ReportError(p, v)
  20626. p.GetErrorHandler().Recover(p, v)
  20627. } else {
  20628. panic(err)
  20629. }
  20630. }
  20631. }()
  20632. p.EnterOuterAlt(localctx, 1)
  20633. {
  20634. p.SetState(2060)
  20635. p.Match(SQLiteParserCOMMA)
  20636. }
  20637. {
  20638. p.SetState(2061)
  20639. p.Signed_number()
  20640. }
  20641. return localctx
  20642. }
  20643. // IPartition_byContext is an interface to support dynamic dispatch.
  20644. type IPartition_byContext interface {
  20645. antlr.ParserRuleContext
  20646. // GetParser returns the parser.
  20647. GetParser() antlr.Parser
  20648. // Getter signatures
  20649. PARTITION_() antlr.TerminalNode
  20650. BY_() antlr.TerminalNode
  20651. AllExpr() []IExprContext
  20652. Expr(i int) IExprContext
  20653. // IsPartition_byContext differentiates from other interfaces.
  20654. IsPartition_byContext()
  20655. }
  20656. type Partition_byContext struct {
  20657. *antlr.BaseParserRuleContext
  20658. parser antlr.Parser
  20659. }
  20660. func NewEmptyPartition_byContext() *Partition_byContext {
  20661. var p = new(Partition_byContext)
  20662. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  20663. p.RuleIndex = SQLiteParserRULE_partition_by
  20664. return p
  20665. }
  20666. func (*Partition_byContext) IsPartition_byContext() {}
  20667. func NewPartition_byContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Partition_byContext {
  20668. var p = new(Partition_byContext)
  20669. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  20670. p.parser = parser
  20671. p.RuleIndex = SQLiteParserRULE_partition_by
  20672. return p
  20673. }
  20674. func (s *Partition_byContext) GetParser() antlr.Parser { return s.parser }
  20675. func (s *Partition_byContext) PARTITION_() antlr.TerminalNode {
  20676. return s.GetToken(SQLiteParserPARTITION_, 0)
  20677. }
  20678. func (s *Partition_byContext) BY_() antlr.TerminalNode {
  20679. return s.GetToken(SQLiteParserBY_, 0)
  20680. }
  20681. func (s *Partition_byContext) AllExpr() []IExprContext {
  20682. children := s.GetChildren()
  20683. len := 0
  20684. for _, ctx := range children {
  20685. if _, ok := ctx.(IExprContext); ok {
  20686. len++
  20687. }
  20688. }
  20689. tst := make([]IExprContext, len)
  20690. i := 0
  20691. for _, ctx := range children {
  20692. if t, ok := ctx.(IExprContext); ok {
  20693. tst[i] = t.(IExprContext)
  20694. i++
  20695. }
  20696. }
  20697. return tst
  20698. }
  20699. func (s *Partition_byContext) Expr(i int) IExprContext {
  20700. var t antlr.RuleContext
  20701. j := 0
  20702. for _, ctx := range s.GetChildren() {
  20703. if _, ok := ctx.(IExprContext); ok {
  20704. if j == i {
  20705. t = ctx.(antlr.RuleContext)
  20706. break
  20707. }
  20708. j++
  20709. }
  20710. }
  20711. if t == nil {
  20712. return nil
  20713. }
  20714. return t.(IExprContext)
  20715. }
  20716. func (s *Partition_byContext) GetRuleContext() antlr.RuleContext {
  20717. return s
  20718. }
  20719. func (s *Partition_byContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  20720. return antlr.TreesStringTree(s, ruleNames, recog)
  20721. }
  20722. func (s *Partition_byContext) EnterRule(listener antlr.ParseTreeListener) {
  20723. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20724. listenerT.EnterPartition_by(s)
  20725. }
  20726. }
  20727. func (s *Partition_byContext) ExitRule(listener antlr.ParseTreeListener) {
  20728. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20729. listenerT.ExitPartition_by(s)
  20730. }
  20731. }
  20732. func (p *SQLiteParser) Partition_by() (localctx IPartition_byContext) {
  20733. this := p
  20734. _ = this
  20735. localctx = NewPartition_byContext(p, p.GetParserRuleContext(), p.GetState())
  20736. p.EnterRule(localctx, 154, SQLiteParserRULE_partition_by)
  20737. defer func() {
  20738. p.ExitRule()
  20739. }()
  20740. defer func() {
  20741. if err := recover(); err != nil {
  20742. if v, ok := err.(antlr.RecognitionException); ok {
  20743. localctx.SetException(v)
  20744. p.GetErrorHandler().ReportError(p, v)
  20745. p.GetErrorHandler().Recover(p, v)
  20746. } else {
  20747. panic(err)
  20748. }
  20749. }
  20750. }()
  20751. var _alt int
  20752. p.EnterOuterAlt(localctx, 1)
  20753. {
  20754. p.SetState(2063)
  20755. p.Match(SQLiteParserPARTITION_)
  20756. }
  20757. {
  20758. p.SetState(2064)
  20759. p.Match(SQLiteParserBY_)
  20760. }
  20761. p.SetState(2066)
  20762. p.GetErrorHandler().Sync(p)
  20763. _alt = 1
  20764. for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
  20765. switch _alt {
  20766. case 1:
  20767. {
  20768. p.SetState(2065)
  20769. p.expr(0)
  20770. }
  20771. default:
  20772. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  20773. }
  20774. p.SetState(2068)
  20775. p.GetErrorHandler().Sync(p)
  20776. _alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 306, p.GetParserRuleContext())
  20777. }
  20778. return localctx
  20779. }
  20780. // IOrder_by_exprContext is an interface to support dynamic dispatch.
  20781. type IOrder_by_exprContext interface {
  20782. antlr.ParserRuleContext
  20783. // GetParser returns the parser.
  20784. GetParser() antlr.Parser
  20785. // Getter signatures
  20786. ORDER_() antlr.TerminalNode
  20787. BY_() antlr.TerminalNode
  20788. AllExpr() []IExprContext
  20789. Expr(i int) IExprContext
  20790. // IsOrder_by_exprContext differentiates from other interfaces.
  20791. IsOrder_by_exprContext()
  20792. }
  20793. type Order_by_exprContext struct {
  20794. *antlr.BaseParserRuleContext
  20795. parser antlr.Parser
  20796. }
  20797. func NewEmptyOrder_by_exprContext() *Order_by_exprContext {
  20798. var p = new(Order_by_exprContext)
  20799. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  20800. p.RuleIndex = SQLiteParserRULE_order_by_expr
  20801. return p
  20802. }
  20803. func (*Order_by_exprContext) IsOrder_by_exprContext() {}
  20804. func NewOrder_by_exprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_exprContext {
  20805. var p = new(Order_by_exprContext)
  20806. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  20807. p.parser = parser
  20808. p.RuleIndex = SQLiteParserRULE_order_by_expr
  20809. return p
  20810. }
  20811. func (s *Order_by_exprContext) GetParser() antlr.Parser { return s.parser }
  20812. func (s *Order_by_exprContext) ORDER_() antlr.TerminalNode {
  20813. return s.GetToken(SQLiteParserORDER_, 0)
  20814. }
  20815. func (s *Order_by_exprContext) BY_() antlr.TerminalNode {
  20816. return s.GetToken(SQLiteParserBY_, 0)
  20817. }
  20818. func (s *Order_by_exprContext) AllExpr() []IExprContext {
  20819. children := s.GetChildren()
  20820. len := 0
  20821. for _, ctx := range children {
  20822. if _, ok := ctx.(IExprContext); ok {
  20823. len++
  20824. }
  20825. }
  20826. tst := make([]IExprContext, len)
  20827. i := 0
  20828. for _, ctx := range children {
  20829. if t, ok := ctx.(IExprContext); ok {
  20830. tst[i] = t.(IExprContext)
  20831. i++
  20832. }
  20833. }
  20834. return tst
  20835. }
  20836. func (s *Order_by_exprContext) Expr(i int) IExprContext {
  20837. var t antlr.RuleContext
  20838. j := 0
  20839. for _, ctx := range s.GetChildren() {
  20840. if _, ok := ctx.(IExprContext); ok {
  20841. if j == i {
  20842. t = ctx.(antlr.RuleContext)
  20843. break
  20844. }
  20845. j++
  20846. }
  20847. }
  20848. if t == nil {
  20849. return nil
  20850. }
  20851. return t.(IExprContext)
  20852. }
  20853. func (s *Order_by_exprContext) GetRuleContext() antlr.RuleContext {
  20854. return s
  20855. }
  20856. func (s *Order_by_exprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  20857. return antlr.TreesStringTree(s, ruleNames, recog)
  20858. }
  20859. func (s *Order_by_exprContext) EnterRule(listener antlr.ParseTreeListener) {
  20860. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20861. listenerT.EnterOrder_by_expr(s)
  20862. }
  20863. }
  20864. func (s *Order_by_exprContext) ExitRule(listener antlr.ParseTreeListener) {
  20865. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20866. listenerT.ExitOrder_by_expr(s)
  20867. }
  20868. }
  20869. func (p *SQLiteParser) Order_by_expr() (localctx IOrder_by_exprContext) {
  20870. this := p
  20871. _ = this
  20872. localctx = NewOrder_by_exprContext(p, p.GetParserRuleContext(), p.GetState())
  20873. p.EnterRule(localctx, 156, SQLiteParserRULE_order_by_expr)
  20874. var _la int
  20875. defer func() {
  20876. p.ExitRule()
  20877. }()
  20878. defer func() {
  20879. if err := recover(); err != nil {
  20880. if v, ok := err.(antlr.RecognitionException); ok {
  20881. localctx.SetException(v)
  20882. p.GetErrorHandler().ReportError(p, v)
  20883. p.GetErrorHandler().Recover(p, v)
  20884. } else {
  20885. panic(err)
  20886. }
  20887. }
  20888. }()
  20889. p.EnterOuterAlt(localctx, 1)
  20890. {
  20891. p.SetState(2070)
  20892. p.Match(SQLiteParserORDER_)
  20893. }
  20894. {
  20895. p.SetState(2071)
  20896. p.Match(SQLiteParserBY_)
  20897. }
  20898. p.SetState(2073)
  20899. p.GetErrorHandler().Sync(p)
  20900. _la = p.GetTokenStream().LA(1)
  20901. for ok := true; ok; ok = ((int64((_la-3)) & ^0x3f) == 0 && ((int64(1)<<(_la-3))&-16776415) != 0) || ((int64((_la-67)) & ^0x3f) == 0 && ((int64(1)<<(_la-67))&-1) != 0) || ((int64((_la-131)) & ^0x3f) == 0 && ((int64(1)<<(_la-131))&9088264048033660927) != 0) {
  20902. {
  20903. p.SetState(2072)
  20904. p.expr(0)
  20905. }
  20906. p.SetState(2075)
  20907. p.GetErrorHandler().Sync(p)
  20908. _la = p.GetTokenStream().LA(1)
  20909. }
  20910. return localctx
  20911. }
  20912. // IOrder_by_expr_asc_descContext is an interface to support dynamic dispatch.
  20913. type IOrder_by_expr_asc_descContext interface {
  20914. antlr.ParserRuleContext
  20915. // GetParser returns the parser.
  20916. GetParser() antlr.Parser
  20917. // Getter signatures
  20918. ORDER_() antlr.TerminalNode
  20919. BY_() antlr.TerminalNode
  20920. Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext
  20921. // IsOrder_by_expr_asc_descContext differentiates from other interfaces.
  20922. IsOrder_by_expr_asc_descContext()
  20923. }
  20924. type Order_by_expr_asc_descContext struct {
  20925. *antlr.BaseParserRuleContext
  20926. parser antlr.Parser
  20927. }
  20928. func NewEmptyOrder_by_expr_asc_descContext() *Order_by_expr_asc_descContext {
  20929. var p = new(Order_by_expr_asc_descContext)
  20930. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  20931. p.RuleIndex = SQLiteParserRULE_order_by_expr_asc_desc
  20932. return p
  20933. }
  20934. func (*Order_by_expr_asc_descContext) IsOrder_by_expr_asc_descContext() {}
  20935. func NewOrder_by_expr_asc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Order_by_expr_asc_descContext {
  20936. var p = new(Order_by_expr_asc_descContext)
  20937. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  20938. p.parser = parser
  20939. p.RuleIndex = SQLiteParserRULE_order_by_expr_asc_desc
  20940. return p
  20941. }
  20942. func (s *Order_by_expr_asc_descContext) GetParser() antlr.Parser { return s.parser }
  20943. func (s *Order_by_expr_asc_descContext) ORDER_() antlr.TerminalNode {
  20944. return s.GetToken(SQLiteParserORDER_, 0)
  20945. }
  20946. func (s *Order_by_expr_asc_descContext) BY_() antlr.TerminalNode {
  20947. return s.GetToken(SQLiteParserBY_, 0)
  20948. }
  20949. func (s *Order_by_expr_asc_descContext) Order_by_expr_asc_desc() IOrder_by_expr_asc_descContext {
  20950. var t antlr.RuleContext
  20951. for _, ctx := range s.GetChildren() {
  20952. if _, ok := ctx.(IOrder_by_expr_asc_descContext); ok {
  20953. t = ctx.(antlr.RuleContext)
  20954. break
  20955. }
  20956. }
  20957. if t == nil {
  20958. return nil
  20959. }
  20960. return t.(IOrder_by_expr_asc_descContext)
  20961. }
  20962. func (s *Order_by_expr_asc_descContext) GetRuleContext() antlr.RuleContext {
  20963. return s
  20964. }
  20965. func (s *Order_by_expr_asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  20966. return antlr.TreesStringTree(s, ruleNames, recog)
  20967. }
  20968. func (s *Order_by_expr_asc_descContext) EnterRule(listener antlr.ParseTreeListener) {
  20969. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20970. listenerT.EnterOrder_by_expr_asc_desc(s)
  20971. }
  20972. }
  20973. func (s *Order_by_expr_asc_descContext) ExitRule(listener antlr.ParseTreeListener) {
  20974. if listenerT, ok := listener.(SQLiteParserListener); ok {
  20975. listenerT.ExitOrder_by_expr_asc_desc(s)
  20976. }
  20977. }
  20978. func (p *SQLiteParser) Order_by_expr_asc_desc() (localctx IOrder_by_expr_asc_descContext) {
  20979. this := p
  20980. _ = this
  20981. localctx = NewOrder_by_expr_asc_descContext(p, p.GetParserRuleContext(), p.GetState())
  20982. p.EnterRule(localctx, 158, SQLiteParserRULE_order_by_expr_asc_desc)
  20983. defer func() {
  20984. p.ExitRule()
  20985. }()
  20986. defer func() {
  20987. if err := recover(); err != nil {
  20988. if v, ok := err.(antlr.RecognitionException); ok {
  20989. localctx.SetException(v)
  20990. p.GetErrorHandler().ReportError(p, v)
  20991. p.GetErrorHandler().Recover(p, v)
  20992. } else {
  20993. panic(err)
  20994. }
  20995. }
  20996. }()
  20997. p.EnterOuterAlt(localctx, 1)
  20998. {
  20999. p.SetState(2077)
  21000. p.Match(SQLiteParserORDER_)
  21001. }
  21002. {
  21003. p.SetState(2078)
  21004. p.Match(SQLiteParserBY_)
  21005. }
  21006. {
  21007. p.SetState(2079)
  21008. p.Order_by_expr_asc_desc()
  21009. }
  21010. return localctx
  21011. }
  21012. // IExpr_asc_descContext is an interface to support dynamic dispatch.
  21013. type IExpr_asc_descContext interface {
  21014. antlr.ParserRuleContext
  21015. // GetParser returns the parser.
  21016. GetParser() antlr.Parser
  21017. // Getter signatures
  21018. AllExpr() []IExprContext
  21019. Expr(i int) IExprContext
  21020. AllAsc_desc() []IAsc_descContext
  21021. Asc_desc(i int) IAsc_descContext
  21022. AllCOMMA() []antlr.TerminalNode
  21023. COMMA(i int) antlr.TerminalNode
  21024. // IsExpr_asc_descContext differentiates from other interfaces.
  21025. IsExpr_asc_descContext()
  21026. }
  21027. type Expr_asc_descContext struct {
  21028. *antlr.BaseParserRuleContext
  21029. parser antlr.Parser
  21030. }
  21031. func NewEmptyExpr_asc_descContext() *Expr_asc_descContext {
  21032. var p = new(Expr_asc_descContext)
  21033. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  21034. p.RuleIndex = SQLiteParserRULE_expr_asc_desc
  21035. return p
  21036. }
  21037. func (*Expr_asc_descContext) IsExpr_asc_descContext() {}
  21038. func NewExpr_asc_descContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Expr_asc_descContext {
  21039. var p = new(Expr_asc_descContext)
  21040. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  21041. p.parser = parser
  21042. p.RuleIndex = SQLiteParserRULE_expr_asc_desc
  21043. return p
  21044. }
  21045. func (s *Expr_asc_descContext) GetParser() antlr.Parser { return s.parser }
  21046. func (s *Expr_asc_descContext) AllExpr() []IExprContext {
  21047. children := s.GetChildren()
  21048. len := 0
  21049. for _, ctx := range children {
  21050. if _, ok := ctx.(IExprContext); ok {
  21051. len++
  21052. }
  21053. }
  21054. tst := make([]IExprContext, len)
  21055. i := 0
  21056. for _, ctx := range children {
  21057. if t, ok := ctx.(IExprContext); ok {
  21058. tst[i] = t.(IExprContext)
  21059. i++
  21060. }
  21061. }
  21062. return tst
  21063. }
  21064. func (s *Expr_asc_descContext) Expr(i int) IExprContext {
  21065. var t antlr.RuleContext
  21066. j := 0
  21067. for _, ctx := range s.GetChildren() {
  21068. if _, ok := ctx.(IExprContext); ok {
  21069. if j == i {
  21070. t = ctx.(antlr.RuleContext)
  21071. break
  21072. }
  21073. j++
  21074. }
  21075. }
  21076. if t == nil {
  21077. return nil
  21078. }
  21079. return t.(IExprContext)
  21080. }
  21081. func (s *Expr_asc_descContext) AllAsc_desc() []IAsc_descContext {
  21082. children := s.GetChildren()
  21083. len := 0
  21084. for _, ctx := range children {
  21085. if _, ok := ctx.(IAsc_descContext); ok {
  21086. len++
  21087. }
  21088. }
  21089. tst := make([]IAsc_descContext, len)
  21090. i := 0
  21091. for _, ctx := range children {
  21092. if t, ok := ctx.(IAsc_descContext); ok {
  21093. tst[i] = t.(IAsc_descContext)
  21094. i++
  21095. }
  21096. }
  21097. return tst
  21098. }
  21099. func (s *Expr_asc_descContext) Asc_desc(i int) IAsc_descContext {
  21100. var t antlr.RuleContext
  21101. j := 0
  21102. for _, ctx := range s.GetChildren() {
  21103. if _, ok := ctx.(IAsc_descContext); ok {
  21104. if j == i {
  21105. t = ctx.(antlr.RuleContext)
  21106. break
  21107. }
  21108. j++
  21109. }
  21110. }
  21111. if t == nil {
  21112. return nil
  21113. }
  21114. return t.(IAsc_descContext)
  21115. }
  21116. func (s *Expr_asc_descContext) AllCOMMA() []antlr.TerminalNode {
  21117. return s.GetTokens(SQLiteParserCOMMA)
  21118. }
  21119. func (s *Expr_asc_descContext) COMMA(i int) antlr.TerminalNode {
  21120. return s.GetToken(SQLiteParserCOMMA, i)
  21121. }
  21122. func (s *Expr_asc_descContext) GetRuleContext() antlr.RuleContext {
  21123. return s
  21124. }
  21125. func (s *Expr_asc_descContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  21126. return antlr.TreesStringTree(s, ruleNames, recog)
  21127. }
  21128. func (s *Expr_asc_descContext) EnterRule(listener antlr.ParseTreeListener) {
  21129. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21130. listenerT.EnterExpr_asc_desc(s)
  21131. }
  21132. }
  21133. func (s *Expr_asc_descContext) ExitRule(listener antlr.ParseTreeListener) {
  21134. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21135. listenerT.ExitExpr_asc_desc(s)
  21136. }
  21137. }
  21138. func (p *SQLiteParser) Expr_asc_desc() (localctx IExpr_asc_descContext) {
  21139. this := p
  21140. _ = this
  21141. localctx = NewExpr_asc_descContext(p, p.GetParserRuleContext(), p.GetState())
  21142. p.EnterRule(localctx, 160, SQLiteParserRULE_expr_asc_desc)
  21143. var _la int
  21144. defer func() {
  21145. p.ExitRule()
  21146. }()
  21147. defer func() {
  21148. if err := recover(); err != nil {
  21149. if v, ok := err.(antlr.RecognitionException); ok {
  21150. localctx.SetException(v)
  21151. p.GetErrorHandler().ReportError(p, v)
  21152. p.GetErrorHandler().Recover(p, v)
  21153. } else {
  21154. panic(err)
  21155. }
  21156. }
  21157. }()
  21158. p.EnterOuterAlt(localctx, 1)
  21159. {
  21160. p.SetState(2081)
  21161. p.expr(0)
  21162. }
  21163. p.SetState(2083)
  21164. p.GetErrorHandler().Sync(p)
  21165. _la = p.GetTokenStream().LA(1)
  21166. if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ {
  21167. {
  21168. p.SetState(2082)
  21169. p.Asc_desc()
  21170. }
  21171. }
  21172. p.SetState(2092)
  21173. p.GetErrorHandler().Sync(p)
  21174. _la = p.GetTokenStream().LA(1)
  21175. for _la == SQLiteParserCOMMA {
  21176. {
  21177. p.SetState(2085)
  21178. p.Match(SQLiteParserCOMMA)
  21179. }
  21180. {
  21181. p.SetState(2086)
  21182. p.expr(0)
  21183. }
  21184. p.SetState(2088)
  21185. p.GetErrorHandler().Sync(p)
  21186. _la = p.GetTokenStream().LA(1)
  21187. if _la == SQLiteParserASC_ || _la == SQLiteParserDESC_ {
  21188. {
  21189. p.SetState(2087)
  21190. p.Asc_desc()
  21191. }
  21192. }
  21193. p.SetState(2094)
  21194. p.GetErrorHandler().Sync(p)
  21195. _la = p.GetTokenStream().LA(1)
  21196. }
  21197. return localctx
  21198. }
  21199. // IInitial_selectContext is an interface to support dynamic dispatch.
  21200. type IInitial_selectContext interface {
  21201. antlr.ParserRuleContext
  21202. // GetParser returns the parser.
  21203. GetParser() antlr.Parser
  21204. // Getter signatures
  21205. Select_stmt() ISelect_stmtContext
  21206. // IsInitial_selectContext differentiates from other interfaces.
  21207. IsInitial_selectContext()
  21208. }
  21209. type Initial_selectContext struct {
  21210. *antlr.BaseParserRuleContext
  21211. parser antlr.Parser
  21212. }
  21213. func NewEmptyInitial_selectContext() *Initial_selectContext {
  21214. var p = new(Initial_selectContext)
  21215. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  21216. p.RuleIndex = SQLiteParserRULE_initial_select
  21217. return p
  21218. }
  21219. func (*Initial_selectContext) IsInitial_selectContext() {}
  21220. func NewInitial_selectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Initial_selectContext {
  21221. var p = new(Initial_selectContext)
  21222. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  21223. p.parser = parser
  21224. p.RuleIndex = SQLiteParserRULE_initial_select
  21225. return p
  21226. }
  21227. func (s *Initial_selectContext) GetParser() antlr.Parser { return s.parser }
  21228. func (s *Initial_selectContext) Select_stmt() ISelect_stmtContext {
  21229. var t antlr.RuleContext
  21230. for _, ctx := range s.GetChildren() {
  21231. if _, ok := ctx.(ISelect_stmtContext); ok {
  21232. t = ctx.(antlr.RuleContext)
  21233. break
  21234. }
  21235. }
  21236. if t == nil {
  21237. return nil
  21238. }
  21239. return t.(ISelect_stmtContext)
  21240. }
  21241. func (s *Initial_selectContext) GetRuleContext() antlr.RuleContext {
  21242. return s
  21243. }
  21244. func (s *Initial_selectContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  21245. return antlr.TreesStringTree(s, ruleNames, recog)
  21246. }
  21247. func (s *Initial_selectContext) EnterRule(listener antlr.ParseTreeListener) {
  21248. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21249. listenerT.EnterInitial_select(s)
  21250. }
  21251. }
  21252. func (s *Initial_selectContext) ExitRule(listener antlr.ParseTreeListener) {
  21253. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21254. listenerT.ExitInitial_select(s)
  21255. }
  21256. }
  21257. func (p *SQLiteParser) Initial_select() (localctx IInitial_selectContext) {
  21258. this := p
  21259. _ = this
  21260. localctx = NewInitial_selectContext(p, p.GetParserRuleContext(), p.GetState())
  21261. p.EnterRule(localctx, 162, SQLiteParserRULE_initial_select)
  21262. defer func() {
  21263. p.ExitRule()
  21264. }()
  21265. defer func() {
  21266. if err := recover(); err != nil {
  21267. if v, ok := err.(antlr.RecognitionException); ok {
  21268. localctx.SetException(v)
  21269. p.GetErrorHandler().ReportError(p, v)
  21270. p.GetErrorHandler().Recover(p, v)
  21271. } else {
  21272. panic(err)
  21273. }
  21274. }
  21275. }()
  21276. p.EnterOuterAlt(localctx, 1)
  21277. {
  21278. p.SetState(2095)
  21279. p.Select_stmt()
  21280. }
  21281. return localctx
  21282. }
  21283. // IRecursive__selectContext is an interface to support dynamic dispatch.
  21284. type IRecursive__selectContext interface {
  21285. antlr.ParserRuleContext
  21286. // GetParser returns the parser.
  21287. GetParser() antlr.Parser
  21288. // Getter signatures
  21289. Select_stmt() ISelect_stmtContext
  21290. // IsRecursive__selectContext differentiates from other interfaces.
  21291. IsRecursive__selectContext()
  21292. }
  21293. type Recursive__selectContext struct {
  21294. *antlr.BaseParserRuleContext
  21295. parser antlr.Parser
  21296. }
  21297. func NewEmptyRecursive__selectContext() *Recursive__selectContext {
  21298. var p = new(Recursive__selectContext)
  21299. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  21300. p.RuleIndex = SQLiteParserRULE_recursive__select
  21301. return p
  21302. }
  21303. func (*Recursive__selectContext) IsRecursive__selectContext() {}
  21304. func NewRecursive__selectContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Recursive__selectContext {
  21305. var p = new(Recursive__selectContext)
  21306. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  21307. p.parser = parser
  21308. p.RuleIndex = SQLiteParserRULE_recursive__select
  21309. return p
  21310. }
  21311. func (s *Recursive__selectContext) GetParser() antlr.Parser { return s.parser }
  21312. func (s *Recursive__selectContext) Select_stmt() ISelect_stmtContext {
  21313. var t antlr.RuleContext
  21314. for _, ctx := range s.GetChildren() {
  21315. if _, ok := ctx.(ISelect_stmtContext); ok {
  21316. t = ctx.(antlr.RuleContext)
  21317. break
  21318. }
  21319. }
  21320. if t == nil {
  21321. return nil
  21322. }
  21323. return t.(ISelect_stmtContext)
  21324. }
  21325. func (s *Recursive__selectContext) GetRuleContext() antlr.RuleContext {
  21326. return s
  21327. }
  21328. func (s *Recursive__selectContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  21329. return antlr.TreesStringTree(s, ruleNames, recog)
  21330. }
  21331. func (s *Recursive__selectContext) EnterRule(listener antlr.ParseTreeListener) {
  21332. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21333. listenerT.EnterRecursive__select(s)
  21334. }
  21335. }
  21336. func (s *Recursive__selectContext) ExitRule(listener antlr.ParseTreeListener) {
  21337. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21338. listenerT.ExitRecursive__select(s)
  21339. }
  21340. }
  21341. func (p *SQLiteParser) Recursive__select() (localctx IRecursive__selectContext) {
  21342. this := p
  21343. _ = this
  21344. localctx = NewRecursive__selectContext(p, p.GetParserRuleContext(), p.GetState())
  21345. p.EnterRule(localctx, 164, SQLiteParserRULE_recursive__select)
  21346. defer func() {
  21347. p.ExitRule()
  21348. }()
  21349. defer func() {
  21350. if err := recover(); err != nil {
  21351. if v, ok := err.(antlr.RecognitionException); ok {
  21352. localctx.SetException(v)
  21353. p.GetErrorHandler().ReportError(p, v)
  21354. p.GetErrorHandler().Recover(p, v)
  21355. } else {
  21356. panic(err)
  21357. }
  21358. }
  21359. }()
  21360. p.EnterOuterAlt(localctx, 1)
  21361. {
  21362. p.SetState(2097)
  21363. p.Select_stmt()
  21364. }
  21365. return localctx
  21366. }
  21367. // IUnary_operatorContext is an interface to support dynamic dispatch.
  21368. type IUnary_operatorContext interface {
  21369. antlr.ParserRuleContext
  21370. // GetParser returns the parser.
  21371. GetParser() antlr.Parser
  21372. // Getter signatures
  21373. MINUS() antlr.TerminalNode
  21374. PLUS() antlr.TerminalNode
  21375. TILDE() antlr.TerminalNode
  21376. NOT_() antlr.TerminalNode
  21377. // IsUnary_operatorContext differentiates from other interfaces.
  21378. IsUnary_operatorContext()
  21379. }
  21380. type Unary_operatorContext struct {
  21381. *antlr.BaseParserRuleContext
  21382. parser antlr.Parser
  21383. }
  21384. func NewEmptyUnary_operatorContext() *Unary_operatorContext {
  21385. var p = new(Unary_operatorContext)
  21386. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  21387. p.RuleIndex = SQLiteParserRULE_unary_operator
  21388. return p
  21389. }
  21390. func (*Unary_operatorContext) IsUnary_operatorContext() {}
  21391. func NewUnary_operatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Unary_operatorContext {
  21392. var p = new(Unary_operatorContext)
  21393. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  21394. p.parser = parser
  21395. p.RuleIndex = SQLiteParserRULE_unary_operator
  21396. return p
  21397. }
  21398. func (s *Unary_operatorContext) GetParser() antlr.Parser { return s.parser }
  21399. func (s *Unary_operatorContext) MINUS() antlr.TerminalNode {
  21400. return s.GetToken(SQLiteParserMINUS, 0)
  21401. }
  21402. func (s *Unary_operatorContext) PLUS() antlr.TerminalNode {
  21403. return s.GetToken(SQLiteParserPLUS, 0)
  21404. }
  21405. func (s *Unary_operatorContext) TILDE() antlr.TerminalNode {
  21406. return s.GetToken(SQLiteParserTILDE, 0)
  21407. }
  21408. func (s *Unary_operatorContext) NOT_() antlr.TerminalNode {
  21409. return s.GetToken(SQLiteParserNOT_, 0)
  21410. }
  21411. func (s *Unary_operatorContext) GetRuleContext() antlr.RuleContext {
  21412. return s
  21413. }
  21414. func (s *Unary_operatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  21415. return antlr.TreesStringTree(s, ruleNames, recog)
  21416. }
  21417. func (s *Unary_operatorContext) EnterRule(listener antlr.ParseTreeListener) {
  21418. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21419. listenerT.EnterUnary_operator(s)
  21420. }
  21421. }
  21422. func (s *Unary_operatorContext) ExitRule(listener antlr.ParseTreeListener) {
  21423. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21424. listenerT.ExitUnary_operator(s)
  21425. }
  21426. }
  21427. func (p *SQLiteParser) Unary_operator() (localctx IUnary_operatorContext) {
  21428. this := p
  21429. _ = this
  21430. localctx = NewUnary_operatorContext(p, p.GetParserRuleContext(), p.GetState())
  21431. p.EnterRule(localctx, 166, SQLiteParserRULE_unary_operator)
  21432. var _la int
  21433. defer func() {
  21434. p.ExitRule()
  21435. }()
  21436. defer func() {
  21437. if err := recover(); err != nil {
  21438. if v, ok := err.(antlr.RecognitionException); ok {
  21439. localctx.SetException(v)
  21440. p.GetErrorHandler().ReportError(p, v)
  21441. p.GetErrorHandler().Recover(p, v)
  21442. } else {
  21443. panic(err)
  21444. }
  21445. }
  21446. }()
  21447. p.EnterOuterAlt(localctx, 1)
  21448. {
  21449. p.SetState(2099)
  21450. _la = p.GetTokenStream().LA(1)
  21451. if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&6400) != 0) || _la == SQLiteParserNOT_) {
  21452. p.GetErrorHandler().RecoverInline(p)
  21453. } else {
  21454. p.GetErrorHandler().ReportMatch(p)
  21455. p.Consume()
  21456. }
  21457. }
  21458. return localctx
  21459. }
  21460. // IError_messageContext is an interface to support dynamic dispatch.
  21461. type IError_messageContext interface {
  21462. antlr.ParserRuleContext
  21463. // GetParser returns the parser.
  21464. GetParser() antlr.Parser
  21465. // Getter signatures
  21466. STRING_LITERAL() antlr.TerminalNode
  21467. // IsError_messageContext differentiates from other interfaces.
  21468. IsError_messageContext()
  21469. }
  21470. type Error_messageContext struct {
  21471. *antlr.BaseParserRuleContext
  21472. parser antlr.Parser
  21473. }
  21474. func NewEmptyError_messageContext() *Error_messageContext {
  21475. var p = new(Error_messageContext)
  21476. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  21477. p.RuleIndex = SQLiteParserRULE_error_message
  21478. return p
  21479. }
  21480. func (*Error_messageContext) IsError_messageContext() {}
  21481. func NewError_messageContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Error_messageContext {
  21482. var p = new(Error_messageContext)
  21483. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  21484. p.parser = parser
  21485. p.RuleIndex = SQLiteParserRULE_error_message
  21486. return p
  21487. }
  21488. func (s *Error_messageContext) GetParser() antlr.Parser { return s.parser }
  21489. func (s *Error_messageContext) STRING_LITERAL() antlr.TerminalNode {
  21490. return s.GetToken(SQLiteParserSTRING_LITERAL, 0)
  21491. }
  21492. func (s *Error_messageContext) GetRuleContext() antlr.RuleContext {
  21493. return s
  21494. }
  21495. func (s *Error_messageContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  21496. return antlr.TreesStringTree(s, ruleNames, recog)
  21497. }
  21498. func (s *Error_messageContext) EnterRule(listener antlr.ParseTreeListener) {
  21499. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21500. listenerT.EnterError_message(s)
  21501. }
  21502. }
  21503. func (s *Error_messageContext) ExitRule(listener antlr.ParseTreeListener) {
  21504. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21505. listenerT.ExitError_message(s)
  21506. }
  21507. }
  21508. func (p *SQLiteParser) Error_message() (localctx IError_messageContext) {
  21509. this := p
  21510. _ = this
  21511. localctx = NewError_messageContext(p, p.GetParserRuleContext(), p.GetState())
  21512. p.EnterRule(localctx, 168, SQLiteParserRULE_error_message)
  21513. defer func() {
  21514. p.ExitRule()
  21515. }()
  21516. defer func() {
  21517. if err := recover(); err != nil {
  21518. if v, ok := err.(antlr.RecognitionException); ok {
  21519. localctx.SetException(v)
  21520. p.GetErrorHandler().ReportError(p, v)
  21521. p.GetErrorHandler().Recover(p, v)
  21522. } else {
  21523. panic(err)
  21524. }
  21525. }
  21526. }()
  21527. p.EnterOuterAlt(localctx, 1)
  21528. {
  21529. p.SetState(2101)
  21530. p.Match(SQLiteParserSTRING_LITERAL)
  21531. }
  21532. return localctx
  21533. }
  21534. // IModule_argumentContext is an interface to support dynamic dispatch.
  21535. type IModule_argumentContext interface {
  21536. antlr.ParserRuleContext
  21537. // GetParser returns the parser.
  21538. GetParser() antlr.Parser
  21539. // Getter signatures
  21540. Expr() IExprContext
  21541. Column_def() IColumn_defContext
  21542. // IsModule_argumentContext differentiates from other interfaces.
  21543. IsModule_argumentContext()
  21544. }
  21545. type Module_argumentContext struct {
  21546. *antlr.BaseParserRuleContext
  21547. parser antlr.Parser
  21548. }
  21549. func NewEmptyModule_argumentContext() *Module_argumentContext {
  21550. var p = new(Module_argumentContext)
  21551. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  21552. p.RuleIndex = SQLiteParserRULE_module_argument
  21553. return p
  21554. }
  21555. func (*Module_argumentContext) IsModule_argumentContext() {}
  21556. func NewModule_argumentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_argumentContext {
  21557. var p = new(Module_argumentContext)
  21558. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  21559. p.parser = parser
  21560. p.RuleIndex = SQLiteParserRULE_module_argument
  21561. return p
  21562. }
  21563. func (s *Module_argumentContext) GetParser() antlr.Parser { return s.parser }
  21564. func (s *Module_argumentContext) Expr() IExprContext {
  21565. var t antlr.RuleContext
  21566. for _, ctx := range s.GetChildren() {
  21567. if _, ok := ctx.(IExprContext); ok {
  21568. t = ctx.(antlr.RuleContext)
  21569. break
  21570. }
  21571. }
  21572. if t == nil {
  21573. return nil
  21574. }
  21575. return t.(IExprContext)
  21576. }
  21577. func (s *Module_argumentContext) Column_def() IColumn_defContext {
  21578. var t antlr.RuleContext
  21579. for _, ctx := range s.GetChildren() {
  21580. if _, ok := ctx.(IColumn_defContext); ok {
  21581. t = ctx.(antlr.RuleContext)
  21582. break
  21583. }
  21584. }
  21585. if t == nil {
  21586. return nil
  21587. }
  21588. return t.(IColumn_defContext)
  21589. }
  21590. func (s *Module_argumentContext) GetRuleContext() antlr.RuleContext {
  21591. return s
  21592. }
  21593. func (s *Module_argumentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  21594. return antlr.TreesStringTree(s, ruleNames, recog)
  21595. }
  21596. func (s *Module_argumentContext) EnterRule(listener antlr.ParseTreeListener) {
  21597. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21598. listenerT.EnterModule_argument(s)
  21599. }
  21600. }
  21601. func (s *Module_argumentContext) ExitRule(listener antlr.ParseTreeListener) {
  21602. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21603. listenerT.ExitModule_argument(s)
  21604. }
  21605. }
  21606. func (p *SQLiteParser) Module_argument() (localctx IModule_argumentContext) {
  21607. this := p
  21608. _ = this
  21609. localctx = NewModule_argumentContext(p, p.GetParserRuleContext(), p.GetState())
  21610. p.EnterRule(localctx, 170, SQLiteParserRULE_module_argument)
  21611. defer func() {
  21612. p.ExitRule()
  21613. }()
  21614. defer func() {
  21615. if err := recover(); err != nil {
  21616. if v, ok := err.(antlr.RecognitionException); ok {
  21617. localctx.SetException(v)
  21618. p.GetErrorHandler().ReportError(p, v)
  21619. p.GetErrorHandler().Recover(p, v)
  21620. } else {
  21621. panic(err)
  21622. }
  21623. }
  21624. }()
  21625. p.SetState(2105)
  21626. p.GetErrorHandler().Sync(p)
  21627. switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 311, p.GetParserRuleContext()) {
  21628. case 1:
  21629. p.EnterOuterAlt(localctx, 1)
  21630. {
  21631. p.SetState(2103)
  21632. p.expr(0)
  21633. }
  21634. case 2:
  21635. p.EnterOuterAlt(localctx, 2)
  21636. {
  21637. p.SetState(2104)
  21638. p.Column_def()
  21639. }
  21640. }
  21641. return localctx
  21642. }
  21643. // IColumn_aliasContext is an interface to support dynamic dispatch.
  21644. type IColumn_aliasContext interface {
  21645. antlr.ParserRuleContext
  21646. // GetParser returns the parser.
  21647. GetParser() antlr.Parser
  21648. // Getter signatures
  21649. IDENTIFIER() antlr.TerminalNode
  21650. STRING_LITERAL() antlr.TerminalNode
  21651. // IsColumn_aliasContext differentiates from other interfaces.
  21652. IsColumn_aliasContext()
  21653. }
  21654. type Column_aliasContext struct {
  21655. *antlr.BaseParserRuleContext
  21656. parser antlr.Parser
  21657. }
  21658. func NewEmptyColumn_aliasContext() *Column_aliasContext {
  21659. var p = new(Column_aliasContext)
  21660. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  21661. p.RuleIndex = SQLiteParserRULE_column_alias
  21662. return p
  21663. }
  21664. func (*Column_aliasContext) IsColumn_aliasContext() {}
  21665. func NewColumn_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_aliasContext {
  21666. var p = new(Column_aliasContext)
  21667. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  21668. p.parser = parser
  21669. p.RuleIndex = SQLiteParserRULE_column_alias
  21670. return p
  21671. }
  21672. func (s *Column_aliasContext) GetParser() antlr.Parser { return s.parser }
  21673. func (s *Column_aliasContext) IDENTIFIER() antlr.TerminalNode {
  21674. return s.GetToken(SQLiteParserIDENTIFIER, 0)
  21675. }
  21676. func (s *Column_aliasContext) STRING_LITERAL() antlr.TerminalNode {
  21677. return s.GetToken(SQLiteParserSTRING_LITERAL, 0)
  21678. }
  21679. func (s *Column_aliasContext) GetRuleContext() antlr.RuleContext {
  21680. return s
  21681. }
  21682. func (s *Column_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  21683. return antlr.TreesStringTree(s, ruleNames, recog)
  21684. }
  21685. func (s *Column_aliasContext) EnterRule(listener antlr.ParseTreeListener) {
  21686. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21687. listenerT.EnterColumn_alias(s)
  21688. }
  21689. }
  21690. func (s *Column_aliasContext) ExitRule(listener antlr.ParseTreeListener) {
  21691. if listenerT, ok := listener.(SQLiteParserListener); ok {
  21692. listenerT.ExitColumn_alias(s)
  21693. }
  21694. }
  21695. func (p *SQLiteParser) Column_alias() (localctx IColumn_aliasContext) {
  21696. this := p
  21697. _ = this
  21698. localctx = NewColumn_aliasContext(p, p.GetParserRuleContext(), p.GetState())
  21699. p.EnterRule(localctx, 172, SQLiteParserRULE_column_alias)
  21700. var _la int
  21701. defer func() {
  21702. p.ExitRule()
  21703. }()
  21704. defer func() {
  21705. if err := recover(); err != nil {
  21706. if v, ok := err.(antlr.RecognitionException); ok {
  21707. localctx.SetException(v)
  21708. p.GetErrorHandler().ReportError(p, v)
  21709. p.GetErrorHandler().Recover(p, v)
  21710. } else {
  21711. panic(err)
  21712. }
  21713. }
  21714. }()
  21715. p.EnterOuterAlt(localctx, 1)
  21716. {
  21717. p.SetState(2107)
  21718. _la = p.GetTokenStream().LA(1)
  21719. if !(_la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL) {
  21720. p.GetErrorHandler().RecoverInline(p)
  21721. } else {
  21722. p.GetErrorHandler().ReportMatch(p)
  21723. p.Consume()
  21724. }
  21725. }
  21726. return localctx
  21727. }
  21728. // IKeywordContext is an interface to support dynamic dispatch.
  21729. type IKeywordContext interface {
  21730. antlr.ParserRuleContext
  21731. // GetParser returns the parser.
  21732. GetParser() antlr.Parser
  21733. // Getter signatures
  21734. ABORT_() antlr.TerminalNode
  21735. ACTION_() antlr.TerminalNode
  21736. ADD_() antlr.TerminalNode
  21737. AFTER_() antlr.TerminalNode
  21738. ALL_() antlr.TerminalNode
  21739. ALTER_() antlr.TerminalNode
  21740. ANALYZE_() antlr.TerminalNode
  21741. AND_() antlr.TerminalNode
  21742. AS_() antlr.TerminalNode
  21743. ASC_() antlr.TerminalNode
  21744. ATTACH_() antlr.TerminalNode
  21745. AUTOINCREMENT_() antlr.TerminalNode
  21746. BEFORE_() antlr.TerminalNode
  21747. BEGIN_() antlr.TerminalNode
  21748. BETWEEN_() antlr.TerminalNode
  21749. BY_() antlr.TerminalNode
  21750. CASCADE_() antlr.TerminalNode
  21751. CASE_() antlr.TerminalNode
  21752. CAST_() antlr.TerminalNode
  21753. CHECK_() antlr.TerminalNode
  21754. COLLATE_() antlr.TerminalNode
  21755. COLUMN_() antlr.TerminalNode
  21756. COMMIT_() antlr.TerminalNode
  21757. CONFLICT_() antlr.TerminalNode
  21758. CONSTRAINT_() antlr.TerminalNode
  21759. CREATE_() antlr.TerminalNode
  21760. CROSS_() antlr.TerminalNode
  21761. CURRENT_DATE_() antlr.TerminalNode
  21762. CURRENT_TIME_() antlr.TerminalNode
  21763. CURRENT_TIMESTAMP_() antlr.TerminalNode
  21764. DATABASE_() antlr.TerminalNode
  21765. DEFAULT_() antlr.TerminalNode
  21766. DEFERRABLE_() antlr.TerminalNode
  21767. DEFERRED_() antlr.TerminalNode
  21768. DELETE_() antlr.TerminalNode
  21769. DESC_() antlr.TerminalNode
  21770. DETACH_() antlr.TerminalNode
  21771. DISTINCT_() antlr.TerminalNode
  21772. DROP_() antlr.TerminalNode
  21773. EACH_() antlr.TerminalNode
  21774. ELSE_() antlr.TerminalNode
  21775. END_() antlr.TerminalNode
  21776. ESCAPE_() antlr.TerminalNode
  21777. EXCEPT_() antlr.TerminalNode
  21778. EXCLUSIVE_() antlr.TerminalNode
  21779. EXISTS_() antlr.TerminalNode
  21780. EXPLAIN_() antlr.TerminalNode
  21781. FAIL_() antlr.TerminalNode
  21782. FOR_() antlr.TerminalNode
  21783. FOREIGN_() antlr.TerminalNode
  21784. FROM_() antlr.TerminalNode
  21785. FULL_() antlr.TerminalNode
  21786. GLOB_() antlr.TerminalNode
  21787. GROUP_() antlr.TerminalNode
  21788. HAVING_() antlr.TerminalNode
  21789. IF_() antlr.TerminalNode
  21790. IGNORE_() antlr.TerminalNode
  21791. IMMEDIATE_() antlr.TerminalNode
  21792. IN_() antlr.TerminalNode
  21793. INDEX_() antlr.TerminalNode
  21794. INDEXED_() antlr.TerminalNode
  21795. INITIALLY_() antlr.TerminalNode
  21796. INNER_() antlr.TerminalNode
  21797. INSERT_() antlr.TerminalNode
  21798. INSTEAD_() antlr.TerminalNode
  21799. INTERSECT_() antlr.TerminalNode
  21800. INTO_() antlr.TerminalNode
  21801. IS_() antlr.TerminalNode
  21802. ISNULL_() antlr.TerminalNode
  21803. JOIN_() antlr.TerminalNode
  21804. KEY_() antlr.TerminalNode
  21805. LEFT_() antlr.TerminalNode
  21806. LIKE_() antlr.TerminalNode
  21807. LIMIT_() antlr.TerminalNode
  21808. MATCH_() antlr.TerminalNode
  21809. NATURAL_() antlr.TerminalNode
  21810. NO_() antlr.TerminalNode
  21811. NOT_() antlr.TerminalNode
  21812. NOTNULL_() antlr.TerminalNode
  21813. NULL_() antlr.TerminalNode
  21814. OF_() antlr.TerminalNode
  21815. OFFSET_() antlr.TerminalNode
  21816. ON_() antlr.TerminalNode
  21817. OR_() antlr.TerminalNode
  21818. ORDER_() antlr.TerminalNode
  21819. OUTER_() antlr.TerminalNode
  21820. PLAN_() antlr.TerminalNode
  21821. PRAGMA_() antlr.TerminalNode
  21822. PRIMARY_() antlr.TerminalNode
  21823. QUERY_() antlr.TerminalNode
  21824. RAISE_() antlr.TerminalNode
  21825. RECURSIVE_() antlr.TerminalNode
  21826. REFERENCES_() antlr.TerminalNode
  21827. REGEXP_() antlr.TerminalNode
  21828. REINDEX_() antlr.TerminalNode
  21829. RELEASE_() antlr.TerminalNode
  21830. RENAME_() antlr.TerminalNode
  21831. REPLACE_() antlr.TerminalNode
  21832. RESTRICT_() antlr.TerminalNode
  21833. RETURNING_() antlr.TerminalNode
  21834. RIGHT_() antlr.TerminalNode
  21835. ROLLBACK_() antlr.TerminalNode
  21836. ROW_() antlr.TerminalNode
  21837. ROWS_() antlr.TerminalNode
  21838. SAVEPOINT_() antlr.TerminalNode
  21839. SELECT_() antlr.TerminalNode
  21840. SET_() antlr.TerminalNode
  21841. STRICT_() antlr.TerminalNode
  21842. TABLE_() antlr.TerminalNode
  21843. TEMP_() antlr.TerminalNode
  21844. TEMPORARY_() antlr.TerminalNode
  21845. THEN_() antlr.TerminalNode
  21846. TO_() antlr.TerminalNode
  21847. TRANSACTION_() antlr.TerminalNode
  21848. TRIGGER_() antlr.TerminalNode
  21849. UNION_() antlr.TerminalNode
  21850. UNIQUE_() antlr.TerminalNode
  21851. UPDATE_() antlr.TerminalNode
  21852. USING_() antlr.TerminalNode
  21853. VACUUM_() antlr.TerminalNode
  21854. VALUES_() antlr.TerminalNode
  21855. VIEW_() antlr.TerminalNode
  21856. VIRTUAL_() antlr.TerminalNode
  21857. WHEN_() antlr.TerminalNode
  21858. WHERE_() antlr.TerminalNode
  21859. WITH_() antlr.TerminalNode
  21860. WITHOUT_() antlr.TerminalNode
  21861. FIRST_VALUE_() antlr.TerminalNode
  21862. OVER_() antlr.TerminalNode
  21863. PARTITION_() antlr.TerminalNode
  21864. RANGE_() antlr.TerminalNode
  21865. PRECEDING_() antlr.TerminalNode
  21866. UNBOUNDED_() antlr.TerminalNode
  21867. CURRENT_() antlr.TerminalNode
  21868. FOLLOWING_() antlr.TerminalNode
  21869. CUME_DIST_() antlr.TerminalNode
  21870. DENSE_RANK_() antlr.TerminalNode
  21871. LAG_() antlr.TerminalNode
  21872. LAST_VALUE_() antlr.TerminalNode
  21873. LEAD_() antlr.TerminalNode
  21874. NTH_VALUE_() antlr.TerminalNode
  21875. NTILE_() antlr.TerminalNode
  21876. PERCENT_RANK_() antlr.TerminalNode
  21877. RANK_() antlr.TerminalNode
  21878. ROW_NUMBER_() antlr.TerminalNode
  21879. GENERATED_() antlr.TerminalNode
  21880. ALWAYS_() antlr.TerminalNode
  21881. STORED_() antlr.TerminalNode
  21882. TRUE_() antlr.TerminalNode
  21883. FALSE_() antlr.TerminalNode
  21884. WINDOW_() antlr.TerminalNode
  21885. NULLS_() antlr.TerminalNode
  21886. FIRST_() antlr.TerminalNode
  21887. LAST_() antlr.TerminalNode
  21888. FILTER_() antlr.TerminalNode
  21889. GROUPS_() antlr.TerminalNode
  21890. EXCLUDE_() antlr.TerminalNode
  21891. // IsKeywordContext differentiates from other interfaces.
  21892. IsKeywordContext()
  21893. }
  21894. type KeywordContext struct {
  21895. *antlr.BaseParserRuleContext
  21896. parser antlr.Parser
  21897. }
  21898. func NewEmptyKeywordContext() *KeywordContext {
  21899. var p = new(KeywordContext)
  21900. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  21901. p.RuleIndex = SQLiteParserRULE_keyword
  21902. return p
  21903. }
  21904. func (*KeywordContext) IsKeywordContext() {}
  21905. func NewKeywordContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *KeywordContext {
  21906. var p = new(KeywordContext)
  21907. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  21908. p.parser = parser
  21909. p.RuleIndex = SQLiteParserRULE_keyword
  21910. return p
  21911. }
  21912. func (s *KeywordContext) GetParser() antlr.Parser { return s.parser }
  21913. func (s *KeywordContext) ABORT_() antlr.TerminalNode {
  21914. return s.GetToken(SQLiteParserABORT_, 0)
  21915. }
  21916. func (s *KeywordContext) ACTION_() antlr.TerminalNode {
  21917. return s.GetToken(SQLiteParserACTION_, 0)
  21918. }
  21919. func (s *KeywordContext) ADD_() antlr.TerminalNode {
  21920. return s.GetToken(SQLiteParserADD_, 0)
  21921. }
  21922. func (s *KeywordContext) AFTER_() antlr.TerminalNode {
  21923. return s.GetToken(SQLiteParserAFTER_, 0)
  21924. }
  21925. func (s *KeywordContext) ALL_() antlr.TerminalNode {
  21926. return s.GetToken(SQLiteParserALL_, 0)
  21927. }
  21928. func (s *KeywordContext) ALTER_() antlr.TerminalNode {
  21929. return s.GetToken(SQLiteParserALTER_, 0)
  21930. }
  21931. func (s *KeywordContext) ANALYZE_() antlr.TerminalNode {
  21932. return s.GetToken(SQLiteParserANALYZE_, 0)
  21933. }
  21934. func (s *KeywordContext) AND_() antlr.TerminalNode {
  21935. return s.GetToken(SQLiteParserAND_, 0)
  21936. }
  21937. func (s *KeywordContext) AS_() antlr.TerminalNode {
  21938. return s.GetToken(SQLiteParserAS_, 0)
  21939. }
  21940. func (s *KeywordContext) ASC_() antlr.TerminalNode {
  21941. return s.GetToken(SQLiteParserASC_, 0)
  21942. }
  21943. func (s *KeywordContext) ATTACH_() antlr.TerminalNode {
  21944. return s.GetToken(SQLiteParserATTACH_, 0)
  21945. }
  21946. func (s *KeywordContext) AUTOINCREMENT_() antlr.TerminalNode {
  21947. return s.GetToken(SQLiteParserAUTOINCREMENT_, 0)
  21948. }
  21949. func (s *KeywordContext) BEFORE_() antlr.TerminalNode {
  21950. return s.GetToken(SQLiteParserBEFORE_, 0)
  21951. }
  21952. func (s *KeywordContext) BEGIN_() antlr.TerminalNode {
  21953. return s.GetToken(SQLiteParserBEGIN_, 0)
  21954. }
  21955. func (s *KeywordContext) BETWEEN_() antlr.TerminalNode {
  21956. return s.GetToken(SQLiteParserBETWEEN_, 0)
  21957. }
  21958. func (s *KeywordContext) BY_() antlr.TerminalNode {
  21959. return s.GetToken(SQLiteParserBY_, 0)
  21960. }
  21961. func (s *KeywordContext) CASCADE_() antlr.TerminalNode {
  21962. return s.GetToken(SQLiteParserCASCADE_, 0)
  21963. }
  21964. func (s *KeywordContext) CASE_() antlr.TerminalNode {
  21965. return s.GetToken(SQLiteParserCASE_, 0)
  21966. }
  21967. func (s *KeywordContext) CAST_() antlr.TerminalNode {
  21968. return s.GetToken(SQLiteParserCAST_, 0)
  21969. }
  21970. func (s *KeywordContext) CHECK_() antlr.TerminalNode {
  21971. return s.GetToken(SQLiteParserCHECK_, 0)
  21972. }
  21973. func (s *KeywordContext) COLLATE_() antlr.TerminalNode {
  21974. return s.GetToken(SQLiteParserCOLLATE_, 0)
  21975. }
  21976. func (s *KeywordContext) COLUMN_() antlr.TerminalNode {
  21977. return s.GetToken(SQLiteParserCOLUMN_, 0)
  21978. }
  21979. func (s *KeywordContext) COMMIT_() antlr.TerminalNode {
  21980. return s.GetToken(SQLiteParserCOMMIT_, 0)
  21981. }
  21982. func (s *KeywordContext) CONFLICT_() antlr.TerminalNode {
  21983. return s.GetToken(SQLiteParserCONFLICT_, 0)
  21984. }
  21985. func (s *KeywordContext) CONSTRAINT_() antlr.TerminalNode {
  21986. return s.GetToken(SQLiteParserCONSTRAINT_, 0)
  21987. }
  21988. func (s *KeywordContext) CREATE_() antlr.TerminalNode {
  21989. return s.GetToken(SQLiteParserCREATE_, 0)
  21990. }
  21991. func (s *KeywordContext) CROSS_() antlr.TerminalNode {
  21992. return s.GetToken(SQLiteParserCROSS_, 0)
  21993. }
  21994. func (s *KeywordContext) CURRENT_DATE_() antlr.TerminalNode {
  21995. return s.GetToken(SQLiteParserCURRENT_DATE_, 0)
  21996. }
  21997. func (s *KeywordContext) CURRENT_TIME_() antlr.TerminalNode {
  21998. return s.GetToken(SQLiteParserCURRENT_TIME_, 0)
  21999. }
  22000. func (s *KeywordContext) CURRENT_TIMESTAMP_() antlr.TerminalNode {
  22001. return s.GetToken(SQLiteParserCURRENT_TIMESTAMP_, 0)
  22002. }
  22003. func (s *KeywordContext) DATABASE_() antlr.TerminalNode {
  22004. return s.GetToken(SQLiteParserDATABASE_, 0)
  22005. }
  22006. func (s *KeywordContext) DEFAULT_() antlr.TerminalNode {
  22007. return s.GetToken(SQLiteParserDEFAULT_, 0)
  22008. }
  22009. func (s *KeywordContext) DEFERRABLE_() antlr.TerminalNode {
  22010. return s.GetToken(SQLiteParserDEFERRABLE_, 0)
  22011. }
  22012. func (s *KeywordContext) DEFERRED_() antlr.TerminalNode {
  22013. return s.GetToken(SQLiteParserDEFERRED_, 0)
  22014. }
  22015. func (s *KeywordContext) DELETE_() antlr.TerminalNode {
  22016. return s.GetToken(SQLiteParserDELETE_, 0)
  22017. }
  22018. func (s *KeywordContext) DESC_() antlr.TerminalNode {
  22019. return s.GetToken(SQLiteParserDESC_, 0)
  22020. }
  22021. func (s *KeywordContext) DETACH_() antlr.TerminalNode {
  22022. return s.GetToken(SQLiteParserDETACH_, 0)
  22023. }
  22024. func (s *KeywordContext) DISTINCT_() antlr.TerminalNode {
  22025. return s.GetToken(SQLiteParserDISTINCT_, 0)
  22026. }
  22027. func (s *KeywordContext) DROP_() antlr.TerminalNode {
  22028. return s.GetToken(SQLiteParserDROP_, 0)
  22029. }
  22030. func (s *KeywordContext) EACH_() antlr.TerminalNode {
  22031. return s.GetToken(SQLiteParserEACH_, 0)
  22032. }
  22033. func (s *KeywordContext) ELSE_() antlr.TerminalNode {
  22034. return s.GetToken(SQLiteParserELSE_, 0)
  22035. }
  22036. func (s *KeywordContext) END_() antlr.TerminalNode {
  22037. return s.GetToken(SQLiteParserEND_, 0)
  22038. }
  22039. func (s *KeywordContext) ESCAPE_() antlr.TerminalNode {
  22040. return s.GetToken(SQLiteParserESCAPE_, 0)
  22041. }
  22042. func (s *KeywordContext) EXCEPT_() antlr.TerminalNode {
  22043. return s.GetToken(SQLiteParserEXCEPT_, 0)
  22044. }
  22045. func (s *KeywordContext) EXCLUSIVE_() antlr.TerminalNode {
  22046. return s.GetToken(SQLiteParserEXCLUSIVE_, 0)
  22047. }
  22048. func (s *KeywordContext) EXISTS_() antlr.TerminalNode {
  22049. return s.GetToken(SQLiteParserEXISTS_, 0)
  22050. }
  22051. func (s *KeywordContext) EXPLAIN_() antlr.TerminalNode {
  22052. return s.GetToken(SQLiteParserEXPLAIN_, 0)
  22053. }
  22054. func (s *KeywordContext) FAIL_() antlr.TerminalNode {
  22055. return s.GetToken(SQLiteParserFAIL_, 0)
  22056. }
  22057. func (s *KeywordContext) FOR_() antlr.TerminalNode {
  22058. return s.GetToken(SQLiteParserFOR_, 0)
  22059. }
  22060. func (s *KeywordContext) FOREIGN_() antlr.TerminalNode {
  22061. return s.GetToken(SQLiteParserFOREIGN_, 0)
  22062. }
  22063. func (s *KeywordContext) FROM_() antlr.TerminalNode {
  22064. return s.GetToken(SQLiteParserFROM_, 0)
  22065. }
  22066. func (s *KeywordContext) FULL_() antlr.TerminalNode {
  22067. return s.GetToken(SQLiteParserFULL_, 0)
  22068. }
  22069. func (s *KeywordContext) GLOB_() antlr.TerminalNode {
  22070. return s.GetToken(SQLiteParserGLOB_, 0)
  22071. }
  22072. func (s *KeywordContext) GROUP_() antlr.TerminalNode {
  22073. return s.GetToken(SQLiteParserGROUP_, 0)
  22074. }
  22075. func (s *KeywordContext) HAVING_() antlr.TerminalNode {
  22076. return s.GetToken(SQLiteParserHAVING_, 0)
  22077. }
  22078. func (s *KeywordContext) IF_() antlr.TerminalNode {
  22079. return s.GetToken(SQLiteParserIF_, 0)
  22080. }
  22081. func (s *KeywordContext) IGNORE_() antlr.TerminalNode {
  22082. return s.GetToken(SQLiteParserIGNORE_, 0)
  22083. }
  22084. func (s *KeywordContext) IMMEDIATE_() antlr.TerminalNode {
  22085. return s.GetToken(SQLiteParserIMMEDIATE_, 0)
  22086. }
  22087. func (s *KeywordContext) IN_() antlr.TerminalNode {
  22088. return s.GetToken(SQLiteParserIN_, 0)
  22089. }
  22090. func (s *KeywordContext) INDEX_() antlr.TerminalNode {
  22091. return s.GetToken(SQLiteParserINDEX_, 0)
  22092. }
  22093. func (s *KeywordContext) INDEXED_() antlr.TerminalNode {
  22094. return s.GetToken(SQLiteParserINDEXED_, 0)
  22095. }
  22096. func (s *KeywordContext) INITIALLY_() antlr.TerminalNode {
  22097. return s.GetToken(SQLiteParserINITIALLY_, 0)
  22098. }
  22099. func (s *KeywordContext) INNER_() antlr.TerminalNode {
  22100. return s.GetToken(SQLiteParserINNER_, 0)
  22101. }
  22102. func (s *KeywordContext) INSERT_() antlr.TerminalNode {
  22103. return s.GetToken(SQLiteParserINSERT_, 0)
  22104. }
  22105. func (s *KeywordContext) INSTEAD_() antlr.TerminalNode {
  22106. return s.GetToken(SQLiteParserINSTEAD_, 0)
  22107. }
  22108. func (s *KeywordContext) INTERSECT_() antlr.TerminalNode {
  22109. return s.GetToken(SQLiteParserINTERSECT_, 0)
  22110. }
  22111. func (s *KeywordContext) INTO_() antlr.TerminalNode {
  22112. return s.GetToken(SQLiteParserINTO_, 0)
  22113. }
  22114. func (s *KeywordContext) IS_() antlr.TerminalNode {
  22115. return s.GetToken(SQLiteParserIS_, 0)
  22116. }
  22117. func (s *KeywordContext) ISNULL_() antlr.TerminalNode {
  22118. return s.GetToken(SQLiteParserISNULL_, 0)
  22119. }
  22120. func (s *KeywordContext) JOIN_() antlr.TerminalNode {
  22121. return s.GetToken(SQLiteParserJOIN_, 0)
  22122. }
  22123. func (s *KeywordContext) KEY_() antlr.TerminalNode {
  22124. return s.GetToken(SQLiteParserKEY_, 0)
  22125. }
  22126. func (s *KeywordContext) LEFT_() antlr.TerminalNode {
  22127. return s.GetToken(SQLiteParserLEFT_, 0)
  22128. }
  22129. func (s *KeywordContext) LIKE_() antlr.TerminalNode {
  22130. return s.GetToken(SQLiteParserLIKE_, 0)
  22131. }
  22132. func (s *KeywordContext) LIMIT_() antlr.TerminalNode {
  22133. return s.GetToken(SQLiteParserLIMIT_, 0)
  22134. }
  22135. func (s *KeywordContext) MATCH_() antlr.TerminalNode {
  22136. return s.GetToken(SQLiteParserMATCH_, 0)
  22137. }
  22138. func (s *KeywordContext) NATURAL_() antlr.TerminalNode {
  22139. return s.GetToken(SQLiteParserNATURAL_, 0)
  22140. }
  22141. func (s *KeywordContext) NO_() antlr.TerminalNode {
  22142. return s.GetToken(SQLiteParserNO_, 0)
  22143. }
  22144. func (s *KeywordContext) NOT_() antlr.TerminalNode {
  22145. return s.GetToken(SQLiteParserNOT_, 0)
  22146. }
  22147. func (s *KeywordContext) NOTNULL_() antlr.TerminalNode {
  22148. return s.GetToken(SQLiteParserNOTNULL_, 0)
  22149. }
  22150. func (s *KeywordContext) NULL_() antlr.TerminalNode {
  22151. return s.GetToken(SQLiteParserNULL_, 0)
  22152. }
  22153. func (s *KeywordContext) OF_() antlr.TerminalNode {
  22154. return s.GetToken(SQLiteParserOF_, 0)
  22155. }
  22156. func (s *KeywordContext) OFFSET_() antlr.TerminalNode {
  22157. return s.GetToken(SQLiteParserOFFSET_, 0)
  22158. }
  22159. func (s *KeywordContext) ON_() antlr.TerminalNode {
  22160. return s.GetToken(SQLiteParserON_, 0)
  22161. }
  22162. func (s *KeywordContext) OR_() antlr.TerminalNode {
  22163. return s.GetToken(SQLiteParserOR_, 0)
  22164. }
  22165. func (s *KeywordContext) ORDER_() antlr.TerminalNode {
  22166. return s.GetToken(SQLiteParserORDER_, 0)
  22167. }
  22168. func (s *KeywordContext) OUTER_() antlr.TerminalNode {
  22169. return s.GetToken(SQLiteParserOUTER_, 0)
  22170. }
  22171. func (s *KeywordContext) PLAN_() antlr.TerminalNode {
  22172. return s.GetToken(SQLiteParserPLAN_, 0)
  22173. }
  22174. func (s *KeywordContext) PRAGMA_() antlr.TerminalNode {
  22175. return s.GetToken(SQLiteParserPRAGMA_, 0)
  22176. }
  22177. func (s *KeywordContext) PRIMARY_() antlr.TerminalNode {
  22178. return s.GetToken(SQLiteParserPRIMARY_, 0)
  22179. }
  22180. func (s *KeywordContext) QUERY_() antlr.TerminalNode {
  22181. return s.GetToken(SQLiteParserQUERY_, 0)
  22182. }
  22183. func (s *KeywordContext) RAISE_() antlr.TerminalNode {
  22184. return s.GetToken(SQLiteParserRAISE_, 0)
  22185. }
  22186. func (s *KeywordContext) RECURSIVE_() antlr.TerminalNode {
  22187. return s.GetToken(SQLiteParserRECURSIVE_, 0)
  22188. }
  22189. func (s *KeywordContext) REFERENCES_() antlr.TerminalNode {
  22190. return s.GetToken(SQLiteParserREFERENCES_, 0)
  22191. }
  22192. func (s *KeywordContext) REGEXP_() antlr.TerminalNode {
  22193. return s.GetToken(SQLiteParserREGEXP_, 0)
  22194. }
  22195. func (s *KeywordContext) REINDEX_() antlr.TerminalNode {
  22196. return s.GetToken(SQLiteParserREINDEX_, 0)
  22197. }
  22198. func (s *KeywordContext) RELEASE_() antlr.TerminalNode {
  22199. return s.GetToken(SQLiteParserRELEASE_, 0)
  22200. }
  22201. func (s *KeywordContext) RENAME_() antlr.TerminalNode {
  22202. return s.GetToken(SQLiteParserRENAME_, 0)
  22203. }
  22204. func (s *KeywordContext) REPLACE_() antlr.TerminalNode {
  22205. return s.GetToken(SQLiteParserREPLACE_, 0)
  22206. }
  22207. func (s *KeywordContext) RESTRICT_() antlr.TerminalNode {
  22208. return s.GetToken(SQLiteParserRESTRICT_, 0)
  22209. }
  22210. func (s *KeywordContext) RETURNING_() antlr.TerminalNode {
  22211. return s.GetToken(SQLiteParserRETURNING_, 0)
  22212. }
  22213. func (s *KeywordContext) RIGHT_() antlr.TerminalNode {
  22214. return s.GetToken(SQLiteParserRIGHT_, 0)
  22215. }
  22216. func (s *KeywordContext) ROLLBACK_() antlr.TerminalNode {
  22217. return s.GetToken(SQLiteParserROLLBACK_, 0)
  22218. }
  22219. func (s *KeywordContext) ROW_() antlr.TerminalNode {
  22220. return s.GetToken(SQLiteParserROW_, 0)
  22221. }
  22222. func (s *KeywordContext) ROWS_() antlr.TerminalNode {
  22223. return s.GetToken(SQLiteParserROWS_, 0)
  22224. }
  22225. func (s *KeywordContext) SAVEPOINT_() antlr.TerminalNode {
  22226. return s.GetToken(SQLiteParserSAVEPOINT_, 0)
  22227. }
  22228. func (s *KeywordContext) SELECT_() antlr.TerminalNode {
  22229. return s.GetToken(SQLiteParserSELECT_, 0)
  22230. }
  22231. func (s *KeywordContext) SET_() antlr.TerminalNode {
  22232. return s.GetToken(SQLiteParserSET_, 0)
  22233. }
  22234. func (s *KeywordContext) STRICT_() antlr.TerminalNode {
  22235. return s.GetToken(SQLiteParserSTRICT_, 0)
  22236. }
  22237. func (s *KeywordContext) TABLE_() antlr.TerminalNode {
  22238. return s.GetToken(SQLiteParserTABLE_, 0)
  22239. }
  22240. func (s *KeywordContext) TEMP_() antlr.TerminalNode {
  22241. return s.GetToken(SQLiteParserTEMP_, 0)
  22242. }
  22243. func (s *KeywordContext) TEMPORARY_() antlr.TerminalNode {
  22244. return s.GetToken(SQLiteParserTEMPORARY_, 0)
  22245. }
  22246. func (s *KeywordContext) THEN_() antlr.TerminalNode {
  22247. return s.GetToken(SQLiteParserTHEN_, 0)
  22248. }
  22249. func (s *KeywordContext) TO_() antlr.TerminalNode {
  22250. return s.GetToken(SQLiteParserTO_, 0)
  22251. }
  22252. func (s *KeywordContext) TRANSACTION_() antlr.TerminalNode {
  22253. return s.GetToken(SQLiteParserTRANSACTION_, 0)
  22254. }
  22255. func (s *KeywordContext) TRIGGER_() antlr.TerminalNode {
  22256. return s.GetToken(SQLiteParserTRIGGER_, 0)
  22257. }
  22258. func (s *KeywordContext) UNION_() antlr.TerminalNode {
  22259. return s.GetToken(SQLiteParserUNION_, 0)
  22260. }
  22261. func (s *KeywordContext) UNIQUE_() antlr.TerminalNode {
  22262. return s.GetToken(SQLiteParserUNIQUE_, 0)
  22263. }
  22264. func (s *KeywordContext) UPDATE_() antlr.TerminalNode {
  22265. return s.GetToken(SQLiteParserUPDATE_, 0)
  22266. }
  22267. func (s *KeywordContext) USING_() antlr.TerminalNode {
  22268. return s.GetToken(SQLiteParserUSING_, 0)
  22269. }
  22270. func (s *KeywordContext) VACUUM_() antlr.TerminalNode {
  22271. return s.GetToken(SQLiteParserVACUUM_, 0)
  22272. }
  22273. func (s *KeywordContext) VALUES_() antlr.TerminalNode {
  22274. return s.GetToken(SQLiteParserVALUES_, 0)
  22275. }
  22276. func (s *KeywordContext) VIEW_() antlr.TerminalNode {
  22277. return s.GetToken(SQLiteParserVIEW_, 0)
  22278. }
  22279. func (s *KeywordContext) VIRTUAL_() antlr.TerminalNode {
  22280. return s.GetToken(SQLiteParserVIRTUAL_, 0)
  22281. }
  22282. func (s *KeywordContext) WHEN_() antlr.TerminalNode {
  22283. return s.GetToken(SQLiteParserWHEN_, 0)
  22284. }
  22285. func (s *KeywordContext) WHERE_() antlr.TerminalNode {
  22286. return s.GetToken(SQLiteParserWHERE_, 0)
  22287. }
  22288. func (s *KeywordContext) WITH_() antlr.TerminalNode {
  22289. return s.GetToken(SQLiteParserWITH_, 0)
  22290. }
  22291. func (s *KeywordContext) WITHOUT_() antlr.TerminalNode {
  22292. return s.GetToken(SQLiteParserWITHOUT_, 0)
  22293. }
  22294. func (s *KeywordContext) FIRST_VALUE_() antlr.TerminalNode {
  22295. return s.GetToken(SQLiteParserFIRST_VALUE_, 0)
  22296. }
  22297. func (s *KeywordContext) OVER_() antlr.TerminalNode {
  22298. return s.GetToken(SQLiteParserOVER_, 0)
  22299. }
  22300. func (s *KeywordContext) PARTITION_() antlr.TerminalNode {
  22301. return s.GetToken(SQLiteParserPARTITION_, 0)
  22302. }
  22303. func (s *KeywordContext) RANGE_() antlr.TerminalNode {
  22304. return s.GetToken(SQLiteParserRANGE_, 0)
  22305. }
  22306. func (s *KeywordContext) PRECEDING_() antlr.TerminalNode {
  22307. return s.GetToken(SQLiteParserPRECEDING_, 0)
  22308. }
  22309. func (s *KeywordContext) UNBOUNDED_() antlr.TerminalNode {
  22310. return s.GetToken(SQLiteParserUNBOUNDED_, 0)
  22311. }
  22312. func (s *KeywordContext) CURRENT_() antlr.TerminalNode {
  22313. return s.GetToken(SQLiteParserCURRENT_, 0)
  22314. }
  22315. func (s *KeywordContext) FOLLOWING_() antlr.TerminalNode {
  22316. return s.GetToken(SQLiteParserFOLLOWING_, 0)
  22317. }
  22318. func (s *KeywordContext) CUME_DIST_() antlr.TerminalNode {
  22319. return s.GetToken(SQLiteParserCUME_DIST_, 0)
  22320. }
  22321. func (s *KeywordContext) DENSE_RANK_() antlr.TerminalNode {
  22322. return s.GetToken(SQLiteParserDENSE_RANK_, 0)
  22323. }
  22324. func (s *KeywordContext) LAG_() antlr.TerminalNode {
  22325. return s.GetToken(SQLiteParserLAG_, 0)
  22326. }
  22327. func (s *KeywordContext) LAST_VALUE_() antlr.TerminalNode {
  22328. return s.GetToken(SQLiteParserLAST_VALUE_, 0)
  22329. }
  22330. func (s *KeywordContext) LEAD_() antlr.TerminalNode {
  22331. return s.GetToken(SQLiteParserLEAD_, 0)
  22332. }
  22333. func (s *KeywordContext) NTH_VALUE_() antlr.TerminalNode {
  22334. return s.GetToken(SQLiteParserNTH_VALUE_, 0)
  22335. }
  22336. func (s *KeywordContext) NTILE_() antlr.TerminalNode {
  22337. return s.GetToken(SQLiteParserNTILE_, 0)
  22338. }
  22339. func (s *KeywordContext) PERCENT_RANK_() antlr.TerminalNode {
  22340. return s.GetToken(SQLiteParserPERCENT_RANK_, 0)
  22341. }
  22342. func (s *KeywordContext) RANK_() antlr.TerminalNode {
  22343. return s.GetToken(SQLiteParserRANK_, 0)
  22344. }
  22345. func (s *KeywordContext) ROW_NUMBER_() antlr.TerminalNode {
  22346. return s.GetToken(SQLiteParserROW_NUMBER_, 0)
  22347. }
  22348. func (s *KeywordContext) GENERATED_() antlr.TerminalNode {
  22349. return s.GetToken(SQLiteParserGENERATED_, 0)
  22350. }
  22351. func (s *KeywordContext) ALWAYS_() antlr.TerminalNode {
  22352. return s.GetToken(SQLiteParserALWAYS_, 0)
  22353. }
  22354. func (s *KeywordContext) STORED_() antlr.TerminalNode {
  22355. return s.GetToken(SQLiteParserSTORED_, 0)
  22356. }
  22357. func (s *KeywordContext) TRUE_() antlr.TerminalNode {
  22358. return s.GetToken(SQLiteParserTRUE_, 0)
  22359. }
  22360. func (s *KeywordContext) FALSE_() antlr.TerminalNode {
  22361. return s.GetToken(SQLiteParserFALSE_, 0)
  22362. }
  22363. func (s *KeywordContext) WINDOW_() antlr.TerminalNode {
  22364. return s.GetToken(SQLiteParserWINDOW_, 0)
  22365. }
  22366. func (s *KeywordContext) NULLS_() antlr.TerminalNode {
  22367. return s.GetToken(SQLiteParserNULLS_, 0)
  22368. }
  22369. func (s *KeywordContext) FIRST_() antlr.TerminalNode {
  22370. return s.GetToken(SQLiteParserFIRST_, 0)
  22371. }
  22372. func (s *KeywordContext) LAST_() antlr.TerminalNode {
  22373. return s.GetToken(SQLiteParserLAST_, 0)
  22374. }
  22375. func (s *KeywordContext) FILTER_() antlr.TerminalNode {
  22376. return s.GetToken(SQLiteParserFILTER_, 0)
  22377. }
  22378. func (s *KeywordContext) GROUPS_() antlr.TerminalNode {
  22379. return s.GetToken(SQLiteParserGROUPS_, 0)
  22380. }
  22381. func (s *KeywordContext) EXCLUDE_() antlr.TerminalNode {
  22382. return s.GetToken(SQLiteParserEXCLUDE_, 0)
  22383. }
  22384. func (s *KeywordContext) GetRuleContext() antlr.RuleContext {
  22385. return s
  22386. }
  22387. func (s *KeywordContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  22388. return antlr.TreesStringTree(s, ruleNames, recog)
  22389. }
  22390. func (s *KeywordContext) EnterRule(listener antlr.ParseTreeListener) {
  22391. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22392. listenerT.EnterKeyword(s)
  22393. }
  22394. }
  22395. func (s *KeywordContext) ExitRule(listener antlr.ParseTreeListener) {
  22396. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22397. listenerT.ExitKeyword(s)
  22398. }
  22399. }
  22400. func (p *SQLiteParser) Keyword() (localctx IKeywordContext) {
  22401. this := p
  22402. _ = this
  22403. localctx = NewKeywordContext(p, p.GetParserRuleContext(), p.GetState())
  22404. p.EnterRule(localctx, 174, SQLiteParserRULE_keyword)
  22405. var _la int
  22406. defer func() {
  22407. p.ExitRule()
  22408. }()
  22409. defer func() {
  22410. if err := recover(); err != nil {
  22411. if v, ok := err.(antlr.RecognitionException); ok {
  22412. localctx.SetException(v)
  22413. p.GetErrorHandler().ReportError(p, v)
  22414. p.GetErrorHandler().Recover(p, v)
  22415. } else {
  22416. panic(err)
  22417. }
  22418. }
  22419. }()
  22420. p.EnterOuterAlt(localctx, 1)
  22421. {
  22422. p.SetState(2109)
  22423. _la = p.GetTokenStream().LA(1)
  22424. if !(((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-134217728) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&-1) != 0) || ((int64((_la-128)) & ^0x3f) == 0 && ((int64(1)<<(_la-128))&72057594037927935) != 0)) {
  22425. p.GetErrorHandler().RecoverInline(p)
  22426. } else {
  22427. p.GetErrorHandler().ReportMatch(p)
  22428. p.Consume()
  22429. }
  22430. }
  22431. return localctx
  22432. }
  22433. // INameContext is an interface to support dynamic dispatch.
  22434. type INameContext interface {
  22435. antlr.ParserRuleContext
  22436. // GetParser returns the parser.
  22437. GetParser() antlr.Parser
  22438. // Getter signatures
  22439. Any_name() IAny_nameContext
  22440. // IsNameContext differentiates from other interfaces.
  22441. IsNameContext()
  22442. }
  22443. type NameContext struct {
  22444. *antlr.BaseParserRuleContext
  22445. parser antlr.Parser
  22446. }
  22447. func NewEmptyNameContext() *NameContext {
  22448. var p = new(NameContext)
  22449. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  22450. p.RuleIndex = SQLiteParserRULE_name
  22451. return p
  22452. }
  22453. func (*NameContext) IsNameContext() {}
  22454. func NewNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NameContext {
  22455. var p = new(NameContext)
  22456. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  22457. p.parser = parser
  22458. p.RuleIndex = SQLiteParserRULE_name
  22459. return p
  22460. }
  22461. func (s *NameContext) GetParser() antlr.Parser { return s.parser }
  22462. func (s *NameContext) Any_name() IAny_nameContext {
  22463. var t antlr.RuleContext
  22464. for _, ctx := range s.GetChildren() {
  22465. if _, ok := ctx.(IAny_nameContext); ok {
  22466. t = ctx.(antlr.RuleContext)
  22467. break
  22468. }
  22469. }
  22470. if t == nil {
  22471. return nil
  22472. }
  22473. return t.(IAny_nameContext)
  22474. }
  22475. func (s *NameContext) GetRuleContext() antlr.RuleContext {
  22476. return s
  22477. }
  22478. func (s *NameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  22479. return antlr.TreesStringTree(s, ruleNames, recog)
  22480. }
  22481. func (s *NameContext) EnterRule(listener antlr.ParseTreeListener) {
  22482. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22483. listenerT.EnterName(s)
  22484. }
  22485. }
  22486. func (s *NameContext) ExitRule(listener antlr.ParseTreeListener) {
  22487. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22488. listenerT.ExitName(s)
  22489. }
  22490. }
  22491. func (p *SQLiteParser) Name() (localctx INameContext) {
  22492. this := p
  22493. _ = this
  22494. localctx = NewNameContext(p, p.GetParserRuleContext(), p.GetState())
  22495. p.EnterRule(localctx, 176, SQLiteParserRULE_name)
  22496. defer func() {
  22497. p.ExitRule()
  22498. }()
  22499. defer func() {
  22500. if err := recover(); err != nil {
  22501. if v, ok := err.(antlr.RecognitionException); ok {
  22502. localctx.SetException(v)
  22503. p.GetErrorHandler().ReportError(p, v)
  22504. p.GetErrorHandler().Recover(p, v)
  22505. } else {
  22506. panic(err)
  22507. }
  22508. }
  22509. }()
  22510. p.EnterOuterAlt(localctx, 1)
  22511. {
  22512. p.SetState(2111)
  22513. p.Any_name()
  22514. }
  22515. return localctx
  22516. }
  22517. // IFunction_nameContext is an interface to support dynamic dispatch.
  22518. type IFunction_nameContext interface {
  22519. antlr.ParserRuleContext
  22520. // GetParser returns the parser.
  22521. GetParser() antlr.Parser
  22522. // Getter signatures
  22523. Any_name() IAny_nameContext
  22524. // IsFunction_nameContext differentiates from other interfaces.
  22525. IsFunction_nameContext()
  22526. }
  22527. type Function_nameContext struct {
  22528. *antlr.BaseParserRuleContext
  22529. parser antlr.Parser
  22530. }
  22531. func NewEmptyFunction_nameContext() *Function_nameContext {
  22532. var p = new(Function_nameContext)
  22533. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  22534. p.RuleIndex = SQLiteParserRULE_function_name
  22535. return p
  22536. }
  22537. func (*Function_nameContext) IsFunction_nameContext() {}
  22538. func NewFunction_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Function_nameContext {
  22539. var p = new(Function_nameContext)
  22540. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  22541. p.parser = parser
  22542. p.RuleIndex = SQLiteParserRULE_function_name
  22543. return p
  22544. }
  22545. func (s *Function_nameContext) GetParser() antlr.Parser { return s.parser }
  22546. func (s *Function_nameContext) Any_name() IAny_nameContext {
  22547. var t antlr.RuleContext
  22548. for _, ctx := range s.GetChildren() {
  22549. if _, ok := ctx.(IAny_nameContext); ok {
  22550. t = ctx.(antlr.RuleContext)
  22551. break
  22552. }
  22553. }
  22554. if t == nil {
  22555. return nil
  22556. }
  22557. return t.(IAny_nameContext)
  22558. }
  22559. func (s *Function_nameContext) GetRuleContext() antlr.RuleContext {
  22560. return s
  22561. }
  22562. func (s *Function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  22563. return antlr.TreesStringTree(s, ruleNames, recog)
  22564. }
  22565. func (s *Function_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  22566. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22567. listenerT.EnterFunction_name(s)
  22568. }
  22569. }
  22570. func (s *Function_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  22571. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22572. listenerT.ExitFunction_name(s)
  22573. }
  22574. }
  22575. func (p *SQLiteParser) Function_name() (localctx IFunction_nameContext) {
  22576. this := p
  22577. _ = this
  22578. localctx = NewFunction_nameContext(p, p.GetParserRuleContext(), p.GetState())
  22579. p.EnterRule(localctx, 178, SQLiteParserRULE_function_name)
  22580. defer func() {
  22581. p.ExitRule()
  22582. }()
  22583. defer func() {
  22584. if err := recover(); err != nil {
  22585. if v, ok := err.(antlr.RecognitionException); ok {
  22586. localctx.SetException(v)
  22587. p.GetErrorHandler().ReportError(p, v)
  22588. p.GetErrorHandler().Recover(p, v)
  22589. } else {
  22590. panic(err)
  22591. }
  22592. }
  22593. }()
  22594. p.EnterOuterAlt(localctx, 1)
  22595. {
  22596. p.SetState(2113)
  22597. p.Any_name()
  22598. }
  22599. return localctx
  22600. }
  22601. // IQualified_function_nameContext is an interface to support dynamic dispatch.
  22602. type IQualified_function_nameContext interface {
  22603. antlr.ParserRuleContext
  22604. // GetParser returns the parser.
  22605. GetParser() antlr.Parser
  22606. // Getter signatures
  22607. Function_name() IFunction_nameContext
  22608. Schema_name() ISchema_nameContext
  22609. DOT() antlr.TerminalNode
  22610. // IsQualified_function_nameContext differentiates from other interfaces.
  22611. IsQualified_function_nameContext()
  22612. }
  22613. type Qualified_function_nameContext struct {
  22614. *antlr.BaseParserRuleContext
  22615. parser antlr.Parser
  22616. }
  22617. func NewEmptyQualified_function_nameContext() *Qualified_function_nameContext {
  22618. var p = new(Qualified_function_nameContext)
  22619. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  22620. p.RuleIndex = SQLiteParserRULE_qualified_function_name
  22621. return p
  22622. }
  22623. func (*Qualified_function_nameContext) IsQualified_function_nameContext() {}
  22624. func NewQualified_function_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Qualified_function_nameContext {
  22625. var p = new(Qualified_function_nameContext)
  22626. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  22627. p.parser = parser
  22628. p.RuleIndex = SQLiteParserRULE_qualified_function_name
  22629. return p
  22630. }
  22631. func (s *Qualified_function_nameContext) GetParser() antlr.Parser { return s.parser }
  22632. func (s *Qualified_function_nameContext) Function_name() IFunction_nameContext {
  22633. var t antlr.RuleContext
  22634. for _, ctx := range s.GetChildren() {
  22635. if _, ok := ctx.(IFunction_nameContext); ok {
  22636. t = ctx.(antlr.RuleContext)
  22637. break
  22638. }
  22639. }
  22640. if t == nil {
  22641. return nil
  22642. }
  22643. return t.(IFunction_nameContext)
  22644. }
  22645. func (s *Qualified_function_nameContext) Schema_name() ISchema_nameContext {
  22646. var t antlr.RuleContext
  22647. for _, ctx := range s.GetChildren() {
  22648. if _, ok := ctx.(ISchema_nameContext); ok {
  22649. t = ctx.(antlr.RuleContext)
  22650. break
  22651. }
  22652. }
  22653. if t == nil {
  22654. return nil
  22655. }
  22656. return t.(ISchema_nameContext)
  22657. }
  22658. func (s *Qualified_function_nameContext) DOT() antlr.TerminalNode {
  22659. return s.GetToken(SQLiteParserDOT, 0)
  22660. }
  22661. func (s *Qualified_function_nameContext) GetRuleContext() antlr.RuleContext {
  22662. return s
  22663. }
  22664. func (s *Qualified_function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  22665. return antlr.TreesStringTree(s, ruleNames, recog)
  22666. }
  22667. func (s *Qualified_function_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  22668. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22669. listenerT.EnterQualified_function_name(s)
  22670. }
  22671. }
  22672. func (s *Qualified_function_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  22673. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22674. listenerT.ExitQualified_function_name(s)
  22675. }
  22676. }
  22677. func (p *SQLiteParser) Qualified_function_name() (localctx IQualified_function_nameContext) {
  22678. this := p
  22679. _ = this
  22680. localctx = NewQualified_function_nameContext(p, p.GetParserRuleContext(), p.GetState())
  22681. p.EnterRule(localctx, 180, SQLiteParserRULE_qualified_function_name)
  22682. defer func() {
  22683. p.ExitRule()
  22684. }()
  22685. defer func() {
  22686. if err := recover(); err != nil {
  22687. if v, ok := err.(antlr.RecognitionException); ok {
  22688. localctx.SetException(v)
  22689. p.GetErrorHandler().ReportError(p, v)
  22690. p.GetErrorHandler().Recover(p, v)
  22691. } else {
  22692. panic(err)
  22693. }
  22694. }
  22695. }()
  22696. p.EnterOuterAlt(localctx, 1)
  22697. p.SetState(2118)
  22698. p.GetErrorHandler().Sync(p)
  22699. if p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 312, p.GetParserRuleContext()) == 1 {
  22700. {
  22701. p.SetState(2115)
  22702. p.Schema_name()
  22703. }
  22704. {
  22705. p.SetState(2116)
  22706. p.Match(SQLiteParserDOT)
  22707. }
  22708. }
  22709. {
  22710. p.SetState(2120)
  22711. p.Function_name()
  22712. }
  22713. return localctx
  22714. }
  22715. // ISchema_nameContext is an interface to support dynamic dispatch.
  22716. type ISchema_nameContext interface {
  22717. antlr.ParserRuleContext
  22718. // GetParser returns the parser.
  22719. GetParser() antlr.Parser
  22720. // Getter signatures
  22721. Any_name() IAny_nameContext
  22722. // IsSchema_nameContext differentiates from other interfaces.
  22723. IsSchema_nameContext()
  22724. }
  22725. type Schema_nameContext struct {
  22726. *antlr.BaseParserRuleContext
  22727. parser antlr.Parser
  22728. }
  22729. func NewEmptySchema_nameContext() *Schema_nameContext {
  22730. var p = new(Schema_nameContext)
  22731. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  22732. p.RuleIndex = SQLiteParserRULE_schema_name
  22733. return p
  22734. }
  22735. func (*Schema_nameContext) IsSchema_nameContext() {}
  22736. func NewSchema_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Schema_nameContext {
  22737. var p = new(Schema_nameContext)
  22738. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  22739. p.parser = parser
  22740. p.RuleIndex = SQLiteParserRULE_schema_name
  22741. return p
  22742. }
  22743. func (s *Schema_nameContext) GetParser() antlr.Parser { return s.parser }
  22744. func (s *Schema_nameContext) Any_name() IAny_nameContext {
  22745. var t antlr.RuleContext
  22746. for _, ctx := range s.GetChildren() {
  22747. if _, ok := ctx.(IAny_nameContext); ok {
  22748. t = ctx.(antlr.RuleContext)
  22749. break
  22750. }
  22751. }
  22752. if t == nil {
  22753. return nil
  22754. }
  22755. return t.(IAny_nameContext)
  22756. }
  22757. func (s *Schema_nameContext) GetRuleContext() antlr.RuleContext {
  22758. return s
  22759. }
  22760. func (s *Schema_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  22761. return antlr.TreesStringTree(s, ruleNames, recog)
  22762. }
  22763. func (s *Schema_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  22764. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22765. listenerT.EnterSchema_name(s)
  22766. }
  22767. }
  22768. func (s *Schema_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  22769. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22770. listenerT.ExitSchema_name(s)
  22771. }
  22772. }
  22773. func (p *SQLiteParser) Schema_name() (localctx ISchema_nameContext) {
  22774. this := p
  22775. _ = this
  22776. localctx = NewSchema_nameContext(p, p.GetParserRuleContext(), p.GetState())
  22777. p.EnterRule(localctx, 182, SQLiteParserRULE_schema_name)
  22778. defer func() {
  22779. p.ExitRule()
  22780. }()
  22781. defer func() {
  22782. if err := recover(); err != nil {
  22783. if v, ok := err.(antlr.RecognitionException); ok {
  22784. localctx.SetException(v)
  22785. p.GetErrorHandler().ReportError(p, v)
  22786. p.GetErrorHandler().Recover(p, v)
  22787. } else {
  22788. panic(err)
  22789. }
  22790. }
  22791. }()
  22792. p.EnterOuterAlt(localctx, 1)
  22793. {
  22794. p.SetState(2122)
  22795. p.Any_name()
  22796. }
  22797. return localctx
  22798. }
  22799. // ITable_nameContext is an interface to support dynamic dispatch.
  22800. type ITable_nameContext interface {
  22801. antlr.ParserRuleContext
  22802. // GetParser returns the parser.
  22803. GetParser() antlr.Parser
  22804. // Getter signatures
  22805. Any_name() IAny_nameContext
  22806. // IsTable_nameContext differentiates from other interfaces.
  22807. IsTable_nameContext()
  22808. }
  22809. type Table_nameContext struct {
  22810. *antlr.BaseParserRuleContext
  22811. parser antlr.Parser
  22812. }
  22813. func NewEmptyTable_nameContext() *Table_nameContext {
  22814. var p = new(Table_nameContext)
  22815. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  22816. p.RuleIndex = SQLiteParserRULE_table_name
  22817. return p
  22818. }
  22819. func (*Table_nameContext) IsTable_nameContext() {}
  22820. func NewTable_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_nameContext {
  22821. var p = new(Table_nameContext)
  22822. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  22823. p.parser = parser
  22824. p.RuleIndex = SQLiteParserRULE_table_name
  22825. return p
  22826. }
  22827. func (s *Table_nameContext) GetParser() antlr.Parser { return s.parser }
  22828. func (s *Table_nameContext) Any_name() IAny_nameContext {
  22829. var t antlr.RuleContext
  22830. for _, ctx := range s.GetChildren() {
  22831. if _, ok := ctx.(IAny_nameContext); ok {
  22832. t = ctx.(antlr.RuleContext)
  22833. break
  22834. }
  22835. }
  22836. if t == nil {
  22837. return nil
  22838. }
  22839. return t.(IAny_nameContext)
  22840. }
  22841. func (s *Table_nameContext) GetRuleContext() antlr.RuleContext {
  22842. return s
  22843. }
  22844. func (s *Table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  22845. return antlr.TreesStringTree(s, ruleNames, recog)
  22846. }
  22847. func (s *Table_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  22848. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22849. listenerT.EnterTable_name(s)
  22850. }
  22851. }
  22852. func (s *Table_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  22853. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22854. listenerT.ExitTable_name(s)
  22855. }
  22856. }
  22857. func (p *SQLiteParser) Table_name() (localctx ITable_nameContext) {
  22858. this := p
  22859. _ = this
  22860. localctx = NewTable_nameContext(p, p.GetParserRuleContext(), p.GetState())
  22861. p.EnterRule(localctx, 184, SQLiteParserRULE_table_name)
  22862. defer func() {
  22863. p.ExitRule()
  22864. }()
  22865. defer func() {
  22866. if err := recover(); err != nil {
  22867. if v, ok := err.(antlr.RecognitionException); ok {
  22868. localctx.SetException(v)
  22869. p.GetErrorHandler().ReportError(p, v)
  22870. p.GetErrorHandler().Recover(p, v)
  22871. } else {
  22872. panic(err)
  22873. }
  22874. }
  22875. }()
  22876. p.EnterOuterAlt(localctx, 1)
  22877. {
  22878. p.SetState(2124)
  22879. p.Any_name()
  22880. }
  22881. return localctx
  22882. }
  22883. // ITable_or_index_nameContext is an interface to support dynamic dispatch.
  22884. type ITable_or_index_nameContext interface {
  22885. antlr.ParserRuleContext
  22886. // GetParser returns the parser.
  22887. GetParser() antlr.Parser
  22888. // Getter signatures
  22889. Any_name() IAny_nameContext
  22890. // IsTable_or_index_nameContext differentiates from other interfaces.
  22891. IsTable_or_index_nameContext()
  22892. }
  22893. type Table_or_index_nameContext struct {
  22894. *antlr.BaseParserRuleContext
  22895. parser antlr.Parser
  22896. }
  22897. func NewEmptyTable_or_index_nameContext() *Table_or_index_nameContext {
  22898. var p = new(Table_or_index_nameContext)
  22899. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  22900. p.RuleIndex = SQLiteParserRULE_table_or_index_name
  22901. return p
  22902. }
  22903. func (*Table_or_index_nameContext) IsTable_or_index_nameContext() {}
  22904. func NewTable_or_index_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_or_index_nameContext {
  22905. var p = new(Table_or_index_nameContext)
  22906. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  22907. p.parser = parser
  22908. p.RuleIndex = SQLiteParserRULE_table_or_index_name
  22909. return p
  22910. }
  22911. func (s *Table_or_index_nameContext) GetParser() antlr.Parser { return s.parser }
  22912. func (s *Table_or_index_nameContext) Any_name() IAny_nameContext {
  22913. var t antlr.RuleContext
  22914. for _, ctx := range s.GetChildren() {
  22915. if _, ok := ctx.(IAny_nameContext); ok {
  22916. t = ctx.(antlr.RuleContext)
  22917. break
  22918. }
  22919. }
  22920. if t == nil {
  22921. return nil
  22922. }
  22923. return t.(IAny_nameContext)
  22924. }
  22925. func (s *Table_or_index_nameContext) GetRuleContext() antlr.RuleContext {
  22926. return s
  22927. }
  22928. func (s *Table_or_index_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  22929. return antlr.TreesStringTree(s, ruleNames, recog)
  22930. }
  22931. func (s *Table_or_index_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  22932. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22933. listenerT.EnterTable_or_index_name(s)
  22934. }
  22935. }
  22936. func (s *Table_or_index_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  22937. if listenerT, ok := listener.(SQLiteParserListener); ok {
  22938. listenerT.ExitTable_or_index_name(s)
  22939. }
  22940. }
  22941. func (p *SQLiteParser) Table_or_index_name() (localctx ITable_or_index_nameContext) {
  22942. this := p
  22943. _ = this
  22944. localctx = NewTable_or_index_nameContext(p, p.GetParserRuleContext(), p.GetState())
  22945. p.EnterRule(localctx, 186, SQLiteParserRULE_table_or_index_name)
  22946. defer func() {
  22947. p.ExitRule()
  22948. }()
  22949. defer func() {
  22950. if err := recover(); err != nil {
  22951. if v, ok := err.(antlr.RecognitionException); ok {
  22952. localctx.SetException(v)
  22953. p.GetErrorHandler().ReportError(p, v)
  22954. p.GetErrorHandler().Recover(p, v)
  22955. } else {
  22956. panic(err)
  22957. }
  22958. }
  22959. }()
  22960. p.EnterOuterAlt(localctx, 1)
  22961. {
  22962. p.SetState(2126)
  22963. p.Any_name()
  22964. }
  22965. return localctx
  22966. }
  22967. // INew_table_nameContext is an interface to support dynamic dispatch.
  22968. type INew_table_nameContext interface {
  22969. antlr.ParserRuleContext
  22970. // GetParser returns the parser.
  22971. GetParser() antlr.Parser
  22972. // Getter signatures
  22973. Any_name() IAny_nameContext
  22974. // IsNew_table_nameContext differentiates from other interfaces.
  22975. IsNew_table_nameContext()
  22976. }
  22977. type New_table_nameContext struct {
  22978. *antlr.BaseParserRuleContext
  22979. parser antlr.Parser
  22980. }
  22981. func NewEmptyNew_table_nameContext() *New_table_nameContext {
  22982. var p = new(New_table_nameContext)
  22983. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  22984. p.RuleIndex = SQLiteParserRULE_new_table_name
  22985. return p
  22986. }
  22987. func (*New_table_nameContext) IsNew_table_nameContext() {}
  22988. func NewNew_table_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *New_table_nameContext {
  22989. var p = new(New_table_nameContext)
  22990. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  22991. p.parser = parser
  22992. p.RuleIndex = SQLiteParserRULE_new_table_name
  22993. return p
  22994. }
  22995. func (s *New_table_nameContext) GetParser() antlr.Parser { return s.parser }
  22996. func (s *New_table_nameContext) Any_name() IAny_nameContext {
  22997. var t antlr.RuleContext
  22998. for _, ctx := range s.GetChildren() {
  22999. if _, ok := ctx.(IAny_nameContext); ok {
  23000. t = ctx.(antlr.RuleContext)
  23001. break
  23002. }
  23003. }
  23004. if t == nil {
  23005. return nil
  23006. }
  23007. return t.(IAny_nameContext)
  23008. }
  23009. func (s *New_table_nameContext) GetRuleContext() antlr.RuleContext {
  23010. return s
  23011. }
  23012. func (s *New_table_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23013. return antlr.TreesStringTree(s, ruleNames, recog)
  23014. }
  23015. func (s *New_table_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  23016. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23017. listenerT.EnterNew_table_name(s)
  23018. }
  23019. }
  23020. func (s *New_table_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  23021. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23022. listenerT.ExitNew_table_name(s)
  23023. }
  23024. }
  23025. func (p *SQLiteParser) New_table_name() (localctx INew_table_nameContext) {
  23026. this := p
  23027. _ = this
  23028. localctx = NewNew_table_nameContext(p, p.GetParserRuleContext(), p.GetState())
  23029. p.EnterRule(localctx, 188, SQLiteParserRULE_new_table_name)
  23030. defer func() {
  23031. p.ExitRule()
  23032. }()
  23033. defer func() {
  23034. if err := recover(); err != nil {
  23035. if v, ok := err.(antlr.RecognitionException); ok {
  23036. localctx.SetException(v)
  23037. p.GetErrorHandler().ReportError(p, v)
  23038. p.GetErrorHandler().Recover(p, v)
  23039. } else {
  23040. panic(err)
  23041. }
  23042. }
  23043. }()
  23044. p.EnterOuterAlt(localctx, 1)
  23045. {
  23046. p.SetState(2128)
  23047. p.Any_name()
  23048. }
  23049. return localctx
  23050. }
  23051. // IColumn_nameContext is an interface to support dynamic dispatch.
  23052. type IColumn_nameContext interface {
  23053. antlr.ParserRuleContext
  23054. // GetParser returns the parser.
  23055. GetParser() antlr.Parser
  23056. // Getter signatures
  23057. Any_name() IAny_nameContext
  23058. // IsColumn_nameContext differentiates from other interfaces.
  23059. IsColumn_nameContext()
  23060. }
  23061. type Column_nameContext struct {
  23062. *antlr.BaseParserRuleContext
  23063. parser antlr.Parser
  23064. }
  23065. func NewEmptyColumn_nameContext() *Column_nameContext {
  23066. var p = new(Column_nameContext)
  23067. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23068. p.RuleIndex = SQLiteParserRULE_column_name
  23069. return p
  23070. }
  23071. func (*Column_nameContext) IsColumn_nameContext() {}
  23072. func NewColumn_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Column_nameContext {
  23073. var p = new(Column_nameContext)
  23074. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23075. p.parser = parser
  23076. p.RuleIndex = SQLiteParserRULE_column_name
  23077. return p
  23078. }
  23079. func (s *Column_nameContext) GetParser() antlr.Parser { return s.parser }
  23080. func (s *Column_nameContext) Any_name() IAny_nameContext {
  23081. var t antlr.RuleContext
  23082. for _, ctx := range s.GetChildren() {
  23083. if _, ok := ctx.(IAny_nameContext); ok {
  23084. t = ctx.(antlr.RuleContext)
  23085. break
  23086. }
  23087. }
  23088. if t == nil {
  23089. return nil
  23090. }
  23091. return t.(IAny_nameContext)
  23092. }
  23093. func (s *Column_nameContext) GetRuleContext() antlr.RuleContext {
  23094. return s
  23095. }
  23096. func (s *Column_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23097. return antlr.TreesStringTree(s, ruleNames, recog)
  23098. }
  23099. func (s *Column_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  23100. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23101. listenerT.EnterColumn_name(s)
  23102. }
  23103. }
  23104. func (s *Column_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  23105. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23106. listenerT.ExitColumn_name(s)
  23107. }
  23108. }
  23109. func (p *SQLiteParser) Column_name() (localctx IColumn_nameContext) {
  23110. this := p
  23111. _ = this
  23112. localctx = NewColumn_nameContext(p, p.GetParserRuleContext(), p.GetState())
  23113. p.EnterRule(localctx, 190, SQLiteParserRULE_column_name)
  23114. defer func() {
  23115. p.ExitRule()
  23116. }()
  23117. defer func() {
  23118. if err := recover(); err != nil {
  23119. if v, ok := err.(antlr.RecognitionException); ok {
  23120. localctx.SetException(v)
  23121. p.GetErrorHandler().ReportError(p, v)
  23122. p.GetErrorHandler().Recover(p, v)
  23123. } else {
  23124. panic(err)
  23125. }
  23126. }
  23127. }()
  23128. p.EnterOuterAlt(localctx, 1)
  23129. {
  23130. p.SetState(2130)
  23131. p.Any_name()
  23132. }
  23133. return localctx
  23134. }
  23135. // ICollation_nameContext is an interface to support dynamic dispatch.
  23136. type ICollation_nameContext interface {
  23137. antlr.ParserRuleContext
  23138. // GetParser returns the parser.
  23139. GetParser() antlr.Parser
  23140. // Getter signatures
  23141. Any_name() IAny_nameContext
  23142. // IsCollation_nameContext differentiates from other interfaces.
  23143. IsCollation_nameContext()
  23144. }
  23145. type Collation_nameContext struct {
  23146. *antlr.BaseParserRuleContext
  23147. parser antlr.Parser
  23148. }
  23149. func NewEmptyCollation_nameContext() *Collation_nameContext {
  23150. var p = new(Collation_nameContext)
  23151. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23152. p.RuleIndex = SQLiteParserRULE_collation_name
  23153. return p
  23154. }
  23155. func (*Collation_nameContext) IsCollation_nameContext() {}
  23156. func NewCollation_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Collation_nameContext {
  23157. var p = new(Collation_nameContext)
  23158. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23159. p.parser = parser
  23160. p.RuleIndex = SQLiteParserRULE_collation_name
  23161. return p
  23162. }
  23163. func (s *Collation_nameContext) GetParser() antlr.Parser { return s.parser }
  23164. func (s *Collation_nameContext) Any_name() IAny_nameContext {
  23165. var t antlr.RuleContext
  23166. for _, ctx := range s.GetChildren() {
  23167. if _, ok := ctx.(IAny_nameContext); ok {
  23168. t = ctx.(antlr.RuleContext)
  23169. break
  23170. }
  23171. }
  23172. if t == nil {
  23173. return nil
  23174. }
  23175. return t.(IAny_nameContext)
  23176. }
  23177. func (s *Collation_nameContext) GetRuleContext() antlr.RuleContext {
  23178. return s
  23179. }
  23180. func (s *Collation_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23181. return antlr.TreesStringTree(s, ruleNames, recog)
  23182. }
  23183. func (s *Collation_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  23184. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23185. listenerT.EnterCollation_name(s)
  23186. }
  23187. }
  23188. func (s *Collation_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  23189. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23190. listenerT.ExitCollation_name(s)
  23191. }
  23192. }
  23193. func (p *SQLiteParser) Collation_name() (localctx ICollation_nameContext) {
  23194. this := p
  23195. _ = this
  23196. localctx = NewCollation_nameContext(p, p.GetParserRuleContext(), p.GetState())
  23197. p.EnterRule(localctx, 192, SQLiteParserRULE_collation_name)
  23198. defer func() {
  23199. p.ExitRule()
  23200. }()
  23201. defer func() {
  23202. if err := recover(); err != nil {
  23203. if v, ok := err.(antlr.RecognitionException); ok {
  23204. localctx.SetException(v)
  23205. p.GetErrorHandler().ReportError(p, v)
  23206. p.GetErrorHandler().Recover(p, v)
  23207. } else {
  23208. panic(err)
  23209. }
  23210. }
  23211. }()
  23212. p.EnterOuterAlt(localctx, 1)
  23213. {
  23214. p.SetState(2132)
  23215. p.Any_name()
  23216. }
  23217. return localctx
  23218. }
  23219. // IForeign_tableContext is an interface to support dynamic dispatch.
  23220. type IForeign_tableContext interface {
  23221. antlr.ParserRuleContext
  23222. // GetParser returns the parser.
  23223. GetParser() antlr.Parser
  23224. // Getter signatures
  23225. Any_name() IAny_nameContext
  23226. // IsForeign_tableContext differentiates from other interfaces.
  23227. IsForeign_tableContext()
  23228. }
  23229. type Foreign_tableContext struct {
  23230. *antlr.BaseParserRuleContext
  23231. parser antlr.Parser
  23232. }
  23233. func NewEmptyForeign_tableContext() *Foreign_tableContext {
  23234. var p = new(Foreign_tableContext)
  23235. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23236. p.RuleIndex = SQLiteParserRULE_foreign_table
  23237. return p
  23238. }
  23239. func (*Foreign_tableContext) IsForeign_tableContext() {}
  23240. func NewForeign_tableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Foreign_tableContext {
  23241. var p = new(Foreign_tableContext)
  23242. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23243. p.parser = parser
  23244. p.RuleIndex = SQLiteParserRULE_foreign_table
  23245. return p
  23246. }
  23247. func (s *Foreign_tableContext) GetParser() antlr.Parser { return s.parser }
  23248. func (s *Foreign_tableContext) Any_name() IAny_nameContext {
  23249. var t antlr.RuleContext
  23250. for _, ctx := range s.GetChildren() {
  23251. if _, ok := ctx.(IAny_nameContext); ok {
  23252. t = ctx.(antlr.RuleContext)
  23253. break
  23254. }
  23255. }
  23256. if t == nil {
  23257. return nil
  23258. }
  23259. return t.(IAny_nameContext)
  23260. }
  23261. func (s *Foreign_tableContext) GetRuleContext() antlr.RuleContext {
  23262. return s
  23263. }
  23264. func (s *Foreign_tableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23265. return antlr.TreesStringTree(s, ruleNames, recog)
  23266. }
  23267. func (s *Foreign_tableContext) EnterRule(listener antlr.ParseTreeListener) {
  23268. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23269. listenerT.EnterForeign_table(s)
  23270. }
  23271. }
  23272. func (s *Foreign_tableContext) ExitRule(listener antlr.ParseTreeListener) {
  23273. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23274. listenerT.ExitForeign_table(s)
  23275. }
  23276. }
  23277. func (p *SQLiteParser) Foreign_table() (localctx IForeign_tableContext) {
  23278. this := p
  23279. _ = this
  23280. localctx = NewForeign_tableContext(p, p.GetParserRuleContext(), p.GetState())
  23281. p.EnterRule(localctx, 194, SQLiteParserRULE_foreign_table)
  23282. defer func() {
  23283. p.ExitRule()
  23284. }()
  23285. defer func() {
  23286. if err := recover(); err != nil {
  23287. if v, ok := err.(antlr.RecognitionException); ok {
  23288. localctx.SetException(v)
  23289. p.GetErrorHandler().ReportError(p, v)
  23290. p.GetErrorHandler().Recover(p, v)
  23291. } else {
  23292. panic(err)
  23293. }
  23294. }
  23295. }()
  23296. p.EnterOuterAlt(localctx, 1)
  23297. {
  23298. p.SetState(2134)
  23299. p.Any_name()
  23300. }
  23301. return localctx
  23302. }
  23303. // IIndex_nameContext is an interface to support dynamic dispatch.
  23304. type IIndex_nameContext interface {
  23305. antlr.ParserRuleContext
  23306. // GetParser returns the parser.
  23307. GetParser() antlr.Parser
  23308. // Getter signatures
  23309. Any_name() IAny_nameContext
  23310. // IsIndex_nameContext differentiates from other interfaces.
  23311. IsIndex_nameContext()
  23312. }
  23313. type Index_nameContext struct {
  23314. *antlr.BaseParserRuleContext
  23315. parser antlr.Parser
  23316. }
  23317. func NewEmptyIndex_nameContext() *Index_nameContext {
  23318. var p = new(Index_nameContext)
  23319. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23320. p.RuleIndex = SQLiteParserRULE_index_name
  23321. return p
  23322. }
  23323. func (*Index_nameContext) IsIndex_nameContext() {}
  23324. func NewIndex_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Index_nameContext {
  23325. var p = new(Index_nameContext)
  23326. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23327. p.parser = parser
  23328. p.RuleIndex = SQLiteParserRULE_index_name
  23329. return p
  23330. }
  23331. func (s *Index_nameContext) GetParser() antlr.Parser { return s.parser }
  23332. func (s *Index_nameContext) Any_name() IAny_nameContext {
  23333. var t antlr.RuleContext
  23334. for _, ctx := range s.GetChildren() {
  23335. if _, ok := ctx.(IAny_nameContext); ok {
  23336. t = ctx.(antlr.RuleContext)
  23337. break
  23338. }
  23339. }
  23340. if t == nil {
  23341. return nil
  23342. }
  23343. return t.(IAny_nameContext)
  23344. }
  23345. func (s *Index_nameContext) GetRuleContext() antlr.RuleContext {
  23346. return s
  23347. }
  23348. func (s *Index_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23349. return antlr.TreesStringTree(s, ruleNames, recog)
  23350. }
  23351. func (s *Index_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  23352. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23353. listenerT.EnterIndex_name(s)
  23354. }
  23355. }
  23356. func (s *Index_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  23357. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23358. listenerT.ExitIndex_name(s)
  23359. }
  23360. }
  23361. func (p *SQLiteParser) Index_name() (localctx IIndex_nameContext) {
  23362. this := p
  23363. _ = this
  23364. localctx = NewIndex_nameContext(p, p.GetParserRuleContext(), p.GetState())
  23365. p.EnterRule(localctx, 196, SQLiteParserRULE_index_name)
  23366. defer func() {
  23367. p.ExitRule()
  23368. }()
  23369. defer func() {
  23370. if err := recover(); err != nil {
  23371. if v, ok := err.(antlr.RecognitionException); ok {
  23372. localctx.SetException(v)
  23373. p.GetErrorHandler().ReportError(p, v)
  23374. p.GetErrorHandler().Recover(p, v)
  23375. } else {
  23376. panic(err)
  23377. }
  23378. }
  23379. }()
  23380. p.EnterOuterAlt(localctx, 1)
  23381. {
  23382. p.SetState(2136)
  23383. p.Any_name()
  23384. }
  23385. return localctx
  23386. }
  23387. // ITrigger_nameContext is an interface to support dynamic dispatch.
  23388. type ITrigger_nameContext interface {
  23389. antlr.ParserRuleContext
  23390. // GetParser returns the parser.
  23391. GetParser() antlr.Parser
  23392. // Getter signatures
  23393. Any_name() IAny_nameContext
  23394. // IsTrigger_nameContext differentiates from other interfaces.
  23395. IsTrigger_nameContext()
  23396. }
  23397. type Trigger_nameContext struct {
  23398. *antlr.BaseParserRuleContext
  23399. parser antlr.Parser
  23400. }
  23401. func NewEmptyTrigger_nameContext() *Trigger_nameContext {
  23402. var p = new(Trigger_nameContext)
  23403. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23404. p.RuleIndex = SQLiteParserRULE_trigger_name
  23405. return p
  23406. }
  23407. func (*Trigger_nameContext) IsTrigger_nameContext() {}
  23408. func NewTrigger_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Trigger_nameContext {
  23409. var p = new(Trigger_nameContext)
  23410. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23411. p.parser = parser
  23412. p.RuleIndex = SQLiteParserRULE_trigger_name
  23413. return p
  23414. }
  23415. func (s *Trigger_nameContext) GetParser() antlr.Parser { return s.parser }
  23416. func (s *Trigger_nameContext) Any_name() IAny_nameContext {
  23417. var t antlr.RuleContext
  23418. for _, ctx := range s.GetChildren() {
  23419. if _, ok := ctx.(IAny_nameContext); ok {
  23420. t = ctx.(antlr.RuleContext)
  23421. break
  23422. }
  23423. }
  23424. if t == nil {
  23425. return nil
  23426. }
  23427. return t.(IAny_nameContext)
  23428. }
  23429. func (s *Trigger_nameContext) GetRuleContext() antlr.RuleContext {
  23430. return s
  23431. }
  23432. func (s *Trigger_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23433. return antlr.TreesStringTree(s, ruleNames, recog)
  23434. }
  23435. func (s *Trigger_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  23436. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23437. listenerT.EnterTrigger_name(s)
  23438. }
  23439. }
  23440. func (s *Trigger_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  23441. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23442. listenerT.ExitTrigger_name(s)
  23443. }
  23444. }
  23445. func (p *SQLiteParser) Trigger_name() (localctx ITrigger_nameContext) {
  23446. this := p
  23447. _ = this
  23448. localctx = NewTrigger_nameContext(p, p.GetParserRuleContext(), p.GetState())
  23449. p.EnterRule(localctx, 198, SQLiteParserRULE_trigger_name)
  23450. defer func() {
  23451. p.ExitRule()
  23452. }()
  23453. defer func() {
  23454. if err := recover(); err != nil {
  23455. if v, ok := err.(antlr.RecognitionException); ok {
  23456. localctx.SetException(v)
  23457. p.GetErrorHandler().ReportError(p, v)
  23458. p.GetErrorHandler().Recover(p, v)
  23459. } else {
  23460. panic(err)
  23461. }
  23462. }
  23463. }()
  23464. p.EnterOuterAlt(localctx, 1)
  23465. {
  23466. p.SetState(2138)
  23467. p.Any_name()
  23468. }
  23469. return localctx
  23470. }
  23471. // IView_nameContext is an interface to support dynamic dispatch.
  23472. type IView_nameContext interface {
  23473. antlr.ParserRuleContext
  23474. // GetParser returns the parser.
  23475. GetParser() antlr.Parser
  23476. // Getter signatures
  23477. Any_name() IAny_nameContext
  23478. // IsView_nameContext differentiates from other interfaces.
  23479. IsView_nameContext()
  23480. }
  23481. type View_nameContext struct {
  23482. *antlr.BaseParserRuleContext
  23483. parser antlr.Parser
  23484. }
  23485. func NewEmptyView_nameContext() *View_nameContext {
  23486. var p = new(View_nameContext)
  23487. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23488. p.RuleIndex = SQLiteParserRULE_view_name
  23489. return p
  23490. }
  23491. func (*View_nameContext) IsView_nameContext() {}
  23492. func NewView_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *View_nameContext {
  23493. var p = new(View_nameContext)
  23494. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23495. p.parser = parser
  23496. p.RuleIndex = SQLiteParserRULE_view_name
  23497. return p
  23498. }
  23499. func (s *View_nameContext) GetParser() antlr.Parser { return s.parser }
  23500. func (s *View_nameContext) Any_name() IAny_nameContext {
  23501. var t antlr.RuleContext
  23502. for _, ctx := range s.GetChildren() {
  23503. if _, ok := ctx.(IAny_nameContext); ok {
  23504. t = ctx.(antlr.RuleContext)
  23505. break
  23506. }
  23507. }
  23508. if t == nil {
  23509. return nil
  23510. }
  23511. return t.(IAny_nameContext)
  23512. }
  23513. func (s *View_nameContext) GetRuleContext() antlr.RuleContext {
  23514. return s
  23515. }
  23516. func (s *View_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23517. return antlr.TreesStringTree(s, ruleNames, recog)
  23518. }
  23519. func (s *View_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  23520. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23521. listenerT.EnterView_name(s)
  23522. }
  23523. }
  23524. func (s *View_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  23525. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23526. listenerT.ExitView_name(s)
  23527. }
  23528. }
  23529. func (p *SQLiteParser) View_name() (localctx IView_nameContext) {
  23530. this := p
  23531. _ = this
  23532. localctx = NewView_nameContext(p, p.GetParserRuleContext(), p.GetState())
  23533. p.EnterRule(localctx, 200, SQLiteParserRULE_view_name)
  23534. defer func() {
  23535. p.ExitRule()
  23536. }()
  23537. defer func() {
  23538. if err := recover(); err != nil {
  23539. if v, ok := err.(antlr.RecognitionException); ok {
  23540. localctx.SetException(v)
  23541. p.GetErrorHandler().ReportError(p, v)
  23542. p.GetErrorHandler().Recover(p, v)
  23543. } else {
  23544. panic(err)
  23545. }
  23546. }
  23547. }()
  23548. p.EnterOuterAlt(localctx, 1)
  23549. {
  23550. p.SetState(2140)
  23551. p.Any_name()
  23552. }
  23553. return localctx
  23554. }
  23555. // IModule_nameContext is an interface to support dynamic dispatch.
  23556. type IModule_nameContext interface {
  23557. antlr.ParserRuleContext
  23558. // GetParser returns the parser.
  23559. GetParser() antlr.Parser
  23560. // Getter signatures
  23561. Any_name() IAny_nameContext
  23562. // IsModule_nameContext differentiates from other interfaces.
  23563. IsModule_nameContext()
  23564. }
  23565. type Module_nameContext struct {
  23566. *antlr.BaseParserRuleContext
  23567. parser antlr.Parser
  23568. }
  23569. func NewEmptyModule_nameContext() *Module_nameContext {
  23570. var p = new(Module_nameContext)
  23571. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23572. p.RuleIndex = SQLiteParserRULE_module_name
  23573. return p
  23574. }
  23575. func (*Module_nameContext) IsModule_nameContext() {}
  23576. func NewModule_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Module_nameContext {
  23577. var p = new(Module_nameContext)
  23578. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23579. p.parser = parser
  23580. p.RuleIndex = SQLiteParserRULE_module_name
  23581. return p
  23582. }
  23583. func (s *Module_nameContext) GetParser() antlr.Parser { return s.parser }
  23584. func (s *Module_nameContext) Any_name() IAny_nameContext {
  23585. var t antlr.RuleContext
  23586. for _, ctx := range s.GetChildren() {
  23587. if _, ok := ctx.(IAny_nameContext); ok {
  23588. t = ctx.(antlr.RuleContext)
  23589. break
  23590. }
  23591. }
  23592. if t == nil {
  23593. return nil
  23594. }
  23595. return t.(IAny_nameContext)
  23596. }
  23597. func (s *Module_nameContext) GetRuleContext() antlr.RuleContext {
  23598. return s
  23599. }
  23600. func (s *Module_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23601. return antlr.TreesStringTree(s, ruleNames, recog)
  23602. }
  23603. func (s *Module_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  23604. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23605. listenerT.EnterModule_name(s)
  23606. }
  23607. }
  23608. func (s *Module_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  23609. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23610. listenerT.ExitModule_name(s)
  23611. }
  23612. }
  23613. func (p *SQLiteParser) Module_name() (localctx IModule_nameContext) {
  23614. this := p
  23615. _ = this
  23616. localctx = NewModule_nameContext(p, p.GetParserRuleContext(), p.GetState())
  23617. p.EnterRule(localctx, 202, SQLiteParserRULE_module_name)
  23618. defer func() {
  23619. p.ExitRule()
  23620. }()
  23621. defer func() {
  23622. if err := recover(); err != nil {
  23623. if v, ok := err.(antlr.RecognitionException); ok {
  23624. localctx.SetException(v)
  23625. p.GetErrorHandler().ReportError(p, v)
  23626. p.GetErrorHandler().Recover(p, v)
  23627. } else {
  23628. panic(err)
  23629. }
  23630. }
  23631. }()
  23632. p.EnterOuterAlt(localctx, 1)
  23633. {
  23634. p.SetState(2142)
  23635. p.Any_name()
  23636. }
  23637. return localctx
  23638. }
  23639. // IPragma_nameContext is an interface to support dynamic dispatch.
  23640. type IPragma_nameContext interface {
  23641. antlr.ParserRuleContext
  23642. // GetParser returns the parser.
  23643. GetParser() antlr.Parser
  23644. // Getter signatures
  23645. Any_name() IAny_nameContext
  23646. // IsPragma_nameContext differentiates from other interfaces.
  23647. IsPragma_nameContext()
  23648. }
  23649. type Pragma_nameContext struct {
  23650. *antlr.BaseParserRuleContext
  23651. parser antlr.Parser
  23652. }
  23653. func NewEmptyPragma_nameContext() *Pragma_nameContext {
  23654. var p = new(Pragma_nameContext)
  23655. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23656. p.RuleIndex = SQLiteParserRULE_pragma_name
  23657. return p
  23658. }
  23659. func (*Pragma_nameContext) IsPragma_nameContext() {}
  23660. func NewPragma_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Pragma_nameContext {
  23661. var p = new(Pragma_nameContext)
  23662. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23663. p.parser = parser
  23664. p.RuleIndex = SQLiteParserRULE_pragma_name
  23665. return p
  23666. }
  23667. func (s *Pragma_nameContext) GetParser() antlr.Parser { return s.parser }
  23668. func (s *Pragma_nameContext) Any_name() IAny_nameContext {
  23669. var t antlr.RuleContext
  23670. for _, ctx := range s.GetChildren() {
  23671. if _, ok := ctx.(IAny_nameContext); ok {
  23672. t = ctx.(antlr.RuleContext)
  23673. break
  23674. }
  23675. }
  23676. if t == nil {
  23677. return nil
  23678. }
  23679. return t.(IAny_nameContext)
  23680. }
  23681. func (s *Pragma_nameContext) GetRuleContext() antlr.RuleContext {
  23682. return s
  23683. }
  23684. func (s *Pragma_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23685. return antlr.TreesStringTree(s, ruleNames, recog)
  23686. }
  23687. func (s *Pragma_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  23688. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23689. listenerT.EnterPragma_name(s)
  23690. }
  23691. }
  23692. func (s *Pragma_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  23693. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23694. listenerT.ExitPragma_name(s)
  23695. }
  23696. }
  23697. func (p *SQLiteParser) Pragma_name() (localctx IPragma_nameContext) {
  23698. this := p
  23699. _ = this
  23700. localctx = NewPragma_nameContext(p, p.GetParserRuleContext(), p.GetState())
  23701. p.EnterRule(localctx, 204, SQLiteParserRULE_pragma_name)
  23702. defer func() {
  23703. p.ExitRule()
  23704. }()
  23705. defer func() {
  23706. if err := recover(); err != nil {
  23707. if v, ok := err.(antlr.RecognitionException); ok {
  23708. localctx.SetException(v)
  23709. p.GetErrorHandler().ReportError(p, v)
  23710. p.GetErrorHandler().Recover(p, v)
  23711. } else {
  23712. panic(err)
  23713. }
  23714. }
  23715. }()
  23716. p.EnterOuterAlt(localctx, 1)
  23717. {
  23718. p.SetState(2144)
  23719. p.Any_name()
  23720. }
  23721. return localctx
  23722. }
  23723. // ISavepoint_nameContext is an interface to support dynamic dispatch.
  23724. type ISavepoint_nameContext interface {
  23725. antlr.ParserRuleContext
  23726. // GetParser returns the parser.
  23727. GetParser() antlr.Parser
  23728. // Getter signatures
  23729. Any_name() IAny_nameContext
  23730. // IsSavepoint_nameContext differentiates from other interfaces.
  23731. IsSavepoint_nameContext()
  23732. }
  23733. type Savepoint_nameContext struct {
  23734. *antlr.BaseParserRuleContext
  23735. parser antlr.Parser
  23736. }
  23737. func NewEmptySavepoint_nameContext() *Savepoint_nameContext {
  23738. var p = new(Savepoint_nameContext)
  23739. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23740. p.RuleIndex = SQLiteParserRULE_savepoint_name
  23741. return p
  23742. }
  23743. func (*Savepoint_nameContext) IsSavepoint_nameContext() {}
  23744. func NewSavepoint_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Savepoint_nameContext {
  23745. var p = new(Savepoint_nameContext)
  23746. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23747. p.parser = parser
  23748. p.RuleIndex = SQLiteParserRULE_savepoint_name
  23749. return p
  23750. }
  23751. func (s *Savepoint_nameContext) GetParser() antlr.Parser { return s.parser }
  23752. func (s *Savepoint_nameContext) Any_name() IAny_nameContext {
  23753. var t antlr.RuleContext
  23754. for _, ctx := range s.GetChildren() {
  23755. if _, ok := ctx.(IAny_nameContext); ok {
  23756. t = ctx.(antlr.RuleContext)
  23757. break
  23758. }
  23759. }
  23760. if t == nil {
  23761. return nil
  23762. }
  23763. return t.(IAny_nameContext)
  23764. }
  23765. func (s *Savepoint_nameContext) GetRuleContext() antlr.RuleContext {
  23766. return s
  23767. }
  23768. func (s *Savepoint_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23769. return antlr.TreesStringTree(s, ruleNames, recog)
  23770. }
  23771. func (s *Savepoint_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  23772. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23773. listenerT.EnterSavepoint_name(s)
  23774. }
  23775. }
  23776. func (s *Savepoint_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  23777. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23778. listenerT.ExitSavepoint_name(s)
  23779. }
  23780. }
  23781. func (p *SQLiteParser) Savepoint_name() (localctx ISavepoint_nameContext) {
  23782. this := p
  23783. _ = this
  23784. localctx = NewSavepoint_nameContext(p, p.GetParserRuleContext(), p.GetState())
  23785. p.EnterRule(localctx, 206, SQLiteParserRULE_savepoint_name)
  23786. defer func() {
  23787. p.ExitRule()
  23788. }()
  23789. defer func() {
  23790. if err := recover(); err != nil {
  23791. if v, ok := err.(antlr.RecognitionException); ok {
  23792. localctx.SetException(v)
  23793. p.GetErrorHandler().ReportError(p, v)
  23794. p.GetErrorHandler().Recover(p, v)
  23795. } else {
  23796. panic(err)
  23797. }
  23798. }
  23799. }()
  23800. p.EnterOuterAlt(localctx, 1)
  23801. {
  23802. p.SetState(2146)
  23803. p.Any_name()
  23804. }
  23805. return localctx
  23806. }
  23807. // ITable_aliasContext is an interface to support dynamic dispatch.
  23808. type ITable_aliasContext interface {
  23809. antlr.ParserRuleContext
  23810. // GetParser returns the parser.
  23811. GetParser() antlr.Parser
  23812. // Getter signatures
  23813. IDENTIFIER() antlr.TerminalNode
  23814. STRING_LITERAL() antlr.TerminalNode
  23815. // IsTable_aliasContext differentiates from other interfaces.
  23816. IsTable_aliasContext()
  23817. }
  23818. type Table_aliasContext struct {
  23819. *antlr.BaseParserRuleContext
  23820. parser antlr.Parser
  23821. }
  23822. func NewEmptyTable_aliasContext() *Table_aliasContext {
  23823. var p = new(Table_aliasContext)
  23824. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23825. p.RuleIndex = SQLiteParserRULE_table_alias
  23826. return p
  23827. }
  23828. func (*Table_aliasContext) IsTable_aliasContext() {}
  23829. func NewTable_aliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_aliasContext {
  23830. var p = new(Table_aliasContext)
  23831. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23832. p.parser = parser
  23833. p.RuleIndex = SQLiteParserRULE_table_alias
  23834. return p
  23835. }
  23836. func (s *Table_aliasContext) GetParser() antlr.Parser { return s.parser }
  23837. func (s *Table_aliasContext) IDENTIFIER() antlr.TerminalNode {
  23838. return s.GetToken(SQLiteParserIDENTIFIER, 0)
  23839. }
  23840. func (s *Table_aliasContext) STRING_LITERAL() antlr.TerminalNode {
  23841. return s.GetToken(SQLiteParserSTRING_LITERAL, 0)
  23842. }
  23843. func (s *Table_aliasContext) GetRuleContext() antlr.RuleContext {
  23844. return s
  23845. }
  23846. func (s *Table_aliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23847. return antlr.TreesStringTree(s, ruleNames, recog)
  23848. }
  23849. func (s *Table_aliasContext) EnterRule(listener antlr.ParseTreeListener) {
  23850. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23851. listenerT.EnterTable_alias(s)
  23852. }
  23853. }
  23854. func (s *Table_aliasContext) ExitRule(listener antlr.ParseTreeListener) {
  23855. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23856. listenerT.ExitTable_alias(s)
  23857. }
  23858. }
  23859. func (p *SQLiteParser) Table_alias() (localctx ITable_aliasContext) {
  23860. this := p
  23861. _ = this
  23862. localctx = NewTable_aliasContext(p, p.GetParserRuleContext(), p.GetState())
  23863. p.EnterRule(localctx, 208, SQLiteParserRULE_table_alias)
  23864. var _la int
  23865. defer func() {
  23866. p.ExitRule()
  23867. }()
  23868. defer func() {
  23869. if err := recover(); err != nil {
  23870. if v, ok := err.(antlr.RecognitionException); ok {
  23871. localctx.SetException(v)
  23872. p.GetErrorHandler().ReportError(p, v)
  23873. p.GetErrorHandler().Recover(p, v)
  23874. } else {
  23875. panic(err)
  23876. }
  23877. }
  23878. }()
  23879. p.EnterOuterAlt(localctx, 1)
  23880. {
  23881. p.SetState(2148)
  23882. _la = p.GetTokenStream().LA(1)
  23883. if !(_la == SQLiteParserIDENTIFIER || _la == SQLiteParserSTRING_LITERAL) {
  23884. p.GetErrorHandler().RecoverInline(p)
  23885. } else {
  23886. p.GetErrorHandler().ReportMatch(p)
  23887. p.Consume()
  23888. }
  23889. }
  23890. return localctx
  23891. }
  23892. // ITable_alias_fallbackContext is an interface to support dynamic dispatch.
  23893. type ITable_alias_fallbackContext interface {
  23894. antlr.ParserRuleContext
  23895. // GetParser returns the parser.
  23896. GetParser() antlr.Parser
  23897. // Getter signatures
  23898. Any_name() IAny_nameContext
  23899. // IsTable_alias_fallbackContext differentiates from other interfaces.
  23900. IsTable_alias_fallbackContext()
  23901. }
  23902. type Table_alias_fallbackContext struct {
  23903. *antlr.BaseParserRuleContext
  23904. parser antlr.Parser
  23905. }
  23906. func NewEmptyTable_alias_fallbackContext() *Table_alias_fallbackContext {
  23907. var p = new(Table_alias_fallbackContext)
  23908. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23909. p.RuleIndex = SQLiteParserRULE_table_alias_fallback
  23910. return p
  23911. }
  23912. func (*Table_alias_fallbackContext) IsTable_alias_fallbackContext() {}
  23913. func NewTable_alias_fallbackContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_alias_fallbackContext {
  23914. var p = new(Table_alias_fallbackContext)
  23915. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  23916. p.parser = parser
  23917. p.RuleIndex = SQLiteParserRULE_table_alias_fallback
  23918. return p
  23919. }
  23920. func (s *Table_alias_fallbackContext) GetParser() antlr.Parser { return s.parser }
  23921. func (s *Table_alias_fallbackContext) Any_name() IAny_nameContext {
  23922. var t antlr.RuleContext
  23923. for _, ctx := range s.GetChildren() {
  23924. if _, ok := ctx.(IAny_nameContext); ok {
  23925. t = ctx.(antlr.RuleContext)
  23926. break
  23927. }
  23928. }
  23929. if t == nil {
  23930. return nil
  23931. }
  23932. return t.(IAny_nameContext)
  23933. }
  23934. func (s *Table_alias_fallbackContext) GetRuleContext() antlr.RuleContext {
  23935. return s
  23936. }
  23937. func (s *Table_alias_fallbackContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  23938. return antlr.TreesStringTree(s, ruleNames, recog)
  23939. }
  23940. func (s *Table_alias_fallbackContext) EnterRule(listener antlr.ParseTreeListener) {
  23941. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23942. listenerT.EnterTable_alias_fallback(s)
  23943. }
  23944. }
  23945. func (s *Table_alias_fallbackContext) ExitRule(listener antlr.ParseTreeListener) {
  23946. if listenerT, ok := listener.(SQLiteParserListener); ok {
  23947. listenerT.ExitTable_alias_fallback(s)
  23948. }
  23949. }
  23950. func (p *SQLiteParser) Table_alias_fallback() (localctx ITable_alias_fallbackContext) {
  23951. this := p
  23952. _ = this
  23953. localctx = NewTable_alias_fallbackContext(p, p.GetParserRuleContext(), p.GetState())
  23954. p.EnterRule(localctx, 210, SQLiteParserRULE_table_alias_fallback)
  23955. defer func() {
  23956. p.ExitRule()
  23957. }()
  23958. defer func() {
  23959. if err := recover(); err != nil {
  23960. if v, ok := err.(antlr.RecognitionException); ok {
  23961. localctx.SetException(v)
  23962. p.GetErrorHandler().ReportError(p, v)
  23963. p.GetErrorHandler().Recover(p, v)
  23964. } else {
  23965. panic(err)
  23966. }
  23967. }
  23968. }()
  23969. p.EnterOuterAlt(localctx, 1)
  23970. {
  23971. p.SetState(2150)
  23972. p.Any_name()
  23973. }
  23974. return localctx
  23975. }
  23976. // ITransaction_nameContext is an interface to support dynamic dispatch.
  23977. type ITransaction_nameContext interface {
  23978. antlr.ParserRuleContext
  23979. // GetParser returns the parser.
  23980. GetParser() antlr.Parser
  23981. // Getter signatures
  23982. Any_name() IAny_nameContext
  23983. // IsTransaction_nameContext differentiates from other interfaces.
  23984. IsTransaction_nameContext()
  23985. }
  23986. type Transaction_nameContext struct {
  23987. *antlr.BaseParserRuleContext
  23988. parser antlr.Parser
  23989. }
  23990. func NewEmptyTransaction_nameContext() *Transaction_nameContext {
  23991. var p = new(Transaction_nameContext)
  23992. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  23993. p.RuleIndex = SQLiteParserRULE_transaction_name
  23994. return p
  23995. }
  23996. func (*Transaction_nameContext) IsTransaction_nameContext() {}
  23997. func NewTransaction_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Transaction_nameContext {
  23998. var p = new(Transaction_nameContext)
  23999. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  24000. p.parser = parser
  24001. p.RuleIndex = SQLiteParserRULE_transaction_name
  24002. return p
  24003. }
  24004. func (s *Transaction_nameContext) GetParser() antlr.Parser { return s.parser }
  24005. func (s *Transaction_nameContext) Any_name() IAny_nameContext {
  24006. var t antlr.RuleContext
  24007. for _, ctx := range s.GetChildren() {
  24008. if _, ok := ctx.(IAny_nameContext); ok {
  24009. t = ctx.(antlr.RuleContext)
  24010. break
  24011. }
  24012. }
  24013. if t == nil {
  24014. return nil
  24015. }
  24016. return t.(IAny_nameContext)
  24017. }
  24018. func (s *Transaction_nameContext) GetRuleContext() antlr.RuleContext {
  24019. return s
  24020. }
  24021. func (s *Transaction_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  24022. return antlr.TreesStringTree(s, ruleNames, recog)
  24023. }
  24024. func (s *Transaction_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  24025. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24026. listenerT.EnterTransaction_name(s)
  24027. }
  24028. }
  24029. func (s *Transaction_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  24030. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24031. listenerT.ExitTransaction_name(s)
  24032. }
  24033. }
  24034. func (p *SQLiteParser) Transaction_name() (localctx ITransaction_nameContext) {
  24035. this := p
  24036. _ = this
  24037. localctx = NewTransaction_nameContext(p, p.GetParserRuleContext(), p.GetState())
  24038. p.EnterRule(localctx, 212, SQLiteParserRULE_transaction_name)
  24039. defer func() {
  24040. p.ExitRule()
  24041. }()
  24042. defer func() {
  24043. if err := recover(); err != nil {
  24044. if v, ok := err.(antlr.RecognitionException); ok {
  24045. localctx.SetException(v)
  24046. p.GetErrorHandler().ReportError(p, v)
  24047. p.GetErrorHandler().Recover(p, v)
  24048. } else {
  24049. panic(err)
  24050. }
  24051. }
  24052. }()
  24053. p.EnterOuterAlt(localctx, 1)
  24054. {
  24055. p.SetState(2152)
  24056. p.Any_name()
  24057. }
  24058. return localctx
  24059. }
  24060. // IWindow_nameContext is an interface to support dynamic dispatch.
  24061. type IWindow_nameContext interface {
  24062. antlr.ParserRuleContext
  24063. // GetParser returns the parser.
  24064. GetParser() antlr.Parser
  24065. // Getter signatures
  24066. Any_name() IAny_nameContext
  24067. // IsWindow_nameContext differentiates from other interfaces.
  24068. IsWindow_nameContext()
  24069. }
  24070. type Window_nameContext struct {
  24071. *antlr.BaseParserRuleContext
  24072. parser antlr.Parser
  24073. }
  24074. func NewEmptyWindow_nameContext() *Window_nameContext {
  24075. var p = new(Window_nameContext)
  24076. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  24077. p.RuleIndex = SQLiteParserRULE_window_name
  24078. return p
  24079. }
  24080. func (*Window_nameContext) IsWindow_nameContext() {}
  24081. func NewWindow_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Window_nameContext {
  24082. var p = new(Window_nameContext)
  24083. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  24084. p.parser = parser
  24085. p.RuleIndex = SQLiteParserRULE_window_name
  24086. return p
  24087. }
  24088. func (s *Window_nameContext) GetParser() antlr.Parser { return s.parser }
  24089. func (s *Window_nameContext) Any_name() IAny_nameContext {
  24090. var t antlr.RuleContext
  24091. for _, ctx := range s.GetChildren() {
  24092. if _, ok := ctx.(IAny_nameContext); ok {
  24093. t = ctx.(antlr.RuleContext)
  24094. break
  24095. }
  24096. }
  24097. if t == nil {
  24098. return nil
  24099. }
  24100. return t.(IAny_nameContext)
  24101. }
  24102. func (s *Window_nameContext) GetRuleContext() antlr.RuleContext {
  24103. return s
  24104. }
  24105. func (s *Window_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  24106. return antlr.TreesStringTree(s, ruleNames, recog)
  24107. }
  24108. func (s *Window_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  24109. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24110. listenerT.EnterWindow_name(s)
  24111. }
  24112. }
  24113. func (s *Window_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  24114. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24115. listenerT.ExitWindow_name(s)
  24116. }
  24117. }
  24118. func (p *SQLiteParser) Window_name() (localctx IWindow_nameContext) {
  24119. this := p
  24120. _ = this
  24121. localctx = NewWindow_nameContext(p, p.GetParserRuleContext(), p.GetState())
  24122. p.EnterRule(localctx, 214, SQLiteParserRULE_window_name)
  24123. defer func() {
  24124. p.ExitRule()
  24125. }()
  24126. defer func() {
  24127. if err := recover(); err != nil {
  24128. if v, ok := err.(antlr.RecognitionException); ok {
  24129. localctx.SetException(v)
  24130. p.GetErrorHandler().ReportError(p, v)
  24131. p.GetErrorHandler().Recover(p, v)
  24132. } else {
  24133. panic(err)
  24134. }
  24135. }
  24136. }()
  24137. p.EnterOuterAlt(localctx, 1)
  24138. {
  24139. p.SetState(2154)
  24140. p.Any_name()
  24141. }
  24142. return localctx
  24143. }
  24144. // IAliasContext is an interface to support dynamic dispatch.
  24145. type IAliasContext interface {
  24146. antlr.ParserRuleContext
  24147. // GetParser returns the parser.
  24148. GetParser() antlr.Parser
  24149. // Getter signatures
  24150. Any_name() IAny_nameContext
  24151. // IsAliasContext differentiates from other interfaces.
  24152. IsAliasContext()
  24153. }
  24154. type AliasContext struct {
  24155. *antlr.BaseParserRuleContext
  24156. parser antlr.Parser
  24157. }
  24158. func NewEmptyAliasContext() *AliasContext {
  24159. var p = new(AliasContext)
  24160. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  24161. p.RuleIndex = SQLiteParserRULE_alias
  24162. return p
  24163. }
  24164. func (*AliasContext) IsAliasContext() {}
  24165. func NewAliasContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AliasContext {
  24166. var p = new(AliasContext)
  24167. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  24168. p.parser = parser
  24169. p.RuleIndex = SQLiteParserRULE_alias
  24170. return p
  24171. }
  24172. func (s *AliasContext) GetParser() antlr.Parser { return s.parser }
  24173. func (s *AliasContext) Any_name() IAny_nameContext {
  24174. var t antlr.RuleContext
  24175. for _, ctx := range s.GetChildren() {
  24176. if _, ok := ctx.(IAny_nameContext); ok {
  24177. t = ctx.(antlr.RuleContext)
  24178. break
  24179. }
  24180. }
  24181. if t == nil {
  24182. return nil
  24183. }
  24184. return t.(IAny_nameContext)
  24185. }
  24186. func (s *AliasContext) GetRuleContext() antlr.RuleContext {
  24187. return s
  24188. }
  24189. func (s *AliasContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  24190. return antlr.TreesStringTree(s, ruleNames, recog)
  24191. }
  24192. func (s *AliasContext) EnterRule(listener antlr.ParseTreeListener) {
  24193. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24194. listenerT.EnterAlias(s)
  24195. }
  24196. }
  24197. func (s *AliasContext) ExitRule(listener antlr.ParseTreeListener) {
  24198. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24199. listenerT.ExitAlias(s)
  24200. }
  24201. }
  24202. func (p *SQLiteParser) Alias() (localctx IAliasContext) {
  24203. this := p
  24204. _ = this
  24205. localctx = NewAliasContext(p, p.GetParserRuleContext(), p.GetState())
  24206. p.EnterRule(localctx, 216, SQLiteParserRULE_alias)
  24207. defer func() {
  24208. p.ExitRule()
  24209. }()
  24210. defer func() {
  24211. if err := recover(); err != nil {
  24212. if v, ok := err.(antlr.RecognitionException); ok {
  24213. localctx.SetException(v)
  24214. p.GetErrorHandler().ReportError(p, v)
  24215. p.GetErrorHandler().Recover(p, v)
  24216. } else {
  24217. panic(err)
  24218. }
  24219. }
  24220. }()
  24221. p.EnterOuterAlt(localctx, 1)
  24222. {
  24223. p.SetState(2156)
  24224. p.Any_name()
  24225. }
  24226. return localctx
  24227. }
  24228. // IFilenameContext is an interface to support dynamic dispatch.
  24229. type IFilenameContext interface {
  24230. antlr.ParserRuleContext
  24231. // GetParser returns the parser.
  24232. GetParser() antlr.Parser
  24233. // Getter signatures
  24234. Any_name() IAny_nameContext
  24235. // IsFilenameContext differentiates from other interfaces.
  24236. IsFilenameContext()
  24237. }
  24238. type FilenameContext struct {
  24239. *antlr.BaseParserRuleContext
  24240. parser antlr.Parser
  24241. }
  24242. func NewEmptyFilenameContext() *FilenameContext {
  24243. var p = new(FilenameContext)
  24244. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  24245. p.RuleIndex = SQLiteParserRULE_filename
  24246. return p
  24247. }
  24248. func (*FilenameContext) IsFilenameContext() {}
  24249. func NewFilenameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FilenameContext {
  24250. var p = new(FilenameContext)
  24251. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  24252. p.parser = parser
  24253. p.RuleIndex = SQLiteParserRULE_filename
  24254. return p
  24255. }
  24256. func (s *FilenameContext) GetParser() antlr.Parser { return s.parser }
  24257. func (s *FilenameContext) Any_name() IAny_nameContext {
  24258. var t antlr.RuleContext
  24259. for _, ctx := range s.GetChildren() {
  24260. if _, ok := ctx.(IAny_nameContext); ok {
  24261. t = ctx.(antlr.RuleContext)
  24262. break
  24263. }
  24264. }
  24265. if t == nil {
  24266. return nil
  24267. }
  24268. return t.(IAny_nameContext)
  24269. }
  24270. func (s *FilenameContext) GetRuleContext() antlr.RuleContext {
  24271. return s
  24272. }
  24273. func (s *FilenameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  24274. return antlr.TreesStringTree(s, ruleNames, recog)
  24275. }
  24276. func (s *FilenameContext) EnterRule(listener antlr.ParseTreeListener) {
  24277. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24278. listenerT.EnterFilename(s)
  24279. }
  24280. }
  24281. func (s *FilenameContext) ExitRule(listener antlr.ParseTreeListener) {
  24282. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24283. listenerT.ExitFilename(s)
  24284. }
  24285. }
  24286. func (p *SQLiteParser) Filename() (localctx IFilenameContext) {
  24287. this := p
  24288. _ = this
  24289. localctx = NewFilenameContext(p, p.GetParserRuleContext(), p.GetState())
  24290. p.EnterRule(localctx, 218, SQLiteParserRULE_filename)
  24291. defer func() {
  24292. p.ExitRule()
  24293. }()
  24294. defer func() {
  24295. if err := recover(); err != nil {
  24296. if v, ok := err.(antlr.RecognitionException); ok {
  24297. localctx.SetException(v)
  24298. p.GetErrorHandler().ReportError(p, v)
  24299. p.GetErrorHandler().Recover(p, v)
  24300. } else {
  24301. panic(err)
  24302. }
  24303. }
  24304. }()
  24305. p.EnterOuterAlt(localctx, 1)
  24306. {
  24307. p.SetState(2158)
  24308. p.Any_name()
  24309. }
  24310. return localctx
  24311. }
  24312. // IBase_window_nameContext is an interface to support dynamic dispatch.
  24313. type IBase_window_nameContext interface {
  24314. antlr.ParserRuleContext
  24315. // GetParser returns the parser.
  24316. GetParser() antlr.Parser
  24317. // Getter signatures
  24318. Any_name() IAny_nameContext
  24319. // IsBase_window_nameContext differentiates from other interfaces.
  24320. IsBase_window_nameContext()
  24321. }
  24322. type Base_window_nameContext struct {
  24323. *antlr.BaseParserRuleContext
  24324. parser antlr.Parser
  24325. }
  24326. func NewEmptyBase_window_nameContext() *Base_window_nameContext {
  24327. var p = new(Base_window_nameContext)
  24328. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  24329. p.RuleIndex = SQLiteParserRULE_base_window_name
  24330. return p
  24331. }
  24332. func (*Base_window_nameContext) IsBase_window_nameContext() {}
  24333. func NewBase_window_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Base_window_nameContext {
  24334. var p = new(Base_window_nameContext)
  24335. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  24336. p.parser = parser
  24337. p.RuleIndex = SQLiteParserRULE_base_window_name
  24338. return p
  24339. }
  24340. func (s *Base_window_nameContext) GetParser() antlr.Parser { return s.parser }
  24341. func (s *Base_window_nameContext) Any_name() IAny_nameContext {
  24342. var t antlr.RuleContext
  24343. for _, ctx := range s.GetChildren() {
  24344. if _, ok := ctx.(IAny_nameContext); ok {
  24345. t = ctx.(antlr.RuleContext)
  24346. break
  24347. }
  24348. }
  24349. if t == nil {
  24350. return nil
  24351. }
  24352. return t.(IAny_nameContext)
  24353. }
  24354. func (s *Base_window_nameContext) GetRuleContext() antlr.RuleContext {
  24355. return s
  24356. }
  24357. func (s *Base_window_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  24358. return antlr.TreesStringTree(s, ruleNames, recog)
  24359. }
  24360. func (s *Base_window_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  24361. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24362. listenerT.EnterBase_window_name(s)
  24363. }
  24364. }
  24365. func (s *Base_window_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  24366. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24367. listenerT.ExitBase_window_name(s)
  24368. }
  24369. }
  24370. func (p *SQLiteParser) Base_window_name() (localctx IBase_window_nameContext) {
  24371. this := p
  24372. _ = this
  24373. localctx = NewBase_window_nameContext(p, p.GetParserRuleContext(), p.GetState())
  24374. p.EnterRule(localctx, 220, SQLiteParserRULE_base_window_name)
  24375. defer func() {
  24376. p.ExitRule()
  24377. }()
  24378. defer func() {
  24379. if err := recover(); err != nil {
  24380. if v, ok := err.(antlr.RecognitionException); ok {
  24381. localctx.SetException(v)
  24382. p.GetErrorHandler().ReportError(p, v)
  24383. p.GetErrorHandler().Recover(p, v)
  24384. } else {
  24385. panic(err)
  24386. }
  24387. }
  24388. }()
  24389. p.EnterOuterAlt(localctx, 1)
  24390. {
  24391. p.SetState(2160)
  24392. p.Any_name()
  24393. }
  24394. return localctx
  24395. }
  24396. // ISimple_funcContext is an interface to support dynamic dispatch.
  24397. type ISimple_funcContext interface {
  24398. antlr.ParserRuleContext
  24399. // GetParser returns the parser.
  24400. GetParser() antlr.Parser
  24401. // Getter signatures
  24402. Any_name() IAny_nameContext
  24403. // IsSimple_funcContext differentiates from other interfaces.
  24404. IsSimple_funcContext()
  24405. }
  24406. type Simple_funcContext struct {
  24407. *antlr.BaseParserRuleContext
  24408. parser antlr.Parser
  24409. }
  24410. func NewEmptySimple_funcContext() *Simple_funcContext {
  24411. var p = new(Simple_funcContext)
  24412. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  24413. p.RuleIndex = SQLiteParserRULE_simple_func
  24414. return p
  24415. }
  24416. func (*Simple_funcContext) IsSimple_funcContext() {}
  24417. func NewSimple_funcContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Simple_funcContext {
  24418. var p = new(Simple_funcContext)
  24419. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  24420. p.parser = parser
  24421. p.RuleIndex = SQLiteParserRULE_simple_func
  24422. return p
  24423. }
  24424. func (s *Simple_funcContext) GetParser() antlr.Parser { return s.parser }
  24425. func (s *Simple_funcContext) Any_name() IAny_nameContext {
  24426. var t antlr.RuleContext
  24427. for _, ctx := range s.GetChildren() {
  24428. if _, ok := ctx.(IAny_nameContext); ok {
  24429. t = ctx.(antlr.RuleContext)
  24430. break
  24431. }
  24432. }
  24433. if t == nil {
  24434. return nil
  24435. }
  24436. return t.(IAny_nameContext)
  24437. }
  24438. func (s *Simple_funcContext) GetRuleContext() antlr.RuleContext {
  24439. return s
  24440. }
  24441. func (s *Simple_funcContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  24442. return antlr.TreesStringTree(s, ruleNames, recog)
  24443. }
  24444. func (s *Simple_funcContext) EnterRule(listener antlr.ParseTreeListener) {
  24445. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24446. listenerT.EnterSimple_func(s)
  24447. }
  24448. }
  24449. func (s *Simple_funcContext) ExitRule(listener antlr.ParseTreeListener) {
  24450. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24451. listenerT.ExitSimple_func(s)
  24452. }
  24453. }
  24454. func (p *SQLiteParser) Simple_func() (localctx ISimple_funcContext) {
  24455. this := p
  24456. _ = this
  24457. localctx = NewSimple_funcContext(p, p.GetParserRuleContext(), p.GetState())
  24458. p.EnterRule(localctx, 222, SQLiteParserRULE_simple_func)
  24459. defer func() {
  24460. p.ExitRule()
  24461. }()
  24462. defer func() {
  24463. if err := recover(); err != nil {
  24464. if v, ok := err.(antlr.RecognitionException); ok {
  24465. localctx.SetException(v)
  24466. p.GetErrorHandler().ReportError(p, v)
  24467. p.GetErrorHandler().Recover(p, v)
  24468. } else {
  24469. panic(err)
  24470. }
  24471. }
  24472. }()
  24473. p.EnterOuterAlt(localctx, 1)
  24474. {
  24475. p.SetState(2162)
  24476. p.Any_name()
  24477. }
  24478. return localctx
  24479. }
  24480. // IAggregate_funcContext is an interface to support dynamic dispatch.
  24481. type IAggregate_funcContext interface {
  24482. antlr.ParserRuleContext
  24483. // GetParser returns the parser.
  24484. GetParser() antlr.Parser
  24485. // Getter signatures
  24486. Any_name() IAny_nameContext
  24487. // IsAggregate_funcContext differentiates from other interfaces.
  24488. IsAggregate_funcContext()
  24489. }
  24490. type Aggregate_funcContext struct {
  24491. *antlr.BaseParserRuleContext
  24492. parser antlr.Parser
  24493. }
  24494. func NewEmptyAggregate_funcContext() *Aggregate_funcContext {
  24495. var p = new(Aggregate_funcContext)
  24496. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  24497. p.RuleIndex = SQLiteParserRULE_aggregate_func
  24498. return p
  24499. }
  24500. func (*Aggregate_funcContext) IsAggregate_funcContext() {}
  24501. func NewAggregate_funcContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Aggregate_funcContext {
  24502. var p = new(Aggregate_funcContext)
  24503. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  24504. p.parser = parser
  24505. p.RuleIndex = SQLiteParserRULE_aggregate_func
  24506. return p
  24507. }
  24508. func (s *Aggregate_funcContext) GetParser() antlr.Parser { return s.parser }
  24509. func (s *Aggregate_funcContext) Any_name() IAny_nameContext {
  24510. var t antlr.RuleContext
  24511. for _, ctx := range s.GetChildren() {
  24512. if _, ok := ctx.(IAny_nameContext); ok {
  24513. t = ctx.(antlr.RuleContext)
  24514. break
  24515. }
  24516. }
  24517. if t == nil {
  24518. return nil
  24519. }
  24520. return t.(IAny_nameContext)
  24521. }
  24522. func (s *Aggregate_funcContext) GetRuleContext() antlr.RuleContext {
  24523. return s
  24524. }
  24525. func (s *Aggregate_funcContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  24526. return antlr.TreesStringTree(s, ruleNames, recog)
  24527. }
  24528. func (s *Aggregate_funcContext) EnterRule(listener antlr.ParseTreeListener) {
  24529. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24530. listenerT.EnterAggregate_func(s)
  24531. }
  24532. }
  24533. func (s *Aggregate_funcContext) ExitRule(listener antlr.ParseTreeListener) {
  24534. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24535. listenerT.ExitAggregate_func(s)
  24536. }
  24537. }
  24538. func (p *SQLiteParser) Aggregate_func() (localctx IAggregate_funcContext) {
  24539. this := p
  24540. _ = this
  24541. localctx = NewAggregate_funcContext(p, p.GetParserRuleContext(), p.GetState())
  24542. p.EnterRule(localctx, 224, SQLiteParserRULE_aggregate_func)
  24543. defer func() {
  24544. p.ExitRule()
  24545. }()
  24546. defer func() {
  24547. if err := recover(); err != nil {
  24548. if v, ok := err.(antlr.RecognitionException); ok {
  24549. localctx.SetException(v)
  24550. p.GetErrorHandler().ReportError(p, v)
  24551. p.GetErrorHandler().Recover(p, v)
  24552. } else {
  24553. panic(err)
  24554. }
  24555. }
  24556. }()
  24557. p.EnterOuterAlt(localctx, 1)
  24558. {
  24559. p.SetState(2164)
  24560. p.Any_name()
  24561. }
  24562. return localctx
  24563. }
  24564. // ITable_function_nameContext is an interface to support dynamic dispatch.
  24565. type ITable_function_nameContext interface {
  24566. antlr.ParserRuleContext
  24567. // GetParser returns the parser.
  24568. GetParser() antlr.Parser
  24569. // Getter signatures
  24570. Any_name() IAny_nameContext
  24571. // IsTable_function_nameContext differentiates from other interfaces.
  24572. IsTable_function_nameContext()
  24573. }
  24574. type Table_function_nameContext struct {
  24575. *antlr.BaseParserRuleContext
  24576. parser antlr.Parser
  24577. }
  24578. func NewEmptyTable_function_nameContext() *Table_function_nameContext {
  24579. var p = new(Table_function_nameContext)
  24580. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  24581. p.RuleIndex = SQLiteParserRULE_table_function_name
  24582. return p
  24583. }
  24584. func (*Table_function_nameContext) IsTable_function_nameContext() {}
  24585. func NewTable_function_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Table_function_nameContext {
  24586. var p = new(Table_function_nameContext)
  24587. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  24588. p.parser = parser
  24589. p.RuleIndex = SQLiteParserRULE_table_function_name
  24590. return p
  24591. }
  24592. func (s *Table_function_nameContext) GetParser() antlr.Parser { return s.parser }
  24593. func (s *Table_function_nameContext) Any_name() IAny_nameContext {
  24594. var t antlr.RuleContext
  24595. for _, ctx := range s.GetChildren() {
  24596. if _, ok := ctx.(IAny_nameContext); ok {
  24597. t = ctx.(antlr.RuleContext)
  24598. break
  24599. }
  24600. }
  24601. if t == nil {
  24602. return nil
  24603. }
  24604. return t.(IAny_nameContext)
  24605. }
  24606. func (s *Table_function_nameContext) GetRuleContext() antlr.RuleContext {
  24607. return s
  24608. }
  24609. func (s *Table_function_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  24610. return antlr.TreesStringTree(s, ruleNames, recog)
  24611. }
  24612. func (s *Table_function_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  24613. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24614. listenerT.EnterTable_function_name(s)
  24615. }
  24616. }
  24617. func (s *Table_function_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  24618. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24619. listenerT.ExitTable_function_name(s)
  24620. }
  24621. }
  24622. func (p *SQLiteParser) Table_function_name() (localctx ITable_function_nameContext) {
  24623. this := p
  24624. _ = this
  24625. localctx = NewTable_function_nameContext(p, p.GetParserRuleContext(), p.GetState())
  24626. p.EnterRule(localctx, 226, SQLiteParserRULE_table_function_name)
  24627. defer func() {
  24628. p.ExitRule()
  24629. }()
  24630. defer func() {
  24631. if err := recover(); err != nil {
  24632. if v, ok := err.(antlr.RecognitionException); ok {
  24633. localctx.SetException(v)
  24634. p.GetErrorHandler().ReportError(p, v)
  24635. p.GetErrorHandler().Recover(p, v)
  24636. } else {
  24637. panic(err)
  24638. }
  24639. }
  24640. }()
  24641. p.EnterOuterAlt(localctx, 1)
  24642. {
  24643. p.SetState(2166)
  24644. p.Any_name()
  24645. }
  24646. return localctx
  24647. }
  24648. // IAny_nameContext is an interface to support dynamic dispatch.
  24649. type IAny_nameContext interface {
  24650. antlr.ParserRuleContext
  24651. // GetParser returns the parser.
  24652. GetParser() antlr.Parser
  24653. // Getter signatures
  24654. IDENTIFIER() antlr.TerminalNode
  24655. Keyword() IKeywordContext
  24656. STRING_LITERAL() antlr.TerminalNode
  24657. OPEN_PAR() antlr.TerminalNode
  24658. Any_name() IAny_nameContext
  24659. CLOSE_PAR() antlr.TerminalNode
  24660. // IsAny_nameContext differentiates from other interfaces.
  24661. IsAny_nameContext()
  24662. }
  24663. type Any_nameContext struct {
  24664. *antlr.BaseParserRuleContext
  24665. parser antlr.Parser
  24666. }
  24667. func NewEmptyAny_nameContext() *Any_nameContext {
  24668. var p = new(Any_nameContext)
  24669. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
  24670. p.RuleIndex = SQLiteParserRULE_any_name
  24671. return p
  24672. }
  24673. func (*Any_nameContext) IsAny_nameContext() {}
  24674. func NewAny_nameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *Any_nameContext {
  24675. var p = new(Any_nameContext)
  24676. p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
  24677. p.parser = parser
  24678. p.RuleIndex = SQLiteParserRULE_any_name
  24679. return p
  24680. }
  24681. func (s *Any_nameContext) GetParser() antlr.Parser { return s.parser }
  24682. func (s *Any_nameContext) IDENTIFIER() antlr.TerminalNode {
  24683. return s.GetToken(SQLiteParserIDENTIFIER, 0)
  24684. }
  24685. func (s *Any_nameContext) Keyword() IKeywordContext {
  24686. var t antlr.RuleContext
  24687. for _, ctx := range s.GetChildren() {
  24688. if _, ok := ctx.(IKeywordContext); ok {
  24689. t = ctx.(antlr.RuleContext)
  24690. break
  24691. }
  24692. }
  24693. if t == nil {
  24694. return nil
  24695. }
  24696. return t.(IKeywordContext)
  24697. }
  24698. func (s *Any_nameContext) STRING_LITERAL() antlr.TerminalNode {
  24699. return s.GetToken(SQLiteParserSTRING_LITERAL, 0)
  24700. }
  24701. func (s *Any_nameContext) OPEN_PAR() antlr.TerminalNode {
  24702. return s.GetToken(SQLiteParserOPEN_PAR, 0)
  24703. }
  24704. func (s *Any_nameContext) Any_name() IAny_nameContext {
  24705. var t antlr.RuleContext
  24706. for _, ctx := range s.GetChildren() {
  24707. if _, ok := ctx.(IAny_nameContext); ok {
  24708. t = ctx.(antlr.RuleContext)
  24709. break
  24710. }
  24711. }
  24712. if t == nil {
  24713. return nil
  24714. }
  24715. return t.(IAny_nameContext)
  24716. }
  24717. func (s *Any_nameContext) CLOSE_PAR() antlr.TerminalNode {
  24718. return s.GetToken(SQLiteParserCLOSE_PAR, 0)
  24719. }
  24720. func (s *Any_nameContext) GetRuleContext() antlr.RuleContext {
  24721. return s
  24722. }
  24723. func (s *Any_nameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
  24724. return antlr.TreesStringTree(s, ruleNames, recog)
  24725. }
  24726. func (s *Any_nameContext) EnterRule(listener antlr.ParseTreeListener) {
  24727. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24728. listenerT.EnterAny_name(s)
  24729. }
  24730. }
  24731. func (s *Any_nameContext) ExitRule(listener antlr.ParseTreeListener) {
  24732. if listenerT, ok := listener.(SQLiteParserListener); ok {
  24733. listenerT.ExitAny_name(s)
  24734. }
  24735. }
  24736. func (p *SQLiteParser) Any_name() (localctx IAny_nameContext) {
  24737. this := p
  24738. _ = this
  24739. localctx = NewAny_nameContext(p, p.GetParserRuleContext(), p.GetState())
  24740. p.EnterRule(localctx, 228, SQLiteParserRULE_any_name)
  24741. defer func() {
  24742. p.ExitRule()
  24743. }()
  24744. defer func() {
  24745. if err := recover(); err != nil {
  24746. if v, ok := err.(antlr.RecognitionException); ok {
  24747. localctx.SetException(v)
  24748. p.GetErrorHandler().ReportError(p, v)
  24749. p.GetErrorHandler().Recover(p, v)
  24750. } else {
  24751. panic(err)
  24752. }
  24753. }
  24754. }()
  24755. p.SetState(2175)
  24756. p.GetErrorHandler().Sync(p)
  24757. switch p.GetTokenStream().LA(1) {
  24758. case SQLiteParserIDENTIFIER:
  24759. p.EnterOuterAlt(localctx, 1)
  24760. {
  24761. p.SetState(2168)
  24762. p.Match(SQLiteParserIDENTIFIER)
  24763. }
  24764. case SQLiteParserABORT_, SQLiteParserACTION_, SQLiteParserADD_, SQLiteParserAFTER_, SQLiteParserALL_, SQLiteParserALTER_, SQLiteParserANALYZE_, SQLiteParserAND_, SQLiteParserAS_, SQLiteParserASC_, SQLiteParserATTACH_, SQLiteParserAUTOINCREMENT_, SQLiteParserBEFORE_, SQLiteParserBEGIN_, SQLiteParserBETWEEN_, SQLiteParserBY_, SQLiteParserCASCADE_, SQLiteParserCASE_, SQLiteParserCAST_, SQLiteParserCHECK_, SQLiteParserCOLLATE_, SQLiteParserCOLUMN_, SQLiteParserCOMMIT_, SQLiteParserCONFLICT_, SQLiteParserCONSTRAINT_, SQLiteParserCREATE_, SQLiteParserCROSS_, SQLiteParserCURRENT_DATE_, SQLiteParserCURRENT_TIME_, SQLiteParserCURRENT_TIMESTAMP_, SQLiteParserDATABASE_, SQLiteParserDEFAULT_, SQLiteParserDEFERRABLE_, SQLiteParserDEFERRED_, SQLiteParserDELETE_, SQLiteParserDESC_, SQLiteParserDETACH_, SQLiteParserDISTINCT_, SQLiteParserDROP_, SQLiteParserEACH_, SQLiteParserELSE_, SQLiteParserEND_, SQLiteParserESCAPE_, SQLiteParserEXCEPT_, SQLiteParserEXCLUSIVE_, SQLiteParserEXISTS_, SQLiteParserEXPLAIN_, SQLiteParserFAIL_, SQLiteParserFOR_, SQLiteParserFOREIGN_, SQLiteParserFROM_, SQLiteParserFULL_, SQLiteParserGLOB_, SQLiteParserGROUP_, SQLiteParserHAVING_, SQLiteParserIF_, SQLiteParserIGNORE_, SQLiteParserIMMEDIATE_, SQLiteParserIN_, SQLiteParserINDEX_, SQLiteParserINDEXED_, SQLiteParserINITIALLY_, SQLiteParserINNER_, SQLiteParserINSERT_, SQLiteParserINSTEAD_, SQLiteParserINTERSECT_, SQLiteParserINTO_, SQLiteParserIS_, SQLiteParserISNULL_, SQLiteParserJOIN_, SQLiteParserKEY_, SQLiteParserLEFT_, SQLiteParserLIKE_, SQLiteParserLIMIT_, SQLiteParserMATCH_, SQLiteParserNATURAL_, SQLiteParserNO_, SQLiteParserNOT_, SQLiteParserNOTNULL_, SQLiteParserNULL_, SQLiteParserOF_, SQLiteParserOFFSET_, SQLiteParserON_, SQLiteParserOR_, SQLiteParserORDER_, SQLiteParserOUTER_, SQLiteParserPLAN_, SQLiteParserPRAGMA_, SQLiteParserPRIMARY_, SQLiteParserQUERY_, SQLiteParserRAISE_, SQLiteParserRECURSIVE_, SQLiteParserREFERENCES_, SQLiteParserREGEXP_, SQLiteParserREINDEX_, SQLiteParserRELEASE_, SQLiteParserRENAME_, SQLiteParserREPLACE_, SQLiteParserRESTRICT_, SQLiteParserRETURNING_, SQLiteParserRIGHT_, SQLiteParserROLLBACK_, SQLiteParserROW_, SQLiteParserROWS_, SQLiteParserSAVEPOINT_, SQLiteParserSELECT_, SQLiteParserSET_, SQLiteParserSTRICT_, SQLiteParserTABLE_, SQLiteParserTEMP_, SQLiteParserTEMPORARY_, SQLiteParserTHEN_, SQLiteParserTO_, SQLiteParserTRANSACTION_, SQLiteParserTRIGGER_, SQLiteParserUNION_, SQLiteParserUNIQUE_, SQLiteParserUPDATE_, SQLiteParserUSING_, SQLiteParserVACUUM_, SQLiteParserVALUES_, SQLiteParserVIEW_, SQLiteParserVIRTUAL_, SQLiteParserWHEN_, SQLiteParserWHERE_, SQLiteParserWITH_, SQLiteParserWITHOUT_, SQLiteParserFIRST_VALUE_, SQLiteParserOVER_, SQLiteParserPARTITION_, SQLiteParserRANGE_, SQLiteParserPRECEDING_, SQLiteParserUNBOUNDED_, SQLiteParserCURRENT_, SQLiteParserFOLLOWING_, SQLiteParserCUME_DIST_, SQLiteParserDENSE_RANK_, SQLiteParserLAG_, SQLiteParserLAST_VALUE_, SQLiteParserLEAD_, SQLiteParserNTH_VALUE_, SQLiteParserNTILE_, SQLiteParserPERCENT_RANK_, SQLiteParserRANK_, SQLiteParserROW_NUMBER_, SQLiteParserGENERATED_, SQLiteParserALWAYS_, SQLiteParserSTORED_, SQLiteParserTRUE_, SQLiteParserFALSE_, SQLiteParserWINDOW_, SQLiteParserNULLS_, SQLiteParserFIRST_, SQLiteParserLAST_, SQLiteParserFILTER_, SQLiteParserGROUPS_, SQLiteParserEXCLUDE_:
  24765. p.EnterOuterAlt(localctx, 2)
  24766. {
  24767. p.SetState(2169)
  24768. p.Keyword()
  24769. }
  24770. case SQLiteParserSTRING_LITERAL:
  24771. p.EnterOuterAlt(localctx, 3)
  24772. {
  24773. p.SetState(2170)
  24774. p.Match(SQLiteParserSTRING_LITERAL)
  24775. }
  24776. case SQLiteParserOPEN_PAR:
  24777. p.EnterOuterAlt(localctx, 4)
  24778. {
  24779. p.SetState(2171)
  24780. p.Match(SQLiteParserOPEN_PAR)
  24781. }
  24782. {
  24783. p.SetState(2172)
  24784. p.Any_name()
  24785. }
  24786. {
  24787. p.SetState(2173)
  24788. p.Match(SQLiteParserCLOSE_PAR)
  24789. }
  24790. default:
  24791. panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
  24792. }
  24793. return localctx
  24794. }
  24795. func (p *SQLiteParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool {
  24796. switch ruleIndex {
  24797. case 34:
  24798. var t *ExprContext = nil
  24799. if localctx != nil {
  24800. t = localctx.(*ExprContext)
  24801. }
  24802. return p.Expr_Sempred(t, predIndex)
  24803. default:
  24804. panic("No predicate with index: " + fmt.Sprint(ruleIndex))
  24805. }
  24806. }
  24807. func (p *SQLiteParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool {
  24808. this := p
  24809. _ = this
  24810. switch predIndex {
  24811. case 0:
  24812. return p.Precpred(p.GetParserRuleContext(), 20)
  24813. case 1:
  24814. return p.Precpred(p.GetParserRuleContext(), 19)
  24815. case 2:
  24816. return p.Precpred(p.GetParserRuleContext(), 18)
  24817. case 3:
  24818. return p.Precpred(p.GetParserRuleContext(), 17)
  24819. case 4:
  24820. return p.Precpred(p.GetParserRuleContext(), 16)
  24821. case 5:
  24822. return p.Precpred(p.GetParserRuleContext(), 15)
  24823. case 6:
  24824. return p.Precpred(p.GetParserRuleContext(), 14)
  24825. case 7:
  24826. return p.Precpred(p.GetParserRuleContext(), 12)
  24827. case 8:
  24828. return p.Precpred(p.GetParserRuleContext(), 11)
  24829. case 9:
  24830. return p.Precpred(p.GetParserRuleContext(), 4)
  24831. case 10:
  24832. return p.Precpred(p.GetParserRuleContext(), 13)
  24833. case 11:
  24834. return p.Precpred(p.GetParserRuleContext(), 7)
  24835. case 12:
  24836. return p.Precpred(p.GetParserRuleContext(), 6)
  24837. case 13:
  24838. return p.Precpred(p.GetParserRuleContext(), 5)
  24839. default:
  24840. panic("No predicate with index: " + fmt.Sprint(predIndex))
  24841. }
  24842. }