Parser.cs 175 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575
  1. /*
  2. * Copyright (C) 2007-2008, Jeff Thompson
  3. *
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * * Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. * * Neither the name of the copyright holder nor the names of its contributors
  15. * may be used to endorse or promote products derived from this software
  16. * without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  22. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  23. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  24. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  25. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  26. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  27. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. */
  30. using System;
  31. using System.Collections.Generic;
  32. // disable warning on l1, don't see how we can
  33. // code this differently
  34. #pragma warning disable 0168, 0219, 0162
  35. namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
  36. {
  37. public class Parser
  38. {
  39. public static IEnumerable<bool> read_term2(object Term, object Options)
  40. {
  41. Variable Answer = new Variable();
  42. Variable Variables = new Variable();
  43. foreach (bool l1 in read_termOptions(Options, Variables))
  44. {
  45. foreach (bool l2 in portable_read3(Answer, Variables, new Variable()))
  46. {
  47. foreach (bool l3 in remove_pos(Answer, Term))
  48. yield return false;
  49. }
  50. }
  51. }
  52. public static IEnumerable<bool> read_term3(object Input, object Term, object Options)
  53. {
  54. Variable SaveInput = new Variable();
  55. Variable Answer = new Variable();
  56. Variable Variables = new Variable();
  57. foreach (bool l1 in read_termOptions(Options, Variables))
  58. {
  59. foreach (bool l2 in YP.current_input(SaveInput))
  60. {
  61. try
  62. {
  63. YP.see(Input);
  64. foreach (bool l3 in portable_read3(Answer, Variables, new Variable()))
  65. {
  66. foreach (bool l4 in remove_pos(Answer, Term))
  67. yield return false;
  68. }
  69. }
  70. finally
  71. {
  72. YP.see(SaveInput);
  73. }
  74. }
  75. }
  76. }
  77. /// <summary>
  78. /// For read_term, check if Options has variable_names(Variables).
  79. /// Otherwise, ignore Options.
  80. /// </summary>
  81. /// <param name="Options"></param>
  82. /// <param name="Variables"></param>
  83. /// <returns></returns>
  84. private static IEnumerable<bool> read_termOptions(object Options, object Variables)
  85. {
  86. Options = YP.getValue(Options);
  87. if (Options is Variable)
  88. throw new PrologException(Atom.a("instantiation_error"), "Options is an unbound variable");
  89. // First try to match Options = [variable_names(Variables)]
  90. foreach (bool l1 in YP.unify(Options, ListPair.make(new Functor1("variable_names", Variables))))
  91. {
  92. yield return false;
  93. yield break;
  94. }
  95. // Default: Ignore Options.
  96. yield return false;
  97. }
  98. public static IEnumerable<bool> read1(object Term)
  99. {
  100. return read_term2(Term, Atom.NIL);
  101. }
  102. public static IEnumerable<bool> read2(object Input, object Term)
  103. {
  104. return read_term3(Input, Term, Atom.NIL);
  105. }
  106. public static IEnumerable<bool> formatError(object Output, object Format, object Arguments)
  107. {
  108. // Debug: Simple implementation for now.
  109. YP.write(Format);
  110. YP.write(Arguments);
  111. YP.nl();
  112. yield return false;
  113. }
  114. // Debug: Hand-modify this central predicate to do tail recursion.
  115. public static IEnumerable<bool> read_tokens(object arg1, object arg2, object arg3)
  116. {
  117. bool repeat = true;
  118. while (repeat)
  119. {
  120. repeat = false;
  121. {
  122. object C1 = arg1;
  123. object Dict = arg2;
  124. object Tokens = arg3;
  125. Variable C2 = new Variable();
  126. if (YP.lessThanOrEqual(C1, new ListPair(32, Atom.NIL)))
  127. {
  128. if (YP.greaterThanOrEqual(C1, 0))
  129. {
  130. foreach (bool l4 in YP.get_code(C2))
  131. {
  132. #if false
  133. foreach (bool l5 in read_tokens(C2, Dict, Tokens))
  134. {
  135. yield return false;
  136. }
  137. #endif
  138. arg1 = YP.getValue(C2);
  139. arg2 = YP.getValue(Dict);
  140. arg3 = YP.getValue(Tokens);
  141. repeat = true;
  142. }
  143. }
  144. goto cutIf1;
  145. }
  146. if (YP.greaterThanOrEqual(C1, new ListPair(97, Atom.NIL)))
  147. {
  148. if (YP.lessThanOrEqual(C1, new ListPair(122, Atom.NIL)))
  149. {
  150. foreach (bool l4 in read_identifier(C1, Dict, Tokens))
  151. {
  152. yield return false;
  153. }
  154. goto cutIf2;
  155. }
  156. }
  157. if (YP.greaterThanOrEqual(C1, new ListPair(65, Atom.NIL)))
  158. {
  159. if (YP.lessThanOrEqual(C1, new ListPair(90, Atom.NIL)))
  160. {
  161. foreach (bool l4 in read_variable(C1, Dict, Tokens))
  162. {
  163. yield return false;
  164. }
  165. goto cutIf3;
  166. }
  167. }
  168. if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL)))
  169. {
  170. if (YP.lessThanOrEqual(C1, new ListPair(57, Atom.NIL)))
  171. {
  172. foreach (bool l4 in read_number(C1, Dict, Tokens))
  173. {
  174. yield return false;
  175. }
  176. goto cutIf4;
  177. }
  178. }
  179. if (YP.lessThan(C1, 127))
  180. {
  181. foreach (bool l3 in read_special(C1, Dict, Tokens))
  182. {
  183. yield return false;
  184. }
  185. goto cutIf5;
  186. }
  187. if (YP.lessThanOrEqual(C1, 160))
  188. {
  189. foreach (bool l3 in YP.get_code(C2))
  190. {
  191. #if false
  192. foreach (bool l4 in read_tokens(C2, Dict, Tokens))
  193. {
  194. yield return false;
  195. }
  196. #endif
  197. arg1 = YP.getValue(C2);
  198. arg2 = YP.getValue(Dict);
  199. arg3 = YP.getValue(Tokens);
  200. repeat = true;
  201. }
  202. goto cutIf6;
  203. }
  204. if (YP.greaterThanOrEqual(C1, 223))
  205. {
  206. if (YP.notEqual(C1, 247))
  207. {
  208. foreach (bool l4 in read_identifier(C1, Dict, Tokens))
  209. {
  210. yield return false;
  211. }
  212. goto cutIf7;
  213. }
  214. }
  215. if (YP.greaterThanOrEqual(C1, 192))
  216. {
  217. if (YP.notEqual(C1, 215))
  218. {
  219. foreach (bool l4 in read_variable(C1, Dict, Tokens))
  220. {
  221. yield return false;
  222. }
  223. goto cutIf8;
  224. }
  225. }
  226. if (YP.notEqual(C1, 170))
  227. {
  228. if (YP.notEqual(C1, 186))
  229. {
  230. foreach (bool l4 in read_symbol(C1, Dict, Tokens))
  231. {
  232. yield return false;
  233. }
  234. goto cutIf9;
  235. }
  236. }
  237. foreach (bool l2 in read_identifier(C1, Dict, Tokens))
  238. {
  239. yield return false;
  240. }
  241. cutIf9:
  242. cutIf8:
  243. cutIf7:
  244. cutIf6:
  245. cutIf5:
  246. cutIf4:
  247. cutIf3:
  248. cutIf2:
  249. cutIf1:
  250. { }
  251. }
  252. }
  253. }
  254. // Compiler output follows.
  255. class YPInnerClass { }
  256. // static Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; }
  257. public static IEnumerable<bool> parseInput(object TermList)
  258. {
  259. {
  260. Variable TermAndVariables = new Variable();
  261. FindallAnswers findallAnswers1 = new FindallAnswers(TermAndVariables);
  262. foreach (bool l2 in parseInputHelper(TermAndVariables))
  263. {
  264. findallAnswers1.add();
  265. }
  266. foreach (bool l2 in findallAnswers1.result(TermList))
  267. {
  268. yield return false;
  269. }
  270. }
  271. }
  272. public static IEnumerable<bool> parseInputHelper(object arg1)
  273. {
  274. {
  275. Variable Term = new Variable();
  276. Variable Variables = new Variable();
  277. Variable Answer = new Variable();
  278. Variable x4 = new Variable();
  279. foreach (bool l2 in YP.unify(arg1, new Functor2("f", Term, Variables)))
  280. {
  281. foreach (bool l3 in YP.repeat())
  282. {
  283. foreach (bool l4 in portable_read3(Answer, Variables, x4))
  284. {
  285. foreach (bool l5 in remove_pos(Answer, Term))
  286. {
  287. if (YP.termEqual(Term, Atom.a("end_of_file")))
  288. {
  289. yield break;
  290. goto cutIf1;
  291. }
  292. yield return false;
  293. cutIf1:
  294. { }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. }
  301. public static IEnumerable<bool> clear_errors()
  302. {
  303. {
  304. yield return false;
  305. }
  306. }
  307. public static IEnumerable<bool> remove_pos(object arg1, object arg2)
  308. {
  309. {
  310. Variable X = new Variable();
  311. foreach (bool l2 in YP.unify(arg1, X))
  312. {
  313. foreach (bool l3 in YP.unify(arg2, X))
  314. {
  315. if (YP.var(X))
  316. {
  317. yield return true;
  318. yield break;
  319. }
  320. }
  321. }
  322. }
  323. {
  324. object X = arg2;
  325. Variable _Pos = new Variable();
  326. Variable _Name = new Variable();
  327. foreach (bool l2 in YP.unify(arg1, new Functor3("$VAR", _Pos, _Name, X)))
  328. {
  329. if (YP.var(X))
  330. {
  331. yield return true;
  332. yield break;
  333. }
  334. }
  335. }
  336. {
  337. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  338. {
  339. foreach (bool l3 in YP.unify(arg2, Atom.NIL))
  340. {
  341. yield return true;
  342. yield break;
  343. }
  344. }
  345. }
  346. {
  347. Variable H = new Variable();
  348. Variable T = new Variable();
  349. Variable NH = new Variable();
  350. Variable NT = new Variable();
  351. foreach (bool l2 in YP.unify(arg1, new ListPair(H, T)))
  352. {
  353. foreach (bool l3 in YP.unify(arg2, new ListPair(NH, NT)))
  354. {
  355. foreach (bool l4 in remove_pos(H, NH))
  356. {
  357. foreach (bool l5 in remove_pos(T, NT))
  358. {
  359. yield return false;
  360. }
  361. }
  362. yield break;
  363. }
  364. }
  365. }
  366. {
  367. Variable A = new Variable();
  368. Variable B = new Variable();
  369. Variable NA = new Variable();
  370. Variable NB = new Variable();
  371. foreach (bool l2 in YP.unify(arg1, new Functor2(",", A, B)))
  372. {
  373. foreach (bool l3 in YP.unify(arg2, new Functor2(",", NA, NB)))
  374. {
  375. foreach (bool l4 in remove_pos(A, NA))
  376. {
  377. foreach (bool l5 in remove_pos(B, NB))
  378. {
  379. yield return false;
  380. }
  381. }
  382. yield break;
  383. }
  384. }
  385. }
  386. {
  387. Variable Atom_1 = new Variable();
  388. Variable _F = new Variable();
  389. foreach (bool l2 in YP.unify(arg1, Atom_1))
  390. {
  391. foreach (bool l3 in YP.unify(arg2, Atom_1))
  392. {
  393. foreach (bool l4 in YP.functor(Atom_1, _F, 0))
  394. {
  395. yield return false;
  396. }
  397. }
  398. }
  399. }
  400. {
  401. object Term = arg1;
  402. object NewTerm = arg2;
  403. Variable Func = new Variable();
  404. Variable _Pos = new Variable();
  405. Variable Args = new Variable();
  406. Variable NArgs = new Variable();
  407. if (YP.nonvar(Term))
  408. {
  409. foreach (bool l3 in YP.univ(Term, new ListPair(Func, new ListPair(_Pos, Args))))
  410. {
  411. foreach (bool l4 in remove_pos(Args, NArgs))
  412. {
  413. foreach (bool l5 in YP.univ(NewTerm, new ListPair(Func, NArgs)))
  414. {
  415. yield return false;
  416. }
  417. }
  418. }
  419. }
  420. }
  421. }
  422. public static IEnumerable<bool> portable_read_position(object Term, object PosTerm, object Syntax)
  423. {
  424. {
  425. foreach (bool l2 in portable_read(PosTerm, Syntax))
  426. {
  427. foreach (bool l3 in remove_pos(PosTerm, Term))
  428. {
  429. yield return false;
  430. }
  431. }
  432. }
  433. }
  434. public static IEnumerable<bool> portable_read(object Answer, object Syntax)
  435. {
  436. {
  437. Variable Tokens = new Variable();
  438. Variable ParseTokens = new Variable();
  439. foreach (bool l2 in read_tokens1(Tokens))
  440. {
  441. foreach (bool l3 in remove_comments(Tokens, ParseTokens, Syntax))
  442. {
  443. foreach (bool l4 in parse2(ParseTokens, Answer))
  444. {
  445. yield return false;
  446. }
  447. }
  448. }
  449. }
  450. }
  451. public static IEnumerable<bool> portable_read3(object Answer, object Variables, object Syntax)
  452. {
  453. {
  454. Variable Tokens = new Variable();
  455. Variable ParseTokens = new Variable();
  456. foreach (bool l2 in read_tokens2(Tokens, Variables))
  457. {
  458. foreach (bool l3 in remove_comments(Tokens, ParseTokens, Syntax))
  459. {
  460. foreach (bool l4 in parse2(ParseTokens, Answer))
  461. {
  462. yield return false;
  463. }
  464. }
  465. }
  466. }
  467. }
  468. public static IEnumerable<bool> remove_comments(object arg1, object arg2, object arg3)
  469. {
  470. {
  471. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  472. {
  473. foreach (bool l3 in YP.unify(arg2, Atom.NIL))
  474. {
  475. foreach (bool l4 in YP.unify(arg3, Atom.NIL))
  476. {
  477. yield return false;
  478. }
  479. }
  480. }
  481. }
  482. {
  483. object Ys = arg2;
  484. Variable S = new Variable();
  485. Variable E = new Variable();
  486. Variable Xs = new Variable();
  487. Variable Zs = new Variable();
  488. foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("comment", S, E), Xs)))
  489. {
  490. foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("comment", S, E), Zs)))
  491. {
  492. foreach (bool l4 in remove_comments(Xs, Ys, Zs))
  493. {
  494. yield return false;
  495. }
  496. yield break;
  497. }
  498. }
  499. }
  500. {
  501. Variable Pos = new Variable();
  502. Variable Xs = new Variable();
  503. Variable Ys = new Variable();
  504. Variable Pos2 = new Variable();
  505. Variable Zs = new Variable();
  506. foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("/", Atom.a("["), Pos), Xs)))
  507. {
  508. foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("["), Ys)))
  509. {
  510. foreach (bool l4 in YP.unify(arg3, new ListPair(new Functor2("list", Pos, Pos2), Zs)))
  511. {
  512. foreach (bool l5 in YP.unify(Pos2, YP.add(Pos, 1)))
  513. {
  514. foreach (bool l6 in remove_comments(Xs, Ys, Zs))
  515. {
  516. yield return false;
  517. }
  518. }
  519. yield break;
  520. }
  521. }
  522. }
  523. }
  524. {
  525. Variable Pos = new Variable();
  526. Variable Xs = new Variable();
  527. Variable Ys = new Variable();
  528. Variable Pos2 = new Variable();
  529. Variable Zs = new Variable();
  530. foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("/", Atom.a("]"), Pos), Xs)))
  531. {
  532. foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("]"), Ys)))
  533. {
  534. foreach (bool l4 in YP.unify(arg3, new ListPair(new Functor2("list", Pos, Pos2), Zs)))
  535. {
  536. foreach (bool l5 in YP.unify(Pos2, YP.add(Pos, 1)))
  537. {
  538. foreach (bool l6 in remove_comments(Xs, Ys, Zs))
  539. {
  540. yield return false;
  541. }
  542. }
  543. yield break;
  544. }
  545. }
  546. }
  547. }
  548. {
  549. object Zs = arg3;
  550. Variable Token = new Variable();
  551. Variable Xs = new Variable();
  552. Variable Ys = new Variable();
  553. foreach (bool l2 in YP.unify(arg1, new ListPair(Token, Xs)))
  554. {
  555. foreach (bool l3 in YP.unify(arg2, new ListPair(Token, Ys)))
  556. {
  557. foreach (bool l4 in remove_comments(Xs, Ys, Zs))
  558. {
  559. yield return false;
  560. }
  561. }
  562. }
  563. }
  564. }
  565. public static IEnumerable<bool> expect(object Token, object arg2, object arg3)
  566. {
  567. {
  568. object Rest = arg3;
  569. foreach (bool l2 in YP.unify(arg2, new ListPair(Token, Rest)))
  570. {
  571. yield return true;
  572. yield break;
  573. }
  574. }
  575. {
  576. object S0 = arg2;
  577. object x3 = arg3;
  578. foreach (bool l2 in syntax_error(ListPair.make(new object[] { Token, Atom.a("or"), Atom.a("operator"), Atom.a("expected") }), S0))
  579. {
  580. yield return false;
  581. }
  582. }
  583. }
  584. public static IEnumerable<bool> parse2(object Tokens, object Answer)
  585. {
  586. {
  587. Variable Term = new Variable();
  588. Variable LeftOver = new Variable();
  589. foreach (bool l2 in clear_errors())
  590. {
  591. foreach (bool l3 in parse(Tokens, 1200, Term, LeftOver))
  592. {
  593. foreach (bool l4 in all_read(LeftOver))
  594. {
  595. foreach (bool l5 in YP.unify(Answer, Term))
  596. {
  597. yield return false;
  598. }
  599. yield break;
  600. }
  601. }
  602. foreach (bool l3 in syntax_error(Tokens))
  603. {
  604. yield return false;
  605. }
  606. }
  607. }
  608. }
  609. public static IEnumerable<bool> all_read(object arg1)
  610. {
  611. {
  612. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  613. {
  614. yield return false;
  615. }
  616. }
  617. {
  618. Variable Token = new Variable();
  619. Variable S = new Variable();
  620. foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S)))
  621. {
  622. foreach (bool l3 in syntax_error(ListPair.make(new object[] { Atom.a("operator"), Atom.a("expected"), Atom.a("after"), Atom.a("expression") }), new ListPair(Token, S)))
  623. {
  624. yield return false;
  625. }
  626. }
  627. }
  628. }
  629. public static IEnumerable<bool> parse(object arg1, object arg2, object arg3, object arg4)
  630. {
  631. {
  632. object x1 = arg2;
  633. object x2 = arg3;
  634. object x3 = arg4;
  635. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  636. {
  637. foreach (bool l3 in syntax_error(new ListPair(Atom.a("expression"), new ListPair(Atom.a("expected"), Atom.NIL)), Atom.NIL))
  638. {
  639. yield return false;
  640. }
  641. }
  642. }
  643. {
  644. object Precedence = arg2;
  645. object Term = arg3;
  646. object LeftOver = arg4;
  647. Variable Token = new Variable();
  648. Variable RestTokens = new Variable();
  649. foreach (bool l2 in YP.unify(arg1, new ListPair(Token, RestTokens)))
  650. {
  651. foreach (bool l3 in parse5(Token, RestTokens, Precedence, Term, LeftOver))
  652. {
  653. yield return false;
  654. }
  655. }
  656. }
  657. }
  658. public static IEnumerable<bool> parse5(object arg1, object arg2, object arg3, object arg4, object arg5)
  659. {
  660. {
  661. object S0 = arg2;
  662. object x2 = arg3;
  663. object x3 = arg4;
  664. object x4 = arg5;
  665. foreach (bool l2 in YP.unify(arg1, Atom.a("}")))
  666. {
  667. foreach (bool l3 in cannot_start(Atom.a("}"), S0))
  668. {
  669. yield return false;
  670. }
  671. }
  672. }
  673. {
  674. object S0 = arg2;
  675. object x2 = arg3;
  676. object x3 = arg4;
  677. object x4 = arg5;
  678. foreach (bool l2 in YP.unify(arg1, Atom.a("]")))
  679. {
  680. foreach (bool l3 in cannot_start(Atom.a("]"), S0))
  681. {
  682. yield return false;
  683. }
  684. }
  685. }
  686. {
  687. object S0 = arg2;
  688. object x2 = arg3;
  689. object x3 = arg4;
  690. object x4 = arg5;
  691. foreach (bool l2 in YP.unify(arg1, Atom.a(")")))
  692. {
  693. foreach (bool l3 in cannot_start(Atom.a(")"), S0))
  694. {
  695. yield return false;
  696. }
  697. }
  698. }
  699. {
  700. object S0 = arg2;
  701. object x2 = arg3;
  702. object x3 = arg4;
  703. object x4 = arg5;
  704. foreach (bool l2 in YP.unify(arg1, Atom.a(",")))
  705. {
  706. foreach (bool l3 in cannot_start(Atom.a(","), S0))
  707. {
  708. yield return false;
  709. }
  710. }
  711. }
  712. {
  713. object S0 = arg2;
  714. object x2 = arg3;
  715. object x3 = arg4;
  716. object x4 = arg5;
  717. foreach (bool l2 in YP.unify(arg1, Atom.a("|")))
  718. {
  719. foreach (bool l3 in cannot_start(Atom.a("|"), S0))
  720. {
  721. yield return false;
  722. }
  723. }
  724. }
  725. {
  726. object S0 = arg2;
  727. object Precedence = arg3;
  728. object Answer = arg4;
  729. object S = arg5;
  730. Variable Codes = new Variable();
  731. Variable Term = new Variable();
  732. Variable A = new Variable();
  733. foreach (bool l2 in YP.unify(arg1, new Functor1("string", Codes)))
  734. {
  735. foreach (bool l3 in YP.current_prolog_flag(Atom.a("double_quotes"), Atom.a("atom")))
  736. {
  737. foreach (bool l4 in YP.atom_codes(Term, Codes))
  738. {
  739. foreach (bool l5 in exprtl0(S0, Term, Precedence, Answer, S))
  740. {
  741. yield return false;
  742. }
  743. }
  744. goto cutIf1;
  745. }
  746. foreach (bool l3 in YP.current_prolog_flag(Atom.a("double_quotes"), Atom.a("chars")))
  747. {
  748. foreach (bool l4 in YP.atom_codes(A, Codes))
  749. {
  750. foreach (bool l5 in YP.atom_chars(A, Term))
  751. {
  752. foreach (bool l6 in exprtl0(S0, Term, Precedence, Answer, S))
  753. {
  754. yield return false;
  755. }
  756. }
  757. }
  758. goto cutIf2;
  759. }
  760. foreach (bool l3 in YP.unify(Term, Codes))
  761. {
  762. foreach (bool l4 in exprtl0(S0, Term, Precedence, Answer, S))
  763. {
  764. yield return false;
  765. }
  766. }
  767. cutIf2:
  768. cutIf1:
  769. { }
  770. }
  771. }
  772. {
  773. object S0 = arg2;
  774. object Precedence = arg3;
  775. object Answer = arg4;
  776. object S = arg5;
  777. Variable Number = new Variable();
  778. foreach (bool l2 in YP.unify(arg1, new Functor1("number", Number)))
  779. {
  780. foreach (bool l3 in exprtl0(S0, Number, Precedence, Answer, S))
  781. {
  782. yield return false;
  783. }
  784. }
  785. }
  786. {
  787. object Precedence = arg3;
  788. object Answer = arg4;
  789. object S = arg5;
  790. Variable S1 = new Variable();
  791. foreach (bool l2 in YP.unify(arg1, Atom.a("[")))
  792. {
  793. foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("]"), S1)))
  794. {
  795. foreach (bool l4 in read_atom(new Functor2("/", Atom.NIL, 0), S1, Precedence, Answer, S))
  796. {
  797. yield return false;
  798. }
  799. yield break;
  800. }
  801. }
  802. }
  803. {
  804. object S1 = arg2;
  805. object Precedence = arg3;
  806. object Answer = arg4;
  807. object S = arg5;
  808. Variable Arg1 = new Variable();
  809. Variable S2 = new Variable();
  810. Variable RestArgs = new Variable();
  811. Variable S3 = new Variable();
  812. foreach (bool l2 in YP.unify(arg1, Atom.a("[")))
  813. {
  814. foreach (bool l3 in parse(S1, 999, Arg1, S2))
  815. {
  816. foreach (bool l4 in read_list(S2, RestArgs, S3))
  817. {
  818. foreach (bool l5 in exprtl0(S3, new ListPair(Arg1, RestArgs), Precedence, Answer, S))
  819. {
  820. yield return false;
  821. }
  822. yield break;
  823. }
  824. }
  825. }
  826. }
  827. {
  828. object S1 = arg2;
  829. object Precedence = arg3;
  830. object Answer = arg4;
  831. object S = arg5;
  832. Variable Term = new Variable();
  833. Variable S2 = new Variable();
  834. Variable S3 = new Variable();
  835. foreach (bool l2 in YP.unify(arg1, Atom.a("(")))
  836. {
  837. foreach (bool l3 in parse(S1, 1200, Term, S2))
  838. {
  839. foreach (bool l4 in expect(Atom.a(")"), S2, S3))
  840. {
  841. foreach (bool l5 in exprtl0(S3, Term, Precedence, Answer, S))
  842. {
  843. yield return false;
  844. }
  845. yield break;
  846. }
  847. }
  848. }
  849. }
  850. {
  851. object S1 = arg2;
  852. object Precedence = arg3;
  853. object Answer = arg4;
  854. object S = arg5;
  855. Variable Term = new Variable();
  856. Variable S2 = new Variable();
  857. Variable S3 = new Variable();
  858. foreach (bool l2 in YP.unify(arg1, Atom.a(" (")))
  859. {
  860. foreach (bool l3 in parse(S1, 1200, Term, S2))
  861. {
  862. foreach (bool l4 in expect(Atom.a(")"), S2, S3))
  863. {
  864. foreach (bool l5 in exprtl0(S3, Term, Precedence, Answer, S))
  865. {
  866. yield return false;
  867. }
  868. yield break;
  869. }
  870. }
  871. }
  872. }
  873. {
  874. object Precedence = arg3;
  875. object Answer = arg4;
  876. object S = arg5;
  877. Variable _Pos = new Variable();
  878. Variable S1 = new Variable();
  879. foreach (bool l2 in YP.unify(arg1, new Functor2("/", Atom.a("{"), _Pos)))
  880. {
  881. foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("}"), S1)))
  882. {
  883. foreach (bool l4 in read_atom(Atom.a("{}"), S1, Precedence, Answer, S))
  884. {
  885. yield return false;
  886. }
  887. yield break;
  888. }
  889. }
  890. }
  891. {
  892. object S1 = arg2;
  893. object Precedence = arg3;
  894. object Answer = arg4;
  895. object S = arg5;
  896. Variable Pos = new Variable();
  897. Variable Term = new Variable();
  898. Variable S2 = new Variable();
  899. Variable S3 = new Variable();
  900. foreach (bool l2 in YP.unify(arg1, new Functor2("/", Atom.a("{"), Pos)))
  901. {
  902. foreach (bool l3 in parse(S1, 1200, Term, S2))
  903. {
  904. foreach (bool l4 in expect(Atom.a("}"), S2, S3))
  905. {
  906. foreach (bool l5 in exprtl0(S3, new Functor2("{}", Pos, Term), Precedence, Answer, S))
  907. {
  908. yield return false;
  909. }
  910. yield break;
  911. }
  912. }
  913. }
  914. }
  915. {
  916. object Precedence = arg3;
  917. object Answer = arg4;
  918. object S = arg5;
  919. Variable Variable_1 = new Variable();
  920. Variable Name = new Variable();
  921. Variable Pos = new Variable();
  922. Variable S1 = new Variable();
  923. Variable Arg1 = new Variable();
  924. Variable S2 = new Variable();
  925. Variable RestArgs = new Variable();
  926. Variable S3 = new Variable();
  927. Variable Term = new Variable();
  928. foreach (bool l2 in YP.unify(arg1, new Functor3("var", Variable_1, Name, Pos)))
  929. {
  930. foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("("), S1)))
  931. {
  932. foreach (bool l4 in parse(S1, 999, Arg1, S2))
  933. {
  934. foreach (bool l5 in read_args(S2, RestArgs, S3))
  935. {
  936. foreach (bool l6 in YP.univ(Term, new ListPair(Atom.a("call"), new ListPair(new Functor3("$VAR", Pos, Name, Variable_1), new ListPair(Arg1, RestArgs)))))
  937. {
  938. foreach (bool l7 in exprtl0(S3, Term, Precedence, Answer, S))
  939. {
  940. yield return false;
  941. }
  942. }
  943. yield break;
  944. }
  945. }
  946. yield break;
  947. }
  948. }
  949. }
  950. {
  951. object S0 = arg2;
  952. object Precedence = arg3;
  953. object Answer = arg4;
  954. object S = arg5;
  955. Variable Variable_1 = new Variable();
  956. Variable Name = new Variable();
  957. Variable Pos = new Variable();
  958. foreach (bool l2 in YP.unify(arg1, new Functor3("var", Variable_1, Name, Pos)))
  959. {
  960. foreach (bool l3 in exprtl0(S0, new Functor3("$VAR", Pos, Name, Variable_1), Precedence, Answer, S))
  961. {
  962. yield return false;
  963. }
  964. }
  965. }
  966. {
  967. object S0 = arg2;
  968. object Precedence = arg3;
  969. object Answer = arg4;
  970. object S = arg5;
  971. Variable Atom_1 = new Variable();
  972. Variable P = new Variable();
  973. foreach (bool l2 in YP.unify(arg1, new Functor2("atom", Atom_1, P)))
  974. {
  975. foreach (bool l3 in read_atom(new Functor2("/", Atom_1, P), S0, Precedence, Answer, S))
  976. {
  977. yield return false;
  978. }
  979. }
  980. }
  981. }
  982. public static IEnumerable<bool> read_atom(object arg1, object arg2, object Precedence, object Answer, object S)
  983. {
  984. {
  985. Variable _Pos = new Variable();
  986. Variable Number = new Variable();
  987. Variable S1 = new Variable();
  988. Variable Negative = new Variable();
  989. foreach (bool l2 in YP.unify(arg1, new Functor2("/", Atom.a("-"), _Pos)))
  990. {
  991. foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor1("number", Number), S1)))
  992. {
  993. foreach (bool l4 in YP.unify(Negative, YP.negate(Number)))
  994. {
  995. foreach (bool l5 in exprtl0(S1, Negative, Precedence, Answer, S))
  996. {
  997. yield return false;
  998. }
  999. }
  1000. yield break;
  1001. }
  1002. }
  1003. }
  1004. {
  1005. Variable Functor_1 = new Variable();
  1006. Variable Pos = new Variable();
  1007. Variable S1 = new Variable();
  1008. Variable Arg1 = new Variable();
  1009. Variable S2 = new Variable();
  1010. Variable RestArgs = new Variable();
  1011. Variable S3 = new Variable();
  1012. Variable Term = new Variable();
  1013. foreach (bool l2 in YP.unify(arg1, new Functor2("/", Functor_1, Pos)))
  1014. {
  1015. foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("("), S1)))
  1016. {
  1017. foreach (bool l4 in parse(S1, 999, Arg1, S2))
  1018. {
  1019. foreach (bool l5 in read_args(S2, RestArgs, S3))
  1020. {
  1021. foreach (bool l6 in YP.univ(Term, new ListPair(Functor_1, new ListPair(Pos, new ListPair(Arg1, RestArgs)))))
  1022. {
  1023. foreach (bool l7 in exprtl0(S3, Term, Precedence, Answer, S))
  1024. {
  1025. yield return false;
  1026. }
  1027. }
  1028. yield break;
  1029. }
  1030. }
  1031. yield break;
  1032. }
  1033. }
  1034. }
  1035. {
  1036. object S0 = arg2;
  1037. Variable Op = new Variable();
  1038. Variable Pos = new Variable();
  1039. Variable Oprec = new Variable();
  1040. Variable Aprec = new Variable();
  1041. Variable Flag = new Variable();
  1042. Variable Term = new Variable();
  1043. Variable Arg = new Variable();
  1044. Variable S1 = new Variable();
  1045. foreach (bool l2 in YP.unify(arg1, new Functor2("/", Op, Pos)))
  1046. {
  1047. foreach (bool l3 in prefixop(Op, Oprec, Aprec))
  1048. {
  1049. foreach (bool l4 in possible_right_operand(S0, Flag))
  1050. {
  1051. if (YP.lessThan(Flag, 0))
  1052. {
  1053. foreach (bool l6 in YP.univ(Term, new ListPair(Op, new ListPair(Pos, Atom.NIL))))
  1054. {
  1055. foreach (bool l7 in exprtl0(S0, Term, Precedence, Answer, S))
  1056. {
  1057. yield return false;
  1058. }
  1059. }
  1060. goto cutIf1;
  1061. }
  1062. if (YP.greaterThan(Oprec, Precedence))
  1063. {
  1064. foreach (bool l6 in syntax_error(ListPair.make(new object[] { Atom.a("prefix"), Atom.a("operator"), Op, Atom.a("in"), Atom.a("context"), Atom.a("with"), Atom.a("precedence"), Precedence }), S0))
  1065. {
  1066. yield return false;
  1067. }
  1068. goto cutIf2;
  1069. }
  1070. if (YP.greaterThan(Flag, 0))
  1071. {
  1072. foreach (bool l6 in parse(S0, Aprec, Arg, S1))
  1073. {
  1074. foreach (bool l7 in YP.univ(Term, ListPair.make(new object[] { Op, Pos, Arg })))
  1075. {
  1076. foreach (bool l8 in exprtl(S1, Oprec, Term, Precedence, Answer, S))
  1077. {
  1078. yield return false;
  1079. }
  1080. }
  1081. yield break;
  1082. }
  1083. goto cutIf3;
  1084. }
  1085. foreach (bool l5 in peepop(S0, S1))
  1086. {
  1087. foreach (bool l6 in prefix_is_atom(S1, Oprec))
  1088. {
  1089. foreach (bool l7 in exprtl(S1, Oprec, new Functor2("/", Op, Pos), Precedence, Answer, S))
  1090. {
  1091. yield return false;
  1092. }
  1093. }
  1094. }
  1095. foreach (bool l5 in parse(S0, Aprec, Arg, S1))
  1096. {
  1097. foreach (bool l6 in YP.univ(Term, ListPair.make(new object[] { Op, Pos, Arg })))
  1098. {
  1099. foreach (bool l7 in exprtl(S1, Oprec, Term, Precedence, Answer, S))
  1100. {
  1101. yield return false;
  1102. }
  1103. }
  1104. yield break;
  1105. }
  1106. cutIf3:
  1107. cutIf2:
  1108. cutIf1:
  1109. { }
  1110. }
  1111. yield break;
  1112. }
  1113. }
  1114. }
  1115. {
  1116. object S0 = arg2;
  1117. Variable Atom_1 = new Variable();
  1118. Variable Pos = new Variable();
  1119. Variable Term = new Variable();
  1120. foreach (bool l2 in YP.unify(arg1, new Functor2("/", Atom_1, Pos)))
  1121. {
  1122. foreach (bool l3 in YP.univ(Term, new ListPair(Atom_1, new ListPair(Pos, Atom.NIL))))
  1123. {
  1124. foreach (bool l4 in exprtl0(S0, Term, Precedence, Answer, S))
  1125. {
  1126. yield return false;
  1127. }
  1128. }
  1129. }
  1130. }
  1131. }
  1132. public static IEnumerable<bool> cannot_start(object Token, object S0)
  1133. {
  1134. {
  1135. foreach (bool l2 in syntax_error(ListPair.make(new object[] { Token, Atom.a("cannot"), Atom.a("start"), Atom.a("an"), Atom.a("expression") }), S0))
  1136. {
  1137. yield return false;
  1138. }
  1139. }
  1140. }
  1141. public static IEnumerable<bool> read_args(object arg1, object arg2, object arg3)
  1142. {
  1143. {
  1144. object S = arg3;
  1145. Variable S1 = new Variable();
  1146. Variable Term = new Variable();
  1147. Variable Rest = new Variable();
  1148. Variable S2 = new Variable();
  1149. foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a(","), S1)))
  1150. {
  1151. foreach (bool l3 in YP.unify(arg2, new ListPair(Term, Rest)))
  1152. {
  1153. foreach (bool l4 in parse(S1, 999, Term, S2))
  1154. {
  1155. foreach (bool l5 in read_args(S2, Rest, S))
  1156. {
  1157. yield return false;
  1158. }
  1159. yield break;
  1160. }
  1161. yield break;
  1162. }
  1163. }
  1164. }
  1165. {
  1166. object S = arg3;
  1167. foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a(")"), S)))
  1168. {
  1169. foreach (bool l3 in YP.unify(arg2, Atom.NIL))
  1170. {
  1171. yield return true;
  1172. yield break;
  1173. }
  1174. }
  1175. }
  1176. {
  1177. object S = arg1;
  1178. object x2 = arg2;
  1179. object x3 = arg3;
  1180. foreach (bool l2 in syntax_error(ListPair.make(new object[] { Atom.a(", or )"), Atom.a("expected"), Atom.a("in"), Atom.a("arguments") }), S))
  1181. {
  1182. yield return false;
  1183. }
  1184. }
  1185. }
  1186. public static IEnumerable<bool> read_list(object arg1, object arg2, object arg3)
  1187. {
  1188. {
  1189. object x1 = arg2;
  1190. object x2 = arg3;
  1191. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  1192. {
  1193. foreach (bool l3 in syntax_error(ListPair.make(new object[] { Atom.a(", | or ]"), Atom.a("expected"), Atom.a("in"), Atom.a("list") }), Atom.NIL))
  1194. {
  1195. yield return false;
  1196. }
  1197. }
  1198. }
  1199. {
  1200. object Rest = arg2;
  1201. object S = arg3;
  1202. Variable Token = new Variable();
  1203. Variable S1 = new Variable();
  1204. foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S1)))
  1205. {
  1206. foreach (bool l3 in read_list4(Token, S1, Rest, S))
  1207. {
  1208. yield return false;
  1209. }
  1210. }
  1211. }
  1212. }
  1213. public static IEnumerable<bool> read_list4(object arg1, object arg2, object arg3, object arg4)
  1214. {
  1215. {
  1216. object S1 = arg2;
  1217. object S = arg4;
  1218. Variable Term = new Variable();
  1219. Variable Rest = new Variable();
  1220. Variable S2 = new Variable();
  1221. foreach (bool l2 in YP.unify(arg1, Atom.a(",")))
  1222. {
  1223. foreach (bool l3 in YP.unify(arg3, new ListPair(Term, Rest)))
  1224. {
  1225. foreach (bool l4 in parse(S1, 999, Term, S2))
  1226. {
  1227. foreach (bool l5 in read_list(S2, Rest, S))
  1228. {
  1229. yield return false;
  1230. }
  1231. yield break;
  1232. }
  1233. yield break;
  1234. }
  1235. }
  1236. }
  1237. {
  1238. object S1 = arg2;
  1239. object Rest = arg3;
  1240. object S = arg4;
  1241. Variable S2 = new Variable();
  1242. foreach (bool l2 in YP.unify(arg1, Atom.a("|")))
  1243. {
  1244. foreach (bool l3 in parse(S1, 999, Rest, S2))
  1245. {
  1246. foreach (bool l4 in expect(Atom.a("]"), S2, S))
  1247. {
  1248. yield return false;
  1249. }
  1250. yield break;
  1251. }
  1252. yield break;
  1253. }
  1254. }
  1255. {
  1256. Variable S1 = new Variable();
  1257. foreach (bool l2 in YP.unify(arg1, Atom.a("]")))
  1258. {
  1259. foreach (bool l3 in YP.unify(arg2, S1))
  1260. {
  1261. foreach (bool l4 in YP.unify(arg3, Atom.NIL))
  1262. {
  1263. foreach (bool l5 in YP.unify(arg4, S1))
  1264. {
  1265. yield return true;
  1266. yield break;
  1267. }
  1268. }
  1269. }
  1270. }
  1271. }
  1272. {
  1273. object Token = arg1;
  1274. object S1 = arg2;
  1275. object x3 = arg3;
  1276. object x4 = arg4;
  1277. foreach (bool l2 in syntax_error(ListPair.make(new object[] { Atom.a(", | or ]"), Atom.a("expected"), Atom.a("in"), Atom.a("list") }), new ListPair(Token, S1)))
  1278. {
  1279. yield return false;
  1280. }
  1281. }
  1282. }
  1283. public static IEnumerable<bool> possible_right_operand(object arg1, object arg2)
  1284. {
  1285. {
  1286. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  1287. {
  1288. foreach (bool l3 in YP.unify(arg2, -1))
  1289. {
  1290. yield return false;
  1291. }
  1292. }
  1293. }
  1294. {
  1295. object Flag = arg2;
  1296. Variable H = new Variable();
  1297. Variable T = new Variable();
  1298. foreach (bool l2 in YP.unify(arg1, new ListPair(H, T)))
  1299. {
  1300. foreach (bool l3 in possible_right_operand3(H, Flag, T))
  1301. {
  1302. yield return false;
  1303. }
  1304. }
  1305. }
  1306. }
  1307. public static IEnumerable<bool> possible_right_operand3(object arg1, object arg2, object arg3)
  1308. {
  1309. {
  1310. object x4 = arg3;
  1311. Variable x1 = new Variable();
  1312. Variable x2 = new Variable();
  1313. Variable x3 = new Variable();
  1314. foreach (bool l2 in YP.unify(arg1, new Functor3("var", x1, x2, x3)))
  1315. {
  1316. foreach (bool l3 in YP.unify(arg2, 1))
  1317. {
  1318. yield return false;
  1319. }
  1320. }
  1321. }
  1322. {
  1323. object x2 = arg3;
  1324. Variable x1 = new Variable();
  1325. foreach (bool l2 in YP.unify(arg1, new Functor1("number", x1)))
  1326. {
  1327. foreach (bool l3 in YP.unify(arg2, 1))
  1328. {
  1329. yield return false;
  1330. }
  1331. }
  1332. }
  1333. {
  1334. object x2 = arg3;
  1335. Variable x1 = new Variable();
  1336. foreach (bool l2 in YP.unify(arg1, new Functor1("string", x1)))
  1337. {
  1338. foreach (bool l3 in YP.unify(arg2, 1))
  1339. {
  1340. yield return false;
  1341. }
  1342. }
  1343. }
  1344. {
  1345. object x1 = arg3;
  1346. foreach (bool l2 in YP.unify(arg1, Atom.a(" (")))
  1347. {
  1348. foreach (bool l3 in YP.unify(arg2, 1))
  1349. {
  1350. yield return false;
  1351. }
  1352. }
  1353. }
  1354. {
  1355. object x1 = arg3;
  1356. foreach (bool l2 in YP.unify(arg1, Atom.a("(")))
  1357. {
  1358. foreach (bool l3 in YP.unify(arg2, 0))
  1359. {
  1360. yield return false;
  1361. }
  1362. }
  1363. }
  1364. {
  1365. object x1 = arg3;
  1366. foreach (bool l2 in YP.unify(arg1, Atom.a(")")))
  1367. {
  1368. foreach (bool l3 in YP.unify(arg2, -1))
  1369. {
  1370. yield return false;
  1371. }
  1372. }
  1373. }
  1374. {
  1375. Variable x1 = new Variable();
  1376. foreach (bool l2 in YP.unify(arg1, Atom.a("[")))
  1377. {
  1378. foreach (bool l3 in YP.unify(arg2, 0))
  1379. {
  1380. foreach (bool l4 in YP.unify(arg3, new ListPair(Atom.a("]"), x1)))
  1381. {
  1382. yield return true;
  1383. yield break;
  1384. }
  1385. }
  1386. }
  1387. }
  1388. {
  1389. object x1 = arg3;
  1390. foreach (bool l2 in YP.unify(arg1, Atom.a("[")))
  1391. {
  1392. foreach (bool l3 in YP.unify(arg2, 1))
  1393. {
  1394. yield return false;
  1395. }
  1396. }
  1397. }
  1398. {
  1399. object x1 = arg3;
  1400. foreach (bool l2 in YP.unify(arg1, Atom.a("]")))
  1401. {
  1402. foreach (bool l3 in YP.unify(arg2, -1))
  1403. {
  1404. yield return false;
  1405. }
  1406. }
  1407. }
  1408. {
  1409. Variable x1 = new Variable();
  1410. foreach (bool l2 in YP.unify(arg1, Atom.a("{")))
  1411. {
  1412. foreach (bool l3 in YP.unify(arg2, 0))
  1413. {
  1414. foreach (bool l4 in YP.unify(arg3, new ListPair(Atom.a("}"), x1)))
  1415. {
  1416. yield return true;
  1417. yield break;
  1418. }
  1419. }
  1420. }
  1421. }
  1422. {
  1423. object x1 = arg3;
  1424. foreach (bool l2 in YP.unify(arg1, Atom.a("{")))
  1425. {
  1426. foreach (bool l3 in YP.unify(arg2, 1))
  1427. {
  1428. yield return false;
  1429. }
  1430. }
  1431. }
  1432. {
  1433. object x1 = arg3;
  1434. foreach (bool l2 in YP.unify(arg1, Atom.a("}")))
  1435. {
  1436. foreach (bool l3 in YP.unify(arg2, -1))
  1437. {
  1438. yield return false;
  1439. }
  1440. }
  1441. }
  1442. {
  1443. object x1 = arg3;
  1444. foreach (bool l2 in YP.unify(arg1, Atom.a(",")))
  1445. {
  1446. foreach (bool l3 in YP.unify(arg2, -1))
  1447. {
  1448. yield return false;
  1449. }
  1450. }
  1451. }
  1452. {
  1453. object x1 = arg3;
  1454. foreach (bool l2 in YP.unify(arg1, Atom.a("|")))
  1455. {
  1456. foreach (bool l3 in YP.unify(arg2, -1))
  1457. {
  1458. yield return false;
  1459. }
  1460. }
  1461. }
  1462. {
  1463. object x3 = arg3;
  1464. Variable x1 = new Variable();
  1465. Variable x2 = new Variable();
  1466. foreach (bool l2 in YP.unify(arg1, new Functor2("atom", x1, x2)))
  1467. {
  1468. foreach (bool l3 in YP.unify(arg2, 0))
  1469. {
  1470. yield return false;
  1471. }
  1472. }
  1473. }
  1474. }
  1475. public static IEnumerable<bool> peepop(object arg1, object arg2)
  1476. {
  1477. {
  1478. Variable F = new Variable();
  1479. Variable Pos = new Variable();
  1480. Variable S1 = new Variable();
  1481. foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", F, Pos), new ListPair(Atom.a("("), S1))))
  1482. {
  1483. foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor2("atom", F, Pos), new ListPair(Atom.a("("), S1))))
  1484. {
  1485. yield return true;
  1486. yield break;
  1487. }
  1488. }
  1489. }
  1490. {
  1491. Variable F = new Variable();
  1492. Variable Pos = new Variable();
  1493. Variable S1 = new Variable();
  1494. Variable L = new Variable();
  1495. Variable P = new Variable();
  1496. Variable R = new Variable();
  1497. foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", F, Pos), S1)))
  1498. {
  1499. foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor(Atom.a("infixop", Atom.a("")), new object[] { new Functor2("/", F, Pos), L, P, R }), S1)))
  1500. {
  1501. foreach (bool l4 in infixop(F, L, P, R))
  1502. {
  1503. yield return false;
  1504. }
  1505. }
  1506. }
  1507. }
  1508. {
  1509. Variable F = new Variable();
  1510. Variable Pos = new Variable();
  1511. Variable S1 = new Variable();
  1512. Variable L = new Variable();
  1513. Variable P = new Variable();
  1514. foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", F, Pos), S1)))
  1515. {
  1516. foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L, P), S1)))
  1517. {
  1518. foreach (bool l4 in postfixop(F, L, P))
  1519. {
  1520. yield return false;
  1521. }
  1522. }
  1523. }
  1524. }
  1525. {
  1526. Variable S0 = new Variable();
  1527. foreach (bool l2 in YP.unify(arg1, S0))
  1528. {
  1529. foreach (bool l3 in YP.unify(arg2, S0))
  1530. {
  1531. yield return false;
  1532. }
  1533. }
  1534. }
  1535. }
  1536. public static IEnumerable<bool> prefix_is_atom(object arg1, object arg2)
  1537. {
  1538. {
  1539. object Precedence = arg2;
  1540. Variable Token = new Variable();
  1541. Variable x2 = new Variable();
  1542. foreach (bool l2 in YP.unify(arg1, new ListPair(Token, x2)))
  1543. {
  1544. foreach (bool l3 in prefix_is_atom(Token, Precedence))
  1545. {
  1546. yield return false;
  1547. }
  1548. }
  1549. }
  1550. {
  1551. object P = arg2;
  1552. Variable x1 = new Variable();
  1553. Variable L = new Variable();
  1554. Variable x3 = new Variable();
  1555. Variable x4 = new Variable();
  1556. foreach (bool l2 in YP.unify(arg1, new Functor(Atom.a("infixop", Atom.a("")), new object[] { x1, L, x3, x4 })))
  1557. {
  1558. if (YP.greaterThanOrEqual(L, P))
  1559. {
  1560. yield return false;
  1561. }
  1562. }
  1563. }
  1564. {
  1565. object P = arg2;
  1566. Variable x1 = new Variable();
  1567. Variable L = new Variable();
  1568. Variable x3 = new Variable();
  1569. foreach (bool l2 in YP.unify(arg1, new Functor3(Atom.a("postfixop", Atom.a("")), x1, L, x3)))
  1570. {
  1571. if (YP.greaterThanOrEqual(L, P))
  1572. {
  1573. yield return false;
  1574. }
  1575. }
  1576. }
  1577. {
  1578. object x1 = arg2;
  1579. foreach (bool l2 in YP.unify(arg1, Atom.a(")")))
  1580. {
  1581. yield return false;
  1582. }
  1583. }
  1584. {
  1585. object x1 = arg2;
  1586. foreach (bool l2 in YP.unify(arg1, Atom.a("]")))
  1587. {
  1588. yield return false;
  1589. }
  1590. }
  1591. {
  1592. object x1 = arg2;
  1593. foreach (bool l2 in YP.unify(arg1, Atom.a("}")))
  1594. {
  1595. yield return false;
  1596. }
  1597. }
  1598. {
  1599. object P = arg2;
  1600. foreach (bool l2 in YP.unify(arg1, Atom.a("|")))
  1601. {
  1602. if (YP.greaterThanOrEqual(1100, P))
  1603. {
  1604. yield return false;
  1605. }
  1606. }
  1607. }
  1608. {
  1609. object P = arg2;
  1610. foreach (bool l2 in YP.unify(arg1, Atom.a(",")))
  1611. {
  1612. if (YP.greaterThanOrEqual(1000, P))
  1613. {
  1614. yield return false;
  1615. }
  1616. }
  1617. }
  1618. {
  1619. object x1 = arg2;
  1620. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  1621. {
  1622. yield return false;
  1623. }
  1624. }
  1625. }
  1626. public static IEnumerable<bool> exprtl0(object arg1, object arg2, object arg3, object arg4, object arg5)
  1627. {
  1628. {
  1629. object x2 = arg3;
  1630. Variable Term = new Variable();
  1631. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  1632. {
  1633. foreach (bool l3 in YP.unify(arg2, Term))
  1634. {
  1635. foreach (bool l4 in YP.unify(arg4, Term))
  1636. {
  1637. foreach (bool l5 in YP.unify(arg5, Atom.NIL))
  1638. {
  1639. yield return false;
  1640. }
  1641. }
  1642. }
  1643. }
  1644. }
  1645. {
  1646. object Term = arg2;
  1647. object Precedence = arg3;
  1648. object Answer = arg4;
  1649. object S = arg5;
  1650. Variable Token = new Variable();
  1651. Variable S1 = new Variable();
  1652. foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S1)))
  1653. {
  1654. foreach (bool l3 in exprtl0_6(Token, Term, Precedence, Answer, S, S1))
  1655. {
  1656. yield return false;
  1657. }
  1658. }
  1659. }
  1660. }
  1661. public static IEnumerable<bool> exprtl0_6(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)
  1662. {
  1663. {
  1664. object x2 = arg3;
  1665. object S1 = arg6;
  1666. Variable Term = new Variable();
  1667. foreach (bool l2 in YP.unify(arg1, Atom.a("}")))
  1668. {
  1669. foreach (bool l3 in YP.unify(arg2, Term))
  1670. {
  1671. foreach (bool l4 in YP.unify(arg4, Term))
  1672. {
  1673. foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a("}"), S1)))
  1674. {
  1675. yield return false;
  1676. }
  1677. }
  1678. }
  1679. }
  1680. }
  1681. {
  1682. object x2 = arg3;
  1683. object S1 = arg6;
  1684. Variable Term = new Variable();
  1685. foreach (bool l2 in YP.unify(arg1, Atom.a("]")))
  1686. {
  1687. foreach (bool l3 in YP.unify(arg2, Term))
  1688. {
  1689. foreach (bool l4 in YP.unify(arg4, Term))
  1690. {
  1691. foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a("]"), S1)))
  1692. {
  1693. yield return false;
  1694. }
  1695. }
  1696. }
  1697. }
  1698. }
  1699. {
  1700. object x2 = arg3;
  1701. object S1 = arg6;
  1702. Variable Term = new Variable();
  1703. foreach (bool l2 in YP.unify(arg1, Atom.a(")")))
  1704. {
  1705. foreach (bool l3 in YP.unify(arg2, Term))
  1706. {
  1707. foreach (bool l4 in YP.unify(arg4, Term))
  1708. {
  1709. foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a(")"), S1)))
  1710. {
  1711. yield return false;
  1712. }
  1713. }
  1714. }
  1715. }
  1716. }
  1717. {
  1718. object Term = arg2;
  1719. object Precedence = arg3;
  1720. object Answer = arg4;
  1721. object S = arg5;
  1722. object S1 = arg6;
  1723. Variable Next = new Variable();
  1724. Variable S2 = new Variable();
  1725. foreach (bool l2 in YP.unify(arg1, Atom.a(",")))
  1726. {
  1727. if (YP.greaterThanOrEqual(Precedence, 1000))
  1728. {
  1729. foreach (bool l4 in parse(S1, 1000, Next, S2))
  1730. {
  1731. foreach (bool l5 in exprtl(S2, 1000, new Functor2(",", Term, Next), Precedence, Answer, S))
  1732. {
  1733. yield return false;
  1734. }
  1735. yield break;
  1736. }
  1737. goto cutIf1;
  1738. }
  1739. foreach (bool l3 in YP.unify(Answer, Term))
  1740. {
  1741. foreach (bool l4 in YP.unify(S, new ListPair(Atom.a(","), S1)))
  1742. {
  1743. yield return false;
  1744. }
  1745. }
  1746. cutIf1:
  1747. { }
  1748. }
  1749. }
  1750. {
  1751. object Term = arg2;
  1752. object Precedence = arg3;
  1753. object Answer = arg4;
  1754. object S = arg5;
  1755. object S1 = arg6;
  1756. Variable Next = new Variable();
  1757. Variable S2 = new Variable();
  1758. foreach (bool l2 in YP.unify(arg1, Atom.a("|")))
  1759. {
  1760. if (YP.greaterThanOrEqual(Precedence, 1100))
  1761. {
  1762. foreach (bool l4 in parse(S1, 1100, Next, S2))
  1763. {
  1764. foreach (bool l5 in exprtl(S2, 1100, new Functor2(";", Term, Next), Precedence, Answer, S))
  1765. {
  1766. yield return false;
  1767. }
  1768. yield break;
  1769. }
  1770. goto cutIf2;
  1771. }
  1772. foreach (bool l3 in YP.unify(Answer, Term))
  1773. {
  1774. foreach (bool l4 in YP.unify(S, new ListPair(Atom.a("|"), S1)))
  1775. {
  1776. yield return false;
  1777. }
  1778. }
  1779. cutIf2:
  1780. { }
  1781. }
  1782. }
  1783. {
  1784. object x2 = arg2;
  1785. object x3 = arg3;
  1786. object x4 = arg4;
  1787. object x5 = arg5;
  1788. object S1 = arg6;
  1789. Variable S = new Variable();
  1790. foreach (bool l2 in YP.unify(arg1, new Functor1("string", S)))
  1791. {
  1792. foreach (bool l3 in cannot_follow(Atom.a("chars"), new Functor1("string", S), S1))
  1793. {
  1794. yield return false;
  1795. }
  1796. }
  1797. }
  1798. {
  1799. object x2 = arg2;
  1800. object x3 = arg3;
  1801. object x4 = arg4;
  1802. object x5 = arg5;
  1803. object S1 = arg6;
  1804. Variable N = new Variable();
  1805. foreach (bool l2 in YP.unify(arg1, new Functor1("number", N)))
  1806. {
  1807. foreach (bool l3 in cannot_follow(Atom.a("number"), new Functor1("number", N), S1))
  1808. {
  1809. yield return false;
  1810. }
  1811. }
  1812. }
  1813. {
  1814. object Term = arg2;
  1815. object Precedence = arg3;
  1816. object Answer = arg4;
  1817. object S = arg5;
  1818. Variable S1 = new Variable();
  1819. foreach (bool l2 in YP.unify(arg1, Atom.a("{")))
  1820. {
  1821. foreach (bool l3 in YP.unify(arg6, new ListPair(Atom.a("}"), S1)))
  1822. {
  1823. foreach (bool l4 in exprtl0_atom(Atom.a("{}"), Term, Precedence, Answer, S, S1))
  1824. {
  1825. yield return false;
  1826. }
  1827. yield break;
  1828. }
  1829. }
  1830. }
  1831. {
  1832. object x1 = arg2;
  1833. object x2 = arg3;
  1834. object x3 = arg4;
  1835. object x4 = arg5;
  1836. object S1 = arg6;
  1837. foreach (bool l2 in YP.unify(arg1, Atom.a("{")))
  1838. {
  1839. foreach (bool l3 in cannot_follow(Atom.a("brace"), Atom.a("{"), S1))
  1840. {
  1841. yield return false;
  1842. }
  1843. }
  1844. }
  1845. {
  1846. object Term = arg2;
  1847. object Precedence = arg3;
  1848. object Answer = arg4;
  1849. object S = arg5;
  1850. Variable S1 = new Variable();
  1851. foreach (bool l2 in YP.unify(arg1, Atom.a("[")))
  1852. {
  1853. foreach (bool l3 in YP.unify(arg6, new ListPair(Atom.a("]"), S1)))
  1854. {
  1855. foreach (bool l4 in exprtl0_atom(Atom.NIL, Term, Precedence, Answer, S, S1))
  1856. {
  1857. yield return false;
  1858. }
  1859. yield break;
  1860. }
  1861. }
  1862. }
  1863. {
  1864. object x1 = arg2;
  1865. object x2 = arg3;
  1866. object x3 = arg4;
  1867. object x4 = arg5;
  1868. object S1 = arg6;
  1869. foreach (bool l2 in YP.unify(arg1, Atom.a("[")))
  1870. {
  1871. foreach (bool l3 in cannot_follow(Atom.a("bracket"), Atom.a("["), S1))
  1872. {
  1873. yield return false;
  1874. }
  1875. }
  1876. }
  1877. {
  1878. object x1 = arg2;
  1879. object x2 = arg3;
  1880. object x3 = arg4;
  1881. object x4 = arg5;
  1882. object S1 = arg6;
  1883. foreach (bool l2 in YP.unify(arg1, Atom.a("(")))
  1884. {
  1885. foreach (bool l3 in cannot_follow(Atom.a("parenthesis"), Atom.a("("), S1))
  1886. {
  1887. yield return false;
  1888. }
  1889. }
  1890. }
  1891. {
  1892. object x1 = arg2;
  1893. object x2 = arg3;
  1894. object x3 = arg4;
  1895. object x4 = arg5;
  1896. object S1 = arg6;
  1897. foreach (bool l2 in YP.unify(arg1, Atom.a(" (")))
  1898. {
  1899. foreach (bool l3 in cannot_follow(Atom.a("parenthesis"), Atom.a("("), S1))
  1900. {
  1901. yield return false;
  1902. }
  1903. }
  1904. }
  1905. {
  1906. object x4 = arg2;
  1907. object x5 = arg3;
  1908. object x6 = arg4;
  1909. object x7 = arg5;
  1910. object S1 = arg6;
  1911. Variable A = new Variable();
  1912. Variable B = new Variable();
  1913. Variable P = new Variable();
  1914. foreach (bool l2 in YP.unify(arg1, new Functor3("var", A, B, P)))
  1915. {
  1916. foreach (bool l3 in cannot_follow(Atom.a("variable"), new Functor3("var", A, B, P), S1))
  1917. {
  1918. yield return false;
  1919. }
  1920. }
  1921. }
  1922. {
  1923. object Term = arg2;
  1924. object Precedence = arg3;
  1925. object Answer = arg4;
  1926. object S = arg5;
  1927. object S1 = arg6;
  1928. Variable F = new Variable();
  1929. Variable P = new Variable();
  1930. foreach (bool l2 in YP.unify(arg1, new Functor2("atom", F, P)))
  1931. {
  1932. foreach (bool l3 in exprtl0_atom(new Functor2("/", F, P), Term, Precedence, Answer, S, S1))
  1933. {
  1934. yield return false;
  1935. }
  1936. }
  1937. }
  1938. }
  1939. public static IEnumerable<bool> exprtl0_atom(object arg1, object arg2, object arg3, object arg4, object arg5, object S1)
  1940. {
  1941. {
  1942. object Term = arg2;
  1943. object Precedence = arg3;
  1944. object Answer = arg4;
  1945. object S = arg5;
  1946. Variable F = new Variable();
  1947. Variable Pos = new Variable();
  1948. Variable L1 = new Variable();
  1949. Variable O1 = new Variable();
  1950. Variable R1 = new Variable();
  1951. Variable L2 = new Variable();
  1952. Variable O2 = new Variable();
  1953. foreach (bool l2 in YP.unify(arg1, new Functor2("/", F, Pos)))
  1954. {
  1955. foreach (bool l3 in ambigop(F, Precedence, L1, O1, R1, L2, O2))
  1956. {
  1957. foreach (bool l4 in prefix_is_atom(S1, Precedence))
  1958. {
  1959. foreach (bool l5 in exprtl(new ListPair(new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S))
  1960. {
  1961. yield return false;
  1962. }
  1963. yield break;
  1964. }
  1965. foreach (bool l4 in exprtl(new ListPair(new Functor(Atom.a("infixop", Atom.a("")), new object[] { new Functor2("/", F, Pos), L1, O1, R1 }), S1), 0, Term, Precedence, Answer, S))
  1966. {
  1967. yield return false;
  1968. }
  1969. foreach (bool l4 in exprtl(new ListPair(new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S))
  1970. {
  1971. yield return false;
  1972. }
  1973. yield break;
  1974. }
  1975. }
  1976. }
  1977. {
  1978. object Term = arg2;
  1979. object Precedence = arg3;
  1980. object Answer = arg4;
  1981. object S = arg5;
  1982. Variable F = new Variable();
  1983. Variable Pos = new Variable();
  1984. Variable L1 = new Variable();
  1985. Variable O1 = new Variable();
  1986. Variable R1 = new Variable();
  1987. foreach (bool l2 in YP.unify(arg1, new Functor2("/", F, Pos)))
  1988. {
  1989. foreach (bool l3 in infixop(F, L1, O1, R1))
  1990. {
  1991. foreach (bool l4 in exprtl(new ListPair(new Functor(Atom.a("infixop", Atom.a("")), new object[] { new Functor2("/", F, Pos), L1, O1, R1 }), S1), 0, Term, Precedence, Answer, S))
  1992. {
  1993. yield return false;
  1994. }
  1995. yield break;
  1996. }
  1997. }
  1998. }
  1999. {
  2000. object Term = arg2;
  2001. object Precedence = arg3;
  2002. object Answer = arg4;
  2003. object S = arg5;
  2004. Variable F = new Variable();
  2005. Variable Pos = new Variable();
  2006. Variable L2 = new Variable();
  2007. Variable O2 = new Variable();
  2008. foreach (bool l2 in YP.unify(arg1, new Functor2("/", F, Pos)))
  2009. {
  2010. foreach (bool l3 in postfixop(F, L2, O2))
  2011. {
  2012. foreach (bool l4 in exprtl(new ListPair(new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S))
  2013. {
  2014. yield return false;
  2015. }
  2016. yield break;
  2017. }
  2018. }
  2019. }
  2020. {
  2021. object X = arg1;
  2022. object x2 = arg2;
  2023. object x3 = arg3;
  2024. object x4 = arg4;
  2025. object x5 = arg5;
  2026. Variable x7 = new Variable();
  2027. foreach (bool l2 in syntax_error(ListPair.make(new object[] { new Functor2("-", Atom.a("non"), Atom.a("operator")), X, Atom.a("follows"), Atom.a("expression") }), new ListPair(new Functor2("atom", X, x7), S1)))
  2028. {
  2029. yield return false;
  2030. }
  2031. yield break;
  2032. }
  2033. }
  2034. public static IEnumerable<bool> cannot_follow(object Type, object Token, object Tokens)
  2035. {
  2036. {
  2037. foreach (bool l2 in syntax_error(ListPair.make(new object[] { Type, Atom.a("follows"), Atom.a("expression") }), new ListPair(Token, Tokens)))
  2038. {
  2039. yield return false;
  2040. }
  2041. }
  2042. }
  2043. public static IEnumerable<bool> exprtl(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6)
  2044. {
  2045. {
  2046. object x1 = arg2;
  2047. object x3 = arg4;
  2048. Variable Term = new Variable();
  2049. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  2050. {
  2051. foreach (bool l3 in YP.unify(arg3, Term))
  2052. {
  2053. foreach (bool l4 in YP.unify(arg5, Term))
  2054. {
  2055. foreach (bool l5 in YP.unify(arg6, Atom.NIL))
  2056. {
  2057. yield return false;
  2058. }
  2059. }
  2060. }
  2061. }
  2062. }
  2063. {
  2064. object C = arg2;
  2065. object Term = arg3;
  2066. object Precedence = arg4;
  2067. object Answer = arg5;
  2068. object S = arg6;
  2069. Variable Token = new Variable();
  2070. Variable Tokens = new Variable();
  2071. foreach (bool l2 in YP.unify(arg1, new ListPair(Token, Tokens)))
  2072. {
  2073. foreach (bool l3 in exprtl_7(Token, C, Term, Precedence, Answer, S, Tokens))
  2074. {
  2075. yield return false;
  2076. }
  2077. }
  2078. }
  2079. }
  2080. public static IEnumerable<bool> exprtl_7(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7)
  2081. {
  2082. {
  2083. object C = arg2;
  2084. object Term = arg3;
  2085. object Precedence = arg4;
  2086. object Answer = arg5;
  2087. object S = arg6;
  2088. object S1 = arg7;
  2089. Variable F = new Variable();
  2090. Variable Pos = new Variable();
  2091. Variable L = new Variable();
  2092. Variable O = new Variable();
  2093. Variable R = new Variable();
  2094. Variable Other = new Variable();
  2095. Variable S2 = new Variable();
  2096. Variable Expr = new Variable();
  2097. foreach (bool l2 in YP.unify(arg1, new Functor(Atom.a("infixop", Atom.a("")), new object[] { new Functor2("/", F, Pos), L, O, R })))
  2098. {
  2099. if (YP.greaterThanOrEqual(Precedence, O))
  2100. {
  2101. if (YP.lessThanOrEqual(C, L))
  2102. {
  2103. foreach (bool l5 in parse(S1, R, Other, S2))
  2104. {
  2105. foreach (bool l6 in YP.univ(Expr, ListPair.make(new object[] { F, Pos, Term, Other })))
  2106. {
  2107. foreach (bool l7 in exprtl(S2, O, Expr, Precedence, Answer, S))
  2108. {
  2109. yield return false;
  2110. }
  2111. }
  2112. }
  2113. yield break;
  2114. }
  2115. }
  2116. }
  2117. }
  2118. {
  2119. object C = arg2;
  2120. object Term = arg3;
  2121. object Precedence = arg4;
  2122. object Answer = arg5;
  2123. object S = arg6;
  2124. object S1 = arg7;
  2125. Variable F = new Variable();
  2126. Variable Pos = new Variable();
  2127. Variable L = new Variable();
  2128. Variable O = new Variable();
  2129. Variable Expr = new Variable();
  2130. Variable S2 = new Variable();
  2131. foreach (bool l2 in YP.unify(arg1, new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L, O)))
  2132. {
  2133. if (YP.greaterThanOrEqual(Precedence, O))
  2134. {
  2135. if (YP.lessThanOrEqual(C, L))
  2136. {
  2137. foreach (bool l5 in YP.univ(Expr, ListPair.make(new object[] { F, Pos, Term })))
  2138. {
  2139. foreach (bool l6 in peepop(S1, S2))
  2140. {
  2141. foreach (bool l7 in exprtl(S2, O, Expr, Precedence, Answer, S))
  2142. {
  2143. yield return false;
  2144. }
  2145. }
  2146. }
  2147. yield break;
  2148. }
  2149. }
  2150. }
  2151. }
  2152. {
  2153. object C = arg2;
  2154. object Term = arg3;
  2155. object Precedence = arg4;
  2156. object Answer = arg5;
  2157. object S = arg6;
  2158. object S1 = arg7;
  2159. Variable Next = new Variable();
  2160. Variable S2 = new Variable();
  2161. foreach (bool l2 in YP.unify(arg1, Atom.a(",")))
  2162. {
  2163. if (YP.greaterThanOrEqual(Precedence, 1000))
  2164. {
  2165. if (YP.lessThan(C, 1000))
  2166. {
  2167. foreach (bool l5 in parse(S1, 1000, Next, S2))
  2168. {
  2169. foreach (bool l6 in exprtl(S2, 1000, new Functor2(",", Term, Next), Precedence, Answer, S))
  2170. {
  2171. yield return false;
  2172. }
  2173. }
  2174. yield break;
  2175. }
  2176. }
  2177. }
  2178. }
  2179. {
  2180. object C = arg2;
  2181. object Term = arg3;
  2182. object Precedence = arg4;
  2183. object Answer = arg5;
  2184. object S = arg6;
  2185. object S1 = arg7;
  2186. Variable Next = new Variable();
  2187. Variable S2 = new Variable();
  2188. foreach (bool l2 in YP.unify(arg1, Atom.a("|")))
  2189. {
  2190. if (YP.greaterThanOrEqual(Precedence, 1100))
  2191. {
  2192. if (YP.lessThan(C, 1100))
  2193. {
  2194. foreach (bool l5 in parse(S1, 1100, Next, S2))
  2195. {
  2196. foreach (bool l6 in exprtl(S2, 1100, new Functor2(";", Term, Next), Precedence, Answer, S))
  2197. {
  2198. yield return false;
  2199. }
  2200. }
  2201. yield break;
  2202. }
  2203. }
  2204. }
  2205. }
  2206. {
  2207. object Token = arg1;
  2208. object x2 = arg2;
  2209. object x4 = arg4;
  2210. object Tokens = arg7;
  2211. Variable Term = new Variable();
  2212. foreach (bool l2 in YP.unify(arg3, Term))
  2213. {
  2214. foreach (bool l3 in YP.unify(arg5, Term))
  2215. {
  2216. foreach (bool l4 in YP.unify(arg6, new ListPair(Token, Tokens)))
  2217. {
  2218. yield return false;
  2219. }
  2220. }
  2221. }
  2222. }
  2223. }
  2224. public static IEnumerable<bool> syntax_error(object _Message, object _List)
  2225. {
  2226. {
  2227. yield break;
  2228. }
  2229. foreach (bool l1 in YP.fail())
  2230. {
  2231. yield return false;
  2232. }
  2233. }
  2234. public static IEnumerable<bool> syntax_error(object _List)
  2235. {
  2236. {
  2237. yield break;
  2238. }
  2239. foreach (bool l1 in YP.fail())
  2240. {
  2241. yield return false;
  2242. }
  2243. }
  2244. public static IEnumerable<bool> prefixop(object F, object O, object Q)
  2245. {
  2246. {
  2247. foreach (bool l2 in YP.current_op(O, Atom.a("fx"), F))
  2248. {
  2249. foreach (bool l3 in YP.unify(Q, YP.subtract(O, 1)))
  2250. {
  2251. yield return false;
  2252. }
  2253. goto cutIf1;
  2254. }
  2255. foreach (bool l2 in YP.current_op(O, Atom.a("fy"), F))
  2256. {
  2257. foreach (bool l3 in YP.unify(Q, O))
  2258. {
  2259. yield return false;
  2260. }
  2261. goto cutIf2;
  2262. }
  2263. cutIf2:
  2264. cutIf1:
  2265. { }
  2266. }
  2267. }
  2268. public static IEnumerable<bool> postfixop(object F, object P, object O)
  2269. {
  2270. {
  2271. foreach (bool l2 in YP.current_op(O, Atom.a("xf"), F))
  2272. {
  2273. foreach (bool l3 in YP.unify(P, YP.subtract(O, 1)))
  2274. {
  2275. yield return false;
  2276. }
  2277. goto cutIf1;
  2278. }
  2279. foreach (bool l2 in YP.current_op(O, Atom.a("yf"), F))
  2280. {
  2281. foreach (bool l3 in YP.unify(P, O))
  2282. {
  2283. yield return false;
  2284. }
  2285. goto cutIf2;
  2286. }
  2287. cutIf2:
  2288. cutIf1:
  2289. { }
  2290. }
  2291. }
  2292. public static IEnumerable<bool> infixop(object F, object P, object O, object Q)
  2293. {
  2294. {
  2295. foreach (bool l2 in YP.current_op(O, Atom.a("xfy"), F))
  2296. {
  2297. foreach (bool l3 in YP.unify(P, YP.subtract(O, 1)))
  2298. {
  2299. foreach (bool l4 in YP.unify(Q, O))
  2300. {
  2301. yield return false;
  2302. }
  2303. }
  2304. goto cutIf1;
  2305. }
  2306. foreach (bool l2 in YP.current_op(O, Atom.a("xfx"), F))
  2307. {
  2308. foreach (bool l3 in YP.unify(P, YP.subtract(O, 1)))
  2309. {
  2310. foreach (bool l4 in YP.unify(Q, P))
  2311. {
  2312. yield return false;
  2313. }
  2314. }
  2315. goto cutIf2;
  2316. }
  2317. foreach (bool l2 in YP.current_op(O, Atom.a("yfx"), F))
  2318. {
  2319. foreach (bool l3 in YP.unify(Q, YP.subtract(O, 1)))
  2320. {
  2321. foreach (bool l4 in YP.unify(P, O))
  2322. {
  2323. yield return false;
  2324. }
  2325. }
  2326. goto cutIf3;
  2327. }
  2328. cutIf3:
  2329. cutIf2:
  2330. cutIf1:
  2331. { }
  2332. }
  2333. }
  2334. public static IEnumerable<bool> ambigop(object F, object Precedence, object L1, object O1, object R1, object L2, object O2)
  2335. {
  2336. {
  2337. foreach (bool l2 in postfixop(F, L2, O2))
  2338. {
  2339. if (YP.lessThanOrEqual(O2, Precedence))
  2340. {
  2341. foreach (bool l4 in infixop(F, L1, O1, R1))
  2342. {
  2343. if (YP.lessThanOrEqual(O1, Precedence))
  2344. {
  2345. yield return false;
  2346. }
  2347. }
  2348. }
  2349. }
  2350. }
  2351. }
  2352. public static IEnumerable<bool> read_tokens1(object arg1)
  2353. {
  2354. {
  2355. object TokenList = arg1;
  2356. Variable C1 = new Variable();
  2357. Variable _X = new Variable();
  2358. Variable ListOfTokens = new Variable();
  2359. foreach (bool l2 in YP.get_code(C1))
  2360. {
  2361. foreach (bool l3 in read_tokens(C1, _X, ListOfTokens))
  2362. {
  2363. foreach (bool l4 in YP.unify(TokenList, ListOfTokens))
  2364. {
  2365. yield return false;
  2366. }
  2367. yield break;
  2368. }
  2369. }
  2370. }
  2371. {
  2372. foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", Atom.a("end_of_file"), 0), Atom.NIL)))
  2373. {
  2374. yield return false;
  2375. }
  2376. }
  2377. }
  2378. public static IEnumerable<bool> read_tokens2(object arg1, object arg2)
  2379. {
  2380. {
  2381. object TokenList = arg1;
  2382. object Dictionary = arg2;
  2383. Variable C1 = new Variable();
  2384. Variable Dict = new Variable();
  2385. Variable ListOfTokens = new Variable();
  2386. foreach (bool l2 in YP.get_code(C1))
  2387. {
  2388. foreach (bool l3 in read_tokens(C1, Dict, ListOfTokens))
  2389. {
  2390. foreach (bool l4 in terminate_list(Dict))
  2391. {
  2392. foreach (bool l5 in YP.unify(Dictionary, Dict))
  2393. {
  2394. foreach (bool l6 in YP.unify(TokenList, ListOfTokens))
  2395. {
  2396. yield return false;
  2397. }
  2398. }
  2399. yield break;
  2400. }
  2401. }
  2402. }
  2403. }
  2404. {
  2405. foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", Atom.a("end_of_file"), 0), Atom.NIL)))
  2406. {
  2407. foreach (bool l3 in YP.unify(arg2, Atom.NIL))
  2408. {
  2409. yield return false;
  2410. }
  2411. }
  2412. }
  2413. }
  2414. public static IEnumerable<bool> terminate_list(object arg1)
  2415. {
  2416. {
  2417. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  2418. {
  2419. yield return false;
  2420. }
  2421. }
  2422. {
  2423. Variable x1 = new Variable();
  2424. Variable Tail = new Variable();
  2425. foreach (bool l2 in YP.unify(arg1, new ListPair(x1, Tail)))
  2426. {
  2427. foreach (bool l3 in terminate_list(Tail))
  2428. {
  2429. yield return false;
  2430. }
  2431. }
  2432. }
  2433. }
  2434. public static IEnumerable<bool> read_special(object arg1, object Dict, object arg3)
  2435. {
  2436. {
  2437. object Tokens = arg3;
  2438. foreach (bool l2 in YP.unify(arg1, 95))
  2439. {
  2440. foreach (bool l3 in read_variable(95, Dict, Tokens))
  2441. {
  2442. yield return false;
  2443. }
  2444. }
  2445. }
  2446. {
  2447. object Tokens = arg3;
  2448. foreach (bool l2 in YP.unify(arg1, 247))
  2449. {
  2450. foreach (bool l3 in read_symbol(247, Dict, Tokens))
  2451. {
  2452. yield return false;
  2453. }
  2454. }
  2455. }
  2456. {
  2457. object Tokens = arg3;
  2458. foreach (bool l2 in YP.unify(arg1, 215))
  2459. {
  2460. foreach (bool l3 in read_symbol(215, Dict, Tokens))
  2461. {
  2462. yield return false;
  2463. }
  2464. }
  2465. }
  2466. {
  2467. Variable StartPos = new Variable();
  2468. Variable EndPos = new Variable();
  2469. Variable Tokens = new Variable();
  2470. Variable Ch = new Variable();
  2471. Variable NextCh = new Variable();
  2472. foreach (bool l2 in YP.unify(arg1, 37))
  2473. {
  2474. foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("comment", StartPos, EndPos), Tokens)))
  2475. {
  2476. foreach (bool l4 in get_current_position(StartPos))
  2477. {
  2478. foreach (bool l5 in YP.repeat())
  2479. {
  2480. foreach (bool l6 in YP.get_code(Ch))
  2481. {
  2482. if (YP.lessThan(Ch, new ListPair(32, Atom.NIL)))
  2483. {
  2484. if (YP.notEqual(Ch, 9))
  2485. {
  2486. if (YP.termNotEqual(Ch, -1))
  2487. {
  2488. foreach (bool l10 in get_current_position(EndPos))
  2489. {
  2490. foreach (bool l11 in YP.get_code(NextCh))
  2491. {
  2492. foreach (bool l12 in read_tokens(NextCh, Dict, Tokens))
  2493. {
  2494. yield return false;
  2495. }
  2496. }
  2497. }
  2498. }
  2499. yield break;
  2500. }
  2501. }
  2502. }
  2503. }
  2504. }
  2505. }
  2506. }
  2507. }
  2508. {
  2509. object T = arg3;
  2510. Variable C2 = new Variable();
  2511. Variable StartPos = new Variable();
  2512. Variable EndPos = new Variable();
  2513. Variable Tokens = new Variable();
  2514. Variable StartPos1 = new Variable();
  2515. Variable NextCh = new Variable();
  2516. Variable Chars = new Variable();
  2517. foreach (bool l2 in YP.unify(arg1, 47))
  2518. {
  2519. foreach (bool l3 in YP.get_code(C2))
  2520. {
  2521. if (YP.equal(C2, new ListPair(42, Atom.NIL)))
  2522. {
  2523. foreach (bool l5 in YP.unify(T, new ListPair(new Functor2("comment", StartPos, EndPos), Tokens)))
  2524. {
  2525. foreach (bool l6 in get_current_position(StartPos1))
  2526. {
  2527. foreach (bool l7 in YP.unify(StartPos, YP.subtract(StartPos1, 1)))
  2528. {
  2529. foreach (bool l8 in read_solidus(32, NextCh))
  2530. {
  2531. foreach (bool l9 in get_current_position(EndPos))
  2532. {
  2533. foreach (bool l10 in read_tokens(NextCh, Dict, Tokens))
  2534. {
  2535. yield return false;
  2536. }
  2537. }
  2538. }
  2539. }
  2540. }
  2541. }
  2542. goto cutIf1;
  2543. }
  2544. foreach (bool l4 in YP.unify(T, Tokens))
  2545. {
  2546. foreach (bool l5 in rest_symbol(C2, Chars, NextCh))
  2547. {
  2548. foreach (bool l6 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(47, Chars)))
  2549. {
  2550. yield return false;
  2551. }
  2552. }
  2553. }
  2554. cutIf1:
  2555. { }
  2556. }
  2557. }
  2558. }
  2559. {
  2560. Variable Pos = new Variable();
  2561. Variable Tokens = new Variable();
  2562. Variable NextCh = new Variable();
  2563. foreach (bool l2 in YP.unify(arg1, 33))
  2564. {
  2565. foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("atom", Atom.a("!"), Pos), Tokens)))
  2566. {
  2567. foreach (bool l4 in get_current_position(Pos))
  2568. {
  2569. foreach (bool l5 in YP.get_code(NextCh))
  2570. {
  2571. foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens))
  2572. {
  2573. yield return false;
  2574. }
  2575. }
  2576. }
  2577. }
  2578. }
  2579. }
  2580. {
  2581. Variable Tokens = new Variable();
  2582. Variable NextCh = new Variable();
  2583. foreach (bool l2 in YP.unify(arg1, 40))
  2584. {
  2585. foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(" ("), Tokens)))
  2586. {
  2587. foreach (bool l4 in YP.get_code(NextCh))
  2588. {
  2589. foreach (bool l5 in read_tokens(NextCh, Dict, Tokens))
  2590. {
  2591. yield return false;
  2592. }
  2593. }
  2594. }
  2595. }
  2596. }
  2597. {
  2598. Variable Tokens = new Variable();
  2599. Variable NextCh = new Variable();
  2600. foreach (bool l2 in YP.unify(arg1, 41))
  2601. {
  2602. foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(")"), Tokens)))
  2603. {
  2604. foreach (bool l4 in YP.get_code(NextCh))
  2605. {
  2606. foreach (bool l5 in read_tokens(NextCh, Dict, Tokens))
  2607. {
  2608. yield return false;
  2609. }
  2610. }
  2611. }
  2612. }
  2613. }
  2614. {
  2615. Variable Tokens = new Variable();
  2616. Variable NextCh = new Variable();
  2617. foreach (bool l2 in YP.unify(arg1, 44))
  2618. {
  2619. foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(","), Tokens)))
  2620. {
  2621. foreach (bool l4 in YP.get_code(NextCh))
  2622. {
  2623. foreach (bool l5 in read_tokens(NextCh, Dict, Tokens))
  2624. {
  2625. yield return false;
  2626. }
  2627. }
  2628. }
  2629. }
  2630. }
  2631. {
  2632. Variable Pos = new Variable();
  2633. Variable Tokens = new Variable();
  2634. Variable NextCh = new Variable();
  2635. foreach (bool l2 in YP.unify(arg1, 59))
  2636. {
  2637. foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("atom", Atom.a(";"), Pos), Tokens)))
  2638. {
  2639. foreach (bool l4 in get_current_position(Pos))
  2640. {
  2641. foreach (bool l5 in YP.get_code(NextCh))
  2642. {
  2643. foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens))
  2644. {
  2645. yield return false;
  2646. }
  2647. }
  2648. }
  2649. }
  2650. }
  2651. }
  2652. {
  2653. Variable Pos = new Variable();
  2654. Variable Tokens = new Variable();
  2655. Variable NextCh = new Variable();
  2656. foreach (bool l2 in YP.unify(arg1, 91))
  2657. {
  2658. foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("/", Atom.a("["), Pos), Tokens)))
  2659. {
  2660. foreach (bool l4 in get_current_position(Pos))
  2661. {
  2662. foreach (bool l5 in YP.get_code(NextCh))
  2663. {
  2664. foreach (bool l6 in read_tokens(NextCh, Dict, Tokens))
  2665. {
  2666. yield return false;
  2667. }
  2668. }
  2669. }
  2670. }
  2671. }
  2672. }
  2673. {
  2674. Variable Pos = new Variable();
  2675. Variable Tokens = new Variable();
  2676. Variable NextCh = new Variable();
  2677. foreach (bool l2 in YP.unify(arg1, 93))
  2678. {
  2679. foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("/", Atom.a("]"), Pos), Tokens)))
  2680. {
  2681. foreach (bool l4 in get_current_position(Pos))
  2682. {
  2683. foreach (bool l5 in YP.get_code(NextCh))
  2684. {
  2685. foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens))
  2686. {
  2687. yield return false;
  2688. }
  2689. }
  2690. }
  2691. }
  2692. }
  2693. }
  2694. {
  2695. Variable Pos = new Variable();
  2696. Variable Tokens = new Variable();
  2697. Variable NextCh = new Variable();
  2698. foreach (bool l2 in YP.unify(arg1, 123))
  2699. {
  2700. foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("/", Atom.a("{"), Pos), Tokens)))
  2701. {
  2702. foreach (bool l4 in get_current_position(Pos))
  2703. {
  2704. foreach (bool l5 in YP.get_code(NextCh))
  2705. {
  2706. foreach (bool l6 in read_tokens(NextCh, Dict, Tokens))
  2707. {
  2708. yield return false;
  2709. }
  2710. }
  2711. }
  2712. }
  2713. }
  2714. }
  2715. {
  2716. Variable Tokens = new Variable();
  2717. Variable NextCh = new Variable();
  2718. foreach (bool l2 in YP.unify(arg1, 124))
  2719. {
  2720. foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("|"), Tokens)))
  2721. {
  2722. foreach (bool l4 in YP.get_code(NextCh))
  2723. {
  2724. foreach (bool l5 in read_tokens(NextCh, Dict, Tokens))
  2725. {
  2726. yield return false;
  2727. }
  2728. }
  2729. }
  2730. }
  2731. }
  2732. {
  2733. Variable Tokens = new Variable();
  2734. Variable NextCh = new Variable();
  2735. foreach (bool l2 in YP.unify(arg1, 125))
  2736. {
  2737. foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("}"), Tokens)))
  2738. {
  2739. foreach (bool l4 in YP.get_code(NextCh))
  2740. {
  2741. foreach (bool l5 in read_after_atom(NextCh, Dict, Tokens))
  2742. {
  2743. yield return false;
  2744. }
  2745. }
  2746. }
  2747. }
  2748. }
  2749. {
  2750. object Tokens = arg3;
  2751. Variable NextCh = new Variable();
  2752. foreach (bool l2 in YP.unify(arg1, 46))
  2753. {
  2754. foreach (bool l3 in YP.get_code(NextCh))
  2755. {
  2756. foreach (bool l4 in read_fullstop(NextCh, Dict, Tokens))
  2757. {
  2758. yield return false;
  2759. }
  2760. }
  2761. }
  2762. }
  2763. {
  2764. Variable Chars = new Variable();
  2765. Variable Tokens = new Variable();
  2766. Variable NextCh = new Variable();
  2767. foreach (bool l2 in YP.unify(arg1, 34))
  2768. {
  2769. foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor1("string", Chars), Tokens)))
  2770. {
  2771. foreach (bool l4 in read_string(Chars, 34, NextCh))
  2772. {
  2773. foreach (bool l5 in read_tokens(NextCh, Dict, Tokens))
  2774. {
  2775. yield return false;
  2776. }
  2777. }
  2778. }
  2779. }
  2780. }
  2781. {
  2782. object Tokens = arg3;
  2783. Variable Chars = new Variable();
  2784. Variable NextCh = new Variable();
  2785. foreach (bool l2 in YP.unify(arg1, 39))
  2786. {
  2787. foreach (bool l3 in read_string(Chars, 39, NextCh))
  2788. {
  2789. foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, Chars))
  2790. {
  2791. yield return false;
  2792. }
  2793. }
  2794. }
  2795. }
  2796. {
  2797. object Tokens = arg3;
  2798. foreach (bool l2 in YP.unify(arg1, 35))
  2799. {
  2800. foreach (bool l3 in read_symbol(35, Dict, Tokens))
  2801. {
  2802. yield return false;
  2803. }
  2804. }
  2805. }
  2806. {
  2807. object Tokens = arg3;
  2808. foreach (bool l2 in YP.unify(arg1, 36))
  2809. {
  2810. foreach (bool l3 in read_symbol(36, Dict, Tokens))
  2811. {
  2812. yield return false;
  2813. }
  2814. }
  2815. }
  2816. {
  2817. object Tokens = arg3;
  2818. foreach (bool l2 in YP.unify(arg1, 38))
  2819. {
  2820. foreach (bool l3 in read_symbol(38, Dict, Tokens))
  2821. {
  2822. yield return false;
  2823. }
  2824. }
  2825. }
  2826. {
  2827. object Tokens = arg3;
  2828. foreach (bool l2 in YP.unify(arg1, 42))
  2829. {
  2830. foreach (bool l3 in read_symbol(42, Dict, Tokens))
  2831. {
  2832. yield return false;
  2833. }
  2834. }
  2835. }
  2836. {
  2837. object Tokens = arg3;
  2838. foreach (bool l2 in YP.unify(arg1, 43))
  2839. {
  2840. foreach (bool l3 in read_symbol(43, Dict, Tokens))
  2841. {
  2842. yield return false;
  2843. }
  2844. }
  2845. }
  2846. {
  2847. object Tokens = arg3;
  2848. foreach (bool l2 in YP.unify(arg1, 45))
  2849. {
  2850. foreach (bool l3 in read_symbol(45, Dict, Tokens))
  2851. {
  2852. yield return false;
  2853. }
  2854. }
  2855. }
  2856. {
  2857. object Tokens = arg3;
  2858. foreach (bool l2 in YP.unify(arg1, 58))
  2859. {
  2860. foreach (bool l3 in read_symbol(58, Dict, Tokens))
  2861. {
  2862. yield return false;
  2863. }
  2864. }
  2865. }
  2866. {
  2867. object Tokens = arg3;
  2868. foreach (bool l2 in YP.unify(arg1, 60))
  2869. {
  2870. foreach (bool l3 in read_symbol(60, Dict, Tokens))
  2871. {
  2872. yield return false;
  2873. }
  2874. }
  2875. }
  2876. {
  2877. object Tokens = arg3;
  2878. foreach (bool l2 in YP.unify(arg1, 61))
  2879. {
  2880. foreach (bool l3 in read_symbol(61, Dict, Tokens))
  2881. {
  2882. yield return false;
  2883. }
  2884. }
  2885. }
  2886. {
  2887. object Tokens = arg3;
  2888. foreach (bool l2 in YP.unify(arg1, 62))
  2889. {
  2890. foreach (bool l3 in read_symbol(62, Dict, Tokens))
  2891. {
  2892. yield return false;
  2893. }
  2894. }
  2895. }
  2896. {
  2897. object Tokens = arg3;
  2898. foreach (bool l2 in YP.unify(arg1, 63))
  2899. {
  2900. foreach (bool l3 in read_symbol(63, Dict, Tokens))
  2901. {
  2902. yield return false;
  2903. }
  2904. }
  2905. }
  2906. {
  2907. object Tokens = arg3;
  2908. foreach (bool l2 in YP.unify(arg1, 64))
  2909. {
  2910. foreach (bool l3 in read_symbol(64, Dict, Tokens))
  2911. {
  2912. yield return false;
  2913. }
  2914. }
  2915. }
  2916. {
  2917. object Tokens = arg3;
  2918. foreach (bool l2 in YP.unify(arg1, 92))
  2919. {
  2920. foreach (bool l3 in read_symbol(92, Dict, Tokens))
  2921. {
  2922. yield return false;
  2923. }
  2924. }
  2925. }
  2926. {
  2927. object Tokens = arg3;
  2928. foreach (bool l2 in YP.unify(arg1, 94))
  2929. {
  2930. foreach (bool l3 in read_symbol(94, Dict, Tokens))
  2931. {
  2932. yield return false;
  2933. }
  2934. }
  2935. }
  2936. {
  2937. object Tokens = arg3;
  2938. foreach (bool l2 in YP.unify(arg1, 96))
  2939. {
  2940. foreach (bool l3 in read_symbol(96, Dict, Tokens))
  2941. {
  2942. yield return false;
  2943. }
  2944. }
  2945. }
  2946. {
  2947. object Tokens = arg3;
  2948. foreach (bool l2 in YP.unify(arg1, 126))
  2949. {
  2950. foreach (bool l3 in read_symbol(126, Dict, Tokens))
  2951. {
  2952. yield return false;
  2953. }
  2954. }
  2955. }
  2956. }
  2957. public static IEnumerable<bool> read_symbol(object C1, object Dict, object Tokens)
  2958. {
  2959. {
  2960. Variable C2 = new Variable();
  2961. Variable Chars = new Variable();
  2962. Variable NextCh = new Variable();
  2963. foreach (bool l2 in YP.get_code(C2))
  2964. {
  2965. foreach (bool l3 in rest_symbol(C2, Chars, NextCh))
  2966. {
  2967. foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(C1, Chars)))
  2968. {
  2969. yield return false;
  2970. }
  2971. }
  2972. }
  2973. }
  2974. }
  2975. public static IEnumerable<bool> rest_symbol(object arg1, object arg2, object arg3)
  2976. {
  2977. {
  2978. object C2 = arg1;
  2979. object LastCh = arg3;
  2980. Variable Chars = new Variable();
  2981. Variable NextCh = new Variable();
  2982. foreach (bool l2 in YP.unify(arg2, new ListPair(C2, Chars)))
  2983. {
  2984. if (YP.greaterThan(C2, 160))
  2985. {
  2986. if (YP.lessThan(C2, 192))
  2987. {
  2988. if (YP.notEqual(C2, 186))
  2989. {
  2990. if (YP.notEqual(C2, 170))
  2991. {
  2992. foreach (bool l7 in YP.get_code(NextCh))
  2993. {
  2994. foreach (bool l8 in rest_symbol(NextCh, Chars, LastCh))
  2995. {
  2996. yield return false;
  2997. }
  2998. }
  2999. yield break;
  3000. }
  3001. }
  3002. }
  3003. goto cutIf1;
  3004. }
  3005. foreach (bool l3 in symbol_char(C2))
  3006. {
  3007. foreach (bool l4 in YP.get_code(NextCh))
  3008. {
  3009. foreach (bool l5 in rest_symbol(NextCh, Chars, LastCh))
  3010. {
  3011. yield return false;
  3012. }
  3013. }
  3014. yield break;
  3015. }
  3016. cutIf1:
  3017. { }
  3018. }
  3019. }
  3020. {
  3021. Variable C2 = new Variable();
  3022. foreach (bool l2 in YP.unify(arg1, C2))
  3023. {
  3024. foreach (bool l3 in YP.unify(arg2, Atom.NIL))
  3025. {
  3026. foreach (bool l4 in YP.unify(arg3, C2))
  3027. {
  3028. yield return false;
  3029. }
  3030. }
  3031. }
  3032. }
  3033. }
  3034. public static IEnumerable<bool> symbol_char(object arg1)
  3035. {
  3036. {
  3037. foreach (bool l2 in YP.unify(arg1, 35))
  3038. {
  3039. yield return false;
  3040. }
  3041. }
  3042. {
  3043. foreach (bool l2 in YP.unify(arg1, 36))
  3044. {
  3045. yield return false;
  3046. }
  3047. }
  3048. {
  3049. foreach (bool l2 in YP.unify(arg1, 38))
  3050. {
  3051. yield return false;
  3052. }
  3053. }
  3054. {
  3055. foreach (bool l2 in YP.unify(arg1, 42))
  3056. {
  3057. yield return false;
  3058. }
  3059. }
  3060. {
  3061. foreach (bool l2 in YP.unify(arg1, 43))
  3062. {
  3063. yield return false;
  3064. }
  3065. }
  3066. {
  3067. foreach (bool l2 in YP.unify(arg1, 45))
  3068. {
  3069. yield return false;
  3070. }
  3071. }
  3072. {
  3073. foreach (bool l2 in YP.unify(arg1, 46))
  3074. {
  3075. yield return false;
  3076. }
  3077. }
  3078. {
  3079. foreach (bool l2 in YP.unify(arg1, 47))
  3080. {
  3081. yield return false;
  3082. }
  3083. }
  3084. {
  3085. foreach (bool l2 in YP.unify(arg1, 58))
  3086. {
  3087. yield return false;
  3088. }
  3089. }
  3090. {
  3091. foreach (bool l2 in YP.unify(arg1, 60))
  3092. {
  3093. yield return false;
  3094. }
  3095. }
  3096. {
  3097. foreach (bool l2 in YP.unify(arg1, 61))
  3098. {
  3099. yield return false;
  3100. }
  3101. }
  3102. {
  3103. foreach (bool l2 in YP.unify(arg1, 62))
  3104. {
  3105. yield return false;
  3106. }
  3107. }
  3108. {
  3109. foreach (bool l2 in YP.unify(arg1, 63))
  3110. {
  3111. yield return false;
  3112. }
  3113. }
  3114. {
  3115. foreach (bool l2 in YP.unify(arg1, 64))
  3116. {
  3117. yield return false;
  3118. }
  3119. }
  3120. {
  3121. foreach (bool l2 in YP.unify(arg1, 92))
  3122. {
  3123. yield return false;
  3124. }
  3125. }
  3126. {
  3127. foreach (bool l2 in YP.unify(arg1, 94))
  3128. {
  3129. yield return false;
  3130. }
  3131. }
  3132. {
  3133. foreach (bool l2 in YP.unify(arg1, 96))
  3134. {
  3135. yield return false;
  3136. }
  3137. }
  3138. {
  3139. foreach (bool l2 in YP.unify(arg1, 126))
  3140. {
  3141. yield return false;
  3142. }
  3143. }
  3144. }
  3145. public static IEnumerable<bool> get_current_position(object Pos)
  3146. {
  3147. {
  3148. foreach (bool l2 in YP.unify(Pos, 0))
  3149. {
  3150. yield return false;
  3151. }
  3152. }
  3153. }
  3154. public static IEnumerable<bool> read_after_atom4(object Ch, object Dict, object arg3, object Chars)
  3155. {
  3156. {
  3157. Variable Atom_1 = new Variable();
  3158. Variable Pos = new Variable();
  3159. Variable Tokens = new Variable();
  3160. foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor2("atom", Atom_1, Pos), Tokens)))
  3161. {
  3162. foreach (bool l3 in YP.unify(Pos, 0))
  3163. {
  3164. foreach (bool l4 in YP.atom_codes(Atom_1, Chars))
  3165. {
  3166. foreach (bool l5 in read_after_atom(Ch, Dict, Tokens))
  3167. {
  3168. yield return false;
  3169. }
  3170. }
  3171. }
  3172. }
  3173. }
  3174. }
  3175. public static IEnumerable<bool> read_after_atom(object arg1, object Dict, object arg3)
  3176. {
  3177. {
  3178. Variable Tokens = new Variable();
  3179. Variable NextCh = new Variable();
  3180. foreach (bool l2 in YP.unify(arg1, 40))
  3181. {
  3182. foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("("), Tokens)))
  3183. {
  3184. foreach (bool l4 in YP.get_code(NextCh))
  3185. {
  3186. foreach (bool l5 in read_tokens(NextCh, Dict, Tokens))
  3187. {
  3188. yield return false;
  3189. }
  3190. }
  3191. yield break;
  3192. }
  3193. }
  3194. }
  3195. {
  3196. object Ch = arg1;
  3197. object Tokens = arg3;
  3198. foreach (bool l2 in read_tokens(Ch, Dict, Tokens))
  3199. {
  3200. yield return false;
  3201. }
  3202. }
  3203. }
  3204. public static IEnumerable<bool> read_string(object Chars, object Quote, object NextCh)
  3205. {
  3206. {
  3207. Variable Ch = new Variable();
  3208. Variable Char = new Variable();
  3209. Variable Next = new Variable();
  3210. foreach (bool l2 in YP.get_code(Ch))
  3211. {
  3212. foreach (bool l3 in read_char(Ch, Quote, Char, Next))
  3213. {
  3214. foreach (bool l4 in rest_string5(Char, Next, Chars, Quote, NextCh))
  3215. {
  3216. yield return false;
  3217. }
  3218. }
  3219. }
  3220. }
  3221. }
  3222. public static IEnumerable<bool> rest_string5(object arg1, object arg2, object arg3, object arg4, object arg5)
  3223. {
  3224. {
  3225. object _X = arg4;
  3226. Variable NextCh = new Variable();
  3227. foreach (bool l2 in YP.unify(arg1, -1))
  3228. {
  3229. foreach (bool l3 in YP.unify(arg2, NextCh))
  3230. {
  3231. foreach (bool l4 in YP.unify(arg3, Atom.NIL))
  3232. {
  3233. foreach (bool l5 in YP.unify(arg5, NextCh))
  3234. {
  3235. yield return true;
  3236. yield break;
  3237. }
  3238. }
  3239. }
  3240. }
  3241. }
  3242. {
  3243. object Char = arg1;
  3244. object Next = arg2;
  3245. object Quote = arg4;
  3246. object NextCh = arg5;
  3247. Variable Chars = new Variable();
  3248. Variable Char2 = new Variable();
  3249. Variable Next2 = new Variable();
  3250. foreach (bool l2 in YP.unify(arg3, new ListPair(Char, Chars)))
  3251. {
  3252. foreach (bool l3 in read_char(Next, Quote, Char2, Next2))
  3253. {
  3254. foreach (bool l4 in rest_string5(Char2, Next2, Chars, Quote, NextCh))
  3255. {
  3256. yield return false;
  3257. }
  3258. }
  3259. }
  3260. }
  3261. }
  3262. public static IEnumerable<bool> escape_char(object arg1, object arg2)
  3263. {
  3264. {
  3265. foreach (bool l2 in YP.unify(arg1, 110))
  3266. {
  3267. foreach (bool l3 in YP.unify(arg2, 10))
  3268. {
  3269. yield return false;
  3270. }
  3271. }
  3272. }
  3273. {
  3274. foreach (bool l2 in YP.unify(arg1, 78))
  3275. {
  3276. foreach (bool l3 in YP.unify(arg2, 10))
  3277. {
  3278. yield return false;
  3279. }
  3280. }
  3281. }
  3282. {
  3283. foreach (bool l2 in YP.unify(arg1, 116))
  3284. {
  3285. foreach (bool l3 in YP.unify(arg2, 9))
  3286. {
  3287. yield return false;
  3288. }
  3289. }
  3290. }
  3291. {
  3292. foreach (bool l2 in YP.unify(arg1, 84))
  3293. {
  3294. foreach (bool l3 in YP.unify(arg2, 9))
  3295. {
  3296. yield return false;
  3297. }
  3298. }
  3299. }
  3300. {
  3301. foreach (bool l2 in YP.unify(arg1, 114))
  3302. {
  3303. foreach (bool l3 in YP.unify(arg2, 13))
  3304. {
  3305. yield return false;
  3306. }
  3307. }
  3308. }
  3309. {
  3310. foreach (bool l2 in YP.unify(arg1, 82))
  3311. {
  3312. foreach (bool l3 in YP.unify(arg2, 13))
  3313. {
  3314. yield return false;
  3315. }
  3316. }
  3317. }
  3318. {
  3319. foreach (bool l2 in YP.unify(arg1, 118))
  3320. {
  3321. foreach (bool l3 in YP.unify(arg2, 11))
  3322. {
  3323. yield return false;
  3324. }
  3325. }
  3326. }
  3327. {
  3328. foreach (bool l2 in YP.unify(arg1, 86))
  3329. {
  3330. foreach (bool l3 in YP.unify(arg2, 11))
  3331. {
  3332. yield return false;
  3333. }
  3334. }
  3335. }
  3336. {
  3337. foreach (bool l2 in YP.unify(arg1, 98))
  3338. {
  3339. foreach (bool l3 in YP.unify(arg2, 8))
  3340. {
  3341. yield return false;
  3342. }
  3343. }
  3344. }
  3345. {
  3346. foreach (bool l2 in YP.unify(arg1, 66))
  3347. {
  3348. foreach (bool l3 in YP.unify(arg2, 8))
  3349. {
  3350. yield return false;
  3351. }
  3352. }
  3353. }
  3354. {
  3355. foreach (bool l2 in YP.unify(arg1, 102))
  3356. {
  3357. foreach (bool l3 in YP.unify(arg2, 12))
  3358. {
  3359. yield return false;
  3360. }
  3361. }
  3362. }
  3363. {
  3364. foreach (bool l2 in YP.unify(arg1, 70))
  3365. {
  3366. foreach (bool l3 in YP.unify(arg2, 12))
  3367. {
  3368. yield return false;
  3369. }
  3370. }
  3371. }
  3372. {
  3373. foreach (bool l2 in YP.unify(arg1, 101))
  3374. {
  3375. foreach (bool l3 in YP.unify(arg2, 27))
  3376. {
  3377. yield return false;
  3378. }
  3379. }
  3380. }
  3381. {
  3382. foreach (bool l2 in YP.unify(arg1, 69))
  3383. {
  3384. foreach (bool l3 in YP.unify(arg2, 27))
  3385. {
  3386. yield return false;
  3387. }
  3388. }
  3389. }
  3390. {
  3391. foreach (bool l2 in YP.unify(arg1, 100))
  3392. {
  3393. foreach (bool l3 in YP.unify(arg2, 127))
  3394. {
  3395. yield return false;
  3396. }
  3397. }
  3398. }
  3399. {
  3400. foreach (bool l2 in YP.unify(arg1, 68))
  3401. {
  3402. foreach (bool l3 in YP.unify(arg2, 127))
  3403. {
  3404. yield return false;
  3405. }
  3406. }
  3407. }
  3408. {
  3409. foreach (bool l2 in YP.unify(arg1, 115))
  3410. {
  3411. foreach (bool l3 in YP.unify(arg2, 32))
  3412. {
  3413. yield return false;
  3414. }
  3415. }
  3416. }
  3417. {
  3418. foreach (bool l2 in YP.unify(arg1, 83))
  3419. {
  3420. foreach (bool l3 in YP.unify(arg2, 32))
  3421. {
  3422. yield return false;
  3423. }
  3424. }
  3425. }
  3426. {
  3427. foreach (bool l2 in YP.unify(arg1, 122))
  3428. {
  3429. foreach (bool l3 in YP.unify(arg2, -1))
  3430. {
  3431. yield return false;
  3432. }
  3433. }
  3434. }
  3435. {
  3436. foreach (bool l2 in YP.unify(arg1, 90))
  3437. {
  3438. foreach (bool l3 in YP.unify(arg2, -1))
  3439. {
  3440. yield return false;
  3441. }
  3442. }
  3443. }
  3444. }
  3445. public static IEnumerable<bool> read_variable(object C1, object Dict, object arg3)
  3446. {
  3447. {
  3448. Variable Var = new Variable();
  3449. Variable Name = new Variable();
  3450. Variable StartPos = new Variable();
  3451. Variable Tokens = new Variable();
  3452. Variable Chars = new Variable();
  3453. Variable NextCh = new Variable();
  3454. foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor3("var", Var, Name, StartPos), Tokens)))
  3455. {
  3456. foreach (bool l3 in get_current_position(StartPos))
  3457. {
  3458. foreach (bool l4 in read_name(C1, Chars, NextCh))
  3459. {
  3460. foreach (bool l5 in YP.atom_codes(Name, Chars))
  3461. {
  3462. if (YP.termEqual(Name, Atom.a("_")))
  3463. {
  3464. foreach (bool l7 in read_after_atom(NextCh, Dict, Tokens))
  3465. {
  3466. yield return false;
  3467. }
  3468. goto cutIf1;
  3469. }
  3470. foreach (bool l6 in read_lookup(Dict, Name, Var))
  3471. {
  3472. foreach (bool l7 in read_after_atom(NextCh, Dict, Tokens))
  3473. {
  3474. yield return false;
  3475. }
  3476. }
  3477. cutIf1:
  3478. { }
  3479. }
  3480. }
  3481. }
  3482. }
  3483. }
  3484. }
  3485. public static IEnumerable<bool> read_lookup(object arg1, object Name, object Var)
  3486. {
  3487. {
  3488. Variable N = new Variable();
  3489. Variable V = new Variable();
  3490. Variable L = new Variable();
  3491. foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("=", N, V), L)))
  3492. {
  3493. foreach (bool l3 in YP.unify(N, Name))
  3494. {
  3495. foreach (bool l4 in YP.unify(V, Var))
  3496. {
  3497. yield return false;
  3498. }
  3499. goto cutIf1;
  3500. }
  3501. foreach (bool l3 in read_lookup(L, Name, Var))
  3502. {
  3503. yield return false;
  3504. }
  3505. cutIf1:
  3506. { }
  3507. }
  3508. }
  3509. }
  3510. public static IEnumerable<bool> read_solidus(object Ch, object LastCh)
  3511. {
  3512. {
  3513. Variable NextCh = new Variable();
  3514. if (YP.equal(Ch, 42))
  3515. {
  3516. foreach (bool l3 in YP.get_code(NextCh))
  3517. {
  3518. if (YP.equal(NextCh, 47))
  3519. {
  3520. foreach (bool l5 in YP.get_code(LastCh))
  3521. {
  3522. yield return false;
  3523. }
  3524. goto cutIf2;
  3525. }
  3526. foreach (bool l4 in read_solidus(NextCh, LastCh))
  3527. {
  3528. yield return false;
  3529. }
  3530. cutIf2:
  3531. { }
  3532. }
  3533. goto cutIf1;
  3534. }
  3535. if (YP.notEqual(Ch, -1))
  3536. {
  3537. foreach (bool l3 in YP.get_code(NextCh))
  3538. {
  3539. foreach (bool l4 in read_solidus(NextCh, LastCh))
  3540. {
  3541. yield return false;
  3542. }
  3543. }
  3544. goto cutIf3;
  3545. }
  3546. foreach (bool l2 in YP.unify(LastCh, Ch))
  3547. {
  3548. foreach (bool l3 in formatError(Atom.a("user_error"), Atom.a("~N** end of file in /*comment~n"), Atom.NIL))
  3549. {
  3550. yield return false;
  3551. }
  3552. }
  3553. cutIf3:
  3554. cutIf1:
  3555. { }
  3556. }
  3557. }
  3558. public static IEnumerable<bool> read_identifier(object C1, object Dict, object Tokens)
  3559. {
  3560. {
  3561. Variable Chars = new Variable();
  3562. Variable NextCh = new Variable();
  3563. foreach (bool l2 in read_name(C1, Chars, NextCh))
  3564. {
  3565. foreach (bool l3 in read_after_atom4(NextCh, Dict, Tokens, Chars))
  3566. {
  3567. yield return false;
  3568. }
  3569. }
  3570. }
  3571. }
  3572. public static IEnumerable<bool> read_name(object C1, object arg2, object LastCh)
  3573. {
  3574. {
  3575. Variable Chars = new Variable();
  3576. Variable C2 = new Variable();
  3577. foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars)))
  3578. {
  3579. foreach (bool l3 in YP.get_code(C2))
  3580. {
  3581. if (YP.greaterThanOrEqual(C2, new ListPair(97, Atom.NIL)))
  3582. {
  3583. if (YP.lessThanOrEqual(C2, new ListPair(122, Atom.NIL)))
  3584. {
  3585. foreach (bool l6 in read_name(C2, Chars, LastCh))
  3586. {
  3587. yield return false;
  3588. }
  3589. goto cutIf2;
  3590. }
  3591. if (YP.lessThan(C2, 192))
  3592. {
  3593. if (YP.notEqual(YP.bitwiseOr(C2, 16), 186))
  3594. {
  3595. foreach (bool l7 in YP.unify(Chars, Atom.NIL))
  3596. {
  3597. foreach (bool l8 in YP.unify(LastCh, C2))
  3598. {
  3599. yield return false;
  3600. }
  3601. }
  3602. goto cutIf3;
  3603. }
  3604. }
  3605. if (YP.equal(YP.bitwiseOr(C2, 32), 247))
  3606. {
  3607. foreach (bool l6 in YP.unify(Chars, Atom.NIL))
  3608. {
  3609. foreach (bool l7 in YP.unify(LastCh, C2))
  3610. {
  3611. yield return false;
  3612. }
  3613. }
  3614. goto cutIf4;
  3615. }
  3616. foreach (bool l5 in read_name(C2, Chars, LastCh))
  3617. {
  3618. yield return false;
  3619. }
  3620. cutIf4:
  3621. cutIf3:
  3622. cutIf2:
  3623. goto cutIf1;
  3624. }
  3625. if (YP.greaterThanOrEqual(C2, new ListPair(65, Atom.NIL)))
  3626. {
  3627. if (YP.greaterThan(C2, new ListPair(90, Atom.NIL)))
  3628. {
  3629. if (YP.notEqual(C2, new ListPair(95, Atom.NIL)))
  3630. {
  3631. foreach (bool l7 in YP.unify(Chars, Atom.NIL))
  3632. {
  3633. foreach (bool l8 in YP.unify(LastCh, C2))
  3634. {
  3635. yield return false;
  3636. }
  3637. }
  3638. goto cutIf6;
  3639. }
  3640. }
  3641. foreach (bool l5 in read_name(C2, Chars, LastCh))
  3642. {
  3643. yield return false;
  3644. }
  3645. cutIf6:
  3646. goto cutIf5;
  3647. }
  3648. if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL)))
  3649. {
  3650. if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL)))
  3651. {
  3652. foreach (bool l6 in read_name(C2, Chars, LastCh))
  3653. {
  3654. yield return false;
  3655. }
  3656. goto cutIf7;
  3657. }
  3658. }
  3659. foreach (bool l4 in YP.unify(Chars, Atom.NIL))
  3660. {
  3661. foreach (bool l5 in YP.unify(LastCh, C2))
  3662. {
  3663. yield return false;
  3664. }
  3665. }
  3666. cutIf7:
  3667. cutIf5:
  3668. cutIf1:
  3669. { }
  3670. }
  3671. }
  3672. }
  3673. }
  3674. public static IEnumerable<bool> read_fullstop(object Ch, object Dict, object Tokens)
  3675. {
  3676. {
  3677. Variable Number = new Variable();
  3678. Variable Tokens1 = new Variable();
  3679. Variable Chars = new Variable();
  3680. Variable NextCh = new Variable();
  3681. if (YP.lessThanOrEqual(Ch, new ListPair(57, Atom.NIL)))
  3682. {
  3683. if (YP.greaterThanOrEqual(Ch, new ListPair(48, Atom.NIL)))
  3684. {
  3685. foreach (bool l4 in YP.unify(Tokens, new ListPair(new Functor1("number", Number), Tokens1)))
  3686. {
  3687. foreach (bool l5 in read_float(Number, Dict, Tokens1, new ListPair(48, Atom.NIL), Ch))
  3688. {
  3689. yield return false;
  3690. }
  3691. }
  3692. goto cutIf1;
  3693. }
  3694. }
  3695. if (YP.greaterThan(Ch, new ListPair(32, Atom.NIL)))
  3696. {
  3697. foreach (bool l3 in rest_symbol(Ch, Chars, NextCh))
  3698. {
  3699. foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(46, Chars)))
  3700. {
  3701. yield return false;
  3702. }
  3703. }
  3704. goto cutIf2;
  3705. }
  3706. if (YP.greaterThanOrEqual(Ch, 0))
  3707. {
  3708. foreach (bool l3 in YP.unify(Tokens, Atom.NIL))
  3709. {
  3710. yield return false;
  3711. }
  3712. goto cutIf3;
  3713. }
  3714. foreach (bool l2 in formatError(Atom.a("user_error"), Atom.a("~N** end of file just after full stop~n"), Atom.NIL))
  3715. {
  3716. }
  3717. cutIf3:
  3718. cutIf2:
  3719. cutIf1:
  3720. { }
  3721. }
  3722. }
  3723. public static IEnumerable<bool> read_float(object Number, object Dict, object Tokens, object Digits, object Digit)
  3724. {
  3725. {
  3726. Variable Chars = new Variable();
  3727. Variable Rest = new Variable();
  3728. Variable NextCh = new Variable();
  3729. foreach (bool l2 in prepend(Digits, Chars, Rest))
  3730. {
  3731. foreach (bool l3 in read_float4(Digit, Rest, NextCh, Chars))
  3732. {
  3733. foreach (bool l4 in YP.number_codes(Number, Chars))
  3734. {
  3735. foreach (bool l5 in read_tokens(NextCh, Dict, Tokens))
  3736. {
  3737. yield return false;
  3738. }
  3739. }
  3740. }
  3741. }
  3742. }
  3743. }
  3744. public static IEnumerable<bool> prepend(object arg1, object arg2, object arg3)
  3745. {
  3746. {
  3747. object X = arg3;
  3748. foreach (bool l2 in YP.unify(arg1, Atom.NIL))
  3749. {
  3750. foreach (bool l3 in YP.unify(arg2, new ListPair(46, X)))
  3751. {
  3752. yield return false;
  3753. }
  3754. }
  3755. }
  3756. {
  3757. object Y = arg3;
  3758. Variable C = new Variable();
  3759. Variable Cs = new Variable();
  3760. Variable X = new Variable();
  3761. foreach (bool l2 in YP.unify(arg1, new ListPair(C, Cs)))
  3762. {
  3763. foreach (bool l3 in YP.unify(arg2, new ListPair(C, X)))
  3764. {
  3765. foreach (bool l4 in prepend(Cs, X, Y))
  3766. {
  3767. yield return false;
  3768. }
  3769. }
  3770. }
  3771. }
  3772. }
  3773. public static IEnumerable<bool> read_float4(object C1, object arg2, object NextCh, object Total)
  3774. {
  3775. {
  3776. Variable Chars = new Variable();
  3777. Variable C2 = new Variable();
  3778. Variable C3 = new Variable();
  3779. Variable C4 = new Variable();
  3780. Variable More = new Variable();
  3781. foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars)))
  3782. {
  3783. foreach (bool l3 in YP.get_code(C2))
  3784. {
  3785. if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL)))
  3786. {
  3787. if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL)))
  3788. {
  3789. foreach (bool l6 in read_float4(C2, Chars, NextCh, Total))
  3790. {
  3791. yield return false;
  3792. }
  3793. goto cutIf1;
  3794. }
  3795. }
  3796. if (YP.equal(YP.bitwiseOr(C2, 32), new ListPair(101, Atom.NIL)))
  3797. {
  3798. foreach (bool l5 in YP.get_code(C3))
  3799. {
  3800. if (YP.equal(C3, new ListPair(45, Atom.NIL)))
  3801. {
  3802. foreach (bool l7 in YP.get_code(C4))
  3803. {
  3804. foreach (bool l8 in YP.unify(Chars, new ListPair(C2, new ListPair(45, More))))
  3805. {
  3806. if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL)))
  3807. {
  3808. if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL)))
  3809. {
  3810. foreach (bool l11 in read_exponent(C4, More, NextCh))
  3811. {
  3812. yield return false;
  3813. }
  3814. goto cutIf4;
  3815. }
  3816. }
  3817. foreach (bool l9 in YP.unify(More, Atom.NIL))
  3818. {
  3819. foreach (bool l10 in formatError(Atom.a("user_error"), Atom.a("~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL)))
  3820. {
  3821. }
  3822. }
  3823. foreach (bool l9 in YP.unify(More, new ListPair(48, Atom.NIL)))
  3824. {
  3825. foreach (bool l10 in YP.unify(NextCh, C4))
  3826. {
  3827. yield return false;
  3828. }
  3829. }
  3830. cutIf4:
  3831. { }
  3832. }
  3833. }
  3834. goto cutIf3;
  3835. }
  3836. if (YP.equal(C3, new ListPair(43, Atom.NIL)))
  3837. {
  3838. foreach (bool l7 in YP.get_code(C4))
  3839. {
  3840. foreach (bool l8 in YP.unify(Chars, new ListPair(C2, More)))
  3841. {
  3842. if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL)))
  3843. {
  3844. if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL)))
  3845. {
  3846. foreach (bool l11 in read_exponent(C4, More, NextCh))
  3847. {
  3848. yield return false;
  3849. }
  3850. goto cutIf6;
  3851. }
  3852. }
  3853. foreach (bool l9 in YP.unify(More, Atom.NIL))
  3854. {
  3855. foreach (bool l10 in formatError(Atom.a("user_error"), Atom.a("~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL)))
  3856. {
  3857. }
  3858. }
  3859. foreach (bool l9 in YP.unify(More, new ListPair(48, Atom.NIL)))
  3860. {
  3861. foreach (bool l10 in YP.unify(NextCh, C4))
  3862. {
  3863. yield return false;
  3864. }
  3865. }
  3866. cutIf6:
  3867. { }
  3868. }
  3869. }
  3870. goto cutIf5;
  3871. }
  3872. foreach (bool l6 in YP.unify(C4, C3))
  3873. {
  3874. foreach (bool l7 in YP.unify(Chars, new ListPair(C2, More)))
  3875. {
  3876. if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL)))
  3877. {
  3878. if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL)))
  3879. {
  3880. foreach (bool l10 in read_exponent(C4, More, NextCh))
  3881. {
  3882. yield return false;
  3883. }
  3884. goto cutIf7;
  3885. }
  3886. }
  3887. foreach (bool l8 in YP.unify(More, Atom.NIL))
  3888. {
  3889. foreach (bool l9 in formatError(Atom.a("user_error"), Atom.a("~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL)))
  3890. {
  3891. }
  3892. }
  3893. foreach (bool l8 in YP.unify(More, new ListPair(48, Atom.NIL)))
  3894. {
  3895. foreach (bool l9 in YP.unify(NextCh, C4))
  3896. {
  3897. yield return false;
  3898. }
  3899. }
  3900. cutIf7:
  3901. { }
  3902. }
  3903. }
  3904. cutIf5:
  3905. cutIf3:
  3906. { }
  3907. }
  3908. goto cutIf2;
  3909. }
  3910. foreach (bool l4 in YP.unify(Chars, Atom.NIL))
  3911. {
  3912. foreach (bool l5 in YP.unify(NextCh, C2))
  3913. {
  3914. yield return false;
  3915. }
  3916. }
  3917. cutIf2:
  3918. cutIf1:
  3919. { }
  3920. }
  3921. }
  3922. }
  3923. }
  3924. public static IEnumerable<bool> read_exponent(object C1, object arg2, object NextCh)
  3925. {
  3926. {
  3927. Variable Chars = new Variable();
  3928. Variable C2 = new Variable();
  3929. foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars)))
  3930. {
  3931. foreach (bool l3 in YP.get_code(C2))
  3932. {
  3933. if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL)))
  3934. {
  3935. if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL)))
  3936. {
  3937. foreach (bool l6 in read_exponent(C2, Chars, NextCh))
  3938. {
  3939. yield return false;
  3940. }
  3941. goto cutIf1;
  3942. }
  3943. }
  3944. foreach (bool l4 in YP.unify(Chars, Atom.NIL))
  3945. {
  3946. foreach (bool l5 in YP.unify(NextCh, C2))
  3947. {
  3948. yield return false;
  3949. }
  3950. }
  3951. cutIf1:
  3952. { }
  3953. }
  3954. }
  3955. }
  3956. }
  3957. public static IEnumerable<bool> read_number(object C1, object Dict, object arg3)
  3958. {
  3959. {
  3960. Variable Number = new Variable();
  3961. Variable Tokens = new Variable();
  3962. Variable C2 = new Variable();
  3963. Variable N = new Variable();
  3964. Variable C = new Variable();
  3965. Variable C3 = new Variable();
  3966. Variable Digits = new Variable();
  3967. foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor1("number", Number), Tokens)))
  3968. {
  3969. foreach (bool l3 in read_number4(C1, C2, 0, N))
  3970. {
  3971. if (YP.equal(C2, 39))
  3972. {
  3973. if (YP.greaterThanOrEqual(N, 2))
  3974. {
  3975. if (YP.lessThanOrEqual(N, 36))
  3976. {
  3977. foreach (bool l7 in read_based(N, 0, Number, C))
  3978. {
  3979. foreach (bool l8 in read_tokens(C, Dict, Tokens))
  3980. {
  3981. yield return false;
  3982. }
  3983. }
  3984. goto cutIf2;
  3985. }
  3986. }
  3987. if (YP.equal(N, 0))
  3988. {
  3989. foreach (bool l6 in YP.get_code(C3))
  3990. {
  3991. foreach (bool l7 in read_char(C3, -1, Number, C))
  3992. {
  3993. foreach (bool l8 in read_tokens(C, Dict, Tokens))
  3994. {
  3995. yield return false;
  3996. }
  3997. }
  3998. }
  3999. goto cutIf3;
  4000. }
  4001. foreach (bool l5 in formatError(Atom.a("user_error"), Atom.a("~N** ~d' read as ~d '~n"), new ListPair(N, new ListPair(N, Atom.NIL))))
  4002. {
  4003. foreach (bool l6 in YP.unify(Number, N))
  4004. {
  4005. foreach (bool l7 in YP.unify(C, C2))
  4006. {
  4007. foreach (bool l8 in read_tokens(C, Dict, Tokens))
  4008. {
  4009. yield return false;
  4010. }
  4011. }
  4012. }
  4013. }
  4014. cutIf3:
  4015. cutIf2:
  4016. goto cutIf1;
  4017. }
  4018. if (YP.equal(C2, 46))
  4019. {
  4020. foreach (bool l5 in YP.get_code(C3))
  4021. {
  4022. if (YP.greaterThanOrEqual(C3, new ListPair(48, Atom.NIL)))
  4023. {
  4024. if (YP.lessThanOrEqual(C3, new ListPair(57, Atom.NIL)))
  4025. {
  4026. foreach (bool l8 in YP.number_codes(N, Digits))
  4027. {
  4028. foreach (bool l9 in read_float(Number, Dict, Tokens, Digits, C3))
  4029. {
  4030. yield return false;
  4031. }
  4032. }
  4033. goto cutIf5;
  4034. }
  4035. }
  4036. foreach (bool l6 in YP.unify(Number, N))
  4037. {
  4038. foreach (bool l7 in read_fullstop(C3, Dict, Tokens))
  4039. {
  4040. yield return false;
  4041. }
  4042. }
  4043. cutIf5:
  4044. { }
  4045. }
  4046. goto cutIf4;
  4047. }
  4048. foreach (bool l4 in YP.unify(Number, N))
  4049. {
  4050. foreach (bool l5 in read_tokens(C2, Dict, Tokens))
  4051. {
  4052. yield return false;
  4053. }
  4054. }
  4055. cutIf4:
  4056. cutIf1:
  4057. { }
  4058. }
  4059. }
  4060. }
  4061. }
  4062. public static IEnumerable<bool> read_number4(object C0, object C, object N0, object N)
  4063. {
  4064. {
  4065. Variable N1 = new Variable();
  4066. Variable C1 = new Variable();
  4067. if (YP.greaterThanOrEqual(C0, new ListPair(48, Atom.NIL)))
  4068. {
  4069. if (YP.lessThanOrEqual(C0, new ListPair(57, Atom.NIL)))
  4070. {
  4071. foreach (bool l4 in YP.unify(N1, YP.add(YP.subtract(YP.multiply(N0, 10), new ListPair(48, Atom.NIL)), C0)))
  4072. {
  4073. foreach (bool l5 in YP.get_code(C1))
  4074. {
  4075. foreach (bool l6 in read_number4(C1, C, N1, N))
  4076. {
  4077. yield return false;
  4078. }
  4079. }
  4080. }
  4081. goto cutIf1;
  4082. }
  4083. }
  4084. if (YP.equal(C0, 95))
  4085. {
  4086. foreach (bool l3 in YP.get_code(C1))
  4087. {
  4088. foreach (bool l4 in read_number4(C1, C, N0, N))
  4089. {
  4090. yield return false;
  4091. }
  4092. }
  4093. goto cutIf2;
  4094. }
  4095. foreach (bool l2 in YP.unify(C, C0))
  4096. {
  4097. foreach (bool l3 in YP.unify(N, N0))
  4098. {
  4099. yield return false;
  4100. }
  4101. }
  4102. cutIf2:
  4103. cutIf1:
  4104. { }
  4105. }
  4106. }
  4107. public static IEnumerable<bool> read_based(object Base, object N0, object N, object C)
  4108. {
  4109. {
  4110. Variable C1 = new Variable();
  4111. Variable Digit = new Variable();
  4112. Variable N1 = new Variable();
  4113. foreach (bool l2 in YP.get_code(C1))
  4114. {
  4115. if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL)))
  4116. {
  4117. if (YP.lessThanOrEqual(C1, new ListPair(57, Atom.NIL)))
  4118. {
  4119. foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, new ListPair(48, Atom.NIL))))
  4120. {
  4121. if (YP.lessThan(Digit, Base))
  4122. {
  4123. foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit)))
  4124. {
  4125. foreach (bool l8 in read_based(Base, N1, N, C))
  4126. {
  4127. yield return false;
  4128. }
  4129. }
  4130. goto cutIf2;
  4131. }
  4132. if (YP.equal(C1, new ListPair(95, Atom.NIL)))
  4133. {
  4134. foreach (bool l7 in read_based(Base, N0, N, C))
  4135. {
  4136. yield return false;
  4137. }
  4138. goto cutIf3;
  4139. }
  4140. foreach (bool l6 in YP.unify(N, N0))
  4141. {
  4142. foreach (bool l7 in YP.unify(C, C1))
  4143. {
  4144. yield return false;
  4145. }
  4146. }
  4147. cutIf3:
  4148. cutIf2:
  4149. { }
  4150. }
  4151. goto cutIf1;
  4152. }
  4153. }
  4154. if (YP.greaterThanOrEqual(C1, new ListPair(65, Atom.NIL)))
  4155. {
  4156. if (YP.lessThanOrEqual(C1, new ListPair(90, Atom.NIL)))
  4157. {
  4158. foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, YP.subtract(new ListPair(65, Atom.NIL), 10))))
  4159. {
  4160. if (YP.lessThan(Digit, Base))
  4161. {
  4162. foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit)))
  4163. {
  4164. foreach (bool l8 in read_based(Base, N1, N, C))
  4165. {
  4166. yield return false;
  4167. }
  4168. }
  4169. goto cutIf5;
  4170. }
  4171. if (YP.equal(C1, new ListPair(95, Atom.NIL)))
  4172. {
  4173. foreach (bool l7 in read_based(Base, N0, N, C))
  4174. {
  4175. yield return false;
  4176. }
  4177. goto cutIf6;
  4178. }
  4179. foreach (bool l6 in YP.unify(N, N0))
  4180. {
  4181. foreach (bool l7 in YP.unify(C, C1))
  4182. {
  4183. yield return false;
  4184. }
  4185. }
  4186. cutIf6:
  4187. cutIf5:
  4188. { }
  4189. }
  4190. goto cutIf4;
  4191. }
  4192. }
  4193. if (YP.greaterThanOrEqual(C1, new ListPair(97, Atom.NIL)))
  4194. {
  4195. if (YP.lessThanOrEqual(C1, new ListPair(122, Atom.NIL)))
  4196. {
  4197. foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, YP.subtract(new ListPair(97, Atom.NIL), 10))))
  4198. {
  4199. if (YP.lessThan(Digit, Base))
  4200. {
  4201. foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit)))
  4202. {
  4203. foreach (bool l8 in read_based(Base, N1, N, C))
  4204. {
  4205. yield return false;
  4206. }
  4207. }
  4208. goto cutIf8;
  4209. }
  4210. if (YP.equal(C1, new ListPair(95, Atom.NIL)))
  4211. {
  4212. foreach (bool l7 in read_based(Base, N0, N, C))
  4213. {
  4214. yield return false;
  4215. }
  4216. goto cutIf9;
  4217. }
  4218. foreach (bool l6 in YP.unify(N, N0))
  4219. {
  4220. foreach (bool l7 in YP.unify(C, C1))
  4221. {
  4222. yield return false;
  4223. }
  4224. }
  4225. cutIf9:
  4226. cutIf8:
  4227. { }
  4228. }
  4229. goto cutIf7;
  4230. }
  4231. }
  4232. foreach (bool l3 in YP.unify(Digit, 99))
  4233. {
  4234. if (YP.lessThan(Digit, Base))
  4235. {
  4236. foreach (bool l5 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit)))
  4237. {
  4238. foreach (bool l6 in read_based(Base, N1, N, C))
  4239. {
  4240. yield return false;
  4241. }
  4242. }
  4243. goto cutIf10;
  4244. }
  4245. if (YP.equal(C1, new ListPair(95, Atom.NIL)))
  4246. {
  4247. foreach (bool l5 in read_based(Base, N0, N, C))
  4248. {
  4249. yield return false;
  4250. }
  4251. goto cutIf11;
  4252. }
  4253. foreach (bool l4 in YP.unify(N, N0))
  4254. {
  4255. foreach (bool l5 in YP.unify(C, C1))
  4256. {
  4257. yield return false;
  4258. }
  4259. }
  4260. cutIf11:
  4261. cutIf10:
  4262. { }
  4263. }
  4264. cutIf7:
  4265. cutIf4:
  4266. cutIf1:
  4267. { }
  4268. }
  4269. }
  4270. }
  4271. public static IEnumerable<bool> read_char(object Char, object Quote, object Result, object Next)
  4272. {
  4273. {
  4274. Variable C1 = new Variable();
  4275. Variable C2 = new Variable();
  4276. Variable C3 = new Variable();
  4277. Variable Ch = new Variable();
  4278. if (YP.equal(Char, 92))
  4279. {
  4280. foreach (bool l3 in YP.get_code(C1))
  4281. {
  4282. if (YP.lessThan(C1, 0))
  4283. {
  4284. foreach (bool l5 in formatError(Atom.a("user_error"), Atom.a("~N** end of file in ~cquoted~c~n"), new ListPair(Quote, new ListPair(Quote, Atom.NIL))))
  4285. {
  4286. foreach (bool l6 in YP.unify(Result, -1))
  4287. {
  4288. foreach (bool l7 in YP.unify(Next, C1))
  4289. {
  4290. yield return false;
  4291. }
  4292. }
  4293. }
  4294. goto cutIf2;
  4295. }
  4296. if (YP.lessThanOrEqual(C1, new ListPair(32, Atom.NIL)))
  4297. {
  4298. foreach (bool l5 in YP.get_code(C2))
  4299. {
  4300. foreach (bool l6 in read_char(C2, Quote, Result, Next))
  4301. {
  4302. yield return false;
  4303. }
  4304. }
  4305. goto cutIf3;
  4306. }
  4307. if (YP.equal(YP.bitwiseOr(C1, 32), new ListPair(99, Atom.NIL)))
  4308. {
  4309. foreach (bool l5 in YP.get_code(C2))
  4310. {
  4311. foreach (bool l6 in read_char(C2, Quote, Result, Next))
  4312. {
  4313. yield return false;
  4314. }
  4315. }
  4316. goto cutIf4;
  4317. }
  4318. if (YP.lessThanOrEqual(C1, new ListPair(55, Atom.NIL)))
  4319. {
  4320. if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL)))
  4321. {
  4322. foreach (bool l6 in YP.get_code(C2))
  4323. {
  4324. if (YP.lessThanOrEqual(C2, new ListPair(55, Atom.NIL)))
  4325. {
  4326. if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL)))
  4327. {
  4328. foreach (bool l9 in YP.get_code(C3))
  4329. {
  4330. if (YP.lessThanOrEqual(C3, new ListPair(55, Atom.NIL)))
  4331. {
  4332. if (YP.greaterThanOrEqual(C3, new ListPair(48, Atom.NIL)))
  4333. {
  4334. foreach (bool l12 in YP.get_code(Next))
  4335. {
  4336. foreach (bool l13 in YP.unify(Result, YP.subtract(YP.add(YP.multiply(YP.add(YP.multiply(C1, 8), C2), 8), C3), YP.multiply(73, new ListPair(48, Atom.NIL)))))
  4337. {
  4338. yield return false;
  4339. }
  4340. }
  4341. goto cutIf7;
  4342. }
  4343. }
  4344. foreach (bool l10 in YP.unify(Next, C3))
  4345. {
  4346. foreach (bool l11 in YP.unify(Result, YP.subtract(YP.add(YP.multiply(C1, 8), C2), YP.multiply(9, new ListPair(48, Atom.NIL)))))
  4347. {
  4348. yield return false;
  4349. }
  4350. }
  4351. cutIf7:
  4352. { }
  4353. }
  4354. goto cutIf6;
  4355. }
  4356. }
  4357. foreach (bool l7 in YP.unify(Next, C2))
  4358. {
  4359. foreach (bool l8 in YP.unify(Result, YP.subtract(C1, new ListPair(48, Atom.NIL))))
  4360. {
  4361. yield return false;
  4362. }
  4363. }
  4364. cutIf6:
  4365. { }
  4366. }
  4367. goto cutIf5;
  4368. }
  4369. }
  4370. if (YP.equal(C1, new ListPair(94, Atom.NIL)))
  4371. {
  4372. foreach (bool l5 in YP.get_code(C2))
  4373. {
  4374. if (YP.lessThan(C2, 0))
  4375. {
  4376. foreach (bool l7 in formatError(Atom.a("user_error"), Atom.a("~N** end of file in ~c..~c^..~c~n"), ListPair.make(new object[] { Quote, 92, Quote })))
  4377. {
  4378. foreach (bool l8 in YP.unify(Result, -1))
  4379. {
  4380. foreach (bool l9 in YP.unify(Next, C2))
  4381. {
  4382. yield return false;
  4383. }
  4384. }
  4385. }
  4386. goto cutIf9;
  4387. }
  4388. if (YP.equal(C2, new ListPair(63, Atom.NIL)))
  4389. {
  4390. foreach (bool l7 in YP.unify(Result, 127))
  4391. {
  4392. foreach (bool l8 in YP.get_code(Next))
  4393. {
  4394. yield return false;
  4395. }
  4396. }
  4397. goto cutIf10;
  4398. }
  4399. foreach (bool l6 in YP.unify(Result, YP.bitwiseAnd(C2, 31)))
  4400. {
  4401. foreach (bool l7 in YP.get_code(Next))
  4402. {
  4403. yield return false;
  4404. }
  4405. }
  4406. cutIf10:
  4407. cutIf9:
  4408. { }
  4409. }
  4410. goto cutIf8;
  4411. }
  4412. foreach (bool l4 in escape_char(C1, Result))
  4413. {
  4414. foreach (bool l5 in YP.get_code(Next))
  4415. {
  4416. yield return false;
  4417. }
  4418. goto cutIf11;
  4419. }
  4420. foreach (bool l4 in YP.unify(Result, C1))
  4421. {
  4422. foreach (bool l5 in YP.get_code(Next))
  4423. {
  4424. yield return false;
  4425. }
  4426. }
  4427. cutIf11:
  4428. cutIf8:
  4429. cutIf5:
  4430. cutIf4:
  4431. cutIf3:
  4432. cutIf2:
  4433. { }
  4434. }
  4435. goto cutIf1;
  4436. }
  4437. if (YP.equal(Char, Quote))
  4438. {
  4439. foreach (bool l3 in YP.get_code(Ch))
  4440. {
  4441. if (YP.equal(Ch, Quote))
  4442. {
  4443. foreach (bool l5 in YP.unify(Result, Quote))
  4444. {
  4445. foreach (bool l6 in YP.get_code(Next))
  4446. {
  4447. yield return false;
  4448. }
  4449. }
  4450. goto cutIf13;
  4451. }
  4452. foreach (bool l4 in YP.unify(Result, -1))
  4453. {
  4454. foreach (bool l5 in YP.unify(Next, Ch))
  4455. {
  4456. yield return false;
  4457. }
  4458. }
  4459. cutIf13:
  4460. { }
  4461. }
  4462. goto cutIf12;
  4463. }
  4464. if (YP.lessThan(Char, new ListPair(32, Atom.NIL)))
  4465. {
  4466. if (YP.notEqual(Char, 9))
  4467. {
  4468. if (YP.notEqual(Char, 10))
  4469. {
  4470. if (YP.notEqual(Char, 13))
  4471. {
  4472. foreach (bool l6 in YP.unify(Result, -1))
  4473. {
  4474. foreach (bool l7 in YP.unify(Next, Char))
  4475. {
  4476. foreach (bool l8 in formatError(Atom.a("user_error"), Atom.a("~N** Strange character ~d ends ~ctoken~c~n"), ListPair.make(new object[] { Char, Quote, Quote })))
  4477. {
  4478. yield return false;
  4479. }
  4480. }
  4481. }
  4482. goto cutIf14;
  4483. }
  4484. }
  4485. }
  4486. }
  4487. foreach (bool l2 in YP.unify(Result, Char))
  4488. {
  4489. foreach (bool l3 in YP.get_code(Next))
  4490. {
  4491. yield return false;
  4492. }
  4493. }
  4494. cutIf14:
  4495. cutIf12:
  4496. cutIf1:
  4497. { }
  4498. }
  4499. }
  4500. #pragma warning restore 0168, 0219, 0162
  4501. }
  4502. }