extern char *malloc(), *realloc();

# line 2 "drucompi.yac"
#include <stdio.h>
#include MPH_H
#include MUT_H
#include RDS_H
#include RUT_H
#include RTL_H
#include RWI_H
#include RFM_H
#include RPR_H
#include "drucutil.h"
#include "drucompi.h"

/*------------------------------------------------------------\
|                                                             |
|                  Druc Variables LEX/YACC                    |
|                                                             |
\------------------------------------------------------------*/
extern int   yylineno;
extern FILE *yyin;
       int   DrucIndexMesure;
       int   DrucInputEntier;
       float DrucInputFloat;
       char  DrucInputChaine[DRUC_MAX_STRING_BUFFER + 1];
# define DRUC_REGLES 257
# define DRUC_FIN 258
# define DRUC_REGLE 259
# define DRUC_DEFINE 260
# define DRUC_UNDEFINE 261
# define DRUC_CARACTERISE 262
# define DRUC_RELATION 263
# define DRUC_LAYER 264
# define DRUC_NOM 265
# define DRUC_UNION 266
# define DRUC_EXCLUSION 267
# define DRUC_ENVELOPPE 268
# define DRUC_MARGE 269
# define DRUC_CROIX 270
# define DRUC_INTERSECT 271
# define DRUC_EXTENSION 272
# define DRUC_INCLUSION 273
# define DRUC_DISTANCE 274
# define DRUC_SURFACE_INTER 275
# define DRUC_LONG_INTER 276
# define DRUC_LARGE_INTER 277
# define DRUC_PENET_INTER 278
# define DRUC_PARAL_INTER 279
# define DRUC_PERPEN_INTER 280
# define DRUC_FRONTALE 281
# define DRUC_LATERALE_MIN 282
# define DRUC_LATERALE_MAX 283
# define DRUC_LARGEUR_MIN 284
# define DRUC_LARGEUR_MAX 285
# define DRUC_LONGUEUR_MIN 286
# define DRUC_LONGUEUR_MAX 287
# define DRUC_SUP 288
# define DRUC_INF 289
# define DRUC_AXIALE 290
# define DRUC_GEODESIQUE 291
# define DRUC_SURFACE 292
# define DRUC_LONGUEUR 293
# define DRUC_LARGEUR 294
# define DRUC_MIN 295
# define DRUC_MAX 296
# define DRUC_INFEQ 297
# define DRUC_SUPEQ 298
# define DRUC_DIFF 299
# define DRUC_NOTCH 300
# define DRUC_ENTIER 301
# define DRUC_FLOAT 302
#define yyclearin yychar = -1
#define yyerrok yyerrflag = 0
extern int yychar;
extern int yyerrflag;
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 150
#endif
#ifndef YYSTYPE
#define YYSTYPE int
#endif
YYSTYPE yylval, yyval;
# define YYERRCODE 256

# line 271 "drucompi.yac"


int yyexca[] ={
-1, 1,
	0, -1,
	-2, 0,
	};
# define YYNPROD 82
# define YYLAST 279
int yyact[]={

    85,    87,    86,    73,    74,    75,   121,    91,    21,    90,
    57,   101,   102,   103,    98,    99,   100,    97,    42,    44,
    69,    70,    71,    43,    62,    45,    54,    50,    72,   105,
   106,   107,   108,   109,   110,    33,    26,   115,   113,   114,
   111,   112,   116,   117,   118,   119,    22,    25,    17,    18,
    19,    20,    17,    18,    19,    20,    24,    76,     8,     5,
    51,    66,    48,    29,     9,    80,    65,    36,   123,    95,
    89,    79,    56,    37,    34,    94,    63,    47,    59,    49,
    61,    38,    12,     4,   122,   104,    96,     7,    92,    78,
    64,    58,    39,    27,    23,    93,    68,    60,    53,    46,
    32,    31,    67,    55,    41,    30,    16,    15,    14,    13,
    28,    10,    40,    35,    11,     6,     3,     2,     1,     0,
     0,     0,     0,     0,    52,     0,     0,     0,     0,     0,
     0,    77,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
   120,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,    81,    82,    83,    84,    88,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,    66,     0,     0,    48 };
int yypact[]={

 -1000, -1000,  -205,  -205, -1000,  -207,  -193, -1000, -1000,  -208,
  -294,  -212, -1000, -1000, -1000, -1000, -1000,  -209,  -218,  -229,
 -1000, -1000,  -194, -1000, -1000, -1000, -1000,  -230,    15, -1000,
     6,    14,    41, -1000, -1000, -1000,  -248, -1000,  -197,    35,
 -1000,  -238, -1000, -1000, -1000, -1000,    19, -1000, -1000,  -239,
 -1000,    13, -1000,  -291, -1000,    34, -1000, -1000,    40,  -241,
    18,  -198, -1000,  -272,    16, -1000, -1000,    12,   -60, -1000,
 -1000, -1000, -1000, -1000, -1000, -1000,    11, -1000,  -292, -1000,
  -295, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
 -1000, -1000,    17,    10,  -257, -1000,  -246, -1000, -1000, -1000,
 -1000, -1000, -1000, -1000,   -60, -1000, -1000, -1000, -1000, -1000,
 -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
  -296, -1000,     9, -1000 };
int yypgo[]={

     0,   118,   117,   116,   115,   114,   113,   112,    83,   111,
   110,    82,   109,   108,   107,   106,   105,   104,   103,   102,
   101,   100,    99,    77,    98,    97,    96,    65,    95,    93,
    92,    91,    90,    66,    89,    88,    86,    85,    84 };
int yyr1[]={

     0,     2,     4,     6,     1,     3,     3,     9,    10,     8,
     5,     5,    11,    11,    11,    11,    16,    18,    19,    12,
    17,    17,    17,    17,    20,    13,    21,    14,    22,    22,
    24,    25,    28,    23,    29,    30,    31,    15,    32,    32,
    34,    35,    38,    33,    36,    36,    36,    36,    36,    36,
    36,    37,    37,    37,    37,    37,    37,    37,    37,    37,
    37,    37,    37,    37,    37,    37,    26,    26,    26,    26,
    26,    26,    26,    27,    27,    27,    27,    27,    27,    27,
    27,     7 };
int yyr2[]={

     0,     1,     1,     1,    19,     4,     2,     1,     1,    12,
     4,     2,     3,     3,     3,     3,     1,     1,     1,    22,
     3,     3,     3,     3,     1,     8,     1,    14,     4,     2,
     1,     1,     1,    20,     1,     1,     1,    22,     4,     2,
     1,     1,     1,    22,     3,     3,     3,     3,     3,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
     3,     1 };
int yychk[]={

 -1000,    -1,    -2,    -3,    -8,   264,    -4,    -8,   265,   257,
    -9,    -5,   -11,   -12,   -13,   -14,   -15,   260,   261,   262,
   263,   302,   258,   -11,   265,   265,   265,   -29,   -10,   257,
   -16,   -20,   -21,   265,    59,    -6,    61,    59,    40,   -30,
    -7,   -17,   266,   271,   267,   273,   -22,   -23,   259,    44,
   265,    41,   -23,   -24,   265,   -18,    59,   301,   -31,    44,
   -25,    40,   265,    58,   -32,   -33,   259,   -19,   -26,   292,
   293,   294,   300,   275,   276,   277,    41,   -33,   -34,    59,
   -27,   295,   296,   297,   298,    60,    62,    61,   299,    59,
   301,   302,   -35,   -28,    58,    59,   -36,   274,   271,   272,
   273,   268,   269,   270,   -37,   275,   276,   277,   278,   279,
   280,   286,   287,   284,   285,   283,   288,   289,   290,   291,
   -27,   302,   -38,    59 };
int yydef[]={

     1,    -2,     0,     2,     6,     0,     0,     5,     7,     0,
     0,     0,    11,    12,    13,    14,    15,     0,     0,     0,
    34,     8,     0,    10,    16,    24,    26,     0,     0,     3,
     0,     0,     0,    35,     9,    81,     0,    25,     0,     0,
     4,     0,    20,    21,    22,    23,     0,    29,    30,     0,
    17,     0,    28,     0,    36,     0,    27,    31,     0,     0,
     0,     0,    18,     0,     0,    39,    40,     0,     0,    66,
    67,    68,    69,    70,    71,    72,     0,    38,     0,    19,
     0,    73,    74,    75,    76,    77,    78,    79,    80,    37,
    41,    32,     0,     0,     0,    33,     0,    44,    45,    46,
    47,    48,    49,    50,     0,    51,    52,    53,    54,    55,
    56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
     0,    42,     0,    43 };
typedef struct { char *t_name; int t_val; } yytoktype;
#ifndef YYDEBUG
#	define YYDEBUG	0	/* don't allow debugging */
#endif

#if YYDEBUG

yytoktype yytoks[] =
{
	"DRUC_REGLES",	257,
	"DRUC_FIN",	258,
	"DRUC_REGLE",	259,
	"DRUC_DEFINE",	260,
	"DRUC_UNDEFINE",	261,
	"DRUC_CARACTERISE",	262,
	"DRUC_RELATION",	263,
	"DRUC_LAYER",	264,
	"DRUC_NOM",	265,
	"DRUC_UNION",	266,
	"DRUC_EXCLUSION",	267,
	"DRUC_ENVELOPPE",	268,
	"DRUC_MARGE",	269,
	"DRUC_CROIX",	270,
	"DRUC_INTERSECT",	271,
	"DRUC_EXTENSION",	272,
	"DRUC_INCLUSION",	273,
	"DRUC_DISTANCE",	274,
	"DRUC_SURFACE_INTER",	275,
	"DRUC_LONG_INTER",	276,
	"DRUC_LARGE_INTER",	277,
	"DRUC_PENET_INTER",	278,
	"DRUC_PARAL_INTER",	279,
	"DRUC_PERPEN_INTER",	280,
	"DRUC_FRONTALE",	281,
	"DRUC_LATERALE_MIN",	282,
	"DRUC_LATERALE_MAX",	283,
	"DRUC_LARGEUR_MIN",	284,
	"DRUC_LARGEUR_MAX",	285,
	"DRUC_LONGUEUR_MIN",	286,
	"DRUC_LONGUEUR_MAX",	287,
	"DRUC_SUP",	288,
	"DRUC_INF",	289,
	"DRUC_AXIALE",	290,
	"DRUC_GEODESIQUE",	291,
	"DRUC_SURFACE",	292,
	"DRUC_LONGUEUR",	293,
	"DRUC_LARGEUR",	294,
	"DRUC_MIN",	295,
	"DRUC_MAX",	296,
	"DRUC_INFEQ",	297,
	"DRUC_SUPEQ",	298,
	"DRUC_DIFF",	299,
	"DRUC_NOTCH",	300,
	"DRUC_ENTIER",	301,
	"DRUC_FLOAT",	302,
	"-unknown-",	-1	/* ends search */
};

char * yyreds[] =
{
	"-no such reduction-",
	"drc : /* empty */",
	"drc : list_layer",
	"drc : list_layer DRUC_REGLES list_bloc DRUC_FIN DRUC_REGLES",
	"drc : list_layer DRUC_REGLES list_bloc DRUC_FIN DRUC_REGLES list_comment",
	"list_layer : list_layer layer",
	"list_layer : layer",
	"layer : DRUC_LAYER DRUC_NOM",
	"layer : DRUC_LAYER DRUC_NOM DRUC_FLOAT",
	"layer : DRUC_LAYER DRUC_NOM DRUC_FLOAT ';'",
	"list_bloc : list_bloc bloc",
	"list_bloc : bloc",
	"bloc : define",
	"bloc : undefine",
	"bloc : caracter",
	"bloc : relation",
	"define : DRUC_DEFINE DRUC_NOM",
	"define : DRUC_DEFINE DRUC_NOM '=' compose DRUC_NOM",
	"define : DRUC_DEFINE DRUC_NOM '=' compose DRUC_NOM ',' DRUC_NOM",
	"define : DRUC_DEFINE DRUC_NOM '=' compose DRUC_NOM ',' DRUC_NOM ';'",
	"compose : DRUC_UNION",
	"compose : DRUC_INTERSECT",
	"compose : DRUC_EXCLUSION",
	"compose : DRUC_INCLUSION",
	"undefine : DRUC_UNDEFINE DRUC_NOM",
	"undefine : DRUC_UNDEFINE DRUC_NOM ';'",
	"caracter : DRUC_CARACTERISE DRUC_NOM",
	"caracter : DRUC_CARACTERISE DRUC_NOM '(' lst_rgl_1 ')' ';'",
	"lst_rgl_1 : lst_rgl_1 regle_1",
	"lst_rgl_1 : regle_1",
	"regle_1 : DRUC_REGLE",
	"regle_1 : DRUC_REGLE DRUC_ENTIER",
	"regle_1 : DRUC_REGLE DRUC_ENTIER ':' mesure compar DRUC_FLOAT",
	"regle_1 : DRUC_REGLE DRUC_ENTIER ':' mesure compar DRUC_FLOAT ';'",
	"relation : DRUC_RELATION",
	"relation : DRUC_RELATION DRUC_NOM",
	"relation : DRUC_RELATION DRUC_NOM ',' DRUC_NOM",
	"relation : DRUC_RELATION DRUC_NOM ',' DRUC_NOM '(' lst_rgl_2 ')' ';'",
	"lst_rgl_2 : lst_rgl_2 regle_2",
	"lst_rgl_2 : regle_2",
	"regle_2 : DRUC_REGLE",
	"regle_2 : DRUC_REGLE DRUC_ENTIER",
	"regle_2 : DRUC_REGLE DRUC_ENTIER ':' config mesure_rel compar DRUC_FLOAT",
	"regle_2 : DRUC_REGLE DRUC_ENTIER ':' config mesure_rel compar DRUC_FLOAT ';'",
	"config : DRUC_DISTANCE",
	"config : DRUC_INTERSECT",
	"config : DRUC_EXTENSION",
	"config : DRUC_INCLUSION",
	"config : DRUC_ENVELOPPE",
	"config : DRUC_MARGE",
	"config : DRUC_CROIX",
	"mesure_rel : DRUC_SURFACE_INTER",
	"mesure_rel : DRUC_LONG_INTER",
	"mesure_rel : DRUC_LARGE_INTER",
	"mesure_rel : DRUC_PENET_INTER",
	"mesure_rel : DRUC_PARAL_INTER",
	"mesure_rel : DRUC_PERPEN_INTER",
	"mesure_rel : DRUC_LONGUEUR_MIN",
	"mesure_rel : DRUC_LONGUEUR_MAX",
	"mesure_rel : DRUC_LARGEUR_MIN",
	"mesure_rel : DRUC_LARGEUR_MAX",
	"mesure_rel : DRUC_LATERALE_MAX",
	"mesure_rel : DRUC_SUP",
	"mesure_rel : DRUC_INF",
	"mesure_rel : DRUC_AXIALE",
	"mesure_rel : DRUC_GEODESIQUE",
	"mesure : DRUC_SURFACE",
	"mesure : DRUC_LONGUEUR",
	"mesure : DRUC_LARGEUR",
	"mesure : DRUC_NOTCH",
	"mesure : DRUC_SURFACE_INTER",
	"mesure : DRUC_LONG_INTER",
	"mesure : DRUC_LARGE_INTER",
	"compar : DRUC_MIN",
	"compar : DRUC_MAX",
	"compar : DRUC_INFEQ",
	"compar : DRUC_SUPEQ",
	"compar : '<'",
	"compar : '>'",
	"compar : '='",
	"compar : DRUC_DIFF",
	"list_comment : /* empty */",
};
#endif /* YYDEBUG */
#line 1 "/usr/lib/yaccpar"
/*	@(#)yaccpar 1.10 89/04/04 SMI; from S5R3 1.10	*/

/*
** Skeleton parser driver for yacc output
*/

/*
** yacc user known macros and defines
*/
#define YYERROR		goto yyerrlab
#define YYACCEPT	{ free(yys); free(yyv); return(0); }
#define YYABORT		{ free(yys); free(yyv); return(1); }
#define YYBACKUP( newtoken, newvalue )\
{\
	if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
	{\
		yyerror( "syntax error - cannot backup" );\
		goto yyerrlab;\
	}\
	yychar = newtoken;\
	yystate = *yyps;\
	yylval = newvalue;\
	goto yynewstate;\
}
#define YYRECOVERING()	(!!yyerrflag)
#ifndef YYDEBUG
#	define YYDEBUG	1	/* make debugging available */
#endif

/*
** user known globals
*/
int yydebug;			/* set to 1 to get debugging */

/*
** driver internal defines
*/
#define YYFLAG		(-1000)

/*
** static variables used by the parser
*/
static YYSTYPE *yyv;			/* value stack */
static int *yys;			/* state stack */

static YYSTYPE *yypv;			/* top of value stack */
static int *yyps;			/* top of state stack */

static int yystate;			/* current state */
static int yytmp;			/* extra var (lasts between blocks) */

int yynerrs;			/* number of errors */

int yyerrflag;			/* error recovery flag */
int yychar;			/* current input token number */


/*
** yyparse - return 0 if worked, 1 if syntax error not recovered from
*/
int
yyparse()
{
	register YYSTYPE *yypvt;	/* top of value stack for $vars */
	unsigned yymaxdepth = YYMAXDEPTH;

	/*
	** Initialize externals - yyparse may be called more than once
	*/
	yyv = (YYSTYPE*)malloc(yymaxdepth*sizeof(YYSTYPE));
	yys = (int*)malloc(yymaxdepth*sizeof(int));
	if (!yyv || !yys)
	{
		yyerror( "out of memory" );
		return(1);
	}
	yypv = &yyv[-1];
	yyps = &yys[-1];
	yystate = 0;
	yytmp = 0;
	yynerrs = 0;
	yyerrflag = 0;
	yychar = -1;

	goto yystack;
	{
		register YYSTYPE *yy_pv;	/* top of value stack */
		register int *yy_ps;		/* top of state stack */
		register int yy_state;		/* current state */
		register int  yy_n;		/* internal state number info */

		/*
		** get globals into registers.
		** branch to here only if YYBACKUP was called.
		*/
	yynewstate:
		yy_pv = yypv;
		yy_ps = yyps;
		yy_state = yystate;
		goto yy_newstate;

		/*
		** get globals into registers.
		** either we just started, or we just finished a reduction
		*/
	yystack:
		yy_pv = yypv;
		yy_ps = yyps;
		yy_state = yystate;

		/*
		** top of for (;;) loop while no reductions done
		*/
	yy_stack:
		/*
		** put a state and value onto the stacks
		*/
#if YYDEBUG
		/*
		** if debugging, look up token value in list of value vs.
		** name pairs.  0 and negative (-1) are special values.
		** Note: linear search is used since time is not a real
		** consideration while debugging.
		*/
		if ( yydebug )
		{
			register int yy_i;

			(void)printf( "State %d, token ", yy_state );
			if ( yychar == 0 )
				(void)printf( "end-of-file\n" );
			else if ( yychar < 0 )
				(void)printf( "-none-\n" );
			else
			{
				for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
					yy_i++ )
				{
					if ( yytoks[yy_i].t_val == yychar )
						break;
				}
				(void)printf( "%s\n", yytoks[yy_i].t_name );
			}
		}
#endif /* YYDEBUG */
		if ( ++yy_ps >= &yys[ yymaxdepth ] )	/* room on stack? */
		{
			/*
			** reallocate and recover.  Note that pointers
			** have to be reset, or bad things will happen
			*/
			int yyps_index = (yy_ps - yys);
			int yypv_index = (yy_pv - yyv);
			int yypvt_index = (yypvt - yyv);
			yymaxdepth += YYMAXDEPTH;
			yyv = (YYSTYPE*)realloc((char*)yyv,
				yymaxdepth * sizeof(YYSTYPE));
			yys = (int*)realloc((char*)yys,
				yymaxdepth * sizeof(int));
			if (!yyv || !yys)
			{
				yyerror( "yacc stack overflow" );
				return(1);
			}
			yy_ps = yys + yyps_index;
			yy_pv = yyv + yypv_index;
			yypvt = yyv + yypvt_index;
		}
		*yy_ps = yy_state;
		*++yy_pv = yyval;

		/*
		** we have a new state - find out what to do
		*/
	yy_newstate:
		if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG )
			goto yydefault;		/* simple state */
#if YYDEBUG
		/*
		** if debugging, need to mark whether new token grabbed
		*/
		yytmp = yychar < 0;
#endif
		if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
			yychar = 0;		/* reached EOF */
#if YYDEBUG
		if ( yydebug && yytmp )
		{
			register int yy_i;

			(void)printf( "Received token " );
			if ( yychar == 0 )
				(void)printf( "end-of-file\n" );
			else if ( yychar < 0 )
				(void)printf( "-none-\n" );
			else
			{
				for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
					yy_i++ )
				{
					if ( yytoks[yy_i].t_val == yychar )
						break;
				}
				(void)printf( "%s\n", yytoks[yy_i].t_name );
			}
		}
#endif /* YYDEBUG */
		if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) )
			goto yydefault;
		if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar )	/*valid shift*/
		{
			yychar = -1;
			yyval = yylval;
			yy_state = yy_n;
			if ( yyerrflag > 0 )
				yyerrflag--;
			goto yy_stack;
		}

	yydefault:
		if ( ( yy_n = yydef[ yy_state ] ) == -2 )
		{
#if YYDEBUG
			yytmp = yychar < 0;
#endif
			if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
				yychar = 0;		/* reached EOF */
#if YYDEBUG
			if ( yydebug && yytmp )
			{
				register int yy_i;

				(void)printf( "Received token " );
				if ( yychar == 0 )
					(void)printf( "end-of-file\n" );
				else if ( yychar < 0 )
					(void)printf( "-none-\n" );
				else
				{
					for ( yy_i = 0;
						yytoks[yy_i].t_val >= 0;
						yy_i++ )
					{
						if ( yytoks[yy_i].t_val
							== yychar )
						{
							break;
						}
					}
					(void)printf( "%s\n", yytoks[yy_i].t_name );
				}
			}
#endif /* YYDEBUG */
			/*
			** look through exception table
			*/
			{
				register int *yyxi = yyexca;

				while ( ( *yyxi != -1 ) ||
					( yyxi[1] != yy_state ) )
				{
					yyxi += 2;
				}
				while ( ( *(yyxi += 2) >= 0 ) &&
					( *yyxi != yychar ) )
					;
				if ( ( yy_n = yyxi[1] ) < 0 )
					YYACCEPT;
			}
		}

		/*
		** check for syntax error
		*/
		if ( yy_n == 0 )	/* have an error */
		{
			/* no worry about speed here! */
			switch ( yyerrflag )
			{
			case 0:		/* new error */
				yyerror( "syntax error" );
				goto skip_init;
			yyerrlab:
				/*
				** get globals into registers.
				** we have a user generated syntax type error
				*/
				yy_pv = yypv;
				yy_ps = yyps;
				yy_state = yystate;
				yynerrs++;
			skip_init:
			case 1:
			case 2:		/* incompletely recovered error */
					/* try again... */
				yyerrflag = 3;
				/*
				** find state where "error" is a legal
				** shift action
				*/
				while ( yy_ps >= yys )
				{
					yy_n = yypact[ *yy_ps ] + YYERRCODE;
					if ( yy_n >= 0 && yy_n < YYLAST &&
						yychk[yyact[yy_n]] == YYERRCODE)					{
						/*
						** simulate shift of "error"
						*/
						yy_state = yyact[ yy_n ];
						goto yy_stack;
					}
					/*
					** current state has no shift on
					** "error", pop stack
					*/
#if YYDEBUG
#	define _POP_ "Error recovery pops state %d, uncovers state %d\n"
					if ( yydebug )
						(void)printf( _POP_, *yy_ps,
							yy_ps[-1] );
#	undef _POP_
#endif
					yy_ps--;
					yy_pv--;
				}
				/*
				** there is no state on stack with "error" as
				** a valid shift.  give up.
				*/
				YYABORT;
			case 3:		/* no shift yet; eat a token */
#if YYDEBUG
				/*
				** if debugging, look up token in list of
				** pairs.  0 and negative shouldn't occur,
				** but since timing doesn't matter when
				** debugging, it doesn't hurt to leave the
				** tests here.
				*/
				if ( yydebug )
				{
					register int yy_i;

					(void)printf( "Error recovery discards " );
					if ( yychar == 0 )
						(void)printf( "token end-of-file\n" );
					else if ( yychar < 0 )
						(void)printf( "token -none-\n" );
					else
					{
						for ( yy_i = 0;
							yytoks[yy_i].t_val >= 0;
							yy_i++ )
						{
							if ( yytoks[yy_i].t_val
								== yychar )
							{
								break;
							}
						}
						(void)printf( "token %s\n",
							yytoks[yy_i].t_name );
					}
				}
#endif /* YYDEBUG */
				if ( yychar == 0 )	/* reached EOF. quit */
					YYABORT;
				yychar = -1;
				goto yy_newstate;
			}
		}/* end if ( yy_n == 0 ) */
		/*
		** reduction by production yy_n
		** put stack tops, etc. so things right after switch
		*/
#if YYDEBUG
		/*
		** if debugging, print the string that is the user's
		** specification of the reduction which is just about
		** to be done.
		*/
		if ( yydebug )
			(void)printf( "Reduce by (%d) \"%s\"\n",
				yy_n, yyreds[ yy_n ] );
#endif
		yytmp = yy_n;			/* value to switch over */
		yypvt = yy_pv;			/* $vars top of value stack */
		/*
		** Look in goto table for next state
		** Sorry about using yy_state here as temporary
		** register variable, but why not, if it works...
		** If yyr2[ yy_n ] doesn't have the low order bit
		** set, then there is no action to be done for
		** this reduction.  So, no saving & unsaving of
		** registers done.  The only difference between the
		** code just after the if and the body of the if is
		** the goto yy_stack in the body.  This way the test
		** can be made before the choice of what to do is needed.
		*/
		{
			/* length of production doubled with extra bit */
			register int yy_len = yyr2[ yy_n ];

			if ( !( yy_len & 01 ) )
			{
				yy_len >>= 1;
				yyval = ( yy_pv -= yy_len )[1];	/* $$ = $1 */
				yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
					*( yy_ps -= yy_len ) + 1;
				if ( yy_state >= YYLAST ||
					yychk[ yy_state =
					yyact[ yy_state ] ] != -yy_n )
				{
					yy_state = yyact[ yypgo[ yy_n ] ];
				}
				goto yy_stack;
			}
			yy_len >>= 1;
			yyval = ( yy_pv -= yy_len )[1];	/* $$ = $1 */
			yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
				*( yy_ps -= yy_len ) + 1;
			if ( yy_state >= YYLAST ||
				yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
			{
				yy_state = yyact[ yypgo[ yy_n ] ];
			}
		}
					/* save until reenter driver code */
		yystate = yy_state;
		yyps = yy_ps;
		yypv = yy_pv;
	}
	/*
	** code supplied by user is placed in this switch
	*/
	switch( yytmp )
	{
		
case 1:
# line 81 "drucompi.yac"
{ DrucInitCompiler () ;} break;
case 2:
# line 82 "drucompi.yac"
{ DrucStoreRdsLayer () ; } break;
case 3:
# line 86 "drucompi.yac"
{ DrucEndRulesCompiler () ; } break;
case 4:
# line 87 "drucompi.yac"
{ DrucCloseCompiler () ;} break;
case 7:
# line 95 "drucompi.yac"
{ DrucInitRdsLayerName ( DrucInputChaine ) ;} break;
case 8:
# line 96 "drucompi.yac"
{ DrucInitRdsLayerDef ( RprTranslateParam ( DrucInputFloat ) );} break;
case 12:
# line 105 "drucompi.yac"
{ DrucStoreInstructionDefine () ;} break;
case 13:
# line 106 "drucompi.yac"
{ DrucStoreInstructionUndefine () ;} break;
case 14:
# line 107 "drucompi.yac"
{ DrucStoreInstructionRegle () ;} break;
case 15:
# line 108 "drucompi.yac"
{ DrucStoreInstructionRegle () ;} break;
case 16:
# line 112 "drucompi.yac"
{ DrucInitDefineLayerDest ( DrucInputChaine ) ;} break;
case 17:
# line 115 "drucompi.yac"
{ DrucInitDefineLayerA ( DrucInputChaine ) ;} break;
case 18:
# line 117 "drucompi.yac"
{ DrucInitDefineLayerB ( DrucInputChaine ) ;} break;
case 20:
# line 121 "drucompi.yac"
{ DrucStructDefineOpCompose( DRUC_COMPOSE_UNION );} break;
case 21:
# line 122 "drucompi.yac"
{ DrucStructDefineOpCompose( DRUC_COMPOSE_INTERSECT );} break;
case 22:
# line 123 "drucompi.yac"
{ DrucStructDefineOpCompose( DRUC_COMPOSE_EXCLUSION );} break;
case 23:
# line 124 "drucompi.yac"
{ DrucStructDefineOpCompose( DRUC_COMPOSE_INCLUSION );} break;
case 24:
# line 128 "drucompi.yac"
{ DrucInitUndefineUserLayer ( DrucInputChaine ) ;} break;
case 26:
# line 133 "drucompi.yac"
{ DrucInitRegleLayerA ( DrucInputChaine ) ;
                               DrucInitRegleInstruction ( DRUC_INSTR_CARACTERISE ) ;
                               DrucIndexMesure = -1 ;} break;
case 30:
# line 147 "drucompi.yac"
{ DrucIndexMesure ++ ;} break;
case 31:
# line 148 "drucompi.yac"
{ DrucInitRegleNumero ( DrucInputEntier,
                                                     DrucIndexMesure) ;} break;
case 32:
# line 153 "drucompi.yac"
{ DrucInitRegleValeur ( RprTranslateParam ( DrucInputFloat ),
                                                     DrucIndexMesure );} break;
case 34:
# line 158 "drucompi.yac"
{ DrucInitRegleInstruction ( DRUC_INSTR_RELATION ) ;} break;
case 35:
# line 159 "drucompi.yac"
{ DrucInitRegleLayerA ( DrucInputChaine ) ;} break;
case 36:
# line 161 "drucompi.yac"
{ DrucInitRegleLayerB ( DrucInputChaine ) ;
                               DrucIndexMesure = -1 ; } break;
case 40:
# line 174 "drucompi.yac"
{ DrucIndexMesure ++ ;} break;
case 41:
# line 175 "drucompi.yac"
{ DrucInitRegleNumero ( DrucInputEntier,
                                                     DrucIndexMesure ) ;} break;
case 42:
# line 181 "drucompi.yac"
{ DrucInitRegleValeur ( RprTranslateParam ( DrucInputFloat ),
                                                     DrucIndexMesure );} break;
case 44:
# line 186 "drucompi.yac"
{ DrucInitRegleRelation( DRUC_RELATION_DISTANCE,
                                                      DrucIndexMesure );} break;
case 45:
# line 188 "drucompi.yac"
{ DrucInitRegleRelation( DRUC_RELATION_INTERSECTION,
                                                      DrucIndexMesure );} break;
case 46:
# line 190 "drucompi.yac"
{ DrucInitRegleRelation( DRUC_RELATION_EXTENSION,
                                                      DrucIndexMesure );} break;
case 47:
# line 192 "drucompi.yac"
{ DrucInitRegleRelation( DRUC_RELATION_INCLUSION,
                                                      DrucIndexMesure );} break;
case 48:
# line 194 "drucompi.yac"
{ DrucInitRegleRelation( DRUC_RELATION_ENVELOPPE,
                                                      DrucIndexMesure );} break;
case 49:
# line 196 "drucompi.yac"
{ DrucInitRegleRelation( DRUC_RELATION_MARGE,
                                                      DrucIndexMesure );} break;
case 50:
# line 198 "drucompi.yac"
{ DrucInitRegleRelation( DRUC_RELATION_CROIX,
                                                      DrucIndexMesure );} break;
case 51:
# line 202 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_SURFACE_INTER,
                                                    DrucIndexMesure );} break;
case 52:
# line 204 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LONGUEUR_INTER,
                                                    DrucIndexMesure );} break;
case 53:
# line 206 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LARGEUR_INTER,
                                                    DrucIndexMesure );} break;
case 54:
# line 208 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_PENETRE_INTER,
                                                    DrucIndexMesure );} break;
case 55:
# line 210 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_PARALEL_INTER,
                                                    DrucIndexMesure );} break;
case 56:
# line 212 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_PERPEND_INTER,
                                                    DrucIndexMesure );} break;
case 57:
# line 214 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LONGUEUR_MIN,
                                                    DrucIndexMesure );} break;
case 58:
# line 216 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LONGUEUR_MAX,
                                                    DrucIndexMesure );} break;
case 59:
# line 218 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LARGEUR_MIN,
                                                    DrucIndexMesure );} break;
case 60:
# line 220 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LARGEUR_MAX,
                                                    DrucIndexMesure );} break;
case 61:
# line 222 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LATERALE_MAX,
                                                    DrucIndexMesure );} break;
case 62:
# line 224 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_SUP,
                                                    DrucIndexMesure );} break;
case 63:
# line 226 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_INF,
                                                    DrucIndexMesure );} break;
case 64:
# line 228 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_AXIALE,
                                                    DrucIndexMesure );} break;
case 65:
# line 230 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_GEODESIQUE,
                                                    DrucIndexMesure );} break;
case 66:
# line 234 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_SURFACE,
                                                    DrucIndexMesure );} break;
case 67:
# line 236 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LONGUEUR,
                                                    DrucIndexMesure );} break;
case 68:
# line 238 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LARGEUR,
                                                    DrucIndexMesure );} break;
case 69:
# line 240 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_NOTCH,
                                                    DrucIndexMesure );} break;
case 70:
# line 242 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_SURFACE_INTER,
                                                    DrucIndexMesure );} break;
case 71:
# line 244 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LONGUEUR_INTER,
                                                    DrucIndexMesure );} break;
case 72:
# line 246 "drucompi.yac"
{ DrucInitRegleMesure( DRUC_MESURE_LARGEUR_INTER,
                                                    DrucIndexMesure );} break;
case 73:
# line 250 "drucompi.yac"
{ DrucInitRegleOpCompare ( DRUC_OPERATION_MIN,
                                                        DrucIndexMesure );} break;
case 74:
# line 252 "drucompi.yac"
{ DrucInitRegleOpCompare ( DRUC_OPERATION_MAX,
                                                        DrucIndexMesure );} break;
case 75:
# line 254 "drucompi.yac"
{ DrucInitRegleOpCompare ( DRUC_OPERATION_INFEQ,
                                                        DrucIndexMesure );} break;
case 76:
# line 256 "drucompi.yac"
{ DrucInitRegleOpCompare ( DRUC_OPERATION_SUPEQ,
                                                        DrucIndexMesure );} break;
case 77:
# line 258 "drucompi.yac"
{ DrucInitRegleOpCompare ( DRUC_OPERATION_INF,
                                                        DrucIndexMesure );} break;
case 78:
# line 260 "drucompi.yac"
{ DrucInitRegleOpCompare ( DRUC_OPERATION_SUP,
                                                        DrucIndexMesure );} break;
case 79:
# line 262 "drucompi.yac"
{ DrucInitRegleOpCompare ( DRUC_OPERATION_EQUAL,
                                                        DrucIndexMesure );} break;
case 80:
# line 264 "drucompi.yac"
{ DrucInitRegleOpCompare ( DRUC_OPERATION_DIFF,
                                                        DrucIndexMesure );} break;
case 81:
# line 268 "drucompi.yac"
{ DrucStoreComment (); } break;
	}
	goto yystack;		/* reset registers in driver code */
}
