This is compile_to_c19.c in view mode; [Download] [Up]
/* ANSI C code generated by SmallEiffel. */ /* -- SmallEiffel -- Release (- 0.91) -- 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 "compile_to_c.h" /*REAL*/double rT4to_double(T4 C){ double R=0; R=C; return R; } /*RUN_REQUIRE*/int rT275use_current(T275 *C){ int R=0; int _i=0; _i=1; while (!((R)||((_i)>(((T276*)(C)->_list)->_upper)))) { R=rT139use_current((T139*)rT276item((T276*)(C)->_list,_i)); _i=(_i)+(1); } return R; } /*RUN_REQUIRE*/void rT275compile_to_c(T275 *C){ int _i=0; /*IF*/if ((((T276*)(C)->_list)->_upper)==(1)) { rT44put_string((T44*)oRBC27cpp,(T0 *)ms1_275); rT139compile_to_c((T139*)rT276first((T276*)(C)->_list)); } else { rT44put_string((T44*)oRBC27cpp,(T0 *)ms2_275); rT44put_string((T44*)oRBC27cpp,(T0 *)ms3_275); rT139compile_to_c((T139*)rT276first((T276*)(C)->_list)); _i=1; while (!((_i)>(((T276*)(C)->_list)->_upper))) { rT44put_string((T44*)oRBC27cpp,(T0 *)ms4_275); rT44put_string((T44*)oRBC27cpp,(T0 *)ms5_275); rT139compile_to_c((T139*)rT276item((T276*)(C)->_list,_i)); rT44put_string((T44*)oRBC27cpp,(T0 *)ms6_275); _i=(_i)+(1); /*IF*/if ((_i)==(((T276*)(C)->_list)->_upper)) { rT44put_string((T44*)oRBC27cpp,(T0 *)ms7_275); } /*FI*/} } /*FI*/}/*TEXT*/void rT64fatal_error(/*C*/T0* a1){ rT48fatal_error(a1); }T0*oRBC64storage; /*TEXT*/void rT64storage_grow(/*C*/int a1){ int _i=0; T0* _str=NULL; _i=((T45*)oRBC64storage)->_upper; rT45resize((T45*)oRBC64storage,1,(((T45*)oRBC64storage)->_upper)+(a1)); while (!((_i)==(((T45*)oRBC64storage)->_upper))) { _i=(_i)+(1); {T7 *n=((T7*)se_new(7)); rT7make(n,80); _str=(T0 *)n;} rT45put((T45*)oRBC64storage,_str,_i); } }T0*oRBC64sfr; /*TEXT*/T0* rT64item(/*C*/int a1){ T0* R=NULL; R=rT45item((T45*)oRBC64storage,a1); return R; } int ofBC64init_storage=0; /*TEXT*/void rT64init_storage(/*C*/void){ if (ofBC64init_storage==0){ ofBC64init_storage=1; rT64storage_grow(3000); }} /*TEXT*/void rT64read(T64 *C,T0* a1){ rT64init_storage(); rT43connect_to((T43*)oRBC64sfr,a1); /*IF*/if (rT43is_connected((T43*)oRBC64sfr)) { C->_count=0; while (!(rT43end_of_input((T43*)oRBC64sfr))) { C->_count=((C)->_count)+(1); /*IF*/if ((((T45*)oRBC64storage)->_upper)<((C)->_count)) { rT64storage_grow(1000); } /*FI*/rT43read_line_in((T43*)oRBC64sfr,rT45item((T45*)oRBC64storage,(C)->_count)); } rT43disconnect((T43*)oRBC64sfr); } else { rT48append((T0 *)ms1_64); rT48append(a1); rT64fatal_error((T0 *)ms2_64); } /*FI*/}/*EFFECTIVE_ARG_LIST*/T0* rT175expression(T175 *C,int a1){ T0* R=NULL; R=/*XrT*ARRAY[EXPRESSION]*/rT85item((T85*)(C)->_list,a1); return R; } /*EFFECTIVE_ARG_LIST*/T0* rT175first(T175 *C){ T0* R=NULL; R=/*XrT*ARRAY[EXPRESSION]*/rT85item((T85*)(C)->_list,1); return R; } /*EFFECTIVE_ARG_LIST*/T0* rT175to_runnable(T175 *C,T0* a1){ T0* R=NULL; T0* _e2=NULL; T0* _e1=NULL; int _i=0; /*IF*/if (!((C)->_current_type)) { C->_current_type=a1; _i=/*XrT*ARRAY[EXPRESSION]*/((T85*)(C)->_list)->_upper; while (!((_i)==(0))) { _e1=/*XrT*ARRAY[EXPRESSION]*/rT85item((T85*)(C)->_list,_i); _e2=XrT72to_runnable(_e1,(C)->_current_type); /*IF*/if (!(_e2)) { rT175error(XrT72start_position(_e1),(T0 *)ms7_175); } else if (((T0 *)_e1)!=((T0 *)_e2)) { /*XrT*ARRAY[EXPRESSION]*/rT85put((T85*)(C)->_list,_e2,_i); } /*FI*/_i=(_i)-(1); } /*IF*/if ((/*(IRF4*/((T48*)oRBC27eh)->_nb_errors/*)*/)==(0)) { R=(T0 *)C; } /*FI*/} else if (((T0 *)XrT62run_class(a1))==((T0 *)rT175run_class(C))) { R=(T0 *)C; } else { {T175 *n=((T175*)se_new(175)); /*[IRF3:make*//*AW*/(n)->_list=(XrT85twin((C)->_list));/*]*/ R=(T0 *)n;} R=rT175to_runnable((T175*)R,a1); } /*FI*/return R; } /*EFFECTIVE_ARG_LIST*/int rT175count(T175 *C){ int R=0; R=/*XrT*ARRAY[EXPRESSION]*/((T85*)(C)->_list)->_upper; return R; } /*EFFECTIVE_ARG_LIST*/void rT175error(/*C*/T0* a1,T0* a2){ rT48add_position(a1); rT48error((T48*)oRBC27eh,a2); }/*EFFECTIVE_ARG_LIST*/void rT175match_with(T175 *C,T0* a1){ T0* _ot=NULL; T0* _ft=NULL; T0* _at=NULL; T0* _e=NULL; int _i=0; T0* _fal=NULL; _fal=/*XrT*RUN_FEATURE*/((T274*)a1)->_arguments; /*IF*/if (!(_fal)) { rT48add_position(XrT268start_position(a1)); rT175error(rT175start_position(C),(T0 *)ms1_175); } /*FI*//*IF*/if ((((/*(IRF4*/((T48*)oRBC27eh)->_nb_errors/*)*/)==(0))&&((rT97count((T97*)_fal))!=(rT175count(C))))) { rT48add_position(((T97*)_fal)->_start_position); rT175error(rT175start_position(C),(T0 *)ms2_175); } /*FI*/_i=/*XrT*ARRAY[EXPRESSION]*/((T85*)(C)->_list)->_upper; while (!(((_i)==(0))||((/*(IRF4*/((T48*)oRBC27eh)->_nb_errors/*)*/)>(0)))) { _e=/*XrT*ARRAY[EXPRESSION]*/rT85item((T85*)(C)->_list,_i); _at=XrT72result_type(_e); _ft=rT97type((T97*)_fal,_i); /*IF*/if (XrT72is_void(_e)) { /*IF*/if (XrT62is_expanded(_ft)) { rT48add_position(XrT72start_position(_e)); rT175error(XrT62start_position(_ft),(T0 *)ms3_175); } /*FI*/} else if (XrT62is_like_current(_ft)) { /*IF*/if (XrT72is_current(_e)) { } else if (XrT62is_a(XrT62run_type(_at),XrT62run_type(_ft))) { /*IF*/if (XrT62is_expanded(XrT62run_type(_at))) { } else if (XrT62is_a(XrT62run_type(_ft),XrT62run_type(_at))) { } else { rT48add_position(XrT72start_position(_e)); rT175error(XrT62start_position(_ft),(T0 *)ms9_175); } /*FI*/} else { rT48add_position(XrT72start_position(_e)); rT175error(XrT62start_position(_ft),(T0 *)ms9_175); } /*FI*/} else if (XrT62is_like_feature(_ft)) { /*IF*/if (XrT62is_a(XrT62run_type(_at),XrT62run_type(_ft))) { } else { rT48add_position(XrT72start_position(_e)); rT175error(XrT62start_position(_ft),(T0 *)ms4_175); } /*FI*/} else if (XrT62is_like_argument(_ft)) { _ot=XrT72result_type(rT175expression(C,((T92*)XrT62like_argument(_ft))->_rank)); /*IF*/if (!(XrT62is_a(XrT62run_type(_at),XrT62run_type(_ot)))) { rT48add_position(XrT72start_position(_e)); rT175error(XrT62start_position(_ft),(T0 *)ms5_175); } /*FI*/} else if (XrT62is_a(XrT62run_type(_at),XrT62run_type(_ft))) { } else { rT48print_as_error((T48*)oRBC27eh); rT48add_position(XrT62start_position(_ft)); rT175error(XrT72start_position(_e),(T0 *)ms6_175); } /*FI*/_at=XrT62run_type(_at); _ft=XrT62run_type(_ft); /*IF*/if (XrT62is_expanded(_ft)) { /*IF*/if (XrT62is_expanded(_at)) { } else { XrT62used_as_reference(_ft); } /*FI*/} else if (XrT62is_expanded(_at)) { XrT62used_as_reference(_at); } else { } /*FI*/_i=(_i)-(1); } }/*EFFECTIVE_ARG_LIST*/T0* rT175start_position(T175 *C){ T0* R=NULL; R=XrT72start_position(/*XrT*ARRAY[EXPRESSION]*/rT85item((T85*)(C)->_list,1)); return R; } /*EFFECTIVE_ARG_LIST*/int rT175use_current(T175 *C){ int R=0; int _i=0; _i=1; while (!(((_i)>(rT175count(C)))||(R))) { R=XrT72use_current(rT175expression(C,_i)); _i=(_i)+(1); } return R; } /*EFFECTIVE_ARG_LIST*/T0* rT175run_class(T175 *C){ T0* R=NULL; R=XrT62run_class((C)->_current_type); return R; } /*EFFECTIVE_ARG_LIST*/void rT175compile_to_c_old(T175 *C){ int _i=0; /*IF*/if (((int)(C)->_list)) { _i=1; while (!((_i)>(/*XrT*ARRAY[EXPRESSION]*/((T85*)(C)->_list)->_upper))) { XrT72compile_to_c_old(/*XrT*ARRAY[EXPRESSION]*/rT85item((T85*)(C)->_list,_i)); _i=(_i)+(1); } } /*FI*/}/*EFFECTIVE_ARG_LIST*/void rT175compile_to_c(T175 *C,T0* a1){ T0* _ft=NULL; T0* _at=NULL; T0* _e=NULL; int _i=0; _i=1; while (!((_i)>(rT175count(C)))) { _e=rT175expression(C,_i); _at=XrT62run_type(XrT72result_type(_e)); _ft=XrT62run_type(rT97type((T97*)a1,_i)); /*IF*/if (XrT62is_expanded(_ft)) { /*IF*/if (XrT62is_expanded(_at)) { XrT72compile_to_c(_e); } else { XrT62to_expanded(_ft); rT44put_character((T44*)oRBC27cpp,'\50'); XrT72compile_to_c(_e); rT44put_character((T44*)oRBC27cpp,'\51'); } /*FI*/} else { /*IF*/if (XrT62is_expanded(_at)) { XrT62to_reference(_at); rT44put_character((T44*)oRBC27cpp,'\50'); XrT72compile_to_c(_e); rT44put_character((T44*)oRBC27cpp,'\51'); } else { /*IF*/if ((XrT72is_current(_e))||(XrT72is_manifest_string(_e))) { rT44put_string((T44*)oRBC27cpp,(T0 *)ms8_175); } /*FI*/XrT72compile_to_c(_e); } /*FI*/} /*FI*/_i=(_i)+(1); /*IF*/if ((_i)<=(rT175count(C))) { rT44put_character((T44*)oRBC27cpp,'\54'); } /*FI*/} }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.