trans.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. /*
  2. * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. *
  4. * This product is part of the Amsterdam Compiler Kit.
  5. *
  6. * Permission to use, sell, duplicate or disclose this software must be
  7. * obtained in writing. Requests for such permissions may be sent to
  8. *
  9. * Dr. Andrew S. Tanenbaum
  10. * Wiskundig Seminarium
  11. * Vrije Universiteit
  12. * Postbox 7161
  13. * 1007 MC Amsterdam
  14. * The Netherlands
  15. *
  16. */
  17. #include "ack.h"
  18. #include "list.h"
  19. #include "trans.h"
  20. #include "grows.h"
  21. #include "data.h"
  22. #ifndef NORCSID
  23. static char rcs_id[] = "$Header$" ;
  24. static char rcs_trans[] = RCS_TRANS ;
  25. #endif
  26. /****************************************************************************/
  27. /* Routines for transforming from one file type to another */
  28. /****************************************************************************/
  29. static growstring head ;
  30. static int touch_head= NO ;
  31. static growstring tail ;
  32. static int touch_tail= NO ;
  33. char *headvar(),*tailvar() ;
  34. int transform(phase) register trf *phase ; {
  35. int ok ;
  36. if ( !setfiles(phase) ) {
  37. disc_files(phase) ;
  38. return 0 ;
  39. }
  40. getcallargs(phase) ;
  41. ok= runphase(phase) ;
  42. if ( !ok ) rmfile(&out) ;
  43. /* Free the space occupied by the arguments,
  44. except for the linker, since we are bound to exit soon
  45. and do not foresee further need of memory space */
  46. if ( !phase->t_linker ) discardargs(phase) ;
  47. disc_files(phase) ;
  48. return ok ;
  49. }
  50. getmapflags(phase) register trf *phase ; {
  51. register path *l_in ;
  52. register list_elem *elem ;
  53. int scanned ;
  54. register char *ptr ;
  55. scanlist(l_first(flags),elem) {
  56. scanned= *(l_content(*elem))&NO_SCAN ;
  57. *(l_content(*elem)) &= ~NO_SCAN ;
  58. if ( mapflag(&(phase->t_mapf),l_content(*elem)) ) {
  59. scanned=NO_SCAN ;
  60. #ifdef DEBUG
  61. if ( debug >=4 ) {
  62. vprint("phase %s, added mapflag for %s\n",
  63. phase->t_name,
  64. l_content(*elem) ) ;
  65. }
  66. #endif
  67. }
  68. *(l_content(*elem)) |= scanned ;
  69. }
  70. if ( phase->t_linker ) {
  71. scanlist(l_first(phase->t_inputs),elem) {
  72. l_in = p_cont(*elem) ;
  73. if ( mapflag(&(phase->t_mapf),l_in->p_path) ) {
  74. ptr= keeps(getvar(LIBVAR)) ;
  75. clr_noscan(ptr) ;
  76. #ifdef DEBUG
  77. if ( debug >=4 ) {
  78. vprint("phase %s, library %s(%s)\n",
  79. phase->t_name,l_in->p_path,ptr) ;
  80. }
  81. #endif
  82. if ( l_in->p_keeps) throws(l_in->p_path) ;
  83. l_in->p_path= ptr ;
  84. l_in->p_keeps=YES ;
  85. }
  86. }
  87. scanlist(l_first(flags),elem) {
  88. /* Get the flags remaining for the loader,
  89. That is: all the flags neither eaten by ack nor
  90. one of the subprograms called so-far.
  91. The last fact is indicated by the NO_SCAN bit
  92. in the first character of the flag.
  93. */
  94. if ( !( *(l_content(*elem))&NO_SCAN ) ) {
  95. l_add(&(phase->t_flags),l_content(*elem)) ;
  96. #ifdef DEBUG
  97. if ( debug >=4 ) {
  98. vprint("phase %s, added flag %s\n",
  99. phase->t_name,
  100. l_content(*elem) ) ;
  101. }
  102. #endif
  103. }
  104. }
  105. }
  106. }
  107. do_Rflag(argp) char *argp ; {
  108. l_add(&R_list,argp) ;
  109. }
  110. char *headvar() {
  111. if ( !touch_head) return "" ;
  112. return gr_start(head) ;
  113. }
  114. add_head(str) char *str; {
  115. if ( !touch_head) {
  116. gr_init(&head) ;
  117. touch_head=YES ;
  118. }
  119. gr_cat(&head,str) ;
  120. }
  121. char *tailvar() {
  122. if ( !touch_tail ) return "" ;
  123. return gr_start(tail) ;
  124. }
  125. add_tail(str) char *str ; {
  126. if ( !touch_tail ) {
  127. gr_init(&tail) ;
  128. touch_tail=YES ;
  129. }
  130. gr_cat(&tail,str) ;
  131. }
  132. transini() {
  133. register list_elem *elem ;
  134. register trf *phase ;
  135. scanlist(l_first(tr_list), elem) {
  136. phase = t_cont(*elem) ;
  137. if ( !phase->t_linker ) getmapflags(phase);
  138. }
  139. scanlist(l_first(R_list), elem) {
  140. set_Rflag(l_content(*elem)) ;
  141. }
  142. l_clear(&R_list) ;
  143. setpvar(keeps(HEAD),headvar) ;
  144. setpvar(keeps(TAIL),tailvar) ;
  145. }
  146. set_Rflag(argp) register char *argp ; {
  147. register char *eos ;
  148. register list_elem *prog ;
  149. register int length ;
  150. char *eq, *colon ;
  151. eos= index(&argp[2],'-');
  152. eq= index(&argp[2],EQUAL) ;
  153. colon= index(&argp[2],':');
  154. if ( !eos ) {
  155. eos= eq ;
  156. } else {
  157. if ( eq && eq<eos ) eos= eq ;
  158. }
  159. if ( colon && ( !eos || eos>colon ) ) eos= colon ;
  160. if ( !eos ) {
  161. if ( !(argp[0]&NO_SCAN) ) werror("Incorrect use of -R flag") ;
  162. return ;
  163. }
  164. length= eos - &argp[2] ;
  165. scanlist(l_first(tr_list), prog) {
  166. if ( strncmp(t_cont(*prog)->t_name, &argp[2], length )==0 &&
  167. t_cont(*prog)->t_name[length]==0 /* Same name length */) {
  168. if ( *eos=='-' ) {
  169. if ( !(argp[0]&NO_SCAN) ) {
  170. /* If not already taken by a mapflag */
  171. l_add(&(t_cont(*prog)->t_flags),eos) ;
  172. }
  173. } else
  174. if ( *eos=='=' ) {
  175. t_cont(*prog)->t_prog= eos+1 ;
  176. } else {
  177. t_cont(*prog)->t_priority= atoi(eos+1) ;
  178. }
  179. argp[0] |= NO_SCAN ;
  180. return ;
  181. }
  182. }
  183. if ( !(argp[0]&NO_SCAN) ) werror("Cannot find program for %s",argp) ;
  184. return ;
  185. }
  186. /**************************************************************************/
  187. /* */
  188. /* The creation of arguments for exec for a transformation */
  189. /* */
  190. /**************************************************************************/
  191. growstring scanb(line) char *line ; {
  192. /* Scan a line for backslashes, setting the NO_SCAN bit in characters
  193. preceded by a backslash.
  194. */
  195. register char *in_c ;
  196. register int token ;
  197. growstring result ;
  198. enum { TEXT, ESCAPED } state = TEXT ;
  199. gr_init(&result) ;
  200. for ( in_c= line ; *in_c ; in_c++ ) {
  201. token= *in_c&0377 ;
  202. switch( state ) {
  203. case TEXT :
  204. if ( token==BSLASH ) {
  205. state= ESCAPED ;
  206. } else {
  207. gr_add(&result,token) ;
  208. }
  209. break ;
  210. case ESCAPED :
  211. gr_add(&result,token|NO_SCAN) ;
  212. state=TEXT ;
  213. break ;
  214. }
  215. }
  216. gr_add(&result,0) ;
  217. if ( state!=TEXT ) werror("flag line ends with %c",BSLASH) ;
  218. return result ;
  219. }
  220. growstring scanvars(line) char *line ; {
  221. /* Scan a line variable replacements started by S_VAR.
  222. Two sequences exist: S_VAR name E_VAR, S_VAR name A_VAR text E_VAR.
  223. neither name nor text may contain further replacements.
  224. In the first form an error message is issued if the name is not
  225. present in the variables, the second form produces text
  226. in that case.
  227. The sequence S_VAR S_VAR is transformed into S_VAR.
  228. This to allow later recognition in mapflags, where B_SLASH
  229. would be preventing any recognition.
  230. */
  231. register char *in_c ;
  232. register int token ;
  233. growstring result ;
  234. growstring name ;
  235. register char *tr ;
  236. enum { TEXT, FIRST, NAME, SKIP, COPY } state = TEXT ;
  237. gr_init(&result) ; gr_init(&name) ;
  238. for ( in_c= line ; *in_c ; in_c++ ) {
  239. token= *in_c&0377 ;
  240. switch( state ) {
  241. case TEXT :
  242. if ( token==S_VAR ) {
  243. state= FIRST ;
  244. } else {
  245. gr_add(&result,token) ;
  246. }
  247. break ;
  248. case FIRST :
  249. switch ( token ) {
  250. case S_VAR :
  251. state= TEXT ;
  252. gr_add(&result,token) ;
  253. break ;
  254. case A_VAR :
  255. case C_VAR :
  256. fatal("empty string variable name") ;
  257. default :
  258. state=NAME ;
  259. gr_add(&name,token) ;
  260. break ;
  261. }
  262. break ;
  263. case NAME:
  264. switch ( token ) {
  265. case A_VAR :
  266. gr_add(&name,0) ;
  267. if ( tr=getvar(gr_start(name)) ) {
  268. while ( *tr ) {
  269. gr_add(&result,*tr++) ;
  270. }
  271. state=SKIP ;
  272. } else {
  273. state=COPY ;
  274. }
  275. gr_throw(&name) ;
  276. break ;
  277. case C_VAR :
  278. gr_add(&name,0) ;
  279. if ( tr=getvar(gr_start(name)) ) {
  280. while ( *tr ) {
  281. gr_add(&result,*tr++);
  282. }
  283. } else {
  284. werror("No definition for %s",
  285. gr_start(name)) ;
  286. }
  287. state=TEXT ;
  288. gr_throw(&name) ;
  289. break ;
  290. default:
  291. gr_add(&name,token) ;
  292. break ;
  293. }
  294. break ;
  295. case SKIP :
  296. if ( token==C_VAR ) state= TEXT ;
  297. break ;
  298. case COPY :
  299. if ( token==C_VAR ) state= TEXT ; else {
  300. gr_add(&result,token) ;
  301. }
  302. break ;
  303. }
  304. }
  305. gr_add(&result,0) ;
  306. if ( state!=TEXT ) {
  307. werror("flag line misses %c",C_VAR) ;
  308. gr_throw(&name) ;
  309. }
  310. return result ;
  311. }
  312. growstring scanexpr(line) char *line ; {
  313. /* Scan a line for conditional or flag expressions,
  314. dependent on the type. The format is
  315. S_EXPR suflist M_EXPR suflist T_EXPR tail C_EXPR
  316. the head and tail are passed to treat, together with the
  317. growstring for futher treatment.
  318. Nesting is not allowed.
  319. */
  320. register char *in_c ;
  321. char *heads ;
  322. register int token ;
  323. growstring sufs, tailval ;
  324. growstring result ;
  325. static list_head fsuff, lsuff ;
  326. enum { TEXT, FDOT, FSUF, LDOT, LSUF, FTAIL } state = TEXT ;
  327. gr_init(&result) ; gr_init(&sufs) ; gr_init(&tailval) ;
  328. for ( in_c= line ; *in_c ; in_c++ ) {
  329. token= *in_c&0377 ;
  330. switch( state ) {
  331. case TEXT :
  332. if ( token==S_EXPR ) {
  333. state= FDOT ;
  334. heads=in_c ;
  335. } else gr_add(&result,token) ;
  336. break ;
  337. case FDOT :
  338. if ( token==M_EXPR ) {
  339. state=LDOT ;
  340. break ;
  341. }
  342. token &= ~NO_SCAN ;
  343. if ( token!=SUFCHAR ) {
  344. error("Missing %c in expression",SUFCHAR) ;
  345. }
  346. gr_add(&sufs,token) ; state=FSUF ;
  347. break ;
  348. case FSUF :
  349. if ( token==M_EXPR || (token&~NO_SCAN)==SUFCHAR) {
  350. gr_add(&sufs,0) ;
  351. l_add(&fsuff,gr_final(&sufs)) ;
  352. }
  353. if ( token==M_EXPR ) {
  354. state=LDOT ;
  355. } else gr_add(&sufs,token&~NO_SCAN) ;
  356. break ;
  357. case LDOT :
  358. if ( token==T_EXPR ) {
  359. state=FTAIL ;
  360. break ;
  361. }
  362. token &= ~NO_SCAN ;
  363. if ( token!=SUFCHAR ) {
  364. error("Missing %c in expression",SUFCHAR) ;
  365. }
  366. gr_add(&sufs,token) ; state=LSUF ;
  367. break ;
  368. case LSUF :
  369. if ( token==T_EXPR || (token&~NO_SCAN)==SUFCHAR) {
  370. gr_add(&sufs,0) ;
  371. l_add(&lsuff,gr_final(&sufs)) ;
  372. }
  373. if ( token==T_EXPR ) {
  374. state=FTAIL ;
  375. } else gr_add(&sufs,token&~NO_SCAN) ;
  376. break ;
  377. case FTAIL :
  378. if ( token==C_EXPR ) {
  379. /* Found one !! */
  380. gr_add(&tailval,0) ;
  381. condit(&result,&fsuff,&lsuff,gr_start(tailval)) ;
  382. l_throw(&fsuff) ; l_throw(&lsuff) ;
  383. gr_throw(&tailval) ;
  384. state=TEXT ;
  385. } else gr_add(&tailval,token) ;
  386. break ;
  387. }
  388. }
  389. gr_add(&result,0) ;
  390. if ( state!=TEXT ) {
  391. l_throw(&fsuff) ; l_throw(&lsuff) ; gr_throw(&tailval) ;
  392. werror("flag line has unclosed expression starting with %6s",
  393. heads) ;
  394. }
  395. return result ;
  396. }
  397. condit(line,fsuff,lsuff,tailval) growstring *line ;
  398. list_head *fsuff, *lsuff;
  399. char *tailval ;
  400. {
  401. register list_elem *first ;
  402. register list_elem *last ;
  403. #ifdef DEBUG
  404. if ( debug>=4 ) vprint("Conditional for %s, ",tailval) ;
  405. #endif
  406. scanlist( l_first(*fsuff), first ) {
  407. scanlist( l_first(*lsuff), last ) {
  408. if ( strcmp(l_content(*first),l_content(*last))==0 ) {
  409. /* Found */
  410. #ifdef DEBUG
  411. if ( debug>=4 ) vprint(" matched\n") ;
  412. #endif
  413. while ( *tailval) gr_add(line,*tailval++ ) ;
  414. return ;
  415. }
  416. }
  417. }
  418. #ifdef DEBUG
  419. if ( debug>=4) vprint(" non-matched\n") ;
  420. #endif
  421. }
  422. int mapflag(maplist,cflag) list_head *maplist ; char *cflag ; {
  423. /* Expand a flag expression */
  424. /* The flag "cflag" is checked for each of the mapflags.
  425. A mapflag entry has the form
  426. -text NAME=replacement or -text*text NAME=replacement
  427. The star matches anything as in the shell.
  428. If the entry matches the assignment will take place
  429. This replacement is subjected to argument matching only.
  430. When a match took place the replacement is returned
  431. when not, (char *)0.
  432. The replacement sits in stable storage.
  433. */
  434. register list_elem *elem ;
  435. scanlist(l_first(*maplist),elem) {
  436. if ( mapexpand(l_content(*elem),cflag) ) {
  437. return 1 ;
  438. }
  439. }
  440. return 0 ;
  441. }
  442. int mapexpand(mapentry,cflag)
  443. char *mapentry, *cflag ;
  444. {
  445. register char *star ;
  446. register char *ptr ;
  447. register char *space ;
  448. int length ;
  449. star=index(mapentry,STAR) ;
  450. space=firstblank(mapentry) ;
  451. if ( star >space ) star= (char *)0 ;
  452. if ( star ) {
  453. length= space-star-1 ;
  454. if ( strncmp(mapentry,cflag,star-mapentry) ||
  455. strncmp(star+1,cflag+strlen(cflag)-length,length) ) {
  456. return 0 ;
  457. }
  458. /* Match */
  459. /* Now set star to the first char of the star
  460. replacement and length to its length
  461. */
  462. length=strlen(cflag)-(star-mapentry)-length ;
  463. if ( length<0 ) return 0 ;
  464. star=cflag+(star-mapentry) ;
  465. #ifdef DEBUG
  466. if ( debug>=6 ) {
  467. vprint("Starmatch (%s,%s) %.*s\n",
  468. mapentry,cflag,length,star) ;
  469. }
  470. #endif
  471. } else {
  472. if ( strncmp(mapentry,cflag,space-mapentry)!=0 ||
  473. cflag[space-mapentry] ) {
  474. return 0 ;
  475. }
  476. }
  477. ptr= skipblank(space) ;
  478. if ( *ptr==0 ) return 1 ;
  479. doassign(ptr,star,length) ;
  480. return 1 ;
  481. }
  482. doassign(line,star,length) char *line, *star ; {
  483. growstring varval, name, temp ;
  484. register char *ptr ;
  485. gr_init(&varval) ;
  486. gr_init(&name) ;
  487. ptr= line ;
  488. for ( ; *ptr && *ptr!=SPACE && *ptr!=TAB && *ptr!=EQUAL ; ptr++ ) {
  489. gr_add(&name,*ptr) ;
  490. }
  491. ptr= index(ptr,EQUAL) ;
  492. if ( !ptr ) {
  493. error("Missing %c in assignment %s",EQUAL,line);
  494. return ;
  495. }
  496. temp= scanvars(ptr+1) ;
  497. for ( ptr=gr_start(temp); *ptr; ptr++ ) switch ( *ptr ) {
  498. case STAR :
  499. if ( star ) {
  500. while ( length-- ) gr_add(&varval,*star++|NO_SCAN) ;
  501. break ;
  502. }
  503. default :
  504. gr_add(&varval,*ptr) ;
  505. break ;
  506. }
  507. gr_throw(&temp) ;
  508. gr_add(&name,0) ; gr_add(&varval,0) ;
  509. setsvar(gr_final(&name),gr_final(&varval)) ;
  510. }
  511. #define ISBLANK(c) ( (c)==SPACE || (c)==TAB )
  512. unravel(line,action) char *line ; int (*action)() ; {
  513. /* Unravel the line, get arguments a la shell */
  514. /* each argument is handled to action */
  515. /* The input string is left intact */
  516. register char *in_c ;
  517. register int token ;
  518. enum { BLANK, ARG } state = BLANK ;
  519. growstring argum ;
  520. in_c=line ;
  521. for (;;) {
  522. token= *in_c&0377 ;
  523. switch ( state ) {
  524. case BLANK :
  525. if ( token==0 ) break ;
  526. if ( !ISBLANK(token) ) {
  527. state= ARG ;
  528. gr_init(&argum) ;
  529. gr_add(&argum,token&~NO_SCAN) ;
  530. }
  531. break ;
  532. case ARG :
  533. if ( ISBLANK(token) || token==0 ) {
  534. gr_add(&argum,0) ;
  535. (*action)(gr_start(argum)) ;
  536. gr_throw(&argum) ;
  537. state=BLANK ;
  538. } else {
  539. gr_add(&argum,token&~NO_SCAN) ;
  540. }
  541. break ;
  542. }
  543. if ( token == 0 ) break ;
  544. in_c++ ;
  545. }
  546. }
  547. char *c_rep(string,place,rep) char *string, *place, *rep ; {
  548. /* Produce a string in stable storage produced from 'string'
  549. with the character at place replaced by rep
  550. */
  551. growstring name ;
  552. register char *nc ;
  553. register char *xc ;
  554. gr_init(&name) ;
  555. for ( nc=string ; *nc && nc<place ; nc++ ) {
  556. gr_add(&name,*nc) ;
  557. }
  558. #ifdef DEBUG
  559. if ( *nc==0 ) fatal("Place is not in string") ;
  560. #endif
  561. for ( xc=rep ; *xc ; xc++ ) gr_add(&name,*xc|NO_SCAN) ;
  562. gr_add(&name,0) ;
  563. gr_cat(&name,nc+1) ;
  564. return gr_final(&name) ;
  565. }
  566. static list_head *curargs ;
  567. static list_head *comb_args ;
  568. addargs(string) char *string ; {
  569. register char *temp, *repc ;
  570. register list_elem *elem ;
  571. repc=index(string,C_IN) ;
  572. if ( repc ) {
  573. /* INPUT FILE TOKEN seen, replace it and scan further */
  574. if ( repc==string && string[1]==0 ) {
  575. if ( in.p_path ) { /* All but combiner */
  576. l_add(curargs,keeps(in.p_path)) ;
  577. } else {
  578. scanlist( l_first(*comb_args), elem ) {
  579. l_add(curargs,p_cont(*elem)->p_path) ;
  580. }
  581. }
  582. return ;
  583. }
  584. if ( in.p_path ) { /* Not for the combiners */
  585. temp=c_rep(string,repc,in.p_path) ;
  586. addargs(temp) ;
  587. throws(temp) ;
  588. } else { /* For the combiners */
  589. scanlist( l_first(*comb_args), elem ) {
  590. temp=c_rep(string,repc,p_cont(*elem)->p_path);
  591. addargs(temp) ;
  592. throws(temp) ;
  593. }
  594. }
  595. return ;
  596. }
  597. repc=index(string,C_OUT) ;
  598. if ( repc ) {
  599. /* replace the outfile token as with the infile token */
  600. #ifdef DEBUG
  601. if ( !out.p_path ) fatal("missing output filename") ;
  602. #endif
  603. temp=c_rep(string,repc,out.p_path) ;
  604. addargs(temp) ;
  605. throws(temp) ;
  606. return ;
  607. }
  608. temp= keeps(string) ;
  609. clr_noscan(temp) ;
  610. l_add(curargs,temp) ;
  611. }
  612. getcallargs(phase) register trf *phase ; {
  613. growstring arg1, arg2 ;
  614. arg1= scanvars(phase->t_argd) ;
  615. #ifdef DEBUG
  616. if ( debug>=3 ) { vprint("\tvars: ") ; prns(gr_start(arg1)) ; }
  617. #endif
  618. arg2= scanexpr(gr_start(arg1)) ;
  619. #ifdef DEBUG
  620. if ( debug>=3 ) { vprint("\texpr: ") ; prns(gr_start(arg2)) ; }
  621. #endif
  622. gr_throw(&arg1) ;
  623. curargs= &phase->t_args ;
  624. if (phase->t_combine) comb_args = &phase->t_inputs ;
  625. unravel( gr_start(arg2), addargs ) ;
  626. gr_throw(&arg2) ;
  627. }
  628. discardargs(phase) register trf *phase ; {
  629. l_throw(&phase->t_args) ;
  630. }