home *** CD-ROM | disk | FTP | other *** search
- /* ANSI C code generated by SmallEiffel. */
- /*
- -- SmallEiffel -- Release (- 0.97) -- FRANCE
- -- Copyright (C), 1994 - Dominique COLNET and Suzanne COLLIN
- -- University Henri Poincare' - Nancy 1 - email colnet@loria.fr
- -- CRIN (Centre de Recherche en Informatique de Nancy)
- -- FRANCE
- */
- #include "pretty.h"
- void rT202make_routine(T202 *C,T0 * a1,T0 * a2,T0 * a3,T0 * a4,T0 * a5){
- rT202make_e_feature(C,a1,NULL);
- C->_header_comment=a4;
- C->_arguments=a2;
- C->_obsolete_mark=a3;
- C->_require_assertion=a5;
- }
- void rT202make(T202 *C,T0 * a1,T0 * a2,T0 * a3,T0 * a4,T0 * a5){
- rT202make_routine(C,a1,a2,a3,a4,a5);
- }
- void rT259put_integer(T259 *C,int a1){
- /*(IRF3*/(((T7*)(T0 *)ms469)->_count)=(0);
- /*)*/rT2append_in(a1,(T0 *)ms469);
- rT259put_string(C,(T0 *)ms469);
- }
- void rT259put_string(T259 *C,T0* a1){
- int _i=0;
- _i=1;
- while (!((_i)>(((T7*)a1)->_count))) {
- rT259put_character(C,rT7item((T7*)a1,_i));
- _i=(_i)+(1);
- }
- }
- void rT259indent(T259 *C){
- int _goal=0;
- _goal=(1)+(((C)->_indent_level)*(3));
- /*IF*/if (((C)->_column)>(_goal)) {
- rT259put_character(C,'\12');
- }
- /*FI*/while (!((_goal)==((C)->_column))) {
- rT259put_character(C,'\40');
- }
- {int iv1=(C)->_last_character;
- if (10 == iv1) goto l404;
- if (32 == iv1) goto l404;
- goto l405;
- l404: ;
- goto l403;
- l405: ;
- rT259put_character(C,'\12');
- rT259indent(C);
- l403: ;
- }
- }
- void rT259keyword(T259 *C,T0* a1){
- {int iv1=(C)->_last_character;
- if (10 == iv1) goto l407;
- if (32 == iv1) goto l407;
- goto l408;
- l407: ;
- goto l406;
- l408: ;
- rT259put_character(C,'\40');
- l406: ;
- }
- rT259put_string(C,a1);
- /*IF*/if (((C)->_last_character)!=('\40')) {
- rT259put_character(C,'\40');
- }
- /*FI*/}
- void rT259connect_to(T259 *C,T0 * a1){
- C->_sfw=a1;
- C->_line=1;
- C->_column=1;
- C->_blank_lines=0;
- C->_last_character='\0';
- }
- void rT259format_parano(T259 *C){
- C->_print_current=1;
- C->_print_end_check=1;
- C->_print_end_loop=1;
- C->_print_end_if=1;
- C->_print_end_inspect=1;
- C->_print_end_routine=1;
- C->_print_end_debug=1;
- }
- void rT259format_end(T259 *C){
- C->_print_current=0;
- C->_print_end_check=1;
- C->_print_end_loop=1;
- C->_print_end_if=1;
- C->_print_end_inspect=1;
- C->_print_end_routine=1;
- C->_print_end_debug=1;
- }
- void rT259format_zen(T259 *C){
- C->_zen_mode=1;
- C->_print_current=0;
- C->_print_end_check=0;
- C->_print_end_loop=0;
- C->_print_end_if=0;
- C->_print_end_inspect=0;
- C->_print_end_routine=0;
- C->_print_end_debug=0;
- }
- void rT259format_default(T259 *C){
- C->_print_current=0;
- C->_print_end_check=0;
- C->_print_end_loop=0;
- C->_print_end_if=0;
- C->_print_end_inspect=0;
- C->_print_end_routine=1;
- C->_print_end_debug=0;
- }
- void rT259skip(T259 *C,int a1){
- while (!(((C)->_blank_lines)>=(a1))) {
- rT259put_character(C,'\12');
- }
- rT259indent(C);
- }
- void rT259level_decr(T259 *C){
- C->_indent_level=((C)->_indent_level)-(1);
- }
- void rT259level_incr(T259 *C){
- C->_indent_level=((C)->_indent_level)+(1);
- }
- void rT259copy(T259 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT259put_character(T259 *C,char a1){
- XrT34put_character((C)->_sfw,a1);
- C->_last_character=a1;
- {int iv1=a1;
- if (10 == iv1) goto l410;
- goto l411;
- l410: ;
- C->_line=((C)->_line)+(1);
- C->_column=1;
- C->_blank_lines=((C)->_blank_lines)+(1);
- goto l409;
- l411: ;
- if (9 == iv1) goto l412;
- if (32 == iv1) goto l412;
- goto l413;
- l412: ;
- C->_column=((C)->_column)+(1);
- goto l409;
- l413: ;
- C->_column=((C)->_column)+(1);
- C->_blank_lines=-(1);
- l409: ;
- }
- }
- void rT259put_end(T259 *C,T0* a1){
- rT259put_string(C,(T0 *)ms536);
- rT259put_string(C,a1);
- rT259put_character(C,'\12');
- }
- void rT179bracketed_print(T179 *C){
- rT259put_character((T259*)oRBC27fmt,'\50');
- rT179pretty_print(C);
- rT259put_character((T259*)oRBC27fmt,'\51');
- }
- T0 * rT179add_comment(T179 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- else {
- {T218 *n=((T218*)new(218));
- rT218make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/return R;
- }
- void rT179print_as_target(T179 *C){
- rT259put_string((T259*)oRBC27fmt,(C)->_to_string);
- rT259put_character((T259*)oRBC27fmt,'\56');
- }
- void rT179pretty_print(T179 *C){
- rT259put_string((T259*)oRBC27fmt,(C)->_to_string);
- }
- T0* rT179to_key(T179 *C){
- T0* R=NULL;
- R=(C)->_to_string;
- return R;
- }
- void rT179copy(T179 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT179make(T179 *C,T0 * a1,T0* a2,T0 * a3,int a4){
- C->_start_position=a1;
- C->_to_string=a2;
- C->_result_type=a3;
- C->_rank=a4;
- }
- void rT74bracketed_print(T74 *C){
- rT259put_character((T259*)oRBC27fmt,'\50');
- rT74pretty_print(C);
- rT259put_character((T259*)oRBC27fmt,'\51');
- }
- void rT74break_line(T74 *C){
- /*IF*/if (!((C)->_break)) {
- C->_break=ma(53,2,1,(((T7*)(C)->_to_string)->_count)+(1));
- }
- else {
- rT53add_last((T53*)(C)->_break,(((T7*)(C)->_to_string)->_count)+(1));
- }
- /*FI*/}
- void rT74add_ascii(T74 *C,char a1){
- rT7extend((T7*)(C)->_to_string,a1);
- /*IF*/if (!((C)->_ascii)) {
- C->_ascii=ma(53,2,1,((T7*)(C)->_to_string)->_count);
- }
- else {
- rT53add_last((T53*)(C)->_ascii,((T7*)(C)->_to_string)->_count);
- }
- /*FI*/}
- void rT74add(T74 *C,char a1){
- rT7extend((T7*)(C)->_to_string,a1);
- }
- T0 * rT74add_comment(T74 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- else {
- {T218 *n=((T218*)new(218));
- rT218make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/return R;
- }
- void rT74print_as_target(T74 *C){
- rT74bracketed_print(C);
- rT259put_character((T259*)oRBC27fmt,'\56');
- }
- void rT74print_character(T74 *C,int a1){
- int _val=0;
- /*IF*/if ((((int)(C)->_percent))&&(rT53fast_has((T53*)(C)->_percent,a1))) {
- /*(IRF3*/(((T7*)(T0 *)ms467)->_count)=(0);
- /*)*/rT74character_coding(rT7item((T7*)(C)->_to_string,a1),(T0 *)ms467);
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms467);
- }
- else if ((((int)(C)->_ascii))&&(rT53fast_has((T53*)(C)->_ascii,a1))) {
- _val=((unsigned char)rT7item((T7*)(C)->_to_string,a1));
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms468);
- rT259put_integer((T259*)oRBC27fmt,_val);
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms95);
- }
- else {
- rT259put_character((T259*)oRBC27fmt,rT7item((T7*)(C)->_to_string,a1));
- }
- /*FI*/}
- void rT74pretty_print(T74 *C){
- int _column=0;
- int _i=0;
- _column=((T259*)oRBC27fmt)->_column;
- rT259put_character((T259*)oRBC27fmt,'\42');
- _i=1;
- while (!((_i)>(((T7*)(C)->_to_string)->_count))) {
- /*IF*/if (rT74is_on_next_line(C,_i)) {
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms466);
- while (!((_column)==(((T259*)oRBC27fmt)->_column))) {
- rT259put_character((T259*)oRBC27fmt,'\40');
- }
- rT259put_character((T259*)oRBC27fmt,'\45');
- }
- /*FI*/rT74print_character(C,_i);
- _i=(_i)+(1);
- }
- rT259put_character((T259*)oRBC27fmt,'\42');
- }
- int rT74is_on_next_line(T74 *C,int a1){
- int R=0;
- /*IF*/if (((int)(C)->_break)) {
- R=rT53fast_has((T53*)(C)->_break,a1);
- }
- /*FI*/return R;
- }
- void rT74add_percent(T74 *C,char a1){
- rT7extend((T7*)(C)->_to_string,a1);
- /*IF*/if (!((C)->_percent)) {
- C->_percent=ma(53,2,1,((T7*)(C)->_to_string)->_count);
- }
- else {
- rT53add_last((T53*)(C)->_percent,((T7*)(C)->_to_string)->_count);
- }
- /*FI*/}
- void rT74copy(T74 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT74make(T74 *C,T0 * a1){
- C->_start_position=a1;
- {T7 *n=((T7*)new(7));
- rT7make(n,0);
- C->_to_string=(T0 *)n;}
- }
- void rT74character_coding(/*C*/char a1,T0* a2){
- char _special='\0';
- {int iv1=a1;
- if (64 == iv1) goto l415;
- goto l416;
- l415: ;
- _special='A';
- goto l414;
- l416: ;
- if (8 == iv1) goto l417;
- goto l418;
- l417: ;
- _special='B';
- goto l414;
- l418: ;
- if (94 == iv1) goto l419;
- goto l420;
- l419: ;
- _special='C';
- goto l414;
- l420: ;
- if (36 == iv1) goto l421;
- goto l422;
- l421: ;
- _special='D';
- goto l414;
- l422: ;
- if (12 == iv1) goto l423;
- goto l424;
- l423: ;
- _special='F';
- goto l414;
- l424: ;
- if (92 == iv1) goto l425;
- goto l426;
- l425: ;
- _special='H';
- goto l414;
- l426: ;
- if (126 == iv1) goto l427;
- goto l428;
- l427: ;
- _special='L';
- goto l414;
- l428: ;
- if (10 == iv1) goto l429;
- goto l430;
- l429: ;
- _special='N';
- goto l414;
- l430: ;
- if (96 == iv1) goto l431;
- goto l432;
- l431: ;
- _special='Q';
- goto l414;
- l432: ;
- if (13 == iv1) goto l433;
- goto l434;
- l433: ;
- _special='R';
- goto l414;
- l434: ;
- if (35 == iv1) goto l435;
- goto l436;
- l435: ;
- _special='S';
- goto l414;
- l436: ;
- if (9 == iv1) goto l437;
- goto l438;
- l437: ;
- _special='T';
- goto l414;
- l438: ;
- if (0 == iv1) goto l439;
- goto l440;
- l439: ;
- _special='U';
- goto l414;
- l440: ;
- if (124 == iv1) goto l441;
- goto l442;
- l441: ;
- _special='V';
- goto l414;
- l442: ;
- if (37 == iv1) goto l443;
- goto l444;
- l443: ;
- _special='\45';
- goto l414;
- l444: ;
- if (39 == iv1) goto l445;
- goto l446;
- l445: ;
- _special='\47';
- goto l414;
- l446: ;
- if (34 == iv1) goto l447;
- goto l448;
- l447: ;
- _special='\42';
- goto l414;
- l448: ;
- if (91 == iv1) goto l449;
- goto l450;
- l449: ;
- _special='\50';
- goto l414;
- l450: ;
- if (93 == iv1) goto l451;
- goto l452;
- l451: ;
- _special='\51';
- goto l414;
- l452: ;
- if (123 == iv1) goto l453;
- goto l454;
- l453: ;
- _special='\74';
- goto l414;
- l454: ;
- if (125 == iv1) goto l455;
- goto l456;
- l455: ;
- _special='\76';
- goto l414;
- l456: ;
- l414: ;
- }
- rT7extend((T7*)a2,'\45');
- /*IF*/if ((_special)==('\0')) {
- rT7extend((T7*)a2,'\57');
- rT2append_in(((unsigned char)a1),a2);
- rT7extend((T7*)a2,'\57');
- }
- else {
- rT7extend((T7*)a2,_special);
- }
- /*FI*/}
- void rT121pretty_print(T121 *C){
- /*IF*/if (rT121is_omitted(C)) {
- /*IF*/if (((T259*)oRBC27fmt)->_zen_mode) {
- }
- else {
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms475);
- }
- /*FI*/}
- else {
- /*IF*/if (!((C)->_list)) {
- /*IF*/if (((T259*)oRBC27fmt)->_zen_mode) {
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms476);
- }
- else {
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms477);
- }
- /*FI*/}
- else {
- rT259put_character((T259*)oRBC27fmt,'\173');
- /*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(2);
- /*)*/rT124pretty_print((T124*)(C)->_list);
- rT259put_character((T259*)oRBC27fmt,'\175');
- }
- /*FI*/}
- /*FI*/}
- int rT121is_omitted(T121 *C){
- int R=0;
- R=!((C)->_start_position);
- return R;
- }
- void rT121copy(T121 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT121make(T121 *C,T0 * a1,T0* a2){
- C->_start_position=a1;
- /*IF*/if (((int)a2)) {
- {T124 *n=((T124*)new(124));
- rT124make(n,a2);
- C->_list=(T0 *)n;}
- }
- /*FI*/}
- T0 * rT137name(T137 *C,int a1){
- T0 * R=NULL;
- R=((T92*)rT94item((T94*)(C)->_flat_list,a1))->_name;
- return R;
- }
- T0 * rT137type(T137 *C,int a1){
- T0 * R=NULL;
- /*IF*/if (((int)(C)->_run_types)) {
- R=rT104item((T104*)(C)->_run_types,a1);
- }
- else {
- R=((T92*)rT94item((T94*)(C)->_flat_list,a1))->_type;
- }
- /*FI*/return R;
- }
- int rT137count(T137 *C){
- int R=0;
- R=((T94*)(C)->_flat_list)->_upper;
- return R;
- }
- int rT137rank_of(T137 *C,T0 * a1){
- int R=0;
- T0* _ns=NULL;
- _ns=XrT47to_string(a1);
- R=rT137count(C);
- while (!(((R)==(0))||(rT7is_equal((T7*)_ns,XrT47to_string(rT137name(C,R)))))) {
- R=(R)-(1);
- }
- return R;
- }
- void rT137pretty_print(T137 *C){
- int _i=0;
- /*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(2);
- /*)*/rT259indent((T259*)oRBC27fmt);
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms532);
- /*IF*/if ((((T259*)oRBC27fmt)->_zen_mode)&&((XrT141count((C)->_list))==(1))) {
- XrT93pretty_print(XrT141first((C)->_list));
- rT259put_character((T259*)oRBC27fmt,'\73');
- }
- else {
- _i=1;
- while (!((_i)>(XrT141upper((C)->_list)))) {
- /*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(3);
- /*)*/rT259indent((T259*)oRBC27fmt);
- XrT93pretty_print(XrT141item((C)->_list,_i));
- rT259put_character((T259*)oRBC27fmt,'\73');
- _i=(_i)+(1);
- }
- }
- /*FI*//*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(2);
- /*)*/rT259indent((T259*)oRBC27fmt);
- }
- void rT137copy(T137 *C,T0 * a1){
- C->_start_position=((T137*)a1)->_start_position;
- C->_list=((T137*)a1)->_list;
- C->_flat_list=((T137*)a1)->_flat_list;
- }
- void rT137make(T137 *C,T0 * a1,T0* a2){
- int _actual_count=0;
- int _ifl=0;
- int _il=0;
- C->_start_position=a1;
- C->_list=a2;
- _il=1;
- while (!((_il)>(XrT141upper((C)->_list)))) {
- _actual_count=(_actual_count)+(XrT93count(XrT141item((C)->_list,_il)));
- _il=(_il)+(1);
- }
- {T94 *n=((T94*)new(94));
- rT94make(n,1,_actual_count);
- C->_flat_list=(T0 *)n;}
- _ifl=1;
- _il=1;
- while (!((_il)>(XrT141upper((C)->_list)))) {
- _ifl=XrT93put_into(XrT141item((C)->_list,_il),(C)->_flat_list,_ifl);
- _il=(_il)+(1);
- }
- }
- void rT158bracketed_print(T158 *C){
- rT259put_character((T259*)oRBC27fmt,'\50');
- rT158pretty_print(C);
- rT259put_character((T259*)oRBC27fmt,'\51');
- }
- T0 * rT158add_comment(T158 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- else {
- {T218 *n=((T218*)new(218));
- rT218make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/return R;
- }
- void rT158print_as_target(T158 *C){
- rT158bracketed_print(C);
- rT259put_character((T259*)oRBC27fmt,'\56');
- }
- void rT158pretty_print(T158 *C){
- int _i=0;
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms498);
- rT259level_incr((T259*)oRBC27fmt);
- /*IF*/if (((int)(C)->_list)) {
- _i=1;
- while (!((_i)>(XrT79upper((C)->_list)))) {
- XrT66pretty_print(XrT79item((C)->_list,_i));
- _i=(_i)+(1);
- /*IF*/if ((_i)<=(XrT79upper((C)->_list))) {
- rT259put_character((T259*)oRBC27fmt,'\54');
- }
- /*FI*/}
- }
- /*FI*/rT259put_string((T259*)oRBC27fmt,(T0 *)ms499);
- rT259level_decr((T259*)oRBC27fmt);
- }
- void rT158copy(T158 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT158make(T158 *C,T0 * a1,T0* a2){
- C->_start_position=a1;
- C->_list=a2;
- }
- void rT59resize(T59 *C,int a1){
- int _p=0;
- int _n=0;
- int _i=0;
- T0* _new_buc=NULL;
- int _hash=0;
- {T53 *n=((T53*)new(53));
- rT53make(n,0,(a1)-(1));
- _new_buc=(T0 *)n;}
- _i=0;
- while (!((_i)>=((C)->_modulus))) {
- _n=rT53item((T53*)(C)->_buckets,_i);
- while (!((_n)==(0))) {
- _p=rT53item((T53*)(C)->_chain,_n);
- _hash=(rT7hash_code((T7*)rT42item((T42*)(C)->_keys,_n)))%(a1);
- rT53put((T53*)(C)->_chain,rT53item((T53*)_new_buc,_hash),_n);
- rT53put((T53*)_new_buc,_n,_hash);
- _n=_p;
- }
- _i=(_i)+(1);
- }
- C->_buckets=_new_buc;
- C->_modulus=a1;
- C->_item_mem=0;
- }
- T0* rT59clone(T59 *C,T0* a1){
- T0* R=NULL;
- /*IF*/if (((int)a1)) {
- R=(T0 *)new(a1->id);
- AF_1
- XrT28copy(R,a1);
- AF_0
- }
- /*FI*/return R;
- }
- T0 * rT59at(T59 *C,T0* a1){
- T0 * R=NULL;
- int _foo=0;
- _foo=rT59has(C,a1);
- R=rT61item((T61*)(C)->_store,(C)->_has_mem);
- return R;
- }
- void rT59put(T59 *C,T0 * a1,T0* a2){
- int _hash=0;
- _hash=(rT7hash_code((T7*)a2))%((C)->_modulus);
- /*IF*/if ((((C)->_has_mem)==(0))||(!(rT7is_equal((T7*)a2,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_buckets,_hash);
- while (!((((C)->_has_mem)==(0))||(rT7is_equal((T7*)a2,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_chain,(C)->_has_mem);
- }
- /*IF*/if (((C)->_has_mem)==(0)) {
- /*IF*/if (((C)->_count)>=(rT61count((T61*)(C)->_store))) {
- rT59expand(C);
- }
- /*FI*/rT42put((T42*)(C)->_keys,a2,(C)->_free);
- rT61put((T61*)(C)->_store,a1,(C)->_free);
- C->_has_mem=(C)->_free;
- C->_free=rT53item((T53*)(C)->_chain,(C)->_free);
- rT53put((T53*)(C)->_chain,rT53item((T53*)(C)->_buckets,_hash),(C)->_has_mem);
- rT53put((T53*)(C)->_buckets,(C)->_has_mem,_hash);
- C->_count=((C)->_count)+(1);
- /*IF*/if (((C)->_count)>(((C)->_modulus)*(2))) {
- rT59resize(C,(2)*((C)->_modulus));
- }
- /*FI*/}
- /*FI*/}
- else {
- rT61put((T61*)(C)->_store,a1,(C)->_has_mem);
- }
- /*FI*/C->_item_mem=0;
- }
- void rT59standard_copy(T59 *C,T0 * a1){
- memcpy(C,a1,s[a1->id]);
- }
- void rT59copy(T59 *C,T0 * a1){
- rT59standard_copy(C,a1);
- C->_keys=rT59clone(C,((T59*)a1)->_keys);
- C->_store=rT59clone(C,((T59*)a1)->_store);
- C->_buckets=rT59clone(C,((T59*)a1)->_buckets);
- C->_chain=rT59clone(C,((T59*)a1)->_chain);
- }
- void rT59expand(T59 *C){
- int _old_size=0;
- int _i=0;
- C->_item_mem=0;
- _old_size=rT61count((T61*)(C)->_store);
- rT53resize((T53*)(C)->_chain,1,(2)*(_old_size));
- rT42resize((T42*)(C)->_keys,1,(2)*(_old_size));
- rT61resize((T61*)(C)->_store,1,(2)*(_old_size));
- _i=(_old_size)+(1);
- while (!((_i)==(rT53count((T53*)(C)->_chain)))) {
- rT53put((T53*)(C)->_chain,(_i)+(1),_i);
- _i=(_i)+(1);
- }
- rT53put((T53*)(C)->_chain,(C)->_free,_i);
- C->_free=(_old_size)+(1);
- }
- int rT59has(T59 *C,T0* a1){
- int R=0;
- /*IF*/if ((((C)->_has_mem)==(0))||(!(rT7is_equal((T7*)a1,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_buckets,(rT7hash_code((T7*)a1))%((C)->_modulus));
- while (!((((C)->_has_mem)==(0))||(rT7is_equal((T7*)a1,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_chain,(C)->_has_mem);
- }
- }
- /*FI*/R=((C)->_has_mem)!=(0);
- return R;
- }
- void rT59make(T59 *C){
- int _i=0;
- C->_modulus=32;
- C->_count=0;
- C->_free=1;
- C->_has_mem=0;
- C->_item_mem=0;
- {T53 *n=((T53*)new(53));
- rT53make(n,0,((C)->_modulus)-(1));
- C->_buckets=(T0 *)n;}
- {T53 *n=((T53*)new(53));
- rT53make(n,1,16);
- C->_chain=(T0 *)n;}
- {T61 *n=((T61*)new(61));
- rT61make(n,1,16);
- C->_store=(T0 *)n;}
- {T42 *n=((T42*)new(42));
- rT42make(n,1,16);
- C->_keys=(T0 *)n;}
- _i=1;
- while (!((_i)==(rT53count((T53*)(C)->_chain)))) {
- rT53put((T53*)(C)->_chain,(_i)+(1),_i);
- _i=(_i)+(1);
- }
- rT53put((T53*)(C)->_chain,0,_i);
- _i=0;
- while (!((_i)>=((C)->_modulus))) {
- rT53put((T53*)(C)->_buckets,0,_i);
- _i=(_i)+(1);
- }
- }
- void rT55resize(T55 *C,int a1){
- int _p=0;
- int _n=0;
- int _i=0;
- T0* _new_buc=NULL;
- int _hash=0;
- {T53 *n=((T53*)new(53));
- rT53make(n,0,(a1)-(1));
- _new_buc=(T0 *)n;}
- _i=0;
- while (!((_i)>=((C)->_modulus))) {
- _n=rT53item((T53*)(C)->_buckets,_i);
- while (!((_n)==(0))) {
- _p=rT53item((T53*)(C)->_chain,_n);
- _hash=(rT7hash_code((T7*)rT42item((T42*)(C)->_keys,_n)))%(a1);
- rT53put((T53*)(C)->_chain,rT53item((T53*)_new_buc,_hash),_n);
- rT53put((T53*)_new_buc,_n,_hash);
- _n=_p;
- }
- _i=(_i)+(1);
- }
- C->_buckets=_new_buc;
- C->_modulus=a1;
- C->_item_mem=0;
- }
- T0* rT55clone(T55 *C,T0* a1){
- T0* R=NULL;
- /*IF*/if (((int)a1)) {
- R=(T0 *)new(a1->id);
- AF_1
- XrT28copy(R,a1);
- AF_0
- }
- /*FI*/return R;
- }
- T0* rT55at(T55 *C,T0* a1){
- T0* R=NULL;
- int _foo=0;
- _foo=rT55has(C,a1);
- R=rT42item((T42*)(C)->_store,(C)->_has_mem);
- return R;
- }
- void rT55put(T55 *C,T0* a1,T0* a2){
- int _hash=0;
- _hash=(rT7hash_code((T7*)a2))%((C)->_modulus);
- /*IF*/if ((((C)->_has_mem)==(0))||(!(rT7is_equal((T7*)a2,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_buckets,_hash);
- while (!((((C)->_has_mem)==(0))||(rT7is_equal((T7*)a2,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_chain,(C)->_has_mem);
- }
- /*IF*/if (((C)->_has_mem)==(0)) {
- /*IF*/if (((C)->_count)>=(rT42count((T42*)(C)->_store))) {
- rT55expand(C);
- }
- /*FI*/rT42put((T42*)(C)->_keys,a2,(C)->_free);
- rT42put((T42*)(C)->_store,a1,(C)->_free);
- C->_has_mem=(C)->_free;
- C->_free=rT53item((T53*)(C)->_chain,(C)->_free);
- rT53put((T53*)(C)->_chain,rT53item((T53*)(C)->_buckets,_hash),(C)->_has_mem);
- rT53put((T53*)(C)->_buckets,(C)->_has_mem,_hash);
- C->_count=((C)->_count)+(1);
- /*IF*/if (((C)->_count)>(((C)->_modulus)*(2))) {
- rT55resize(C,(2)*((C)->_modulus));
- }
- /*FI*/}
- /*FI*/}
- else {
- rT42put((T42*)(C)->_store,a1,(C)->_has_mem);
- }
- /*FI*/C->_item_mem=0;
- }
- void rT55standard_copy(T55 *C,T0 * a1){
- memcpy(C,a1,s[a1->id]);
- }
- void rT55copy(T55 *C,T0 * a1){
- rT55standard_copy(C,a1);
- C->_keys=rT55clone(C,((T55*)a1)->_keys);
- C->_store=rT55clone(C,((T55*)a1)->_store);
- C->_buckets=rT55clone(C,((T55*)a1)->_buckets);
- C->_chain=rT55clone(C,((T55*)a1)->_chain);
- }
- void rT55expand(T55 *C){
- int _old_size=0;
- int _i=0;
- C->_item_mem=0;
- _old_size=rT42count((T42*)(C)->_store);
- rT53resize((T53*)(C)->_chain,1,(2)*(_old_size));
- rT42resize((T42*)(C)->_keys,1,(2)*(_old_size));
- rT42resize((T42*)(C)->_store,1,(2)*(_old_size));
- _i=(_old_size)+(1);
- while (!((_i)==(rT53count((T53*)(C)->_chain)))) {
- rT53put((T53*)(C)->_chain,(_i)+(1),_i);
- _i=(_i)+(1);
- }
- rT53put((T53*)(C)->_chain,(C)->_free,_i);
- C->_free=(_old_size)+(1);
- }
- int rT55has(T55 *C,T0* a1){
- int R=0;
- /*IF*/if ((((C)->_has_mem)==(0))||(!(rT7is_equal((T7*)a1,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_buckets,(rT7hash_code((T7*)a1))%((C)->_modulus));
- while (!((((C)->_has_mem)==(0))||(rT7is_equal((T7*)a1,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_chain,(C)->_has_mem);
- }
- }
- /*FI*/R=((C)->_has_mem)!=(0);
- return R;
- }
- void rT55make(T55 *C){
- int _i=0;
- C->_modulus=32;
- C->_count=0;
- C->_free=1;
- C->_has_mem=0;
- C->_item_mem=0;
- {T53 *n=((T53*)new(53));
- rT53make(n,0,((C)->_modulus)-(1));
- C->_buckets=(T0 *)n;}
- {T53 *n=((T53*)new(53));
- rT53make(n,1,16);
- C->_chain=(T0 *)n;}
- {T42 *n=((T42*)new(42));
- rT42make(n,1,16);
- C->_store=(T0 *)n;}
- {T42 *n=((T42*)new(42));
- rT42make(n,1,16);
- C->_keys=(T0 *)n;}
- _i=1;
- while (!((_i)==(rT53count((T53*)(C)->_chain)))) {
- rT53put((T53*)(C)->_chain,(_i)+(1),_i);
- _i=(_i)+(1);
- }
- rT53put((T53*)(C)->_chain,0,_i);
- _i=0;
- while (!((_i)>=((C)->_modulus))) {
- rT53put((T53*)(C)->_buckets,0,_i);
- _i=(_i)+(1);
- }
- }
- void rT52shrink(T52 *C){
- int _k=0;
- int _j=0;
- int _i=0;
- T0* _chn=NULL;
- T0* _kys=NULL;
- T0* _str=NULL;
- {T42 *n=((T42*)new(42));
- rT42make(n,1,(rT54count((T54*)(C)->_store))/(2));
- _kys=(T0 *)n;}
- {T54 *n=((T54*)new(54));
- rT54make(n,1,(rT54count((T54*)(C)->_store))/(2));
- _str=(T0 *)n;}
- {T53 *n=((T53*)new(53));
- rT53make(n,1,(rT54count((T54*)(C)->_store))/(2));
- _chn=(T0 *)n;}
- _i=1;
- _j=0;
- while (!((_j)>=((C)->_modulus))) {
- _k=rT53item((T53*)(C)->_buckets,_j);
- /*IF*/if ((_k)!=(0)) {
- rT53put((T53*)(C)->_buckets,_i,_j);
- }
- /*FI*/while (!((_k)==(0))) {
- rT42put((T42*)_kys,rT42item((T42*)(C)->_keys,_k),_i);
- rT54put((T54*)_str,rT54item((T54*)(C)->_store,_k),_i);
- _k=rT53item((T53*)(C)->_chain,_k);
- /*IF*/if ((_k)==(0)) {
- rT53put((T53*)_chn,0,_i);
- }
- else {
- rT53put((T53*)_chn,(_i)+(1),_i);
- }
- /*FI*/_i=(_i)+(1);
- }
- _j=(_j)+(1);
- }
- _i=((C)->_count)+(1);
- while (!((_i)>=(rT53count((T53*)_chn)))) {
- rT53put((T53*)_chn,(_i)+(1),_i);
- _i=(_i)+(1);
- }
- rT53put((T53*)_chn,0,_i);
- C->_free=((C)->_count)+(1);
- C->_chain=_chn;
- C->_keys=_kys;
- C->_store=_str;
- C->_item_mem=0;
- }
- void rT52remove(T52 *C,T0* a1){
- int _p=0;
- int _n=0;
- int _hash=0;
- _hash=(rT7hash_code((T7*)a1))%((C)->_modulus);
- _n=rT53item((T53*)(C)->_buckets,_hash);
- while (!(((_n)==(0))||(rT7is_equal((T7*)a1,rT42item((T42*)(C)->_keys,_n))))) {
- _p=_n;
- _n=rT53item((T53*)(C)->_chain,_n);
- }
- /*IF*/if ((_n)!=(0)) {
- /*IF*/if ((_p)!=(0)) {
- rT53put((T53*)(C)->_chain,rT53item((T53*)(C)->_chain,_n),_p);
- }
- else {
- rT53put((T53*)(C)->_buckets,rT53item((T53*)(C)->_chain,_n),_hash);
- }
- /*FI*/rT53put((T53*)(C)->_chain,(C)->_free,_n);
- C->_free=_n;
- C->_count=((C)->_count)-(1);
- /*IF*/if ((_n)==((C)->_has_mem)) {
- C->_has_mem=0;
- }
- /*FI*//*IF*/if ((((C)->_count)<((rT54count((T54*)(C)->_store))/(4)))&&(((C)->_count)>(16))) {
- rT52shrink(C);
- }
- /*FI*/}
- /*FI*/C->_item_mem=0;
- }
- void rT52resize(T52 *C,int a1){
- int _p=0;
- int _n=0;
- int _i=0;
- T0* _new_buc=NULL;
- int _hash=0;
- {T53 *n=((T53*)new(53));
- rT53make(n,0,(a1)-(1));
- _new_buc=(T0 *)n;}
- _i=0;
- while (!((_i)>=((C)->_modulus))) {
- _n=rT53item((T53*)(C)->_buckets,_i);
- while (!((_n)==(0))) {
- _p=rT53item((T53*)(C)->_chain,_n);
- _hash=(rT7hash_code((T7*)rT42item((T42*)(C)->_keys,_n)))%(a1);
- rT53put((T53*)(C)->_chain,rT53item((T53*)_new_buc,_hash),_n);
- rT53put((T53*)_new_buc,_n,_hash);
- _n=_p;
- }
- _i=(_i)+(1);
- }
- C->_buckets=_new_buc;
- C->_modulus=a1;
- C->_item_mem=0;
- }
- T0* rT52clone(T52 *C,T0* a1){
- T0* R=NULL;
- /*IF*/if (((int)a1)) {
- R=(T0 *)new(a1->id);
- AF_1
- XrT28copy(R,a1);
- AF_0
- }
- /*FI*/return R;
- }
- T0 * rT52at(T52 *C,T0* a1){
- T0 * R=NULL;
- int _foo=0;
- _foo=rT52has(C,a1);
- R=rT54item((T54*)(C)->_store,(C)->_has_mem);
- return R;
- }
- void rT52put(T52 *C,T0 * a1,T0* a2){
- int _hash=0;
- _hash=(rT7hash_code((T7*)a2))%((C)->_modulus);
- /*IF*/if ((((C)->_has_mem)==(0))||(!(rT7is_equal((T7*)a2,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_buckets,_hash);
- while (!((((C)->_has_mem)==(0))||(rT7is_equal((T7*)a2,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_chain,(C)->_has_mem);
- }
- /*IF*/if (((C)->_has_mem)==(0)) {
- /*IF*/if (((C)->_count)>=(rT54count((T54*)(C)->_store))) {
- rT52expand(C);
- }
- /*FI*/rT42put((T42*)(C)->_keys,a2,(C)->_free);
- rT54put((T54*)(C)->_store,a1,(C)->_free);
- C->_has_mem=(C)->_free;
- C->_free=rT53item((T53*)(C)->_chain,(C)->_free);
- rT53put((T53*)(C)->_chain,rT53item((T53*)(C)->_buckets,_hash),(C)->_has_mem);
- rT53put((T53*)(C)->_buckets,(C)->_has_mem,_hash);
- C->_count=((C)->_count)+(1);
- /*IF*/if (((C)->_count)>(((C)->_modulus)*(2))) {
- rT52resize(C,(2)*((C)->_modulus));
- }
- /*FI*/}
- /*FI*/}
- else {
- rT54put((T54*)(C)->_store,a1,(C)->_has_mem);
- }
- /*FI*/C->_item_mem=0;
- }
- void rT52standard_copy(T52 *C,T0 * a1){
- memcpy(C,a1,s[a1->id]);
- }
- void rT52copy(T52 *C,T0 * a1){
- rT52standard_copy(C,a1);
- C->_keys=rT52clone(C,((T52*)a1)->_keys);
- C->_store=rT52clone(C,((T52*)a1)->_store);
- C->_buckets=rT52clone(C,((T52*)a1)->_buckets);
- C->_chain=rT52clone(C,((T52*)a1)->_chain);
- }
- void rT52expand(T52 *C){
- int _old_size=0;
- int _i=0;
- C->_item_mem=0;
- _old_size=rT54count((T54*)(C)->_store);
- rT53resize((T53*)(C)->_chain,1,(2)*(_old_size));
- rT42resize((T42*)(C)->_keys,1,(2)*(_old_size));
- rT54resize((T54*)(C)->_store,1,(2)*(_old_size));
- _i=(_old_size)+(1);
- while (!((_i)==(rT53count((T53*)(C)->_chain)))) {
- rT53put((T53*)(C)->_chain,(_i)+(1),_i);
- _i=(_i)+(1);
- }
- rT53put((T53*)(C)->_chain,(C)->_free,_i);
- C->_free=(_old_size)+(1);
- }
- int rT52has(T52 *C,T0* a1){
- int R=0;
- /*IF*/if ((((C)->_has_mem)==(0))||(!(rT7is_equal((T7*)a1,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_buckets,(rT7hash_code((T7*)a1))%((C)->_modulus));
- while (!((((C)->_has_mem)==(0))||(rT7is_equal((T7*)a1,rT42item((T42*)(C)->_keys,(C)->_has_mem))))) {
- C->_has_mem=rT53item((T53*)(C)->_chain,(C)->_has_mem);
- }
- }
- /*FI*/R=((C)->_has_mem)!=(0);
- return R;
- }
- void rT52make(T52 *C){
- int _i=0;
- C->_modulus=32;
- C->_count=0;
- C->_free=1;
- C->_has_mem=0;
- C->_item_mem=0;
- {T53 *n=((T53*)new(53));
- rT53make(n,0,((C)->_modulus)-(1));
- C->_buckets=(T0 *)n;}
- {T53 *n=((T53*)new(53));
- rT53make(n,1,16);
- C->_chain=(T0 *)n;}
- {T54 *n=((T54*)new(54));
- rT54make(n,1,16);
- C->_store=(T0 *)n;}
- {T42 *n=((T42*)new(42));
- rT42make(n,1,16);
- C->_keys=(T0 *)n;}
- _i=1;
- while (!((_i)==(rT53count((T53*)(C)->_chain)))) {
- rT53put((T53*)(C)->_chain,(_i)+(1),_i);
- _i=(_i)+(1);
- }
- rT53put((T53*)(C)->_chain,0,_i);
- _i=0;
- while (!((_i)>=((C)->_modulus))) {
- rT53put((T53*)(C)->_buckets,0,_i);
- _i=(_i)+(1);
- }
- }
- T0 * rT245add_comment(T245 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- /*AF*/else {
- {T214 *n=((T214*)new(214));
- rT214make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/return R;
- }
- void rT245pretty_print(T245 *C){
- rT259put_character((T259*)oRBC27fmt,'\41');
- XrT56pretty_print((C)->_type);
- rT259put_character((T259*)oRBC27fmt,'\41');
- XrT175pretty_print((C)->_call);
- }
- void rT245copy(T245 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT245make(T245 *C,T0 * a1,T0 * a2,T0 * a3,T0 * a4){
- C->_start_position=a1;
- C->_type=a2;
- C->_writable=a3;
- C->_call=a4;
- }
- T0 * rT243add_comment(T243 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- /*AF*/else {
- {T214 *n=((T214*)new(214));
- rT214make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/return R;
- }
- void rT243pretty_print(T243 *C){
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms561);
- XrT175pretty_print((C)->_call);
- }
- void rT243copy(T243 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT243make(T243 *C,T0 * a1,T0 * a2,T0 * a3){
- C->_start_position=a1;
- C->_writable=a2;
- C->_call=a3;
- }
- T0 * rT241add_comment(T241 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- /*AF*/else {
- {T214 *n=((T214*)new(214));
- rT214make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/return R;
- }
- void rT241pretty_print(T241 *C){
- rT259put_character((T259*)oRBC27fmt,'\41');
- XrT56pretty_print((C)->_type);
- rT259put_character((T259*)oRBC27fmt,'\41');
- XrT66pretty_print((C)->_writable);
- /*IF*/if (((T259*)oRBC27fmt)->_semi_colon_flag) {
- rT259put_character((T259*)oRBC27fmt,'\73');
- }
- /*FI*/}
- void rT241copy(T241 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT241make(T241 *C,T0 * a1,T0 * a2,T0 * a3){
- C->_start_position=a1;
- C->_type=a2;
- C->_writable=a3;
- }
- T0 * rT238add_comment(T238 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- /*AF*/else {
- {T214 *n=((T214*)new(214));
- rT214make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/return R;
- }
- void rT238pretty_print(T238 *C){
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms560);
- XrT66pretty_print((C)->_writable);
- /*IF*/if (((T259*)oRBC27fmt)->_semi_colon_flag) {
- rT259put_character((T259*)oRBC27fmt,'\73');
- }
- /*FI*/}
- void rT238copy(T238 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT238make(T238 *C,T0 * a1,T0 * a2){
- C->_start_position=a1;
- C->_writable=a2;
- }
- T0 * rT213add_comment(T213 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- else {/*AT*//*IF*/if ((rT57count((T57*)a1))==(1)) {
- R=(T0 *)C;
- }
- else {
- {T214 *n=((T214*)new(214));
- rT214make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/}
- /*FI*/return R;
- }
- void rT213pretty_print(T213 *C){
- int _i=0;
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms538);
- rT259level_incr((T259*)oRBC27fmt);
- /*IF*/if (((int)(C)->_list)) {
- rT259put_character((T259*)oRBC27fmt,'\50');
- _i=((T149*)(C)->_list)->_lower;
- while (!((_i)>(((T149*)(C)->_list)->_upper))) {
- rT74pretty_print((T74*)rT149item((T149*)(C)->_list,_i));
- _i=(_i)+(1);
- /*IF*/if ((_i)<=(((T149*)(C)->_list)->_upper)) {
- rT259put_character((T259*)oRBC27fmt,'\54');
- }
- /*FI*/}
- rT259put_character((T259*)oRBC27fmt,'\51');
- }
- /*FI*/rT259level_decr((T259*)oRBC27fmt);
- /*IF*/if (((int)(C)->_compound)) {
- rT138pretty_print((T138*)(C)->_compound);
- }
- /*FI*/rT259indent((T259*)oRBC27fmt);
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms539);
- /*IF*/if (((T259*)oRBC27fmt)->_print_end_debug) {
- rT259put_end((T259*)oRBC27fmt,(T0 *)ms540);
- }
- /*FI*/}
- void rT213copy(T213 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT213make(T213 *C,T0 * a1,T0* a2,T0 * a3){
- C->_start_position=a1;
- C->_list=a2;
- C->_compound=a3;
- }
- void rT130pretty_print(T130 *C){
- int _i=0;
- /*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(0);
- /*)*//*IF*/if (!(((T259*)oRBC27fmt)->_zen_mode)) {
- rT259skip((T259*)oRBC27fmt,1);
- }
- else {
- rT259indent((T259*)oRBC27fmt);
- }
- /*FI*/rT259keyword((T259*)oRBC27fmt,(T0 *)ms485);
- /*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(1);
- /*)*//*IF*/if (((int)(C)->_clients)) {
- rT121pretty_print((T121*)(C)->_clients);
- }
- /*FI*//*IF*/if (((int)(C)->_comment)) {
- rT57pretty_print((T57*)(C)->_comment);
- }
- /*FI*//*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(1);
- /*)*//*IF*/if (!(((T259*)oRBC27fmt)->_zen_mode)) {
- rT259indent((T259*)oRBC27fmt);
- }
- /*FI*/rT126pretty_print((T126*)(C)->_procedure_list);
- }
- void rT130copy(T130 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT130make(T130 *C,T0 * a1,T0 * a2,T0* a3){
- C->_clients=a1;
- C->_comment=a2;
- {T126 *n=((T126*)new(126));
- rT126make(n,a3);
- C->_procedure_list=(T0 *)n;}
- }
- void rT131pretty_print(T131 *C){
- int _i=0;
- _i=1;
- while (!((_i)>(((T132*)(C)->_list)->_upper))) {
- rT130pretty_print((T130*)rT132item((T132*)(C)->_list,_i));
- /*IF*/if (!(((T259*)oRBC27fmt)->_zen_mode)) {
- /*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(0);
- /*)*/rT259skip((T259*)oRBC27fmt,1);
- }
- /*FI*/_i=(_i)+(1);
- }
- }
- void rT131add_last(T131 *C,T0 * a1){
- rT132add_last((T132*)(C)->_list,a1);
- }
- void rT131copy(T131 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT220pretty_print(T220 *C){
- int _i=0;
- _i=1;
- while (!((_i)>(((T221*)(C)->_list)->_upper))) {
- rT219pretty_print((T219*)rT221item((T221*)(C)->_list,_i));
- _i=(_i)+(1);
- /*IF*/if ((_i)<=(((T221*)(C)->_list)->_upper)) {
- rT259indent((T259*)oRBC27fmt);
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms543);
- }
- /*FI*/}
- }
- void rT220add_last(T220 *C,T0 * a1){
- rT221add_last((T221*)(C)->_list,a1);
- }
- void rT220copy(T220 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT219pretty_print(T219 *C){
- rT259level_incr((T259*)oRBC27fmt);
- /*(IRF3*/(((T259*)oRBC27fmt)->_semi_colon_flag)=(0);
- /*)*/XrT66pretty_print((C)->_expression);
- rT259level_decr((T259*)oRBC27fmt);
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms542);
- rT259indent((T259*)oRBC27fmt);
- /*IF*/if (((int)(C)->_then_compound)) {
- rT138pretty_print((T138*)(C)->_then_compound);
- }
- /*FI*/}
- void rT219copy(T219 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT219make(T219 *C,T0 * a1,T0 * a2){
- C->_expression=a1;
- C->_then_compound=a2;
- }
- T0 * rT216add_comment(T216 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- else {/*AT*//*IF*/if ((rT57count((T57*)a1))==(1)) {
- R=(T0 *)C;
- }
- else {
- {T214 *n=((T214*)new(214));
- rT214make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/}
- /*FI*/return R;
- }
- void rT216pretty_print(T216 *C){
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms541);
- rT220pretty_print((T220*)(C)->_ifthenlist);
- /*IF*/if (((int)(C)->_else_compound)) {
- rT259indent((T259*)oRBC27fmt);
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms544);
- rT138pretty_print((T138*)(C)->_else_compound);
- }
- /*FI*/rT259indent((T259*)oRBC27fmt);
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms545);
- /*IF*/if (((T259*)oRBC27fmt)->_print_end_if) {
- rT259put_end((T259*)oRBC27fmt,(T0 *)ms546);
- }
- /*FI*/}
- void rT216add_if_then(T216 *C,T0 * a1,T0 * a2){
- T0 * _ifthen=NULL;
- {T219 *n=((T219*)new(219));
- rT219make(n,a1,a2);
- _ifthen=(T0 *)n;}
- /*IF*/if (!((C)->_ifthenlist)) {
- {T220 *n=((T220*)new(220));
- /*(IRF3*/((n)->_list)=(ma(221,0,1,_ifthen));
- /*)*/C->_ifthenlist=(T0 *)n;}
- }
- else {
- rT220add_last((T220*)(C)->_ifthenlist,_ifthen);
- }
- /*FI*/}
- void rT216copy(T216 *C,T0 * a1){
- C->_start_position=((T216*)a1)->_start_position;
- C->_ifthenlist=((T216*)a1)->_ifthenlist;
- C->_else_compound=((T216*)a1)->_else_compound;
- }
- int rT57count(T57 *C){
- int R=0;
- R=rT42count((T42*)(C)->_list);
- return R;
- }
- void rT57error(/*C*/T0 * a1,T0* a2){
- /*UT*/(T43*)oRBC27eh;
- rT43add_position(a1);
- rT43error((T43*)oRBC27eh,a2);
- }
- int rT57dummy(T57 *C){
- int R=0;
- T0* _str=NULL;
- /*IF*/if ((rT42count((T42*)(C)->_list))==(1)) {
- _str=rT42first((T42*)(C)->_list);
- /*IF*/if ((((T7*)_str)->_count)<(10)) {
- R=1;
- }
- else {
- rT57error(NULL,(T0 *)ms526);
- }
- /*FI*/}
- /*FI*/return R;
- }
- void rT57pretty_print(T57 *C){
- int _column=0;
- int _i=0;
- /*IF*/if (((((T259*)oRBC27fmt)->_column)>(1))&&((((T259*)oRBC27fmt)->_last_character)!=('\40'))) {
- rT259put_character((T259*)oRBC27fmt,'\40');
- }
- /*FI*/_column=((T259*)oRBC27fmt)->_column;
- _i=((T42*)(C)->_list)->_lower;
- while (!((_i)>(((T42*)(C)->_list)->_upper))) {
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms460);
- rT259put_string((T259*)oRBC27fmt,rT42item((T42*)(C)->_list,_i));
- _i=(_i)+(1);
- /*IF*/if ((_i)<=(((T42*)(C)->_list)->_upper)) {
- rT259put_character((T259*)oRBC27fmt,'\12');
- while (!((((T259*)oRBC27fmt)->_column)==(_column))) {
- rT259put_character((T259*)oRBC27fmt,'\40');
- }
- }
- /*FI*/}
- rT259put_character((T259*)oRBC27fmt,'\12');
- rT259indent((T259*)oRBC27fmt);
- }
- void rT57add_last(T57 *C,T0* a1){
- rT42add_last((T42*)(C)->_list,a1);
- }
- void rT57copy(T57 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT57make(T57 *C,T0 * a1,T0* a2){
- C->_start_position=a1;
- C->_list=a2;
- }
- void rT117pretty_print(T117 *C){
- XrT65pretty_print((C)->_old_name);
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms472);
- XrT65pretty_print((C)->_new_name);
- }
- void rT117copy(T117 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT117make(T117 *C,T0 * a1,T0 * a2){
- C->_old_name=a1;
- C->_new_name=a2;
- }
- void rT118fatal_error(/*C*/T0* a1){
- rT43fatal_error((T43*)oRBC27eh,a1);
- }
- void rT118pretty_print(T118 *C){
- int _i=0;
- int _icount=0;
- /*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(2);
- /*)*/rT259indent((T259*)oRBC27fmt);
- rT259keyword((T259*)oRBC27fmt,(T0 *)ms471);
- _i=1;
- while (!((_i)>(((T119*)(C)->_list)->_upper))) {
- rT117pretty_print((T117*)rT119item((T119*)(C)->_list,_i));
- _i=(_i)+(1);
- _icount=(_icount)+(1);
- /*IF*/if ((_i)<=(((T119*)(C)->_list)->_upper)) {
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms473);
- /*IF*/if ((_icount)>(3)) {
- _icount=0;
- /*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(3);
- /*)*/rT259indent((T259*)oRBC27fmt);
- }
- /*FI*/}
- /*FI*/}
- }
- void rT118get_started(T118 *C,T0 * a1){
- T0 * _rp=NULL;
- int _i=0;
- _i=((T119*)(C)->_list)->_upper;
- while (!((_i)==(0))) {
- _rp=rT119item((T119*)(C)->_list,_i);
- /*IF*/if (!(rT48has((T48*)a1,((T117*)_rp)->_old_name))) {
- /*UT*/(T43*)oRBC27eh;
- rT43add_position(XrT65start_position(((T117*)_rp)->_old_name));
- rT118fatal_error((T0 *)ms418);
- }
- /*FI*/_i=(_i)-(1);
- }
- }
- void rT118add_last(T118 *C,T0 * a1){
- rT119add_last((T119*)(C)->_list,a1);
- }
- T0 * rT118to_new_name(T118 *C,T0 * a1){
- T0 * R=NULL;
- int _i=0;
- _i=1;
- while (!((((int)R))||((_i)>(((T119*)(C)->_list)->_upper)))) {
- /*IF*/if (XrT65same_as(((T117*)rT119item((T119*)(C)->_list,_i))->_old_name,a1)) {
- R=((T117*)rT119item((T119*)(C)->_list,_i))->_new_name;
- }
- /*FI*/_i=(_i)+(1);
- }
- /*IF*/if (!(R)) {
- R=a1;
- }
- /*FI*/return R;
- }
- void rT118copy(T118 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- T0 * rT211add_comment(T211 *C,T0 * a1){
- T0 * R=NULL;
- /*IF*/if ((!(a1))||((rT57count((T57*)a1))==(0))) {
- R=(T0 *)C;
- }
- else {/*AT*//*IF*/if ((rT57count((T57*)a1))==(1)) {
- R=(T0 *)C;
- }
- else {
- {T214 *n=((T214*)new(214));
- rT214make(n,(T0 *)C,a1);
- R=(T0 *)n;}}
- /*FI*/}
- /*FI*/return R;
- }
- void rT211pretty_print(T211 *C){
- rT212pretty_print((T212*)(C)->_check_invariant);
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms535);
- /*IF*/if (((T259*)oRBC27fmt)->_print_end_check) {
- rT259put_end((T259*)oRBC27fmt,(T0 *)ms537);
- }
- /*FI*/}
- void rT211copy(T211 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- void rT211make(T211 *C,T0 * a1,T0 * a2,T0* a3){
- {T212 *n=((T212*)new(212));
- rT212make(n,a1,a2,a3);
- C->_check_invariant=(T0 *)n;}
- }
- void rT255pretty_print(T255 *C){
- int _i=0;
- _i=1;
- while (!((_i)>(((T256*)(C)->_list)->_upper))) {
- /*(IRF3*/(((T259*)oRBC27fmt)->_indent_level)=(0);
- /*)*/rT259indent((T259*)oRBC27fmt);
- /*IF*/if (!(((T259*)oRBC27fmt)->_zen_mode)) {
- rT259skip((T259*)oRBC27fmt,1);
- }
- /*FI*/rT133pretty_print((T133*)rT256item((T256*)(C)->_list,_i));
- _i=(_i)+(1);
- }
- }
- void rT255get_started(T255 *C,T0 * a1){
- int _i=0;
- _i=1;
- while (!((_i)>(((T256*)(C)->_list)->_upper))) {
- rT133add_into((T133*)rT256item((T256*)(C)->_list,_i),a1);
- _i=(_i)+(1);
- }
- }
- void rT255add_last(T255 *C,T0 * a1){
- rT256add_last((T256*)(C)->_list,a1);
- }
- void rT255copy(T255 *C,T0 * a1){
- /*IF*//*AF*//*AE*/
- memcpy(C,a1,s[C->id]);
- /*FI*/}
- T0 * rT90name(T90 *C,int a1){
- T0 * R=NULL;
- R=((T92*)rT94item((T94*)(C)->_flat_list,a1))->_name;
- return R;
- }
- int rT90count(T90 *C){
- int R=0;
- R=((T94*)(C)->_flat_list)->_upper;
- return R;
- }
- void rT90error(/*C*/T0 * a1,T0* a2){
- /*UT*/(T43*)oRBC27eh;
- rT43add_position(a1);
- rT43error((T43*)oRBC27eh,a2);
- }
- int rT90rank_of(T90 *C,T0 * a1){
- int R=0;
- T0* _ns=NULL;
- _ns=XrT47to_string(a1);
- R=rT90count(C);
- while (!(((R)==(0))||(rT7is_equal((T7*)_ns,XrT47to_string(rT90name(C,R)))))) {
- R=(R)-(1);
- }
- return R;
- }
- void rT90pretty_print(T90 *C){
- int _i=0;
- rT259put_character((T259*)oRBC27fmt,'\50');
- rT259level_incr((T259*)oRBC27fmt);
- _i=1;
- while (!((_i)>(XrT141upper((C)->_list)))) {
- XrT93pretty_print(XrT141item((C)->_list,_i));
- _i=(_i)+(1);
- /*IF*/if ((_i)<=(XrT141upper((C)->_list))) {
- rT259put_string((T259*)oRBC27fmt,(T0 *)ms516);
- }
- /*FI*/}
- rT259level_decr((T259*)oRBC27fmt);
- rT259put_character((T259*)oRBC27fmt,'\51');
- }
- void rT90super_make(T90 *C,T0 * a1,T0* a2){
- int _actual_count=0;
- int _ifl=0;
- int _il=0;
- C->_start_position=a1;
- C->_list=a2;
- _il=1;
- while (!((_il)>(XrT141upper((C)->_list)))) {
- _actual_count=(_actual_count)+(XrT93count(XrT141item((C)->_list,_il)));
- _il=(_il)+(1);
- }
- {T94 *n=((T94*)new(94));
- rT94make(n,1,_actual_count);
- C->_flat_list=(T0 *)n;}
- _ifl=1;
- _il=1;
- while (!((_il)>(XrT141upper((C)->_list)))) {
- _ifl=XrT93put_into(XrT141item((C)->_list,_il),(C)->_flat_list,_ifl);
- _il=(_il)+(1);
- }
- }
- void rT90copy(T90 *C,T0 * a1){
- C->_start_position=((T90*)a1)->_start_position;
- C->_list=((T90*)a1)->_list;
- C->_flat_list=((T90*)a1)->_flat_list;
- }
- void rT90make(T90 *C,T0 * a1,T0* a2){
- int _rank=0;
- int _i=0;
- T0 * _tla=NULL;
- T0 * _an=NULL;
- T0 * _tlf=NULL;
- T0 * _d1=NULL;
- rT90super_make(C,a1,a2);
- _i=1;
- while (!((_i)>(((T94*)(C)->_flat_list)->_upper))) {
- _d1=rT94item((T94*)(C)->_flat_list,_i);
- _tlf=((T92*)_d1)->_type;
- if ((int)_tlf) switch (((T0 *)_tlf)->id) {
- case 97:
- break;
- default:
- _tlf = NULL;
- };/*IF*/if (((int)_tlf)) {
- _rank=rT90rank_of(C,((T97*)_tlf)->_like_what);
- /*IF*/if ((_rank)==(_i)) {
- rT90error(((T97*)_tlf)->_start_position,(T0 *)ms260);
- }
- else if ((_rank)>(0)) {
- {T86 *n=((T86*)new(86));
- rT86make(n,XrT65start_position(((T97*)_tlf)->_like_what),XrT65to_string(((T97*)_tlf)->_like_what),_rank);
- _an=(T0 *)n;}
- {T96 *n=((T96*)new(96));
- rT96make(n,((T97*)_tlf)->_start_position,_an);
- _tla=(T0 *)n;}
- /*(IRF3*/(((T92*)_d1)->_type)=(_tla);
- /*)*/}
- /*FI*/}
- /*FI*/_i=(_i)+(1);
- }
- }
-