/*===========================================================================*/
/*   (Lalr/util.scm)                                                         */
/*   Bigloo (2.6b)                                                           */
/*   Inria -- Sophia Antipolis (c)       Mon Dec 15 12:14:36 CET 2003        */
/*===========================================================================*/
/* COMPILATION: (/users/serrano/prgm/project/bigloo/bin/bigloo -O4 -mklib -cc gcc-2.95 -fsharing -q -s -copt -DBGL_NO_PIC -unsafe -c Lalr/util.scm -indent -o objs/obj_u/Lalr/util.c)*/
/* GC selection */
#define THE_GC BOEHM_GC

#include <bigloo.h>
#include <signal.h>

static obj_t BGl_loopz00zz__lalr_utilz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_modulezd2initializa7ationz75zz__lalr_utilz00(long, char *);
extern obj_t BGl_modulezd2initializa7ationz75zz__errorz00(long, char *);
static obj_t BGl_loopz72z72z00zz__lalr_utilz00(obj_t, obj_t);
static obj_t BGl_loopz72z72zz__lalr_utilz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_sunionz00zz__lalr_utilz00(obj_t, obj_t);
static obj_t BGl_importedzd2moduleszd2initz00zz__lalr_utilz00();
static obj_t BGl__sinsertz00zz__lalr_utilz00(obj_t, obj_t, obj_t);
static obj_t BGl_requirezd2initializa7ationz75zz__lalr_utilz00 = BUNSPEC;
BGL_EXPORTED_DECL obj_t BGl_poszd2inzd2listz00zz__lalr_utilz00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_filterz00zz__lalr_utilz00(obj_t, obj_t);
extern bool_t BGl_equalzf3zf3zz__r4_equivalence_6_2z00(obj_t, obj_t);
BGL_EXPORTED_DECL obj_t BGl_sinsertz00zz__lalr_utilz00(obj_t, obj_t);
static obj_t BGl__sunionz00zz__lalr_utilz00(obj_t, obj_t, obj_t);
static obj_t BGl__poszd2inzd2listz00zz__lalr_utilz00(obj_t, obj_t, obj_t);
static obj_t BGl__filter1729z00zz__lalr_utilz00(obj_t, obj_t, obj_t);
static obj_t *__cnst;


DEFINE_EXPORT_PROCEDURE( BGl_sinsertzd2envzd2zz__lalr_utilz00, BgL_bgl__sinsertza700za7za7__lalr_utilza7001746z00, BGl__sinsertz00zz__lalr_utilz00, 0L, 2 );
DEFINE_EXPORT_PROCEDURE( BGl_poszd2inzd2listzd2envzd2zz__lalr_utilz00, BgL_bgl__posza7d2inza7d2listza700za7za7__lalr_utilza7001747z00, BGl__poszd2inzd2listz00zz__lalr_utilz00, 0L, 2 );
DEFINE_EXPORT_PROCEDURE( BGl_sunionzd2envzd2zz__lalr_utilz00, BgL_bgl__sunionza700za7za7__lalr_utilza7001748z00, BGl__sunionz00zz__lalr_utilz00, 0L, 2 );
DEFINE_EXPORT_PROCEDURE( BGl_filterzd2envzd2zz__lalr_utilz00, BgL_bgl__filter1729za700za7za7__lalr_utilza7001749z00, BGl__filter1729z00zz__lalr_utilz00, 0L, 2 );



/* module-initialization */
BGL_EXPORTED_DEF obj_t BGl_modulezd2initializa7ationz75zz__lalr_utilz00(long BgL_checksumz00_633, char * BgL_fromz00_634)
{ AN_OBJECT;
{ 
if(
CBOOL(BGl_requirezd2initializa7ationz75zz__lalr_utilz00))
{ 
BGl_requirezd2initializa7ationz75zz__lalr_utilz00 = 
BBOOL(((bool_t)0)); 
BGl_importedzd2moduleszd2initz00zz__lalr_utilz00(); 
return BUNSPEC;}  else 
{ 
return BUNSPEC;} } 
}



/* pos-in-list */
BGL_EXPORTED_DEF obj_t BGl_poszd2inzd2listz00zz__lalr_utilz00(obj_t BgL_xz00_1, obj_t BgL_lstz00_2)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 43 */
{ 
obj_t BgL_lstz00_546;long BgL_iz00_547;
BgL_lstz00_546 = BgL_lstz00_2; 
BgL_iz00_547 = ((long)0); 
BgL_loopz00_545:
if(
PAIRP(BgL_lstz00_546))
{ /* ./Lalr/util.scm 44 */
if(
BGl_equalzf3zf3zz__r4_equivalence_6_2z00(
CAR(BgL_lstz00_546), BgL_xz00_1))
{ /* ./Lalr/util.scm 44 */
return 
BINT(BgL_iz00_547);}  else 
{ /* ./Lalr/util.scm 44 */
{ 
long BgL_iz00_647;obj_t BgL_lstz00_645;
BgL_lstz00_645 = 
CDR(BgL_lstz00_546); 
BgL_iz00_647 = 
(BgL_iz00_547+((long)1)); 
BgL_iz00_547 = BgL_iz00_647; 
BgL_lstz00_546 = BgL_lstz00_645; 
goto BgL_loopz00_545;} } }  else 
{ /* ./Lalr/util.scm 44 */
return BFALSE;} } } 
}



/* _pos-in-list */
obj_t BGl__poszd2inzd2listz00zz__lalr_utilz00(obj_t BgL_envz00_613, obj_t BgL_xz00_614, obj_t BgL_lstz00_615)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 43 */
return 
BGl_poszd2inzd2listz00zz__lalr_utilz00(BgL_xz00_614, BgL_lstz00_615);} 
}



/* sunion */
BGL_EXPORTED_DEF obj_t BGl_sunionz00zz__lalr_utilz00(obj_t BgL_lst1z00_3, obj_t BgL_lst2z00_4)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 49 */
return 
BGl_loopz72z72z00zz__lalr_utilz00(BgL_lst1z00_3, BgL_lst2z00_4);} 
}



/* loop'' */
obj_t BGl_loopz72z72z00zz__lalr_utilz00(obj_t BgL_l1z00_369, obj_t BgL_l2z00_370)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 50 */
BGl_loopz72z72z00zz__lalr_utilz00:
if(
NULLP(BgL_l1z00_369))
{ /* ./Lalr/util.scm 52 */
return BgL_l2z00_370;}  else 
{ /* ./Lalr/util.scm 52 */
if(
NULLP(BgL_l2z00_370))
{ /* ./Lalr/util.scm 53 */
return BgL_l1z00_369;}  else 
{ /* ./Lalr/util.scm 53 */
{ /* ./Lalr/util.scm 55 */
obj_t BgL_xz00_374;obj_t BgL_yz00_375;
BgL_xz00_374 = 
CAR(BgL_l1z00_369); 
BgL_yz00_375 = 
CAR(BgL_l2z00_370); 
{ /* ./Lalr/util.scm 57 */
bool_t BgL_testz00_657;
{ /* ./Lalr/util.scm 57 */
long BgL_auxz00_660;long BgL_auxz00_658;
BgL_auxz00_660 = 
(long)CINT(BgL_yz00_375); 
BgL_auxz00_658 = 
(long)CINT(BgL_xz00_374); 
BgL_testz00_657 = 
(BgL_auxz00_658>BgL_auxz00_660); } 
if(BgL_testz00_657)
{ /* ./Lalr/util.scm 57 */
{ /* ./Lalr/util.scm 58 */
obj_t BgL_auxz00_663;
BgL_auxz00_663 = 
BGl_loopz72z72z00zz__lalr_utilz00(BgL_l1z00_369, 
CDR(BgL_l2z00_370)); 
return 
MAKE_PAIR(BgL_yz00_375, BgL_auxz00_663);} }  else 
{ /* ./Lalr/util.scm 59 */
bool_t BgL_testz00_667;
{ /* ./Lalr/util.scm 59 */
long BgL_auxz00_670;long BgL_auxz00_668;
BgL_auxz00_670 = 
(long)CINT(BgL_yz00_375); 
BgL_auxz00_668 = 
(long)CINT(BgL_xz00_374); 
BgL_testz00_667 = 
(BgL_auxz00_668<BgL_auxz00_670); } 
if(BgL_testz00_667)
{ /* ./Lalr/util.scm 59 */
{ /* ./Lalr/util.scm 60 */
obj_t BgL_auxz00_673;
BgL_auxz00_673 = 
BGl_loopz72z72z00zz__lalr_utilz00(
CDR(BgL_l1z00_369), BgL_l2z00_370); 
return 
MAKE_PAIR(BgL_xz00_374, BgL_auxz00_673);} }  else 
{ /* ./Lalr/util.scm 59 */
{ 
obj_t BgL_l1z00_677;
BgL_l1z00_677 = 
CDR(BgL_l1z00_369); 
BgL_l1z00_369 = BgL_l1z00_677; 
goto BGl_loopz72z72z00zz__lalr_utilz00;} } } } } } } } 
}



/* _sunion */
obj_t BGl__sunionz00zz__lalr_utilz00(obj_t BgL_envz00_616, obj_t BgL_lst1z00_617, obj_t BgL_lst2z00_618)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 49 */
return 
BGl_loopz72z72z00zz__lalr_utilz00(BgL_lst1z00_617, BgL_lst2z00_618);} 
}



/* sinsert */
BGL_EXPORTED_DEF obj_t BGl_sinsertz00zz__lalr_utilz00(obj_t BgL_elemz00_5, obj_t BgL_lstz00_6)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 65 */
return 
BGl_loopz72z72zz__lalr_utilz00(BgL_elemz00_5, BgL_lstz00_6);} 
}



/* loop' */
obj_t BGl_loopz72z72zz__lalr_utilz00(obj_t BgL_elemz00_626, obj_t BgL_l1z00_383)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 66 */
if(
NULLP(BgL_l1z00_383))
{ /* ./Lalr/util.scm 67 */
return 
MAKE_PAIR(BgL_elemz00_626, BgL_l1z00_383);}  else 
{ /* ./Lalr/util.scm 69 */
obj_t BgL_xz00_386;
BgL_xz00_386 = 
CAR(BgL_l1z00_383); 
{ /* ./Lalr/util.scm 70 */
bool_t BgL_testz00_685;
{ /* ./Lalr/util.scm 70 */
long BgL_auxz00_688;long BgL_auxz00_686;
BgL_auxz00_688 = 
(long)CINT(BgL_xz00_386); 
BgL_auxz00_686 = 
(long)CINT(BgL_elemz00_626); 
BgL_testz00_685 = 
(BgL_auxz00_686<BgL_auxz00_688); } 
if(BgL_testz00_685)
{ /* ./Lalr/util.scm 70 */
return 
MAKE_PAIR(BgL_elemz00_626, BgL_l1z00_383);}  else 
{ /* ./Lalr/util.scm 72 */
bool_t BgL_testz00_692;
{ /* ./Lalr/util.scm 72 */
long BgL_auxz00_695;long BgL_auxz00_693;
BgL_auxz00_695 = 
(long)CINT(BgL_xz00_386); 
BgL_auxz00_693 = 
(long)CINT(BgL_elemz00_626); 
BgL_testz00_692 = 
(BgL_auxz00_693>BgL_auxz00_695); } 
if(BgL_testz00_692)
{ /* ./Lalr/util.scm 72 */
{ /* ./Lalr/util.scm 73 */
obj_t BgL_auxz00_698;
BgL_auxz00_698 = 
BGl_loopz72z72zz__lalr_utilz00(BgL_elemz00_626, 
CDR(BgL_l1z00_383)); 
return 
MAKE_PAIR(BgL_xz00_386, BgL_auxz00_698);} }  else 
{ /* ./Lalr/util.scm 72 */
return BgL_l1z00_383;} } } } } 
}



/* _sinsert */
obj_t BGl__sinsertz00zz__lalr_utilz00(obj_t BgL_envz00_619, obj_t BgL_elemz00_620, obj_t BgL_lstz00_621)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 65 */
return 
BGl_loopz72z72zz__lalr_utilz00(BgL_elemz00_620, BgL_lstz00_621);} 
}



/* filter */
BGL_EXPORTED_DEF obj_t BGl_filterz00zz__lalr_utilz00(obj_t BgL_pz00_7, obj_t BgL_lstz00_8)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 77 */
return 
BGl_loopz00zz__lalr_utilz00(BgL_pz00_7, BgL_lstz00_8);} 
}



/* loop */
obj_t BGl_loopz00zz__lalr_utilz00(obj_t BgL_pz00_625, obj_t BgL_lz00_391)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 78 */
BGl_loopz00zz__lalr_utilz00:
if(
NULLP(BgL_lz00_391))
{ /* ./Lalr/util.scm 79 */
return BNIL;}  else 
{ /* ./Lalr/util.scm 81 */
obj_t BgL_xz00_394;obj_t BgL_yz00_395;
BgL_xz00_394 = 
CAR(BgL_lz00_391); 
BgL_yz00_395 = 
CDR(BgL_lz00_391); 
{ /* ./Lalr/util.scm 82 */
bool_t BgL_test1067z00_396;
{ /* ./Lalr/util.scm 82 */
obj_t BgL_auxz00_708;
BgL_auxz00_708 = 
PROCEDURE_ENTRY(BgL_pz00_625)(BgL_pz00_625, BgL_xz00_394, BEOA); 
BgL_test1067z00_396 = 
CBOOL(BgL_auxz00_708); } 
if(BgL_test1067z00_396)
{ /* ./Lalr/util.scm 83 */
obj_t BgL_auxz00_713;
BgL_auxz00_713 = 
BGl_loopz00zz__lalr_utilz00(BgL_pz00_625, BgL_yz00_395); 
return 
MAKE_PAIR(BgL_xz00_394, BgL_auxz00_713);}  else 
{ 
obj_t BgL_lz00_716;
BgL_lz00_716 = BgL_yz00_395; 
BgL_lz00_391 = BgL_lz00_716; 
goto BGl_loopz00zz__lalr_utilz00;} } } } 
}



/* _filter1729 */
obj_t BGl__filter1729z00zz__lalr_utilz00(obj_t BgL_envz00_622, obj_t BgL_pz00_623, obj_t BgL_lstz00_624)
{ AN_OBJECT;
{ /* ./Lalr/util.scm 77 */
return 
BGl_loopz00zz__lalr_utilz00(BgL_pz00_623, BgL_lstz00_624);} 
}



/* imported-modules-init */
obj_t BGl_importedzd2moduleszd2initz00zz__lalr_utilz00()
{ AN_OBJECT;
{ /* ./Lalr/util.scm 11 */
return 
BGl_modulezd2initializa7ationz75zz__errorz00(((long)11084), "__lalr_util");} 
}

