xcrg_3.c 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062
  1. #include "globrig.h"
  2. #include "define.h"
  3. #include "defpage.h"
  4. #include "nef2.h"
  5. #include "c1.h"
  6. #include "usemod.h"
  7. #include "def180.h"
  8. #include "xcrg.h"
  9. /* R24 G_programma */
  10. /* R29 G_UNIT */
  11. /* R30 G_telo_glawn */
  12. /* R31 Print_name */
  13. /* R3 G_prawilo */
  14. /* R10 G_SIMPLE */
  15. /*===============================================*/
  16. /* GENERATED TEXT OF RULE #G_programma */
  17. Void r24(rez,success,pl)
  18. long *rez;boolean *success;ptr_ *pl;
  19. { a rez1; boolean success1; long k; mpd x;
  20. v loc3;/* $MAXWRK*/
  21. v loc4;/* $MAXPL*/
  22. v loc5;/* $MAX_FLAG*/
  23. v loc6;/* $MAXLABEL*/
  24. v loc7;/* $BODY*/
  25. v loc9;/* $PROCNAME*/
  26. v loc10;/* $EEE*/
  27. v wrk1;
  28. v oldglob24_1;
  29. v oldglob24_2;
  30. v oldglob24_3;
  31. ptr_ pl1;
  32. ptr_ pl2;
  33. boolean flag1;
  34. #ifdef XX
  35. d(1,"G_programma", 24 ,pl->cel,0);
  36. #endif
  37. /* sohranitx GLOB */
  38. oldglob24_1=glob24_1;
  39. oldglob24_2=glob24_2;
  40. oldglob24_3=glob24_3;
  41. /* branch */ pl1=*pl;rez1=NULL;success1=true;
  42. /* inicializaciq peremennyh */
  43. glob24_1.sa=NULL;
  44. glob24_3.sa=NULL;
  45. loc3.sa=NULL;/* $MAXWRK*/
  46. loc4.sa=NULL;/* $MAXPL*/
  47. loc5.sa=NULL;/* $MAX_FLAG*/
  48. loc6.sa=NULL;/* $MAXLABEL*/
  49. loc7.sa=NULL;/* $BODY*/
  50. glob24_2.sa=NULL;
  51. loc9.sa=NULL;/* $PROCNAME*/
  52. /* shablon atoma */ atmpat(acnst[52],&pl1,&rez1,&success1);
  53. if( !success1 ) goto _L105;
  54. /* shablon treemain */ rez1=pl1.cel;
  55. success1=false;if(pl1.nel==0 ) goto _L105;
  56. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  57. if (x.smld->dtype!= treemain )
  58. { rez1=NULL;goto _L105;};
  59. /* prowerka imeni */
  60. glob24_3 .sa=x.smld->name;
  61. ;};
  62. pl2.nel=1;pl2.ptrtype=ptrtree;
  63. success1=true;
  64. selop(acnst[53],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  65. if( rez1==NULL ) { success1=false;goto _L105;};
  66. /* shablon peremennoj */
  67. success1=(pl2.nel!=0);rez1=pl2.cel;
  68. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  69. loc3 .sa=rez1;
  70. if( !success1 ) goto _L105;
  71. selop(acnst[54],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  72. if( rez1==NULL ) { success1=false;goto _L105;};
  73. /* shablon peremennoj */
  74. success1=(pl2.nel!=0);rez1=pl2.cel;
  75. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  76. loc4 .sa=rez1;
  77. if( !success1 ) goto _L105;
  78. selop(acnst[55],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  79. if( rez1==NULL ) { success1=false;goto _L101;};
  80. /* shablon peremennoj */
  81. success1=(pl2.nel!=0);rez1=pl2.cel;
  82. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  83. loc5 .sa=rez1;
  84. if( !success1 ) goto _L101;
  85. _L101:success1=true;
  86. selop(acnst[56],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  87. if( rez1==NULL ) { success1=false;goto _L105;};
  88. /* shablon peremennoj */
  89. success1=(pl2.nel!=0);rez1=pl2.cel;
  90. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  91. loc6 .sa=rez1;
  92. if( !success1 ) goto _L105;
  93. selop(acnst[39],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  94. if( rez1==NULL ) { success1=false;goto _L102;};
  95. /* shablon peremennoj */
  96. success1=(pl2.nel!=0);rez1=pl2.cel;
  97. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  98. loc7 .sa=rez1;
  99. if( !success1 ) goto _L102;
  100. _L102:success1=true;
  101. if( success1 ) {
  102. rez1=pl1.cel;if( pl1.ptrtype!=ptrtree ) next(&pl1) ;}
  103. else { rez1=NULL;goto _L105 ;};
  104. opn(acnst[ 15 ], cnst[25] .sa ) ;xxx;
  105. outatm(acnst[15],"/* ****************************************** */",true, true);
  106. ;xxx;
  107. outatm(acnst[15],"/* rigal/pascal compiler */",true, true);
  108. ;xxx;
  109. outatm(acnst[15],"/* vax/vms & omsi/rsx & ms/dos & ms-windows */",true, true);
  110. ;xxx;
  111. outatm(acnst[15],"/* & unix/sun v 2.42/4.45 february 1996 */",true,
  112. true); ;xxx;
  113. outatm(acnst[15],"/* author M.Auguston,Riga */",true, true);
  114. ;xxx;
  115. outatm(acnst[15],"/* adaptation by V.Engelson ,Riga */",true, true);
  116. ;xxx;
  117. outatm(acnst[15],"/* sponsored by P.Fritzson, Linkoping */",true, true);
  118. ;xxx;
  119. outatm(acnst[15],"/* IMCS University of Latvia ,Riga (c) 1987-1996 */",true,
  120. true); ;xxx;
  121. outatm(acnst[15],"/* IDA Linkoping University, Sweden */",true, true);
  122. ;xxx;
  123. outatm(acnst[15],"/* ****************************************** */",true, true);
  124. ;xxx;
  125. outatm(acnst[15],"#include \"globrig.h\" ",true, true); ;xxx;
  126. outatm(acnst[15],"#include \"define.h\" ",true, true); ;xxx;
  127. outatm(acnst[15],"#include \"defpage.h\" ",true, true); ;xxx;
  128. outatm(acnst[15],"#include \"nef2.h\" ",true, true); ;xxx;
  129. outatm(acnst[15],"#include \"c1.h\" ",true, true); ;xxx;
  130. outatm(acnst[15],"#include \"usemod.h\" ",true, true); ;xxx;
  131. outatm(acnst[15],"#include \"def180.h\" ",true, true); ;xxx;
  132. outatm(acnst[15],"#include \"xcrg.h\" ",true, true); ;xxx;
  133. outatm(acnst[15],"#include \"xcrga.h\" ",true, true); ;xxx;
  134. outatm(acnst[15],"a rez1;boolean success1;long k;mpd x;",true, true); ;xxx;
  135. /* CALL #L */
  136. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=glob24_3.sa;
  137. pl2.plistsize= 1;
  138. r2(&wrk1.sa,&flag1,&pl2);/* #G_LOC_dekl*/ ;xxx;
  139. /* CALL #L */
  140. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=loc3.sa;
  141. pl2.plistsize= 1;
  142. r4(&wrk1.sa,&flag1,&pl2);/* #G_WRK_dekl*/ ;xxx;
  143. /* CALL #L */
  144. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=loc4.sa;
  145. pl2.plistsize= 1;
  146. r5(&wrk1.sa,&flag1,&pl2);/* #G_PL_dekl*/ ;xxx;
  147. /* CALL #L */
  148. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=loc5.sa;
  149. pl2.plistsize= 1;
  150. r6(&wrk1.sa,&flag1,&pl2);/* #G_FLAG_dekl*/ ;xxx;
  151. /* IF-operator */
  152. wrk1 .bo= numval( loc6 .sa) > 100L ;
  153. if( wrk1 .bo)
  154. {
  155. /* CALL #L */
  156. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=loc6.sa;
  157. pl2.plistsize= 1;
  158. r12(&wrk1.sa,&flag1,&pl2);/* #G_LABELS*/ ;xxx;
  159. ;}
  160. _L103:;xxx;
  161. /* operator := */
  162. glob24_2 .sa= glob24_3 .sa ;xxx;
  163. outatm(acnst[15],"main(argc, argv)",true, true); ;xxx;
  164. outatm(acnst[15],"int argc;Char *argv[];",true, true); ;xxx;
  165. outatm(acnst[15],"{ out = NULL; ",true, true); ;xxx;
  166. outatm(acnst[15]," g_argc=argc; g_argv=argv;",true, true); ;xxx;
  167. outatm(acnst[15]," prolog(argc,argv); acon(); acop();",true, true); ;xxx;
  168. /*FORALL-op.*/
  169. if( glob1_4.sa==NULL ) goto _L104;
  170. pointr ( glob1_4 .sa ,&x.sa);
  171. if( (x.smld->dtype!=listmain)&&(x.smld->dtype!=treemain)
  172. ) { er(24L);goto _L104;};
  173. first(glob1_4.sa,&pl2);
  174. while (pl2.nel!=0){
  175. if( pl2.ptrtype==ptrlist )
  176. {loc9.sa=pl2.cel;}
  177. else {
  178. mkatom(pl2.UU.U1.arc,idatom,&loc9.sa);
  179. ;};
  180. outxt(acnst[ 15 ], loc9 .sa , false, true);
  181. outatm(acnst[15],"();",false, true); ;xxx;
  182. next(&pl2) ;};_L104:/*END FORALL*/;xxx;
  183. /* CALL #L */
  184. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=glob24_3.sa;
  185. pl2.plistsize= 1;
  186. r9(&wrk1.sa,&flag1,&pl2);/* #G_INIT_VARS*/ ;xxx;
  187. /* CALL #L */
  188. pl2.ptrtype=ptrlist;pl2.nel=0;pl2.cel=NULL;
  189. r50(&wrk1.sa,&flag1,&pl2);/* #G_INIT_GLOB*/ ;xxx;
  190. /* CALL #L */
  191. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=loc7.sa;
  192. pl2.plistsize= 1;
  193. r30(&wrk1.sa,&flag1,&pl2);/* #G_telo_glawn*/ ;xxx;
  194. outatm(acnst[15]," _L98:;",true, true); ;xxx;
  195. outatm(acnst[15]," _L99: epilog();",true, true); ;xxx;
  196. outatm(acnst[15]," if(out!=NULL) fclose(out);exit(0);",true, true); ;xxx;
  197. outatm(acnst[15]," } ",true, true); ;xxx;
  198. clsfil(acnst[ 15 ]) ;xxx;
  199. goto _L99; _L105:; /* metka wyhoda po neuspehu wetwi */
  200. /* branch */ pl1=*pl;rez1=NULL;success1=true;
  201. /* inicializaciq peremennyh */
  202. glob24_1.sa=NULL;
  203. glob24_3.sa=NULL;
  204. glob24_2.sa=NULL;
  205. /* shablon atoma */ atmpat(acnst[57],&pl1,&rez1,&success1);
  206. if( !success1 ) goto _L106;
  207. /* shablon listmain */ rez1=pl1.cel;
  208. success1=false;if(pl1.nel==0 ) goto _L106;
  209. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  210. if (x.smld->dtype!= listmain )
  211. { rez1=NULL;goto _L106;};
  212. {pl2.ptrtype=ptrlist; pl2.nel=1;
  213. pl2.cel=x.smld->elt[0];pl2.UU.U1.curfragment=rez1;}
  214. ;} else
  215. {pl2.ptrtype=ptrlist;pl2.nel=0;pl2.cel=NULL;}
  216. /* shablon prawila */ r29(&rez1,&success1,&pl2);
  217. if( !success1 ) goto _L106;
  218. if( pl2.nel !=0 )
  219. { success1=false;rez1=NULL;goto _L106;};
  220. success1=true;rez1=pl1.cel;
  221. if( pl1.ptrtype!=ptrtree ) next(&pl1);
  222. goto _L99; _L106:; /* metka wyhoda po neuspehu wetwi */
  223. /* branch */ pl1=*pl;rez1=NULL;success1=true;
  224. /* inicializaciq peremennyh */
  225. glob24_1.sa=NULL;
  226. glob24_3.sa=NULL;
  227. glob24_2.sa=NULL;
  228. /* shablon atoma */ atmpat(acnst[58],&pl1,&rez1,&success1);
  229. if( !success1 ) goto _L107;
  230. /* shablon listmain */ rez1=pl1.cel;
  231. success1=false;if(pl1.nel==0 ) goto _L107;
  232. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  233. if (x.smld->dtype!= listmain )
  234. { rez1=NULL;goto _L107;};
  235. {pl2.ptrtype=ptrlist; pl2.nel=1;
  236. pl2.cel=x.smld->elt[0];pl2.UU.U1.curfragment=rez1;}
  237. ;} else
  238. {pl2.ptrtype=ptrlist;pl2.nel=0;pl2.cel=NULL;}
  239. /* shablon peremennoj */
  240. success1=(pl2.nel!=0);rez1=pl2.cel;
  241. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  242. loc10 .sa=rez1;
  243. if( !success1 ) goto _L107;
  244. /* shablon prawila */ r29(&rez1,&success1,&pl2);
  245. if( !success1 ) goto _L107;
  246. if( pl2.nel !=0 )
  247. { success1=false;rez1=NULL;goto _L107;};
  248. success1=true;rez1=pl1.cel;
  249. if( pl1.ptrtype!=ptrtree ) next(&pl1);
  250. goto _L99; _L107:; /* metka wyhoda po neuspehu wetwi */
  251. _L99: rez1=NULL;
  252. _L98: *rez=rez1;*success=success1;
  253. if (*success) *pl=pl1; /* prodwinutx ukazatelx leksem */
  254. /* wosstanowitx GLOB */
  255. glob24_1=oldglob24_1;
  256. glob24_2=oldglob24_2;
  257. glob24_3=oldglob24_3;
  258. #ifdef XX
  259. d(2,"G_programma", 24 ,*rez,*success);
  260. #endif
  261. ;};/* RULE */
  262. /*===============================================*/
  263. /* GENERATED TEXT OF RULE #G_UNIT */
  264. Void r29(rez,success,pl)
  265. long *rez;boolean *success;ptr_ *pl;
  266. { a rez1; boolean success1; long k; mpd x;
  267. v loc1;/* $FN*/
  268. v loc2;/* $imq*/
  269. v loc3;/* $MAXWRK*/
  270. v loc4;/* $CURRENT*/
  271. v wrk1;
  272. v wrk2;
  273. ptr_ pl1;
  274. ptr_ pl2;
  275. ptr_ pl3;
  276. boolean flag1;
  277. #ifdef XX
  278. d(1,"G_UNIT", 29 ,pl->cel,0);
  279. #endif
  280. /* sohranitx GLOB */
  281. /* branch */ pl1=*pl;rez1=NULL;success1=true;
  282. /* inicializaciq peremennyh */
  283. loc1.sa=NULL;/* $FN*/
  284. loc2.sa=NULL;/* $imq*/
  285. /* operator := */
  286. wrk2 .sa=NULL;
  287. lconc(& wrk2 .sa , cnst[26] .sa );
  288. indxop( 3L,false,NULL, glob1_5 .sa ,& wrk1 .sa);
  289. lconc(& wrk2 .sa , wrk1 .sa );
  290. first(wrk2.sa,&pl2);implod(&pl2,&wrk2.sa);
  291. loc1 .sa= wrk2 .sa ;xxx;
  292. wrk1 .sa=NULL;
  293. lconc(& wrk1 .sa , loc1 .sa );
  294. lconc(& wrk1 .sa , cnst[27] .sa );
  295. first(wrk1.sa,&pl2);implod(&pl2,&wrk1.sa);
  296. opn(acnst[ 15 ], wrk1 .sa ) ;xxx;
  297. outatm(acnst[15],"#include \"globrig.h\"",true, true); ;xxx;
  298. outatm(acnst[15],"#include \"define.h\" ",true, true); ;xxx;
  299. outatm(acnst[15],"#include \"defpage.h\"",true, true); ;xxx;
  300. outatm(acnst[15],"#include \"nef2.h\" ",true, true); ;xxx;
  301. outatm(acnst[15],"#include \"c1.h\" ",true, true); ;xxx;
  302. outatm(acnst[15],"#include \"usemod.h\" ",true, true); ;xxx;
  303. outatm(acnst[15],"#include \"def180.h\" ",true, true); ;xxx;
  304. outatm(acnst[15],"#include \"xcrg.h\" ",true, true); ;xxx;
  305. /*shablon STARLIST */
  306. pl2=pl1;while(pl1.nel!=0 ) {
  307. /* shablon treemain */ rez1=pl1.cel;
  308. success1=false;if(pl1.nel==0 ) goto _L102;
  309. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  310. if (x.smld->dtype!= treemain )
  311. { rez1=NULL;goto _L102;};
  312. /* prowerka imeni */
  313. loc2 .sa=x.smld->name;
  314. ;};
  315. pl3.nel=1;pl3.ptrtype=ptrtree;
  316. success1=true;
  317. selop(acnst[53],false,0L,pl1.cel,&rez1);pl3.cel=rez1;
  318. if( rez1==NULL ) { success1=false;goto _L101;};
  319. /* shablon peremennoj */
  320. success1=(pl3.nel!=0);rez1=pl3.cel;
  321. if( (pl3.ptrtype!=ptrtree) && success1 ) next(&pl3);
  322. loc3 .sa=rez1;
  323. if( !success1 ) goto _L101;
  324. _L101:success1=true;
  325. if( success1 ) {
  326. rez1=pl1.cel;if( pl1.ptrtype!=ptrtree ) next(&pl1) ;}
  327. else { rez1=NULL;goto _L102 ;};
  328. outxt(acnst[ 15 ], cnst[28] .sa , true, false);
  329. selop( 0L,true, loc2 .sa, glob1_3 .sa ,& wrk1 .sa);
  330. outxt(acnst[ 15 ], wrk1 .sa , false, false);
  331. outatm(acnst[15]," ",false, false); ;xxx;
  332. /* CALL #L */
  333. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=loc2.sa;
  334. pl3.plistsize= 1;
  335. r31(&wrk1.sa,&flag1,&pl3);/* #Print_name*/ ;xxx;
  336. outatm(acnst[15]," */",false, true); ;xxx;
  337. pl2=pl1;
  338. ;};
  339. _L102:if( ! success1 )pl1=pl2;
  340. success1 = true ;
  341. /* FAIL */ rez1=NULL;success1=false;
  342. if (pl1.ptrtype!=ptrtree) next(&pl1); /*wyhod iz der.ili sp.*/
  343. goto _L103;xxx;
  344. goto _L99; _L103:; /* metka wyhoda po neuspehu wetwi */
  345. /* branch */ pl1=*pl;rez1=NULL;success1=true;
  346. /* inicializaciq peremennyh */
  347. loc4.sa=NULL;/* $CURRENT*/
  348. /*shablon STARLIST */
  349. pl2=pl1;while(pl1.nel!=0 ) {
  350. /* operator +:= */
  351. addnum(& loc4 .sa, 1L ) ;xxx;
  352. /* shablon prawila */ r3(&rez1,&success1,&pl1);
  353. if( !success1 ) goto _L104;
  354. pl2=pl1;
  355. ;};
  356. _L104:if( ! success1 )pl1=pl2;
  357. success1 = true ;
  358. clsfil(acnst[ 15 ]) ;xxx;
  359. goto _L99; _L105:; /* metka wyhoda po neuspehu wetwi */
  360. _L99: rez1=NULL;
  361. _L98: *rez=rez1;*success=success1;
  362. if (*success) *pl=pl1; /* prodwinutx ukazatelx leksem */
  363. /* wosstanowitx GLOB */
  364. #ifdef XX
  365. d(2,"G_UNIT", 29 ,*rez,*success);
  366. #endif
  367. ;};/* RULE */
  368. /*===============================================*/
  369. /* GENERATED TEXT OF RULE #G_telo_glawn */
  370. Void r30(rez,success,pl)
  371. long *rez;boolean *success;ptr_ *pl;
  372. { a rez1; boolean success1; long k; mpd x;
  373. v loc1;/* $total*/
  374. v wrk1;
  375. v wrk2;
  376. v oldglob30_1;
  377. ptr_ pl1;
  378. ptr_ pl2;
  379. ptr_ pl3;
  380. boolean flag1;
  381. #ifdef XX
  382. d(1,"G_telo_glawn", 30 ,pl->cel,0);
  383. #endif
  384. /* sohranitx GLOB */
  385. oldglob30_1=glob30_1;
  386. glob30_1.sa=pl->cel;
  387. /* branch */ pl1=*pl;rez1=NULL;success1=true;
  388. /* inicializaciq peremennyh */
  389. loc1.sa=NULL;/* $total*/
  390. /* operator := */
  391. bltin(&wrk1,&flag1,glob30_1.sa,15L);
  392. mknumb( wrk1 .nu ,& wrk2 .sa);
  393. loc1 .sa= wrk2 .sa ;xxx;
  394. /* shablon listmain */ rez1=pl1.cel;
  395. success1=false;if(pl1.nel==0 ) goto _L102;
  396. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  397. if (x.smld->dtype!= listmain )
  398. { rez1=NULL;goto _L102;};
  399. {pl2.ptrtype=ptrlist; pl2.nel=1;
  400. pl2.cel=x.smld->elt[0];pl2.UU.U1.curfragment=rez1;}
  401. ;} else
  402. {pl2.ptrtype=ptrlist;pl2.nel=0;pl2.cel=NULL;}
  403. /*shablon STARLIST */
  404. pl3=pl2;while(pl2.nel!=0 ) {
  405. /* shablon prawila */ r63(&rez1,&success1,&pl2);
  406. if( !success1 ) goto _L101;
  407. /* operator +:= */
  408. wrk1 .nu=- 1L ;
  409. addnum(& loc1 .sa, wrk1 .nu ) ;xxx;
  410. pl3=pl2;
  411. ;};
  412. _L101:if( ! success1 )pl2=pl3;
  413. success1 = true ;
  414. if( pl2.nel !=0 )
  415. { success1=false;rez1=NULL;goto _L102;};
  416. success1=true;rez1=pl1.cel;
  417. if( pl1.ptrtype!=ptrtree ) next(&pl1);
  418. goto _L99; _L102:; /* metka wyhoda po neuspehu wetwi */
  419. _L99: rez1=NULL;
  420. _L98: *rez=rez1;*success=success1;
  421. if (*success) *pl=pl1; /* prodwinutx ukazatelx leksem */
  422. /* wosstanowitx GLOB */
  423. glob30_1=oldglob30_1;
  424. #ifdef XX
  425. d(2,"G_telo_glawn", 30 ,*rez,*success);
  426. #endif
  427. ;};/* RULE */
  428. /*===============================================*/
  429. /* GENERATED TEXT OF RULE #Print_name */
  430. Void r31(rez,success,pl)
  431. long *rez;boolean *success;ptr_ *pl;
  432. { a rez1; boolean success1; long k; mpd x;
  433. v loc1;/* $imq*/
  434. v loc2;/* $EXPL*/
  435. v loc3;/* $LETTER*/
  436. v wrk1;
  437. ptr_ pl1;
  438. ptr_ pl2;
  439. boolean flag1;
  440. #ifdef XX
  441. d(1,"Print_name", 31 ,pl->cel,0);
  442. #endif
  443. /* sohranitx GLOB */
  444. /* branch */ pl1=*pl;rez1=NULL;success1=true;
  445. /* inicializaciq peremennyh */
  446. loc1.sa=NULL;/* $imq*/
  447. loc2.sa=NULL;/* $EXPL*/
  448. loc3.sa=NULL;/* $LETTER*/
  449. /* shablon peremennoj */
  450. success1=(pl1.nel!=0);rez1=pl1.cel;
  451. if( (pl1.ptrtype!=ptrtree) && success1 ) next(&pl1);
  452. loc1 .sa=rez1;
  453. if( !success1 ) goto _L104;
  454. /* operator := */
  455. if( loc1 .sa ==NULL ) wrk1 .sa=NULL; else explod( loc1 .sa ,& wrk1 .sa) ;
  456. loc2 .sa= wrk1 .sa ;xxx;
  457. /*FORALL-op.*/
  458. if( loc2.sa==NULL ) goto _L103;
  459. pointr ( loc2 .sa ,&x.sa);
  460. if( (x.smld->dtype!=listmain)&&(x.smld->dtype!=treemain)
  461. ) { er(24L);goto _L103;};
  462. first(loc2.sa,&pl2);
  463. while (pl2.nel!=0){
  464. if( pl2.ptrtype==ptrlist )
  465. {loc3.sa=pl2.cel;}
  466. else {
  467. mkatom(pl2.UU.U1.arc,idatom,&loc3.sa);
  468. ;};
  469. /* IF-operator */
  470. /* operaciq = */ wrk1 .bo= eqatom( loc3 .sa ,acnst[ 59 ]) ;
  471. if( wrk1 .bo)
  472. {
  473. /* operator := */
  474. loc3 .sa= cnst[29] .sa ;xxx;
  475. ;}
  476. _L101:;xxx;
  477. /* IF-operator */
  478. /* operaciq = */ wrk1 .bo= eqatom( loc3 .sa ,acnst[ 60 ]) ;
  479. if( wrk1 .bo)
  480. {
  481. /* operator := */
  482. loc3 .sa= cnst[30] .sa ;xxx;
  483. ;}
  484. _L102:;xxx;
  485. outxt(acnst[ 15 ], loc3 .sa , false, false); ;xxx;
  486. next(&pl2) ;};_L103:/*END FORALL*/;xxx;
  487. goto _L99; _L104:; /* metka wyhoda po neuspehu wetwi */
  488. _L99: rez1=NULL;
  489. _L98: *rez=rez1;*success=success1;
  490. if (*success) *pl=pl1; /* prodwinutx ukazatelx leksem */
  491. /* wosstanowitx GLOB */
  492. #ifdef XX
  493. d(2,"Print_name", 31 ,*rez,*success);
  494. #endif
  495. ;};/* RULE */
  496. /*===============================================*/
  497. /* GENERATED TEXT OF RULE #G_prawilo */
  498. Void r3(rez,success,pl)
  499. long *rez;boolean *success;ptr_ *pl;
  500. { a rez1; boolean success1; long k; mpd x;
  501. v loc2;/* $MAXWRK*/
  502. v loc3;/* $MAXLABEL*/
  503. v loc4;/* $MAX_FLAG*/
  504. v loc5;/* $MAXPL*/
  505. v loc6;/* $NUM*/
  506. v loc7;/* $FN*/
  507. v loc8;/* $X*/
  508. v loc10;/* $E*/
  509. v wrk1;
  510. v wrk2;
  511. v oldglob3_1;
  512. v oldglob3_2;
  513. v oldglob3_3;
  514. ptr_ pl1;
  515. ptr_ pl2;
  516. ptr_ pl3;
  517. ptr_ pl4;
  518. ptr_ pl5;
  519. ptr_ pl6;
  520. ptr_ pl7;
  521. boolean flag1;
  522. #ifdef XX
  523. d(1,"G_prawilo", 3 ,pl->cel,0);
  524. #endif
  525. /* sohranitx GLOB */
  526. oldglob3_1=glob3_1;
  527. oldglob3_2=glob3_2;
  528. oldglob3_3=glob3_3;
  529. glob3_1.sa=pl->cel;
  530. /* branch */ pl1=*pl;rez1=NULL;success1=true;
  531. /* inicializaciq peremennyh */
  532. glob3_2.sa=NULL;
  533. loc2.sa=NULL;/* $MAXWRK*/
  534. loc3.sa=NULL;/* $MAXLABEL*/
  535. loc4.sa=NULL;/* $MAX_FLAG*/
  536. loc5.sa=NULL;/* $MAXPL*/
  537. loc6.sa=NULL;/* $NUM*/
  538. loc7.sa=NULL;/* $FN*/
  539. loc8.sa=NULL;/* $X*/
  540. glob3_3.sa=NULL;
  541. loc10.sa=NULL;/* $E*/
  542. /* shablon treemain */ rez1=pl1.cel;
  543. success1=false;if(pl1.nel==0 ) goto _L108;
  544. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  545. if (x.smld->dtype!= treemain )
  546. { rez1=NULL;goto _L108;};
  547. /* prowerka imeni */
  548. glob3_2 .sa=x.smld->name;
  549. ;};
  550. pl2.nel=1;pl2.ptrtype=ptrtree;
  551. success1=true;
  552. selop(acnst[53],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  553. if( rez1==NULL ) { success1=false;goto _L108;};
  554. /* shablon peremennoj */
  555. success1=(pl2.nel!=0);rez1=pl2.cel;
  556. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  557. loc2 .sa=rez1;
  558. if( !success1 ) goto _L108;
  559. selop(acnst[56],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  560. if( rez1==NULL ) { success1=false;goto _L108;};
  561. /* shablon peremennoj */
  562. success1=(pl2.nel!=0);rez1=pl2.cel;
  563. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  564. loc3 .sa=rez1;
  565. if( !success1 ) goto _L108;
  566. selop(acnst[55],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  567. if( rez1==NULL ) { success1=false;goto _L108;};
  568. /* shablon peremennoj */
  569. success1=(pl2.nel!=0);rez1=pl2.cel;
  570. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  571. loc4 .sa=rez1;
  572. if( !success1 ) goto _L108;
  573. selop(acnst[54],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  574. if( rez1==NULL ) { success1=false;goto _L108;};
  575. /* shablon peremennoj */
  576. success1=(pl2.nel!=0);rez1=pl2.cel;
  577. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  578. loc5 .sa=rez1;
  579. if( !success1 ) goto _L108;
  580. /* operator := */
  581. selop( 0L,true, glob3_2 .sa, glob1_3 .sa ,& wrk1 .sa);
  582. loc6 .sa= wrk1 .sa ;xxx;
  583. /* operator := */
  584. wrk1 .sa=NULL;
  585. lconc(& wrk1 .sa , cnst[26] .sa );
  586. lconc(& wrk1 .sa , loc6 .sa );
  587. first(wrk1.sa,&pl3);implod(&pl3,&wrk1.sa);
  588. loc7 .sa= wrk1 .sa ;xxx;
  589. /* operator := */
  590. glob24_2 .sa= glob3_2 .sa ;xxx;
  591. outatm(acnst[15],"/*===============================================*/",true,
  592. true); ;xxx;
  593. outatm(acnst[15],"/* GENERATED TEXT OF RULE #",true, false); ;xxx;
  594. /* CALL #L */
  595. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=glob3_2.sa;
  596. pl3.plistsize= 1;
  597. r31(&wrk1.sa,&flag1,&pl3);/* #Print_name*/ ;xxx;
  598. outatm(acnst[15]," */",false, true); ;xxx;
  599. outatm(acnst[15]," Void r",true, false);
  600. outxt(acnst[ 15 ], loc6 .sa , false, false);
  601. outatm(acnst[15],"(rez,success,pl)",false, false); ;xxx;
  602. outatm(acnst[15],"long *rez;boolean *success;ptr_ *pl;",true, true); ;xxx;
  603. outatm(acnst[15],"{ a rez1; boolean success1; long k; mpd x;",true, true);
  604. ;xxx;
  605. /* CALL #L */
  606. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=glob3_2.sa;
  607. pl3.plistsize= 1;
  608. r2(&wrk1.sa,&flag1,&pl3);/* #G_LOC_dekl*/ ;xxx;
  609. /* CALL #L */
  610. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=loc2.sa;
  611. pl3.plistsize= 1;
  612. r4(&wrk1.sa,&flag1,&pl3);/* #G_WRK_dekl*/ ;xxx;
  613. /* CALL #L */
  614. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=glob3_2.sa;
  615. pl3.plistsize= 1;
  616. r7(&wrk1.sa,&flag1,&pl3);/* #G_OLDGLOB_dekl*/ ;xxx;
  617. /* CALL #L */
  618. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=loc5.sa;
  619. pl3.plistsize= 1;
  620. r5(&wrk1.sa,&flag1,&pl3);/* #G_PL_dekl*/ ;xxx;
  621. /* CALL #L */
  622. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=loc4.sa;
  623. pl3.plistsize= 1;
  624. r6(&wrk1.sa,&flag1,&pl3);/* #G_FLAG_dekl*/ ;xxx;
  625. /* CALL #L */
  626. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=loc3.sa;
  627. pl3.plistsize= 1;
  628. r12(&wrk1.sa,&flag1,&pl3);/* #G_LABELS*/ ;xxx;
  629. outatm(acnst[15],"#ifdef XX ",true, true); ;xxx;
  630. outatm(acnst[15]," d(1,\"",true, false); ;xxx;
  631. /* CALL #L */
  632. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=glob3_2.sa;
  633. pl3.plistsize= 1;
  634. r31(&wrk1.sa,&flag1,&pl3);/* #Print_name*/ ;xxx;
  635. outatm(acnst[15],"\",",false, true);
  636. outxt(acnst[ 15 ], loc6 .sa , false, true);
  637. outatm(acnst[15],",pl->cel,0);",false, true); ;xxx;
  638. outatm(acnst[15],"#endif",true, true); ;xxx;
  639. /* CALL #L */
  640. pl3.ptrtype=packedlist;pl3.nel=1;pl3.cel=glob3_2.sa;
  641. pl3.UU.plistelt[ 0 ]=cnst[31].sa;
  642. pl3.plistsize= 2;
  643. r8(&wrk1.sa,&flag1,&pl3);/* #G_sohranitx_GLOB*/ ;xxx;
  644. /* operator := */
  645. selop( 0L,true, glob3_2 .sa, glob1_2 .sa ,& wrk1 .sa);
  646. selop( acnst[ 13 ],false,NULL, wrk1 .sa ,& wrk2 .sa);
  647. loc8 .sa= wrk2 .sa ;xxx;
  648. /* IF-operator */
  649. if( loc8 .sa!=NULL)
  650. {
  651. outatm(acnst[15],"glob",true, false);
  652. outxt(acnst[ 15 ], loc6 .sa , false, false);
  653. outatm(acnst[15],"_",false, false);
  654. outxt(acnst[ 15 ], loc8 .sa , false, false);
  655. outatm(acnst[15],".sa=pl->cel;",false, false); ;xxx;
  656. goto _L101;
  657. ;}
  658. selop( acnst[ 14 ],false,NULL, glob3_1 .sa ,& wrk1 .sa);
  659. if( wrk1 .sa!=NULL)
  660. {
  661. outatm(acnst[15],"loc0.sa=pl->cel;",true, true); ;xxx;
  662. ;}
  663. _L101:;xxx;
  664. /* operator := */
  665. mknumb( 1L,& wrk1 .sa);
  666. glob3_3 .sa= wrk1 .sa ;xxx;
  667. selop(acnst[39],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  668. if( rez1==NULL ) { success1=false;goto _L108;};
  669. /* shablon listmain */ rez1=pl2.cel;
  670. success1=false;if(pl2.nel==0 ) goto _L108;
  671. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  672. if (x.smld->dtype!= listmain )
  673. { rez1=NULL;goto _L108;};
  674. {pl3.ptrtype=ptrlist; pl3.nel=1;
  675. pl3.cel=x.smld->elt[0];pl3.UU.U1.curfragment=rez1;}
  676. ;} else
  677. {pl3.ptrtype=ptrlist;pl3.nel=0;pl3.cel=NULL;}
  678. /*shablon STARLIST */
  679. pl4=pl3;while(pl3.nel!=0 ) {
  680. /* Alternative pattern */
  681. pl5=pl3;
  682. /* nonatomic alternative branches */
  683. /* shablon prawila */ r10(&rez1,&success1,&pl3);
  684. if( !success1 ) goto _L102;
  685. goto _L106/*uspeh*/;
  686. _L102:;
  687. pl3=pl5;
  688. /* Alternative pattern */
  689. pl6=pl3;
  690. /* shablon treemain */ rez1=pl3.cel;
  691. success1=false;if(pl3.nel==0 ) goto _L103;
  692. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  693. if (x.smld->dtype!= treemain )
  694. { rez1=NULL;goto _L103;};
  695. ;};
  696. pl7.nel=1;pl7.ptrtype=ptrtree;
  697. success1=true;
  698. selop(acnst[38],false,0L,pl3.cel,&rez1);pl7.cel=rez1;
  699. if( rez1==NULL ) { success1=false;goto _L103;};
  700. /* shablon peremennoj */
  701. success1=(pl7.nel!=0);rez1=pl7.cel;
  702. if( (pl7.ptrtype!=ptrtree) && success1 ) next(&pl7);
  703. loc10 .sa=rez1;
  704. if( !success1 ) goto _L103;
  705. if( success1 ) {
  706. rez1=pl3.cel;if( pl3.ptrtype!=ptrtree ) next(&pl3) ;}
  707. else { rez1=NULL;goto _L103 ;};
  708. outatm(acnst[15],"_L",true, false);
  709. outxt(acnst[ 15 ], loc10 .sa , false, false);
  710. outatm(acnst[15],":;",false, false); ;xxx;
  711. goto _L104/*uspeh*/;
  712. _L103:;
  713. pl3=pl6;
  714. goto _L105;
  715. _L104:;/*uspeh alxtern.*/
  716. goto _L106/*uspeh*/;
  717. _L105:;
  718. pl3=pl5;
  719. goto _L107;
  720. _L106:;/*uspeh alxtern.*/
  721. pl4=pl3;
  722. ;};
  723. _L107:if( ! success1 )pl3=pl4;
  724. success1 = true ;
  725. if( pl3.nel !=0 )
  726. { success1=false;rez1=NULL;goto _L108;};
  727. success1=true;rez1=pl2.cel;
  728. if( pl2.ptrtype!=ptrtree ) next(&pl2);
  729. if( success1 ) {
  730. rez1=pl1.cel;if( pl1.ptrtype!=ptrtree ) next(&pl1) ;}
  731. else { rez1=NULL;goto _L108 ;};
  732. /* CALL #L */
  733. pl2.ptrtype=ptrlist;pl2.nel=0;pl2.cel=NULL;
  734. r54(&wrk1.sa,&flag1,&pl2);/* #ss6*/ ;xxx;
  735. /* CALL #L */
  736. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=glob3_2.sa;
  737. pl2.UU.plistelt[ 0 ]=NULL;
  738. pl2.plistsize= 2;
  739. r8(&wrk1.sa,&flag1,&pl2);/* #G_sohranitx_GLOB*/ ;xxx;
  740. outatm(acnst[15],"#ifdef XX ",true, true); ;xxx;
  741. outatm(acnst[15]," d(2,\"",true, false); ;xxx;
  742. /* CALL #L */
  743. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=glob3_2.sa;
  744. pl2.plistsize= 1;
  745. r31(&wrk1.sa,&flag1,&pl2);/* #Print_name*/ ;xxx;
  746. outatm(acnst[15],"\",",false, true);
  747. outxt(acnst[ 15 ], loc6 .sa , false, true);
  748. outatm(acnst[15],",*rez,*success);",false, true); ;xxx;
  749. outatm(acnst[15],"#endif",true, true); ;xxx;
  750. outatm(acnst[15],";};/* RULE */",true, true); ;xxx;
  751. goto _L99; _L108:; /* metka wyhoda po neuspehu wetwi */
  752. _L99: rez1=NULL;
  753. _L98: *rez=rez1;*success=success1;
  754. if (*success) *pl=pl1; /* prodwinutx ukazatelx leksem */
  755. /* wosstanowitx GLOB */
  756. glob3_1=oldglob3_1;
  757. glob3_2=oldglob3_2;
  758. glob3_3=oldglob3_3;
  759. #ifdef XX
  760. d(2,"G_prawilo", 3 ,*rez,*success);
  761. #endif
  762. ;};/* RULE */
  763. /*===============================================*/
  764. /* GENERATED TEXT OF RULE #G_SIMPLE */
  765. Void r10(rez,success,pl)
  766. long *rez;boolean *success;ptr_ *pl;
  767. { a rez1; boolean success1; long k; mpd x;
  768. v wrk1;
  769. v oldglob10_1;
  770. v oldglob10_2;
  771. v oldglob10_3;
  772. v oldglob10_4;
  773. ptr_ pl1;
  774. ptr_ pl2;
  775. ptr_ pl3;
  776. ptr_ pl4;
  777. ptr_ pl5;
  778. boolean flag1;
  779. #ifdef XX
  780. d(1,"G_SIMPLE", 10 ,pl->cel,0);
  781. #endif
  782. /* sohranitx GLOB */
  783. oldglob10_1=glob10_1;
  784. oldglob10_2=glob10_2;
  785. oldglob10_3=glob10_3;
  786. oldglob10_4=glob10_4;
  787. glob10_1.sa=pl->cel;
  788. /* branch */ pl1=*pl;rez1=NULL;success1=true;
  789. /* inicializaciq peremennyh */
  790. glob10_2.sa=NULL;
  791. glob10_4.sa=NULL;
  792. glob10_3.sa=NULL;
  793. /* CALL #L */
  794. pl2.ptrtype=ptrlist;pl2.nel=0;pl2.cel=NULL;
  795. r55(&wrk1.sa,&flag1,&pl2);/* #ss7*/ ;xxx;
  796. /* CALL #L */
  797. pl2.ptrtype=packedlist;pl2.nel=1;pl2.cel=glob3_2.sa;
  798. pl2.plistsize= 1;
  799. r9(&wrk1.sa,&flag1,&pl2);/* #G_INIT_VARS*/ ;xxx;
  800. /* shablon treemain */ rez1=pl1.cel;
  801. success1=false;if(pl1.nel==0 ) goto _L107;
  802. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  803. if (x.smld->dtype!= treemain )
  804. { rez1=NULL;goto _L107;};
  805. ;};
  806. pl2.nel=1;pl2.ptrtype=ptrtree;
  807. success1=true;
  808. selop(acnst[38],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  809. if( rez1==NULL ) { success1=false;goto _L107;};
  810. /* shablon peremennoj */
  811. success1=(pl2.nel!=0);rez1=pl2.cel;
  812. if( (pl2.ptrtype!=ptrtree) && success1 ) next(&pl2);
  813. glob10_2 .sa=rez1;
  814. if( !success1 ) goto _L107;
  815. /* operator := */
  816. glob10_4 .sa= glob10_2 .sa ;xxx;
  817. selop(acnst[39],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  818. if( rez1==NULL ) { success1=false;goto _L107;};
  819. /* operator := */
  820. mknumb( 0L,& wrk1 .sa);
  821. glob10_3 .sa= wrk1 .sa ;xxx;
  822. /* shablon listmain */ rez1=pl2.cel;
  823. success1=false;if(pl2.nel==0 ) goto _L107;
  824. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  825. if (x.smld->dtype!= listmain )
  826. { rez1=NULL;goto _L107;};
  827. {pl3.ptrtype=ptrlist; pl3.nel=1;
  828. pl3.cel=x.smld->elt[0];pl3.UU.U1.curfragment=rez1;}
  829. ;} else
  830. {pl3.ptrtype=ptrlist;pl3.nel=0;pl3.cel=NULL;}
  831. /*shablon STARLIST */
  832. pl4=pl3;while(pl3.nel!=0 ) {
  833. /* Alternative pattern */
  834. pl5=pl3;
  835. /* nonatomic alternative branches */
  836. /* shablon prawila */ r69(&rez1,&success1,&pl3);
  837. if( !success1 ) goto _L101;
  838. goto _L103/*uspeh*/;
  839. _L101:;
  840. pl3=pl5;
  841. /* shablon prawila */ r63(&rez1,&success1,&pl3);
  842. if( !success1 ) goto _L102;
  843. goto _L103/*uspeh*/;
  844. _L102:;
  845. pl3=pl5;
  846. goto _L104;
  847. _L103:;/*uspeh alxtern.*/
  848. pl4=pl3;
  849. ;};
  850. _L104:if( ! success1 )pl3=pl4;
  851. success1 = true ;
  852. outatm(acnst[15],"goto _L99; _L",true, false);
  853. outxt(acnst[ 15 ], glob10_2 .sa , false, false);
  854. outatm(acnst[15],":;",false, false);
  855. outatm(acnst[15]," /* metka wyhoda po neuspehu wetwi */",false, false); ;xxx;
  856. if( pl3.nel !=0 )
  857. { success1=false;rez1=NULL;goto _L107;};
  858. success1=true;rez1=pl2.cel;
  859. if( pl2.ptrtype!=ptrtree ) next(&pl2);
  860. selop(acnst[61],false,0L,pl1.cel,&rez1);pl2.cel=rez1;
  861. if( rez1==NULL ) { success1=false;goto _L105;};
  862. outatm(acnst[15],"/* ONFAIL-dejstwiq */",true, true); ;xxx;
  863. /* shablon listmain */ rez1=pl2.cel;
  864. success1=false;if(pl2.nel==0 ) goto _L105;
  865. if (rez1!=NULL ) { pointr(rez1,&x.sa);
  866. if (x.smld->dtype!= listmain )
  867. { rez1=NULL;goto _L105;};
  868. {pl3.ptrtype=ptrlist; pl3.nel=1;
  869. pl3.cel=x.smld->elt[0];pl3.UU.U1.curfragment=rez1;}
  870. ;} else
  871. {pl3.ptrtype=ptrlist;pl3.nel=0;pl3.cel=NULL;}
  872. /*shablon STARLIST */
  873. pl4=pl3;while(pl3.nel!=0 ) {
  874. /* shablon prawila */ r63(&rez1,&success1,&pl3);
  875. if( !success1 ) goto _L106;
  876. pl4=pl3;
  877. ;};
  878. _L106:if( ! success1 )pl3=pl4;
  879. success1 = true ;
  880. if( pl3.nel !=0 )
  881. { success1=false;rez1=NULL;goto _L105;};
  882. success1=true;rez1=pl2.cel;
  883. if( pl2.ptrtype!=ptrtree ) next(&pl2);
  884. _L105:success1=true;
  885. if( success1 ) {
  886. rez1=pl1.cel;if( pl1.ptrtype!=ptrtree ) next(&pl1) ;}
  887. else { rez1=NULL;goto _L107 ;};
  888. goto _L99; _L107:; /* metka wyhoda po neuspehu wetwi */
  889. _L99: rez1=NULL;
  890. _L98: *rez=rez1;*success=success1;
  891. if (*success) *pl=pl1; /* prodwinutx ukazatelx leksem */
  892. /* wosstanowitx GLOB */
  893. glob10_1=oldglob10_1;
  894. glob10_2=oldglob10_2;
  895. glob10_3=oldglob10_3;
  896. glob10_4=oldglob10_4;
  897. #ifdef XX
  898. d(2,"G_SIMPLE", 10 ,*rez,*success);
  899. #endif
  900. ;};/* RULE */