omparser.tab.c 143 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015
  1. /* A Bison parser, made from omparser.y
  2. by GNU Bison version 1.28 */
  3. #define YYBISON 1 /* Identify Bison output. */
  4. #define OM_YYERROR 257
  5. #define OM_INT 258
  6. #define OM_FLOAT 259
  7. #define OM_BYTEARRAY 260
  8. #define OM_VAR 261
  9. #define OM_STRING 262
  10. #define OM_SYMBOL 263
  11. #define OM_APP 264
  12. #define OM_ENDAPP 265
  13. #define OM_ATP 266
  14. #define OM_ENDATP 267
  15. #define OM_ATTR 268
  16. #define OM_ENDATTR 269
  17. #define OM_BIND 270
  18. #define OM_ENDBIND 271
  19. #define OM_BVAR 272
  20. #define OM_ENDBVAR 273
  21. #define OM_ERROR 274
  22. #define OM_ENDERROR 275
  23. #define OM_OBJECT 276
  24. #define OM_ENDOBJECT 277
  25. #define OM_SYM_alg1_zero 278
  26. #define OM_SYM_alg1_one 279
  27. #define OM_SYM_arith1_abs 280
  28. #define OM_SYM_arith1_divide 281
  29. #define OM_SYM_arith1_gcd 282
  30. #define OM_SYM_arith1_lcm 283
  31. #define OM_SYM_arith1_minus 284
  32. #define OM_SYM_arith1_plus 285
  33. #define OM_SYM_arith1_power 286
  34. #define OM_SYM_arith1_product 287
  35. #define OM_SYM_arith1_root 288
  36. #define OM_SYM_arith1_sum 289
  37. #define OM_SYM_arith1_times 290
  38. #define OM_SYM_arith1_unary_minus 291
  39. #define OM_SYM_arith2_arg 292
  40. #define OM_SYM_arith2_inverse 293
  41. #define OM_SYM_arith2_times 294
  42. #define OM_SYM_bigfloat1_bigfloat 295
  43. #define OM_SYM_calculus1_defint 296
  44. #define OM_SYM_calculus1_diff 297
  45. #define OM_SYM_calculus1_int 298
  46. #define OM_SYM_calculus1_partialdiff 299
  47. #define OM_SYM_complex1_argument 300
  48. #define OM_SYM_complex1_complex_cartesian 301
  49. #define OM_SYM_complex1_complex_polar 302
  50. #define OM_SYM_complex1_conjugate 303
  51. #define OM_SYM_complex1_imaginary 304
  52. #define OM_SYM_complex1_real 305
  53. #define OM_SYM_fns1_domain 306
  54. #define OM_SYM_fns1_range 307
  55. #define OM_SYM_fns1_image 308
  56. #define OM_SYM_fns1_identity 309
  57. #define OM_SYM_fns1_inverse 310
  58. #define OM_SYM_fns1_lambda 311
  59. #define OM_SYM_fns1_left_compose 312
  60. #define OM_SYM_fns2_apply_to_list 313
  61. #define OM_SYM_fns2_kernel 314
  62. #define OM_SYM_fns2_right_compose 315
  63. #define OM_SYM_integer1_factorial 316
  64. #define OM_SYM_integer1_factorof 317
  65. #define OM_SYM_integer1_quotient 318
  66. #define OM_SYM_integer1_remainder 319
  67. #define OM_SYM_interval1_integer_interval 320
  68. #define OM_SYM_interval1_interval 321
  69. #define OM_SYM_interval1_interval_cc 322
  70. #define OM_SYM_interval1_interval_co 323
  71. #define OM_SYM_interval1_interval_oc 324
  72. #define OM_SYM_interval1_interval_oo 325
  73. #define OM_SYM_limit1_above 326
  74. #define OM_SYM_limit1_below 327
  75. #define OM_SYM_limit1_both_sides 328
  76. #define OM_SYM_limit1_limit 329
  77. #define OM_SYM_limit1_null 330
  78. #define OM_SYM_linalg1_determinant 331
  79. #define OM_SYM_linalg1_matrix_selector 332
  80. #define OM_SYM_linalg1_vector_selector 333
  81. #define OM_SYM_linalg1_transpose 334
  82. #define OM_SYM_linalg1_outerproduct 335
  83. #define OM_SYM_linalg1_scalarproduct 336
  84. #define OM_SYM_linalg1_vectorproduct 337
  85. #define OM_SYM_linalg2_matrix 338
  86. #define OM_SYM_linalg2_matrixrow 339
  87. #define OM_SYM_linalg2_vector 340
  88. #define OM_SYM_linalg3_matrix 341
  89. #define OM_SYM_linalg3_matrixcolumn 342
  90. #define OM_SYM_linalg3_vector 343
  91. #define OM_SYM_list1_list 344
  92. #define OM_SYM_list1_map 345
  93. #define OM_SYM_list1_suchthat 346
  94. #define OM_SYM_list2_cons 347
  95. #define OM_SYM_list2_first 348
  96. #define OM_SYM_list2_rest 349
  97. #define OM_SYM_logic1_and 350
  98. #define OM_SYM_logic1_false 351
  99. #define OM_SYM_logic1_implies 352
  100. #define OM_SYM_logic1_not 353
  101. #define OM_SYM_logic1_or 354
  102. #define OM_SYM_logic1_true 355
  103. #define OM_SYM_logic1_xor 356
  104. #define OM_SYM_logic1_equivalent 357
  105. #define OM_SYM_minmax1_max 358
  106. #define OM_SYM_minmax1_min 359
  107. #define OM_SYM_nums1_based_integer 360
  108. #define OM_SYM_nums1_e 361
  109. #define OM_SYM_nums1_gamma 362
  110. #define OM_SYM_nums1_i 363
  111. #define OM_SYM_nums1_infinity 364
  112. #define OM_SYM_nums1_NaN 365
  113. #define OM_SYM_nums1_pi 366
  114. #define OM_SYM_nums1_rational 367
  115. #define OM_SYM_relation1_eq 368
  116. #define OM_SYM_relation1_geq 369
  117. #define OM_SYM_relation1_gt 370
  118. #define OM_SYM_relation1_leq 371
  119. #define OM_SYM_relation1_lt 372
  120. #define OM_SYM_relation1_neq 373
  121. #define OM_SYM_relation1_approx 374
  122. #define OM_SYM_rounding1_ceiling 375
  123. #define OM_SYM_rounding1_floor 376
  124. #define OM_SYM_rounding1_trunc 377
  125. #define OM_SYM_rounding1_round 378
  126. #define OM_SYM_setname1_C 379
  127. #define OM_SYM_setname1_N 380
  128. #define OM_SYM_setname1_P 381
  129. #define OM_SYM_setname1_Q 382
  130. #define OM_SYM_setname1_R 383
  131. #define OM_SYM_setname1_Z 384
  132. #define OM_SYM_set1_cartesian_product 385
  133. #define OM_SYM_set1_emptyset 386
  134. #define OM_SYM_set1_in 387
  135. #define OM_SYM_set1_intersect 388
  136. #define OM_SYM_set1_map 389
  137. #define OM_SYM_set1_notin 390
  138. #define OM_SYM_set1_notprsubset 391
  139. #define OM_SYM_set1_notsubset 392
  140. #define OM_SYM_set1_prsubset 393
  141. #define OM_SYM_set1_set 394
  142. #define OM_SYM_set1_setdiff 395
  143. #define OM_SYM_set1_size 396
  144. #define OM_SYM_set1_subset 397
  145. #define OM_SYM_set1_suchthat 398
  146. #define OM_SYM_set1_union 399
  147. #define OM_SYM_transc1_arccos 400
  148. #define OM_SYM_transc1_arcsin 401
  149. #define OM_SYM_transc1_arctan 402
  150. #define OM_SYM_transc1_cos 403
  151. #define OM_SYM_transc1_cosh 404
  152. #define OM_SYM_transc1_cot 405
  153. #define OM_SYM_transc1_coth 406
  154. #define OM_SYM_transc1_csc 407
  155. #define OM_SYM_transc1_csch 408
  156. #define OM_SYM_transc1_exp 409
  157. #define OM_SYM_transc1_ln 410
  158. #define OM_SYM_transc1_log 411
  159. #define OM_SYM_transc1_sec 412
  160. #define OM_SYM_transc1_sech 413
  161. #define OM_SYM_transc1_sin 414
  162. #define OM_SYM_transc1_sinh 415
  163. #define OM_SYM_transc1_tan 416
  164. #define OM_SYM_transc1_tanh 417
  165. #define OM_SYM_transc1_arccosh 418
  166. #define OM_SYM_transc1_arccot 419
  167. #define OM_SYM_transc1_arccoth 420
  168. #define OM_SYM_transc1_arccsc 421
  169. #define OM_SYM_transc1_arccsch 422
  170. #define OM_SYM_transc1_arcsec 423
  171. #define OM_SYM_transc1_arcsech 424
  172. #define OM_SYM_transc1_arcsinh 425
  173. #define OM_SYM_transc1_arctanh 426
  174. #line 1 "omparser.y"
  175. #include <assert.h>
  176. #include <stdio.h>
  177. #include <stdlib.h>
  178. #include <stdarg.h>
  179. #include <string.h>
  180. #include <math.h>
  181. #include <float.h>
  182. #include <malloc.h>
  183. #include "machine.h"
  184. #include "tags.h"
  185. #include "cslerror.h"
  186. #include "externs.h"
  187. #include "entries.h"
  188. #include "arith.h"
  189. #include "read.h"
  190. #include <OM.h>
  191. #include <OMconn.h>
  192. #include "openmath.h"
  193. #define YYSTYPE Lisp_Object
  194. #define StrToLspM(S) qcar(Lmv_list(C_nil, Lintern(C_nil, make_string(S))))
  195. #define MkUndefSymM(x) make_undefined_symbol(x)
  196. /* Enable parser debugging. */
  197. #define YYDEBUG 0
  198. /* Prototypes for required parser interface functions. */
  199. int yyerror(char *);
  200. YYSTYPE yylex();
  201. /*
  202. * External CCL functions.
  203. */
  204. extern char *get_string_data(Lisp_Object name, char *why, int32 *l);
  205. /* Some global variables (yuk!). */
  206. static Lisp_Object ldev;
  207. static Lisp_Object inObj;
  208. /* End of preamble. */
  209. #ifndef YYSTYPE
  210. #define YYSTYPE int
  211. #endif
  212. #include <stdio.h>
  213. #ifndef __cplusplus
  214. #ifndef __STDC__
  215. #define const
  216. #endif
  217. #endif
  218. #define YYFINAL 649
  219. #define YYFLAG -32768
  220. #define YYNTBASE 173
  221. #define YYTRANSLATE(x) ((unsigned)(x) <= 426 ? yytranslate[x] : 251)
  222. static const short yytranslate[] = { 0,
  223. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  224. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  225. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  226. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  227. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  228. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  229. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  230. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  231. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  232. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  233. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  234. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  235. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  236. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  237. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  238. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  239. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  240. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  241. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  242. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  243. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  244. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  245. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  246. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  247. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  248. 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
  249. 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
  250. 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
  251. 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
  252. 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
  253. 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
  254. 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
  255. 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
  256. 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
  257. 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
  258. 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
  259. 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
  260. 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
  261. 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
  262. 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
  263. 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
  264. 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
  265. 167, 168, 169, 170, 171, 172
  266. };
  267. #if YYDEBUG != 0
  268. static const short yyprhs[] = { 0,
  269. 0, 4, 5, 9, 10, 13, 15, 17, 19, 21,
  270. 23, 25, 27, 29, 31, 38, 40, 47, 49, 56,
  271. 58, 65, 67, 74, 76, 83, 85, 87, 89, 91,
  272. 93, 95, 97, 99, 101, 103, 105, 107, 109, 111,
  273. 113, 115, 117, 119, 121, 123, 125, 127, 129, 131,
  274. 133, 135, 137, 139, 141, 143, 145, 147, 149, 151,
  275. 153, 155, 157, 159, 161, 163, 165, 167, 169, 171,
  276. 173, 175, 177, 179, 181, 183, 185, 187, 189, 191,
  277. 193, 195, 197, 199, 201, 203, 205, 207, 209, 211,
  278. 213, 215, 217, 219, 221, 223, 225, 227, 229, 231,
  279. 233, 235, 237, 239, 241, 243, 245, 247, 249, 251,
  280. 253, 255, 257, 259, 261, 263, 265, 267, 269, 271,
  281. 273, 275, 277, 279, 281, 283, 285, 287, 289, 291,
  282. 293, 295, 297, 299, 301, 303, 305, 307, 309, 311,
  283. 313, 315, 317, 319, 321, 323, 325, 327, 329, 331,
  284. 333, 335, 337, 339, 341, 343, 345, 347, 349, 351,
  285. 353, 355, 357, 359, 361, 363, 365, 367, 369, 371,
  286. 373, 375, 377, 379, 381, 383, 385, 387, 389, 391,
  287. 393, 395, 397, 399, 401, 403, 405, 407, 409, 411,
  288. 413, 415, 417, 419, 421, 423, 425, 427, 429, 431,
  289. 432, 435, 437, 439, 441, 449, 453, 462, 464, 466,
  290. 468, 470, 472, 474, 476, 478, 480, 482, 484, 486,
  291. 488, 490, 492, 494, 496, 498, 500, 502, 504, 506,
  292. 508, 510, 512, 514, 517, 521, 524, 527, 531, 533,
  293. 536, 540, 544, 548, 552, 554, 557, 560, 562, 565,
  294. 567, 570, 573, 576, 578, 581, 586, 590, 593, 596,
  295. 600, 606, 612, 614, 616, 618, 620, 622, 630, 633,
  296. 637, 641, 644, 647, 650, 653, 656, 659, 662, 665,
  297. 669, 673, 676, 680, 683, 687, 691, 695, 699, 703,
  298. 707, 711, 715, 719, 724, 729, 734, 739, 742, 745,
  299. 748, 749, 755, 758, 761, 764, 765, 771, 774, 779,
  300. 783, 786, 790, 794, 798, 801, 805, 809, 811, 813,
  301. 815, 817, 824, 832, 836, 839, 842, 844, 847, 849,
  302. 853, 856, 858, 861, 863, 865, 868, 872, 874, 877,
  303. 879, 882, 884, 887, 889, 892, 894, 897, 899, 902,
  304. 904, 907, 911, 915, 919, 923, 927, 931, 935, 939,
  305. 943, 946, 949, 952, 955, 959, 963, 967, 971, 975,
  306. 979, 982, 986, 990, 994, 997, 1000, 1002, 1006, 1010,
  307. 1013, 1016, 1019, 1022, 1025, 1028, 1031, 1034, 1037, 1040,
  308. 1043, 1047, 1050, 1053, 1056, 1059, 1062, 1065, 1068, 1071,
  309. 1074, 1077, 1080, 1083, 1086, 1089, 1092, 1095, 1099, 1108,
  310. 1110
  311. };
  312. static const short yyrhs[] = { 22,
  313. 176, 23, 0, 0, 183, 176, 174, 0, 0, 180,
  314. 175, 0, 177, 0, 178, 0, 179, 0, 180, 0,
  315. 181, 0, 182, 0, 210, 0, 248, 0, 4, 0,
  316. 14, 12, 174, 13, 4, 15, 0, 5, 0, 14,
  317. 12, 174, 13, 5, 15, 0, 6, 0, 14, 12,
  318. 174, 13, 6, 15, 0, 7, 0, 14, 12, 174,
  319. 13, 7, 15, 0, 8, 0, 14, 12, 174, 13,
  320. 8, 15, 0, 183, 0, 14, 12, 174, 13, 183,
  321. 15, 0, 9, 0, 184, 0, 185, 0, 186, 0,
  322. 187, 0, 188, 0, 189, 0, 190, 0, 191, 0,
  323. 192, 0, 193, 0, 194, 0, 197, 0, 195, 0,
  324. 196, 0, 198, 0, 199, 0, 200, 0, 201, 0,
  325. 202, 0, 203, 0, 204, 0, 205, 0, 206, 0,
  326. 207, 0, 24, 0, 25, 0, 26, 0, 27, 0,
  327. 28, 0, 29, 0, 30, 0, 31, 0, 32, 0,
  328. 33, 0, 34, 0, 35, 0, 36, 0, 37, 0,
  329. 38, 0, 39, 0, 40, 0, 41, 0, 42, 0,
  330. 43, 0, 44, 0, 45, 0, 46, 0, 47, 0,
  331. 48, 0, 49, 0, 50, 0, 51, 0, 55, 0,
  332. 56, 0, 57, 0, 58, 0, 52, 0, 53, 0,
  333. 54, 0, 59, 0, 60, 0, 61, 0, 62, 0,
  334. 63, 0, 64, 0, 65, 0, 66, 0, 67, 0,
  335. 68, 0, 69, 0, 70, 0, 71, 0, 72, 0,
  336. 73, 0, 74, 0, 75, 0, 76, 0, 84, 0,
  337. 85, 0, 86, 0, 87, 0, 88, 0, 89, 0,
  338. 77, 0, 78, 0, 79, 0, 80, 0, 81, 0,
  339. 82, 0, 83, 0, 90, 0, 91, 0, 92, 0,
  340. 93, 0, 94, 0, 95, 0, 96, 0, 97, 0,
  341. 98, 0, 99, 0, 100, 0, 101, 0, 102, 0,
  342. 103, 0, 104, 0, 105, 0, 106, 0, 107, 0,
  343. 108, 0, 109, 0, 110, 0, 111, 0, 112, 0,
  344. 113, 0, 114, 0, 115, 0, 116, 0, 117, 0,
  345. 118, 0, 119, 0, 120, 0, 121, 0, 122, 0,
  346. 123, 0, 124, 0, 125, 0, 126, 0, 127, 0,
  347. 128, 0, 129, 0, 130, 0, 131, 0, 132, 0,
  348. 135, 0, 142, 0, 144, 0, 133, 0, 134, 0,
  349. 136, 0, 137, 0, 138, 0, 139, 0, 140, 0,
  350. 141, 0, 143, 0, 145, 0, 146, 0, 147, 0,
  351. 148, 0, 149, 0, 150, 0, 151, 0, 152, 0,
  352. 153, 0, 154, 0, 155, 0, 156, 0, 157, 0,
  353. 158, 0, 159, 0, 160, 0, 161, 0, 162, 0,
  354. 163, 0, 164, 0, 165, 0, 166, 0, 167, 0,
  355. 168, 0, 169, 0, 170, 0, 171, 0, 172, 0,
  356. 0, 176, 208, 0, 180, 0, 182, 0, 210, 0,
  357. 16, 57, 18, 180, 19, 176, 17, 0, 10, 211,
  358. 11, 0, 14, 12, 174, 13, 10, 211, 11, 15,
  359. 0, 212, 0, 213, 0, 216, 0, 217, 0, 218,
  360. 0, 222, 0, 223, 0, 224, 0, 225, 0, 226,
  361. 0, 227, 0, 232, 0, 228, 0, 230, 0, 233,
  362. 0, 234, 0, 235, 0, 239, 0, 242, 0, 243,
  363. 0, 244, 0, 245, 0, 246, 0, 247, 0, 24,
  364. 0, 25, 0, 26, 176, 0, 27, 176, 176, 0,
  365. 28, 208, 0, 29, 208, 0, 30, 176, 176, 0,
  366. 31, 0, 31, 214, 0, 32, 176, 176, 0, 33,
  367. 176, 176, 0, 34, 176, 176, 0, 35, 176, 176,
  368. 0, 36, 0, 36, 215, 0, 37, 176, 0, 176,
  369. 0, 176, 214, 0, 176, 0, 176, 215, 0, 38,
  370. 176, 0, 39, 176, 0, 40, 0, 40, 215, 0,
  371. 41, 176, 176, 176, 0, 42, 219, 209, 0, 43,
  372. 209, 0, 44, 209, 0, 45, 176, 221, 0, 10,
  373. 66, 176, 176, 11, 0, 10, 220, 176, 176, 11,
  374. 0, 67, 0, 67, 0, 67, 0, 67, 0, 67,
  375. 0, 16, 57, 18, 175, 19, 176, 17, 0, 46,
  376. 176, 0, 47, 176, 176, 0, 48, 176, 176, 0,
  377. 49, 176, 0, 50, 176, 0, 51, 176, 0, 55,
  378. 176, 0, 56, 176, 0, 54, 176, 0, 53, 176,
  379. 0, 52, 176, 0, 58, 209, 209, 0, 59, 209,
  380. 176, 0, 60, 209, 0, 61, 209, 209, 0, 62,
  381. 176, 0, 63, 176, 176, 0, 64, 176, 176, 0,
  382. 65, 176, 176, 0, 66, 176, 176, 0, 67, 176,
  383. 176, 0, 68, 176, 176, 0, 69, 176, 176, 0,
  384. 70, 176, 176, 0, 71, 176, 176, 0, 75, 176,
  385. 72, 209, 0, 75, 176, 73, 209, 0, 75, 176,
  386. 74, 209, 0, 75, 176, 76, 209, 0, 84, 229,
  387. 0, 85, 208, 0, 86, 208, 0, 0, 10, 85,
  388. 208, 11, 229, 0, 87, 231, 0, 88, 208, 0,
  389. 89, 208, 0, 0, 10, 88, 208, 11, 231, 0,
  390. 77, 176, 0, 78, 176, 176, 176, 0, 79, 176,
  391. 176, 0, 80, 176, 0, 81, 176, 176, 0, 82,
  392. 176, 176, 0, 83, 176, 176, 0, 90, 208, 0,
  393. 91, 176, 176, 0, 92, 176, 176, 0, 180, 0,
  394. 182, 0, 210, 0, 0, 0, 14, 12, 174, 13,
  395. 0, 15, 0, 16, 57, 18, 180, 19, 176, 17,
  396. 0, 93, 176, 176, 0, 94, 176, 0, 95, 176,
  397. 0, 96, 0, 96, 236, 0, 97, 0, 98, 176,
  398. 176, 0, 99, 176, 0, 100, 0, 100, 237, 0,
  399. 101, 0, 102, 0, 102, 238, 0, 103, 176, 176,
  400. 0, 176, 0, 176, 236, 0, 176, 0, 176, 237,
  401. 0, 176, 0, 176, 238, 0, 104, 0, 104, 240,
  402. 0, 105, 0, 105, 241, 0, 176, 0, 176, 240,
  403. 0, 176, 0, 176, 241, 0, 106, 176, 176, 0,
  404. 113, 176, 176, 0, 114, 176, 176, 0, 115, 176,
  405. 176, 0, 116, 176, 176, 0, 117, 176, 176, 0,
  406. 118, 176, 176, 0, 119, 176, 176, 0, 120, 176,
  407. 176, 0, 121, 176, 0, 122, 176, 0, 123, 176,
  408. 0, 124, 176, 0, 133, 176, 176, 0, 134, 176,
  409. 176, 0, 136, 176, 176, 0, 137, 176, 176, 0,
  410. 138, 176, 176, 0, 139, 176, 176, 0, 140, 208,
  411. 0, 141, 176, 176, 0, 143, 176, 176, 0, 145,
  412. 176, 176, 0, 142, 176, 0, 131, 208, 0, 132,
  413. 0, 135, 176, 176, 0, 144, 176, 176, 0, 146,
  414. 176, 0, 147, 176, 0, 148, 176, 0, 149, 176,
  415. 0, 150, 176, 0, 151, 176, 0, 152, 176, 0,
  416. 153, 176, 0, 154, 176, 0, 155, 176, 0, 156,
  417. 176, 0, 157, 176, 176, 0, 158, 176, 0, 159,
  418. 176, 0, 160, 176, 0, 161, 176, 0, 162, 176,
  419. 0, 163, 176, 0, 164, 176, 0, 165, 176, 0,
  420. 166, 176, 0, 167, 176, 0, 168, 176, 0, 169,
  421. 176, 0, 170, 176, 0, 171, 176, 0, 172, 176,
  422. 0, 248, 208, 0, 16, 249, 17, 0, 14, 12,
  423. 174, 13, 16, 249, 17, 15, 0, 250, 0, 57,
  424. 18, 175, 19, 176, 0
  425. };
  426. #endif
  427. #if YYDEBUG != 0
  428. static const short yyrline[] = { 0,
  429. 296, 301, 303, 307, 310, 314, 316, 317, 318, 319,
  430. 320, 321, 322, 326, 329, 333, 336, 340, 343, 347,
  431. 350, 354, 357, 361, 364, 368, 370, 371, 372, 373,
  432. 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
  433. 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
  434. 396, 398, 401, 403, 404, 405, 406, 407, 408, 409,
  435. 410, 411, 412, 413, 416, 418, 419, 422, 426, 428,
  436. 429, 430, 433, 435, 436, 437, 438, 439, 442, 444,
  437. 445, 446, 447, 448, 449, 452, 454, 455, 458, 460,
  438. 461, 462, 465, 467, 468, 469, 470, 471, 474, 476,
  439. 477, 478, 479, 482, 484, 485, 488, 490, 491, 494,
  440. 496, 497, 498, 499, 500, 501, 504, 506, 507, 510,
  441. 512, 513, 516, 518, 519, 520, 521, 522, 523, 524,
  442. 527, 529, 532, 534, 535, 536, 537, 538, 539, 540,
  443. 543, 545, 546, 547, 548, 549, 550, 553, 555, 556,
  444. 557, 560, 562, 563, 564, 565, 566, 569, 571, 572,
  445. 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
  446. 583, 584, 587, 589, 590, 591, 592, 593, 594, 595,
  447. 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
  448. 606, 607, 608, 609, 610, 611, 612, 613, 614, 618,
  449. 621, 626, 635, 643, 651, 659, 662, 666, 668, 669,
  450. 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
  451. 680, 681, 682, 683, 684, 685, 686, 687, 688, 689,
  452. 690, 693, 696, 700, 706, 711, 716, 721, 726, 728,
  453. 730, 735, 740, 745, 750, 752, 754, 761, 764, 772,
  454. 775, 783, 789, 794, 796, 802, 810, 826, 828, 834,
  455. 882, 889, 903, 905, 906, 907, 908, 913, 921, 927,
  456. 932, 938, 943, 948, 957, 960, 962, 967, 972, 977,
  457. 1006, 1012, 1014, 1043, 1049, 1054, 1059, 1066, 1072, 1082,
  458. 1092, 1113, 1134, 1158, 1180, 1201, 1222, 1245, 1252, 1254,
  459. 1258, 1261, 1265, 1273, 1275, 1279, 1282, 1286, 1292, 1294,
  460. 1299, 1304, 1309, 1314, 1321, 1324, 1329, 1340, 1349, 1357,
  461. 1365, 1367, 1371, 1380, 1386, 1391, 1398, 1401, 1403, 1405,
  462. 1410, 1415, 1417, 1419, 1421, 1423, 1425, 1429, 1432, 1440,
  463. 1443, 1451, 1454, 1462, 1465, 1467, 1469, 1473, 1476, 1484,
  464. 1487, 1497, 1500, 1515, 1526, 1531, 1536, 1541, 1546, 1551,
  465. 1558, 1564, 1569, 1574, 1581, 1587, 1592, 1598, 1604, 1610,
  466. 1615, 1619, 1624, 1629, 1634, 1639, 1644, 1649, 1654, 1662,
  467. 1668, 1673, 1678, 1683, 1688, 1693, 1698, 1703, 1708, 1713,
  468. 1718, 1724, 1729, 1734, 1739, 1744, 1749, 1754, 1759, 1764,
  469. 1769, 1774, 1779, 1784, 1789, 1794, 1801, 1806, 1809, 1813,
  470. 1817
  471. };
  472. #endif
  473. #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
  474. static const char * const yytname[] = { "$","error","$undefined.","OM_YYERROR",
  475. "OM_INT","OM_FLOAT","OM_BYTEARRAY","OM_VAR","OM_STRING","OM_SYMBOL","OM_APP",
  476. "OM_ENDAPP","OM_ATP","OM_ENDATP","OM_ATTR","OM_ENDATTR","OM_BIND","OM_ENDBIND",
  477. "OM_BVAR","OM_ENDBVAR","OM_ERROR","OM_ENDERROR","OM_OBJECT","OM_ENDOBJECT","OM_SYM_alg1_zero",
  478. "OM_SYM_alg1_one","OM_SYM_arith1_abs","OM_SYM_arith1_divide","OM_SYM_arith1_gcd",
  479. "OM_SYM_arith1_lcm","OM_SYM_arith1_minus","OM_SYM_arith1_plus","OM_SYM_arith1_power",
  480. "OM_SYM_arith1_product","OM_SYM_arith1_root","OM_SYM_arith1_sum","OM_SYM_arith1_times",
  481. "OM_SYM_arith1_unary_minus","OM_SYM_arith2_arg","OM_SYM_arith2_inverse","OM_SYM_arith2_times",
  482. "OM_SYM_bigfloat1_bigfloat","OM_SYM_calculus1_defint","OM_SYM_calculus1_diff",
  483. "OM_SYM_calculus1_int","OM_SYM_calculus1_partialdiff","OM_SYM_complex1_argument",
  484. "OM_SYM_complex1_complex_cartesian","OM_SYM_complex1_complex_polar","OM_SYM_complex1_conjugate",
  485. "OM_SYM_complex1_imaginary","OM_SYM_complex1_real","OM_SYM_fns1_domain","OM_SYM_fns1_range",
  486. "OM_SYM_fns1_image","OM_SYM_fns1_identity","OM_SYM_fns1_inverse","OM_SYM_fns1_lambda",
  487. "OM_SYM_fns1_left_compose","OM_SYM_fns2_apply_to_list","OM_SYM_fns2_kernel",
  488. "OM_SYM_fns2_right_compose","OM_SYM_integer1_factorial","OM_SYM_integer1_factorof",
  489. "OM_SYM_integer1_quotient","OM_SYM_integer1_remainder","OM_SYM_interval1_integer_interval",
  490. "OM_SYM_interval1_interval","OM_SYM_interval1_interval_cc","OM_SYM_interval1_interval_co",
  491. "OM_SYM_interval1_interval_oc","OM_SYM_interval1_interval_oo","OM_SYM_limit1_above",
  492. "OM_SYM_limit1_below","OM_SYM_limit1_both_sides","OM_SYM_limit1_limit","OM_SYM_limit1_null",
  493. "OM_SYM_linalg1_determinant","OM_SYM_linalg1_matrix_selector","OM_SYM_linalg1_vector_selector",
  494. "OM_SYM_linalg1_transpose","OM_SYM_linalg1_outerproduct","OM_SYM_linalg1_scalarproduct",
  495. "OM_SYM_linalg1_vectorproduct","OM_SYM_linalg2_matrix","OM_SYM_linalg2_matrixrow",
  496. "OM_SYM_linalg2_vector","OM_SYM_linalg3_matrix","OM_SYM_linalg3_matrixcolumn",
  497. "OM_SYM_linalg3_vector","OM_SYM_list1_list","OM_SYM_list1_map","OM_SYM_list1_suchthat",
  498. "OM_SYM_list2_cons","OM_SYM_list2_first","OM_SYM_list2_rest","OM_SYM_logic1_and",
  499. "OM_SYM_logic1_false","OM_SYM_logic1_implies","OM_SYM_logic1_not","OM_SYM_logic1_or",
  500. "OM_SYM_logic1_true","OM_SYM_logic1_xor","OM_SYM_logic1_equivalent","OM_SYM_minmax1_max",
  501. "OM_SYM_minmax1_min","OM_SYM_nums1_based_integer","OM_SYM_nums1_e","OM_SYM_nums1_gamma",
  502. "OM_SYM_nums1_i","OM_SYM_nums1_infinity","OM_SYM_nums1_NaN","OM_SYM_nums1_pi",
  503. "OM_SYM_nums1_rational","OM_SYM_relation1_eq","OM_SYM_relation1_geq","OM_SYM_relation1_gt",
  504. "OM_SYM_relation1_leq","OM_SYM_relation1_lt","OM_SYM_relation1_neq","OM_SYM_relation1_approx",
  505. "OM_SYM_rounding1_ceiling","OM_SYM_rounding1_floor","OM_SYM_rounding1_trunc",
  506. "OM_SYM_rounding1_round","OM_SYM_setname1_C","OM_SYM_setname1_N","OM_SYM_setname1_P",
  507. "OM_SYM_setname1_Q","OM_SYM_setname1_R","OM_SYM_setname1_Z","OM_SYM_set1_cartesian_product",
  508. "OM_SYM_set1_emptyset","OM_SYM_set1_in","OM_SYM_set1_intersect","OM_SYM_set1_map",
  509. "OM_SYM_set1_notin","OM_SYM_set1_notprsubset","OM_SYM_set1_notsubset","OM_SYM_set1_prsubset",
  510. "OM_SYM_set1_set","OM_SYM_set1_setdiff","OM_SYM_set1_size","OM_SYM_set1_subset",
  511. "OM_SYM_set1_suchthat","OM_SYM_set1_union","OM_SYM_transc1_arccos","OM_SYM_transc1_arcsin",
  512. "OM_SYM_transc1_arctan","OM_SYM_transc1_cos","OM_SYM_transc1_cosh","OM_SYM_transc1_cot",
  513. "OM_SYM_transc1_coth","OM_SYM_transc1_csc","OM_SYM_transc1_csch","OM_SYM_transc1_exp",
  514. "OM_SYM_transc1_ln","OM_SYM_transc1_log","OM_SYM_transc1_sec","OM_SYM_transc1_sech",
  515. "OM_SYM_transc1_sin","OM_SYM_transc1_sinh","OM_SYM_transc1_tan","OM_SYM_transc1_tanh",
  516. "OM_SYM_transc1_arccosh","OM_SYM_transc1_arccot","OM_SYM_transc1_arccoth","OM_SYM_transc1_arccsc",
  517. "OM_SYM_transc1_arccsch","OM_SYM_transc1_arcsec","OM_SYM_transc1_arcsech","OM_SYM_transc1_arcsinh",
  518. "OM_SYM_transc1_arctanh","om_whole_object","om_attributes","om_variables","om_object",
  519. "om_integer","om_float","om_bytearray","om_variable","om_string","om_symbol",
  520. "om_symbol_inner","om_alg1_symbol","om_arith1_symbol","om_arith2_symbol","om_bigfloat1_symbol",
  521. "om_calculus1_symbol","om_complex1_symbol","om_fns1_symbol","om_fns2_symbol",
  522. "om_integer1_symbol","om_interval1_symbol","om_limit1_symbol","om_linalg2_symbol",
  523. "om_linalg3_symbol","om_linalg1_symbol","om_list1_symbol","om_list2_symbol",
  524. "om_logic1_symbol","om_minmax1_symbol","om_nums1_symbol","om_relation1_symbol",
  525. "om_rounding1_symbol","om_setname1_symbol","om_set1_symbol","om_transc1_symbol",
  526. "om_nary_args","om_unary_func","om_apply","om_apply_inner","om_apply_alg1_inner",
  527. "om_apply_arith1_inner","om_arith1_plus_args","om_arith1_times_args","om_apply_arith2_inner",
  528. "om_apply_bigfloat1_inner","om_apply_calculus1_inner","om_calculus1_interval",
  529. "om_calculus1_interval_symbol","om_calculus1_partialdiff_funcarg","om_apply_complex1_inner",
  530. "om_apply_fns1_inner","om_apply_fns2_inner","om_apply_integer1_inner","om_apply_interval1_inner",
  531. "om_apply_limit1_inner","om_apply_linalg2_inner","om_linalg2_matrix_args","om_apply_linalg3_inner",
  532. "om_linalg3_matrix_args","om_apply_linalg1_inner","om_apply_list1_inner","om_apply_list2_inner",
  533. "om_apply_logic1_inner","om_logic1_and_args","om_logic1_or_args","om_logic1_xor_args",
  534. "om_apply_minmax1_inner","om_minmax1_max_args","om_minmax1_min_args","om_apply_nums1_inner",
  535. "om_apply_relation1_inner","om_apply_rounding1_inner","om_apply_set1_inner",
  536. "om_apply_transc1_inner","om_apply_boundexpr_inner","om_bind","om_bind_inner",
  537. "om_bind_fns1_inner", NULL
  538. };
  539. #endif
  540. static const short yyr1[] = { 0,
  541. 173, 174, 174, 175, 175, 176, 176, 176, 176, 176,
  542. 176, 176, 176, 177, 177, 178, 178, 179, 179, 180,
  543. 180, 181, 181, 182, 182, 183, 183, 183, 183, 183,
  544. 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
  545. 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
  546. 184, 184, 185, 185, 185, 185, 185, 185, 185, 185,
  547. 185, 185, 185, 185, 186, 186, 186, 187, 188, 188,
  548. 188, 188, 189, 189, 189, 189, 189, 189, 190, 190,
  549. 190, 190, 190, 190, 190, 191, 191, 191, 192, 192,
  550. 192, 192, 193, 193, 193, 193, 193, 193, 194, 194,
  551. 194, 194, 194, 195, 195, 195, 196, 196, 196, 197,
  552. 197, 197, 197, 197, 197, 197, 198, 198, 198, 199,
  553. 199, 199, 200, 200, 200, 200, 200, 200, 200, 200,
  554. 201, 201, 202, 202, 202, 202, 202, 202, 202, 202,
  555. 203, 203, 203, 203, 203, 203, 203, 204, 204, 204,
  556. 204, 205, 205, 205, 205, 205, 205, 206, 206, 206,
  557. 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
  558. 206, 206, 207, 207, 207, 207, 207, 207, 207, 207,
  559. 207, 207, 207, 207, 207, 207, 207, 207, 207, 207,
  560. 207, 207, 207, 207, 207, 207, 207, 207, 207, 208,
  561. 208, 209, 209, 209, 209, 210, 210, 211, 211, 211,
  562. 211, 211, 211, 211, 211, 211, 211, 211, 211, 211,
  563. 211, 211, 211, 211, 211, 211, 211, 211, 211, 211,
  564. 211, 212, 212, 213, 213, 213, 213, 213, 213, 213,
  565. 213, 213, 213, 213, 213, 213, 213, 214, 214, 215,
  566. 215, 216, 216, 216, 216, 217, 218, 218, 218, 218,
  567. 219, 219, 220, 220, 220, 220, 220, 221, 222, 222,
  568. 222, 222, 222, 222, 223, 223, 223, 223, 223, 223,
  569. 224, 224, 224, 225, 225, 225, 225, 226, 226, 226,
  570. 226, 226, 226, 227, 227, 227, 227, 228, 228, 228,
  571. 229, 229, 230, 230, 230, 231, 231, 232, 232, 232,
  572. 232, 232, 232, 232, 233, 233, 233, -1, -1, -1,
  573. -1, -1, -1, 234, 234, 234, 235, 235, 235, 235,
  574. 235, 235, 235, 235, 235, 235, 235, 236, 236, 237,
  575. 237, 238, 238, 239, 239, 239, 239, 240, 240, 241,
  576. 241, 242, 242, 243, 243, 243, 243, 243, 243, 243,
  577. 244, 244, 244, 244, 245, 245, 245, 245, 245, 245,
  578. 245, 245, 245, 245, 245, 245, 245, 245, 245, 246,
  579. 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
  580. 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
  581. 246, 246, 246, 246, 246, 246, 247, 248, 248, 249,
  582. 250
  583. };
  584. static const short yyr2[] = { 0,
  585. 3, 0, 3, 0, 2, 1, 1, 1, 1, 1,
  586. 1, 1, 1, 1, 6, 1, 6, 1, 6, 1,
  587. 6, 1, 6, 1, 6, 1, 1, 1, 1, 1,
  588. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  589. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  590. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  591. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  592. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  593. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  594. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  595. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  596. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  597. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  598. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  599. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  600. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  601. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  602. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  603. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  604. 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
  605. 2, 1, 1, 1, 7, 3, 8, 1, 1, 1,
  606. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  607. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  608. 1, 1, 1, 2, 3, 2, 2, 3, 1, 2,
  609. 3, 3, 3, 3, 1, 2, 2, 1, 2, 1,
  610. 2, 2, 2, 1, 2, 4, 3, 2, 2, 3,
  611. 5, 5, 1, 1, 1, 1, 1, 7, 2, 3,
  612. 3, 2, 2, 2, 2, 2, 2, 2, 2, 3,
  613. 3, 2, 3, 2, 3, 3, 3, 3, 3, 3,
  614. 3, 3, 3, 4, 4, 4, 4, 2, 2, 2,
  615. 0, 5, 2, 2, 2, 0, 5, 2, 4, 3,
  616. 2, 3, 3, 3, 2, 3, 3, 1, 1, 1,
  617. 1, 6, 7, 3, 2, 2, 1, 2, 1, 3,
  618. 2, 1, 2, 1, 1, 2, 3, 1, 2, 1,
  619. 2, 1, 2, 1, 2, 1, 2, 1, 2, 1,
  620. 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  621. 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
  622. 2, 3, 3, 3, 2, 2, 1, 3, 3, 2,
  623. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  624. 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  625. 2, 2, 2, 2, 2, 2, 2, 3, 8, 1,
  626. 5
  627. };
  628. static const short yydefact[] = { 0,
  629. 0, 14, 16, 18, 20, 22, 26, 0, 0, 0,
  630. 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
  631. 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
  632. 71, 72, 73, 74, 75, 76, 77, 78, 83, 84,
  633. 85, 79, 80, 81, 82, 86, 87, 88, 89, 90,
  634. 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
  635. 101, 102, 103, 110, 111, 112, 113, 114, 115, 116,
  636. 104, 105, 106, 107, 108, 109, 117, 118, 119, 120,
  637. 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
  638. 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
  639. 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
  640. 151, 152, 153, 154, 155, 156, 157, 158, 159, 163,
  641. 164, 160, 165, 166, 167, 168, 169, 170, 161, 171,
  642. 162, 172, 173, 174, 175, 176, 177, 178, 179, 180,
  643. 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
  644. 191, 192, 193, 194, 195, 196, 197, 198, 199, 0,
  645. 6, 7, 8, 9, 10, 11, 24, 27, 28, 29,
  646. 30, 31, 32, 33, 34, 35, 36, 37, 39, 40,
  647. 38, 41, 42, 43, 44, 45, 46, 47, 48, 49,
  648. 50, 12, 13, 0, 232, 233, 0, 0, 200, 200,
  649. 0, 239, 0, 0, 0, 0, 245, 0, 0, 0,
  650. 254, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  651. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  652. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  653. 0, 0, 0, 0, 0, 0, 0, 0, 0, 301,
  654. 200, 200, 306, 200, 200, 200, 0, 0, 0, 0,
  655. 0, 327, 329, 0, 0, 332, 334, 335, 0, 344,
  656. 346, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  657. 0, 0, 0, 0, 200, 377, 0, 0, 0, 0,
  658. 0, 0, 0, 200, 0, 0, 0, 0, 0, 0,
  659. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  660. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  661. 0, 0, 0, 0, 0, 0, 0, 208, 209, 210,
  662. 211, 212, 213, 214, 215, 216, 217, 218, 220, 221,
  663. 219, 222, 223, 224, 225, 226, 227, 228, 229, 230,
  664. 231, 200, 2, 0, 0, 410, 1, 2, 234, 0,
  665. 200, 236, 237, 0, 248, 240, 0, 0, 0, 0,
  666. 250, 246, 247, 252, 253, 255, 0, 0, 0, 0,
  667. 0, 202, 203, 258, 204, 259, 0, 269, 0, 0,
  668. 272, 273, 274, 279, 278, 277, 275, 276, 0, 0,
  669. 282, 0, 284, 0, 0, 0, 0, 0, 0, 0,
  670. 0, 0, 0, 308, 0, 0, 311, 0, 0, 0,
  671. 0, 298, 299, 300, 0, 303, 304, 305, 315, 0,
  672. 0, 0, 325, 326, 338, 328, 0, 331, 340, 333,
  673. 342, 336, 0, 348, 345, 350, 347, 0, 0, 0,
  674. 0, 0, 0, 0, 0, 0, 361, 362, 363, 364,
  675. 376, 0, 0, 0, 0, 0, 0, 0, 371, 0,
  676. 375, 0, 0, 0, 380, 381, 382, 383, 384, 385,
  677. 386, 387, 388, 389, 390, 0, 392, 393, 394, 395,
  678. 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
  679. 406, 206, 407, 0, 0, 4, 408, 0, 235, 201,
  680. 238, 249, 241, 242, 243, 244, 251, 0, 0, 263,
  681. 0, 257, 2, 0, 0, 260, 270, 271, 280, 281,
  682. 283, 285, 286, 287, 288, 289, 290, 291, 292, 293,
  683. 0, 0, 0, 0, 0, 310, 312, 313, 314, 200,
  684. 200, 316, 317, 324, 339, 330, 341, 343, 337, 349,
  685. 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
  686. 365, 366, 378, 367, 368, 369, 370, 372, 373, 379,
  687. 374, 391, 0, 2, 0, 0, 4, 0, 256, 0,
  688. 0, 0, 0, 0, 294, 295, 296, 297, 309, 0,
  689. 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,
  690. 2, 0, 5, 0, 0, 0, 0, 4, 301, 306,
  691. 15, 17, 19, 21, 23, 0, 0, 25, 0, 411,
  692. 261, 262, 0, 0, 302, 307, 0, 0, 0, 0,
  693. 0, 207, 409, 205, 0, 268, 0, 0, 0
  694. };
  695. static const short yydefgoto[] = { 647,
  696. 504, 586, 361, 161, 162, 163, 164, 165, 166, 167,
  697. 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
  698. 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
  699. 188, 189, 190, 191, 362, 384, 192, 327, 328, 329,
  700. 366, 372, 330, 331, 332, 379, 521, 526, 333, 334,
  701. 335, 336, 337, 338, 339, 422, 340, 426, 341, 342,
  702. 343, 344, 436, 440, 442, 345, 445, 447, 346, 347,
  703. 348, 349, 350, 351, 193, 355, 356
  704. };
  705. static const short yypact[] = { -9,
  706. 617,-32768,-32768,-32768,-32768,-32768,-32768, 1441, 14, -30,
  707. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  708. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  709. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  710. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  711. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  712. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  713. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  714. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  715. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  716. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  717. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  718. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  719. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  720. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  721. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 5,
  722. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  723. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  724. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  725. -32768,-32768,-32768, 17,-32768,-32768, 617, 617, 617, 617,
  726. 617, 617, 617, 617, 617, 617, 617, 617, 617, 617,
  727. 617, 617, 20, 952, 952, 617, 617, 617, 617, 617,
  728. 617, 617, 617, 617, 617, 617, 617, 952, 952, 952,
  729. 952, 617, 617, 617, 617, 617, 617, 617, 617, 617,
  730. 617, 617, 617, 617, 617, 617, 617, 617, 617, 21,
  731. 617, 617, 23, 617, 617, 617, 617, 617, 617, 617,
  732. 617, 617,-32768, 617, 617, 617,-32768, 617, 617, 617,
  733. 617, 617, 617, 617, 617, 617, 617, 617, 617, 617,
  734. 617, 617, 617, 617, 617,-32768, 617, 617, 617, 617,
  735. 617, 617, 617, 617, 617, 617, 617, 617, 617, 617,
  736. 617, 617, 617, 617, 617, 617, 617, 617, 617, 617,
  737. 617, 617, 617, 617, 617, 617, 617, 617, 617, 617,
  738. 617, 617, 617, 617, 617, 617, 24,-32768,-32768,-32768,
  739. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  740. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  741. -32768, 617, 1282, 16, 19,-32768,-32768, 1282,-32768, 617,
  742. 617,-32768,-32768, 617, 617,-32768, 617, 617, 617, 617,
  743. 617,-32768,-32768,-32768,-32768,-32768, 617, -51, 952, 26,
  744. -18,-32768,-32768,-32768,-32768,-32768, 25,-32768, 617, 617,
  745. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 952, 617,
  746. -32768, 952,-32768, 617, 617, 617, 617, 617, 617, 617,
  747. 617, 617, -62,-32768, 617, 617,-32768, 617, 617, 617,
  748. -45,-32768,-32768,-32768, -46,-32768,-32768,-32768,-32768, 617,
  749. 617, 617,-32768,-32768, 617,-32768, 617,-32768, 617,-32768,
  750. 617,-32768, 617, 617,-32768, 617,-32768, 617, 617, 617,
  751. 617, 617, 617, 617, 617, 617,-32768,-32768,-32768,-32768,
  752. -32768, 617, 617, 617, 617, 617, 617, 617,-32768, 617,
  753. -32768, 617, 617, 617,-32768,-32768,-32768,-32768,-32768,-32768,
  754. -32768,-32768,-32768,-32768,-32768, 617,-32768,-32768,-32768,-32768,
  755. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  756. -32768,-32768,-32768, 30, 617, 18,-32768, 31,-32768,-32768,
  757. -32768,-32768,-32768,-32768,-32768,-32768,-32768, 617, 617,-32768,
  758. 617,-32768, 1282, 27, -11,-32768,-32768,-32768,-32768,-32768,
  759. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  760. 952, 952, 952, 952, 617,-32768,-32768,-32768,-32768, 617,
  761. 617,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  762. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  763. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  764. -32768,-32768, 786, 1282, 35, 29, 18, 33,-32768, 617,
  765. 617, 37, 18, 34,-32768,-32768,-32768,-32768,-32768, 40,
  766. 42, 39, 43, 47, 48, 49, 1441, -30, 51,-32768,
  767. 1282, 617,-32768, 44, 56, 1118, 50, 18, 21, 23,
  768. -32768,-32768,-32768,-32768,-32768, 57, 53,-32768, 58,-32768,
  769. -32768,-32768, 617, 54,-32768,-32768, 59, 60, 65, 66,
  770. 617,-32768,-32768,-32768, 67,-32768, 76, 77,-32768
  771. };
  772. static const short yypgoto[] = {-32768,
  773. -356, -581, -1,-32768,-32768,-32768, -50,-32768, -211, -239,
  774. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  775. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  776. -32768,-32768,-32768,-32768, -195, -150, -207, -525,-32768,-32768,
  777. -280, -202,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  778. -32768,-32768,-32768,-32768,-32768, -533,-32768, -532,-32768,-32768,
  779. -32768,-32768, -348, -350, -349,-32768, -353, -352,-32768,-32768,
  780. -32768,-32768,-32768,-32768, -7, -515,-32768
  781. };
  782. #define YYLAST 1613
  783. static const short yytable[] = { 160,
  784. 352, 508, 383, 383, 363, 613, 385, 385, 376, 541,
  785. 542, 543, 1, 544, 519, 520, 383, 383, 383, 383,
  786. 385, 385, 385, 385, 5, 353, 354, 357, 358, 378,
  787. 421, 585, 425, 506, 502, 507, 634, 523, 524, 550,
  788. 525, 551, 583, 588, 593, 594, 611, 612, 608, 616,
  789. 619, 618, 620, 621, 631, 423, 424, 622, 427, 428,
  790. 429, 623, 624, 625, 386, 628, 632, 637, 633, 638,
  791. 639, 605, 641, 642, 643, 648, 649, 399, 400, 401,
  792. 402, 626, 644, 646, 512, 635, 555, 636, 557, 461,
  793. 560, 558, 627, 561, 0, 0, 0, 0, 469, 0,
  794. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  795. 0, 0, 0, 505, 0, 0, 0, 0, 505, 0,
  796. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  797. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  798. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  799. 0, 0, 0, 0, 0, 0, 503, 0, 0, 0,
  800. 0, 0, 0, 382, 382, 510, 592, 383, 517, 0,
  801. 0, 385, 0, 0, 0, 0, 0, 382, 382, 382,
  802. 382, 0, 0, 0, 0, 0, 0, 383, 0, 0,
  803. 383, 385, 0, 0, 385, 359, 360, 0, 0, 364,
  804. 365, 367, 368, 369, 370, 371, 373, 374, 375, 371,
  805. 377, 0, 0, 0, 387, 388, 389, 390, 391, 392,
  806. 393, 394, 395, 396, 397, 398, 0, 610, 522, 0,
  807. 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
  808. 413, 414, 415, 416, 417, 418, 419, 420, 529, 0,
  809. 0, 531, 0, 0, 629, 430, 431, 432, 433, 434,
  810. 435, 0, 437, 438, 439, 0, 441, 443, 444, 446,
  811. 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
  812. 458, 459, 460, 505, 0, 462, 463, 464, 465, 466,
  813. 467, 468, 0, 470, 471, 472, 473, 474, 475, 476,
  814. 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
  815. 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
  816. 497, 498, 499, 500, 501, 0, 0, 0, 382, 383,
  817. 383, 383, 383, 385, 385, 385, 385, 0, 0, 0,
  818. 0, 0, 0, 609, 505, 0, 0, 0, 382, 0,
  819. 0, 382, 0, 0, 600, 601, 0, 0, 509, 0,
  820. 0, 0, 511, 365, 0, 513, 514, 515, 516, 371,
  821. 0, 505, 0, 0, 0, 518, 609, 0, 0, 0,
  822. 0, 0, 0, 0, 0, 0, 0, 527, 528, 0,
  823. 595, 596, 597, 598, 0, 0, 0, 0, 530, 0,
  824. 0, 0, 532, 533, 534, 535, 536, 537, 538, 539,
  825. 540, 0, 0, 545, 546, 0, 547, 548, 549, 0,
  826. 0, 0, 0, 0, 0, 0, 0, 0, 552, 553,
  827. 554, 0, 0, 435, 0, 556, 0, 439, 0, 441,
  828. 0, 559, 444, 0, 446, 0, 562, 563, 564, 565,
  829. 566, 567, 568, 569, 570, 587, 0, 0, 0, 0,
  830. 571, 572, 573, 574, 575, 576, 577, 0, 578, 0,
  831. 579, 580, 581, 0, 0, 0, 0, 0, 0, 0,
  832. 0, 0, 0, 0, 582, 0, 0, 0, 0, 0,
  833. 382, 382, 382, 382, 0, 0, 0, 0, 0, 0,
  834. 0, 0, 0, 584, 0, 0, 0, 0, 0, 0,
  835. 0, 0, 0, 0, 0, 0, 589, 590, 0, 591,
  836. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  837. 0, 0, 0, 0, 0, 0, 587, 0, 0, 0,
  838. 0, 0, 617, 599, 0, 0, 0, 0, 0, 0,
  839. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  840. 0, 0, 0, 0, 0, 0, 0, 587, 0, 0,
  841. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  842. 0, 0, 0, 0, 0, 0, 0, 0, 614, 615,
  843. 0, 0, 0, 0, 0, 0, 0, 0, 0, 352,
  844. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  845. 630, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  846. 2, 3, 4, 5, 6, 7, 8, 0, 0, 0,
  847. 9, 640, 10, 0, 0, 0, 0, 0, 0, 645,
  848. 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
  849. 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
  850. 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
  851. 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
  852. 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
  853. 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
  854. 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
  855. 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
  856. 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
  857. 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
  858. 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
  859. 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
  860. 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
  861. 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
  862. 151, 152, 153, 154, 155, 156, 157, 158, 159, 602,
  863. 603, 604, 605, 606, 7, 607, 0, 0, 0, 0,
  864. 0, 608, 0, 0, 0, 0, 0, 0, 0, 11,
  865. 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
  866. 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  867. 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
  868. 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
  869. 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
  870. 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
  871. 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
  872. 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
  873. 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
  874. 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
  875. 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
  876. 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
  877. 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
  878. 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
  879. 152, 153, 154, 155, 156, 157, 158, 159, 5, 0,
  880. 7, 8, 0, 0, 0, 380, 0, 381, 0, 0,
  881. 0, 0, 0, 0, 0, 11, 12, 13, 14, 15,
  882. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
  883. 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
  884. 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
  885. 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
  886. 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
  887. 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
  888. 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
  889. 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
  890. 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
  891. 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
  892. 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
  893. 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
  894. 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
  895. 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
  896. 156, 157, 158, 159, 605, 0, 7, 607, 0, 0,
  897. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  898. 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
  899. 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
  900. 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
  901. 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
  902. 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
  903. 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
  904. 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
  905. 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
  906. 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
  907. 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
  908. 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
  909. 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
  910. 130, 131, 132, 133, 134, 135, 136, 137, 138, 139,
  911. 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
  912. 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
  913. 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  914. 0, 0, 0, 0, 0, 11, 12, 13, 14, 15,
  915. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
  916. 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
  917. 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
  918. 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
  919. 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
  920. 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
  921. 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
  922. 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
  923. 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
  924. 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
  925. 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,
  926. 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
  927. 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
  928. 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
  929. 156, 157, 158, 159, 194, 0, 10, 0, 0, 0,
  930. 0, 0, 0, 0, 195, 196, 197, 198, 199, 200,
  931. 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
  932. 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
  933. 221, 222, 223, 224, 225, 226, 227, 0, 228, 229,
  934. 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
  935. 240, 241, 0, 0, 0, 242, 0, 243, 244, 245,
  936. 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
  937. 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
  938. 266, 267, 268, 269, 270, 271, 272, 0, 0, 0,
  939. 0, 0, 0, 273, 274, 275, 276, 277, 278, 279,
  940. 280, 281, 282, 283, 284, 0, 0, 0, 0, 0,
  941. 0, 285, 286, 287, 288, 289, 290, 291, 292, 293,
  942. 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
  943. 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
  944. 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
  945. 324, 325, 326
  946. };
  947. static const short yycheck[] = { 1,
  948. 8, 358, 214, 215, 200, 587, 214, 215, 211, 72,
  949. 73, 74, 22, 76, 66, 67, 228, 229, 230, 231,
  950. 228, 229, 230, 231, 7, 12, 57, 23, 12, 10,
  951. 10, 14, 10, 18, 11, 17, 618, 12, 57, 85,
  952. 16, 88, 13, 13, 18, 57, 12, 19, 16, 13,
  953. 11, 18, 11, 15, 11, 251, 252, 15, 254, 255,
  954. 256, 15, 15, 15, 215, 15, 11, 11, 19, 17,
  955. 13, 7, 19, 15, 15, 0, 0, 228, 229, 230,
  956. 231, 607, 17, 17, 365, 619, 435, 620, 439, 285,
  957. 444, 441, 608, 446, -1, -1, -1, -1, 294, -1,
  958. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  959. -1, -1, -1, 353, -1, -1, -1, -1, 358, -1,
  960. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  961. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  962. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  963. -1, -1, -1, -1, -1, -1, 352, -1, -1, -1,
  964. -1, -1, -1, 214, 215, 361, 523, 379, 371, -1,
  965. -1, 379, -1, -1, -1, -1, -1, 228, 229, 230,
  966. 231, -1, -1, -1, -1, -1, -1, 399, -1, -1,
  967. 402, 399, -1, -1, 402, 197, 198, -1, -1, 201,
  968. 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
  969. 212, -1, -1, -1, 216, 217, 218, 219, 220, 221,
  970. 222, 223, 224, 225, 226, 227, -1, 584, 379, -1,
  971. 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
  972. 242, 243, 244, 245, 246, 247, 248, 249, 399, -1,
  973. -1, 402, -1, -1, 611, 257, 258, 259, 260, 261,
  974. 262, -1, 264, 265, 266, -1, 268, 269, 270, 271,
  975. 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
  976. 282, 283, 284, 523, -1, 287, 288, 289, 290, 291,
  977. 292, 293, -1, 295, 296, 297, 298, 299, 300, 301,
  978. 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
  979. 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
  980. 322, 323, 324, 325, 326, -1, -1, -1, 379, 541,
  981. 542, 543, 544, 541, 542, 543, 544, -1, -1, -1,
  982. -1, -1, -1, 583, 584, -1, -1, -1, 399, -1,
  983. -1, 402, -1, -1, 550, 551, -1, -1, 360, -1,
  984. -1, -1, 364, 365, -1, 367, 368, 369, 370, 371,
  985. -1, 611, -1, -1, -1, 377, 616, -1, -1, -1,
  986. -1, -1, -1, -1, -1, -1, -1, 389, 390, -1,
  987. 541, 542, 543, 544, -1, -1, -1, -1, 400, -1,
  988. -1, -1, 404, 405, 406, 407, 408, 409, 410, 411,
  989. 412, -1, -1, 415, 416, -1, 418, 419, 420, -1,
  990. -1, -1, -1, -1, -1, -1, -1, -1, 430, 431,
  991. 432, -1, -1, 435, -1, 437, -1, 439, -1, 441,
  992. -1, 443, 444, -1, 446, -1, 448, 449, 450, 451,
  993. 452, 453, 454, 455, 456, 506, -1, -1, -1, -1,
  994. 462, 463, 464, 465, 466, 467, 468, -1, 470, -1,
  995. 472, 473, 474, -1, -1, -1, -1, -1, -1, -1,
  996. -1, -1, -1, -1, 486, -1, -1, -1, -1, -1,
  997. 541, 542, 543, 544, -1, -1, -1, -1, -1, -1,
  998. -1, -1, -1, 505, -1, -1, -1, -1, -1, -1,
  999. -1, -1, -1, -1, -1, -1, 518, 519, -1, 521,
  1000. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1001. -1, -1, -1, -1, -1, -1, 587, -1, -1, -1,
  1002. -1, -1, 593, 545, -1, -1, -1, -1, -1, -1,
  1003. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1004. -1, -1, -1, -1, -1, -1, -1, 618, -1, -1,
  1005. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1006. -1, -1, -1, -1, -1, -1, -1, -1, 590, 591,
  1007. -1, -1, -1, -1, -1, -1, -1, -1, -1, 607,
  1008. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1009. 612, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1010. 4, 5, 6, 7, 8, 9, 10, -1, -1, -1,
  1011. 14, 633, 16, -1, -1, -1, -1, -1, -1, 641,
  1012. 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
  1013. 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
  1014. 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
  1015. 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  1016. 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
  1017. 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
  1018. 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
  1019. 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
  1020. 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
  1021. 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
  1022. 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
  1023. 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
  1024. 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
  1025. 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
  1026. 164, 165, 166, 167, 168, 169, 170, 171, 172, 4,
  1027. 5, 6, 7, 8, 9, 10, -1, -1, -1, -1,
  1028. -1, 16, -1, -1, -1, -1, -1, -1, -1, 24,
  1029. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  1030. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  1031. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
  1032. 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
  1033. 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
  1034. 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
  1035. 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
  1036. 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
  1037. 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
  1038. 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
  1039. 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
  1040. 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
  1041. 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
  1042. 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
  1043. 165, 166, 167, 168, 169, 170, 171, 172, 7, -1,
  1044. 9, 10, -1, -1, -1, 14, -1, 16, -1, -1,
  1045. -1, -1, -1, -1, -1, 24, 25, 26, 27, 28,
  1046. 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
  1047. 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
  1048. 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
  1049. 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
  1050. 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
  1051. 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
  1052. 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
  1053. 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
  1054. 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
  1055. 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
  1056. 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
  1057. 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
  1058. 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
  1059. 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
  1060. 169, 170, 171, 172, 7, -1, 9, 10, -1, -1,
  1061. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1062. -1, 24, 25, 26, 27, 28, 29, 30, 31, 32,
  1063. 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
  1064. 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
  1065. 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
  1066. 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
  1067. 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
  1068. 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
  1069. 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
  1070. 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
  1071. 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
  1072. 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
  1073. 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
  1074. 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
  1075. 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
  1076. 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
  1077. 9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  1078. -1, -1, -1, -1, -1, 24, 25, 26, 27, 28,
  1079. 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
  1080. 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
  1081. 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
  1082. 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
  1083. 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
  1084. 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
  1085. 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
  1086. 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
  1087. 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
  1088. 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
  1089. 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
  1090. 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
  1091. 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
  1092. 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
  1093. 169, 170, 171, 172, 14, -1, 16, -1, -1, -1,
  1094. -1, -1, -1, -1, 24, 25, 26, 27, 28, 29,
  1095. 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
  1096. 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
  1097. 50, 51, 52, 53, 54, 55, 56, -1, 58, 59,
  1098. 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
  1099. 70, 71, -1, -1, -1, 75, -1, 77, 78, 79,
  1100. 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
  1101. 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
  1102. 100, 101, 102, 103, 104, 105, 106, -1, -1, -1,
  1103. -1, -1, -1, 113, 114, 115, 116, 117, 118, 119,
  1104. 120, 121, 122, 123, 124, -1, -1, -1, -1, -1,
  1105. -1, 131, 132, 133, 134, 135, 136, 137, 138, 139,
  1106. 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
  1107. 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
  1108. 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
  1109. 170, 171, 172
  1110. };
  1111. /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
  1112. #line 3 "/usr/lib/bison.simple"
  1113. /* This file comes from bison-1.28. */
  1114. /* Skeleton output parser for bison,
  1115. Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
  1116. This program is free software; you can redistribute it and/or modify
  1117. it under the terms of the GNU General Public License as published by
  1118. the Free Software Foundation; either version 2, or (at your option)
  1119. any later version.
  1120. This program is distributed in the hope that it will be useful,
  1121. but WITHOUT ANY WARRANTY; without even the implied warranty of
  1122. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1123. GNU General Public License for more details.
  1124. You should have received a copy of the GNU General Public License
  1125. along with this program; if not, write to the Free Software
  1126. Foundation, Inc., 59 Temple Place - Suite 330,
  1127. Boston, MA 02111-1307, USA. */
  1128. /* As a special exception, when this file is copied by Bison into a
  1129. Bison output file, you may use that output file without restriction.
  1130. This special exception was added by the Free Software Foundation
  1131. in version 1.24 of Bison. */
  1132. /* This is the parser code that is written into each bison parser
  1133. when the %semantic_parser declaration is not specified in the grammar.
  1134. It was written by Richard Stallman by simplifying the hairy parser
  1135. used when %semantic_parser is specified. */
  1136. #ifndef YYSTACK_USE_ALLOCA
  1137. #ifdef alloca
  1138. #define YYSTACK_USE_ALLOCA
  1139. #else /* alloca not defined */
  1140. #ifdef __GNUC__
  1141. #define YYSTACK_USE_ALLOCA
  1142. #define alloca __builtin_alloca
  1143. #else /* not GNU C. */
  1144. #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
  1145. #define YYSTACK_USE_ALLOCA
  1146. #include <alloca.h>
  1147. #else /* not sparc */
  1148. /* We think this test detects Watcom and Microsoft C. */
  1149. /* This used to test MSDOS, but that is a bad idea
  1150. since that symbol is in the user namespace. */
  1151. #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
  1152. #if 0 /* No need for malloc.h, which pollutes the namespace;
  1153. instead, just don't use alloca. */
  1154. #include <malloc.h>
  1155. #endif
  1156. #else /* not MSDOS, or __TURBOC__ */
  1157. #if defined(_AIX)
  1158. /* I don't know what this was needed for, but it pollutes the namespace.
  1159. So I turned it off. rms, 2 May 1997. */
  1160. /* #include <malloc.h> */
  1161. #pragma alloca
  1162. #define YYSTACK_USE_ALLOCA
  1163. #else /* not MSDOS, or __TURBOC__, or _AIX */
  1164. #if 0
  1165. #ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
  1166. and on HPUX 10. Eventually we can turn this on. */
  1167. #define YYSTACK_USE_ALLOCA
  1168. #define alloca __builtin_alloca
  1169. #endif /* __hpux */
  1170. #endif
  1171. #endif /* not _AIX */
  1172. #endif /* not MSDOS, or __TURBOC__ */
  1173. #endif /* not sparc */
  1174. #endif /* not GNU C */
  1175. #endif /* alloca not defined */
  1176. #endif /* YYSTACK_USE_ALLOCA not defined */
  1177. #ifdef YYSTACK_USE_ALLOCA
  1178. #define YYSTACK_ALLOC alloca
  1179. #else
  1180. #define YYSTACK_ALLOC malloc
  1181. #endif
  1182. /* Note: there must be only one dollar sign in this file.
  1183. It is replaced by the list of actions, each action
  1184. as one case of the switch. */
  1185. #define yyerrok (yyerrstatus = 0)
  1186. #define yyclearin (yychar = YYEMPTY)
  1187. #define YYEMPTY -2
  1188. #define YYEOF 0
  1189. #define YYACCEPT goto yyacceptlab
  1190. #define YYABORT goto yyabortlab
  1191. #define YYERROR goto yyerrlab1
  1192. /* Like YYERROR except do call yyerror.
  1193. This remains here temporarily to ease the
  1194. transition to the new meaning of YYERROR, for GCC.
  1195. Once GCC version 2 has supplanted version 1, this can go. */
  1196. #define YYFAIL goto yyerrlab
  1197. #define YYRECOVERING() (!!yyerrstatus)
  1198. #define YYBACKUP(token, value) \
  1199. do \
  1200. if (yychar == YYEMPTY && yylen == 1) \
  1201. { yychar = (token), yylval = (value); \
  1202. yychar1 = YYTRANSLATE (yychar); \
  1203. YYPOPSTACK; \
  1204. goto yybackup; \
  1205. } \
  1206. else \
  1207. { yyerror ("syntax error: cannot back up"); YYERROR; } \
  1208. while (0)
  1209. #define YYTERROR 1
  1210. #define YYERRCODE 256
  1211. #ifndef YYPURE
  1212. #define YYLEX yylex()
  1213. #endif
  1214. #ifdef YYPURE
  1215. #ifdef YYLSP_NEEDED
  1216. #ifdef YYLEX_PARAM
  1217. #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
  1218. #else
  1219. #define YYLEX yylex(&yylval, &yylloc)
  1220. #endif
  1221. #else /* not YYLSP_NEEDED */
  1222. #ifdef YYLEX_PARAM
  1223. #define YYLEX yylex(&yylval, YYLEX_PARAM)
  1224. #else
  1225. #define YYLEX yylex(&yylval)
  1226. #endif
  1227. #endif /* not YYLSP_NEEDED */
  1228. #endif
  1229. /* If nonreentrant, generate the variables here */
  1230. #ifndef YYPURE
  1231. int yychar; /* the lookahead symbol */
  1232. YYSTYPE yylval; /* the semantic value of the */
  1233. /* lookahead symbol */
  1234. #ifdef YYLSP_NEEDED
  1235. YYLTYPE yylloc; /* location data for the lookahead */
  1236. /* symbol */
  1237. #endif
  1238. int yynerrs; /* number of parse errors so far */
  1239. #endif /* not YYPURE */
  1240. #if YYDEBUG != 0
  1241. int yydebug; /* nonzero means print parse trace */
  1242. /* Since this is uninitialized, it does not stop multiple parsers
  1243. from coexisting. */
  1244. #endif
  1245. /* YYINITDEPTH indicates the initial size of the parser's stacks */
  1246. #ifndef YYINITDEPTH
  1247. #define YYINITDEPTH 200
  1248. #endif
  1249. /* YYMAXDEPTH is the maximum size the stacks can grow to
  1250. (effective only if the built-in stack extension method is used). */
  1251. #if YYMAXDEPTH == 0
  1252. #undef YYMAXDEPTH
  1253. #endif
  1254. #ifndef YYMAXDEPTH
  1255. #define YYMAXDEPTH 10000
  1256. #endif
  1257. /* Define __yy_memcpy. Note that the size argument
  1258. should be passed with type unsigned int, because that is what the non-GCC
  1259. definitions require. With GCC, __builtin_memcpy takes an arg
  1260. of type size_t, but it can handle unsigned int. */
  1261. #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
  1262. #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
  1263. #else /* not GNU C or C++ */
  1264. #ifndef __cplusplus
  1265. /* This is the most reliable way to avoid incompatibilities
  1266. in available built-in functions on various systems. */
  1267. static void
  1268. __yy_memcpy (to, from, count)
  1269. char *to;
  1270. char *from;
  1271. unsigned int count;
  1272. {
  1273. register char *f = from;
  1274. register char *t = to;
  1275. register int i = count;
  1276. while (i-- > 0)
  1277. *t++ = *f++;
  1278. }
  1279. #else /* __cplusplus */
  1280. /* This is the most reliable way to avoid incompatibilities
  1281. in available built-in functions on various systems. */
  1282. static void
  1283. __yy_memcpy (char *to, char *from, unsigned int count)
  1284. {
  1285. register char *t = to;
  1286. register char *f = from;
  1287. register int i = count;
  1288. while (i-- > 0)
  1289. *t++ = *f++;
  1290. }
  1291. #endif
  1292. #endif
  1293. #line 217 "/usr/lib/bison.simple"
  1294. /* The user can define YYPARSE_PARAM as the name of an argument to be passed
  1295. into yyparse. The argument should have type void *.
  1296. It should actually point to an object.
  1297. Grammar actions can access the variable by casting it
  1298. to the proper pointer type. */
  1299. #ifdef YYPARSE_PARAM
  1300. #ifdef __cplusplus
  1301. #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
  1302. #define YYPARSE_PARAM_DECL
  1303. #else /* not __cplusplus */
  1304. #define YYPARSE_PARAM_ARG YYPARSE_PARAM
  1305. #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
  1306. #endif /* not __cplusplus */
  1307. #else /* not YYPARSE_PARAM */
  1308. #define YYPARSE_PARAM_ARG
  1309. #define YYPARSE_PARAM_DECL
  1310. #endif /* not YYPARSE_PARAM */
  1311. /* Prevent warning if -Wstrict-prototypes. */
  1312. #ifdef __GNUC__
  1313. #ifdef YYPARSE_PARAM
  1314. int yyparse (void *);
  1315. #else
  1316. int yyparse (void);
  1317. #endif
  1318. #endif
  1319. int
  1320. yyparse(YYPARSE_PARAM_ARG)
  1321. YYPARSE_PARAM_DECL
  1322. {
  1323. register int yystate;
  1324. register int yyn;
  1325. register short *yyssp;
  1326. register YYSTYPE *yyvsp;
  1327. int yyerrstatus; /* number of tokens to shift before error messages enabled */
  1328. int yychar1 = 0; /* lookahead token as an internal (translated) token number */
  1329. short yyssa[YYINITDEPTH]; /* the state stack */
  1330. YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
  1331. short *yyss = yyssa; /* refer to the stacks thru separate pointers */
  1332. YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
  1333. #ifdef YYLSP_NEEDED
  1334. YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
  1335. YYLTYPE *yyls = yylsa;
  1336. YYLTYPE *yylsp;
  1337. #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
  1338. #else
  1339. #define YYPOPSTACK (yyvsp--, yyssp--)
  1340. #endif
  1341. int yystacksize = YYINITDEPTH;
  1342. int yyfree_stacks = 0;
  1343. #ifdef YYPURE
  1344. int yychar;
  1345. YYSTYPE yylval;
  1346. int yynerrs;
  1347. #ifdef YYLSP_NEEDED
  1348. YYLTYPE yylloc;
  1349. #endif
  1350. #endif
  1351. YYSTYPE yyval; /* the variable used to return */
  1352. /* semantic values from the action */
  1353. /* routines */
  1354. int yylen;
  1355. #if YYDEBUG != 0
  1356. if (yydebug)
  1357. fprintf(stderr, "Starting parse\n");
  1358. #endif
  1359. yystate = 0;
  1360. yyerrstatus = 0;
  1361. yynerrs = 0;
  1362. yychar = YYEMPTY; /* Cause a token to be read. */
  1363. /* Initialize stack pointers.
  1364. Waste one element of value and location stack
  1365. so that they stay on the same level as the state stack.
  1366. The wasted elements are never initialized. */
  1367. yyssp = yyss - 1;
  1368. yyvsp = yyvs;
  1369. #ifdef YYLSP_NEEDED
  1370. yylsp = yyls;
  1371. #endif
  1372. /* Push a new state, which is found in yystate . */
  1373. /* In all cases, when you get here, the value and location stacks
  1374. have just been pushed. so pushing a state here evens the stacks. */
  1375. yynewstate:
  1376. *++yyssp = yystate;
  1377. if (yyssp >= yyss + yystacksize - 1)
  1378. {
  1379. /* Give user a chance to reallocate the stack */
  1380. /* Use copies of these so that the &'s don't force the real ones into memory. */
  1381. YYSTYPE *yyvs1 = yyvs;
  1382. short *yyss1 = yyss;
  1383. #ifdef YYLSP_NEEDED
  1384. YYLTYPE *yyls1 = yyls;
  1385. #endif
  1386. /* Get the current used size of the three stacks, in elements. */
  1387. int size = yyssp - yyss + 1;
  1388. #ifdef yyoverflow
  1389. /* Each stack pointer address is followed by the size of
  1390. the data in use in that stack, in bytes. */
  1391. #ifdef YYLSP_NEEDED
  1392. /* This used to be a conditional around just the two extra args,
  1393. but that might be undefined if yyoverflow is a macro. */
  1394. yyoverflow("parser stack overflow",
  1395. &yyss1, size * sizeof (*yyssp),
  1396. &yyvs1, size * sizeof (*yyvsp),
  1397. &yyls1, size * sizeof (*yylsp),
  1398. &yystacksize);
  1399. #else
  1400. yyoverflow("parser stack overflow",
  1401. &yyss1, size * sizeof (*yyssp),
  1402. &yyvs1, size * sizeof (*yyvsp),
  1403. &yystacksize);
  1404. #endif
  1405. yyss = yyss1; yyvs = yyvs1;
  1406. #ifdef YYLSP_NEEDED
  1407. yyls = yyls1;
  1408. #endif
  1409. #else /* no yyoverflow */
  1410. /* Extend the stack our own way. */
  1411. if (yystacksize >= YYMAXDEPTH)
  1412. {
  1413. yyerror("parser stack overflow");
  1414. if (yyfree_stacks)
  1415. {
  1416. free (yyss);
  1417. free (yyvs);
  1418. #ifdef YYLSP_NEEDED
  1419. free (yyls);
  1420. #endif
  1421. }
  1422. return 2;
  1423. }
  1424. yystacksize *= 2;
  1425. if (yystacksize > YYMAXDEPTH)
  1426. yystacksize = YYMAXDEPTH;
  1427. #ifndef YYSTACK_USE_ALLOCA
  1428. yyfree_stacks = 1;
  1429. #endif
  1430. yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
  1431. __yy_memcpy ((char *)yyss, (char *)yyss1,
  1432. size * (unsigned int) sizeof (*yyssp));
  1433. yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
  1434. __yy_memcpy ((char *)yyvs, (char *)yyvs1,
  1435. size * (unsigned int) sizeof (*yyvsp));
  1436. #ifdef YYLSP_NEEDED
  1437. yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
  1438. __yy_memcpy ((char *)yyls, (char *)yyls1,
  1439. size * (unsigned int) sizeof (*yylsp));
  1440. #endif
  1441. #endif /* no yyoverflow */
  1442. yyssp = yyss + size - 1;
  1443. yyvsp = yyvs + size - 1;
  1444. #ifdef YYLSP_NEEDED
  1445. yylsp = yyls + size - 1;
  1446. #endif
  1447. #if YYDEBUG != 0
  1448. if (yydebug)
  1449. fprintf(stderr, "Stack size increased to %d\n", yystacksize);
  1450. #endif
  1451. if (yyssp >= yyss + yystacksize - 1)
  1452. YYABORT;
  1453. }
  1454. #if YYDEBUG != 0
  1455. if (yydebug)
  1456. fprintf(stderr, "Entering state %d\n", yystate);
  1457. #endif
  1458. goto yybackup;
  1459. yybackup:
  1460. /* Do appropriate processing given the current state. */
  1461. /* Read a lookahead token if we need one and don't already have one. */
  1462. /* yyresume: */
  1463. /* First try to decide what to do without reference to lookahead token. */
  1464. yyn = yypact[yystate];
  1465. if (yyn == YYFLAG)
  1466. goto yydefault;
  1467. /* Not known => get a lookahead token if don't already have one. */
  1468. /* yychar is either YYEMPTY or YYEOF
  1469. or a valid token in external form. */
  1470. if (yychar == YYEMPTY)
  1471. {
  1472. #if YYDEBUG != 0
  1473. if (yydebug)
  1474. fprintf(stderr, "Reading a token: ");
  1475. #endif
  1476. yychar = YYLEX;
  1477. }
  1478. /* Convert token to internal form (in yychar1) for indexing tables with */
  1479. if (yychar <= 0) /* This means end of input. */
  1480. {
  1481. yychar1 = 0;
  1482. yychar = YYEOF; /* Don't call YYLEX any more */
  1483. #if YYDEBUG != 0
  1484. if (yydebug)
  1485. fprintf(stderr, "Now at end of input.\n");
  1486. #endif
  1487. }
  1488. else
  1489. {
  1490. yychar1 = YYTRANSLATE(yychar);
  1491. #if YYDEBUG != 0
  1492. if (yydebug)
  1493. {
  1494. fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
  1495. /* Give the individual parser a way to print the precise meaning
  1496. of a token, for further debugging info. */
  1497. #ifdef YYPRINT
  1498. YYPRINT (stderr, yychar, yylval);
  1499. #endif
  1500. fprintf (stderr, ")\n");
  1501. }
  1502. #endif
  1503. }
  1504. yyn += yychar1;
  1505. if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
  1506. goto yydefault;
  1507. yyn = yytable[yyn];
  1508. /* yyn is what to do for this token type in this state.
  1509. Negative => reduce, -yyn is rule number.
  1510. Positive => shift, yyn is new state.
  1511. New state is final state => don't bother to shift,
  1512. just return success.
  1513. 0, or most negative number => error. */
  1514. if (yyn < 0)
  1515. {
  1516. if (yyn == YYFLAG)
  1517. goto yyerrlab;
  1518. yyn = -yyn;
  1519. goto yyreduce;
  1520. }
  1521. else if (yyn == 0)
  1522. goto yyerrlab;
  1523. if (yyn == YYFINAL)
  1524. YYACCEPT;
  1525. /* Shift the lookahead token. */
  1526. #if YYDEBUG != 0
  1527. if (yydebug)
  1528. fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
  1529. #endif
  1530. /* Discard the token being shifted unless it is eof. */
  1531. if (yychar != YYEOF)
  1532. yychar = YYEMPTY;
  1533. *++yyvsp = yylval;
  1534. #ifdef YYLSP_NEEDED
  1535. *++yylsp = yylloc;
  1536. #endif
  1537. /* count tokens shifted since error; after three, turn off error status. */
  1538. if (yyerrstatus) yyerrstatus--;
  1539. yystate = yyn;
  1540. goto yynewstate;
  1541. /* Do the default action for the current state. */
  1542. yydefault:
  1543. yyn = yydefact[yystate];
  1544. if (yyn == 0)
  1545. goto yyerrlab;
  1546. /* Do a reduction. yyn is the number of a rule to reduce with. */
  1547. yyreduce:
  1548. yylen = yyr2[yyn];
  1549. if (yylen > 0)
  1550. yyval = yyvsp[1-yylen]; /* implement default value of the action */
  1551. #if YYDEBUG != 0
  1552. if (yydebug)
  1553. {
  1554. int i;
  1555. fprintf (stderr, "Reducing via rule %d (line %d), ",
  1556. yyn, yyrline[yyn]);
  1557. /* Print the symbols being reduced, and their result. */
  1558. for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
  1559. fprintf (stderr, "%s ", yytname[yyrhs[i]]);
  1560. fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
  1561. }
  1562. #endif
  1563. switch (yyn) {
  1564. case 1:
  1565. #line 298 "omparser.y"
  1566. { yyval = yyvsp[-1]; inObj = yyvsp[-1]; YYACCEPT; ;
  1567. break;}
  1568. case 3:
  1569. #line 304 "omparser.y"
  1570. { /* TODO */ ;
  1571. break;}
  1572. case 4:
  1573. #line 309 "omparser.y"
  1574. { yyval = C_nil; ;
  1575. break;}
  1576. case 5:
  1577. #line 311 "omparser.y"
  1578. { yyval = cons(yyvsp[-1], yyvsp[0]); ;
  1579. break;}
  1580. case 14:
  1581. #line 328 "omparser.y"
  1582. { yyval = yyvsp[0]; ;
  1583. break;}
  1584. case 15:
  1585. #line 330 "omparser.y"
  1586. { yyval = yyvsp[-1]; ;
  1587. break;}
  1588. case 16:
  1589. #line 335 "omparser.y"
  1590. { yyval = yyvsp[0]; ;
  1591. break;}
  1592. case 17:
  1593. #line 337 "omparser.y"
  1594. { yyval = yyvsp[-1]; ;
  1595. break;}
  1596. case 18:
  1597. #line 342 "omparser.y"
  1598. { yyval = yyvsp[0]; ;
  1599. break;}
  1600. case 19:
  1601. #line 344 "omparser.y"
  1602. { yyval = yyvsp[-1]; ;
  1603. break;}
  1604. case 20:
  1605. #line 349 "omparser.y"
  1606. { yyval = yyvsp[0]; ;
  1607. break;}
  1608. case 21:
  1609. #line 351 "omparser.y"
  1610. { yyval = yyvsp[-1]; ;
  1611. break;}
  1612. case 22:
  1613. #line 356 "omparser.y"
  1614. { yyval = yyvsp[0]; ;
  1615. break;}
  1616. case 23:
  1617. #line 358 "omparser.y"
  1618. { yyval = yyvsp[-1]; ;
  1619. break;}
  1620. case 24:
  1621. #line 363 "omparser.y"
  1622. { yyval = yyvsp[0]; ;
  1623. break;}
  1624. case 25:
  1625. #line 365 "omparser.y"
  1626. { yyval = yyvsp[-1]; ;
  1627. break;}
  1628. case 200:
  1629. #line 620 "omparser.y"
  1630. { yyval = C_nil; ;
  1631. break;}
  1632. case 201:
  1633. #line 622 "omparser.y"
  1634. { yyval = cons(yyvsp[-1], yyvsp[0]); ;
  1635. break;}
  1636. case 202:
  1637. #line 630 "omparser.y"
  1638. { Lisp_Object var = MkUndefSymM("x");
  1639. push2(yyvsp[0],var);
  1640. yyval = list2(list2(yyvsp[0], var), var);
  1641. pop2(var,yyvsp[0]);
  1642. ;
  1643. break;}
  1644. case 203:
  1645. #line 638 "omparser.y"
  1646. { Lisp_Object var = MkUndefSymM("x");
  1647. push2(yyvsp[0],var);
  1648. yyval = list2(list2(yyvsp[0], var), var);
  1649. pop2(var,yyvsp[0]);
  1650. ;
  1651. break;}
  1652. case 204:
  1653. #line 646 "omparser.y"
  1654. { Lisp_Object var = MkUndefSymM("x");
  1655. push2(yyvsp[0],var);
  1656. yyval = list2(list2(yyvsp[0], var), var);
  1657. pop2(var,yyvsp[0]);
  1658. ;
  1659. break;}
  1660. case 205:
  1661. #line 653 "omparser.y"
  1662. { push2(yyvsp[-1], yyvsp[-3]);
  1663. yyval = list2(yyvsp[-1], yyvsp[-3]);
  1664. pop2(yyvsp[-3], yyvsp[-1]);
  1665. ;
  1666. break;}
  1667. case 206:
  1668. #line 661 "omparser.y"
  1669. { yyval = yyvsp[-1]; ;
  1670. break;}
  1671. case 207:
  1672. #line 663 "omparser.y"
  1673. { yyval = yyvsp[-2]; ;
  1674. break;}
  1675. case 232:
  1676. #line 695 "omparser.y"
  1677. { yyval = fixnum_of_int(0); ;
  1678. break;}
  1679. case 233:
  1680. #line 697 "omparser.y"
  1681. { yyval = fixnum_of_int(1); ;
  1682. break;}
  1683. case 234:
  1684. #line 702 "omparser.y"
  1685. { push2(yyvsp[-1],yyvsp[0]);
  1686. yyval = list2(yyvsp[-1], yyvsp[0]);
  1687. pop2(yyvsp[0], yyvsp[-1]);
  1688. ;
  1689. break;}
  1690. case 235:
  1691. #line 707 "omparser.y"
  1692. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1693. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1694. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  1695. ;
  1696. break;}
  1697. case 236:
  1698. #line 712 "omparser.y"
  1699. { push2(yyvsp[-1],yyvsp[0]);
  1700. yyval = list2(yyvsp[-1], yyvsp[0]);
  1701. pop2(yyvsp[0], yyvsp[-1]);
  1702. ;
  1703. break;}
  1704. case 237:
  1705. #line 717 "omparser.y"
  1706. { push2(yyvsp[-1],yyvsp[0]);
  1707. yyval = list2(yyvsp[-1], yyvsp[0]);
  1708. pop2(yyvsp[0], yyvsp[-1]);
  1709. ;
  1710. break;}
  1711. case 238:
  1712. #line 722 "omparser.y"
  1713. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1714. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1715. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  1716. ;
  1717. break;}
  1718. case 239:
  1719. #line 727 "omparser.y"
  1720. { yyval = fixnum_of_int(0); ;
  1721. break;}
  1722. case 240:
  1723. #line 729 "omparser.y"
  1724. { yyval = yyvsp[0]; ;
  1725. break;}
  1726. case 241:
  1727. #line 731 "omparser.y"
  1728. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1729. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1730. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  1731. ;
  1732. break;}
  1733. case 242:
  1734. #line 736 "omparser.y"
  1735. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1736. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1737. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  1738. ;
  1739. break;}
  1740. case 243:
  1741. #line 741 "omparser.y"
  1742. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1743. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1744. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  1745. ;
  1746. break;}
  1747. case 244:
  1748. #line 746 "omparser.y"
  1749. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1750. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1751. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  1752. ;
  1753. break;}
  1754. case 245:
  1755. #line 751 "omparser.y"
  1756. { yyval = yyvsp[0]; ;
  1757. break;}
  1758. case 246:
  1759. #line 753 "omparser.y"
  1760. { yyval = yyvsp[0]; ;
  1761. break;}
  1762. case 247:
  1763. #line 755 "omparser.y"
  1764. { push2(yyvsp[-1],yyvsp[0]);
  1765. yyval = list2(yyvsp[-1], yyvsp[0]);
  1766. pop2(yyvsp[0], yyvsp[-1]);
  1767. ;
  1768. break;}
  1769. case 248:
  1770. #line 763 "omparser.y"
  1771. { yyval = yyvsp[0]; ;
  1772. break;}
  1773. case 249:
  1774. #line 765 "omparser.y"
  1775. { Lisp_Object obj = StrToLspM("+");
  1776. push3(obj, yyvsp[-1], yyvsp[0]);
  1777. yyval = list3(obj, yyvsp[-1], yyvsp[0]);
  1778. pop3(yyvsp[0], yyvsp[-1], obj);
  1779. ;
  1780. break;}
  1781. case 250:
  1782. #line 774 "omparser.y"
  1783. { yyval = yyvsp[0]; ;
  1784. break;}
  1785. case 251:
  1786. #line 776 "omparser.y"
  1787. { Lisp_Object obj = StrToLspM("*");
  1788. push3(obj, yyvsp[-1], yyvsp[0]);
  1789. yyval = list3(obj, yyvsp[-1], yyvsp[0]);
  1790. pop3(yyvsp[0], yyvsp[-1], obj);
  1791. ;
  1792. break;}
  1793. case 252:
  1794. #line 785 "omparser.y"
  1795. { push2(yyvsp[-1], yyvsp[0]);
  1796. yyval = list2(yyvsp[-1], yyvsp[0]);
  1797. pop2(yyvsp[0], yyvsp[-1]);
  1798. ;
  1799. break;}
  1800. case 253:
  1801. #line 790 "omparser.y"
  1802. { push2(yyvsp[-1], yyvsp[0]);
  1803. yyval = list2(yyvsp[-1], yyvsp[0]);
  1804. pop2(yyvsp[0], yyvsp[-1]);
  1805. ;
  1806. break;}
  1807. case 254:
  1808. #line 795 "omparser.y"
  1809. { yyval = yyvsp[0]; ;
  1810. break;}
  1811. case 255:
  1812. #line 799 "omparser.y"
  1813. { yyval = yyvsp[0]; ;
  1814. break;}
  1815. case 256:
  1816. #line 804 "omparser.y"
  1817. { push4(yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1818. yyval = cons(yyvsp[-3], list3(yyvsp[-2], yyvsp[0], yyvsp[-1]));
  1819. pop4(yyvsp[0], yyvsp[-1], yyvsp[-2], yyvsp[-3]);
  1820. ;
  1821. break;}
  1822. case 257:
  1823. #line 812 "omparser.y"
  1824. {/* (|integrate| function range) */
  1825. /* FIXME: needs to treat more general cases as well... */
  1826. push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1827. yyval = list3(
  1828. yyvsp[-2],
  1829. qcar(yyvsp[0]),
  1830. list3(
  1831. StrToLspM("="),
  1832. qcar(qcdr(yyvsp[0])),
  1833. yyvsp[-1]
  1834. )
  1835. );
  1836. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  1837. ;
  1838. break;}
  1839. case 258:
  1840. #line 827 "omparser.y"
  1841. { yyval = cons(yyvsp[-1], yyvsp[0]); ;
  1842. break;}
  1843. case 259:
  1844. #line 829 "omparser.y"
  1845. { push2(yyvsp[-1], yyvsp[0]);
  1846. yyval = yyvsp[0];
  1847. yyval = cons(yyvsp[-1], yyvsp[0]);
  1848. pop2(yyvsp[0], yyvsp[-1]);
  1849. ;
  1850. break;}
  1851. case 260:
  1852. #line 835 "omparser.y"
  1853. {/* (|differentiate| function (|construct| vars...)) */
  1854. Lisp_Object varIndList, varList;
  1855. Lisp_Object funcObj, quoteObj;
  1856. push(yyvsp[-1]);
  1857. varIndList = Ceval(yyvsp[-1], C_nil);
  1858. pop(yyvsp[-1]);
  1859. push(yyvsp[0]);
  1860. varList = qcar(yyvsp[0]);
  1861. funcObj = qcar(qcdr(yyvsp[0]));
  1862. pop(yyvsp[0]);
  1863. /* Get names corresponding to variable indices.
  1864. */
  1865. quoteObj = StrToLspM("QUOTE");
  1866. push3(quoteObj, varList, varIndList);
  1867. varList = list3(
  1868. StrToLspM("MAPCAR"),
  1869. list2(
  1870. quoteObj,
  1871. list3(
  1872. StrToLspM("LAMBDA"),
  1873. cons(MkUndefSymM("i"), C_nil),
  1874. list3(
  1875. StrToLspM("NTH"),
  1876. list3(
  1877. StrToLspM("-"),
  1878. MkUndefSymM("i"),
  1879. fixnum_of_int(1)),
  1880. list2(quoteObj, varList)))),
  1881. list2(quoteObj, varIndList));
  1882. pop3(varIndList, varList, quoteObj);
  1883. push(varList);
  1884. varList = Ceval(varList, C_nil);
  1885. varList = cons(
  1886. StrToLspM("construct"),
  1887. varList);
  1888. pop(varList);
  1889. push3(yyvsp[-2], funcObj, varList);
  1890. yyval = list3(yyvsp[-2], funcObj, varList);
  1891. pop3(varList, funcObj, yyvsp[-2]);
  1892. ;
  1893. break;}
  1894. case 261:
  1895. #line 884 "omparser.y"
  1896. { /* (|segment| lo hi) */
  1897. push3(yyvsp[-3], yyvsp[-2], yyvsp[-1]);
  1898. yyval = list3(yyvsp[-3], yyvsp[-2], yyvsp[-1]);
  1899. pop3(yyvsp[-1], yyvsp[-2], yyvsp[-3]);
  1900. ;
  1901. break;}
  1902. case 262:
  1903. #line 890 "omparser.y"
  1904. { Lisp_Object segObj = StrToLspM("segment");
  1905. Lisp_Object coerceObj = StrToLspM("::");
  1906. Lisp_Object typeObj = list2(StrToLspM("Fraction"), StrToLspM("Integer"));
  1907. push3(segObj, coerceObj, typeObj);
  1908. yyval = list3(
  1909. segObj,
  1910. list3(coerceObj, yyvsp[-2], typeObj),
  1911. list3(coerceObj, yyvsp[-1], typeObj)
  1912. );
  1913. pop3(typeObj, coerceObj, segObj);
  1914. ;
  1915. break;}
  1916. case 268:
  1917. #line 915 "omparser.y"
  1918. { push2(yyvsp[-3], yyvsp[-1]);
  1919. yyval = list2(yyvsp[-3], yyvsp[-1]);
  1920. pop2(yyvsp[-1], yyvsp[-3]);
  1921. ;
  1922. break;}
  1923. case 269:
  1924. #line 923 "omparser.y"
  1925. { push2(yyvsp[-1], yyvsp[0]);
  1926. yyval = list2(yyvsp[-1], yyvsp[0]);
  1927. pop2(yyvsp[0], yyvsp[-1]);
  1928. ;
  1929. break;}
  1930. case 270:
  1931. #line 928 "omparser.y"
  1932. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1933. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1934. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  1935. ;
  1936. break;}
  1937. case 271:
  1938. #line 933 "omparser.y"
  1939. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  1940. /* Unhandled Symbol */
  1941. yyval = list3(yyvsp[-2], make_string("complex_polar"), make_string("complex1"));
  1942. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  1943. ;
  1944. break;}
  1945. case 272:
  1946. #line 939 "omparser.y"
  1947. { push2(yyvsp[-1], yyvsp[0]);
  1948. yyval = list2(yyvsp[-1], yyvsp[0]);
  1949. pop2(yyvsp[0], yyvsp[-1]);
  1950. ;
  1951. break;}
  1952. case 273:
  1953. #line 944 "omparser.y"
  1954. { push2(yyvsp[-1], yyvsp[0]);
  1955. yyval = list2(yyvsp[-1], yyvsp[0]);
  1956. pop2(yyvsp[0], yyvsp[-1]);
  1957. ;
  1958. break;}
  1959. case 274:
  1960. #line 949 "omparser.y"
  1961. { push2(yyvsp[-1], yyvsp[0]);
  1962. yyval = list2(yyvsp[-1], yyvsp[0]);
  1963. pop2(yyvsp[0], yyvsp[-1]);
  1964. ;
  1965. break;}
  1966. case 275:
  1967. #line 959 "omparser.y"
  1968. { yyval = yyvsp[0]; ;
  1969. break;}
  1970. case 276:
  1971. #line 961 "omparser.y"
  1972. { yyval = list3(yyvsp[-1], make_string("inverse"), make_string("fns1")); ;
  1973. break;}
  1974. case 277:
  1975. #line 963 "omparser.y"
  1976. { push2(yyvsp[-1], yyvsp[0]);
  1977. yyval = list3(yyvsp[-1], make_string("image"), make_string("fns1"));
  1978. pop2(yyvsp[-1], yyvsp[0]);
  1979. ;
  1980. break;}
  1981. case 278:
  1982. #line 968 "omparser.y"
  1983. { push2(yyvsp[-1], yyvsp[0]);
  1984. yyval = list3(yyvsp[-1], make_string("range"), make_string("fns1"));
  1985. pop2(yyvsp[-1], yyvsp[0]);
  1986. ;
  1987. break;}
  1988. case 279:
  1989. #line 973 "omparser.y"
  1990. { push2(yyvsp[-1], yyvsp[0]);
  1991. yyval = list3(yyvsp[-1], make_string("domain"), make_string("fns1"));
  1992. pop2(yyvsp[-1], yyvsp[0]);
  1993. ;
  1994. break;}
  1995. case 280:
  1996. #line 978 "omparser.y"
  1997. {/* (ADEF (bv2) (NIL NIL) (NIL NIL) (func1 (func2 bv2))) */
  1998. Lisp_Object types, bv1, bv2, func1, func2;
  1999. types = list2(C_nil, C_nil);
  2000. func1 = qcar(yyvsp[-1]);
  2001. bv1 = qcar(qcdr(yyvsp[-1]));
  2002. func2 = qcar(yyvsp[0]);
  2003. bv2 = qcar(qcdr(yyvsp[0]));
  2004. push3(func1, func2, bv1);
  2005. func1 = Ceval(
  2006. cons(
  2007. StrToLspM("SUBST"),
  2008. list3(
  2009. list2(StrToLspM("QUOTE"), func2),
  2010. list2(StrToLspM("QUOTE"), bv1),
  2011. list2(StrToLspM("QUOTE"), func1)
  2012. )
  2013. ),
  2014. C_nil
  2015. );
  2016. pop3(bv1, func2, func1);
  2017. push4(yyvsp[-2], bv2, types, func1);
  2018. yyval = cons(yyvsp[-2], cons(cons(bv2, C_nil), list3(types, types, func1)));
  2019. pop4(func1, types, bv2, yyvsp[-2]);
  2020. ;
  2021. break;}
  2022. case 281:
  2023. #line 1008 "omparser.y"
  2024. { push3(yyvsp[-2],yyvsp[-1],yyvsp[0]);
  2025. yyval = list3(yyvsp[-2],yyvsp[-1],yyvsp[0]);
  2026. pop3(yyvsp[0],yyvsp[-1],yyvsp[-2]);
  2027. ;
  2028. break;}
  2029. case 282:
  2030. #line 1013 "omparser.y"
  2031. {yyval = list3(yyvsp[-1], make_string("kernel"), make_string("fns2")); ;
  2032. break;}
  2033. case 283:
  2034. #line 1015 "omparser.y"
  2035. {/* (ADEF (bv1) (NIL NIL) (NIL NIL) (func2 (func1 bv1))) */
  2036. Lisp_Object types, bv1, bv2, func1, func2;
  2037. types = list2(C_nil, C_nil);
  2038. func1 = qcar(yyvsp[-1]);
  2039. bv1 = qcar(qcdr(yyvsp[-1]));
  2040. func2 = qcar(yyvsp[0]);
  2041. bv2 = qcar(qcdr(yyvsp[0]));
  2042. push3(func1, func2, bv2);
  2043. func1 = Ceval(
  2044. cons(
  2045. StrToLspM("SUBST"),
  2046. list3(
  2047. list2(StrToLspM("QUOTE"), func1),
  2048. list2(StrToLspM("QUOTE"), bv2),
  2049. list2(StrToLspM("QUOTE"), func2)
  2050. )
  2051. ),
  2052. C_nil
  2053. );
  2054. pop3(bv2, func2, func1);
  2055. push4(yyvsp[-2], bv2, types, func2);
  2056. yyval = cons(yyvsp[-2], cons(cons(bv1, C_nil), list3(types, types, func2)));
  2057. pop4(func2, types, bv2, yyvsp[-2]);
  2058. ;
  2059. break;}
  2060. case 284:
  2061. #line 1045 "omparser.y"
  2062. { push2(yyvsp[-1], yyvsp[0]);
  2063. yyval = list2(yyvsp[-1], yyvsp[0]);
  2064. pop2(yyvsp[0], yyvsp[-1]);
  2065. ;
  2066. break;}
  2067. case 285:
  2068. #line 1050 "omparser.y"
  2069. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2070. yyval = list3(yyvsp[-2], make_string("factorof"), make_string("integer1"));
  2071. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2072. ;
  2073. break;}
  2074. case 286:
  2075. #line 1055 "omparser.y"
  2076. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2077. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2078. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2079. ;
  2080. break;}
  2081. case 287:
  2082. #line 1060 "omparser.y"
  2083. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2084. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2085. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2086. ;
  2087. break;}
  2088. case 288:
  2089. #line 1068 "omparser.y"
  2090. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2091. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2092. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2093. ;
  2094. break;}
  2095. case 289:
  2096. #line 1073 "omparser.y"
  2097. { Lisp_Object interpObj = StrToLspM("@");
  2098. Lisp_Object typeObj = list2(
  2099. StrToLspM("Interval"),
  2100. StrToLspM("DoubleFloat")
  2101. );
  2102. push5(yyvsp[-2], yyvsp[-1], yyvsp[0], interpObj, typeObj);
  2103. yyval = list3(interpObj, list3(yyvsp[-2], yyvsp[-1], yyvsp[0]), typeObj);
  2104. pop5(typeObj, interpObj, yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2105. ;
  2106. break;}
  2107. case 290:
  2108. #line 1083 "omparser.y"
  2109. { Lisp_Object interpObj = StrToLspM("@");
  2110. Lisp_Object typeObj = list2(
  2111. StrToLspM("Interval"),
  2112. StrToLspM("DoubleFloat")
  2113. );
  2114. push5(yyvsp[-2], yyvsp[-1], yyvsp[0], interpObj, typeObj);
  2115. yyval = list3(interpObj, list3(yyvsp[-2], yyvsp[-1], yyvsp[0]), typeObj);
  2116. pop5(typeObj, interpObj, yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2117. ;
  2118. break;}
  2119. case 291:
  2120. #line 1093 "omparser.y"
  2121. { Lisp_Object interpObj = StrToLspM("@");
  2122. Lisp_Object typeObj = list2(
  2123. StrToLspM("Interval"),
  2124. StrToLspM("DoubleFloat")
  2125. );
  2126. double dLo = float_of_number(yyvsp[-1]);
  2127. double dHi = float_of_number(yyvsp[0]);
  2128. if (dLo > dHi) {
  2129. double dt = dLo;
  2130. dLo = dHi;
  2131. dHi = dt;
  2132. }
  2133. dHi -= DBL_EPSILON;
  2134. push3(yyvsp[-2], interpObj, typeObj);
  2135. yyval = list3(interpObj, list3(yyvsp[-2],
  2136. make_boxfloat(dLo, TYPE_DOUBLE_FLOAT),
  2137. make_boxfloat(dHi, TYPE_DOUBLE_FLOAT)
  2138. ), typeObj);
  2139. pop3(typeObj, interpObj, yyvsp[-2]);
  2140. ;
  2141. break;}
  2142. case 292:
  2143. #line 1114 "omparser.y"
  2144. { Lisp_Object interpObj = StrToLspM("@");
  2145. Lisp_Object typeObj = list2(
  2146. StrToLspM("Interval"),
  2147. StrToLspM("DoubleFloat")
  2148. );
  2149. double dLo = float_of_number(yyvsp[-1]);
  2150. double dHi = float_of_number(yyvsp[0]);
  2151. if (dLo > dHi) {
  2152. double dt = dLo;
  2153. dLo = dHi;
  2154. dHi = dt;
  2155. }
  2156. dLo += DBL_EPSILON;
  2157. push3(yyvsp[-2], interpObj, typeObj);
  2158. yyval = list3(interpObj, list3(yyvsp[-2],
  2159. make_boxfloat(dLo, TYPE_DOUBLE_FLOAT),
  2160. make_boxfloat(dHi, TYPE_DOUBLE_FLOAT)
  2161. ), typeObj);
  2162. pop3(typeObj, interpObj, yyvsp[-2]);
  2163. ;
  2164. break;}
  2165. case 293:
  2166. #line 1135 "omparser.y"
  2167. { Lisp_Object interpObj = StrToLspM("@");
  2168. Lisp_Object typeObj = list2(
  2169. StrToLspM("Interval"),
  2170. StrToLspM("DoubleFloat")
  2171. );
  2172. double dLo = float_of_number(yyvsp[-1]);
  2173. double dHi = float_of_number(yyvsp[0]);
  2174. if (dLo > dHi) {
  2175. double dt = dLo;
  2176. dLo = dHi;
  2177. dHi = dt;
  2178. }
  2179. dLo += DBL_EPSILON;
  2180. dHi -= DBL_EPSILON;
  2181. push3(yyvsp[-2], interpObj, typeObj);
  2182. yyval = list3(interpObj, list3(yyvsp[-2],
  2183. make_boxfloat(dLo, TYPE_DOUBLE_FLOAT),
  2184. make_boxfloat(dHi, TYPE_DOUBLE_FLOAT)
  2185. ), typeObj);
  2186. pop3(typeObj, interpObj, yyvsp[-2]);
  2187. ;
  2188. break;}
  2189. case 294:
  2190. #line 1160 "omparser.y"
  2191. {/* (|limit| func (|=| var limiting_val) "right") */
  2192. Lisp_Object limitVal;
  2193. push2(yyvsp[0], yyvsp[-2]);
  2194. limitVal = list3(
  2195. StrToLspM("="),
  2196. qcar(qcdr(yyvsp[0])),
  2197. list3(
  2198. StrToLspM("::"),
  2199. yyvsp[-2],
  2200. list2(
  2201. StrToLspM("Fraction"),
  2202. StrToLspM("Integer")
  2203. )
  2204. )
  2205. );
  2206. pop2(yyvsp[-2], yyvsp[0]);
  2207. push2(yyvsp[-3], yyvsp[0]);
  2208. yyval = cons(yyvsp[-3], list3(qcar(yyvsp[0]), limitVal, make_string("right")));
  2209. pop2(yyvsp[0], yyvsp[-3]);
  2210. ;
  2211. break;}
  2212. case 295:
  2213. #line 1181 "omparser.y"
  2214. {/* (|limit| func (|=| var limiting_val) "left") */
  2215. Lisp_Object limitVal;
  2216. push2(yyvsp[0], yyvsp[-2]);
  2217. limitVal = list3(
  2218. StrToLspM("="),
  2219. qcar(qcdr(yyvsp[0])),
  2220. list3(
  2221. StrToLspM("::"),
  2222. yyvsp[-2],
  2223. list2(
  2224. StrToLspM("Fraction"),
  2225. StrToLspM("Integer")
  2226. )
  2227. )
  2228. );
  2229. pop2(yyvsp[-2], yyvsp[0]);
  2230. push2(yyvsp[-3], yyvsp[0]);
  2231. yyval = cons(yyvsp[-3], list3(qcar(yyvsp[0]), limitVal, make_string("left")));
  2232. pop2(yyvsp[0], yyvsp[-3]);
  2233. ;
  2234. break;}
  2235. case 296:
  2236. #line 1202 "omparser.y"
  2237. {/* (|limit| func (|=| var limiting_val)) */
  2238. Lisp_Object limitVal;
  2239. push2(yyvsp[0], yyvsp[-2]);
  2240. limitVal = list3(
  2241. StrToLspM("="),
  2242. qcar(qcdr(yyvsp[0])),
  2243. list3(
  2244. StrToLspM("::"),
  2245. yyvsp[-2],
  2246. list2(
  2247. StrToLspM("Fraction"),
  2248. StrToLspM("Integer")
  2249. )
  2250. )
  2251. );
  2252. pop2(yyvsp[-2], yyvsp[0]);
  2253. push2(yyvsp[-3], yyvsp[0]);
  2254. yyval = list3(yyvsp[-3], qcar(yyvsp[0]), limitVal);
  2255. pop2(yyvsp[0], yyvsp[-3]);
  2256. ;
  2257. break;}
  2258. case 297:
  2259. #line 1223 "omparser.y"
  2260. {/* (|limit| func (|=| var limiting_val)) */
  2261. Lisp_Object limitVal;
  2262. push2(yyvsp[0], yyvsp[-2]);
  2263. limitVal = list3(
  2264. StrToLspM("="),
  2265. qcar(qcdr(yyvsp[0])),
  2266. list3(
  2267. StrToLspM("::"),
  2268. yyvsp[-2],
  2269. list2(
  2270. StrToLspM("Fraction"),
  2271. StrToLspM("Integer")
  2272. )
  2273. )
  2274. );
  2275. pop2(yyvsp[-2], yyvsp[0]);
  2276. push2(yyvsp[-3], yyvsp[0]);
  2277. yyval = list3(yyvsp[-3], qcar(yyvsp[0]), limitVal);
  2278. pop2(yyvsp[0], yyvsp[-3]);
  2279. ;
  2280. break;}
  2281. case 298:
  2282. #line 1247 "omparser.y"
  2283. { Lisp_Object obj = StrToLspM("construct");
  2284. push2(yyvsp[-1], yyvsp[0]);
  2285. yyval = list2(yyvsp[-1], cons(obj, yyvsp[0]));
  2286. pop2(yyvsp[0], yyvsp[-1]);
  2287. ;
  2288. break;}
  2289. case 299:
  2290. #line 1253 "omparser.y"
  2291. { yyval = cons(yyvsp[-1], yyvsp[0]); ;
  2292. break;}
  2293. case 300:
  2294. #line 1255 "omparser.y"
  2295. { yyval = cons(yyvsp[-1], yyvsp[0]); ;
  2296. break;}
  2297. case 301:
  2298. #line 1260 "omparser.y"
  2299. { yyval = C_nil; ;
  2300. break;}
  2301. case 302:
  2302. #line 1262 "omparser.y"
  2303. { yyval = cons(cons(yyvsp[-3], yyvsp[-2]), yyvsp[0]); ;
  2304. break;}
  2305. case 303:
  2306. #line 1267 "omparser.y"
  2307. { Lisp_Object cns = StrToLspM("construct");
  2308. Lisp_Object trn = StrToLspM("transpose");
  2309. push4(trn, yyvsp[-1], cns, yyvsp[0]);
  2310. yyval = list2(trn, list2(yyvsp[-1], cons(cns, yyvsp[0])));
  2311. pop4(yyvsp[0], cns, yyvsp[-1], trn);
  2312. ;
  2313. break;}
  2314. case 304:
  2315. #line 1274 "omparser.y"
  2316. { yyval = cons(yyvsp[-1], yyvsp[0]); ;
  2317. break;}
  2318. case 305:
  2319. #line 1276 "omparser.y"
  2320. { yyval = cons(yyvsp[-1], yyvsp[0]); ;
  2321. break;}
  2322. case 306:
  2323. #line 1281 "omparser.y"
  2324. { yyval = C_nil; ;
  2325. break;}
  2326. case 307:
  2327. #line 1283 "omparser.y"
  2328. { yyval = cons( cons(yyvsp[-3], yyvsp[-2]), yyvsp[0] ); ;
  2329. break;}
  2330. case 308:
  2331. #line 1288 "omparser.y"
  2332. { push2(yyvsp[-1], yyvsp[0]);
  2333. yyval = list2(yyvsp[-1], yyvsp[0]);
  2334. pop2(yyvsp[0], yyvsp[-1]);
  2335. ;
  2336. break;}
  2337. case 309:
  2338. #line 1293 "omparser.y"
  2339. { yyval = cons(yyvsp[-3], list3(yyvsp[-1], yyvsp[0], yyvsp[-2])); ;
  2340. break;}
  2341. case 310:
  2342. #line 1295 "omparser.y"
  2343. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2344. yyval = list3(yyvsp[-2], yyvsp[0], yyvsp[-1]);
  2345. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2346. ;
  2347. break;}
  2348. case 311:
  2349. #line 1300 "omparser.y"
  2350. { push2(yyvsp[-1], yyvsp[0]);
  2351. yyval = list2(yyvsp[-1], yyvsp[0]);
  2352. pop2(yyvsp[0], yyvsp[-1]);
  2353. ;
  2354. break;}
  2355. case 312:
  2356. #line 1305 "omparser.y"
  2357. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2358. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2359. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2360. ;
  2361. break;}
  2362. case 313:
  2363. #line 1310 "omparser.y"
  2364. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2365. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2366. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2367. ;
  2368. break;}
  2369. case 314:
  2370. #line 1315 "omparser.y"
  2371. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2372. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2373. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2374. ;
  2375. break;}
  2376. case 315:
  2377. #line 1323 "omparser.y"
  2378. { yyval = cons(yyvsp[-1], yyvsp[0]); ;
  2379. break;}
  2380. case 316:
  2381. #line 1325 "omparser.y"
  2382. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2383. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2384. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2385. ;
  2386. break;}
  2387. case 317:
  2388. #line 1330 "omparser.y"
  2389. { /* Deliberately swap arguments for AXIOM */
  2390. push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2391. yyval = list3(yyvsp[-2], yyvsp[0], yyvsp[-1]);
  2392. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2393. ;
  2394. break;}
  2395. case 318:
  2396. #line 1344 "omparser.y"
  2397. { Lisp_Object var = MkUndefSymM("x");
  2398. push2(yyvsp[0], var);
  2399. yyval = list2(var, list2(yyvsp[0], var));
  2400. pop2(var, yyvsp[0]);
  2401. ;
  2402. break;}
  2403. case 319:
  2404. #line 1352 "omparser.y"
  2405. { Lisp_Object var = MkUndefSymM("x");
  2406. push2(yyvsp[0], var);
  2407. yyval = list2(var, list2(yyvsp[0], var));
  2408. pop2(var, yyvsp[0]);
  2409. ;
  2410. break;}
  2411. case 320:
  2412. #line 1360 "omparser.y"
  2413. { Lisp_Object var = MkUndefSymM("x");
  2414. push2(yyvsp[0], var);
  2415. yyval = list2(var, list2(yyvsp[0], var));
  2416. pop2(var, yyvsp[0]);
  2417. ;
  2418. break;}
  2419. case 321:
  2420. #line 1366 "omparser.y"
  2421. { yyval = yyvsp[0]; ;
  2422. break;}
  2423. case 322:
  2424. #line 1368 "omparser.y"
  2425. { yyval = yyvsp[-1]; ;
  2426. break;}
  2427. case 323:
  2428. #line 1374 "omparser.y"
  2429. { push2(yyvsp[-3], yyvsp[-1]);
  2430. yyval = list2(yyvsp[-3], yyvsp[-1]);
  2431. pop2(yyvsp[-1], yyvsp[-3]);
  2432. ;
  2433. break;}
  2434. case 324:
  2435. #line 1382 "omparser.y"
  2436. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2437. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2438. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2439. ;
  2440. break;}
  2441. case 325:
  2442. #line 1387 "omparser.y"
  2443. { push2(yyvsp[-1], yyvsp[0]);
  2444. yyval = list2(yyvsp[-1], yyvsp[0]);
  2445. pop2(yyvsp[0], yyvsp[-1]);
  2446. ;
  2447. break;}
  2448. case 326:
  2449. #line 1392 "omparser.y"
  2450. { push2(yyvsp[-1], yyvsp[0]);
  2451. yyval = list2(yyvsp[-1], yyvsp[0]);
  2452. pop2(yyvsp[0], yyvsp[-1]);
  2453. ;
  2454. break;}
  2455. case 327:
  2456. #line 1400 "omparser.y"
  2457. { yyval = yyvsp[0]; ;
  2458. break;}
  2459. case 328:
  2460. #line 1402 "omparser.y"
  2461. { yyval = yyvsp[0]; ;
  2462. break;}
  2463. case 329:
  2464. #line 1404 "omparser.y"
  2465. { yyval = yyvsp[0]; ;
  2466. break;}
  2467. case 330:
  2468. #line 1406 "omparser.y"
  2469. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2470. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2471. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2472. ;
  2473. break;}
  2474. case 331:
  2475. #line 1411 "omparser.y"
  2476. { push2(yyvsp[-1], yyvsp[0]);
  2477. yyval = list2(yyvsp[-1], yyvsp[0]);
  2478. pop2(yyvsp[0], yyvsp[-1]);
  2479. ;
  2480. break;}
  2481. case 332:
  2482. #line 1416 "omparser.y"
  2483. { yyval = yyvsp[0]; ;
  2484. break;}
  2485. case 333:
  2486. #line 1418 "omparser.y"
  2487. { yyval = yyvsp[0]; ;
  2488. break;}
  2489. case 334:
  2490. #line 1420 "omparser.y"
  2491. { yyval = yyvsp[0]; ;
  2492. break;}
  2493. case 335:
  2494. #line 1422 "omparser.y"
  2495. { yyval = yyvsp[0]; ;
  2496. break;}
  2497. case 336:
  2498. #line 1424 "omparser.y"
  2499. { yyval = yyvsp[0]; ;
  2500. break;}
  2501. case 337:
  2502. #line 1426 "omparser.y"
  2503. {yyval = list3(yyvsp[-2], make_string("equivalent"), make_string("logic1")); ;
  2504. break;}
  2505. case 338:
  2506. #line 1431 "omparser.y"
  2507. { yyval = yyvsp[0]; ;
  2508. break;}
  2509. case 339:
  2510. #line 1433 "omparser.y"
  2511. { Lisp_Object obj = StrToLspM("and");
  2512. push3(obj, yyvsp[-1], yyvsp[0]);
  2513. yyval = list3(obj, yyvsp[-1], yyvsp[0]);
  2514. pop3(yyvsp[0], yyvsp[-1], obj);
  2515. ;
  2516. break;}
  2517. case 340:
  2518. #line 1442 "omparser.y"
  2519. { yyval = yyvsp[0]; ;
  2520. break;}
  2521. case 341:
  2522. #line 1444 "omparser.y"
  2523. { Lisp_Object obj = StrToLspM("or");
  2524. push3(obj, yyvsp[-1], yyvsp[0]);
  2525. yyval = list3(obj, yyvsp[-1], yyvsp[0]);
  2526. pop3(yyvsp[0], yyvsp[-1], obj);
  2527. ;
  2528. break;}
  2529. case 342:
  2530. #line 1453 "omparser.y"
  2531. { yyval = yyvsp[0]; ;
  2532. break;}
  2533. case 343:
  2534. #line 1455 "omparser.y"
  2535. { Lisp_Object obj = StrToLspM("xor");
  2536. push3(obj, yyvsp[-1], yyvsp[0]);
  2537. yyval = list3(obj, yyvsp[-1], yyvsp[0]);
  2538. pop3(yyvsp[0], yyvsp[-1], obj);
  2539. ;
  2540. break;}
  2541. case 344:
  2542. #line 1464 "omparser.y"
  2543. { yyval = yyvsp[0]; ;
  2544. break;}
  2545. case 345:
  2546. #line 1466 "omparser.y"
  2547. { yyval = yyvsp[0]; ;
  2548. break;}
  2549. case 346:
  2550. #line 1468 "omparser.y"
  2551. { yyval = yyvsp[0]; ;
  2552. break;}
  2553. case 347:
  2554. #line 1470 "omparser.y"
  2555. { yyval = yyvsp[0]; ;
  2556. break;}
  2557. case 348:
  2558. #line 1475 "omparser.y"
  2559. { yyval = yyvsp[0]; ;
  2560. break;}
  2561. case 349:
  2562. #line 1477 "omparser.y"
  2563. { Lisp_Object obj = StrToLspM("max");
  2564. push3(obj, yyvsp[-1], yyvsp[0]);
  2565. yyval = list3(obj, yyvsp[-1], yyvsp[0]);
  2566. pop3(yyvsp[0], yyvsp[-1], obj);
  2567. ;
  2568. break;}
  2569. case 350:
  2570. #line 1486 "omparser.y"
  2571. { yyval = yyvsp[0]; ;
  2572. break;}
  2573. case 351:
  2574. #line 1488 "omparser.y"
  2575. { Lisp_Object obj = StrToLspM("min");
  2576. push3(obj, yyvsp[-1], yyvsp[0]);
  2577. yyval = list3(obj, yyvsp[-1], yyvsp[0]);
  2578. pop3(yyvsp[0], yyvsp[-1], obj);
  2579. ;
  2580. break;}
  2581. case 352:
  2582. #line 1499 "omparser.y"
  2583. {yyval = list3(yyvsp[-2], make_string("based_integer"), make_string("nums1")); ;
  2584. break;}
  2585. case 353:
  2586. #line 1501 "omparser.y"
  2587. {/* (|@| (/ numer denom) (|Fraction| |Integer|)) */
  2588. push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2589. yyval = list3(
  2590. StrToLspM("@"),
  2591. list3(yyvsp[-2], yyvsp[-1], yyvsp[0]),
  2592. list2(
  2593. StrToLspM("Fraction"),
  2594. StrToLspM("Integer")
  2595. )
  2596. );
  2597. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2598. ;
  2599. break;}
  2600. case 354:
  2601. #line 1517 "omparser.y"
  2602. { Lisp_Object coerceObj = StrToLspM("::");
  2603. Lisp_Object nameObj = StrToLspM("SExpression");
  2604. push5(yyvsp[-2], yyvsp[-1], yyvsp[0], coerceObj, nameObj);
  2605. yyval = list3(yyvsp[-2],
  2606. list3(coerceObj, yyvsp[-1], nameObj),
  2607. list3(coerceObj, yyvsp[0], nameObj)
  2608. );
  2609. pop5(nameObj, coerceObj, yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2610. ;
  2611. break;}
  2612. case 355:
  2613. #line 1527 "omparser.y"
  2614. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2615. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2616. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2617. ;
  2618. break;}
  2619. case 356:
  2620. #line 1532 "omparser.y"
  2621. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2622. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2623. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2624. ;
  2625. break;}
  2626. case 357:
  2627. #line 1537 "omparser.y"
  2628. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2629. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2630. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2631. ;
  2632. break;}
  2633. case 358:
  2634. #line 1542 "omparser.y"
  2635. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2636. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2637. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2638. ;
  2639. break;}
  2640. case 359:
  2641. #line 1547 "omparser.y"
  2642. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2643. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2644. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2645. ;
  2646. break;}
  2647. case 360:
  2648. #line 1552 "omparser.y"
  2649. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2650. yyval = list3(yyvsp[-2], make_string("approx"), make_string("relation1"));
  2651. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2652. ;
  2653. break;}
  2654. case 361:
  2655. #line 1560 "omparser.y"
  2656. { push2(yyvsp[-1], yyvsp[0]);
  2657. yyval = list2(yyvsp[-1], yyvsp[0]);
  2658. pop2(yyvsp[0], yyvsp[-1]);
  2659. ;
  2660. break;}
  2661. case 362:
  2662. #line 1565 "omparser.y"
  2663. { push2(yyvsp[-1], yyvsp[0]);
  2664. yyval = list2(yyvsp[-1], yyvsp[0]);
  2665. pop2(yyvsp[0], yyvsp[-1]);
  2666. ;
  2667. break;}
  2668. case 363:
  2669. #line 1570 "omparser.y"
  2670. { push2(yyvsp[-1], yyvsp[0]);
  2671. yyval = list2(yyvsp[-1], yyvsp[0]);
  2672. pop2(yyvsp[0], yyvsp[-1]);
  2673. ;
  2674. break;}
  2675. case 364:
  2676. #line 1575 "omparser.y"
  2677. { push2(yyvsp[-1], yyvsp[0]);
  2678. yyval = list2(yyvsp[-1], yyvsp[0]);
  2679. pop2(yyvsp[0], yyvsp[-1]);
  2680. ;
  2681. break;}
  2682. case 365:
  2683. #line 1583 "omparser.y"
  2684. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2685. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2686. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2687. ;
  2688. break;}
  2689. case 366:
  2690. #line 1588 "omparser.y"
  2691. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2692. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2693. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2694. ;
  2695. break;}
  2696. case 367:
  2697. #line 1593 "omparser.y"
  2698. { Lisp_Object notObj = StrToLspM("not");
  2699. push4(notObj, yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2700. yyval = list2(notObj, list3(yyvsp[-2], yyvsp[-1], yyvsp[0]));
  2701. pop4(yyvsp[0], yyvsp[-1], yyvsp[-2], notObj);
  2702. ;
  2703. break;}
  2704. case 368:
  2705. #line 1599 "omparser.y"
  2706. { Lisp_Object notObj = StrToLspM("not");
  2707. push4(notObj, yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2708. yyval = list2(notObj, list3(yyvsp[-2], yyvsp[-1], yyvsp[0]));
  2709. pop4(yyvsp[0], yyvsp[-1], yyvsp[-2], notObj);
  2710. ;
  2711. break;}
  2712. case 369:
  2713. #line 1605 "omparser.y"
  2714. { Lisp_Object notObj = StrToLspM("not");
  2715. push4(notObj, yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2716. yyval = list2(notObj, list3(yyvsp[-2], yyvsp[-1], yyvsp[0]));
  2717. pop4(yyvsp[0], yyvsp[-1], yyvsp[-2], notObj);
  2718. ;
  2719. break;}
  2720. case 370:
  2721. #line 1611 "omparser.y"
  2722. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2723. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2724. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2725. ;
  2726. break;}
  2727. case 371:
  2728. #line 1616 "omparser.y"
  2729. {
  2730. yyval = cons(yyvsp[-1], yyvsp[0]);
  2731. ;
  2732. break;}
  2733. case 372:
  2734. #line 1620 "omparser.y"
  2735. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2736. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2737. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2738. ;
  2739. break;}
  2740. case 373:
  2741. #line 1625 "omparser.y"
  2742. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2743. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2744. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2745. ;
  2746. break;}
  2747. case 374:
  2748. #line 1630 "omparser.y"
  2749. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2750. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2751. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2752. ;
  2753. break;}
  2754. case 375:
  2755. #line 1635 "omparser.y"
  2756. { push2(yyvsp[-1], yyvsp[0]);
  2757. yyval = list2(yyvsp[-1], yyvsp[0]);
  2758. pop2(yyvsp[0], yyvsp[-1]);
  2759. ;
  2760. break;}
  2761. case 376:
  2762. #line 1640 "omparser.y"
  2763. { push2(yyvsp[-1], yyvsp[0]);
  2764. yyval = list3(yyvsp[-1], make_string("cartesian_product"), make_string("set1"));
  2765. pop2(yyvsp[0], yyvsp[-1]);
  2766. ;
  2767. break;}
  2768. case 377:
  2769. #line 1645 "omparser.y"
  2770. { push(yyvsp[0]);
  2771. yyval = Llist(C_nil, yyvsp[0]);
  2772. pop(yyvsp[0]);
  2773. ;
  2774. break;}
  2775. case 378:
  2776. #line 1650 "omparser.y"
  2777. { push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2778. yyval = list3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2779. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2780. ;
  2781. break;}
  2782. case 379:
  2783. #line 1655 "omparser.y"
  2784. { /* Deliberately swap arguments for AXIOM */
  2785. push3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2786. yyval = list3(yyvsp[-2], yyvsp[0], yyvsp[-1]);
  2787. pop3(yyvsp[0], yyvsp[-1], yyvsp[-2]);
  2788. ;
  2789. break;}
  2790. case 380:
  2791. #line 1664 "omparser.y"
  2792. { push2(yyvsp[-1], yyvsp[0]);
  2793. yyval = list2(yyvsp[-1], yyvsp[0]);
  2794. pop2(yyvsp[0], yyvsp[-1]);
  2795. ;
  2796. break;}
  2797. case 381:
  2798. #line 1669 "omparser.y"
  2799. { push2(yyvsp[-1], yyvsp[0]);
  2800. yyval = list2(yyvsp[-1], yyvsp[0]);
  2801. pop2(yyvsp[0], yyvsp[-1]);
  2802. ;
  2803. break;}
  2804. case 382:
  2805. #line 1674 "omparser.y"
  2806. { push2(yyvsp[-1], yyvsp[0]);
  2807. yyval = list2(yyvsp[-1], yyvsp[0]);
  2808. pop2(yyvsp[0], yyvsp[-1]);
  2809. ;
  2810. break;}
  2811. case 383:
  2812. #line 1679 "omparser.y"
  2813. { push2(yyvsp[-1], yyvsp[0]);
  2814. yyval = list2(yyvsp[-1], yyvsp[0]);
  2815. pop2(yyvsp[0], yyvsp[-1]);
  2816. ;
  2817. break;}
  2818. case 384:
  2819. #line 1684 "omparser.y"
  2820. { push2(yyvsp[-1], yyvsp[0]);
  2821. yyval = list2(yyvsp[-1], yyvsp[0]);
  2822. pop2(yyvsp[0], yyvsp[-1]);
  2823. ;
  2824. break;}
  2825. case 385:
  2826. #line 1689 "omparser.y"
  2827. { push2(yyvsp[-1], yyvsp[0]);
  2828. yyval = list2(yyvsp[-1], yyvsp[0]);
  2829. pop2(yyvsp[0], yyvsp[-1]);
  2830. ;
  2831. break;}
  2832. case 386:
  2833. #line 1694 "omparser.y"
  2834. { push2(yyvsp[-1], yyvsp[0]);
  2835. yyval = list2(yyvsp[-1], yyvsp[0]);
  2836. pop2(yyvsp[0], yyvsp[-1]);
  2837. ;
  2838. break;}
  2839. case 387:
  2840. #line 1699 "omparser.y"
  2841. { push2(yyvsp[-1], yyvsp[0]);
  2842. yyval = list2(yyvsp[-1], yyvsp[0]);
  2843. pop2(yyvsp[0], yyvsp[-1]);
  2844. ;
  2845. break;}
  2846. case 388:
  2847. #line 1704 "omparser.y"
  2848. { push2(yyvsp[-1], yyvsp[0]);
  2849. yyval = list2(yyvsp[-1], yyvsp[0]);
  2850. pop2(yyvsp[0], yyvsp[-1]);
  2851. ;
  2852. break;}
  2853. case 389:
  2854. #line 1709 "omparser.y"
  2855. { push2(yyvsp[-1], yyvsp[0]);
  2856. yyval = list2(yyvsp[-1], yyvsp[0]);
  2857. pop2(yyvsp[0], yyvsp[-1]);
  2858. ;
  2859. break;}
  2860. case 390:
  2861. #line 1714 "omparser.y"
  2862. { push2(yyvsp[-1], yyvsp[0]);
  2863. yyval = list2(yyvsp[-1], yyvsp[0]);
  2864. pop2(yyvsp[0], yyvsp[-1]);
  2865. ;
  2866. break;}
  2867. case 391:
  2868. #line 1719 "omparser.y"
  2869. { Lisp_Object obj = StrToLspM("/");
  2870. push4(obj, yyvsp[-2], yyvsp[-1], yyvsp[0]);
  2871. yyval = list3(obj, list2(yyvsp[-2], yyvsp[0]), list2(yyvsp[-2], yyvsp[-1]));
  2872. pop4(yyvsp[0], yyvsp[-1], yyvsp[-2], obj);
  2873. ;
  2874. break;}
  2875. case 392:
  2876. #line 1725 "omparser.y"
  2877. { push2(yyvsp[-1], yyvsp[0]);
  2878. yyval = list2(yyvsp[-1], yyvsp[0]);
  2879. pop2(yyvsp[0], yyvsp[-1]);
  2880. ;
  2881. break;}
  2882. case 393:
  2883. #line 1730 "omparser.y"
  2884. { push2(yyvsp[-1], yyvsp[0]);
  2885. yyval = list2(yyvsp[-1], yyvsp[0]);
  2886. pop2(yyvsp[0], yyvsp[-1]);
  2887. ;
  2888. break;}
  2889. case 394:
  2890. #line 1735 "omparser.y"
  2891. { push2(yyvsp[-1], yyvsp[0]);
  2892. yyval = list2(yyvsp[-1], yyvsp[0]);
  2893. pop2(yyvsp[0], yyvsp[-1]);
  2894. ;
  2895. break;}
  2896. case 395:
  2897. #line 1740 "omparser.y"
  2898. { push2(yyvsp[-1], yyvsp[0]);
  2899. yyval = list2(yyvsp[-1], yyvsp[0]);
  2900. pop2(yyvsp[0], yyvsp[-1]);
  2901. ;
  2902. break;}
  2903. case 396:
  2904. #line 1745 "omparser.y"
  2905. { push2(yyvsp[-1], yyvsp[0]);
  2906. yyval = list2(yyvsp[-1], yyvsp[0]);
  2907. pop2(yyvsp[0], yyvsp[-1]);
  2908. ;
  2909. break;}
  2910. case 397:
  2911. #line 1750 "omparser.y"
  2912. { push2(yyvsp[-1], yyvsp[0]);
  2913. yyval = list2(yyvsp[-1], yyvsp[0]);
  2914. pop2(yyvsp[0], yyvsp[-1]);
  2915. ;
  2916. break;}
  2917. case 398:
  2918. #line 1755 "omparser.y"
  2919. { push2(yyvsp[-1], yyvsp[0]);
  2920. yyval = list2(yyvsp[-1], yyvsp[0]);
  2921. pop2(yyvsp[0], yyvsp[-1]);
  2922. ;
  2923. break;}
  2924. case 399:
  2925. #line 1760 "omparser.y"
  2926. { push2(yyvsp[-1], yyvsp[0]);
  2927. yyval = list2(yyvsp[-1], yyvsp[0]);
  2928. pop2(yyvsp[0], yyvsp[-1]);
  2929. ;
  2930. break;}
  2931. case 400:
  2932. #line 1765 "omparser.y"
  2933. { push2(yyvsp[-1], yyvsp[0]);
  2934. yyval = list2(yyvsp[-1], yyvsp[0]);
  2935. pop2(yyvsp[0], yyvsp[-1]);
  2936. ;
  2937. break;}
  2938. case 401:
  2939. #line 1770 "omparser.y"
  2940. { push2(yyvsp[-1], yyvsp[0]);
  2941. yyval = list2(yyvsp[-1], yyvsp[0]);
  2942. pop2(yyvsp[0], yyvsp[-1]);
  2943. ;
  2944. break;}
  2945. case 402:
  2946. #line 1775 "omparser.y"
  2947. { push2(yyvsp[-1], yyvsp[0]);
  2948. yyval = list2(yyvsp[-1], yyvsp[0]);
  2949. pop2(yyvsp[0], yyvsp[-1]);
  2950. ;
  2951. break;}
  2952. case 403:
  2953. #line 1780 "omparser.y"
  2954. { push2(yyvsp[-1], yyvsp[0]);
  2955. yyval = list2(yyvsp[-1], yyvsp[0]);
  2956. pop2(yyvsp[0], yyvsp[-1]);
  2957. ;
  2958. break;}
  2959. case 404:
  2960. #line 1785 "omparser.y"
  2961. { push2(yyvsp[-1], yyvsp[0]);
  2962. yyval = list2(yyvsp[-1], yyvsp[0]);
  2963. pop2(yyvsp[0], yyvsp[-1]);
  2964. ;
  2965. break;}
  2966. case 405:
  2967. #line 1790 "omparser.y"
  2968. { push2(yyvsp[-1], yyvsp[0]);
  2969. yyval = list2(yyvsp[-1], yyvsp[0]);
  2970. pop2(yyvsp[0], yyvsp[-1]);
  2971. ;
  2972. break;}
  2973. case 406:
  2974. #line 1795 "omparser.y"
  2975. { push2(yyvsp[-1], yyvsp[0]);
  2976. yyval = list2(yyvsp[-1], yyvsp[0]);
  2977. pop2(yyvsp[0], yyvsp[-1]);
  2978. ;
  2979. break;}
  2980. case 407:
  2981. #line 1803 "omparser.y"
  2982. { yyval = cons(yyvsp[-1], yyvsp[0]); ;
  2983. break;}
  2984. case 408:
  2985. #line 1808 "omparser.y"
  2986. { yyval = yyvsp[-1]; ;
  2987. break;}
  2988. case 409:
  2989. #line 1810 "omparser.y"
  2990. { yyval = yyvsp[-2]; ;
  2991. break;}
  2992. case 411:
  2993. #line 1819 "omparser.y"
  2994. { Lisp_Object types = C_nil;
  2995. Lisp_Object llen = Llength(C_nil, yyvsp[-2]);
  2996. int len = int_of_fixnum(llen);
  2997. int i;
  2998. for (i = 0; i < len; i++)
  2999. types = cons(C_nil, types);
  3000. types = cons(C_nil, types);
  3001. push4(yyvsp[-4], yyvsp[-2], yyvsp[0], types);
  3002. yyval = cons(yyvsp[-4], cons(yyvsp[-2], list3(types, types, yyvsp[0])));
  3003. pop4(types, yyvsp[0], yyvsp[-2], yyvsp[-4]);
  3004. ;
  3005. break;}
  3006. }
  3007. /* the action file gets copied in in place of this dollarsign */
  3008. #line 543 "/usr/lib/bison.simple"
  3009. yyvsp -= yylen;
  3010. yyssp -= yylen;
  3011. #ifdef YYLSP_NEEDED
  3012. yylsp -= yylen;
  3013. #endif
  3014. #if YYDEBUG != 0
  3015. if (yydebug)
  3016. {
  3017. short *ssp1 = yyss - 1;
  3018. fprintf (stderr, "state stack now");
  3019. while (ssp1 != yyssp)
  3020. fprintf (stderr, " %d", *++ssp1);
  3021. fprintf (stderr, "\n");
  3022. }
  3023. #endif
  3024. *++yyvsp = yyval;
  3025. #ifdef YYLSP_NEEDED
  3026. yylsp++;
  3027. if (yylen == 0)
  3028. {
  3029. yylsp->first_line = yylloc.first_line;
  3030. yylsp->first_column = yylloc.first_column;
  3031. yylsp->last_line = (yylsp-1)->last_line;
  3032. yylsp->last_column = (yylsp-1)->last_column;
  3033. yylsp->text = 0;
  3034. }
  3035. else
  3036. {
  3037. yylsp->last_line = (yylsp+yylen-1)->last_line;
  3038. yylsp->last_column = (yylsp+yylen-1)->last_column;
  3039. }
  3040. #endif
  3041. /* Now "shift" the result of the reduction.
  3042. Determine what state that goes to,
  3043. based on the state we popped back to
  3044. and the rule number reduced by. */
  3045. yyn = yyr1[yyn];
  3046. yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  3047. if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  3048. yystate = yytable[yystate];
  3049. else
  3050. yystate = yydefgoto[yyn - YYNTBASE];
  3051. goto yynewstate;
  3052. yyerrlab: /* here on detecting error */
  3053. if (! yyerrstatus)
  3054. /* If not already recovering from an error, report this error. */
  3055. {
  3056. ++yynerrs;
  3057. #ifdef YYERROR_VERBOSE
  3058. yyn = yypact[yystate];
  3059. if (yyn > YYFLAG && yyn < YYLAST)
  3060. {
  3061. int size = 0;
  3062. char *msg;
  3063. int x, count;
  3064. count = 0;
  3065. /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
  3066. for (x = (yyn < 0 ? -yyn : 0);
  3067. x < (sizeof(yytname) / sizeof(char *)); x++)
  3068. if (yycheck[x + yyn] == x)
  3069. size += strlen(yytname[x]) + 15, count++;
  3070. msg = (char *) malloc(size + 15);
  3071. if (msg != 0)
  3072. {
  3073. strcpy(msg, "parse error");
  3074. if (count < 5)
  3075. {
  3076. count = 0;
  3077. for (x = (yyn < 0 ? -yyn : 0);
  3078. x < (sizeof(yytname) / sizeof(char *)); x++)
  3079. if (yycheck[x + yyn] == x)
  3080. {
  3081. strcat(msg, count == 0 ? ", expecting `" : " or `");
  3082. strcat(msg, yytname[x]);
  3083. strcat(msg, "'");
  3084. count++;
  3085. }
  3086. }
  3087. yyerror(msg);
  3088. free(msg);
  3089. }
  3090. else
  3091. yyerror ("parse error; also virtual memory exceeded");
  3092. }
  3093. else
  3094. #endif /* YYERROR_VERBOSE */
  3095. yyerror("parse error");
  3096. }
  3097. goto yyerrlab1;
  3098. yyerrlab1: /* here on error raised explicitly by an action */
  3099. if (yyerrstatus == 3)
  3100. {
  3101. /* if just tried and failed to reuse lookahead token after an error, discard it. */
  3102. /* return failure if at end of input */
  3103. if (yychar == YYEOF)
  3104. YYABORT;
  3105. #if YYDEBUG != 0
  3106. if (yydebug)
  3107. fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
  3108. #endif
  3109. yychar = YYEMPTY;
  3110. }
  3111. /* Else will try to reuse lookahead token
  3112. after shifting the error token. */
  3113. yyerrstatus = 3; /* Each real token shifted decrements this */
  3114. goto yyerrhandle;
  3115. yyerrdefault: /* current state does not do anything special for the error token. */
  3116. #if 0
  3117. /* This is wrong; only states that explicitly want error tokens
  3118. should shift them. */
  3119. yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
  3120. if (yyn) goto yydefault;
  3121. #endif
  3122. yyerrpop: /* pop the current state because it cannot handle the error token */
  3123. if (yyssp == yyss) YYABORT;
  3124. yyvsp--;
  3125. yystate = *--yyssp;
  3126. #ifdef YYLSP_NEEDED
  3127. yylsp--;
  3128. #endif
  3129. #if YYDEBUG != 0
  3130. if (yydebug)
  3131. {
  3132. short *ssp1 = yyss - 1;
  3133. fprintf (stderr, "Error: state stack now");
  3134. while (ssp1 != yyssp)
  3135. fprintf (stderr, " %d", *++ssp1);
  3136. fprintf (stderr, "\n");
  3137. }
  3138. #endif
  3139. yyerrhandle:
  3140. yyn = yypact[yystate];
  3141. if (yyn == YYFLAG)
  3142. goto yyerrdefault;
  3143. yyn += YYTERROR;
  3144. if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
  3145. goto yyerrdefault;
  3146. yyn = yytable[yyn];
  3147. if (yyn < 0)
  3148. {
  3149. if (yyn == YYFLAG)
  3150. goto yyerrpop;
  3151. yyn = -yyn;
  3152. goto yyreduce;
  3153. }
  3154. else if (yyn == 0)
  3155. goto yyerrpop;
  3156. if (yyn == YYFINAL)
  3157. YYACCEPT;
  3158. #if YYDEBUG != 0
  3159. if (yydebug)
  3160. fprintf(stderr, "Shifting error token, ");
  3161. #endif
  3162. *++yyvsp = yylval;
  3163. #ifdef YYLSP_NEEDED
  3164. *++yylsp = yylloc;
  3165. #endif
  3166. yystate = yyn;
  3167. goto yynewstate;
  3168. yyacceptlab:
  3169. /* YYACCEPT comes here. */
  3170. if (yyfree_stacks)
  3171. {
  3172. free (yyss);
  3173. free (yyvs);
  3174. #ifdef YYLSP_NEEDED
  3175. free (yyls);
  3176. #endif
  3177. }
  3178. return 0;
  3179. yyabortlab:
  3180. /* YYABORT comes here. */
  3181. if (yyfree_stacks)
  3182. {
  3183. free (yyss);
  3184. free (yyvs);
  3185. #ifdef YYLSP_NEEDED
  3186. free (yyls);
  3187. #endif
  3188. }
  3189. return 1;
  3190. }
  3191. #line 1834 "omparser.y"
  3192. /* C code. */
  3193. typedef struct {
  3194. char *cd;
  3195. char *name;
  3196. char *axname;
  3197. YYSTYPE token;
  3198. } symTableItem;
  3199. /* All symbols from the same CD must be in a contiguous group. */
  3200. static symTableItem symTable[] = {
  3201. {"alg1", "one", "1", OM_SYM_alg1_one},
  3202. {"alg1", "zero", "0", OM_SYM_alg1_zero},
  3203. {"arith1", "abs", "abs", OM_SYM_arith1_abs},
  3204. {"arith1", "divide", "/", OM_SYM_arith1_divide},
  3205. {"arith1", "gcd", "gcd", OM_SYM_arith1_gcd},
  3206. {"arith1", "lcm", "lcm", OM_SYM_arith1_lcm},
  3207. {"arith1", "minus", "-", OM_SYM_arith1_minus},
  3208. {"arith1", "plus", "+", OM_SYM_arith1_plus},
  3209. {"arith1", "power", "**", OM_SYM_arith1_power},
  3210. {"arith1", "product", "product", OM_SYM_arith1_product},
  3211. {"arith1", "root", "nthRoot", OM_SYM_arith1_root},
  3212. {"arith1", "sum", "summation", OM_SYM_arith1_sum},
  3213. {"arith1", "times", "*", OM_SYM_arith1_times},
  3214. {"arith1", "unary_minus", "-", OM_SYM_arith1_unary_minus},
  3215. {"arith2", "arg", "argument", OM_SYM_arith2_arg},
  3216. {"arith2", "inverse", "inv", OM_SYM_arith2_inverse},
  3217. {"arith2", "times", "*", OM_SYM_arith2_times},
  3218. {"bigfloat1", "bigfloat", "float", OM_SYM_bigfloat1_bigfloat},
  3219. {"calculus1", "defint", "integrate", OM_SYM_calculus1_defint},
  3220. {"calculus1", "diff", "differentiate", OM_SYM_calculus1_diff},
  3221. /*MCDT*/
  3222. {"calculus1", "int", "integrate", OM_SYM_calculus1_int},
  3223. {"calculus1", "partialdiff", "differentiate", OM_SYM_calculus1_partialdiff},
  3224. {"complex1", "argument", "argument", OM_SYM_complex1_argument},
  3225. {"complex1", "complex_cartesian", "complex", OM_SYM_complex1_complex_cartesian},
  3226. {"complex1", "complex_polar", "OMunhandledSymbol", OM_SYM_complex1_complex_polar},
  3227. {"complex1", "conjugate", "conjugate", OM_SYM_complex1_conjugate},
  3228. {"complex1", "real", "real", OM_SYM_complex1_real},
  3229. {"complex1", "imaginary", "imaginary", OM_SYM_complex1_imaginary},
  3230. /* dummy name: no equivalent Axiom function. */
  3231. {"fns1", "identity", "OMunhandledSymbol", OM_SYM_fns1_identity},
  3232. {"fns1", "range", "OMunhandledSymbol", OM_SYM_fns1_range},
  3233. {"fns1", "image", "OMunhandledSymbol", OM_SYM_fns1_image},
  3234. {"fns1", "domain", "OMunhandledSymbol", OM_SYM_fns1_domain},
  3235. {"fns1", "inverse", "OMunhandledSymbol", OM_SYM_fns1_inverse},
  3236. {"fns1", "lambda", "ADEF", OM_SYM_fns1_lambda},
  3237. {"fns1", "left_compose", "ADEF", OM_SYM_fns1_left_compose},
  3238. {"fns2", "apply_to_list", "reduce", OM_SYM_fns2_apply_to_list},
  3239. {"fns2", "kernel", "OMunhandledSymbol", OM_SYM_fns2_kernel},
  3240. /* FIXME: find out the axiom name for this. */
  3241. /* {"fns2", "right_compose","????", OM_SYM_fns2_right_compose},*/
  3242. {"integer1", "factorial", "factorial", OM_SYM_integer1_factorial},
  3243. {"integer1", "factorof", "OMunhandledSymbol", OM_SYM_integer1_factorof},
  3244. {"integer1", "quotient", "quo", OM_SYM_integer1_quotient},
  3245. {"integer1", "rem", "rem", OM_SYM_integer1_remainder},
  3246. {"interval1", "integer_interval", "segment", OM_SYM_interval1_integer_interval},
  3247. {"interval1", "interval", "interval", OM_SYM_interval1_interval},
  3248. {"interval1", "interval_cc", "interval", OM_SYM_interval1_interval_cc},
  3249. {"interval1", "interval_co", "interval", OM_SYM_interval1_interval_co},
  3250. {"interval1", "interval_oc", "interval", OM_SYM_interval1_interval_oc},
  3251. {"interval1", "interval_oo", "interval", OM_SYM_interval1_interval_oo},
  3252. {"limit1", "above", "right", OM_SYM_limit1_above},
  3253. {"limit1", "below", "left", OM_SYM_limit1_below},
  3254. {"limit1", "both_sides", "neither", OM_SYM_limit1_both_sides}, /* dummy name */
  3255. {"limit1", "limit", "limit", OM_SYM_limit1_limit},
  3256. {"limit1", "null", "neither", OM_SYM_limit1_null}, /* dummy name */
  3257. {"linalg1", "determinant", "determinant", OM_SYM_linalg1_determinant},
  3258. {"linalg1", "matrix_selector", "elt", OM_SYM_linalg1_matrix_selector},
  3259. {"linalg1", "vector_selector", "elt", OM_SYM_linalg1_vector_selector},
  3260. {"linalg1", "transpose", "transpose", OM_SYM_linalg1_transpose},
  3261. {"linalg1", "outerproduct", "outerproduct", OM_SYM_linalg1_outerproduct},
  3262. {"linalg1", "scalarproduct", "dot", OM_SYM_linalg1_scalarproduct},
  3263. {"linalg1", "vectorproduct", "cross", OM_SYM_linalg1_vectorproduct},
  3264. {"linalg2", "matrix", "matrix", OM_SYM_linalg2_matrix},
  3265. {"linalg2", "matrixrow", "construct", OM_SYM_linalg2_matrixrow},
  3266. {"linalg2", "vector", "vector", OM_SYM_linalg2_vector},
  3267. {"linalg3", "matrix", "matrix", OM_SYM_linalg3_matrix},
  3268. {"linalg3", "matrixcolumn", "construct", OM_SYM_linalg3_matrixcolumn},
  3269. {"linalg3", "vector", "vector", OM_SYM_linalg3_vector},
  3270. {"list1", "list", "construct", OM_SYM_list1_list},
  3271. {"list1", "map", "map", OM_SYM_list1_map},
  3272. {"list1", "suchthat", "select", OM_SYM_list1_suchthat},
  3273. {"list2", "cons", "cons", OM_SYM_list2_cons},
  3274. {"list2", "first", "first", OM_SYM_list2_first},
  3275. {"list2", "rest", "rest", OM_SYM_list2_rest},
  3276. {"logic1", "and", "and", OM_SYM_logic1_and},
  3277. {"logic1", "false", "false", OM_SYM_logic1_false},
  3278. {"logic1", "implies", "implies", OM_SYM_logic1_implies},
  3279. {"logic1", "not", "not", OM_SYM_logic1_not},
  3280. {"logic1", "or", "or", OM_SYM_logic1_or},
  3281. {"logic1", "true", "true", OM_SYM_logic1_true},
  3282. {"logic1", "xor", "xor", OM_SYM_logic1_xor},
  3283. {"logic1", "equivalent", "OMunhandledSymbol", OM_SYM_logic1_equivalent},
  3284. {"minmax1", "max", "max", OM_SYM_minmax1_max},
  3285. {"minmax1", "min", "min", OM_SYM_minmax1_min},
  3286. {"nums1", "based_integer", "OMunhandledSymbol", OM_SYM_nums1_based_integer},
  3287. {"nums1", "e", "%e", OM_SYM_nums1_e},
  3288. /* {"nums1", "gamma", "????", OM_SYM_nums1_gamma},*/
  3289. {"nums1", "i", "%i", OM_SYM_nums1_i},
  3290. {"nums1", "infinity", "%infinity", OM_SYM_nums1_infinity},
  3291. {"nums1", "NaN", "OMunhandledSymbol", OM_SYM_nums1_NaN},
  3292. {"nums1", "pi", "%pi", OM_SYM_nums1_pi},
  3293. {"nums1", "rational", "/", OM_SYM_nums1_rational},
  3294. {"relation1", "eq", "eq", OM_SYM_relation1_eq},
  3295. {"relation1", "geq", ">=", OM_SYM_relation1_geq},
  3296. {"relation1", "gt", ">", OM_SYM_relation1_gt},
  3297. {"relation1", "leq", "<=", OM_SYM_relation1_leq},
  3298. {"relation1", "lt", "<", OM_SYM_relation1_lt},
  3299. {"relation1", "neq", "~=", OM_SYM_relation1_neq},
  3300. {"relation1", "approx", "OMunhandledSymbol", OM_SYM_relation1_approx},
  3301. {"rounding1", "ceiling", "ceiling", OM_SYM_rounding1_ceiling},
  3302. {"rounding1", "floor", "floor", OM_SYM_rounding1_floor},
  3303. {"rounding1", "trunc", "truncate", OM_SYM_rounding1_trunc},
  3304. {"rounding1", "round", "round", OM_SYM_rounding1_round},
  3305. /* FIXME: how to represent these in Axiom? */
  3306. /* {"setname1", "C", "????", OM_SYM_setname1_C},*/
  3307. /* {"setname1", "N", "????", OM_SYM_setname1_N},*/
  3308. /* {"setname1", "P", "????", OM_SYM_setname1_P},*/
  3309. /* {"setname1", "Q", "????", OM_SYM_setname1_Q},*/
  3310. /* {"setname1", "R", "????", OM_SYM_setname1_R},*/
  3311. /* {"setname1", "Z", "????", OM_SYM_setname1_Z},*/
  3312. {"set1", "in", "member?", OM_SYM_set1_in},
  3313. {"set1", "intersect", "intersect", OM_SYM_set1_intersect},
  3314. /* This is the same as for "in" but will be combined with the "not" symbol. */
  3315. {"set1", "notin", "member?", OM_SYM_set1_notin},
  3316. /* This is the same as for "prsubset" but will be combined with the "not" symbol. */
  3317. {"set1", "notprsubset", "<", OM_SYM_set1_notprsubset},
  3318. /* This is the same as for "subset" but will be combined with the "not" symbol. */
  3319. {"set1", "notsubset", "subset?", OM_SYM_set1_notsubset},
  3320. {"set1", "prsubset", "<", OM_SYM_set1_prsubset},
  3321. {"set1", "set", "set", OM_SYM_set1_set},
  3322. {"set1", "setdiff", "difference", OM_SYM_set1_setdiff},
  3323. {"set1", "subset", "subset?", OM_SYM_set1_subset},
  3324. {"set1", "union", "union", OM_SYM_set1_union},
  3325. {"set1", "size", "cardinality", OM_SYM_set1_size},
  3326. {"set1", "cartesian_product", "OMunhandledSymbol", OM_SYM_set1_cartesian_product},
  3327. {"set1", "emptyset", "empty", OM_SYM_set1_emptyset},
  3328. {"set1", "map", "map", OM_SYM_set1_map},
  3329. {"set1", "suchthat", "select", OM_SYM_set1_suchthat},
  3330. {"transc1", "arccos", "acos", OM_SYM_transc1_arccos},
  3331. {"transc1", "arcsin", "asin", OM_SYM_transc1_arcsin},
  3332. {"transc1", "arctan", "atan", OM_SYM_transc1_arctan},
  3333. {"transc1", "cos", "cos", OM_SYM_transc1_cos},
  3334. {"transc1", "cosh", "cosh", OM_SYM_transc1_cosh},
  3335. {"transc1", "cot", "cot", OM_SYM_transc1_cot},
  3336. {"transc1", "coth", "coth", OM_SYM_transc1_coth},
  3337. {"transc1", "csc", "csc", OM_SYM_transc1_csc},
  3338. {"transc1", "csch", "csch", OM_SYM_transc1_csch},
  3339. {"transc1", "exp", "exp", OM_SYM_transc1_exp},
  3340. {"transc1", "ln", "log", OM_SYM_transc1_ln},
  3341. {"transc1", "log", "log", OM_SYM_transc1_log},
  3342. {"transc1", "sec", "sec", OM_SYM_transc1_sec},
  3343. {"transc1", "sech", "sech", OM_SYM_transc1_sech},
  3344. /*MCDT*/
  3345. {"transc1", "sin", "sin", OM_SYM_transc1_sin},
  3346. {"transc1", "sinh", "sinh", OM_SYM_transc1_sinh},
  3347. {"transc1", "tan", "tan", OM_SYM_transc1_tan},
  3348. {"transc1", "tanh", "tanh", OM_SYM_transc1_tanh},
  3349. {"transc1", "arccosh", "acosh", OM_SYM_transc1_arccosh},
  3350. {"transc1", "arccot", "acot", OM_SYM_transc1_arccot},
  3351. {"transc1", "arccoth", "acoth", OM_SYM_transc1_arccoth},
  3352. {"transc1", "arccsc", "acsc", OM_SYM_transc1_arccsc},
  3353. {"transc1", "arccsch", "acsch", OM_SYM_transc1_arccsch},
  3354. {"transc1", "arcsec", "asec", OM_SYM_transc1_arcsec},
  3355. {"transc1", "arcsech", "asech", OM_SYM_transc1_arcsech},
  3356. {"transc1", "arcsinh", "asinh", OM_SYM_transc1_arcsinh},
  3357. {"transc1", "arctanh", "atanh", OM_SYM_transc1_arctanh},
  3358. {NULL, NULL, NULL, OM_YYERROR}
  3359. };
  3360. int findOMSymbol(char *cd, char *name)
  3361. {
  3362. int i, j;
  3363. /* First find the group of symbols from the correct CD. */
  3364. i = 0;
  3365. while (symTable[i].cd != NULL && strcmp(symTable[i].cd, cd) != 0)
  3366. i++;
  3367. if (symTable[i].cd == NULL)
  3368. return -1;
  3369. /* Now find the matching symbol from that group (if present). */
  3370. j = i;
  3371. while (symTable[j].cd != NULL) {
  3372. if (strcmp(symTable[j].cd, symTable[i].cd) != 0)
  3373. return -1;
  3374. else if (strcmp(symTable[j].name, name) == 0)
  3375. return j;
  3376. else
  3377. j++;
  3378. }
  3379. return -1;
  3380. }
  3381. YYSTYPE classifySymbol(Lisp_Object lsym)
  3382. {
  3383. Lisp_Object tmpObj;
  3384. char *cd = NULL;
  3385. char *name = NULL;
  3386. int len;
  3387. int i = 0;
  3388. /*DEBUG*/
  3389. /*Lprint(C_nil, lsym);*/
  3390. /*END DEBUG*/
  3391. /* Note: there is a strange serial dependency in the following code. If
  3392. * the block which gets the CD of the symbol occurs before the block which
  3393. * gets the name of the symbol, the symbol name will be corrupted in some
  3394. * cases. Very odd. (VH) --- This may not be valid any more... */
  3395. /* Get the name of the symbol. */
  3396. /*tmpObj = om_getLispProperty(lsym, MkUndefSymM("name"));*/
  3397. tmpObj = qcar(qcdr(lsym));
  3398. /*DEBUG*/
  3399. /*Lprint(C_nil, tmpObj);*/
  3400. /*END DEBUG*/
  3401. if (!stringp(tmpObj))
  3402. return OM_YYERROR;
  3403. name = get_string_data(tmpObj, "classifySymbol", &len);
  3404. assert(name != NULL);
  3405. name[len] = '\0';
  3406. /* Get the CD of the symbol. */
  3407. /*tmpObj = om_getLispProperty(lsym, MkUndefSymM("cd"));*/
  3408. tmpObj = qcar(lsym);
  3409. /*DEBUG*/
  3410. #if defined(YYDEBUG) && YYDEBUG == 1
  3411. Lprint(C_nil, tmpObj);
  3412. #endif
  3413. /*END DEBUG*/
  3414. if (!stringp(tmpObj))
  3415. return OM_YYERROR;
  3416. cd = get_string_data(tmpObj, "classifySymbol", &len);
  3417. assert(cd != NULL);
  3418. cd[len] = '\0';
  3419. /* Find the symbol in the symbol table, if it is present. */
  3420. i = findOMSymbol(cd, name);
  3421. /* If the symbol was recognised, return it. */
  3422. if (i != -1) {
  3423. yylval = StrToLspM(symTable[i].axname);
  3424. return symTable[i].token;
  3425. }
  3426. else return OM_YYERROR;
  3427. }
  3428. int yyerror(char *msg)
  3429. {
  3430. fprintf(stderr, "ERROR: %s\n", msg);
  3431. return 0;
  3432. }
  3433. YYSTYPE yylex()
  3434. {
  3435. OMtokenType ttype;
  3436. OMstatus status;
  3437. OMdev dev;
  3438. dev = om_toDev(ldev);
  3439. status = OMgetType(dev, &ttype);
  3440. /* The following code breaks file handling. MCD */
  3441. /* If we are listening to a socket (as opposed to reading from a file), we
  3442. * should block until more tokens become available. */
  3443. /* XXX
  3444. if (OMisSocketDevice(dev)) {
  3445. while (status == OMnoMoreToken)
  3446. */
  3447. status = OMgetType(dev, &ttype);
  3448. /* XXX
  3449. }
  3450. */
  3451. if (ttype == OMtokenUnknown || status != OMsuccess)
  3452. return 0;
  3453. else {
  3454. switch (ttype) {
  3455. case OMtokenApp:
  3456. yylval = om_getApp(C_nil, ldev);
  3457. return OM_APP;
  3458. case OMtokenEndApp:
  3459. yylval = om_getEndApp(C_nil, ldev);
  3460. return OM_ENDAPP;
  3461. case OMtokenAtp:
  3462. yylval = om_getAtp(C_nil, ldev);
  3463. return OM_ATP;
  3464. case OMtokenEndAtp:
  3465. yylval = om_getEndAtp(C_nil, ldev);
  3466. return OM_ENDATP;
  3467. case OMtokenAttr:
  3468. yylval = om_getAttr(C_nil, ldev);
  3469. return OM_ATTR;
  3470. case OMtokenEndAttr:
  3471. yylval = om_getEndAttr(C_nil, ldev);
  3472. return OM_ENDATTR;
  3473. case OMtokenBind:
  3474. yylval = om_getBind(C_nil, ldev);
  3475. return OM_BIND;
  3476. case OMtokenEndBind:
  3477. yylval = om_getEndBind(C_nil, ldev);
  3478. return OM_ENDBIND;
  3479. case OMtokenBVar:
  3480. yylval = om_getBVar(C_nil, ldev);
  3481. return OM_BVAR;
  3482. case OMtokenEndBVar:
  3483. yylval = om_getEndBVar(C_nil, ldev);
  3484. return OM_ENDBVAR;
  3485. case OMtokenError:
  3486. yylval = om_getError(C_nil, ldev);
  3487. return OM_ERROR;
  3488. case OMtokenEndError:
  3489. yylval = om_getEndError(C_nil, ldev);
  3490. return OM_ENDERROR;
  3491. case OMtokenObject:
  3492. yylval = om_getObject(C_nil, ldev);
  3493. return OM_OBJECT;
  3494. case OMtokenEndObject:
  3495. yylval = om_getEndObject(C_nil, ldev);
  3496. return OM_ENDOBJECT;
  3497. case OMtokenInt32:
  3498. case OMtokenBigInt:
  3499. yylval = om_getInt(C_nil, ldev);
  3500. return OM_INT;
  3501. case OMtokenFloat64:
  3502. yylval = om_getFloat(C_nil, ldev);
  3503. return OM_FLOAT;
  3504. case OMtokenByteArray:
  3505. yylval = om_getByteArray(C_nil, ldev);
  3506. return OM_BYTEARRAY;
  3507. case OMtokenVar:
  3508. yylval = om_getVar(C_nil, ldev);
  3509. return OM_VAR;
  3510. case OMtokenString:
  3511. yylval = om_getString(C_nil, ldev);
  3512. return OM_STRING;
  3513. case OMtokenSymbol:
  3514. yylval = om_getSymbol(C_nil, ldev);
  3515. return classifySymbol(yylval);
  3516. default:
  3517. return OM_YYERROR;
  3518. }
  3519. }
  3520. }
  3521. /**
  3522. * This function is exposed to the lisp interpreter, to allow it to parse
  3523. * OpenMath objects from a given string or device. The OpenMath object will be
  3524. * returned in a form suitable for use by the "interpret" function.
  3525. */
  3526. Lisp_Object om_read(Lisp_Object nil, Lisp_Object obj)
  3527. {
  3528. OMdev dev;
  3529. char *data = NULL;
  3530. int len, val;
  3531. CSL_IGNORE(nil);
  3532. push(obj);
  3533. inObj = nil;
  3534. if (stringp(obj)) {
  3535. data = get_string_data(obj, "om-read", &len);
  3536. errexitn(1);
  3537. if (data != NULL)
  3538. data[len] = '\0';
  3539. dev = OMmakeDevice(OMencodingXML, OMmakeIOString(&data));
  3540. ldev = om_fromDev(dev);
  3541. }
  3542. else if (is_bignum(obj) && ((bignum_length(obj) >> 2) - 1) == 1)
  3543. ldev = obj;
  3544. else
  3545. return aerror("om-read: argument must be a string or an OpenMath device.");
  3546. /* Turn parser tracing on. */
  3547. #if defined YYDEBUG && YYDEBUG == 1
  3548. yydebug = 1;/*DEBUG*/
  3549. #endif
  3550. val = yyparse();
  3551. yylval = C_nil;
  3552. if (stringp(obj))
  3553. OMcloseDevice(dev);
  3554. errexitn(1);
  3555. pop(obj);
  3556. #if defined YYDEBUG && YYDEBUG == 1
  3557. Lprint(C_nil, inObj);/*DEBUG*/
  3558. #endif
  3559. if (val == 0)
  3560. return onevalue(inObj);
  3561. else
  3562. return aerror("om-read: invalid OpenMath object.");
  3563. }
  3564. /**
  3565. * Will return the Lisp value true or false, depending on whether the named CD
  3566. * (the lcd parameter) is supported by this phrasebook.
  3567. */
  3568. Lisp_Object om_supportsCD(Lisp_Object nil, Lisp_Object lcd)
  3569. {
  3570. char *cd = NULL;
  3571. int len, i;
  3572. CSL_IGNORE(nil);
  3573. push(lcd);
  3574. if (!stringp(lcd))
  3575. return aerror("om-supportsCD: the argument must be a string");
  3576. errexitn(1);
  3577. cd = get_string_data(lcd, "om-supportsCD", &len);
  3578. errexitn(1);
  3579. if (cd == NULL)
  3580. return aerror("om-supportsCD: invalid CD name");
  3581. cd[len] = '\0';
  3582. for (i = 0; symTable[i].cd != NULL; i++) {
  3583. if (strcmp(symTable[i].cd, cd) == 0) {
  3584. pop(lcd);
  3585. return onevalue(StrToLspM("true"));
  3586. }
  3587. }
  3588. pop(lcd);
  3589. return onevalue(StrToLspM("false"));
  3590. }
  3591. /**
  3592. * Will return Lisp true or false, depending on whether the named symbol from
  3593. * the named CD is supported by this phrasebook.
  3594. */
  3595. Lisp_Object om_supportsSymbol(Lisp_Object nil, Lisp_Object lcd, Lisp_Object lsym)
  3596. {
  3597. char *cd = NULL;
  3598. char *sym = NULL;
  3599. int len, i;
  3600. CSL_IGNORE(nil);
  3601. push2(lcd, lsym);
  3602. if (!stringp(lcd))
  3603. return aerror("om-supportsSymbol: the content dictionary name must be a string");
  3604. else if (!stringp(lsym))
  3605. return aerror("om-supportsSymbol: the symbol name must be a string");
  3606. errexitn(2);
  3607. /* Note: there is a strange serial dependency in the following code. If
  3608. * the block which gets the CD of the symbol occurs before the block which
  3609. * gets the name of the symbol, the symbol name will be corrupted in some
  3610. * cases. Very odd. (VH) */
  3611. sym = get_string_data(lsym, "om-supportsSymbol received a corrupt symbol name", &len);
  3612. errexitn(2);
  3613. if (sym == NULL)
  3614. return aerror("om-supportsSymbol: invalid symbol name");
  3615. sym[len] = '\0';
  3616. cd = get_string_data(lcd, "om-supportsSymbol received a corrupt CD name", &len);
  3617. errexitn(2);
  3618. if (cd == NULL)
  3619. return aerror("om-supportsSymbol: invalid content dictionary name");
  3620. cd[len] = '\0';
  3621. pop2(lcd, lsym);
  3622. i = findOMSymbol(cd, sym);
  3623. if (i == -1)
  3624. return onevalue(StrToLspM("false"));
  3625. else
  3626. return onevalue(StrToLspM("true"));
  3627. }
  3628. /**
  3629. * Will return a list of the names of all CDs supported (partially or fully) by
  3630. * this phrasebook.
  3631. */
  3632. Lisp_Object MS_CDECL om_listCDs(Lisp_Object nil, int nargs, ...)
  3633. {
  3634. Lisp_Object lcds = nil;
  3635. Lisp_Object obj;
  3636. int i, j;
  3637. CSL_IGNORE(nil);
  3638. argcheck(nargs, 0, "om-listCDs: this function takes no arguments");
  3639. /* Find the end of the symbol table. */
  3640. for (i = 0; symTable[i].cd != NULL; i++) ;
  3641. /* Work backwards through the symbol table, consing new CD names into the
  3642. * list as they are encountered. */
  3643. j = i;
  3644. while (i > 0) {
  3645. i--;
  3646. if (symTable[j].cd == NULL && symTable[i].cd != NULL)
  3647. j = i;
  3648. else if (strcmp(symTable[i].cd, symTable[j].cd) != 0)
  3649. j = i;
  3650. if (j == i) {
  3651. lcds = cons(make_string(symTable[i].cd), lcds);
  3652. errexit();
  3653. }
  3654. }
  3655. obj = StrToLspM("construct");
  3656. errexit();
  3657. lcds = cons(obj, lcds);
  3658. errexit();
  3659. return onevalue(lcds);
  3660. }
  3661. /**
  3662. * Will return a list of all of the symbols from the named CD that are
  3663. * supported by this phrasebook.
  3664. */
  3665. Lisp_Object om_listSymbols(Lisp_Object nil, Lisp_Object lcd)
  3666. {
  3667. Lisp_Object lsyms = nil;
  3668. Lisp_Object obj;
  3669. char *cd = NULL;
  3670. int i, j, len;
  3671. CSL_IGNORE(nil);
  3672. push(lcd);
  3673. if (!stringp(lcd))
  3674. return aerror("om-listSymbols: the content dictionary name must be a string");
  3675. errexitn(1);
  3676. cd = get_string_data(lcd, "om-listSymbols", &len);
  3677. errexitn(1);
  3678. if (cd == NULL)
  3679. return aerror("om-listSymbols: invalid content dictionary name");
  3680. cd[len] = '\0';
  3681. for (i = 0; symTable[i].cd != NULL; i++) {
  3682. if (strcmp(symTable[i].cd, cd) == 0)
  3683. break;
  3684. }
  3685. if (symTable[i].cd == NULL) {
  3686. pop(lcd);
  3687. return nil;
  3688. }
  3689. for (j = i + 1; symTable[j].cd != NULL; j++) {
  3690. if (strcmp(symTable[j].cd, cd) != 0)
  3691. break;
  3692. }
  3693. for (j = j - 1; j >= i; j--) {
  3694. lsyms = cons(make_string(symTable[j].name), lsyms);
  3695. errexitn(1);
  3696. }
  3697. obj = StrToLspM("construct");
  3698. errexitn(1);
  3699. lsyms = cons(obj, lsyms);
  3700. errexitn(1);
  3701. pop(lcd);
  3702. return onevalue(lsyms);
  3703. }
  3704. /**
  3705. * This will return a list of the supported CDs that include the symbol with the
  3706. * given name.
  3707. */
  3708. Lisp_Object om_whichCDs(Lisp_Object nil, Lisp_Object lsym)
  3709. {
  3710. Lisp_Object lcds = nil;
  3711. Lisp_Object obj = nil;
  3712. char *sym = NULL;
  3713. int i, len;
  3714. CSL_IGNORE(nil);
  3715. push(lsym);
  3716. if (!stringp(lsym))
  3717. return aerror("om-whichCDs: symbol name must be a string");
  3718. errexitn(1);
  3719. sym = get_string_data(lsym, "om-whichCDs", &len);
  3720. errexitn(1);
  3721. if (sym == NULL)
  3722. return aerror("om-whichCDs: invalid symbol name");
  3723. sym[len] = '\0';
  3724. /* Find the end of the symbol table. */
  3725. for (i = 0; symTable[i].cd != NULL; i++) ;
  3726. while (i > 0) {
  3727. i--;
  3728. if (strcmp(symTable[i].name, sym) == 0) {
  3729. lcds = cons(make_string(symTable[i].cd), lcds);
  3730. errexitn(1);
  3731. }
  3732. }
  3733. obj = StrToLspM("construct");
  3734. errexitn(1);
  3735. lcds = cons(obj, lcds);
  3736. errexitn(1);
  3737. pop(lsym);
  3738. return onevalue(lcds);
  3739. }