
/*  A Bison parser, made from BR_Parser.y
 by  GNU Bison version 1.25
  */

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

#define yyparse BR_yyparse
#define yylex BR_yylex
#define yyerror BR_yyerror
#define yylval BR_yylval
#define yychar BR_yychar
#define yydebug BR_yydebug
#define yynerrs BR_yynerrs
#define	T_ARRAY	258
#define	T_PREFIX	259
#define	T_ELLIPSIS	260
#define	T_OPERATOR	261
#define	T_STRUCT	262
#define	T_UNION	263
#define	T_CLASS	264
#define	T_ENUM	265
#define	T_PUBLIC	266
#define	T_PROTECTED	267
#define	T_PRIVATE	268
#define	T_IDENT	269
#define	T_TEMPLATE	270
#define	T_BASIC	271
#define	T_TEMPLATE_ARG	272
#define	T_FRAME	273
#define	T_CONST	274
#define	T_FRIEND	275
#define	T_LEXER_ERROR	276

#line 1 "BR_Parser.y"

/* ########################################################################

			      BR_Parser.y

   ########################################################################

   Copyright (c) : Dominique Leveque

   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 2, 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.

   ######################################################################## */


#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <stdio.h>
#include <unistd.h>
#include <setjmp.h>
#include <signal.h>

#include "proto_decl.h"

#include "BR_Global.h"
#include "BR_Lexer.h"
#include "BR_Parser.h"
#include "BR_Interface.h"


   /*-----------------------------------------------------------------------*/

#ifndef yyparse
#define yyparse  BR_yyparse
#define yyerror  BR_yyerror
#define yydebug  BR_yydebug
#define yynerrs  BR_yynerrs
#define yychar   BR_yychar
#endif


   /*-----------------------------------------------------------------------*/

#define YYDEBUG                 1

#define BR_YYERROR              YYFAIL


   /*-----------------------------------------------------------------------*/

FCT (int, yyerror, (char*) );


#if YYDEBUG != 0

#define YYPRINT(f, t, v)        BR_yyprint(f, t, v)
static
FCT (int, BR_yyprint, (FILE*, int, YYSTYPE) );

static
FCT (void, BR_dump_tree, (BR_Str*, BR_TokenPt) );

#endif


   /*-----------------------------------------------------------------------*/

static char* basic_value[] =
{
  /*   0  (signed)? int         */      "int ",
  /*   1  (signed)? char        */      "char ",
  /*   2  (signed)? short       */      "short ",
  /*   3  (signed)? long        */      "long ",
  /*   4  unsigned              */      "unsigned int ",
  /*   5  unsigned char         */      "unsigned char ",
  /*   6  unsigned short        */      "unsigned short ",
  /*   7  unsigned long         */      "unsigned long ",
  /*   8  const (signed)? int   */      "const int ",
  /*   9  const (signed)? char  */      "const char ",
  /*  10  const (signed)? short */      "const short ",
  /*  11  const (signed)? long  */      "const long ",
  /*  12  const unsigned        */      "const unsigned int ",
  /*  13  const unsigned char   */      "const unsigned char ",
  /*  14  const unsigned short  */      "const unsigned short ",
  /*  15  const unsigned long   */      "const unsigned long "
};

static int basic_length[] =
{
  /*   0  */   3,
  /*   1  */   4,                   
  /*   2  */   5,
  /*   3  */   4,
  /*   4  */   12,
  /*   5  */   13,
  /*   6  */   14,
  /*   7  */   13,
  /*   8  */   9,
  /*   9  */   10,
  /*  10  */   11,
  /*  11  */   10,
  /*  12  */   18,
  /*  13  */   19,
  /*  14  */   20,
  /*  15  */   19
};

#define CONVERT_BASIC(x)        \
   (x->_val     = basic_value[x->_bits],   \
    x->_val_len = basic_length[x->_bits],  \
    x)


   /*-----------------------------------------------------------------------*/

static BR_TokenPt xl1;
static BR_TokenPt xl2;
static BR_TokenPt xl3;
static BR_TokenPt xl4;
static BR_TokenPt xl5;

#define APPEND2(x1,x2)              ((xl1 = x1)->_last->_next = (xl2 = x2),  \
                                     xl1->_last               = xl2->_last,  \
                                     xl1)

#define APPEND3(x1,x2,x3)           ((xl1 = x1)->_last->_next = (xl2 = x2),  \
                                     xl2->_last->_next        = (xl3 = x3),  \
                                     xl1->_last               = xl3->_last,  \
                                     xl1)

#define APPEND4(x1,x2,x3,x4)        ((xl1 = x1)->_last->_next = (xl2 = x2),  \
                                     xl2->_last->_next        = (xl3 = x3),  \
                                     xl3->_last->_next        = (xl4 = x4),  \
                                     xl1->_last               = xl4->_last,  \
                                     xl1)

#define APPEND5(x1,x2,x3,x4,x5)     ((xl1 = x1)->_last->_next = (xl2 = x2),  \
                                     xl2->_last->_next        = (xl3 = x3),  \
                                     xl3->_last->_next        = (xl4 = x4),  \
                                     xl4->_last->_next        = (xl5 = x5),  \
                                     xl1->_last               = xl5->_last,  \
                                     xl1)


   /*-----------------------------------------------------------------------*/

#define STR_FCT_PT              "(*) ( "
#define STR_ANONYMOUS           "??? "
#define STR_PREFIX              ":: "
#define STR_CONST               "const "


#define ACCESS_BITS             (  BR_INFO_PRIVATE     \
				 | BR_INFO_PUBLIC      \
				 | BR_INFO_PROTECTED)

#define AGGREGATE_BITS          (  BR_INFO_CLASS       \
				 | BR_INFO_STRUCT      \
				 | BR_INFO_UNION       \
                                 | BR_INFO_ENUM)

#define PROC_DEF_BITS           (  BR_INFO_OPERATOR    \
                                 | BR_INFO_CONSTRUCTOR \
                                 | BR_INFO_DESTRUCTOR  \
                                 | BR_INFO_FRIEND)


   /*-----------------------------------------------------------------------*/

#define CONTROL_PARENT          (~(  ACCESS_BITS    | BR_INFO_VIRTUAL        \
                                   | BR_INFO_PARENT))

#define CONTROL_AGGREGATE       (~(  ACCESS_BITS    | AGGREGATE_BITS         \
                                   | BR_INFO_DEF    | BR_INFO_TEMPLATE       \
                                   | BR_INFO_FRIEND | BR_INFO_TYPEDEF))

#define CONTROL_TYPEDEF         (~(  ACCESS_BITS    | BR_INFO_TYPEDEF        \
                                   | BR_INFO_PROC   | BR_INFO_DATA           \
                                   | BR_INFO_STATIC | BR_INFO_EXTERN         \
                                   | BR_INFO_DEF    | BR_INFO_FRIEND))
                                 
#define CONTROL_PROC            (~(  ACCESS_BITS    | BR_INFO_PROC           \
                                   | BR_INFO_STATIC | BR_INFO_EXTERN         \
                                   | BR_INFO_INLINE | BR_INFO_TEMPLATE       \
                                   | BR_INFO_CONST  | BR_INFO_CONSTRUCTOR    \
                                   | BR_INFO_C      | BR_INFO_DESTRUCTOR     \
                                   | BR_INFO_FRIEND | BR_INFO_OPERATOR       \
                                   | BR_INFO_PURE   | BR_INFO_VIRTUAL        \
                                   | BR_INFO_DEF))

#define CONTROL_FRIEND_PROC     (~(  BR_INFO_FRIEND | BR_INFO_DEF            \
				   | BR_INFO_PROC   | BR_INFO_OPERATOR       \
                                   | BR_INFO_CONST))

#define CONTROL_DATA            (~(  ACCESS_BITS    | BR_INFO_DATA           \
                                   | BR_INFO_STATIC | BR_INFO_EXTERN         \
                                   | BR_INFO_DEF))


   /*-----------------------------------------------------------------------*/

#define TEST_BITS(val,bits)     ((val & (bits)) != 0)

#define CLEAR_BITS(val,bits)    (val &= ~(bits))

#define SET_BITS(val,bits)      (val |= bits)


   /*-----------------------------------------------------------------------*/

#define STACK_PREFIX(x)      \
  {                                                                      \
    if (global_prefix == BR_Null)                                        \
      global_prefix = x;                                                 \
    else                                                                 \
    {                                                                    \
      alloc_token   = ALLOC_TOKEN(T_PREFIX, STR_PREFIX);                 \
      last_token    = global_prefix->_last;                              \
      global_prefix = APPEND3(global_prefix, alloc_token, x);            \
      x->_last      = last_token;                                        \
    }                                                                    \
    global_prefix->_last->_line_num = prefix_stamp++;                    \
  }

#define UNSTACK_PREFIX()     \
  {                                                                      \
    if (global_prefix->_last == global_prefix)                           \
      global_prefix = BR_Null;                                           \
    else                                                                 \
    {                                                                    \
      global_prefix->_last        = global_prefix->_last->_last;         \
      global_prefix->_last->_next = BR_Null;                             \
    }                                                                    \
  }


   /*-----------------------------------------------------------------------*/

#define S_PRECED       10
#define A_PRECED       10
#define P_PRECED       10
#define F_PRECED       20
#define T_PRECED       20


#define SET_PRECED(x, preced)        (x->_line_num = preced)

#define GET_PRECED(x)                (x->_line_num)

#define TEST_PRECED(x, preced)   \
  if ((x->_code == '(') && (x->_line_num >= preced))              \
  {                                                               \
    (void) CLEAR_FIRST_TOK(x);                                    \
    (void) CLEAR_LAST_TOK(x);                                     \
  }


   /*-----------------------------------------------------------------------*/

static BR_TokenPt   default_token   = BR_Null;
static BR_TokenRec  tmp_token;

static BR_TokenPt   global_prefix   = BR_Null;
static BR_TokenPt   alloc_token     = BR_Null;
static BR_TokenPt   last_token      = BR_Null;

static BR_TokenPt   template_args   = BR_Null;
static BR_Boolean   template_flag   = BR_FALSE;

static BR_Str       prefix_buffer[1024];
static BR_Str       SU_buffer[4 * 1024];

static BR_Int       prefix_stamp    = 1;
static BR_Int       last_stamp      = 0;
static BR_Int       prefix_len      = 0;

BR_InfoHandler      BR_info_handler = BR_Null;


static jmp_buf      BR_env;

static void (*BR_sigill_handler)  ();
static void (*BR_sigbus_handler)  ();
static void (*BR_sigsegv_handler) ();


   /*-----------------------------------------------------------------------*/

#define IS_EMPTY(x)             (x == BR_Null)

#define SPACE(x)                ((x->_last->_val_len)++, x)

#define CLEAR_FIRST_TOK(x)      (x->_val_len = 0, x)
#define CLEAR_LAST_TOK(x)       (x->_last->_val_len = 0, x)

#define CORRECT_VAL(x, str)     (x->_val     = str,                          \
			         x->_val_len = sizeof(str) - 2,              \
			         x)

#define ALLOC_TOKEN(c, s)       (BR_lex_alloc_token(c, s, sizeof(s) - 2))

#define SET_ACCESS(bits)    (CLEAR_BITS(default_token->_bits, ACCESS_BITS),  \
			     SET_BITS(default_token->_bits, bits),           \
			     CLEAR_BITS(default_token->_val_len,ACCESS_BITS),\
			     SET_BITS(default_token->_val_len, bits))

#define CLEAR_TEMPLATE()        \
  if (template_args != BR_Null)                                              \
  {                                                                          \
    template_args = BR_Null;                                                 \
    default_token = BR_lex_unstack_frame();                                  \
  }                                                                          \
  template_flag = BR_FALSE;                                                  \
  BR_lex_empty_frame();


   /*-----------------------------------------------------------------------*/

static
FCT (void, BR_replace_template_args, (BR_TokenPt token) );

static
FCT (void, BR_format_SU, (BR_TokenPt SU_tree, BR_ULong default_info) );


   /*-----------------------------------------------------------------------*/
#ifndef YYSTYPE
#define YYSTYPE int
#endif
#ifndef YYDEBUG
#define YYDEBUG 1
#endif

#include <stdio.h>

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



#define	YYFINAL		283
#define	YYFLAG		-32768
#define	YYNTBASE	34

#define YYTRANSLATE(x) ((unsigned)(x) <= 276 ? yytranslate[x] : 76)

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,     4,     2,     6,
    31,     3,     2,    32,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,    29,    25,     2,
    28,    30,     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,    26,     2,    27,    33,     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,     5,     7,     8,
     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
    19,    20,    21,    22,    23,    24
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     1,     4,     8,    12,    17,    20,    24,    28,    33,
    37,    42,    45,    50,    56,    60,    65,    68,    71,    74,
    77,    80,    84,    88,    92,    93,    98,   101,   105,   107,
   110,   111,   113,   117,   120,   121,   126,   127,   132,   134,
   136,   138,   140,   142,   144,   147,   151,   153,   156,   159,
   161,   164,   167,   170,   172,   175,   178,   182,   186,   192,
   197,   200,   205,   207,   209,   211,   214,   217,   220,   223,
   226,   229,   231,   233,   236,   238,   240,   243,   246,   250,
   253,   256,   259,   262,   266,   269,   272,   276,   279,   282,
   285,   287,   292,   297,   302,   306,   309,   312,   317,   322,
   325,   328,   332,   335,   338,   342,   346,   351,   356,   359,
   362,   366,   369,   372,   376,   378,   381,   384,   386,   388,
   390,   394,   399,   400,   406,   409,   411,   412,   416,   418,
   420,   422,   425,   428,   431,   434,   438,   442,   447,   449,
   450,   451,   458,   459,   460,   467,   470,   473,   475,   478,
   481,   484,   487,   491,   494,   496,   500,   503,   507,   512,
   515,   518,   522,   525,   528,   532,   534,   536
};

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

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
   361,   363,   366,   369,   371,   374,   376,   379,   381,   384,
   389,   395,   397,   399,   401,   403,   411,   412,   413,   414,
   421,   423,   425,   427,   435,   445,   456,   461,   472,   477,
   488,   490,   492,   500,   502,   502,   504,   504,   512,   513,
   514,   515,   516,   517,   523,   528,   540,   542,   550,   552,
   560,   565,   570,   581,   583,   591,   593,   600,   604,   611,
   624,   626,   639,   641,   643,   650,   652,   654,   661,   663,
   665,   678,   686,   694,   702,   707,   711,   719,   727,   735,
   740,   744,   753,   762,   771,   777,   785,   796,   798,   805,
   812,   817,   819,   826,   833,   844,   846,   853,   855,   869,
   871,   873,   875,   877,   884,   890,   901,   907,   920,   922,
   924,   926,   928,   932,   940,   942,   949,   962,   964,   966,
   974,   979,   981,   986,   991,  1002,  1008,  1015,  1022,  1028,
  1034,  1040,  1046,  1052,  1064,  1069,  1074,  1079,  1090,  1091,
  1094,  1096,  1096,  1102,  1104,  1110,  1112,  1114,  1115,  1116,
  1117,  1118,  1124,  1126,  1133,  1135,  1143,  1151,  1162,  1173,
  1175,  1177,  1179,  1181,  1184,  1192,  1194,  1196
};
#endif


#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)

static const char * const yytname[] = {   "$","error","$undefined.","'*'","'&'",
"T_ARRAY","'('","T_PREFIX","T_ELLIPSIS","T_OPERATOR","T_STRUCT","T_UNION","T_CLASS",
"T_ENUM","T_PUBLIC","T_PROTECTED","T_PRIVATE","T_IDENT","T_TEMPLATE","T_BASIC",
"T_TEMPLATE_ARG","T_FRAME","T_CONST","T_FRIEND","T_LEXER_ERROR","';'","'{'",
"'}'","'='","':'","'>'","')'","','","'~'","SU_List","Decl_Def","Code_Def","Extern_Block",
"@1","Prefix","Qualified","Init","Code","@2","@3","C_Arg_Specifier","Template",
"Template_List","Bit_Specifier","Agg_Specifier","Basic","Full_Arg_List","Arg_List",
"Arg","ADeclarator","TDeclarator_Bit_List","TDeclarator_List","TDeclarator",
"Operator_Decl","Operator_Basic","Aggregate","@4","Aggregate_Head","@5","Aggregate_Name",
"Parent_List","ESU_List","@6","@7","@8","@9","Friend_Decl","Full_FDeclarator",
"FDeclarator_List","FDeclarator","Access", NULL
};
#endif

static const short yyr1[] = {     0,
    34,    34,    34,    34,    34,    34,    34,    34,    34,    34,
    34,    34,    34,    34,    34,    34,    35,    35,    35,    35,
    36,    36,    36,    36,    38,    37,    39,    39,    40,    40,
    41,    41,    41,    42,    43,    42,    44,    42,    45,    45,
    45,    45,    45,    45,    46,    46,    47,    47,    48,    48,
    49,    49,    49,    50,    50,    51,    51,    51,    51,    51,
    52,    52,    53,    53,    53,    53,    53,    53,    53,    53,
    53,    54,    54,    54,    54,    54,    54,    54,    54,    54,
    54,    54,    54,    54,    54,    54,    54,    55,    55,    55,
    55,    55,    55,    55,    55,    56,    56,    56,    56,    57,
    57,    57,    57,    57,    57,    57,    57,    57,    57,    57,
    57,    57,    57,    57,    58,    58,    58,    59,    59,    59,
    60,    60,    61,    60,    60,    62,    63,    62,    64,    64,
    64,    64,    64,    64,    65,    65,    65,    65,    66,    67,
    68,    66,    69,    70,    66,    71,    71,    71,    71,    71,
    71,    71,    72,    72,    73,    73,    74,    74,    74,    74,
    74,    74,    74,    74,    74,    75,    75,    75
};

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

static const short yydefact[] = {     1,
     0,     0,     0,     0,     0,     0,   130,   131,   129,     0,
    29,     0,    54,     2,    91,     0,     0,     6,    12,     0,
     0,    31,     0,     0,     0,    50,     0,    37,     0,     0,
   126,    15,     0,   100,   109,   101,   110,     0,     0,     0,
     0,     0,     0,     0,   118,   119,   120,     0,   115,    52,
    53,    51,    49,     0,    27,    47,    45,     0,     0,     4,
     1,     0,     0,    30,     0,   103,     0,    32,    89,    31,
    88,   104,    17,    37,     0,     0,     7,     0,     0,    37,
     0,    18,    37,    10,    31,    19,    37,    55,     3,     0,
   112,     0,     0,    90,    21,     0,     0,   113,     8,    20,
    31,   125,     0,     0,    16,   114,    52,    53,    51,    49,
   106,   116,   117,     0,   121,    48,    46,   105,     0,   102,
   111,     0,    28,     0,     0,    56,    65,    63,    64,     0,
    31,     0,    89,    22,    13,     0,     5,    11,     9,    23,
    96,     0,    97,    24,    95,    31,    31,    65,    34,     0,
    42,    43,    41,    40,    44,     0,    39,     1,     0,   128,
   122,    26,   108,   107,    58,    72,    73,    76,     0,     0,
    71,    75,    68,    76,    69,    75,    66,    70,    67,     0,
    57,     0,    61,    33,    14,    31,    31,    93,    92,    94,
     0,     0,     0,     0,   168,   167,   166,   135,     0,     0,
    77,    82,    78,    83,    65,     0,    74,    81,    80,    86,
    85,    60,     0,    31,    98,    99,    36,    38,   140,   124,
   143,   136,   137,     0,    76,    75,    87,    79,    84,    59,
    62,     0,     0,   138,     0,     0,     0,     0,     0,     0,
     0,     0,     0,   141,   148,     0,   155,   144,     0,   160,
   161,     0,     0,     0,     0,     0,   146,   157,   149,   150,
   147,   151,   152,     1,   154,     0,   163,     0,   164,     1,
   165,   158,   162,     0,    65,     0,   156,   153,     0,   159,
    75,     0,     0
};

static const short yydefgoto[] = {     1,
    17,    18,    19,    20,    21,   249,    94,    95,    96,    97,
   156,    23,    58,    24,    25,    26,    98,   130,   131,   173,
    27,    86,    28,    48,    49,    29,   103,    30,   104,    31,
   160,   194,   232,   264,   233,   270,   244,   245,   246,   247,
   199
};

static const short yypact[] = {-32768,
   415,    69,    39,    39,    39,   426,    21,    83,   122,    97,
   154,    35,-32768,-32768,-32768,   136,   153,-32768,-32768,   156,
    70,   131,    98,   212,   170,   161,     2,   566,   576,    56,
   159,-32768,   173,   166,   247,   166,   247,   166,   107,   185,
   197,   208,   211,   213,-32768,-32768,-32768,   238,   204,    15,
    24,    34,   240,   244,-32768,-32768,-32768,   137,   238,-32768,
-32768,    39,   426,   266,   262,-32768,   286,   258,-32768,   184,
-32768,-32768,   254,   566,   251,   263,-32768,   329,   580,    41,
   608,   254,   566,-32768,    78,   272,   566,-32768,-32768,   357,
-32768,   381,   280,-32768,-32768,   281,   691,-32768,-32768,   272,
   157,-32768,   292,   291,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,   309,-32768,-32768,-32768,-32768,   548,   166,
   247,   238,-32768,   238,   312,-32768,   243,   308,   308,    90,
   316,   318,-32768,-32768,-32768,   320,-32768,-32768,-32768,-32768,
-32768,    39,-32768,-32768,-32768,   214,   157,   308,-32768,   323,
-32768,-32768,-32768,-32768,-32768,   330,   161,-32768,   697,   327,
-32768,-32768,-32768,-32768,-32768,   308,   308,-32768,   618,    23,
   295,-32768,   310,-32768,   295,-32768,   310,   295,   310,   324,
-32768,   681,-32768,-32768,-32768,    78,   157,-32768,-32768,-32768,
   337,   343,   455,   592,-32768,-32768,-32768,-32768,   355,   697,
   295,   310,   295,   310,   336,   138,   308,-32768,-32768,-32768,
-32768,-32768,   345,   316,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,   355,-32768,-32768,-32768,   295,   310,-32768,
-32768,   671,   349,-32768,   348,   348,   348,   426,   188,   654,
   348,   661,   348,-32768,-32768,   100,   124,-32768,   238,   322,
   322,   146,   238,   348,   426,   642,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,   348,-32768,   358,-32768,-32768,
-32768,-32768,   322,   238,   308,   486,   322,-32768,   517,-32768,
-32768,   384,-32768
};

static const short yypgoto[] = {   -53,
   364,   372,-32768,-32768,    27,    -1,   236,    59,-32768,-32768,
-32768,-32768,-32768,     1,    53,   299,   202,-32768,   215,  -115,
    -7,   -23,     7,   -54,-32768,   -22,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,   475,-32768,  -217,
  -119
};


#define	YYLAST		718


static const short yytable[] = {    22,
    81,    34,    36,    38,    45,   100,    46,   119,   122,    35,
    37,    39,   177,   179,    73,  -133,    82,   250,   251,   252,
    70,    78,    70,    85,  -134,   207,    89,    85,    74,    80,
    83,    87,    44,    90,  -132,   101,   273,    50,   252,    64,
  -133,     3,     4,  -133,     5,    91,    92,     6,   277,  -134,
   202,   204,  -134,   206,    56,    11,   102,   100,    47,  -132,
   120,    45,  -132,    46,    57,   127,    93,   128,   121,   -35,
    73,    16,    62,    39,   221,    79,    70,    85,    63,    85,
   224,  -123,    66,    92,    74,    87,    64,   101,   146,    44,
   148,   229,   128,    32,    33,   155,   147,   180,    75,    51,
     3,     4,    65,     5,   193,    68,     6,     7,     8,     9,
    10,    91,    92,    53,    11,    47,    13,    22,    44,   129,
   181,   182,    54,    44,   265,   171,   175,   178,   267,    92,
    16,   266,   134,     3,     4,    66,    67,   106,    52,     6,
   186,   140,   210,    92,   129,   144,   171,    11,   187,   268,
   267,    92,    59,   170,   170,   170,   116,   198,    68,    69,
    55,    91,    92,    16,   201,   203,   117,   205,   227,   128,
    66,    92,     3,     4,   170,     5,   271,    60,     6,    88,
   148,    61,   128,   253,    68,    44,    11,  -127,    66,    92,
   254,    22,   170,   170,    84,   170,   255,   222,   223,   105,
   274,   107,    16,   171,    64,   228,   112,   113,    44,   243,
   276,    68,   133,   108,     3,     4,   279,     5,    66,    92,
     6,   129,   234,    72,   109,    44,    44,   110,    11,    64,
   240,   170,   241,   170,   129,    72,    45,    72,    46,    72,
    15,    68,   188,    92,    16,   166,   167,   168,   169,   111,
    44,    91,    92,    45,   275,    46,   128,    71,   239,    11,
   118,   239,   239,   239,    44,   114,   239,   239,   239,   239,
   115,    72,   123,   171,    22,   135,   136,    22,   124,    72,
   239,    44,   239,   132,   242,    90,    72,   137,     3,     4,
    47,     5,   239,   125,     6,    40,    41,    42,    43,   208,
    92,   170,    11,   142,    13,    71,   149,    47,   129,   150,
   166,   167,   174,   169,   210,    92,   126,   158,    16,   159,
   141,    72,   143,   163,    11,   164,   267,    92,   172,   176,
   176,     3,     4,    66,    67,   161,   143,     6,   166,   167,
   225,   169,   165,    68,   184,    11,   185,    72,   191,   176,
   235,   236,    11,   237,   212,   192,   238,    15,   200,     3,
     4,    16,     5,   217,    11,     6,   183,   176,   176,   218,
   176,    11,   209,    11,   211,   230,   209,   248,   211,   209,
   211,   189,   190,   283,   278,   145,    76,    72,   125,    16,
    40,    41,    42,    43,    77,   157,   214,    11,     0,    13,
     0,     0,   209,   211,   209,   211,   226,   211,   176,     0,
     0,   126,     0,     0,   282,     2,     0,     3,     4,     0,
     5,   215,   216,     6,     7,     8,     9,    10,     0,   209,
   211,    11,    12,    13,     0,    40,    41,    42,    43,    14,
   -25,   258,    11,    15,    13,     0,     0,    16,   269,   231,
   258,   269,   269,   269,   272,     2,     0,     3,     4,     0,
     5,     0,     0,     6,     7,     8,     9,    10,  -139,  -139,
  -139,    11,    12,    13,   269,   280,   281,  -139,   269,    14,
   -25,  -139,     0,    15,     0,     0,     2,    16,     3,     4,
     0,     5,     0,     0,     6,     7,     8,     9,    10,  -142,
  -142,  -142,    11,    12,    13,     0,     0,     0,  -142,     0,
    14,   -25,  -142,     0,    15,     0,     0,     2,    16,     3,
     4,     0,     5,     0,     0,     6,     7,     8,     9,    10,
  -145,  -145,  -145,    11,    12,    13,     0,     0,     0,  -145,
     0,    14,   -25,  -145,     0,    15,     0,     0,     2,    16,
     3,     4,     0,     5,     0,     0,     6,     7,     8,     9,
    10,     0,     0,     0,    11,    12,    13,     0,     0,     0,
    91,    92,    14,   -25,   162,     0,    15,     0,     3,     4,
    16,     5,     3,     4,     6,     5,     0,     0,     6,     0,
   -31,    93,    11,    68,   -35,     0,    11,   -31,     0,     0,
    99,     0,     0,     0,   138,   195,   196,   197,    16,     0,
     3,     4,    16,     5,   219,     0,     6,     0,   220,     0,
   166,   167,   174,   169,    11,   125,     0,    40,    41,    42,
    43,     0,   139,     0,    11,     0,    13,     0,     0,     0,
    16,     0,     0,     0,   235,   236,     0,   237,   126,   125,
   238,    40,    41,    42,    43,     0,   235,   236,    11,   256,
    13,     0,   238,   235,   236,     0,   237,     0,     0,   238,
    11,     0,   126,   235,   236,     0,   237,    11,   257,   238,
     7,     8,     9,    10,     0,   261,     0,    11,   213,    13,
    40,    41,    42,    43,     0,     0,     0,    11,     0,    13,
   151,   152,   153,   154,     0,     0,     0,    11,     0,    13,
   195,   196,   197,    11,   259,   260,   262,   263
};

static const short yycheck[] = {     1,
    23,     3,     4,     5,     6,    29,     6,    61,    63,     3,
     4,     5,   128,   129,    22,     1,    24,   235,   236,   237,
    22,    23,    24,    25,     1,     3,    25,    29,    22,    23,
    24,    25,     6,    32,     1,    29,   254,    17,   256,    17,
    26,     3,     4,    29,     6,     5,     6,     9,   266,    26,
   166,   167,    29,   169,    20,    17,     1,    81,     6,    26,
    62,    63,    29,    63,    30,    67,    26,    67,    62,    29,
    78,    33,     3,    67,   194,    23,    78,    79,     9,    81,
   200,    26,     5,     6,    78,    79,    17,    81,    90,    63,
    92,   207,    92,    25,    26,    97,    90,     8,     1,    17,
     3,     4,    33,     6,   158,    28,     9,    10,    11,    12,
    13,     5,     6,    17,    17,    63,    19,   119,    92,    67,
    31,    32,    26,    97,    25,   127,   128,   129,     5,     6,
    33,    32,    74,     3,     4,     5,     6,    31,    17,     9,
   142,    83,     5,     6,    92,    87,   148,    17,   142,    26,
     5,     6,    17,   127,   128,   129,    20,   159,    28,    29,
     7,     5,     6,    33,   166,   167,    30,   169,    31,   169,
     5,     6,     3,     4,   148,     6,    31,    25,     9,    19,
   182,    26,   182,   238,    28,   159,    17,    29,     5,     6,
     3,   193,   166,   167,    25,   169,     9,   199,   200,    27,
   255,    17,    33,   205,    17,   207,     3,     4,   182,   232,
   264,    28,    29,    17,     3,     4,   270,     6,     5,     6,
     9,   169,   224,    22,    17,   199,   200,    17,    17,    17,
   232,   205,   232,   207,   182,    34,   238,    36,   238,    38,
    29,    28,    29,     6,    33,     3,     4,     5,     6,    48,
   224,     5,     6,   255,   256,   255,   256,    22,   232,    17,
    59,   235,   236,   237,   238,    26,   240,   241,   242,   243,
    27,    70,     7,   275,   276,    25,    26,   279,    17,    78,
   254,   255,   256,    26,   232,    32,    85,    25,     3,     4,
   238,     6,   266,     8,     9,    10,    11,    12,    13,     5,
     6,   275,    17,    32,    19,    70,    27,   255,   256,    29,
     3,     4,     5,     6,     5,     6,    31,    26,    33,    29,
    85,   120,    87,   122,    17,   124,     5,     6,   127,   128,
   129,     3,     4,     5,     6,    27,   101,     9,     3,     4,
     5,     6,    31,    28,    27,    17,    27,   146,    26,   148,
     3,     4,    17,     6,    31,    26,     9,    29,    32,     3,
     4,    33,     6,    27,    17,     9,   131,   166,   167,    27,
   169,    17,   171,    17,   173,    31,   175,    29,   177,   178,
   179,   146,   147,     0,    27,    29,    23,   186,     8,    33,
    10,    11,    12,    13,    23,    97,   182,    17,    -1,    19,
    -1,    -1,   201,   202,   203,   204,   205,   206,   207,    -1,
    -1,    31,    -1,    -1,     0,     1,    -1,     3,     4,    -1,
     6,   186,   187,     9,    10,    11,    12,    13,    -1,   228,
   229,    17,    18,    19,    -1,    10,    11,    12,    13,    25,
    26,   240,    17,    29,    19,    -1,    -1,    33,   247,   214,
   249,   250,   251,   252,   253,     1,    -1,     3,     4,    -1,
     6,    -1,    -1,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,   273,   274,   275,    23,   277,    25,
    26,    27,    -1,    29,    -1,    -1,     1,    33,     3,     4,
    -1,     6,    -1,    -1,     9,    10,    11,    12,    13,    14,
    15,    16,    17,    18,    19,    -1,    -1,    -1,    23,    -1,
    25,    26,    27,    -1,    29,    -1,    -1,     1,    33,     3,
     4,    -1,     6,    -1,    -1,     9,    10,    11,    12,    13,
    14,    15,    16,    17,    18,    19,    -1,    -1,    -1,    23,
    -1,    25,    26,    27,    -1,    29,    -1,    -1,     1,    33,
     3,     4,    -1,     6,    -1,    -1,     9,    10,    11,    12,
    13,    -1,    -1,    -1,    17,    18,    19,    -1,    -1,    -1,
     5,     6,    25,    26,    27,    -1,    29,    -1,     3,     4,
    33,     6,     3,     4,     9,     6,    -1,    -1,     9,    -1,
    25,    26,    17,    28,    29,    -1,    17,    32,    -1,    -1,
    25,    -1,    -1,    -1,    25,    14,    15,    16,    33,    -1,
     3,     4,    33,     6,    23,    -1,     9,    -1,    27,    -1,
     3,     4,     5,     6,    17,     8,    -1,    10,    11,    12,
    13,    -1,    25,    -1,    17,    -1,    19,    -1,    -1,    -1,
    33,    -1,    -1,    -1,     3,     4,    -1,     6,    31,     8,
     9,    10,    11,    12,    13,    -1,     3,     4,    17,     6,
    19,    -1,     9,     3,     4,    -1,     6,    -1,    -1,     9,
    17,    -1,    31,     3,     4,    -1,     6,    17,    25,     9,
    10,    11,    12,    13,    -1,    25,    -1,    17,     8,    19,
    10,    11,    12,    13,    -1,    -1,    -1,    17,    -1,    19,
    10,    11,    12,    13,    -1,    -1,    -1,    17,    -1,    19,
    14,    15,    16,    17,   240,   241,   242,   243
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/users/outils3/FREE/GNU/Solaris/share/bison.simple"

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.

   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 2, 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.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

#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
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#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_memcpy(TO,FROM,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_memcpy (to, from, count)
     char *to;
     char *from;
     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_memcpy (char *to, char *from, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

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

#endif
#endif

#line 196 "/users/outils3/FREE/GNU/Solaris/share/bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */

int
yyparse(YYPARSE_PARAM_ARG)
     YYPARSE_PARAM_DECL
{
  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_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
      __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
      __yy_memcpy ((char *)yyls, (char *)yyls1, 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 362 "BR_Parser.y"
{ BR_lex_save_state(); ;
    break;}
case 2:
#line 364 "BR_Parser.y"
{ BR_lex_empty_frame(); ;
    break;}
case 3:
#line 367 "BR_Parser.y"
{ BR_lex_empty_frame(); ;
    break;}
case 4:
#line 370 "BR_Parser.y"
{ BR_lex_empty_frame(); ;
    break;}
case 5:
#line 372 "BR_Parser.y"
{ CLEAR_TEMPLATE(); ;
    break;}
case 6:
#line 375 "BR_Parser.y"
{  BR_lex_empty_frame(); ;
    break;}
case 7:
#line 377 "BR_Parser.y"
{ CLEAR_TEMPLATE(); ;
    break;}
case 8:
#line 380 "BR_Parser.y"
{ BR_lex_empty_frame(); ;
    break;}
case 9:
#line 382 "BR_Parser.y"
{ CLEAR_TEMPLATE(); ;
    break;}
case 10:
#line 385 "BR_Parser.y"
{
          BR_format_SU(yyvsp[-1], (default_token->_bits | yyvsp[-1]->_bits));
          BR_lex_empty_frame();
        ;
    break;}
case 11:
#line 390 "BR_Parser.y"
{
          BR_format_SU(yyvsp[-1], (default_token->_bits | yyvsp[-1]->_bits));
          CLEAR_TEMPLATE();
        ;
    break;}
case 13:
#line 398 "BR_Parser.y"
{ CLEAR_TEMPLATE();     BR_lex_synchronize(); ;
    break;}
case 14:
#line 400 "BR_Parser.y"
{ CLEAR_TEMPLATE();     BR_lex_synchronize(); ;
    break;}
case 15:
#line 402 "BR_Parser.y"
{ BR_lex_empty_frame(); BR_lex_synchronize(); ;
    break;}
case 16:
#line 404 "BR_Parser.y"
{ BR_lex_empty_frame(); BR_lex_synchronize(); ;
    break;}
case 21:
#line 422 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], (default_token->_bits | yyvsp[0]->_bits)); ;
    break;}
case 22:
#line 424 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], (default_token->_bits | yyvsp[0]->_bits)); ;
    break;}
case 23:
#line 426 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], (default_token->_bits | yyvsp[0]->_bits)); ;
    break;}
case 24:
#line 428 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], (default_token->_bits | yyvsp[0]->_bits)); ;
    break;}
case 25:
#line 436 "BR_Parser.y"
{
          if (TEST_BITS(default_token->_bits, BR_INFO_EXTERN))
          {
	    default_token = BR_lex_stack_frame(BR_INFO_EXTERN);
	    BR_lex_jump_bracket();
	  }
          else
            BR_YYERROR;
        ;
    break;}
case 26:
#line 446 "BR_Parser.y"
{
          default_token = BR_lex_unstack_frame();
          CLEAR_BITS(default_token->_bits, BR_INFO_EXTERN);
        ;
    break;}
case 27:
#line 457 "BR_Parser.y"
{
          yyvsp[-1]->_line_num = prefix_stamp++;
	  yyval = APPEND2(yyvsp[-1], yyvsp[0]);
        ;
    break;}
case 28:
#line 462 "BR_Parser.y"
{
          yyvsp[-1]->_line_num = yyvsp[-2]->_line_num;
          yyval = APPEND3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
        ;
    break;}
case 29:
#line 473 "BR_Parser.y"
{
          yyvsp[0]->_prefix = BR_Null;
          yyval = yyvsp[0];
	;
    break;}
case 30:
#line 478 "BR_Parser.y"
{
          yyvsp[0]->_prefix = yyvsp[-1];
          yyval = yyvsp[0];
        ;
    break;}
case 31:
#line 489 "BR_Parser.y"
{ yyval = BR_Null; ;
    break;}
case 32:
#line 491 "BR_Parser.y"
{ yyval = &tmp_token; ;
    break;}
case 33:
#line 493 "BR_Parser.y"
{ yyval = &tmp_token; ;
    break;}
case 34:
#line 501 "BR_Parser.y"
{ yyval = &tmp_token; yyval->_bits = (BR_INFO_PROC | BR_INFO_DEF); ;
    break;}
case 35:
#line 502 "BR_Parser.y"
{ BR_lex_ignore_proc_tail(); ;
    break;}
case 36:
#line 503 "BR_Parser.y"
{ yyval = &tmp_token; yyval->_bits = (BR_INFO_PROC | BR_INFO_DEF); ;
    break;}
case 37:
#line 504 "BR_Parser.y"
{ BR_lex_ignore_proc_tail(); ;
    break;}
case 38:
#line 505 "BR_Parser.y"
{ yyval = &tmp_token; yyval->_bits = (BR_INFO_PROC | BR_INFO_DEF | BR_INFO_C); ;
    break;}
case 45:
#line 524 "BR_Parser.y"
{
          template_flag = BR_TRUE;
          template_args = BR_Null;
        ;
    break;}
case 46:
#line 529 "BR_Parser.y"
{ 
          template_flag = BR_TRUE;
          template_args = yyvsp[-1];
          default_token = BR_lex_stack_frame(BR_INFO_EMPTY);
        ;
    break;}
case 47:
#line 541 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 48:
#line 543 "BR_Parser.y"
{ yyval = APPEND2(yyvsp[-1], yyvsp[0]); ;
    break;}
case 49:
#line 551 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 50:
#line 553 "BR_Parser.y"
{ yyval = CONVERT_BASIC(yyvsp[0]); ;
    break;}
case 51:
#line 561 "BR_Parser.y"
{
          yyval = yyvsp[0];
          yyval->_bits = BR_INFO_CLASS;
        ;
    break;}
case 52:
#line 566 "BR_Parser.y"
{
          yyval = yyvsp[0];
          yyval->_bits = BR_INFO_STRUCT;
        ;
    break;}
case 53:
#line 571 "BR_Parser.y"
{
          yyval = yyvsp[0];
          yyval->_bits = BR_INFO_UNION;
        ;
    break;}
case 54:
#line 582 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 55:
#line 584 "BR_Parser.y"
{ yyval = yyvsp[-1]; SET_BITS(yyval->_bits, yyvsp[0]->_bits); ;
    break;}
case 56:
#line 592 "BR_Parser.y"
{ yyval = APPEND2(yyvsp[-1], yyvsp[0]); ;
    break;}
case 57:
#line 594 "BR_Parser.y"
{ 
          yyval = ((TEST_BITS(yyvsp[-2]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND4(yyvsp[-2], SPACE(alloc_token), yyvsp[-1], yyvsp[0]))
		  : APPEND3(yyvsp[-2], yyvsp[-1], yyvsp[0]));
        ;
    break;}
case 58:
#line 601 "BR_Parser.y"
{ 
          yyval = APPEND3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
        ;
    break;}
case 59:
#line 605 "BR_Parser.y"
{ 
          yyval = ((TEST_BITS(yyvsp[-4]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND5(yyvsp[-4], SPACE(alloc_token), SPACE(yyvsp[-3]), yyvsp[-1], yyvsp[0]))
		  : APPEND4(yyvsp[-4], SPACE(yyvsp[-3]), yyvsp[-1], yyvsp[0]));
        ;
    break;}
case 60:
#line 612 "BR_Parser.y"
{ 
          yyval = ((TEST_BITS(yyvsp[-3]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND5(yyvsp[-3], SPACE(alloc_token), SPACE(yyvsp[-2]), yyvsp[-1], yyvsp[0]))
		  : APPEND4(yyvsp[-3], SPACE(yyvsp[-2]), yyvsp[-1], yyvsp[0]));
        ;
    break;}
case 61:
#line 625 "BR_Parser.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 62:
#line 627 "BR_Parser.y"
{
          yyval = ((TEST_BITS(yyvsp[-2]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND4(yyvsp[-3], SPACE(yyvsp[-2]), SPACE(alloc_token), yyvsp[-1]))
		  : APPEND3(yyvsp[-3], SPACE(yyvsp[-2]), yyvsp[-1]));
        ;
    break;}
case 63:
#line 640 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 64:
#line 642 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 65:
#line 644 "BR_Parser.y"
{
          if (template_args != BR_Null)
            BR_replace_template_args(yyvsp[0]);
          yyval = yyvsp[0];
        ;
    break;}
case 66:
#line 651 "BR_Parser.y"
{ yyval = APPEND2(SPACE(yyvsp[-1]), yyvsp[0]); ;
    break;}
case 67:
#line 653 "BR_Parser.y"
{ yyval = APPEND2(SPACE(yyvsp[-1]), yyvsp[0]); ;
    break;}
case 68:
#line 655 "BR_Parser.y"
{
          if (template_args != BR_Null)
            BR_replace_template_args(yyvsp[-1]);
          yyval = APPEND2(SPACE(yyvsp[-1]), yyvsp[0]);
        ;
    break;}
case 69:
#line 662 "BR_Parser.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 70:
#line 664 "BR_Parser.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 71:
#line 666 "BR_Parser.y"
{
          if (template_args != BR_Null)
            BR_replace_template_args(yyvsp[-1]);
          yyval = yyvsp[-1];
        ;
    break;}
case 72:
#line 679 "BR_Parser.y"
{
          yyval = ((TEST_BITS(yyvsp[0]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND2(SPACE(yyvsp[0]), alloc_token))
		  : yyvsp[0]);
          SET_PRECED(yyval, S_PRECED);
        ;
    break;}
case 73:
#line 687 "BR_Parser.y"
{
          yyval = ((TEST_BITS(yyvsp[0]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND2(SPACE(yyvsp[0]), alloc_token))
		  : yyvsp[0]);
          SET_PRECED(yyval, A_PRECED);
        ;
    break;}
case 74:
#line 695 "BR_Parser.y"
{
          yyval = ((TEST_BITS(yyvsp[-1]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND3(yyvsp[-1], SPACE(yyvsp[0]), alloc_token))
		  : APPEND2(yyvsp[-1], yyvsp[0]));
          SET_PRECED(yyval, P_PRECED);
        ;
    break;}
case 75:
#line 703 "BR_Parser.y"
{
          yyval = CORRECT_VAL(yyvsp[0], STR_FCT_PT);
          SET_PRECED(yyval, F_PRECED);
        ;
    break;}
case 76:
#line 708 "BR_Parser.y"
{ yyval = yyvsp[0]; SET_PRECED(yyval, T_PRECED); ;
    break;}
case 77:
#line 712 "BR_Parser.y"
{
          yyval = ((TEST_BITS(yyvsp[-1]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND2(SPACE(yyvsp[-1]), alloc_token))
		  : yyvsp[-1]);
          SET_PRECED(yyval, S_PRECED);
        ;
    break;}
case 78:
#line 720 "BR_Parser.y"
{
          yyval = ((TEST_BITS(yyvsp[-1]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND2(SPACE(yyvsp[-1]), alloc_token))
		  : yyvsp[-1]);
          SET_PRECED(yyval, A_PRECED);
        ;
    break;}
case 79:
#line 728 "BR_Parser.y"
{
          yyval = ((TEST_BITS(yyvsp[-2]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND3(yyvsp[-2], SPACE(yyvsp[-1]), alloc_token))
		  : APPEND2(yyvsp[-2], yyvsp[-1]));
          SET_PRECED(yyval, P_PRECED);
        ;
    break;}
case 80:
#line 736 "BR_Parser.y"
{
          yyval = CORRECT_VAL(yyvsp[0], STR_FCT_PT);
          SET_PRECED(yyval, F_PRECED);
        ;
    break;}
case 81:
#line 741 "BR_Parser.y"
{ yyval = yyvsp[0]; SET_PRECED(yyval, T_PRECED); ;
    break;}
case 82:
#line 745 "BR_Parser.y"
{
          TEST_PRECED(yyvsp[0], S_PRECED);
          yyval = ((TEST_BITS(yyvsp[-1]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND3(SPACE(yyvsp[-1]), SPACE(alloc_token), yyvsp[0]))
		  : APPEND2(yyvsp[-1], yyvsp[0]));
          SET_PRECED(yyval, S_PRECED);
        ;
    break;}
case 83:
#line 754 "BR_Parser.y"
{
          TEST_PRECED(yyvsp[0], A_PRECED);
          yyval = ((TEST_BITS(yyvsp[-1]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND3(SPACE(yyvsp[-1]), SPACE(alloc_token), yyvsp[0]))
		  : APPEND2(yyvsp[-1], yyvsp[0]));
          SET_PRECED(yyval, A_PRECED);
        ;
    break;}
case 84:
#line 763 "BR_Parser.y"
{
          TEST_PRECED(yyvsp[0], P_PRECED);
          yyval = ((TEST_BITS(yyvsp[-2]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND4(yyvsp[-2], SPACE(yyvsp[-1]), SPACE(alloc_token), yyvsp[0]))
		  : APPEND3(yyvsp[-2], SPACE(yyvsp[-1]), yyvsp[0]));
          SET_PRECED(yyval, P_PRECED);
        ;
    break;}
case 85:
#line 772 "BR_Parser.y"
{
          TEST_PRECED(yyvsp[-1], F_PRECED);
          yyval = APPEND2(yyvsp[-1], yyvsp[0]);
          SET_PRECED(yyval, F_PRECED);
        ;
    break;}
case 86:
#line 778 "BR_Parser.y"
{
          TEST_PRECED(yyvsp[-1], T_PRECED);
          yyval = APPEND2(yyvsp[-1], yyvsp[0]);
          SET_PRECED(yyval, T_PRECED);
        ;
    break;}
case 87:
#line 786 "BR_Parser.y"
{
          yyval = APPEND3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
          SET_PRECED(yyval, GET_PRECED(yyvsp[-1]));
        ;
    break;}
case 88:
#line 797 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], default_token->_bits | BR_INFO_DATA); ;
    break;}
case 89:
#line 799 "BR_Parser.y"
{
          if (global_prefix != BR_Null)         
            BR_format_SU(yyvsp[-1], default_token->_bits | BR_INFO_DATA);
          else
            BR_YYERROR;
        ;
    break;}
case 90:
#line 806 "BR_Parser.y"
{
          if ((yyvsp[0] != BR_Null) && ((yyvsp[-1]->_bits & BR_INFO_PROC) != 0))
            BR_format_SU(yyvsp[-1], (default_token->_bits | BR_INFO_PURE));
          else
            BR_format_SU(yyvsp[-1], default_token->_bits);
        ;
    break;}
case 91:
#line 813 "BR_Parser.y"
{
          if (global_prefix == BR_Null)
            BR_YYERROR;
        ;
    break;}
case 92:
#line 818 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], default_token->_bits | BR_INFO_DATA); ;
    break;}
case 93:
#line 820 "BR_Parser.y"
{
          if (global_prefix != BR_Null)         
            BR_format_SU(yyvsp[-1], default_token->_bits | BR_INFO_DATA);
          else
            BR_YYERROR;
        ;
    break;}
case 94:
#line 827 "BR_Parser.y"
{
          if ((yyvsp[0] != BR_Null) && ((yyvsp[-1]->_bits & BR_INFO_PROC) != 0))
            BR_format_SU(yyvsp[-1], (default_token->_bits | BR_INFO_PURE));
          else
            BR_format_SU(yyvsp[-1], default_token->_bits);
        ;
    break;}
case 95:
#line 834 "BR_Parser.y"
{
          if (global_prefix == BR_Null)
            BR_YYERROR;
        ;
    break;}
case 96:
#line 845 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], default_token->_bits | BR_INFO_DATA); ;
    break;}
case 97:
#line 847 "BR_Parser.y"
{
          if ((yyvsp[0] != BR_Null) && ((yyvsp[-1]->_bits & BR_INFO_PROC) != 0))
            BR_format_SU(yyvsp[-1], (default_token->_bits | BR_INFO_PURE));
          else
            BR_format_SU(yyvsp[-1], default_token->_bits);
        ;
    break;}
case 98:
#line 854 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], default_token->_bits | BR_INFO_DATA); ;
    break;}
case 99:
#line 856 "BR_Parser.y"
{
          if ((yyvsp[0] != BR_Null) && ((yyvsp[-1]->_bits & BR_INFO_PROC) != 0))
            BR_format_SU(yyvsp[-1], (default_token->_bits | BR_INFO_PURE));
          else
            BR_format_SU(yyvsp[-1], default_token->_bits);
        ;
    break;}
case 100:
#line 870 "BR_Parser.y"
{ yyval = yyvsp[0]; yyval->_bits = BR_INFO_DATA; ;
    break;}
case 101:
#line 872 "BR_Parser.y"
{ yyval = yyvsp[0]; yyval->_bits = BR_INFO_DATA; ;
    break;}
case 102:
#line 874 "BR_Parser.y"
{ yyval = yyvsp[0]; yyval->_bits = BR_INFO_DATA; ;
    break;}
case 103:
#line 876 "BR_Parser.y"
{ yyval = yyvsp[-1]; yyval->_bits = BR_INFO_DATA; ;
    break;}
case 104:
#line 878 "BR_Parser.y"
{
          yyval = APPEND2(yyvsp[-1], yyvsp[0]);
          SET_BITS(yyval->_bits, BR_INFO_PROC);
          if (TEST_BITS(yyvsp[0]->_last->_bits, BR_INFO_CONST))
            SET_BITS(yyval->_bits, BR_INFO_CONST);
        ;
    break;}
case 105:
#line 885 "BR_Parser.y"
{
          yyvsp[-2]->_prefix = BR_Null;
          yyval = APPEND3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
          SET_BITS(yyval->_bits, (BR_INFO_PROC | BR_INFO_DESTRUCTOR));          
        ;
    break;}
case 106:
#line 891 "BR_Parser.y"
{
          yyvsp[-2]->_prefix = BR_Null;
          yyval = ((TEST_BITS(yyvsp[-2]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND4(SPACE(yyvsp[-2]), SPACE(alloc_token), yyvsp[-1], yyvsp[0]))
		  : APPEND3(SPACE(yyvsp[-2]), yyvsp[-1], yyvsp[0]));
          SET_BITS(yyval->_bits, (BR_INFO_PROC | BR_INFO_OPERATOR));
          if (TEST_BITS(yyvsp[0]->_last->_bits, BR_INFO_CONST))
            SET_BITS(yyval->_bits, BR_INFO_CONST);
        ;
    break;}
case 107:
#line 902 "BR_Parser.y"
{
          yyvsp[-2]->_prefix = yyvsp[-3];
          yyval = APPEND3(yyvsp[-2], yyvsp[-1], yyvsp[0]);
          SET_BITS(yyval->_bits, (BR_INFO_PROC | BR_INFO_DESTRUCTOR));          
        ;
    break;}
case 108:
#line 908 "BR_Parser.y"
{
          yyvsp[-2]->_prefix = yyvsp[-3];
          yyval = ((TEST_BITS(yyvsp[-3]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND4(SPACE(yyvsp[-2]), SPACE(alloc_token), yyvsp[-1], yyvsp[0]))
		  : APPEND3(SPACE(yyvsp[-2]), yyvsp[-1], yyvsp[0]));
          SET_BITS(yyval->_bits, (BR_INFO_PROC | BR_INFO_OPERATOR));
          if (TEST_BITS(yyvsp[0]->_last->_bits, BR_INFO_CONST))
            SET_BITS(yyval->_bits, BR_INFO_CONST);
        ;
    break;}
case 109:
#line 921 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 110:
#line 923 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 111:
#line 925 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 112:
#line 927 "BR_Parser.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 113:
#line 929 "BR_Parser.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 114:
#line 933 "BR_Parser.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 115:
#line 941 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 116:
#line 943 "BR_Parser.y"
{
          yyval = ((TEST_BITS(yyvsp[0]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND3(yyvsp[-1], SPACE(yyvsp[0]), alloc_token))
		  : APPEND2(yyvsp[-1], yyvsp[0]));
        ;
    break;}
case 117:
#line 950 "BR_Parser.y"
{
          yyval = ((TEST_BITS(yyvsp[0]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND3(yyvsp[-1], SPACE(yyvsp[0]), alloc_token))
		  : APPEND2(yyvsp[-1], yyvsp[0]));
	;
    break;}
case 118:
#line 963 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 119:
#line 965 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 120:
#line 967 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 121:
#line 975 "BR_Parser.y"
{
          yyval = ALLOC_TOKEN(T_IDENT, STR_ANONYMOUS);
          BR_format_SU(yyval, BR_INFO_DEF | BR_INFO_ENUM | default_token->_bits);
	;
    break;}
case 122:
#line 980 "BR_Parser.y"
{ BR_format_SU(yyvsp[-2], BR_INFO_DEF | BR_INFO_ENUM | default_token->_bits); ;
    break;}
case 123:
#line 982 "BR_Parser.y"
{
          SET_ACCESS(yyvsp[0]->_bits);
          BR_lex_jump_bracket();
        ;
    break;}
case 124:
#line 987 "BR_Parser.y"
{
          UNSTACK_PREFIX();
          default_token = BR_lex_unstack_frame();
        ;
    break;}
case 125:
#line 992 "BR_Parser.y"
{
          UNSTACK_PREFIX();
          default_token = BR_lex_unstack_frame();
        ;
    break;}
case 126:
#line 1003 "BR_Parser.y"
{
          yyval = yyvsp[0];
          STACK_PREFIX(yyvsp[0]);
          default_token = BR_lex_stack_frame(BR_INFO_EMPTY);
        ;
    break;}
case 127:
#line 1009 "BR_Parser.y"
{
          STACK_PREFIX(yyvsp[0]);
          default_token = BR_lex_stack_frame(BR_INFO_EMPTY);
          BR_lex_jump_colon();
        ;
    break;}
case 128:
#line 1015 "BR_Parser.y"
{ yyval = yyvsp[-2]; ;
    break;}
case 129:
#line 1023 "BR_Parser.y"
{
          yyval = ALLOC_TOKEN(T_IDENT, STR_ANONYMOUS);
          BR_format_SU(yyval, BR_INFO_DEF | BR_INFO_CLASS | default_token->_bits);
          yyval->_bits = BR_INFO_PRIVATE;
        ;
    break;}
case 130:
#line 1029 "BR_Parser.y"
{
          yyval = ALLOC_TOKEN(T_IDENT, STR_ANONYMOUS);
          BR_format_SU(yyval, BR_INFO_DEF | BR_INFO_STRUCT | default_token->_bits);
          yyval->_bits = BR_INFO_PUBLIC;
        ;
    break;}
case 131:
#line 1035 "BR_Parser.y"
{
          yyval = ALLOC_TOKEN(T_IDENT, STR_ANONYMOUS);
          BR_format_SU(yyval, BR_INFO_DEF | BR_INFO_UNION | default_token->_bits);
          yyval->_bits = BR_INFO_PUBLIC;
        ;
    break;}
case 132:
#line 1041 "BR_Parser.y"
{
          yyval = yyvsp[0];
          BR_format_SU(yyval, BR_INFO_DEF | BR_INFO_CLASS | default_token->_bits);
          yyval->_bits = BR_INFO_PRIVATE;
        ;
    break;}
case 133:
#line 1047 "BR_Parser.y"
{
          yyval = yyvsp[0];
          BR_format_SU(yyval, BR_INFO_DEF | BR_INFO_STRUCT | default_token->_bits);
          yyval->_bits = BR_INFO_PUBLIC;
        ;
    break;}
case 134:
#line 1053 "BR_Parser.y"
{
          yyval = yyvsp[0];
          BR_format_SU(yyval, BR_INFO_DEF | BR_INFO_UNION | default_token->_bits);
          yyval->_bits = BR_INFO_PUBLIC;
        ;
    break;}
case 135:
#line 1065 "BR_Parser.y"
{
          BR_format_SU(yyvsp[0], (BR_INFO_PARENT|BR_INFO_PRIVATE|default_token->_bits));
          BR_lex_empty_frame();
        ;
    break;}
case 136:
#line 1070 "BR_Parser.y"
{
          BR_format_SU(yyvsp[0], (BR_INFO_PARENT|yyvsp[-1]->_bits|default_token->_bits));
          BR_lex_empty_frame();
        ;
    break;}
case 137:
#line 1075 "BR_Parser.y"
{
          BR_format_SU(yyvsp[0], (BR_INFO_PARENT|BR_INFO_PRIVATE|default_token->_bits));
          BR_lex_empty_frame();
        ;
    break;}
case 138:
#line 1080 "BR_Parser.y"
{
          BR_format_SU(yyvsp[0], (BR_INFO_PARENT|yyvsp[-1]->_bits|default_token->_bits));
          BR_lex_empty_frame();
        ;
    break;}
case 140:
#line 1092 "BR_Parser.y"
{ default_token->_bits |= BR_INFO_FRIEND; ;
    break;}
case 141:
#line 1094 "BR_Parser.y"
{ BR_lex_empty_frame(); ;
    break;}
case 143:
#line 1097 "BR_Parser.y"
{
          SET_ACCESS(yyvsp[0]->_bits);
          BR_lex_jump_colon();
        ;
    break;}
case 144:
#line 1102 "BR_Parser.y"
{ BR_lex_empty_frame(); ;
    break;}
case 146:
#line 1111 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], (default_token->_bits | BR_INFO_TYPEDEF)); ;
    break;}
case 147:
#line 1113 "BR_Parser.y"
{ BR_format_SU(yyvsp[-1], (yyvsp[-1]->_bits | default_token->_bits)); ;
    break;}
case 153:
#line 1125 "BR_Parser.y"
{ BR_format_SU(yyvsp[-2], (yyvsp[-2]->_bits | default_token->_bits | BR_INFO_DEF)); ;
    break;}
case 155:
#line 1134 "BR_Parser.y"
{ BR_format_SU(yyvsp[0], (yyvsp[0]->_bits | default_token->_bits)); ;
    break;}
case 156:
#line 1136 "BR_Parser.y"
{ BR_format_SU(yyvsp[0], (yyvsp[0]->_bits | default_token->_bits)); ;
    break;}
case 157:
#line 1144 "BR_Parser.y"
{
          yyval = APPEND2(yyvsp[-1], yyvsp[0]);
          if (TEST_BITS(yyvsp[0]->_last->_bits, BR_INFO_CONST))
            SET_BITS(yyval->_bits, (BR_INFO_PROC | BR_INFO_CONST));
          else
            SET_BITS(yyval->_bits, BR_INFO_PROC);
        ;
    break;}
case 158:
#line 1152 "BR_Parser.y"
{
          yyvsp[-2]->_prefix = BR_Null;
          yyval = ((TEST_BITS(yyvsp[-2]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND4(SPACE(yyvsp[-2]), SPACE(alloc_token), yyvsp[-1], yyvsp[0]))
		  : APPEND3(SPACE(yyvsp[-2]), yyvsp[-1], yyvsp[0]));
          SET_BITS(yyval->_bits, (BR_INFO_PROC | BR_INFO_OPERATOR));
          if (TEST_BITS(yyvsp[0]->_last->_bits, BR_INFO_CONST))
            SET_BITS(yyval->_bits, BR_INFO_CONST);
        ;
    break;}
case 159:
#line 1163 "BR_Parser.y"
{
          yyvsp[-2]->_prefix = yyvsp[-3];
          yyval = ((TEST_BITS(yyvsp[-3]->_bits, BR_INFO_CONST))
		  ? (alloc_token = ALLOC_TOKEN(T_CONST, STR_CONST),
		     APPEND4(SPACE(yyvsp[-2]), SPACE(alloc_token), yyvsp[-1], yyvsp[0]))
		  : APPEND3(SPACE(yyvsp[-2]), yyvsp[-1], yyvsp[0]));
          SET_BITS(yyval->_bits, (BR_INFO_PROC | BR_INFO_OPERATOR));
          if (TEST_BITS(yyvsp[0]->_last->_bits, BR_INFO_CONST))
            SET_BITS(yyval->_bits, BR_INFO_CONST);
        ;
    break;}
case 160:
#line 1174 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 161:
#line 1176 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 162:
#line 1178 "BR_Parser.y"
{ yyval = yyvsp[0]; ;
    break;}
case 163:
#line 1180 "BR_Parser.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 164:
#line 1182 "BR_Parser.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 165:
#line 1185 "BR_Parser.y"
{ yyval = yyvsp[-1]; ;
    break;}
case 166:
#line 1193 "BR_Parser.y"
{ yyval = yyvsp[0]; yyval->_bits = BR_INFO_PRIVATE; ;
    break;}
case 167:
#line 1195 "BR_Parser.y"
{ yyval = yyvsp[0]; yyval->_bits = BR_INFO_PROTECTED; ;
    break;}
case 168:
#line 1197 "BR_Parser.y"
{ yyval = yyvsp[0]; yyval->_bits = BR_INFO_PUBLIC; ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 498 "/users/outils3/FREE/GNU/Solaris/share/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 1201 "BR_Parser.y"



   /*-----------------------------------------------------------------------*/

#if YYDEBUG != 0

static char val[1024];

static int
BR_yyprint(f, t, v)
     FILE*   f;
     int     t;
     YYSTYPE v;
{
  if ((v != BR_Null) && (v->_val != BR_Null))
  {
    strncpy(val, yylval->_val, (BR_Int) yylval->_val_len + 1);      
    *(val + yylval->_val_len + 1) = '\0';
    fprintf(f, "   [(l=%05ld) \"%s\"]", yylval->_line_num, val);
  }
  return(0);
}

#endif


   /*-----------------------------------------------------------------------*/

int
yyerror(msg)
     char* msg;
{
  if (BR_info_handler != BR_Null)
    BR_info_handler("", "", BR_INFO_ERROR, BR_lex_get_line_num());
  else
    BR_WARNING(">>>>>  Hum, Hum !!! Strange construction at line : %d\n",
	       BR_lex_get_line_num());

  return(0);
}


   /*-----------------------------------------------------------------------*/

#define MAX_TEMPLATE_ARGS   20

static BR_Str* template_substitute[MAX_TEMPLATE_ARGS] =
{
  "$T00 ",
  "$T01 ",
  "$T02 ",
  "$T03 ",
  "$T04 ",
  "$T05 ",
  "$T06 ",
  "$T07 ",
  "$T08 ",
  "$T09 ",

  "$T10 ",
  "$T11 ",
  "$T12 ",
  "$T13 ",
  "$T14 ",
  "$T15 ",
  "$T16 ",
  "$T17 ",
  "$T18 ",
  "$T19 ",
};


static void
BR_replace_template_args(token)
     BR_TokenPt token;
{
  BR_TokenPt curr_arg;
  BR_Int     arg_num;

  curr_arg = template_args;
  arg_num  = 0;
  while (curr_arg != BR_Null)
  {
    if (   (curr_arg->_val_len == token->_val_len)
        && (strncmp(curr_arg->_val, token->_val, token->_val_len) == 0))
    {
      if (arg_num < MAX_TEMPLATE_ARGS)
	token->_val = template_substitute[arg_num];
      else
	token->_val = "$TXX ";
      token->_val_len = 4;
      curr_arg = BR_Null;
    }
    else
      curr_arg = curr_arg->_next;
    arg_num++;
  }
}


   /*-----------------------------------------------------------------------*/

#if YYDEBUG != 0

static BR_Str dump_buff[1024];

static void
BR_dump_tree(msg, tree)
     BR_Str*    msg;
     BR_TokenPt tree;
{
  BR_TokenPt curr_tok;

  fprintf(stderr, "%s\n", msg);
  curr_tok = tree;
  while (curr_tok != BR_Null)
  {
    strncpy(dump_buff, curr_tok->_val, curr_tok->_val_len);
    dump_buff[curr_tok->_val_len] = '\0';
    fprintf(stderr, "   (p=0x%08lx, n=0x%08lx, l=0x%08lx, b=0x%08lx) %s\n",
	            (BR_ULong) curr_tok,
	            (BR_ULong) curr_tok->_next,
	            (BR_ULong) curr_tok->_last,
	            (BR_ULong) curr_tok->_bits,
	            dump_buff);
    curr_tok = curr_tok->_next;
  }
}

#endif

  
   /*-----------------------------------------------------------------------*/

static void
BR_format_SU(SU_tree, default_infos)
     BR_TokenPt SU_tree;
     BR_ULong   default_infos;
{
  BR_TokenPt  prev_tok;
  BR_TokenPt  curr_tok;
  BR_Str*     curr_buf;
  BR_Str*     curr_val;
  BR_ULong    infos;
  BR_TokenPt  prefix;
  BR_Str*     str_prefix;
  BR_Str*     str_SU;
  BR_TokenPt  last_token;
  BR_Str*     begin_qualif;
  BR_TokenPt  test_tok;
  BR_TokenPt  last_pref;
  BR_TokenPt  const_token;

  infos = default_infos | SU_tree->_bits;

  /*---------------------------------------------------------  Prefix  --*/
  if ((global_prefix != BR_Null) && (!TEST_BITS(infos, BR_INFO_FRIEND)))
    prefix = global_prefix;
  else
    prefix = SU_tree->_prefix;

  if (prefix != BR_Null)
  {
    if (prefix->_last->_line_num != last_stamp)
    {
      prev_tok = prefix;
      curr_tok = prefix;
      curr_buf = prefix_buffer;
      while (curr_tok != BR_Null)
      {
	curr_val = curr_tok->_val;
	if (curr_tok->_code == T_PREFIX)
        {
	  if (curr_tok->_next != BR_Null)
          {
	    *curr_buf++ = *curr_val++;
	    *curr_buf++ = *curr_val;
	  }
	  else
	    prefix->_last = prev_tok;
	}
	else
        {
	  strncpy(curr_buf, curr_val, curr_tok->_val_len);
	  curr_buf += curr_tok->_val_len;
	}
	prev_tok = curr_tok;
	curr_tok = curr_tok->_next;
      }
      prefix_len  = curr_buf - prefix_buffer;
      *curr_buf++ = '\0';
      last_stamp  = prefix->_last->_line_num;
    }
    str_prefix = prefix_buffer;
  }
  else
    str_prefix = BR_Null;

  /*----------------------------------------------------------  Infos  --*/
  if (TEST_BITS(infos, BR_INFO_PARENT))
  {
    /*fprintf(stderr, ">=> Parent : 0x%08x (0x%08x)\n", infos, CONTROL_PARENT);*/
    if (TEST_BITS(infos, CONTROL_PARENT))
      SET_BITS(infos, BR_INFO_ERROR);    
  }

  if (TEST_BITS(infos, AGGREGATE_BITS))
  {
    CLEAR_BITS(infos, (BR_INFO_EXTERN | BR_INFO_STATIC));
    /*fprintf(stderr,">=> Aggrega : 0x%08x (0x%08x)\n",infos,CONTROL_AGGREGATE);*/
    if (TEST_BITS(infos, CONTROL_AGGREGATE))
      SET_BITS(infos, BR_INFO_ERROR);
    CLEAR_BITS(infos, BR_INFO_TYPEDEF);
    if (TEST_BITS(infos, BR_INFO_FRIEND))
      CLEAR_BITS(infos, ACCESS_BITS);
    else if (template_flag != BR_FALSE)
    {
      if (TEST_BITS(infos, BR_INFO_CLASS))
	SET_BITS(infos, BR_INFO_TEMPLATE);
      else
	SET_BITS(infos, BR_INFO_ERROR);
    }
  }

  if (TEST_BITS(infos, BR_INFO_TYPEDEF))
  {
    /*fprintf(stderr,">=> Typedef : 0x%08x (0x%08x)\n", infos, CONTROL_TYPEDEF);*/
    if (TEST_BITS(infos, CONTROL_TYPEDEF))
      SET_BITS(infos, BR_INFO_ERROR);
    else if (TEST_BITS(infos, BR_INFO_PROC))
      SU_tree->_next = BR_Null;
    CLEAR_BITS(infos, (BR_INFO_PROC | BR_INFO_DATA));
    CLEAR_BITS(infos, (BR_INFO_EXTERN | BR_INFO_STATIC));
    if (TEST_BITS(infos, BR_INFO_FRIEND))
      CLEAR_BITS(infos, ACCESS_BITS);
    else
      SET_BITS(infos, BR_INFO_DEF);
  }

  if (TEST_BITS(infos, BR_INFO_PROC))
  {
    /*fprintf(stderr, ">=> Proc    : 0x%08x (0x%08x)\n", infos, CONTROL_PROC);*/
    if (TEST_BITS(infos, CONTROL_PROC))
      SET_BITS(infos, BR_INFO_ERROR);
    else
    {
      if (TEST_BITS(SU_tree->_last->_bits, BR_INFO_CONST))
      {
        SET_BITS(infos, BR_INFO_CONST);
	const_token = ALLOC_TOKEN(T_CONST, STR_CONST);
	APPEND2(SPACE(SU_tree), const_token);
      }
      if (TEST_BITS(infos, BR_INFO_FRIEND))
      {
        CLEAR_BITS(infos, ACCESS_BITS);
        if (TEST_BITS(infos, CONTROL_FRIEND_PROC))
          SET_BITS(infos, BR_INFO_ERROR);
	else if (TEST_BITS(infos, BR_INFO_DEF))
	  SET_BITS(infos, BR_INFO_INLINE);
      }
      else if (TEST_BITS(infos, BR_INFO_C))
        SU_tree->_next->_next = SU_tree->_last;
      else if (prefix != BR_Null)
      {
        last_pref = prefix->_last;
        if (*(SU_tree->_val) == '~')
          test_tok = SU_tree->_next;
        else
          test_tok = SU_tree;
	if (   (test_tok->_val_len == last_pref->_val_len)
	    && (strncmp(test_tok->_val,
			last_pref->_val,
			last_pref->_val_len) == 0))
        {
	  if (*(SU_tree->_val) != '~')
	    SET_BITS(infos, BR_INFO_CONSTRUCTOR);
        }
	else if (*(SU_tree->_val) == '~')
	  SET_BITS(infos, BR_INFO_ERROR);
	if ((global_prefix != BR_Null) && (TEST_BITS(infos, BR_INFO_DEF)))
	  SET_BITS(infos, BR_INFO_INLINE);
      }
      else if (TEST_BITS(infos, BR_INFO_CONST | BR_INFO_VIRTUAL | BR_INFO_PURE))
        SET_BITS(infos, BR_INFO_ERROR);
      else if (template_flag != BR_FALSE)
        SET_BITS(infos, BR_INFO_TEMPLATE);
      CLEAR_BITS(infos, BR_INFO_EXTERN);
    }
  }

  if (TEST_BITS(infos, BR_INFO_DATA))
  {
    /*fprintf(stderr, ">=> Data    : 0x%08x (0x%08x)\n", infos, CONTROL_DATA);*/
    if (TEST_BITS(infos, CONTROL_DATA))
      SET_BITS(infos, BR_INFO_ERROR);      
    else if (!TEST_BITS(infos, BR_INFO_EXTERN))
      SET_BITS(infos, BR_INFO_DEF);      
    CLEAR_BITS(infos, BR_INFO_EXTERN);
  }
 
  /*----------------------------------------------------  Syntax Unit  --*/
  curr_tok     = SU_tree;
  curr_buf     = SU_buffer;
  last_token   = BR_Null;
  begin_qualif = BR_Null;
  while (curr_tok != BR_Null)
  {
    if (curr_tok == last_token)
    {
      if (   (str_prefix != BR_Null)
          && (((curr_buf - begin_qualif) - 2) == prefix_len)
	  && (strncmp(begin_qualif, str_prefix, prefix_len) == 0))
	curr_buf = begin_qualif;
    }

    if ((curr_tok != SU_tree) && (curr_tok->_prefix != BR_Null))
    {
      last_token          = curr_tok;
      begin_qualif        = curr_buf;
      curr_tok            = APPEND2(curr_tok->_prefix, curr_tok);
      last_token->_prefix = BR_Null;
    }

    curr_val = curr_tok->_val;
    switch(curr_tok->_val_len)
    {
      case 0 :
	break;
      case 1 :
	*curr_buf++ = *curr_val;
	break;
      case 2 :
	*curr_buf++ = *curr_val++;
	*curr_buf++ = *curr_val;
	break;
      case 3 :
	*curr_buf++ = *curr_val++;
	*curr_buf++ = *curr_val++;
	*curr_buf++ = *curr_val;
	break;
      default:
	strncpy(curr_buf, curr_val, curr_tok->_val_len);
	curr_buf += curr_tok->_val_len;
    }
    curr_tok = curr_tok->_next;
  }
  *curr_buf++ = '\0';
  str_SU = SU_buffer;

  /*---------------------------------------------------------------------*/
  if (BR_info_handler != BR_Null)
  {
    if (TEST_BITS(infos, BR_INFO_ERROR))
      BR_info_handler("", "", BR_INFO_ERROR, SU_tree->_line_num);
    else
      BR_info_handler(str_prefix, str_SU, infos, SU_tree->_line_num);
  } 
}


   /*-----------------------------------------------------------------------*/

static void
BR_signal_handler()
{
  longjmp(BR_env, 1);
}


   /*-----------------------------------------------------------------------*/

BR_Boolean
BR_parse_file(file_name, info_handler, filter_cmd)
     BR_Str          *file_name;
     BR_InfoHandler   info_handler;
     BR_Str         **filter_cmd;
{
  pid_t       child_pid;
  BR_Boolean  parse_ok;
  FILE*       file_pt;
#ifdef _AIX
  union wait  child_status;
#else
  int         child_status;
#endif
  int         p_array[2];

  if (file_name == BR_Null)
    parse_ok = BR_FALSE;
  else
  {
    parse_ok = BR_TRUE;
    if (filter_cmd != BR_Null)
    {
      child_pid = -1;
      file_pt   = BR_Null;

      if (pipe(p_array) == -1)
      {
	BR_WARNING(">>>>>  Filter pipe creation failure %s\n", "");
	parse_ok = BR_FALSE;
      }
      else
      {
	child_pid = fork();
	if (child_pid > 0)
	{ /*------------------------------------------------------------*/
	  close(p_array[1]);
	  file_pt = fdopen(p_array[0], "r");
	}
	else if (child_pid == 0)
	{ /*------------------------------------------------------------*/
	  close(1);
	  dup(p_array[1]);
	  close(p_array[1]);
	  close(p_array[0]);
	  execv(filter_cmd[0], filter_cmd);
	  BR_FATAL_ERROR(">>>>>  Execv failure (\"%s\")\n", filter_cmd[0]);
	}
	else
        { /*------------------------------------------------------------*/
	  close(p_array[1]);
	  close(p_array[0]);
	  BR_WARNING(">>>>>  Filter fork failure (\"%s\")\n", filter_cmd[0]);
	  parse_ok = BR_FALSE;
	}
      }
    }
    else
    {
      child_pid = 0;
      file_pt   = fopen(file_name, "r");
    }

    if (file_pt != BR_Null)
      BR_lex_init(file_pt, file_name);
    else if (parse_ok != BR_FALSE)
    {
      BR_WARNING(">>>>>  File opening failure (\"%s\")\n", file_name);
      parse_ok = BR_FALSE;
    }

    default_token      = BR_Null;
    global_prefix      = BR_Null;
    template_args      = BR_Null;
    template_flag      = BR_FALSE;
    prefix_stamp       = 1;
    last_stamp         = 0;
    BR_info_handler    = info_handler;
    default_token      = BR_lex_stack_frame(BR_INFO_EMPTY);

    BR_sigill_handler  = (void (*) ()) signal(SIGILL,  BR_signal_handler);
    BR_sigbus_handler  = (void (*) ()) signal(SIGBUS,  BR_signal_handler);
    BR_sigsegv_handler = (void (*) ()) signal(SIGSEGV, BR_signal_handler);

    if (setjmp(BR_env) == 0)
    {
      if ((parse_ok != BR_FALSE) && (BR_yyparse() != 0))
	parse_ok = BR_FALSE;
    }
    else
    {
      fprintf(stderr, ">>>>>\n");
      fprintf(stderr, ">>>>>  Browser Fatal Internal Error (Parsing Aborted)  <<<<<\n");
      fprintf(stderr, ">>>>>     In Parsing file : %s\n", file_name);
      fprintf(stderr, ">>>>>     Near line       : %d\n", BR_lex_get_line_num());
      fprintf(stderr, ">>>>>\n");

      parse_ok = BR_FALSE;
    }

    signal(SIGILL,  (void (*) ()) BR_sigill_handler);
    signal(SIGBUS,  (void (*) ()) BR_sigbus_handler);
    signal(SIGSEGV, (void (*) ()) BR_sigsegv_handler);

    if (file_pt != BR_Null)
      fclose(file_pt);

    if (   (child_pid > 0)
	&& (   (waitpid(child_pid, &child_status, WUNTRACED) != child_pid)
	    || (WIFEXITED(child_status)   == 0)
	    || (WEXITSTATUS(child_status) != 0)))
      parse_ok = BR_FALSE;
  }

  return(parse_ok);
}
