/*===========================================================================*/
/*   (Lalr/rewrite.scm)                                                      */
/*   Bigloo (4.7a)                                                           */
/*   Inria -- Sophia Antipolis (c)       Thu Feb 19 09:11:58 AM CET 2026     */
/*===========================================================================*/
/* COMPILATION: (/home/serrano/prgm/project/bigloo/4.7a/bin/bigloo -srfi bigloo-unsafe -O3 -fcfa-arithmetic -q -lib-dir /home/serrano/prgm/project/bigloo/4.7a/lib/bigloo/4.7a +rm -mklib -cc gcc -fsharing -q -no-hello -unsafe -safee -O4 -stdc -c Lalr/rewrite.scm -indent -o objs/obj_u/Lalr/rewrite.c) */
/* GC selection */
#define THE_GC BOEHM_GC

/* unsafe mode */
#define BIGLOO_UNSAFE 1

/* traces mode */
#define BIGLOO_TRACE 0

/* standard Bigloo include */
#include <bigloo.h>

#ifdef __cplusplus
extern "C"
{
#endif
#ifndef BGL_MODULE_TYPE_DEFINITIONS
#define BGL_MODULE_TYPE_DEFINITIONS
#ifndef BGL___LALR_REWRITE_TYPE_DEFINITIONS
#define BGL___LALR_REWRITE_TYPE_DEFINITIONS
#endif													// BGL___LALR_REWRITE_TYPE_DEFINITIONS
#endif													// BGL_MODULE_TYPE_DEFINITIONS

	extern obj_t BGl_putpropz12z12zz__r4_symbols_6_4z00(obj_t, obj_t, obj_t);
	static obj_t BGl_za2maxzd2termza2zd2zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_za2plistza2z00zz__lalr_rewritez00 = BUNSPEC;
	BGL_EXPORTED_DEF obj_t BGl_za2symvza2z00zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_symbol1675z00zz__lalr_rewritez00 = BUNSPEC;
	extern obj_t BGl_nvarsz00zz__lalr_globalz00;
	static obj_t BGl_symbol1677z00zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_symbol1679z00zz__lalr_rewritez00 = BUNSPEC;
	extern obj_t BGl_ntermsz00zz__lalr_globalz00;
	static obj_t BGl_z62cleanzd2plistzb0zz__lalr_rewritez00(obj_t);
	static obj_t BGl_symbol1681z00zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_symbol1685z00zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_symbol1687z00zz__lalr_rewritez00 = BUNSPEC;
	extern obj_t bstring_to_keyword(obj_t);
	static obj_t BGl_requirezd2initializa7ationz75zz__lalr_rewritez00 = BUNSPEC;
	BGL_EXPORTED_DECL obj_t BGl_rewritezd2grammarz12zc0zz__lalr_rewritez00(obj_t);
	static obj_t BGl_symbolzd2ze3symbolzf2bindingzc3zz__lalr_rewritez00(obj_t);
	extern obj_t BGl_nsymsz00zz__lalr_globalz00;
	BGL_EXPORTED_DECL obj_t
		BGl_modulezd2initializa7ationz75zz__lalr_rewritez00(long, char *);
	extern obj_t BGl_modulezd2initializa7ationz75zz__paramz00(long, char *);
	extern obj_t BGl_modulezd2initializa7ationz75zz__lalr_globalz00(long, char *);
	extern obj_t BGl_modulezd2initializa7ationz75zz__errorz00(long, char *);
	static obj_t BGl_toplevelzd2initzd2zz__lalr_rewritez00(void);
	static obj_t BGl_list1684z00zz__lalr_rewritez00 = BUNSPEC;
	extern obj_t BGl_nrulesz00zz__lalr_globalz00;
	static obj_t BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_list1693z00zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_cnstzd2initzd2zz__lalr_rewritez00(void);
	extern bool_t BGl_listzf3zf3zz__r4_pairs_and_lists_6_3z00(obj_t);
	extern obj_t bgl_reverse(obj_t);
	static obj_t BGl_genericzd2initzd2zz__lalr_rewritez00(void);
	extern obj_t BGl_stringzd2copyzd2zz__r4_strings_6_7z00(obj_t);
	extern long bgl_list_length(obj_t);
	static obj_t BGl_importedzd2moduleszd2initz00zz__lalr_rewritez00(void);
	static obj_t BGl_gczd2rootszd2initz00zz__lalr_rewritez00(void);
	static obj_t BGl_objectzd2initzd2zz__lalr_rewritez00(void);
	static bool_t BGl_makezd2symzd2tablez00zz__lalr_rewritez00(void);
	extern obj_t BGl_2zb2zb2zz__r4_numbers_6_5z00(obj_t, obj_t);
	extern obj_t BGl_listzd2ze3stringz31zz__r4_strings_6_7z00(obj_t);
	extern obj_t BGl_memqz00zz__r4_pairs_and_lists_6_3z00(obj_t, obj_t);
	extern obj_t BGl_nitemsz00zz__lalr_globalz00;
	static obj_t BGl_z62rewritezd2grammarz12za2zz__lalr_rewritez00(obj_t, obj_t);
	BGL_EXPORTED_DECL obj_t BGl_cleanzd2plistzd2zz__lalr_rewritez00(void);
	extern obj_t BGl_getpropz00zz__r4_symbols_6_4z00(obj_t, obj_t);
	extern obj_t bgl_bignum_add(obj_t, obj_t);
	static obj_t BGl_setzd2symzd2noz12z12zz__lalr_rewritez00(obj_t);
	extern obj_t bstring_to_symbol(obj_t);
	extern obj_t make_vector(long, obj_t);
	extern obj_t BGl_rempropz12z12zz__r4_symbols_6_4z00(obj_t, obj_t);
	extern obj_t BGl_stringzd2ze3listz31zz__r4_strings_6_7z00(obj_t);
	static obj_t BGl_methodzd2initzd2zz__lalr_rewritez00(void);
	static obj_t BGl_setzd2ntzd2noz12z12zz__lalr_rewritez00(obj_t);
	extern obj_t BGl_grammarz00zz__lalr_globalz00;
	static obj_t BGl_keyword1694z00zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_keyword1696z00zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_keyword1698z00zz__lalr_rewritez00 = BUNSPEC;
	static obj_t BGl_list1702z00zz__lalr_rewritez00 = BUNSPEC;
	extern obj_t bgl_long_to_bignum(long);
	extern obj_t BGl_errorz00zz__errorz00(obj_t, obj_t, obj_t);
	static obj_t *__cnst;


	   
		 
		BGL_DEFINE_STRING(BGl_string1700z00zz__lalr_rewritez00,
		BgL_bgl_string1700za700za7za7_1707za7, "Bad terminal", 12);
	      BGL_DEFINE_STRING(BGl_string1701z00zz__lalr_rewritez00,
		BgL_bgl_string1701za700za7za7_1708za7, "Invalid semantic action", 23);
	      BGL_DEFINE_STRING(BGl_string1703z00zz__lalr_rewritez00,
		BgL_bgl_string1703za700za7za7_1709za7, "Undefined symbol", 16);
	      BGL_DEFINE_STRING(BGl_string1704z00zz__lalr_rewritez00,
		BgL_bgl_string1704za700za7za7_1710za7, "Invalid symbol in right-hand side",
		33);
	      BGL_DEFINE_STRING(BGl_string1705z00zz__lalr_rewritez00,
		BgL_bgl_string1705za700za7za7_1711za7, "Bad right-hand side", 19);
	      BGL_DEFINE_STRING(BGl_string1706z00zz__lalr_rewritez00,
		BgL_bgl_string1706za700za7za7_1712za7, "__lalr_rewrite", 14);
	     
		DEFINE_EXPORT_BGL_PROCEDURE(BGl_cleanzd2plistzd2envz00zz__lalr_rewritez00,
		BgL_bgl_za762cleanza7d2plist1713z00,
		BGl_z62cleanzd2plistzb0zz__lalr_rewritez00, 0L, BUNSPEC, 0);
	      BGL_DEFINE_STRING(BGl_string1676z00zz__lalr_rewritez00,
		BgL_bgl_string1676za700za7za7_1714za7, "nt?", 3);
	      BGL_DEFINE_STRING(BGl_string1678z00zz__lalr_rewritez00,
		BgL_bgl_string1678za700za7za7_1715za7, "prec", 4);
	     
		DEFINE_EXPORT_BGL_PROCEDURE
		(BGl_rewritezd2grammarz12zd2envz12zz__lalr_rewritez00,
		BgL_bgl_za762rewriteza7d2gra1716z00,
		BGl_z62rewritezd2grammarz12za2zz__lalr_rewritez00, 0L, BUNSPEC, 1);
	      BGL_DEFINE_STRING(BGl_string1680z00zz__lalr_rewritez00,
		BgL_bgl_string1680za700za7za7_1717za7, "sym-no", 6);
	      BGL_DEFINE_STRING(BGl_string1682z00zz__lalr_rewritez00,
		BgL_bgl_string1682za700za7za7_1718za7, "lalr-grammar", 12);
	      BGL_DEFINE_STRING(BGl_string1683z00zz__lalr_rewritez00,
		BgL_bgl_string1683za700za7za7_1719za7, "Grammar symbol already defined",
		30);
	      BGL_DEFINE_STRING(BGl_string1686z00zz__lalr_rewritez00,
		BgL_bgl_string1686za700za7za7_1720za7, "*eoi*", 5);
	      BGL_DEFINE_STRING(BGl_string1688z00zz__lalr_rewritez00,
		BgL_bgl_string1688za700za7za7_1721za7, "*start*", 7);
	      BGL_DEFINE_STRING(BGl_string1689z00zz__lalr_rewritez00,
		BgL_bgl_string1689za700za7za7_1722za7, "Non-terminal defined twice", 26);
	      BGL_DEFINE_STRING(BGl_string1690z00zz__lalr_rewritez00,
		BgL_bgl_string1690za700za7za7_1723za7, "LHS must be a symbol", 20);
	      BGL_DEFINE_STRING(BGl_string1691z00zz__lalr_rewritez00,
		BgL_bgl_string1691za700za7za7_1724za7, "Bad rule specification", 22);
	      BGL_DEFINE_STRING(BGl_string1692z00zz__lalr_rewritez00,
		BgL_bgl_string1692za700za7za7_1725za7, "Ill-formed grammar", 18);
	      BGL_DEFINE_STRING(BGl_string1695z00zz__lalr_rewritez00,
		BgL_bgl_string1695za700za7za7_1726za7, "left", 4);
	      BGL_DEFINE_STRING(BGl_string1697z00zz__lalr_rewritez00,
		BgL_bgl_string1697za700za7za7_1727za7, "right", 5);
	      BGL_DEFINE_STRING(BGl_string1699z00zz__lalr_rewritez00,
		BgL_bgl_string1699za700za7za7_1728za7, "none", 4);

/* contant bindings */
	static void bgl_constant_bindings()
	{
		BGL_BIND_STRING(BGl_string1699z00zz__lalr_rewritez00,
			BgL_bgl_string1699za700za7za7_1728za7);
		BGL_BIND_STRING(BGl_string1697z00zz__lalr_rewritez00,
			BgL_bgl_string1697za700za7za7_1727za7);
		BGL_BIND_STRING(BGl_string1695z00zz__lalr_rewritez00,
			BgL_bgl_string1695za700za7za7_1726za7);
		BGL_BIND_STRING(BGl_string1692z00zz__lalr_rewritez00,
			BgL_bgl_string1692za700za7za7_1725za7);
		BGL_BIND_STRING(BGl_string1691z00zz__lalr_rewritez00,
			BgL_bgl_string1691za700za7za7_1724za7);
		BGL_BIND_STRING(BGl_string1690z00zz__lalr_rewritez00,
			BgL_bgl_string1690za700za7za7_1723za7);
		BGL_BIND_STRING(BGl_string1689z00zz__lalr_rewritez00,
			BgL_bgl_string1689za700za7za7_1722za7);
		BGL_BIND_STRING(BGl_string1688z00zz__lalr_rewritez00,
			BgL_bgl_string1688za700za7za7_1721za7);
		BGL_BIND_STRING(BGl_string1686z00zz__lalr_rewritez00,
			BgL_bgl_string1686za700za7za7_1720za7);
		BGL_BIND_STRING(BGl_string1683z00zz__lalr_rewritez00,
			BgL_bgl_string1683za700za7za7_1719za7);
		BGL_BIND_STRING(BGl_string1682z00zz__lalr_rewritez00,
			BgL_bgl_string1682za700za7za7_1718za7);
		BGL_BIND_STRING(BGl_string1680z00zz__lalr_rewritez00,
			BgL_bgl_string1680za700za7za7_1717za7);
		BGL_BIND_PROCEDURE(BGl_rewritezd2grammarz12zd2envz12zz__lalr_rewritez00,
			BgL_bgl_za762rewriteza7d2gra1716z00);
		BGL_BIND_STRING(BGl_string1678z00zz__lalr_rewritez00,
			BgL_bgl_string1678za700za7za7_1715za7);
		BGL_BIND_STRING(BGl_string1676z00zz__lalr_rewritez00,
			BgL_bgl_string1676za700za7za7_1714za7);
		BGL_BIND_PROCEDURE(BGl_cleanzd2plistzd2envz00zz__lalr_rewritez00,
			BgL_bgl_za762cleanza7d2plist1713z00);
		BGL_BIND_STRING(BGl_string1706z00zz__lalr_rewritez00,
			BgL_bgl_string1706za700za7za7_1712za7);
		BGL_BIND_STRING(BGl_string1705z00zz__lalr_rewritez00,
			BgL_bgl_string1705za700za7za7_1711za7);
		BGL_BIND_STRING(BGl_string1704z00zz__lalr_rewritez00,
			BgL_bgl_string1704za700za7za7_1710za7);
		BGL_BIND_STRING(BGl_string1703z00zz__lalr_rewritez00,
			BgL_bgl_string1703za700za7za7_1709za7);
		BGL_BIND_STRING(BGl_string1701z00zz__lalr_rewritez00,
			BgL_bgl_string1701za700za7za7_1708za7);
		BGL_BIND_STRING(BGl_string1700z00zz__lalr_rewritez00,
			BgL_bgl_string1700za700za7za7_1707za7);
	}

/* GC roots registration */
	static obj_t bgl_gc_roots_register()
	{
#if defined( BGL_GC_ROOTS )
#define ADD_ROOT( addr ) (addr > roots_max ? roots_max = addr : (addr < roots_min ? roots_min = addr : 0))
		void *roots_min = (void *) ULONG_MAX, *roots_max = 0;

		ADD_ROOT((void *) (&BGl_za2maxzd2termza2zd2zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_za2plistza2z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_za2symvza2z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_symbol1675z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_symbol1677z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_symbol1679z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_symbol1681z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_symbol1685z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_symbol1687z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_requirezd2initializa7ationz75zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_list1684z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_list1693z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_keyword1694z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_keyword1696z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_keyword1698z00zz__lalr_rewritez00));
		ADD_ROOT((void *) (&BGl_list1702z00zz__lalr_rewritez00));
#undef ADD_ROOT
		if (roots_max > 0)
			GC_add_roots(roots_min, ((void **) roots_max) + 1);
#endif
		return BUNSPEC;
	}



/* module-initialization */
	BGL_EXPORTED_DEF obj_t
		BGl_modulezd2initializa7ationz75zz__lalr_rewritez00(long
		BgL_checksumz00_2137, char *BgL_fromz00_2138)
	{
		{
			if (CBOOL(BGl_requirezd2initializa7ationz75zz__lalr_rewritez00))
				{
					BGl_requirezd2initializa7ationz75zz__lalr_rewritez00 =
						BBOOL(((bool_t) 0));
					bgl_constant_bindings();
					BGl_gczd2rootszd2initz00zz__lalr_rewritez00();
					BGl_cnstzd2initzd2zz__lalr_rewritez00();
					BGl_importedzd2moduleszd2initz00zz__lalr_rewritez00();
					return BGl_toplevelzd2initzd2zz__lalr_rewritez00();
				}
			else
				{
					return BUNSPEC;
				}
		}

	}



/* cnst-init */
	obj_t BGl_cnstzd2initzd2zz__lalr_rewritez00(void)
	{
		{	/* Lalr/rewrite.scm 11 */
			BGl_symbol1675z00zz__lalr_rewritez00 =
				bstring_to_symbol(BGl_string1676z00zz__lalr_rewritez00);
			BGl_symbol1677z00zz__lalr_rewritez00 =
				bstring_to_symbol(BGl_string1678z00zz__lalr_rewritez00);
			BGl_symbol1679z00zz__lalr_rewritez00 =
				bstring_to_symbol(BGl_string1680z00zz__lalr_rewritez00);
			BGl_symbol1681z00zz__lalr_rewritez00 =
				bstring_to_symbol(BGl_string1682z00zz__lalr_rewritez00);
			BGl_symbol1685z00zz__lalr_rewritez00 =
				bstring_to_symbol(BGl_string1686z00zz__lalr_rewritez00);
			BGl_symbol1687z00zz__lalr_rewritez00 =
				bstring_to_symbol(BGl_string1688z00zz__lalr_rewritez00);
			BGl_list1684z00zz__lalr_rewritez00 =
				MAKE_YOUNG_PAIR(BGl_symbol1685z00zz__lalr_rewritez00,
				MAKE_YOUNG_PAIR(BGl_symbol1687z00zz__lalr_rewritez00, BNIL));
			BGl_keyword1694z00zz__lalr_rewritez00 =
				bstring_to_keyword(BGl_string1695z00zz__lalr_rewritez00);
			BGl_keyword1696z00zz__lalr_rewritez00 =
				bstring_to_keyword(BGl_string1697z00zz__lalr_rewritez00);
			BGl_keyword1698z00zz__lalr_rewritez00 =
				bstring_to_keyword(BGl_string1699z00zz__lalr_rewritez00);
			BGl_list1693z00zz__lalr_rewritez00 =
				MAKE_YOUNG_PAIR(BGl_keyword1694z00zz__lalr_rewritez00,
				MAKE_YOUNG_PAIR(BGl_keyword1696z00zz__lalr_rewritez00,
					MAKE_YOUNG_PAIR(BGl_keyword1698z00zz__lalr_rewritez00, BNIL)));
			return (BGl_list1702z00zz__lalr_rewritez00 =
				MAKE_YOUNG_PAIR(BBOOL(((bool_t) 0)), BNIL), BUNSPEC);
		}

	}



/* gc-roots-init */
	obj_t BGl_gczd2rootszd2initz00zz__lalr_rewritez00(void)
	{
		{	/* Lalr/rewrite.scm 11 */
			return bgl_gc_roots_register();
		}

	}



/* toplevel-init */
	obj_t BGl_toplevelzd2initzd2zz__lalr_rewritez00(void)
	{
		{	/* Lalr/rewrite.scm 11 */
			BGl_za2plistza2z00zz__lalr_rewritez00 = BFALSE;
			BGl_za2symvza2z00zz__lalr_rewritez00 = BFALSE;
			BGl_za2maxzd2termza2zd2zz__lalr_rewritez00 = BINT(0L);
			return (BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00 = BINT(1L), BUNSPEC);
		}

	}



/* clean-plist */
	BGL_EXPORTED_DEF obj_t BGl_cleanzd2plistzd2zz__lalr_rewritez00(void)
	{
		{	/* Lalr/rewrite.scm 56 */
			{
				obj_t BgL_lz00_1197;

				{	/* Lalr/rewrite.scm 57 */
					bool_t BgL_tmpz00_2166;

					BgL_lz00_1197 = BGl_za2plistza2z00zz__lalr_rewritez00;
				BgL_zc3z04anonymousza31198ze3z87_1198:
					if (PAIRP(BgL_lz00_1197))
						{	/* Lalr/rewrite.scm 59 */
							obj_t BgL_symz00_1200;

							BgL_symz00_1200 = CAR(BgL_lz00_1197);
							if (CBOOL(BGl_getpropz00zz__r4_symbols_6_4z00(BgL_symz00_1200,
										BGl_symbol1675z00zz__lalr_rewritez00)))
								{	/* Lalr/rewrite.scm 60 */
									BGl_rempropz12z12zz__r4_symbols_6_4z00(BgL_symz00_1200,
										BGl_symbol1675z00zz__lalr_rewritez00);
								}
							else
								{	/* Lalr/rewrite.scm 60 */
									BFALSE;
								}
							if (CBOOL(BGl_getpropz00zz__r4_symbols_6_4z00(BgL_symz00_1200,
										BGl_symbol1677z00zz__lalr_rewritez00)))
								{	/* Lalr/rewrite.scm 62 */
									BGl_rempropz12z12zz__r4_symbols_6_4z00(BgL_symz00_1200,
										BGl_symbol1677z00zz__lalr_rewritez00);
								}
							else
								{	/* Lalr/rewrite.scm 62 */
									BFALSE;
								}
							BGl_rempropz12z12zz__r4_symbols_6_4z00(BgL_symz00_1200,
								BGl_symbol1679z00zz__lalr_rewritez00);
							{
								obj_t BgL_lz00_2179;

								BgL_lz00_2179 = CDR(BgL_lz00_1197);
								BgL_lz00_1197 = BgL_lz00_2179;
								goto BgL_zc3z04anonymousza31198ze3z87_1198;
							}
						}
					else
						{	/* Lalr/rewrite.scm 58 */
							BgL_tmpz00_2166 = ((bool_t) 0);
						}
					return BBOOL(BgL_tmpz00_2166);
				}
			}
		}

	}



/* &clean-plist */
	obj_t BGl_z62cleanzd2plistzb0zz__lalr_rewritez00(obj_t BgL_envz00_2125)
	{
		{	/* Lalr/rewrite.scm 56 */
			return BGl_cleanzd2plistzd2zz__lalr_rewritez00();
		}

	}



/* make-sym-table */
	bool_t BGl_makezd2symzd2tablez00zz__lalr_rewritez00(void)
	{
		{	/* Lalr/rewrite.scm 70 */
			BGl_za2symvza2z00zz__lalr_rewritez00 =
				make_vector(
				(long) CINT(BGl_za2maxzd2termza2zd2zz__lalr_rewritez00), BFALSE);
			{
				obj_t BgL_lz00_1206;

				BgL_lz00_1206 = BGl_za2plistza2z00zz__lalr_rewritez00;
			BgL_zc3z04anonymousza31203ze3z87_1207:
				if (PAIRP(BgL_lz00_1206))
					{	/* Lalr/rewrite.scm 74 */
						obj_t BgL_symz00_1209;

						BgL_symz00_1209 = CAR(BgL_lz00_1206);
						{	/* Lalr/rewrite.scm 75 */
							obj_t BgL_arg1206z00_1210;

							BgL_arg1206z00_1210 =
								BGl_getpropz00zz__r4_symbols_6_4z00(BgL_symz00_1209,
								BGl_symbol1679z00zz__lalr_rewritez00);
							VECTOR_SET(BGl_za2symvza2z00zz__lalr_rewritez00,
								(long) CINT(BgL_arg1206z00_1210), BgL_symz00_1209);
						}
						{
							obj_t BgL_lz00_2191;

							BgL_lz00_2191 = CDR(BgL_lz00_1206);
							BgL_lz00_1206 = BgL_lz00_2191;
							goto BgL_zc3z04anonymousza31203ze3z87_1207;
						}
					}
				else
					{	/* Lalr/rewrite.scm 73 */
						return ((bool_t) 0);
					}
			}
		}

	}



/* set-nt-no! */
	obj_t BGl_setzd2ntzd2noz12z12zz__lalr_rewritez00(obj_t BgL_symz00_3)
	{
		{	/* Lalr/rewrite.scm 85 */
			{	/* Lalr/rewrite.scm 86 */
				obj_t BgL_xz00_1213;

				BgL_xz00_1213 = BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00;
				BGl_putpropz12z12zz__r4_symbols_6_4z00(BgL_symz00_3,
					BGl_symbol1675z00zz__lalr_rewritez00, BTRUE);
				BGl_putpropz12z12zz__r4_symbols_6_4z00(BgL_symz00_3,
					BGl_symbol1679z00zz__lalr_rewritez00,
					BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00);
				if (INTEGERP(BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00))
					{	/* Lalr/rewrite.scm 89 */
						obj_t BgL_za71za7_1767;

						BgL_za71za7_1767 = BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00;
						{	/* Lalr/rewrite.scm 89 */
							obj_t BgL_tmpz00_1769;

							BgL_tmpz00_1769 = BINT(0L);
							{	/* Lalr/rewrite.scm 89 */
								bool_t BgL_test1735z00_2198;

								{	/* Lalr/rewrite.scm 89 */
									obj_t BgL_tmpz00_2199;

									BgL_tmpz00_2199 = BINT(1L);
									BgL_test1735z00_2198 =
										BGL_ADDFX_OV(BgL_za71za7_1767, BgL_tmpz00_2199,
										BgL_tmpz00_1769);
								}
								if (BgL_test1735z00_2198)
									{	/* Lalr/rewrite.scm 89 */
										BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00 =
											bgl_bignum_add(bgl_long_to_bignum(
												(long) CINT(BgL_za71za7_1767)), bgl_long_to_bignum(1L));
									}
								else
									{	/* Lalr/rewrite.scm 89 */
										BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00 = BgL_tmpz00_1769;
									}
							}
						}
					}
				else
					{	/* Lalr/rewrite.scm 89 */
						BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00 =
							BGl_2zb2zb2zz__r4_numbers_6_5z00
							(BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00, BINT(1L));
					}
				BGl_za2plistza2z00zz__lalr_rewritez00 =
					MAKE_YOUNG_PAIR(BgL_symz00_3, BGl_za2plistza2z00zz__lalr_rewritez00);
				return BgL_xz00_1213;
			}
		}

	}



/* set-sym-no! */
	obj_t BGl_setzd2symzd2noz12z12zz__lalr_rewritez00(obj_t BgL_symz00_4)
	{
		{	/* Lalr/rewrite.scm 93 */
			{	/* Lalr/rewrite.scm 94 */
				obj_t BgL_xz00_1214;

				BgL_xz00_1214 =
					BGl_getpropz00zz__r4_symbols_6_4z00(BgL_symz00_4,
					BGl_symbol1679z00zz__lalr_rewritez00);
				if (CBOOL(BgL_xz00_1214))
					{	/* Lalr/rewrite.scm 95 */
						return
							BGl_errorz00zz__errorz00(BGl_symbol1681z00zz__lalr_rewritez00,
							BGl_string1683z00zz__lalr_rewritez00, BgL_symz00_4);
					}
				else
					{	/* Lalr/rewrite.scm 97 */
						obj_t BgL_yz00_1215;

						BgL_yz00_1215 = BGl_za2maxzd2termza2zd2zz__lalr_rewritez00;
						BGl_putpropz12z12zz__r4_symbols_6_4z00(BgL_symz00_4,
							BGl_symbol1679z00zz__lalr_rewritez00,
							BGl_za2maxzd2termza2zd2zz__lalr_rewritez00);
						BGl_za2plistza2z00zz__lalr_rewritez00 =
							MAKE_YOUNG_PAIR(BgL_symz00_4,
							BGl_za2plistza2z00zz__lalr_rewritez00);
						if (INTEGERP(BGl_za2maxzd2termza2zd2zz__lalr_rewritez00))
							{	/* Lalr/rewrite.scm 100 */
								obj_t BgL_za71za7_1777;

								BgL_za71za7_1777 = BGl_za2maxzd2termza2zd2zz__lalr_rewritez00;
								{	/* Lalr/rewrite.scm 100 */
									obj_t BgL_tmpz00_1779;

									BgL_tmpz00_1779 = BINT(0L);
									{	/* Lalr/rewrite.scm 100 */
										bool_t BgL_test1738z00_2218;

										{	/* Lalr/rewrite.scm 100 */
											obj_t BgL_tmpz00_2219;

											BgL_tmpz00_2219 = BINT(1L);
											BgL_test1738z00_2218 =
												BGL_ADDFX_OV(BgL_za71za7_1777, BgL_tmpz00_2219,
												BgL_tmpz00_1779);
										}
										if (BgL_test1738z00_2218)
											{	/* Lalr/rewrite.scm 100 */
												BGl_za2maxzd2termza2zd2zz__lalr_rewritez00 =
													bgl_bignum_add(bgl_long_to_bignum(
														(long) CINT(BgL_za71za7_1777)),
													bgl_long_to_bignum(1L));
											}
										else
											{	/* Lalr/rewrite.scm 100 */
												BGl_za2maxzd2termza2zd2zz__lalr_rewritez00 =
													BgL_tmpz00_1779;
											}
									}
								}
							}
						else
							{	/* Lalr/rewrite.scm 100 */
								BGl_za2maxzd2termza2zd2zz__lalr_rewritez00 =
									BGl_2zb2zb2zz__r4_numbers_6_5z00
									(BGl_za2maxzd2termza2zd2zz__lalr_rewritez00, BINT(1L));
							}
						return BgL_yz00_1215;
					}
			}
		}

	}



/* symbol->symbol/binding */
	obj_t BGl_symbolzd2ze3symbolzf2bindingzc3zz__lalr_rewritez00(obj_t
		BgL_symz00_6)
	{
		{	/* Lalr/rewrite.scm 107 */
			{	/* Lalr/rewrite.scm 108 */
				obj_t BgL_g1039z00_1217;

				{	/* Lalr/rewrite.scm 108 */
					obj_t BgL_arg1225z00_1235;

					{	/* Lalr/rewrite.scm 108 */
						obj_t BgL_arg1450z00_1789;

						BgL_arg1450z00_1789 = SYMBOL_TO_STRING(BgL_symz00_6);
						BgL_arg1225z00_1235 =
							BGl_stringzd2copyzd2zz__r4_strings_6_7z00(BgL_arg1450z00_1789);
					}
					BgL_g1039z00_1217 =
						BGl_stringzd2ze3listz31zz__r4_strings_6_7z00(BgL_arg1225z00_1235);
				}
				{
					obj_t BgL_lz00_1220;
					obj_t BgL_prefixz00_1221;

					BgL_lz00_1220 = BgL_g1039z00_1217;
					BgL_prefixz00_1221 = BNIL;
				BgL_zc3z04anonymousza31209ze3z87_1222:
					if (NULLP(BgL_lz00_1220))
						{	/* Lalr/rewrite.scm 110 */
							return BgL_symz00_6;
						}
					else
						{	/* Lalr/rewrite.scm 112 */
							obj_t BgL_cz00_1224;
							obj_t BgL_rz00_1225;

							BgL_cz00_1224 = CAR(((obj_t) BgL_lz00_1220));
							BgL_rz00_1225 = CDR(((obj_t) BgL_lz00_1220));
							if ((CCHAR(BgL_cz00_1224) == ((unsigned char) '@')))
								{	/* Lalr/rewrite.scm 114 */
									if (NULLP(BgL_rz00_1225))
										{	/* Lalr/rewrite.scm 115 */
											return BgL_symz00_6;
										}
									else
										{	/* Lalr/rewrite.scm 115 */
											return
												MAKE_YOUNG_PAIR(bstring_to_symbol
												(BGl_listzd2ze3stringz31zz__r4_strings_6_7z00
													(bgl_reverse(BgL_prefixz00_1221))),
												bstring_to_symbol
												(BGl_listzd2ze3stringz31zz__r4_strings_6_7z00
													(BgL_rz00_1225)));
										}
								}
							else
								{	/* Lalr/rewrite.scm 119 */
									obj_t BgL_arg1224z00_1233;

									BgL_arg1224z00_1233 =
										MAKE_YOUNG_PAIR(BgL_cz00_1224, BgL_prefixz00_1221);
									{
										obj_t BgL_prefixz00_2250;
										obj_t BgL_lz00_2249;

										BgL_lz00_2249 = BgL_rz00_1225;
										BgL_prefixz00_2250 = BgL_arg1224z00_1233;
										BgL_prefixz00_1221 = BgL_prefixz00_2250;
										BgL_lz00_1220 = BgL_lz00_2249;
										goto BgL_zc3z04anonymousza31209ze3z87_1222;
									}
								}
						}
				}
			}
		}

	}



/* rewrite-grammar! */
	BGL_EXPORTED_DEF obj_t BGl_rewritezd2grammarz12zc0zz__lalr_rewritez00(obj_t
		BgL_gramz00_7)
	{
		{	/* Lalr/rewrite.scm 125 */
			{	/* Lalr/rewrite.scm 125 */
				obj_t BgL_nozd2itemszd2_1236;
				obj_t BgL_nozd2ruleszd2_1237;
				long BgL_preczd2levelzd2_1238;

				BgL_nozd2itemszd2_1236 = BINT(0L);
				BgL_nozd2ruleszd2_1237 = BINT(0L);
				BgL_preczd2levelzd2_1238 = 0L;
				{	/* Lalr/rewrite.scm 126 */
					obj_t BgL_thezd2ruleszd2_1239;

					BgL_thezd2ruleszd2_1239 = CDR(((obj_t) BgL_gramz00_7));
					{	/* Lalr/rewrite.scm 127 */
						obj_t BgL_terminalsz00_1240;

						BgL_terminalsz00_1240 = CAR(((obj_t) BgL_gramz00_7));
						BGl_za2plistza2z00zz__lalr_rewritez00 =
							BGl_list1684z00zz__lalr_rewritez00;
						BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00 = BINT(1L);
						{
							obj_t BgL_lz00_1242;

							BgL_lz00_1242 = BgL_thezd2ruleszd2_1239;
						BgL_zc3z04anonymousza31226ze3z87_1243:
							if (PAIRP(BgL_lz00_1242))
								{	/* Lalr/rewrite.scm 139 */
									obj_t BgL_prodsz00_1245;

									BgL_prodsz00_1245 = CAR(BgL_lz00_1242);
									if (PAIRP(BgL_prodsz00_1245))
										{	/* Lalr/rewrite.scm 141 */
											obj_t BgL_lhsz00_1247;

											BgL_lhsz00_1247 = CAR(BgL_prodsz00_1245);
											if (SYMBOLP(BgL_lhsz00_1247))
												{	/* Lalr/rewrite.scm 142 */
													if (CBOOL(BGl_getpropz00zz__r4_symbols_6_4z00
															(BgL_lhsz00_1247,
																BGl_symbol1675z00zz__lalr_rewritez00)))
														{	/* Lalr/rewrite.scm 143 */
															BGl_errorz00zz__errorz00
																(BGl_symbol1681z00zz__lalr_rewritez00,
																BGl_string1689z00zz__lalr_rewritez00,
																BgL_lhsz00_1247);
														}
													else
														{	/* Lalr/rewrite.scm 143 */
															BGl_setzd2ntzd2noz12z12zz__lalr_rewritez00
																(BgL_lhsz00_1247);
															{
																obj_t BgL_lz00_2271;

																BgL_lz00_2271 = CDR(BgL_lz00_1242);
																BgL_lz00_1242 = BgL_lz00_2271;
																goto BgL_zc3z04anonymousza31226ze3z87_1243;
															}
														}
												}
											else
												{	/* Lalr/rewrite.scm 142 */
													BGl_errorz00zz__errorz00
														(BGl_symbol1681z00zz__lalr_rewritez00,
														BGl_string1690z00zz__lalr_rewritez00,
														BgL_lhsz00_1247);
												}
										}
									else
										{	/* Lalr/rewrite.scm 140 */
											BGl_errorz00zz__errorz00
												(BGl_symbol1681z00zz__lalr_rewritez00,
												BGl_string1691z00zz__lalr_rewritez00,
												BgL_prodsz00_1245);
										}
								}
							else
								{	/* Lalr/rewrite.scm 138 */
									if (NULLP(BgL_lz00_1242))
										{	/* Lalr/rewrite.scm 156 */
											BFALSE;
										}
									else
										{	/* Lalr/rewrite.scm 156 */
											BGl_errorz00zz__errorz00
												(BGl_symbol1681z00zz__lalr_rewritez00,
												BGl_string1692z00zz__lalr_rewritez00, BgL_lz00_1242);
										}
								}
						}
						if (INTEGERP(BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00))
							{	/* Lalr/rewrite.scm 159 */
								obj_t BgL_za71za7_1801;

								BgL_za71za7_1801 = BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00;
								{	/* Lalr/rewrite.scm 159 */
									obj_t BgL_tmpz00_1803;

									BgL_tmpz00_1803 = BINT(0L);
									{	/* Lalr/rewrite.scm 159 */
										bool_t BgL_test1748z00_2281;

										{	/* Lalr/rewrite.scm 159 */
											obj_t BgL_tmpz00_2282;

											BgL_tmpz00_2282 = BINT(1L);
											BgL_test1748z00_2281 =
												BGL_ADDFX_OV(BgL_za71za7_1801, BgL_tmpz00_2282,
												BgL_tmpz00_1803);
										}
										if (BgL_test1748z00_2281)
											{	/* Lalr/rewrite.scm 159 */
												BGl_za2maxzd2termza2zd2zz__lalr_rewritez00 =
													bgl_bignum_add(bgl_long_to_bignum(
														(long) CINT(BgL_za71za7_1801)),
													bgl_long_to_bignum(1L));
											}
										else
											{	/* Lalr/rewrite.scm 159 */
												BGl_za2maxzd2termza2zd2zz__lalr_rewritez00 =
													BgL_tmpz00_1803;
											}
									}
								}
							}
						else
							{	/* Lalr/rewrite.scm 159 */
								BGl_za2maxzd2termza2zd2zz__lalr_rewritez00 =
									BGl_2zb2zb2zz__r4_numbers_6_5z00
									(BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00, BINT(1L));
							}
						BGl_putpropz12z12zz__r4_symbols_6_4z00
							(BGl_symbol1685z00zz__lalr_rewritez00,
							BGl_symbol1679z00zz__lalr_rewritez00,
							BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00);
						BGl_putpropz12z12zz__r4_symbols_6_4z00
							(BGl_symbol1687z00zz__lalr_rewritez00,
							BGl_symbol1679z00zz__lalr_rewritez00, BINT(0L));
						BGl_putpropz12z12zz__r4_symbols_6_4z00
							(BGl_symbol1687z00zz__lalr_rewritez00,
							BGl_symbol1675z00zz__lalr_rewritez00, BTRUE);
						{
							obj_t BgL_l1093z00_1254;

							BgL_l1093z00_1254 = BgL_terminalsz00_1240;
						BgL_zc3z04anonymousza31233ze3z87_1255:
							if (PAIRP(BgL_l1093z00_1254))
								{	/* Lalr/rewrite.scm 168 */
									{	/* Lalr/rewrite.scm 171 */
										obj_t BgL_tz00_1257;

										BgL_tz00_1257 = CAR(BgL_l1093z00_1254);
										if (SYMBOLP(BgL_tz00_1257))
											{	/* Lalr/rewrite.scm 171 */
												BGl_setzd2symzd2noz12z12zz__lalr_rewritez00
													(BgL_tz00_1257);
											}
										else
											{	/* Lalr/rewrite.scm 173 */
												bool_t BgL_test1751z00_2301;

												if (PAIRP(BgL_tz00_1257))
													{	/* Lalr/rewrite.scm 173 */
														BgL_test1751z00_2301 =
															CBOOL(BGl_memqz00zz__r4_pairs_and_lists_6_3z00(CAR
																(BgL_tz00_1257),
																BGl_list1693z00zz__lalr_rewritez00));
													}
												else
													{	/* Lalr/rewrite.scm 173 */
														BgL_test1751z00_2301 = ((bool_t) 0);
													}
												if (BgL_test1751z00_2301)
													{	/* Lalr/rewrite.scm 173 */
														BgL_preczd2levelzd2_1238 =
															(BgL_preczd2levelzd2_1238 + 1L);
														{	/* Lalr/rewrite.scm 175 */
															obj_t BgL_g1092z00_1262;

															BgL_g1092z00_1262 = CDR(BgL_tz00_1257);
															{
																obj_t BgL_l1090z00_1264;

																{	/* Lalr/rewrite.scm 181 */
																	bool_t BgL_tmpz00_2309;

																	BgL_l1090z00_1264 = BgL_g1092z00_1262;
																BgL_zc3z04anonymousza31241ze3z87_1265:
																	if (PAIRP(BgL_l1090z00_1264))
																		{	/* Lalr/rewrite.scm 181 */
																			{	/* Lalr/rewrite.scm 178 */
																				obj_t BgL_innerzd2tzd2_1267;

																				BgL_innerzd2tzd2_1267 =
																					CAR(BgL_l1090z00_1264);
																				if (SYMBOLP(BgL_innerzd2tzd2_1267))
																					{	/* Lalr/rewrite.scm 177 */
																						BFALSE;
																					}
																				else
																					{	/* Lalr/rewrite.scm 177 */
																						BGl_errorz00zz__errorz00
																							(BGl_symbol1681z00zz__lalr_rewritez00,
																							BGl_string1700z00zz__lalr_rewritez00,
																							BgL_innerzd2tzd2_1267);
																					}
																				BGl_setzd2symzd2noz12z12zz__lalr_rewritez00
																					(BgL_innerzd2tzd2_1267);
																				{	/* Lalr/rewrite.scm 180 */
																					obj_t BgL_arg1248z00_1269;

																					{	/* Lalr/rewrite.scm 180 */
																						obj_t BgL_arg1249z00_1270;

																						BgL_arg1249z00_1270 =
																							CAR(((obj_t) BgL_tz00_1257));
																						BgL_arg1248z00_1269 =
																							MAKE_YOUNG_PAIR
																							(BgL_arg1249z00_1270,
																							BINT(BgL_preczd2levelzd2_1238));
																					}
																					BGl_putpropz12z12zz__r4_symbols_6_4z00
																						(BgL_innerzd2tzd2_1267,
																						BGl_symbol1677z00zz__lalr_rewritez00,
																						BgL_arg1248z00_1269);
																				}
																			}
																			{
																				obj_t BgL_l1090z00_2322;

																				BgL_l1090z00_2322 =
																					CDR(BgL_l1090z00_1264);
																				BgL_l1090z00_1264 = BgL_l1090z00_2322;
																				goto
																					BgL_zc3z04anonymousza31241ze3z87_1265;
																			}
																		}
																	else
																		{	/* Lalr/rewrite.scm 181 */
																			BgL_tmpz00_2309 = ((bool_t) 1);
																		}
																	BBOOL(BgL_tmpz00_2309);
																}
															}
														}
													}
												else
													{	/* Lalr/rewrite.scm 173 */
														BGl_errorz00zz__errorz00
															(BGl_symbol1681z00zz__lalr_rewritez00,
															BGl_string1700z00zz__lalr_rewritez00,
															BgL_tz00_1257);
													}
											}
									}
									{
										obj_t BgL_l1093z00_2326;

										BgL_l1093z00_2326 = CDR(BgL_l1093z00_1254);
										BgL_l1093z00_1254 = BgL_l1093z00_2326;
										goto BgL_zc3z04anonymousza31233ze3z87_1255;
									}
								}
							else
								{	/* Lalr/rewrite.scm 168 */
									((bool_t) 1);
								}
						}
						{
							obj_t BgL_lz00_1278;

							BgL_lz00_1278 = BgL_thezd2ruleszd2_1239;
						BgL_zc3z04anonymousza31255ze3z87_1279:
							if (PAIRP(BgL_lz00_1278))
								{	/* Lalr/rewrite.scm 190 */
									obj_t BgL_rulesz00_1281;

									BgL_rulesz00_1281 = CAR(BgL_lz00_1278);
									{	/* Lalr/rewrite.scm 191 */

										{	/* Lalr/rewrite.scm 192 */
											obj_t BgL_g1041z00_1283;

											BgL_g1041z00_1283 = CDR(((obj_t) BgL_rulesz00_1281));
											{
												obj_t BgL_rhszd2lzd2_1285;

												BgL_rhszd2lzd2_1285 = BgL_g1041z00_1283;
											BgL_zc3z04anonymousza31257ze3z87_1286:
												if (NULLP(BgL_rhszd2lzd2_1285))
													{	/* Lalr/rewrite.scm 195 */
														obj_t BgL_arg1259z00_1288;

														BgL_arg1259z00_1288 = CDR(((obj_t) BgL_lz00_1278));
														{
															obj_t BgL_lz00_2337;

															BgL_lz00_2337 = BgL_arg1259z00_1288;
															BgL_lz00_1278 = BgL_lz00_2337;
															goto BgL_zc3z04anonymousza31255ze3z87_1279;
														}
													}
												else
													{	/* Lalr/rewrite.scm 194 */
														if (PAIRP(BgL_rhszd2lzd2_1285))
															{	/* Lalr/rewrite.scm 197 */
																obj_t BgL_rhszf2actionzf2_1290;

																BgL_rhszf2actionzf2_1290 =
																	CAR(BgL_rhszd2lzd2_1285);
																if (INTEGERP(BgL_nozd2ruleszd2_1237))
																	{	/* Lalr/rewrite.scm 198 */
																		obj_t BgL_za71za7_1824;

																		BgL_za71za7_1824 = BgL_nozd2ruleszd2_1237;
																		{	/* Lalr/rewrite.scm 198 */
																			obj_t BgL_tmpz00_1826;

																			BgL_tmpz00_1826 = BINT(0L);
																			{	/* Lalr/rewrite.scm 198 */
																				bool_t BgL_test1759z00_2344;

																				{	/* Lalr/rewrite.scm 198 */
																					obj_t BgL_tmpz00_2345;

																					BgL_tmpz00_2345 = BINT(1L);
																					BgL_test1759z00_2344 =
																						BGL_ADDFX_OV(BgL_za71za7_1824,
																						BgL_tmpz00_2345, BgL_tmpz00_1826);
																				}
																				if (BgL_test1759z00_2344)
																					{	/* Lalr/rewrite.scm 198 */
																						BgL_nozd2ruleszd2_1237 =
																							bgl_bignum_add(bgl_long_to_bignum(
																								(long) CINT(BgL_za71za7_1824)),
																							bgl_long_to_bignum(1L));
																					}
																				else
																					{	/* Lalr/rewrite.scm 198 */
																						BgL_nozd2ruleszd2_1237 =
																							BgL_tmpz00_1826;
																					}
																			}
																		}
																	}
																else
																	{	/* Lalr/rewrite.scm 198 */
																		BgL_nozd2ruleszd2_1237 =
																			BGl_2zb2zb2zz__r4_numbers_6_5z00
																			(BgL_nozd2ruleszd2_1237, BINT(1L));
																	}
																if (PAIRP(BgL_rhszf2actionzf2_1290))
																	{	/* Lalr/rewrite.scm 200 */
																		obj_t BgL_actionz00_1292;

																		BgL_actionz00_1292 =
																			CDR(BgL_rhszf2actionzf2_1290);
																		if (BGl_listzf3zf3zz__r4_pairs_and_lists_6_3z00(BgL_actionz00_1292))
																			{	/* Lalr/rewrite.scm 201 */
																				BFALSE;
																			}
																		else
																			{	/* Lalr/rewrite.scm 201 */
																				BGl_errorz00zz__errorz00
																					(BGl_symbol1681z00zz__lalr_rewritez00,
																					BGl_string1701z00zz__lalr_rewritez00,
																					BgL_rhszf2actionzf2_1290);
																			}
																		if (NULLP(BgL_actionz00_1292))
																			{	/* Lalr/rewrite.scm 203 */
																				SET_CDR(BgL_rhszf2actionzf2_1290,
																					BGl_list1702z00zz__lalr_rewritez00);
																			}
																		else
																			{	/* Lalr/rewrite.scm 203 */
																				BFALSE;
																			}
																		{	/* Lalr/rewrite.scm 205 */
																			obj_t BgL_g1042z00_1295;

																			BgL_g1042z00_1295 =
																				CAR(BgL_rhszf2actionzf2_1290);
																			{
																				obj_t BgL_rhsz00_1297;

																				BgL_rhsz00_1297 = BgL_g1042z00_1295;
																			BgL_zc3z04anonymousza31264ze3z87_1298:
																				if (NULLP(BgL_rhsz00_1297))
																					{	/* Lalr/rewrite.scm 207 */
																						{	/* Lalr/rewrite.scm 209 */
																							obj_t BgL_b1096z00_1300;

																							{	/* Lalr/rewrite.scm 209 */
																								long BgL_a1095z00_1302;

																								BgL_a1095z00_1302 =
																									bgl_list_length(CAR(
																										((obj_t)
																											BgL_rhszf2actionzf2_1290)));
																								{	/* Lalr/rewrite.scm 209 */
																									obj_t BgL_za71za7_1839;

																									BgL_za71za7_1839 =
																										BINT(BgL_a1095z00_1302);
																									{	/* Lalr/rewrite.scm 209 */
																										obj_t BgL_tmpz00_1841;

																										BgL_tmpz00_1841 = BINT(0L);
																										{	/* Lalr/rewrite.scm 209 */
																											bool_t
																												BgL_test1764z00_2371;
																											{	/* Lalr/rewrite.scm 209 */
																												obj_t BgL_tmpz00_2372;

																												BgL_tmpz00_2372 =
																													BINT(1L);
																												BgL_test1764z00_2371 =
																													BGL_ADDFX_OV
																													(BgL_za71za7_1839,
																													BgL_tmpz00_2372,
																													BgL_tmpz00_1841);
																											}
																											if (BgL_test1764z00_2371)
																												{	/* Lalr/rewrite.scm 209 */
																													BgL_b1096z00_1300 =
																														bgl_bignum_add
																														(bgl_long_to_bignum(
																															(long)
																															CINT
																															(BgL_za71za7_1839)),
																														bgl_long_to_bignum
																														(1L));
																												}
																											else
																												{	/* Lalr/rewrite.scm 209 */
																													BgL_b1096z00_1300 =
																														BgL_tmpz00_1841;
																												}
																										}
																									}
																								}
																							}
																							{	/* Lalr/rewrite.scm 209 */
																								bool_t BgL_test1765z00_2379;

																								if (INTEGERP
																									(BgL_nozd2itemszd2_1236))
																									{	/* Lalr/rewrite.scm 209 */
																										BgL_test1765z00_2379 =
																											INTEGERP
																											(BgL_b1096z00_1300);
																									}
																								else
																									{	/* Lalr/rewrite.scm 209 */
																										BgL_test1765z00_2379 =
																											((bool_t) 0);
																									}
																								if (BgL_test1765z00_2379)
																									{	/* Lalr/rewrite.scm 209 */
																										obj_t BgL_za71za7_1849;

																										BgL_za71za7_1849 =
																											BgL_nozd2itemszd2_1236;
																										{	/* Lalr/rewrite.scm 209 */
																											obj_t BgL_tmpz00_1851;

																											BgL_tmpz00_1851 =
																												BINT(0L);
																											if (BGL_ADDFX_OV
																												(BgL_za71za7_1849,
																													BgL_b1096z00_1300,
																													BgL_tmpz00_1851))
																												{	/* Lalr/rewrite.scm 209 */
																													BgL_nozd2itemszd2_1236
																														=
																														bgl_bignum_add
																														(bgl_long_to_bignum(
																															(long)
																															CINT
																															(BgL_za71za7_1849)),
																														bgl_long_to_bignum(
																															(long)
																															CINT
																															(BgL_b1096z00_1300)));
																												}
																											else
																												{	/* Lalr/rewrite.scm 209 */
																													BgL_nozd2itemszd2_1236
																														= BgL_tmpz00_1851;
																												}
																										}
																									}
																								else
																									{	/* Lalr/rewrite.scm 209 */
																										BgL_nozd2itemszd2_1236 =
																											BGl_2zb2zb2zz__r4_numbers_6_5z00
																											(BgL_nozd2itemszd2_1236,
																											BgL_b1096z00_1300);
																									}
																							}
																						}
																						{	/* Lalr/rewrite.scm 210 */
																							obj_t BgL_arg1269z00_1304;

																							BgL_arg1269z00_1304 =
																								CDR(
																								((obj_t) BgL_rhszd2lzd2_1285));
																							{
																								obj_t BgL_rhszd2lzd2_2394;

																								BgL_rhszd2lzd2_2394 =
																									BgL_arg1269z00_1304;
																								BgL_rhszd2lzd2_1285 =
																									BgL_rhszd2lzd2_2394;
																								goto
																									BgL_zc3z04anonymousza31257ze3z87_1286;
																							}
																						}
																					}
																				else
																					{	/* Lalr/rewrite.scm 207 */
																						if (PAIRP(BgL_rhsz00_1297))
																							{	/* Lalr/rewrite.scm 212 */
																								obj_t BgL_symz00_1306;

																								BgL_symz00_1306 =
																									CAR(BgL_rhsz00_1297);
																								if (SYMBOLP(BgL_symz00_1306))
																									{	/* Lalr/rewrite.scm 214 */
																										obj_t BgL_symzf2varzf2_1308;

																										BgL_symzf2varzf2_1308 =
																											BGl_symbolzd2ze3symbolzf2bindingzc3zz__lalr_rewritez00
																											(BgL_symz00_1306);
																										{	/* Lalr/rewrite.scm 214 */
																											obj_t
																												BgL_thezd2symzd2_1309;
																											if (SYMBOLP
																												(BgL_symzf2varzf2_1308))
																												{	/* Lalr/rewrite.scm 215 */
																													BgL_thezd2symzd2_1309
																														=
																														BgL_symzf2varzf2_1308;
																												}
																											else
																												{	/* Lalr/rewrite.scm 215 */
																													BgL_thezd2symzd2_1309
																														=
																														CAR(((obj_t)
																															BgL_symzf2varzf2_1308));
																												}
																											{	/* Lalr/rewrite.scm 215 */

																												SET_CAR(BgL_rhsz00_1297,
																													BgL_symzf2varzf2_1308);
																												if (CBOOL
																													(BGl_getpropz00zz__r4_symbols_6_4z00
																														(BgL_thezd2symzd2_1309,
																															BGl_symbol1679z00zz__lalr_rewritez00)))
																													{	/* Lalr/rewrite.scm 104 */
																														BFALSE;
																													}
																												else
																													{	/* Lalr/rewrite.scm 104 */
																														BGl_errorz00zz__errorz00
																															(BGl_symbol1681z00zz__lalr_rewritez00,
																															BGl_string1703z00zz__lalr_rewritez00,
																															BgL_thezd2symzd2_1309);
																													}
																												{
																													obj_t BgL_rhsz00_2410;

																													BgL_rhsz00_2410 =
																														CDR
																														(BgL_rhsz00_1297);
																													BgL_rhsz00_1297 =
																														BgL_rhsz00_2410;
																													goto
																														BgL_zc3z04anonymousza31264ze3z87_1298;
																												}
																											}
																										}
																									}
																								else
																									{	/* Lalr/rewrite.scm 213 */
																										BGl_errorz00zz__errorz00
																											(BGl_symbol1681z00zz__lalr_rewritez00,
																											BGl_string1704z00zz__lalr_rewritez00,
																											BgL_rhsz00_1297);
																									}
																							}
																						else
																							{	/* Lalr/rewrite.scm 211 */
																								BGl_errorz00zz__errorz00
																									(BGl_symbol1681z00zz__lalr_rewritez00,
																									BGl_string1705z00zz__lalr_rewritez00,
																									BgL_rhsz00_1297);
																							}
																					}
																			}
																		}
																	}
																else
																	{	/* Lalr/rewrite.scm 199 */
																		BFALSE;
																	}
															}
														else
															{	/* Lalr/rewrite.scm 196 */
																BGl_errorz00zz__errorz00
																	(BGl_symbol1681z00zz__lalr_rewritez00,
																	BGl_string1691z00zz__lalr_rewritez00,
																	BgL_lz00_1278);
															}
													}
											}
										}
									}
								}
							else
								{	/* Lalr/rewrite.scm 189 */
									BFALSE;
								}
						}
						BGl_makezd2symzd2tablez00zz__lalr_rewritez00();
						{	/* Lalr/rewrite.scm 234 */
							obj_t BgL_startzd2symzd2_1315;

							{	/* Lalr/rewrite.scm 234 */
								obj_t BgL_pairz00_1868;

								BgL_pairz00_1868 = CAR(((obj_t) BgL_thezd2ruleszd2_1239));
								BgL_startzd2symzd2_1315 = CAR(BgL_pairz00_1868);
							}
							{	/* Lalr/rewrite.scm 236 */
								obj_t BgL_arg1276z00_1316;

								{	/* Lalr/rewrite.scm 236 */
									obj_t BgL_arg1278z00_1317;

									{	/* Lalr/rewrite.scm 236 */
										obj_t BgL_arg1279z00_1318;

										{	/* Lalr/rewrite.scm 236 */
											obj_t BgL_arg1280z00_1319;
											obj_t BgL_arg1281z00_1320;

											{	/* Lalr/rewrite.scm 236 */
												obj_t BgL_arg1282z00_1321;

												BgL_arg1282z00_1321 =
													MAKE_YOUNG_PAIR(BGl_symbol1685z00zz__lalr_rewritez00,
													BNIL);
												BgL_arg1280z00_1319 =
													MAKE_YOUNG_PAIR(BgL_startzd2symzd2_1315,
													BgL_arg1282z00_1321);
											}
											BgL_arg1281z00_1320 =
												MAKE_YOUNG_PAIR(BgL_startzd2symzd2_1315, BNIL);
											BgL_arg1279z00_1318 =
												MAKE_YOUNG_PAIR(BgL_arg1280z00_1319,
												BgL_arg1281z00_1320);
										}
										BgL_arg1278z00_1317 =
											MAKE_YOUNG_PAIR(BgL_arg1279z00_1318, BNIL);
									}
									BgL_arg1276z00_1316 =
										MAKE_YOUNG_PAIR(BGl_symbol1687z00zz__lalr_rewritez00,
										BgL_arg1278z00_1317);
								}
								BGl_grammarz00zz__lalr_globalz00 =
									MAKE_YOUNG_PAIR(BgL_arg1276z00_1316, BgL_thezd2ruleszd2_1239);
							}
						}
						if (INTEGERP(BgL_nozd2ruleszd2_1237))
							{	/* Lalr/rewrite.scm 238 */
								obj_t BgL_za71za7_1869;

								BgL_za71za7_1869 = BgL_nozd2ruleszd2_1237;
								{	/* Lalr/rewrite.scm 238 */
									obj_t BgL_tmpz00_1871;

									BgL_tmpz00_1871 = BINT(0L);
									{	/* Lalr/rewrite.scm 238 */
										bool_t BgL_test1773z00_2429;

										{	/* Lalr/rewrite.scm 238 */
											obj_t BgL_tmpz00_2430;

											BgL_tmpz00_2430 = BINT(2L);
											BgL_test1773z00_2429 =
												BGL_ADDFX_OV(BgL_za71za7_1869, BgL_tmpz00_2430,
												BgL_tmpz00_1871);
										}
										if (BgL_test1773z00_2429)
											{	/* Lalr/rewrite.scm 238 */
												BGl_nrulesz00zz__lalr_globalz00 =
													bgl_bignum_add(bgl_long_to_bignum(
														(long) CINT(BgL_za71za7_1869)),
													bgl_long_to_bignum(2L));
											}
										else
											{	/* Lalr/rewrite.scm 238 */
												BGl_nrulesz00zz__lalr_globalz00 = BgL_tmpz00_1871;
											}
									}
								}
							}
						else
							{	/* Lalr/rewrite.scm 238 */
								BGl_nrulesz00zz__lalr_globalz00 =
									BGl_2zb2zb2zz__r4_numbers_6_5z00(BgL_nozd2ruleszd2_1237,
									BINT(2L));
							}
						if (INTEGERP(BgL_nozd2itemszd2_1236))
							{	/* Lalr/rewrite.scm 239 */
								obj_t BgL_za71za7_1879;

								BgL_za71za7_1879 = BgL_nozd2itemszd2_1236;
								{	/* Lalr/rewrite.scm 239 */
									obj_t BgL_tmpz00_1881;

									BgL_tmpz00_1881 = BINT(0L);
									{	/* Lalr/rewrite.scm 239 */
										bool_t BgL_test1775z00_2442;

										{	/* Lalr/rewrite.scm 239 */
											obj_t BgL_tmpz00_2443;

											BgL_tmpz00_2443 = BINT(3L);
											BgL_test1775z00_2442 =
												BGL_ADDFX_OV(BgL_za71za7_1879, BgL_tmpz00_2443,
												BgL_tmpz00_1881);
										}
										if (BgL_test1775z00_2442)
											{	/* Lalr/rewrite.scm 239 */
												BGl_nitemsz00zz__lalr_globalz00 =
													bgl_bignum_add(bgl_long_to_bignum(
														(long) CINT(BgL_za71za7_1879)),
													bgl_long_to_bignum(3L));
											}
										else
											{	/* Lalr/rewrite.scm 239 */
												BGl_nitemsz00zz__lalr_globalz00 = BgL_tmpz00_1881;
											}
									}
								}
							}
						else
							{	/* Lalr/rewrite.scm 239 */
								BGl_nitemsz00zz__lalr_globalz00 =
									BGl_2zb2zb2zz__r4_numbers_6_5z00(BgL_nozd2itemszd2_1236,
									BINT(3L));
							}
						BGl_ntermsz00zz__lalr_globalz00 =
							BGl_za2maxzd2termza2zd2zz__lalr_rewritez00;
						BGl_nvarsz00zz__lalr_globalz00 =
							BGl_za2maxzd2ntza2zd2zz__lalr_rewritez00;
						{	/* Lalr/rewrite.scm 242 */
							bool_t BgL_test1776z00_2452;

							if (INTEGERP(BGl_ntermsz00zz__lalr_globalz00))
								{	/* Lalr/rewrite.scm 242 */
									BgL_test1776z00_2452 =
										INTEGERP(BGl_nvarsz00zz__lalr_globalz00);
								}
							else
								{	/* Lalr/rewrite.scm 242 */
									BgL_test1776z00_2452 = ((bool_t) 0);
								}
							if (BgL_test1776z00_2452)
								{	/* Lalr/rewrite.scm 242 */
									obj_t BgL_za71za7_1889;
									obj_t BgL_za72za7_1890;

									BgL_za71za7_1889 = BGl_ntermsz00zz__lalr_globalz00;
									BgL_za72za7_1890 = BGl_nvarsz00zz__lalr_globalz00;
									{	/* Lalr/rewrite.scm 242 */
										obj_t BgL_tmpz00_1891;

										BgL_tmpz00_1891 = BINT(0L);
										if (BGL_ADDFX_OV(BgL_za71za7_1889, BgL_za72za7_1890,
												BgL_tmpz00_1891))
											{	/* Lalr/rewrite.scm 242 */
												return (BGl_nsymsz00zz__lalr_globalz00 =
													bgl_bignum_add(bgl_long_to_bignum(
															(long) CINT(BgL_za71za7_1889)),
														bgl_long_to_bignum(
															(long) CINT(BgL_za72za7_1890))), BUNSPEC);
											}
										else
											{	/* Lalr/rewrite.scm 242 */
												return (BGl_nsymsz00zz__lalr_globalz00 =
													BgL_tmpz00_1891, BUNSPEC);
											}
									}
								}
							else
								{	/* Lalr/rewrite.scm 242 */
									return (BGl_nsymsz00zz__lalr_globalz00 =
										BGl_2zb2zb2zz__r4_numbers_6_5z00
										(BGl_ntermsz00zz__lalr_globalz00,
											BGl_nvarsz00zz__lalr_globalz00), BUNSPEC);
								}
						}
					}
				}
			}
		}

	}



/* &rewrite-grammar! */
	obj_t BGl_z62rewritezd2grammarz12za2zz__lalr_rewritez00(obj_t BgL_envz00_2126,
		obj_t BgL_gramz00_2127)
	{
		{	/* Lalr/rewrite.scm 125 */
			return BGl_rewritezd2grammarz12zc0zz__lalr_rewritez00(BgL_gramz00_2127);
		}

	}



/* object-init */
	obj_t BGl_objectzd2initzd2zz__lalr_rewritez00(void)
	{
		{	/* Lalr/rewrite.scm 11 */
			return BUNSPEC;
		}

	}



/* generic-init */
	obj_t BGl_genericzd2initzd2zz__lalr_rewritez00(void)
	{
		{	/* Lalr/rewrite.scm 11 */
			return BUNSPEC;
		}

	}



/* method-init */
	obj_t BGl_methodzd2initzd2zz__lalr_rewritez00(void)
	{
		{	/* Lalr/rewrite.scm 11 */
			return BUNSPEC;
		}

	}



/* imported-modules-init */
	obj_t BGl_importedzd2moduleszd2initz00zz__lalr_rewritez00(void)
	{
		{	/* Lalr/rewrite.scm 11 */
			BGl_modulezd2initializa7ationz75zz__errorz00(88804785L,
				BSTRING_TO_STRING(BGl_string1706z00zz__lalr_rewritez00));
			BGl_modulezd2initializa7ationz75zz__lalr_globalz00(39277513L,
				BSTRING_TO_STRING(BGl_string1706z00zz__lalr_rewritez00));
			return
				BGl_modulezd2initializa7ationz75zz__paramz00(453939141L,
				BSTRING_TO_STRING(BGl_string1706z00zz__lalr_rewritez00));
		}

	}

#ifdef __cplusplus
}
#endif
