Parser.cs 172 KB

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