
/*  A Bison parser, made from web2c.yacc with Bison version GNU Bison version 1.22
  */

#define YYBISON 1  /* Identify Bison output.  */

#define	array_tok	258
#define	begin_tok	259
#define	case_tok	260
#define	const_tok	261
#define	do_tok	262
#define	downto_tok	263
#define	else_tok	264
#define	end_tok	265
#define	file_tok	266
#define	for_tok	267
#define	function_tok	268
#define	goto_tok	269
#define	if_tok	270
#define	label_tok	271
#define	of_tok	272
#define	procedure_tok	273
#define	program_tok	274
#define	record_tok	275
#define	repeat_tok	276
#define	then_tok	277
#define	to_tok	278
#define	type_tok	279
#define	until_tok	280
#define	var_tok	281
#define	while_tok	282
#define	others_tok	283
#define	r_num_tok	284
#define	i_num_tok	285
#define	string_literal_tok	286
#define	single_char_tok	287
#define	assign_tok	288
#define	two_dots_tok	289
#define	undef_id_tok	290
#define	var_id_tok	291
#define	proc_id_tok	292
#define	proc_param_tok	293
#define	fun_id_tok	294
#define	fun_param_tok	295
#define	const_id_tok	296
#define	type_id_tok	297
#define	hhb0_tok	298
#define	hhb1_tok	299
#define	field_id_tok	300
#define	define_tok	301
#define	field_tok	302
#define	break_tok	303
#define	not_eq_tok	304
#define	less_eq_tok	305
#define	great_eq_tok	306
#define	or_tok	307
#define	unary_plus_tok	308
#define	unary_minus_tok	309
#define	div_tok	310
#define	mod_tok	311
#define	and_tok	312
#define	not_tok	313

#line 22 "web2c.yacc"

#include "web2c.h"

#define YYDEBUG 1

#define	symbol(x)	sym_table[x].id
#define	MAX_ARGS	50

static char fn_return_type[50], for_stack[300], control_var[50],
            relation[3];
static char arg_type[MAX_ARGS][30];
static int last_type = -1, ids_typed;
char my_routine[100];	/* Name of routine being parsed, if any */
static char array_bounds[80], array_offset[80];
static int uses_mem, uses_eqtb, lower_sym, upper_sym;
static FILE *orig_std;
boolean doing_statements = false;
static boolean var_formals = false;
static int param_id_list[MAX_ARGS], ids_paramed=0;

extern char conditional[], temp[], *std_header;
extern int tex, mf, strict_for;
extern FILE *coerce;
extern char coerce_name[];
extern boolean debug;

static long my_labs();
static void compute_array_bounds(), fixup_var_list();
static void do_proc_args(), gen_function_head();
static boolean doreturn();


#ifndef YYLTYPE
typedef
  struct yyltype
    {
      int timestamp;
      int first_line;
      int first_column;
      int last_line;
      int last_column;
      char *text;
   }
  yyltype;

#define YYLTYPE yyltype
#endif

#ifndef YYSTYPE
#define YYSTYPE int
#endif
#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif



#define	YYFINAL		417
#define	YYFLAG		-32768
#define	YYNTBASE	75

#define YYTRANSLATE(x) ((unsigned)(x) <= 313 ? yytranslate[x] : 239)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,    67,
    68,    60,    55,    69,    56,    74,    61,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,    73,    66,    51,
    49,    52,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    71,     2,    72,    70,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    50,    53,    54,    57,    58,    59,    62,
    63,    64,    65
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     1,     2,    13,    14,    17,    22,    27,    32,    39,
    44,    51,    56,    63,    68,    72,    73,    74,    75,    84,
    85,    86,    91,    93,    97,    99,   100,   103,   105,   108,
   109,   110,   117,   119,   121,   123,   125,   127,   129,   131,
   132,   135,   137,   140,   141,   142,   143,   151,   153,   155,
   157,   159,   163,   164,   166,   169,   171,   173,   175,   177,
   179,   181,   184,   191,   200,   202,   204,   206,   207,   212,
   214,   218,   219,   220,   226,   227,   229,   233,   235,   237,
   238,   243,   244,   247,   249,   252,   253,   254,   261,   263,
   267,   269,   271,   273,   274,   275,   281,   283,   286,   289,
   292,   295,   296,   302,   303,   309,   310,   311,   316,   318,
   322,   323,   328,   329,   332,   333,   337,   339,   341,   344,
   345,   346,   347,   357,   358,   359,   360,   370,   372,   374,
   376,   380,   381,   386,   388,   392,   394,   398,   400,   402,
   404,   406,   408,   410,   412,   414,   415,   420,   421,   426,
   427,   431,   433,   435,   437,   439,   442,   443,   448,   451,
   454,   457,   459,   460,   465,   468,   469,   474,   475,   480,
   481,   486,   487,   492,   493,   498,   499,   504,   505,   510,
   511,   516,   517,   522,   523,   528,   529,   534,   535,   540,
   541,   546,   547,   552,   554,   556,   558,   560,   561,   566,
   568,   570,   572,   573,   577,   578,   583,   585,   586,   591,
   594,   597,   598,   600,   602,   603,   607,   610,   611,   613,
   615,   617,   619,   621,   623,   626,   627,   628,   635,   636,
   640,   641,   642,   650,   652,   656,   660,   662,   666,   668,
   670,   672,   675,   677,   679,   681,   682,   683,   690,   691,
   692,   699,   700,   701,   702,   712,   714,   715,   716,   722,
   723,   724
};

static const short yyrhs[] = {    -1,
     0,    78,    80,    76,    85,    89,    97,   124,    77,   133,
   131,     0,     0,    78,    79,     0,    46,    47,    35,    66,
     0,    46,    13,    35,    66,     0,    46,     6,    35,    66,
     0,    46,    13,    35,    67,    68,    66,     0,    46,    18,
    35,    66,     0,    46,    18,    35,    67,    68,    66,     0,
    46,    24,    35,    66,     0,    46,    24,    35,    49,   105,
    66,     0,    46,    26,    35,    66,     0,    19,    35,    66,
     0,     0,     0,     0,    82,    85,    89,    97,    83,   124,
    84,   158,     0,     0,     0,    16,    86,    87,    66,     0,
    88,     0,    87,    69,    88,     0,    30,     0,     0,     6,
    90,     0,    91,     0,    90,    91,     0,     0,     0,    92,
    35,    93,    49,    94,    66,     0,    30,     0,    29,     0,
    95,     0,    96,     0,    31,     0,    32,     0,    41,     0,
     0,    24,    98,     0,    99,     0,    98,    99,     0,     0,
     0,     0,   100,    35,   101,    49,   102,   103,    66,     0,
   104,     0,   109,     0,   105,     0,   108,     0,   107,    34,
   107,     0,     0,    58,     0,   106,    30,     0,    41,     0,
    42,     0,   111,     0,   114,     0,   122,     0,   110,     0,
    70,    42,     0,     3,    71,   112,    72,    17,   113,     0,
     3,    71,   112,    69,   112,    72,    17,   113,     0,   105,
     0,    42,     0,   103,     0,     0,    20,   115,   116,    10,
     0,   117,     0,   116,    66,   117,     0,     0,     0,   118,
   120,    73,   119,   103,     0,     0,   121,     0,   120,    69,
   121,     0,    35,     0,    45,     0,     0,    11,    17,   123,
   103,     0,     0,    26,   125,     0,   126,     0,   125,   126,
     0,     0,     0,   127,   129,    73,   128,   103,    66,     0,
   130,     0,   129,    69,   130,     0,    35,     0,    36,     0,
    45,     0,     0,     0,     4,   132,   161,    10,    74,     0,
   134,     0,   133,   134,     0,   135,    66,     0,   148,    66,
     0,   136,    81,     0,     0,    18,    35,   137,   139,    66,
     0,     0,    18,   147,   138,   139,    66,     0,     0,     0,
    67,   140,   141,    68,     0,   144,     0,   141,    66,   144,
     0,     0,   143,   129,    73,    42,     0,     0,   145,   142,
     0,     0,    26,   146,   142,     0,    37,     0,    38,     0,
   149,    81,     0,     0,     0,     0,    13,    35,   150,   139,
    73,   151,   157,   152,    66,     0,     0,     0,     0,    13,
   156,   153,   139,    73,   154,   157,   155,    66,     0,    39,
     0,    40,     0,   103,     0,     4,   161,    10,     0,     0,
     4,   160,   161,    10,     0,   162,     0,   161,    66,   162,
     0,   164,     0,   163,    73,   164,     0,    30,     0,   165,
     0,   206,     0,   166,     0,   202,     0,   204,     0,   205,
     0,    48,     0,     0,   169,    33,   167,   177,     0,     0,
   171,    33,   168,   177,     0,     0,    36,   170,   172,     0,
    36,     0,    39,     0,    40,     0,   173,     0,   172,   173,
     0,     0,    71,   174,   177,   175,     0,    74,    45,     0,
    74,    43,     0,    74,    44,     0,    72,     0,     0,    69,
   176,   177,    72,     0,   192,   177,     0,     0,   177,    55,
   178,   177,     0,     0,   177,    56,   179,   177,     0,     0,
   177,    60,   180,   177,     0,     0,   177,    62,   181,   177,
     0,     0,   177,    49,   182,   177,     0,     0,   177,    50,
   183,   177,     0,     0,   177,    63,   184,   177,     0,     0,
   177,    51,   185,   177,     0,     0,   177,    52,   186,   177,
     0,     0,   177,    53,   187,   177,     0,     0,   177,    54,
   188,   177,     0,     0,   177,    64,   189,   177,     0,     0,
   177,    57,   190,   177,     0,     0,   177,    61,   191,   177,
     0,   193,     0,    58,     0,    59,     0,    65,     0,     0,
    67,   194,   177,    68,     0,   169,     0,    94,     0,    39,
     0,     0,    40,   195,   196,     0,     0,    67,   197,   198,
    68,     0,   200,     0,     0,   198,    69,   199,   200,     0,
   177,   201,     0,    73,    30,     0,     0,    37,     0,    35,
     0,     0,    38,   203,   196,     0,    14,    30,     0,     0,
   159,     0,   207,     0,   222,     0,   208,     0,   214,     0,
   209,     0,   209,   212,     0,     0,     0,    15,   210,   177,
   211,    22,   162,     0,     0,     9,   213,   162,     0,     0,
     0,     5,   215,   177,    17,   216,   217,   221,     0,   218,
     0,   217,    66,   218,     0,   219,    73,   164,     0,   220,
     0,   219,    69,   220,     0,    30,     0,    28,     0,    10,
     0,    66,    10,     0,   223,     0,   226,     0,   229,     0,
     0,     0,    27,   224,   177,   225,     7,   162,     0,     0,
     0,    21,   227,   161,    25,   228,   177,     0,     0,     0,
     0,    12,   230,   233,    33,   231,   234,     7,   232,   162,
     0,    36,     0,     0,     0,   177,   235,    23,   236,   177,
     0,     0,     0,   177,   237,     8,   238,   177,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
    58,    64,    68,    72,    74,    77,    83,    88,    93,    98,
   103,   108,   113,   122,   129,   133,   138,   153,   158,   189,
   190,   192,   196,   197,   200,   204,   205,   209,   210,   213,
   216,   220,   225,   233,   237,   239,   243,   257,   275,   279,
   280,   283,   284,   287,   290,   296,   300,   312,   313,   316,
   355,   358,   361,   362,   365,   371,   379,   390,   395,   396,
   400,   406,   417,   418,   422,   424,   433,   437,   439,   443,
   444,   447,   449,   455,   468,   471,   472,   475,   487,   499,
   502,   505,   506,   509,   510,   513,   520,   525,   529,   530,
   533,   547,   561,   577,   579,   584,   591,   593,   596,   598,
   602,   605,   618,   622,   630,   637,   644,   653,   656,   657,
   660,   662,   677,   678,   678,   679,   681,   682,   685,   688,
   699,   705,   710,   710,   719,   725,   730,   732,   733,   736,
   739,   742,   744,   748,   749,   752,   753,   757,   765,   767,
   771,   772,   773,   774,   775,   779,   782,   782,   785,   787,
   798,   798,   804,   806,   810,   811,   814,   816,   818,   836,
   838,   842,   843,   845,   848,   850,   851,   852,   853,   854,
   855,   856,   857,   858,   859,   860,   861,   862,   863,   864,
   865,   866,   867,   868,   869,   870,   871,   872,   873,   874,
   875,   876,   879,   880,   884,   885,   887,   891,   893,   895,
   896,   897,   899,   902,   904,   906,   910,   911,   914,   916,
   920,   921,   924,   926,   932,   935,   937,   951,   954,   955,
   956,   959,   960,   963,   964,   967,   970,   971,   974,   977,
   979,   981,   985,   989,   990,   993,   997,   998,  1001,  1006,
  1010,  1011,  1014,  1015,  1016,  1019,  1024,  1025,  1028,  1030,
  1035,  1038,  1047,  1053,  1070,  1087,  1091,  1094,  1099,  1103,
  1106,  1111
};

static const char * const yytname[] = {   "$","error","$illegal.","array_tok",
"begin_tok","case_tok","const_tok","do_tok","downto_tok","else_tok","end_tok",
"file_tok","for_tok","function_tok","goto_tok","if_tok","label_tok","of_tok",
"procedure_tok","program_tok","record_tok","repeat_tok","then_tok","to_tok",
"type_tok","until_tok","var_tok","while_tok","others_tok","r_num_tok","i_num_tok",
"string_literal_tok","single_char_tok","assign_tok","two_dots_tok","undef_id_tok",
"var_id_tok","proc_id_tok","proc_param_tok","fun_id_tok","fun_param_tok","const_id_tok",
"type_id_tok","hhb0_tok","hhb1_tok","field_id_tok","define_tok","field_tok",
"break_tok","'='","not_eq_tok","'<'","'>'","less_eq_tok","great_eq_tok","'+'",
"'-'","or_tok","unary_plus_tok","unary_minus_tok","'*'","'/'","div_tok","mod_tok",
"and_tok","not_tok","';'","'('","')'","','","'^'","'['","']'","':'","'.'","PROGRAM",
"@1","@2","DEFS","DEF","PROGRAM_HEAD","BLOCK","@3","@4","@5","LABEL_DEC_PART",
"@6","LABEL_LIST","LABEL","CONST_DEC_PART","CONST_DEC_LIST","CONST_DEC","@7",
"@8","CONSTANT","STRING","CONSTANT_ID","TYPE_DEC_PART","TYPE_DEF_LIST","TYPE_DEF",
"@9","@10","@11","TYPE","SIMPLE_TYPE","SUBRANGE_TYPE","POSSIBLE_PLUS","SUB_CONSTANT",
"TYPE_ID","STRUCTURED_TYPE","POINTER_TYPE","ARRAY_TYPE","INDEX_TYPE","COMPONENT_TYPE",
"RECORD_TYPE","@12","FIELD_LIST","RECORD_SECTION","@13","@14","FIELD_ID_LIST",
"FIELD_ID","FILE_TYPE","@15","VAR_DEC_PART","VAR_DEC_LIST","VAR_DEC","@16","@17",
"VAR_ID_DEC_LIST","VAR_ID","BODY","@18","P_F_DEC_PART","P_F_DEC","PROCEDURE_DEC",
"PROCEDURE_HEAD","@19","@20","PARAM","@21","FORM_PAR_SEC_L","FORM_PAR_SEC1",
"@22","FORM_PAR_SEC","@23","@24","DECLARED_PROC","FUNCTION_DEC","FUNCTION_HEAD",
"@25","@26","@27","@28","@29","@30","DECLARED_FUN","RESULT_TYPE","STAT_PART",
"COMPOUND_STAT","@31","STAT_LIST","STATEMENT","S_LABEL","UNLAB_STAT","SIMPLE_STAT",
"ASSIGN_STAT","@32","@33","VARIABLE","@34","FUNC_ID_AS","VAR_DESIG_LIST","VAR_DESIG",
"@35","VAR_DESIG1","@36","EXPRESS","@37","@38","@39","@40","@41","@42","@43",
"@44","@45","@46","@47","@48","@49","@50","UNARY_OP","FACTOR","@51","@52","PARAM_LIST",
"@53","ACTUAL_PARAM_L","@54","ACTUAL_PARAM","WIDTH_FIELD","PROC_STAT","@55",
"GO_TO_STAT","EMPTY_STAT","STRUCT_STAT","CONDIT_STAT","IF_STATEMENT","BEGIN_IF_STAT",
"@56","@57","ELSE_STAT","@58","CASE_STATEMENT","@59","@60","CASE_EL_LIST","CASE_ELEMENT",
"CASE_LAB_LIST","CASE_LAB","END_CASE","REPETIT_STAT","WHILE_STATEMENT","@61",
"@62","REP_STATEMENT","@63","@64","FOR_STATEMENT","@65","@66","@67","CONTROL_VAR",
"FOR_LIST","@68","@69","@70","@71",""
};
#endif

static const short yyr1[] = {     0,
    76,    77,    75,    78,    78,    79,    79,    79,    79,    79,
    79,    79,    79,    79,    80,    82,    83,    84,    81,    85,
    86,    85,    87,    87,    88,    89,    89,    90,    90,    92,
    93,    91,    94,    94,    94,    94,    95,    95,    96,    97,
    97,    98,    98,   100,   101,   102,    99,   103,   103,   104,
   104,   105,   106,   106,   107,   107,   108,   109,   109,   109,
   109,   110,   111,   111,   112,   112,   113,   115,   114,   116,
   116,   118,   119,   117,   117,   120,   120,   121,   121,   123,
   122,   124,   124,   125,   125,   127,   128,   126,   129,   129,
   130,   130,   130,   131,   132,   131,   133,   133,   134,   134,
   135,   137,   136,   138,   136,   139,   140,   139,   141,   141,
   143,   142,   145,   144,   146,   144,   147,   147,   148,   150,
   151,   152,   149,   153,   154,   155,   149,   156,   156,   157,
   158,   160,   159,   161,   161,   162,   162,   163,   164,   164,
   165,   165,   165,   165,   165,   167,   166,   168,   166,   170,
   169,   169,   171,   171,   172,   172,   174,   173,   173,   173,
   173,   175,   176,   175,   177,   178,   177,   179,   177,   180,
   177,   181,   177,   182,   177,   183,   177,   184,   177,   185,
   177,   186,   177,   187,   177,   188,   177,   189,   177,   190,
   177,   191,   177,   177,   192,   192,   192,   194,   193,   193,
   193,   193,   195,   193,   197,   196,   198,   199,   198,   200,
   201,   201,   202,   202,   203,   202,   204,   205,   206,   206,
   206,   207,   207,   208,   208,   210,   211,   209,   213,   212,
   215,   216,   214,   217,   217,   218,   219,   219,   220,   220,
   221,   221,   222,   222,   222,   224,   225,   223,   227,   228,
   226,   230,   231,   232,   229,   233,   235,   236,   234,   237,
   238,   234
};

static const short yyr2[] = {     0,
     0,     0,    10,     0,     2,     4,     4,     4,     6,     4,
     6,     4,     6,     4,     3,     0,     0,     0,     8,     0,
     0,     4,     1,     3,     1,     0,     2,     1,     2,     0,
     0,     6,     1,     1,     1,     1,     1,     1,     1,     0,
     2,     1,     2,     0,     0,     0,     7,     1,     1,     1,
     1,     3,     0,     1,     2,     1,     1,     1,     1,     1,
     1,     2,     6,     8,     1,     1,     1,     0,     4,     1,
     3,     0,     0,     5,     0,     1,     3,     1,     1,     0,
     4,     0,     2,     1,     2,     0,     0,     6,     1,     3,
     1,     1,     1,     0,     0,     5,     1,     2,     2,     2,
     2,     0,     5,     0,     5,     0,     0,     4,     1,     3,
     0,     4,     0,     2,     0,     3,     1,     1,     2,     0,
     0,     0,     9,     0,     0,     0,     9,     1,     1,     1,
     3,     0,     4,     1,     3,     1,     3,     1,     1,     1,
     1,     1,     1,     1,     1,     0,     4,     0,     4,     0,
     3,     1,     1,     1,     1,     2,     0,     4,     2,     2,
     2,     1,     0,     4,     2,     0,     4,     0,     4,     0,
     4,     0,     4,     0,     4,     0,     4,     0,     4,     0,
     4,     0,     4,     0,     4,     0,     4,     0,     4,     0,
     4,     0,     4,     1,     1,     1,     1,     0,     4,     1,
     1,     1,     0,     3,     0,     4,     1,     0,     4,     2,
     2,     0,     1,     1,     0,     3,     2,     0,     1,     1,
     1,     1,     1,     1,     2,     0,     0,     6,     0,     3,
     0,     0,     7,     1,     3,     3,     1,     3,     1,     1,
     1,     2,     1,     1,     1,     0,     0,     6,     0,     0,
     6,     0,     0,     0,     9,     1,     0,     0,     5,     0,
     0,     5
};

static const short yydefact[] = {     4,
     0,     0,     0,     5,     1,     0,     0,     0,     0,     0,
     0,     0,    20,    15,     0,     0,     0,     0,     0,     0,
    21,    26,     8,     7,     0,    10,     0,    53,    12,    14,
     6,     0,    30,    40,     0,     0,    56,    54,     0,     0,
     0,    25,     0,    23,    27,    28,     0,    44,    82,     9,
    11,    13,    55,    53,    22,     0,    29,    31,    41,    42,
     0,    86,     2,    52,    24,     0,    43,    45,    83,    84,
     0,     0,     0,     0,    85,    91,    92,    93,     0,    89,
     0,     0,    94,    97,     0,    16,     0,    16,    34,    33,
    37,    38,    39,     0,    35,    36,    46,     0,    87,   120,
   128,   129,   124,   102,   117,   118,   104,    95,     3,    98,
    99,   101,    20,   100,   119,    32,    53,    90,    53,   106,
   106,   106,   106,   218,    26,     0,     0,    68,    57,     0,
     0,    48,    50,    51,    49,    61,    58,    59,    60,     0,
   107,     0,     0,     0,     0,   132,   231,   252,     0,   226,
   249,   246,   138,   214,   152,   213,   215,   153,   154,   145,
   219,     0,   134,     0,   136,   139,   141,     0,     0,   142,
   143,   144,   140,   220,   222,   224,   223,   221,   243,   244,
   245,    40,    53,    80,    72,    62,    47,    88,   113,   121,
   125,   103,   105,   218,     0,     0,   217,     0,   218,     0,
     0,     0,     0,   218,   218,   146,   148,   229,   225,    17,
    66,    65,     0,    53,     0,    70,     0,   115,     0,   109,
   111,    53,    53,     0,   202,   203,   195,   196,   197,   198,
   201,   200,     0,     0,   194,   256,     0,   227,     0,   247,
   157,     0,   151,   155,   205,   216,    96,   135,   137,     0,
     0,   218,    82,    53,     0,    81,    69,    72,    78,    79,
     0,    76,   111,   113,   108,   114,     0,   130,   122,   126,
   133,     0,     0,   232,   174,   176,   180,   182,   184,   186,
   166,   168,   190,   170,   192,   172,   178,   188,   165,   253,
     0,   250,     0,     0,   160,   161,   159,   156,     0,   147,
   149,   230,    18,     0,    53,    71,     0,    73,   116,   110,
     0,     0,     0,   204,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,   218,     0,   218,     0,   212,     0,   207,     0,     0,
    67,    63,    77,    53,     0,   123,   127,   199,   240,   239,
     0,   234,     0,   237,   175,   177,   181,   183,   185,   187,
   167,   169,   191,   171,   193,   173,   179,   189,   257,     0,
   228,   251,   248,   163,   162,   158,     0,   210,   206,   208,
   218,    19,    53,    74,   112,   241,     0,   233,     0,   218,
     0,     0,   254,     0,   211,     0,     0,    64,   242,   235,
   238,   236,   258,   261,   218,     0,   209,   131,     0,     0,
   255,   164,   259,   262,     0,     0,     0
};

static const short yydefgoto[] = {   415,
    13,    72,     1,     4,     5,   112,   113,   253,   339,    22,
    32,    43,    44,    34,    45,    46,    47,    66,   231,    95,
    96,    49,    59,    60,    61,    74,   117,   268,   132,   133,
    40,    41,   134,   135,   136,   137,   213,   342,   138,   185,
   215,   216,   217,   344,   261,   262,   139,   214,    63,    69,
    70,    71,   119,    79,    80,   109,   124,    83,    84,    85,
    86,   122,   123,   142,   189,   219,   266,   267,   220,   221,
   263,   107,    87,    88,   120,   222,   312,   121,   223,   313,
   103,   269,   382,   161,   194,   162,   163,   164,   165,   166,
   167,   250,   251,   232,   201,   169,   243,   244,   294,   376,
   394,   336,   323,   324,   326,   328,   317,   318,   329,   319,
   320,   321,   322,   330,   325,   327,   234,   235,   273,   272,
   246,   299,   337,   396,   338,   378,   170,   202,   171,   172,
   173,   174,   175,   176,   198,   291,   209,   252,   177,   195,
   316,   351,   352,   353,   354,   388,   178,   179,   200,   293,
   180,   199,   333,   181,   196,   331,   405,   237,   370,   391,
   409,   392,   410
};

static const short yypact[] = {-32768,
     4,   -29,    27,-32768,-32768,   -47,    20,    33,    52,    62,
    72,   114,   141,-32768,   108,    53,    60,    16,   112,   122,
-32768,   158,-32768,-32768,   132,-32768,   139,    28,-32768,-32768,
-32768,   187,-32768,   167,   157,   160,-32768,-32768,   165,   190,
   204,-32768,    78,-32768,   212,-32768,   213,-32768,   235,-32768,
-32768,-32768,-32768,    28,-32768,   187,-32768,-32768,   224,-32768,
   227,-32768,-32768,-32768,-32768,   214,-32768,-32768,   117,-32768,
   120,    43,   184,   215,-32768,-32768,-32768,-32768,    35,-32768,
    44,   142,   150,-32768,   199,-32768,   205,-32768,-32768,-32768,
-32768,-32768,-32768,   206,-32768,-32768,-32768,   120,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,   141,-32768,-32768,-32768,     2,-32768,     2,   203,
   203,   203,   203,   146,   158,   202,   259,-32768,-32768,   232,
   225,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   226,
-32768,   207,   228,   234,   237,-32768,-32768,-32768,   248,-32768,
-32768,-32768,-32768,-32768,    98,-32768,-32768,-32768,-32768,-32768,
-32768,    -2,-32768,   231,-32768,-32768,-32768,   246,   265,-32768,
-32768,-32768,-32768,-32768,-32768,   290,-32768,-32768,-32768,-32768,
-32768,   167,     0,-32768,     1,-32768,-32768,-32768,   289,-32768,
-32768,-32768,-32768,   146,   210,   280,-32768,   210,   146,   210,
   119,   255,   249,   146,   197,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,   123,     2,     5,-32768,    14,-32768,   161,-32768,
-32768,     2,     2,     7,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,    61,   210,-32768,-32768,   291,   301,    -9,   301,
-32768,   154,   119,-32768,-32768,-32768,-32768,-32768,-32768,   210,
   210,   146,   235,     0,   308,-32768,-32768,     1,-32768,-32768,
    36,-32768,-32768,   289,-32768,-32768,   120,-32768,-32768,-32768,
-32768,   255,   210,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
   304,-32768,   320,   210,-32768,-32768,-32768,-32768,   210,   301,
   301,-32768,-32768,   256,     2,-32768,    14,-32768,-32768,-32768,
    97,   273,   274,-32768,   281,   230,   210,   210,   210,   210,
   210,   210,   210,   210,   210,   210,   210,   210,   210,   210,
   210,   146,   210,   146,   233,   -25,   175,-32768,   342,   330,
-32768,-32768,-32768,     2,   306,-32768,-32768,-32768,-32768,-32768,
    10,-32768,   102,-32768,   317,   317,   317,   317,   317,   317,
   192,   192,   192,-32768,-32768,-32768,-32768,-32768,    39,   352,
-32768,   301,-32768,-32768,-32768,-32768,   345,-32768,-32768,-32768,
   146,-32768,     2,-32768,-32768,-32768,    24,-32768,   230,   197,
   337,   368,-32768,   210,-32768,   210,    11,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,   146,   257,-32768,-32768,   210,   210,
-32768,-32768,   301,   301,   382,   383,-32768
};

static const short yypgoto[] = {-32768,
-32768,-32768,-32768,-32768,-32768,   296,-32768,-32768,-32768,   272,
-32768,-32768,   331,   261,-32768,   343,-32768,-32768,   316,-32768,
-32768,   208,-32768,   332,-32768,-32768,-32768,  -116,-32768,   -24,
-32768,   338,-32768,-32768,-32768,-32768,   140,    12,-32768,-32768,
-32768,   135,-32768,-32768,-32768,    89,-32768,-32768,   144,-32768,
   329,-32768,-32768,   133,   303,-32768,-32768,-32768,   319,-32768,
-32768,-32768,-32768,    82,-32768,-32768,   136,-32768,   143,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,   180,-32768,-32768,-32768,  -185,  -186,-32768,  -203,-32768,
-32768,-32768,-32768,  -124,-32768,-32768,-32768,   162,-32768,-32768,
-32768,  -188,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
   134,-32768,-32768,-32768,     8,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,    21,-32768,    22,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768
};


#define	YYLAST		411


static const short yytable[] = {   168,
   131,   249,   140,    39,   126,     6,   233,   203,   224,   238,
   -75,   240,   127,   239,   257,   292,   271,   248,    14,   386,
   408,   128,     2,   275,   276,   277,   278,   279,   280,   281,
   282,   283,     7,   399,   284,   285,   286,   287,   288,     8,
    37,   211,    37,   129,     9,   289,  -260,   377,   259,     3,
    10,   349,    11,   350,    15,    81,   204,    38,   260,    38,
    82,   300,   301,   204,    28,   302,   -75,    16,    37,   168,
   258,   130,   204,    12,   168,   387,   204,   274,   100,   168,
   168,    29,   101,   102,   315,    38,    17,   275,   276,   277,
   278,   279,   280,   281,   282,   283,    18,   256,   284,   285,
   286,   287,   288,    98,   307,   335,    19,    99,   308,   275,
   276,   277,   278,   279,   280,   281,   282,   283,    24,    25,
   284,   285,   286,   287,   288,    26,    27,   168,   355,   356,
   357,   358,   359,   360,   361,   362,   363,   364,   365,   366,
   367,   368,   369,    55,   372,   371,    56,   373,    20,   146,
   147,   -86,   -86,   108,    76,    77,    21,   148,   212,   149,
   150,   -86,    81,    33,    78,    98,   151,    82,  -150,   345,
   389,  -150,   152,    23,   390,   153,   104,    30,   105,   106,
   154,   155,   156,   157,   158,   159,   402,    31,   341,   241,
    48,   254,   242,   160,   255,   397,   295,   296,   297,    35,
   146,   147,   143,   144,   145,   406,    36,   168,   148,   168,
   149,   150,    89,    90,    91,    92,    42,   151,   411,    53,
   413,   414,    50,   152,    93,    51,   264,   384,   265,   212,
    52,   154,   155,   156,   157,   158,   159,    54,    89,    90,
    91,    92,   379,   380,   160,   155,   -30,    58,   225,   226,
    93,   284,   285,   286,   287,   288,   168,   349,   -44,   350,
    62,    68,    73,    97,   111,   168,   341,   227,   228,   141,
   114,   116,   183,   186,   229,   184,   230,   197,   206,   190,
   168,   275,   276,   277,   278,   279,   280,   281,   282,   283,
   187,   188,   284,   285,   286,   287,   288,   207,   208,   192,
   191,   374,   193,   205,   375,   275,   276,   277,   278,   279,
   280,   281,   282,   283,   218,   236,   284,   285,   286,   287,
   288,   245,   247,   290,   305,   332,   334,   340,   412,   275,
   276,   277,   278,   279,   280,   281,   282,   283,   346,   347,
   284,   285,   286,   287,   288,   381,   383,   385,   348,   275,
   276,   277,   278,   279,   280,   281,   282,   283,   393,   403,
   284,   285,   286,   287,   288,-32768,-32768,-32768,-32768,-32768,
-32768,   281,   282,   283,   395,   404,   284,   285,   286,   287,
   288,   416,   417,   115,   125,   182,    65,    57,    94,   210,
    67,    64,   306,   304,   398,   343,   303,    75,   309,   311,
   118,   110,   270,   407,   298,   314,   310,   400,     0,     0,
   401
};

static const short yycheck[] = {   124,
   117,   205,   119,    28,     3,    35,   195,    10,   194,   198,
    10,   200,    11,   199,    10,    25,    10,   204,    66,    10,
    10,    20,    19,    49,    50,    51,    52,    53,    54,    55,
    56,    57,     6,    10,    60,    61,    62,    63,    64,    13,
    41,    42,    41,    42,    18,   234,     8,    73,    35,    46,
    24,    28,    26,    30,    35,    13,    66,    58,    45,    58,
    18,   250,   251,    66,    49,   252,    66,    35,    41,   194,
    66,    70,    66,    47,   199,    66,    66,    17,    35,   204,
   205,    66,    39,    40,   273,    58,    35,    49,    50,    51,
    52,    53,    54,    55,    56,    57,    35,   214,    60,    61,
    62,    63,    64,    69,    69,   294,    35,    73,    73,    49,
    50,    51,    52,    53,    54,    55,    56,    57,    66,    67,
    60,    61,    62,    63,    64,    66,    67,   252,   317,   318,
   319,   320,   321,   322,   323,   324,   325,   326,   327,   328,
   329,   330,   331,    66,   333,   332,    69,   334,    35,     4,
     5,    35,    36,     4,    35,    36,    16,    12,   183,    14,
    15,    45,    13,     6,    45,    69,    21,    18,    71,    73,
    69,    74,    27,    66,    73,    30,    35,    66,    37,    38,
    35,    36,    37,    38,    39,    40,   390,    66,   305,    71,
    24,    69,    74,    48,    72,   381,    43,    44,    45,    68,
     4,     5,   121,   122,   123,   394,    68,   332,    12,   334,
    14,    15,    29,    30,    31,    32,    30,    21,   405,    30,
   409,   410,    66,    27,    41,    66,    66,   344,    68,   254,
    66,    35,    36,    37,    38,    39,    40,    34,    29,    30,
    31,    32,    68,    69,    48,    36,    35,    35,    39,    40,
    41,    60,    61,    62,    63,    64,   381,    28,    35,    30,
    26,    35,    49,    49,    66,   390,   383,    58,    59,    67,
    66,    66,    71,    42,    65,    17,    67,    30,    33,    73,
   405,    49,    50,    51,    52,    53,    54,    55,    56,    57,
    66,    66,    60,    61,    62,    63,    64,    33,     9,    66,
    73,    69,    66,    73,    72,    49,    50,    51,    52,    53,
    54,    55,    56,    57,    26,    36,    60,    61,    62,    63,
    64,    67,    74,    33,    17,    22,     7,    72,    72,    49,
    50,    51,    52,    53,    54,    55,    56,    57,    66,    66,
    60,    61,    62,    63,    64,     4,    17,    42,    68,    49,
    50,    51,    52,    53,    54,    55,    56,    57,     7,    23,
    60,    61,    62,    63,    64,    49,    50,    51,    52,    53,
    54,    55,    56,    57,    30,     8,    60,    61,    62,    63,
    64,     0,     0,    88,   113,   125,    56,    45,    73,   182,
    59,    54,   258,   254,   383,   307,   253,    69,   263,   267,
    98,    83,   223,   396,   243,   272,   264,   387,    -1,    -1,
   389
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/usr/local/gnu/lib/bison.simple"

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 1, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */


#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
 #pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc.  */
#endif /* not GNU C.  */
#endif /* alloca not defined.  */

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

/* Note: there must be only one dollar sign in this file.
   It is replaced by the list of actions, each action
   as one case of the switch.  */

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	return(0)
#define YYABORT 	return(1)
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.
   This remains here temporarily to ease the
   transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    { yychar = (token), yylval = (value);			\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

#ifndef YYPURE
#define YYLEX		yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#define YYLEX		yylex(&yylval, &yylloc)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int	yychar;			/*  the lookahead symbol		*/
YYSTYPE	yylval;			/*  the semantic value of the		*/
				/*  lookahead symbol			*/

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;			/*  location data for the lookahead	*/
				/*  symbol				*/
#endif

int yynerrs;			/*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;			/*  nonzero means print parse trace	*/
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/

#ifndef	YYINITDEPTH
#define YYINITDEPTH 200
#endif

/*  YYMAXDEPTH is the maximum size the stacks can grow to
    (effective only if the built-in stack extension method is used).  */

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
int yyparse (void);
#endif

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __yy_bcopy(FROM,TO,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_bcopy (from, to, count)
     char *from;
     char *to;
     int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_bcopy (char *from, char *to, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif

#line 184 "/usr/local/gnu/lib/bison.simple"
int
yyparse()
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/

  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

/* Push a new state, which is found in  yystate  .  */
/* In all cases, when you get here, the value and location stacks
   have just been pushed. so pushing a state here evens the stacks.  */
yynewstate:

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
      YYLTYPE *yyls1 = yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = yyssp - yyss + 1;

#ifdef yyoverflow
      /* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef YYLSP_NEEDED
      /* This used to be a conditional around just the two extra args,
	 but that might be undefined if yyoverflow is a macro.  */
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yyls1, size * sizeof (*yylsp),
		 &yystacksize);
#else
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yystacksize);
#endif

      yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  return 2;
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
      __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
      __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
      __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

      yyssp = yyss + size - 1;
      yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
      yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif

      if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
    }

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
      if (yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* count tokens shifted since error; after three, turn off error status.  */
  if (yyerrstatus) yyerrstatus--;

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
    yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
    {
      int i;

      fprintf (stderr, "Reducing via rule %d (line %d), ",
	       yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif


  switch (yyn) {

case 1:
#line 61 "web2c.yacc"
{ block_level++;
 	    printf ("#include \"%s\"\n", std_header);
	  ;
    break;}
case 2:
#line 66 "web2c.yacc"
{ printf ("\n#include \"%s\"\n", coerce_name); ;
    break;}
case 3:
#line 69 "web2c.yacc"
{ YYACCEPT; ;
    break;}
case 6:
#line 79 "web2c.yacc"
{
	      ii = add_to_table (last_id); 
	      sym_table[ii].typ = field_id_tok;
	    ;
    break;}
case 7:
#line 84 "web2c.yacc"
{
	      ii = add_to_table (last_id); 
	      sym_table[ii].typ = fun_id_tok;
	    ;
    break;}
case 8:
#line 89 "web2c.yacc"
{
	      ii = add_to_table (last_id); 
	      sym_table[ii].typ = const_id_tok;
	    ;
    break;}
case 9:
#line 94 "web2c.yacc"
{
	      ii = add_to_table (last_id); 
	      sym_table[ii].typ = fun_param_tok;
	    ;
    break;}
case 10:
#line 99 "web2c.yacc"
{
	      ii = add_to_table (last_id); 
	      sym_table[ii].typ = proc_id_tok;
	    ;
    break;}
case 11:
#line 104 "web2c.yacc"
{
	      ii = add_to_table (last_id); 
	      sym_table[ii].typ = proc_param_tok;
	    ;
    break;}
case 12:
#line 109 "web2c.yacc"
{
	      ii = add_to_table (last_id); 
	      sym_table[ii].typ = type_id_tok;
	    ;
    break;}
case 13:
#line 114 "web2c.yacc"
{
	      ii = add_to_table (last_id); 
	      sym_table[ii].typ = type_id_tok;
	      sym_table[ii].val = lower_bound;
	      sym_table[ii].val_sym = lower_sym;
	      sym_table[ii].upper = upper_bound;
	      sym_table[ii].upper_sym = upper_sym;
	    ;
    break;}
case 14:
#line 123 "web2c.yacc"
{
	      ii = add_to_table (last_id); 
	      sym_table[ii].typ = var_id_tok;
	    ;
    break;}
case 16:
#line 134 "web2c.yacc"
{	if (block_level > 0) my_output("{");
			indent++; block_level++;
		      ;
    break;}
case 17:
#line 139 "web2c.yacc"
{if (block_level == 2) {
			    if (strcmp(fn_return_type, "void")) {
			      my_output("register");
			      my_output(fn_return_type);
			      my_output("Result;");
			    }
			    if (tex) {
			      sprintf(safe_string, "%s_regmem", my_routine);
			      my_output(safe_string);
			      indent_line();
			    }
			 }
			;
    break;}
case 18:
#line 153 "web2c.yacc"
{if (block_level == 1)
				puts("\n#include \"coerce.h\"");
			 doing_statements = true;
			;
    break;}
case 19:
#line 158 "web2c.yacc"
{if (block_level == 2) {
			    if (strcmp(fn_return_type,"void")) {
			      my_output("return Result");
			      semicolon();
			     }
			     if (tex) {
			       if (uses_mem && uses_eqtb)
				fprintf(coerce,
	"#define %s_regmem register memoryword *mem=zmem, *eqtb=zeqtb;\n",
				   my_routine);
			       else if (uses_mem)
				fprintf(coerce,
			"#define %s_regmem register memoryword *mem=zmem;\n",
				   my_routine);
			       else if (uses_eqtb)
				fprintf(coerce,
			"#define %s_regmem register memoryword *eqtb=zeqtb;\n",
				   my_routine);
			       else
				fprintf(coerce,
				   "#define %s_regmem\n",
				   my_routine);
			    }
			    my_routine[0] = '\0';
			 }
			 indent--; block_level--;
			 my_output("}"); new_line();
			 doing_statements = false;
			;
    break;}
case 21:
#line 191 "web2c.yacc"
{ my_output("/*"); ;
    break;}
case 22:
#line 193 "web2c.yacc"
{ my_output("*/"); ;
    break;}
case 25:
#line 201 "web2c.yacc"
{ my_output(temp); ;
    break;}
case 27:
#line 206 "web2c.yacc"
{ indent_line(); ;
    break;}
case 30:
#line 214 "web2c.yacc"
{ new_line(); my_output("#define"); ;
    break;}
case 31:
#line 216 "web2c.yacc"
{ ii=add_to_table(last_id);
				  sym_table[ii].typ = const_id_tok;
				  my_output(last_id);
				;
    break;}
case 32:
#line 221 "web2c.yacc"
{ sym_table[ii].val=last_i_num;
				  new_line(); ;
    break;}
case 33:
#line 226 "web2c.yacc"
{
				  sscanf(temp, "%ld", &last_i_num);
				  if (my_labs((long) last_i_num) > 32767)
				      strcat(temp, "L");
				  my_output(temp);
				  yyval = ex_32;
				;
    break;}
case 34:
#line 234 "web2c.yacc"
{ my_output(temp);
				  yyval = ex_real;
				;
    break;}
case 35:
#line 238 "web2c.yacc"
{ yyval = 0; ;
    break;}
case 36:
#line 240 "web2c.yacc"
{ yyval = ex_32; ;
    break;}
case 37:
#line 244 "web2c.yacc"
{ int i, j; char s[132];
	  			  j = 1;
				  s[0] = '"';
	  			  for (i=1; yytext[i-1]!=0; i++) {
	  			    if (yytext[i] == '\\' || yytext[i] == '"')
					s[j++]='\\';
	    			    else if (yytext[i] == '\'') i++;
	    			    s[j++] = yytext[i];
				  }
	    			  s[j-1] = '"';
				  s[j] = 0;
				  my_output(s);
				;
    break;}
case 38:
#line 258 "web2c.yacc"
{ char s[5];
				  s[0]='\'';
	    			  if (yytext[1] == '\\' || yytext[1] == '\'') {
	  				s[2] = yytext[1];
					s[1] = '\\';
					s[3] = '\'';
					s[4] = '\0';
				  }
	  			  else {
					s[1] = yytext[1];
					s[2]='\'';
					s[3]='\0';
				  }
	  			  my_output(s);
				;
    break;}
case 39:
#line 276 "web2c.yacc"
{ my_output(last_id); ;
    break;}
case 44:
#line 288 "web2c.yacc"
{ my_output("typedef"); ;
    break;}
case 45:
#line 290 "web2c.yacc"
{ ii = add_to_table(last_id);
				  sym_table[ii].typ = type_id_tok;
				  strcpy(safe_string, last_id);
				  last_type = ii;
				;
    break;}
case 46:
#line 296 "web2c.yacc"
{
				  array_bounds[0] = 0;
				  array_offset[0] = 0;
				;
    break;}
case 47:
#line 301 "web2c.yacc"
{ if (*array_offset) {
			fprintf(stderr, "Cannot typedef arrays with offsets\n");
					exit(1);
				  }
				  my_output(safe_string);
				  my_output(array_bounds);
				  semicolon();
				  last_type = -1;
				;
    break;}
case 50:
#line 318 "web2c.yacc"
{
              if (last_type >= 0)
                {
                   sym_table[ii].val = lower_bound;
                   sym_table[ii].val_sym = lower_sym;
                   sym_table[ii].upper = upper_bound;
                   sym_table[ii].upper_sym = upper_sym;
                   ii= -1;
                 }
                 
              /* If the bounds on an integral type are known at
                 translation time, select the smallest ANSI C type which
                 can represent it.  We avoid using unsigned char and
                 unsigned short where possible, as ANSI compilers
                 (typically) convert them to int, while traditional
                 compilers convert them to unsigned int.  We also avoid
                 schar if possible, since it also is different on
                 different compilers (see config.h).  */
              if (lower_sym == -1 && upper_sym == -1)
                {
                  if (0 <= lower_bound && upper_bound <= SCHAR_MAX)
                    my_output ("char");
                  else if (SCHAR_MIN <= lower_bound && upper_bound <=SCHAR_MAX)
                    my_output ("schar");
                  else if (0 <= lower_bound && upper_bound <= UCHAR_MAX)
                    my_output ("unsigned char");
                  else if (SHRT_MIN <= lower_bound && upper_bound <= SHRT_MAX)
                    my_output ("short");
                  else if (0 <= lower_bound && upper_bound <= USHRT_MAX)
                    my_output ("unsigned short");
                  else
                    my_output ("integer");
                }
              else
                my_output ("integer");
            ;
    break;}
case 55:
#line 366 "web2c.yacc"
{lower_bound = upper_bound;
				 lower_sym = upper_sym;
				 sscanf(temp, "%ld", &upper_bound);
				 upper_sym = -1; /* no sym table entry */
				;
    break;}
case 56:
#line 372 "web2c.yacc"
{ lower_bound = upper_bound;
				  lower_sym = upper_sym;
				  upper_bound = sym_table[l_s].val;
				  upper_sym = l_s;
				;
    break;}
case 57:
#line 380 "web2c.yacc"
{if (last_type >= 0) {
	    sym_table[last_type].var_not_needed = sym_table[l_s].var_not_needed;
	    sym_table[last_type].upper = sym_table[l_s].upper;
	    sym_table[last_type].upper_sym = sym_table[l_s].upper_sym;
	    sym_table[last_type].val = sym_table[l_s].val;
	    sym_table[last_type].val_sym = sym_table[l_s].val_sym;
	 }
	 my_output(last_id); ;
    break;}
case 58:
#line 392 "web2c.yacc"
{ if (last_type >= 0)
	        sym_table[last_type].var_not_needed = true;
            ;
    break;}
case 60:
#line 397 "web2c.yacc"
{ if (last_type >= 0)
	        sym_table[last_type].var_not_needed = true;
            ;
    break;}
case 61:
#line 401 "web2c.yacc"
{ if (last_type >= 0)
	        sym_table[last_type].var_not_needed = true;
            ;
    break;}
case 62:
#line 407 "web2c.yacc"
{if (last_type >= 0) {
	    sym_table[last_type].var_not_needed = sym_table[l_s].var_not_needed;
	    sym_table[last_type].upper = sym_table[l_s].upper;
	    sym_table[last_type].upper_sym = sym_table[l_s].upper_sym;
	    sym_table[last_type].val = sym_table[l_s].val;
	    sym_table[last_type].val_sym = sym_table[l_s].val_sym;
	 }
	 my_output(last_id); my_output("*"); ;
    break;}
case 65:
#line 423 "web2c.yacc"
{ compute_array_bounds(); ;
    break;}
case 66:
#line 425 "web2c.yacc"
{ lower_bound = sym_table[l_s].val;
				  lower_sym = sym_table[l_s].val_sym;
				  upper_bound = sym_table[l_s].upper;
				  upper_sym = sym_table[l_s].upper_sym;
				  compute_array_bounds();
				;
    break;}
case 68:
#line 438 "web2c.yacc"
{ my_output("struct"); my_output("{"); indent++;;
    break;}
case 69:
#line 440 "web2c.yacc"
{ indent--; my_output("}"); semicolon(); ;
    break;}
case 72:
#line 448 "web2c.yacc"
{ field_list[0] = 0; ;
    break;}
case 73:
#line 450 "web2c.yacc"
{
				  /*array_bounds[0] = 0;
				  array_offset[0] = 0;*/
				;
    break;}
case 74:
#line 455 "web2c.yacc"
{ int i=0, j; char ltemp[80];
				  while(field_list[i++] == '!') {
					j = 0;
					while (field_list[i])
					    ltemp[j++] = field_list[i++];
					i++;
					if (field_list[i] == '!')
						ltemp[j++] = ',';
					ltemp[j] = 0;
					my_output(ltemp);
				  }
				  semicolon();
				;
    break;}
case 78:
#line 476 "web2c.yacc"
{ int i=0, j=0;
				  while (field_list[i] == '!')
					while(field_list[i++]);
				  ii = add_to_table(last_id);
				  sym_table[ii].typ = field_id_tok;
				  field_list[i++] = '!';
				  while (last_id[j])
					field_list[i++] = last_id[j++];
				  field_list[i++] = 0;
				  field_list[i++] = 0;
				;
    break;}
case 79:
#line 488 "web2c.yacc"
{ int i=0, j=0;
				  while (field_list[i] == '!')
					while(field_list[i++]);
				  field_list[i++] = '!';
				  while (last_id[j])
					field_list[i++] = last_id[j++];
				  field_list[i++] = 0;
				  field_list[i++] = 0;
				;
    break;}
case 80:
#line 500 "web2c.yacc"
{ my_output("file_ptr /* of "); ;
    break;}
case 81:
#line 502 "web2c.yacc"
{ my_output("*/"); ;
    break;}
case 86:
#line 514 "web2c.yacc"
{ var_list[0] = 0;
	      array_bounds[0] = 0;
	      array_offset[0] = 0;
	      var_formals = false;
	      ids_paramed = 0;
	    ;
    break;}
case 87:
#line 521 "web2c.yacc"
{
	      array_bounds[0] = 0;	
	      array_offset[0] = 0;
	    ;
    break;}
case 88:
#line 526 "web2c.yacc"
{ fixup_var_list(); ;
    break;}
case 91:
#line 534 "web2c.yacc"
{ int i=0, j=0;
				  ii = add_to_table(last_id);
				  sym_table[ii].typ = var_id_tok;
				  sym_table[ii].var_formal = var_formals;
				  param_id_list[ids_paramed++] = ii;
	  			  while (var_list[i] == '!')
					while(var_list[i++]);
				  var_list[i++] = '!';
				  while (last_id[j])
					var_list[i++] = last_id[j++];
	  			  var_list[i++] = 0;
				  var_list[i++] = 0;
				;
    break;}
case 92:
#line 548 "web2c.yacc"
{ int i=0, j=0;
				  ii = add_to_table(last_id);
	  			  sym_table[ii].typ = var_id_tok;
				  sym_table[ii].var_formal = var_formals;
				  param_id_list[ids_paramed++] = ii;
	  			  while (var_list[i] == '!')
					while (var_list[i++]);
	  			  var_list[i++] = '!';
				  while (last_id[j])
					var_list[i++] = last_id[j++];
	  			  var_list[i++] = 0;
				  var_list[i++] = 0;
				;
    break;}
case 93:
#line 562 "web2c.yacc"
{ int i=0, j=0;
				  ii = add_to_table(last_id);
	  			  sym_table[ii].typ = var_id_tok;
				  sym_table[ii].var_formal = var_formals;
				  param_id_list[ids_paramed++] = ii;
	  			  while (var_list[i] == '!')
					while(var_list[i++]);
	  			  var_list[i++] = '!';
				  while (last_id[j])
					var_list[i++] = last_id[j++];
				  var_list[i++] = 0;
				  var_list[i++] = 0;
				;
    break;}
case 95:
#line 580 "web2c.yacc"
{ my_output ("void main_body() {");
		  indent++;
		  new_line ();
		;
    break;}
case 96:
#line 585 "web2c.yacc"
{ indent--;
                  my_output ("}");
                  new_line ();
                ;
    break;}
case 99:
#line 597 "web2c.yacc"
{ indent_line(); remove_locals(); ;
    break;}
case 100:
#line 599 "web2c.yacc"
{ indent_line(); remove_locals(); ;
    break;}
case 102:
#line 607 "web2c.yacc"
{ ii = add_to_table(last_id);
	      if (debug)
	        fprintf(stderr, "%3d Procedure %s\n", pf_count++, last_id);
	      sym_table[ii].typ = proc_id_tok;
	      strcpy(my_routine, last_id);
	      uses_eqtb = uses_mem = false;
	      my_output("void");
	      new_line ();
	      orig_std = std;
	      std = 0;
	    ;
    break;}
case 103:
#line 619 "web2c.yacc"
{ strcpy(fn_return_type, "void");
	      do_proc_args();
	      gen_function_head();;
    break;}
case 104:
#line 623 "web2c.yacc"
{ ii = l_s; 
	      if (debug)
	        fprintf(stderr, "%3d Procedure %s\n", pf_count++, last_id);
	      strcpy(my_routine, last_id);
	      my_output("void");
	      new_line ();
	    ;
    break;}
case 105:
#line 631 "web2c.yacc"
{ strcpy(fn_return_type, "void");
	      do_proc_args();
	      gen_function_head();
            ;
    break;}
case 106:
#line 639 "web2c.yacc"
{
              strcpy (z_id, last_id);
	      mark ();
	      ids_paramed = 0;
	    ;
    break;}
case 107:
#line 645 "web2c.yacc"
{ sprintf (z_id, "z%s", last_id);
	      ids_paramed = 0;
	      if (sym_table[ii].typ == proc_id_tok)
	        sym_table[ii].typ = proc_param_tok;
	      else if (sym_table[ii].typ == fun_id_tok)
	        sym_table[ii].typ = fun_param_tok;
	      mark();
	    ;
    break;}
case 111:
#line 661 "web2c.yacc"
{ ids_typed = ids_paramed;;
    break;}
case 112:
#line 663 "web2c.yacc"
{ int i, need_var;
	      i = search_table(last_id);
	      need_var = !sym_table[i].var_not_needed;
	      for (i=ids_typed; i<ids_paramed; i++)
                {
	          strcpy(arg_type[i], last_id);
		  if (need_var && sym_table[param_id_list[i]].var_formal)
	            strcat(arg_type[i], " *");
		  else
                    sym_table[param_id_list[i]].var_formal = false;
	        }
	    ;
    break;}
case 113:
#line 677 "web2c.yacc"
{var_formals = 0;;
    break;}
case 115:
#line 678 "web2c.yacc"
{var_formals = 1;;
    break;}
case 120:
#line 690 "web2c.yacc"
{ orig_std = std;
              std = 0;
              ii = add_to_table(last_id);
              if (debug)
                fprintf(stderr, "%3d Function %s\n", pf_count++, last_id);
              sym_table[ii].typ = fun_id_tok;
              strcpy (my_routine, last_id);
              uses_eqtb = uses_mem = false;
            ;
    break;}
case 121:
#line 700 "web2c.yacc"
{ normal();
              array_bounds[0] = 0;
              array_offset[0] = 0;
            ;
    break;}
case 122:
#line 705 "web2c.yacc"
{ strcpy(fn_return_type, yytext);
              do_proc_args();
              gen_function_head();
            ;
    break;}
case 124:
#line 711 "web2c.yacc"
{ orig_std = std;
              std = 0;
              ii = l_s;
              if (debug)
                fprintf(stderr, "%3d Function %s\n", pf_count++, last_id);
              strcpy(my_routine, last_id);
              uses_eqtb = uses_mem = false;
            ;
    break;}
case 125:
#line 720 "web2c.yacc"
{ normal();
              array_bounds[0] = 0;
              array_offset[0] = 0;
            ;
    break;}
case 126:
#line 725 "web2c.yacc"
{ strcpy(fn_return_type, yytext);
              do_proc_args();
              gen_function_head();
            ;
    break;}
case 132:
#line 743 "web2c.yacc"
{my_output("{"); indent++; new_line();;
    break;}
case 133:
#line 745 "web2c.yacc"
{ indent--; my_output("}"); new_line(); ;
    break;}
case 138:
#line 758 "web2c.yacc"
{if (!doreturn(temp)) {
				      sprintf(safe_string, "lab%s:", temp);
				    my_output(safe_string);
				 }
				;
    break;}
case 139:
#line 766 "web2c.yacc"
{ semicolon(); ;
    break;}
case 140:
#line 768 "web2c.yacc"
{ semicolon(); ;
    break;}
case 145:
#line 776 "web2c.yacc"
{my_output("break");;
    break;}
case 146:
#line 780 "web2c.yacc"
{ my_output("="); ;
    break;}
case 148:
#line 783 "web2c.yacc"
{ my_output("Result ="); ;
    break;}
case 150:
#line 788 "web2c.yacc"
{ if (strcmp(last_id, "mem") == 0)
					uses_mem = 1;
				  else if (strcmp(last_id, "eqtb") == 0)
					uses_eqtb = 1;
				  if (sym_table[l_s].var_formal)
					putchar('*');
				  my_output(last_id);
				  yyval = ex_32;
				;
    break;}
case 152:
#line 799 "web2c.yacc"
{ if (sym_table[l_s].var_formal)
					putchar('*');
				  my_output(last_id); yyval = ex_32; ;
    break;}
case 153:
#line 805 "web2c.yacc"
{ yyval = ex_32; ;
    break;}
case 154:
#line 807 "web2c.yacc"
{ yyval = ex_32; ;
    break;}
case 157:
#line 815 "web2c.yacc"
{ my_output("["); ;
    break;}
case 158:
#line 817 "web2c.yacc"
{ my_output("]"); ;
    break;}
case 159:
#line 819 "web2c.yacc"
{if (tex || mf) {
				   if (strcmp(last_id, "int")==0)
					my_output(".cint");
				   else if (strcmp(last_id, "lh")==0)
					my_output(".v.LH");
				   else if (strcmp(last_id, "rh")==0)
					my_output(".v.RH");
				   else {
				     sprintf(safe_string, ".%s", last_id);
				     my_output(safe_string);
				   }
				 }
				 else {
				    sprintf(safe_string, ".%s", last_id);
				    my_output(safe_string);
				 }
				;
    break;}
case 160:
#line 837 "web2c.yacc"
{ my_output(".hh.b0");;
    break;}
case 161:
#line 839 "web2c.yacc"
{ my_output(".hh.b1");;
    break;}
case 163:
#line 844 "web2c.yacc"
{ my_output("][");;
    break;}
case 165:
#line 849 "web2c.yacc"
{ yyval = yyvsp[0]; ;
    break;}
case 166:
#line 850 "web2c.yacc"
{my_output("+");;
    break;}
case 167:
#line 851 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 168:
#line 852 "web2c.yacc"
{my_output("-");;
    break;}
case 169:
#line 853 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 170:
#line 854 "web2c.yacc"
{my_output("*");;
    break;}
case 171:
#line 855 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 172:
#line 856 "web2c.yacc"
{my_output("/");;
    break;}
case 173:
#line 857 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 174:
#line 858 "web2c.yacc"
{my_output("==");;
    break;}
case 175:
#line 859 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 176:
#line 860 "web2c.yacc"
{my_output("!=");;
    break;}
case 177:
#line 861 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 178:
#line 862 "web2c.yacc"
{my_output("%");;
    break;}
case 179:
#line 863 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 180:
#line 864 "web2c.yacc"
{my_output("<");;
    break;}
case 181:
#line 865 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 182:
#line 866 "web2c.yacc"
{my_output(">");;
    break;}
case 183:
#line 867 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 184:
#line 868 "web2c.yacc"
{my_output("<=");;
    break;}
case 185:
#line 869 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 186:
#line 870 "web2c.yacc"
{my_output(">=");;
    break;}
case 187:
#line 871 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 188:
#line 872 "web2c.yacc"
{my_output("&&");;
    break;}
case 189:
#line 873 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 190:
#line 874 "web2c.yacc"
{my_output("||");;
    break;}
case 191:
#line 875 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]);;
    break;}
case 192:
#line 877 "web2c.yacc"
{ my_output("/ ((double)"); ;
    break;}
case 193:
#line 879 "web2c.yacc"
{yyval = max(yyvsp[-3], yyvsp[0]); my_output(")"); ;
    break;}
case 194:
#line 881 "web2c.yacc"
{ yyval = yyvsp[0]; ;
    break;}
case 196:
#line 886 "web2c.yacc"
{ my_output("- (integer)"); ;
    break;}
case 197:
#line 888 "web2c.yacc"
{ my_output("!"); ;
    break;}
case 198:
#line 892 "web2c.yacc"
{ my_output("("); ;
    break;}
case 199:
#line 894 "web2c.yacc"
{ my_output(")"); yyval = yyvsp[-3]; ;
    break;}
case 202:
#line 898 "web2c.yacc"
{ my_output(last_id); my_output("()"); ;
    break;}
case 203:
#line 900 "web2c.yacc"
{ my_output(last_id); ;
    break;}
case 205:
#line 905 "web2c.yacc"
{ my_output("("); ;
    break;}
case 206:
#line 907 "web2c.yacc"
{ my_output(")"); ;
    break;}
case 208:
#line 912 "web2c.yacc"
{ my_output(","); ;
    break;}
case 213:
#line 925 "web2c.yacc"
{ my_output(last_id); my_output("()"); ;
    break;}
case 214:
#line 927 "web2c.yacc"
{ my_output(last_id);
				  ii = add_to_table(last_id);
	  			  sym_table[ii].typ = proc_id_tok;
				  my_output("()");
				;
    break;}
case 215:
#line 933 "web2c.yacc"
{ my_output(last_id); ;
    break;}
case 217:
#line 938 "web2c.yacc"
{if (doreturn(temp)) {
				    if (strcmp(fn_return_type,"void"))
					my_output("return(Result)");
				    else
					my_output("return");
				 } else {
				     sprintf(safe_string, "goto lab%s",
					temp);
				     my_output(safe_string);
				 }
				;
    break;}
case 226:
#line 968 "web2c.yacc"
{ my_output("if"); my_output("("); ;
    break;}
case 227:
#line 970 "web2c.yacc"
{ my_output(")"); new_line();;
    break;}
case 229:
#line 975 "web2c.yacc"
{ my_output("else"); ;
    break;}
case 231:
#line 980 "web2c.yacc"
{ my_output("switch"); my_output("("); ;
    break;}
case 232:
#line 982 "web2c.yacc"
{ my_output(")"); indent_line();
				  my_output("{"); indent++;
				;
    break;}
case 233:
#line 986 "web2c.yacc"
{ indent--; my_output("}"); new_line(); ;
    break;}
case 236:
#line 994 "web2c.yacc"
{ my_output("break"); semicolon(); ;
    break;}
case 239:
#line 1002 "web2c.yacc"
{ my_output("case"); 
				  my_output(temp);
				  my_output(":"); indent_line();
				;
    break;}
case 240:
#line 1007 "web2c.yacc"
{ my_output("default:"); indent_line(); ;
    break;}
case 246:
#line 1020 "web2c.yacc"
{ my_output("while");
				  my_output("(");
				;
    break;}
case 247:
#line 1024 "web2c.yacc"
{ my_output(")"); ;
    break;}
case 249:
#line 1029 "web2c.yacc"
{ my_output("do"); my_output("{"); indent++; ;
    break;}
case 250:
#line 1031 "web2c.yacc"
{ indent--; my_output("}"); 
				  my_output("while"); my_output("( ! (");
				;
    break;}
case 251:
#line 1035 "web2c.yacc"
{ my_output(") )"); ;
    break;}
case 252:
#line 1039 "web2c.yacc"
{
				  my_output("{");
				  my_output("register");
				  my_output("integer");
				  if (strict_for)
					my_output("for_begin,");
				  my_output("for_end;");
				 ;
    break;}
case 253:
#line 1048 "web2c.yacc"
{ if (strict_for)
					my_output("for_begin");
				  else
					my_output(control_var);
				  my_output("="); ;
    break;}
case 254:
#line 1054 "web2c.yacc"
{ my_output("; if (");
				  if (strict_for) my_output("for_begin");
				  else my_output(control_var);
				  my_output(relation);
				  my_output("for_end)");
				  if (strict_for) {
					my_output("{");
					my_output(control_var);
					my_output("=");
					my_output("for_begin");
					semicolon();
				  }
				  my_output("do"); 
				  indent++; 
				  new_line();;
    break;}
case 255:
#line 1070 "web2c.yacc"
{
				  char *top = strrchr (for_stack, '#');
				  indent--;
                                  new_line();
				  my_output("while"); 
				  my_output("("); 
				  my_output(top+1); 
				  my_output(")"); 
				  my_output(";");
				  my_output("}");
				  if (strict_for)
					my_output("}");
				  *top=0;
				  new_line();
				;
    break;}
case 256:
#line 1088 "web2c.yacc"
{ strcpy(control_var, last_id); ;
    break;}
case 257:
#line 1092 "web2c.yacc"
{ my_output(";"); ;
    break;}
case 258:
#line 1094 "web2c.yacc"
{ 
				  strcpy(relation, "<=");
				  my_output("for_end");
				  my_output("="); ;
    break;}
case 259:
#line 1099 "web2c.yacc"
{ 
				  sprintf(for_stack + strlen(for_stack),
				    "#%s++ < for_end", control_var);
				;
    break;}
case 260:
#line 1104 "web2c.yacc"
{ my_output(";"); ;
    break;}
case 261:
#line 1106 "web2c.yacc"
{
				  strcpy(relation, ">=");
				  my_output("for_end");
				  my_output("="); ;
    break;}
case 262:
#line 1111 "web2c.yacc"
{ 
				  sprintf(for_stack + strlen(for_stack),
				    "#%s-- > for_end", control_var);
				;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 465 "/usr/local/gnu/lib/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

  /* Now "shift" the result of the reduction.
     Determine what state that goes to,
     based on the state we popped back to
     and the rule number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

  if (yyerrstatus == 3)
    {
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token
     after shifting the error token.  */

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;
}
#line 1116 "web2c.yacc"


static void compute_array_bounds()
{
    long lb;
    char tmp[200];

    if (lower_sym == -1) {	/* lower is a constant */
	lb = lower_bound - 1;
	if (lb==0) lb = -1;	/* Treat lower_bound==1 as if lower_bound==0 */
	if (upper_sym == -1)	/* both constants */
	    sprintf(tmp, "[%ld]", upper_bound - lb);
	else {			/* upper a symbol, lower constant */
	    if (lb < 0)
		sprintf(tmp, "[%s + %ld]",
				symbol(upper_sym), (-lb));
	    else
		sprintf(tmp, "[%s - %ld]",
				symbol(upper_sym), lb);
	}
	if (lower_bound < 0 || lower_bound > 1) {
	    if (*array_bounds) {
		fprintf(stderr, "Cannot handle offset in second dimension\n");
		exit(1);
	    }
	    if (lower_bound < 0) {
		sprintf(array_offset, "+%ld", -lower_bound);
	    } else {
		sprintf(array_offset, "-%ld", lower_bound);
	    }
	}
	strcat(array_bounds, tmp);
    }
    else {			/* lower is a symbol */
	if (upper_sym != -1)	/* both are symbols */
	    sprintf(tmp, "[%s - %s + 1]", symbol(upper_sym),
		symbol(lower_sym));
	else {			/* upper constant, lower symbol */
	    sprintf(tmp, "[%ld - %s]", upper_bound + 1,
		symbol(lower_sym));
	}
	if (*array_bounds) {
	    fprintf(stderr, "Cannot handle symbolic offset in second dimension\n");
	    exit(1);
	}
	sprintf(array_offset, "- (int)(%s)", symbol(lower_sym));
	strcat(array_bounds, tmp);
    }
}


/* Kludge around negative lower array bounds.  */

static void
fixup_var_list ()
{
  int i, j;
  char output_string[100], real_symbol[100];

  for (i = 0; var_list[i++] == '!'; )
    {
      for (j = 0; (real_symbol[j++] = var_list[i++]); )
        ;
      if (*array_offset)
        {
          fprintf (std, "\n#define %s (%s %s)\n  ",
                          real_symbol, next_temp, array_offset);
          strcpy (real_symbol, next_temp);
          /* Add the temp to the symbol table, so that change files can
             use it later on if necessary.  */
          j = add_to_table (next_temp);
          sym_table[j].typ = var_id_tok;
          find_next_temp ();
        }
      sprintf (output_string, "%s%s%c", real_symbol, array_bounds,
                      var_list[i] == '!' ? ',' : ' ');
      my_output (output_string);
  }
  semicolon ();
}


/* If we're not processing TeX, we return false.  Otherwise,
   return true if the label is "10" and we're not in one of four TeX
   routines where the line labeled "10" isn't the end of the routine.
   Otherwise, return 0.  */
   
static boolean
doreturn (label)
    char *label;
{
    return
      tex
      && STREQ (label, "10")
      && !STREQ (my_routine, "macrocall")
      && !STREQ (my_routine, "hpack")
      && !STREQ (my_routine, "vpackage")
      && !STREQ (my_routine, "trybreak");
}


/* Return the absolute value of a long.  */
static long 
my_labs (x)
  long x;
{
    if (x < 0L) return(-x);
    return(x);
}

static void
do_proc_args ()
{
  fprintf (coerce, "%s %s();\n", fn_return_type, z_id);
}

static void
gen_function_head()
{
    int i;

    if (strcmp(my_routine, z_id)) {
	fprintf(coerce, "#define %s(", my_routine);
	for (i=0; i<ids_paramed; i++) {
	    if (i > 0)
		fprintf(coerce, ", %s", symbol(param_id_list[i]));
	    else
		fprintf(coerce, "%s", symbol(param_id_list[i]));
	}
	fprintf(coerce, ") %s(", z_id);
	for (i=0; i<ids_paramed; i++) {
	    if (i > 0)
		fputs(", ", coerce);
	    fprintf(coerce, "(%s) ", arg_type[i]);
	    fprintf(coerce, "%s(%s)",
		    sym_table[param_id_list[i]].var_formal?"&":"",
		    symbol(param_id_list[i]));
	}
	fprintf(coerce, ")\n");
    }
    std = orig_std;
    new_line ();
    my_output(z_id);
    my_output("(");
    for (i=0; i<ids_paramed; i++) {
        if (i > 0) my_output(",");
        my_output(symbol(param_id_list[i]));
    }
    my_output(")");
    indent_line();
    indent++;
    for (i=0; i<ids_paramed; i++) {
        my_output(arg_type[i]);
        my_output(symbol(param_id_list[i]));
        semicolon();
    }
    indent--;
}
