LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/YaccTarget/idlc/source - parser.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 253 0.0 %
Date: 2012-12-17 Functions: 0 8 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* A Bison parser, made by GNU Bison 2.5.  */
       2             : 
       3             : /* Bison implementation for Yacc-like parsers in C
       4             :    
       5             :       Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
       6             :    
       7             :    This program is free software: you can redistribute it and/or modify
       8             :    it under the terms of the GNU General Public License as published by
       9             :    the Free Software Foundation, either version 3 of the License, or
      10             :    (at your option) any later version.
      11             :    
      12             :    This program is distributed in the hope that it will be useful,
      13             :    but WITHOUT ANY WARRANTY; without even the implied warranty of
      14             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      15             :    GNU General Public License for more details.
      16             :    
      17             :    You should have received a copy of the GNU General Public License
      18             :    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
      19             : 
      20             : /* As a special exception, you may create a larger work that contains
      21             :    part or all of the Bison parser skeleton and distribute that work
      22             :    under terms of your choice, so long as that work isn't itself a
      23             :    parser generator using the skeleton or a modified version thereof
      24             :    as a parser skeleton.  Alternatively, if you modify or redistribute
      25             :    the parser skeleton itself, you may (at your option) remove this
      26             :    special exception, which will cause the skeleton and the resulting
      27             :    Bison output files to be licensed under the GNU General Public
      28             :    License without this special exception.
      29             :    
      30             :    This special exception was added by the Free Software Foundation in
      31             :    version 2.2 of Bison.  */
      32             : 
      33             : /* C LALR(1) parser skeleton written by Richard Stallman, by
      34             :    simplifying the original so-called "semantic" parser.  */
      35             : 
      36             : /* All symbols defined below should begin with yy or YY, to avoid
      37             :    infringing on user name space.  This should be done even for local
      38             :    variables, as they might otherwise be expanded by user macros.
      39             :    There are some unavoidable exceptions within include files to
      40             :    define necessary library symbols; they are noted "INFRINGES ON
      41             :    USER NAME SPACE" below.  */
      42             : 
      43             : /* Identify Bison output.  */
      44             : #define YYBISON 1
      45             : 
      46             : /* Bison version.  */
      47             : #define YYBISON_VERSION "2.5"
      48             : 
      49             : /* Skeleton name.  */
      50             : #define YYSKELETON_NAME "yacc.c"
      51             : 
      52             : /* Pure parsers.  */
      53             : #define YYPURE 0
      54             : 
      55             : /* Push parsers.  */
      56             : #define YYPUSH 0
      57             : 
      58             : /* Pull parsers.  */
      59             : #define YYPULL 1
      60             : 
      61             : /* Using locations.  */
      62             : #define YYLSP_NEEDED 0
      63             : 
      64             : 
      65             : 
      66             : /* Copy the first part of user declarations.  */
      67             : 
      68             : /* Line 268 of yacc.c  */
      69             : #line 23 "/usr/local/src/libreoffice/idlc/source/parser.y"
      70             : 
      71             : #include <string.h>
      72             : 
      73             : #ifndef _IDLC_IDLC_HXX_
      74             : #include <idlc/idlc.hxx>
      75             : #endif
      76             : #ifndef _IDLC_ERRORHANDLER_HXX_
      77             : #include <idlc/errorhandler.hxx>
      78             : #endif
      79             : #ifndef _IDLC_FEHELPER_HXX_
      80             : #include <idlc/fehelper.hxx>
      81             : #endif
      82             : #ifndef _IDLC_EXPRESSION_HXX_
      83             : #include <idlc/astexpression.hxx>
      84             : #endif
      85             : #ifndef _IDLC_ASTCONSTANTS_HXX_
      86             : #include <idlc/astconstants.hxx>
      87             : #endif
      88             : #ifndef _IDLC_ASTCONSTANT_HXX_
      89             : #include <idlc/astconstant.hxx>
      90             : #endif
      91             : #ifndef _IDLC_ASTARRAY_HXX_
      92             : #include <idlc/astarray.hxx>
      93             : #endif
      94             : #ifndef _IDLC_ASTBASETYPE_HXX_
      95             : #include <idlc/astbasetype.hxx>
      96             : #endif
      97             : #ifndef _IDLC_ASTTYPEDEF_HXX_
      98             : #include <idlc/asttypedef.hxx>
      99             : #endif
     100             : #ifndef _IDLC_ASTEXCEPTION_HXX_
     101             : #include <idlc/astexception.hxx>
     102             : #endif
     103             : #ifndef _IDLC_ASTMEMBER_HXX_
     104             : #include <idlc/astmember.hxx>
     105             : #endif
     106             : #ifndef _IDLC_ASTENUM_HXX_
     107             : #include <idlc/astenum.hxx>
     108             : #endif
     109             : #ifndef _IDLC_ASTSEQUENCE_HXX_
     110             : #include <idlc/astsequence.hxx>
     111             : #endif
     112             : #ifndef _IDLC_ASTATTRIBUTE_HXX_
     113             : #include <idlc/astattribute.hxx>
     114             : #endif
     115             : #ifndef _IDLC_ASTOPERATION_HXX_
     116             : #include <idlc/astoperation.hxx>
     117             : #endif
     118             : #ifndef _IDLC_ASTPARAMETER_HXX_
     119             : #include <idlc/astparameter.hxx>
     120             : #endif
     121             : #ifndef _IDLC_ASTINTERFACEMEMBER_HXX_
     122             : #include <idlc/astinterfacemember.hxx>
     123             : #endif
     124             : #ifndef _IDLC_ASTSERVICEMEMBER_HXX_
     125             : #include <idlc/astservicemember.hxx>
     126             : #endif
     127             : #ifndef _IDLC_ASTOBSERVES_HXX_
     128             : #include <idlc/astobserves.hxx>
     129             : #endif
     130             : #ifndef _IDLC_ASTNEEDS_HXX_
     131             : #include <idlc/astneeds.hxx>
     132             : #endif
     133             : #ifndef _IDLC_ASTUNION_HXX_
     134             : #include <idlc/astunion.hxx>
     135             : #endif
     136             : #include "idlc/aststructinstance.hxx"
     137             : 
     138             : #include "attributeexceptions.hxx"
     139             : 
     140             : #include "rtl/strbuf.hxx"
     141             : 
     142             : #include <algorithm>
     143             : #include <vector>
     144             : 
     145             : 
     146             : #define YYDEBUG 1
     147             : #if !(defined MACOSX && defined PPC)
     148             : #define YYERROR_VERBOSE 1
     149             : #endif
     150             : 
     151             : using ::rtl::OUString;
     152             : using ::rtl::OString;
     153             : using ::rtl::OStringToOUString;
     154             : using ::rtl::OStringBuffer;
     155             : 
     156             : extern int yylex(void);
     157             : void yyerror(char const *);
     158             : 
     159             : void checkIdentifier(::rtl::OString* id)
     160             : {
     161             :     static short check = 0;
     162             :     if (check == 0) {
     163             :         if (idlc()->getOptions()->isValid("-cid"))
     164             :             check = 1;
     165             :         else
     166             :             check = 2;
     167             :     }
     168             : 
     169             :     if ( id->indexOf('_') >= 0 )
     170             :         if ( (id->pData->buffer[0] >= 97 && id->pData->buffer[0] <= 122)
     171             :              || id->pData->buffer[0] == '_') {
     172             :             if (check == 1) {
     173             :                 ::rtl::OStringBuffer msg(25 + id->getLength());
     174             :                 msg.append("mismatched identifier '");
     175             :                 msg.append(*id);
     176             :                 msg.append("'");
     177             :                 idlc()->error()->syntaxError(idlc()->getParseState(),
     178             :                                          idlc()->getLineNumber(),
     179             :                                          msg.getStr());
     180             :             }
     181             :             else
     182             :                 idlc()->error()->warning0(WIDL_WRONG_NAMING_CONV, id->getStr());
     183             :         }
     184             : }
     185             : 
     186             : void reportDoubleMemberDeclarations(
     187             :     AstInterface::DoubleMemberDeclarations const & doubleMembers)
     188             : {
     189             :     for (AstInterface::DoubleMemberDeclarations::const_iterator i(
     190             :              doubleMembers.begin());
     191             :          i != doubleMembers.end(); ++i)
     192             :     {
     193             :         idlc()->error()->error2(EIDL_DOUBLE_MEMBER, i->first, i->second);
     194             :     }
     195             : }
     196             : 
     197             : void addInheritedInterface(
     198             :     AstInterface * ifc, rtl::OString const & name, bool optional,
     199             :     rtl::OUString const & documentation)
     200             : {
     201             :     AstDeclaration * decl = ifc->lookupByName(name);
     202             :     AstDeclaration const * resolved = resolveTypedefs(decl);
     203             :     if (resolved != 0 && resolved->getNodeType() == NT_interface) {
     204             :         if (idlc()->error()->checkPublished(decl)) {
     205             :             if (!static_cast< AstInterface const * >(resolved)->isDefined()) {
     206             :                 idlc()->error()->inheritanceError(
     207             :                     NT_interface, &ifc->getScopedName(), decl);
     208             :             } else {
     209             :                 AstInterface::DoubleDeclarations doubleDecls(
     210             :                     ifc->checkInheritedInterfaceClashes(
     211             :                         static_cast< AstInterface const * >(resolved),
     212             :                         optional));
     213             :                 if (doubleDecls.interfaces.empty()
     214             :                     && doubleDecls.members.empty())
     215             :                 {
     216             :                     ifc->addInheritedInterface(
     217             :                         static_cast< AstType * >(decl), optional,
     218             :                         documentation);
     219             :                 } else {
     220             :                     for (AstInterface::DoubleInterfaceDeclarations::iterator i(
     221             :                              doubleDecls.interfaces.begin());
     222             :                          i != doubleDecls.interfaces.end(); ++i)
     223             :                     {
     224             :                         idlc()->error()->error1(
     225             :                             EIDL_DOUBLE_INHERITANCE, *i);
     226             :                     }
     227             :                     reportDoubleMemberDeclarations(doubleDecls.members);
     228             :                 }
     229             :             }
     230             :         }
     231             :     } else {
     232             :         idlc()->error()->lookupError(
     233             :             EIDL_INTERFACEMEMBER_LOOKUP, name, scopeAsDecl(ifc));
     234             :     }
     235             : }
     236             : 
     237             : AstDeclaration const * createNamedType(
     238             :     rtl::OString const * scopedName, DeclList const * typeArgs)
     239             : {
     240             :     AstDeclaration * decl = idlc()->scopes()->topNonNull()->lookupByName(
     241             :         *scopedName);
     242             :     AstDeclaration const * resolved = resolveTypedefs(decl);
     243             :     if (decl == 0) {
     244             :         idlc()->error()->lookupError(*scopedName);
     245             :     } else if (!idlc()->error()->checkPublished(decl)) {
     246             :         decl = 0;
     247             :     } else if (resolved->getNodeType() == NT_struct) {
     248             :         if (static_cast< AstStruct const * >(resolved)->getTypeParameterCount()
     249             :             != (typeArgs == 0 ? 0 : typeArgs->size()))
     250             :         {
     251             :             idlc()->error()->error0(EIDL_WRONG_NUMBER_OF_TYPE_ARGUMENTS);
     252             :             decl = 0;
     253             :         } else if (typeArgs != 0) {
     254             :             AstScope * global = idlc()->scopes()->bottom();
     255             :             AstDeclaration * inst = new AstStructInstance(
     256             :                 static_cast< AstType * >(decl), typeArgs, global);
     257             :             decl = global->addDeclaration(inst);
     258             :             if (decl != inst) {
     259             :                 delete inst;
     260             :             }
     261             :         }
     262             :     } else if (decl->isType()) {
     263             :         if (typeArgs != 0) {
     264             :             idlc()->error()->error0(EIDL_WRONG_NUMBER_OF_TYPE_ARGUMENTS);
     265             :             decl = 0;
     266             :         }
     267             :     } else {
     268             :         idlc()->error()->noTypeError(decl);
     269             :         decl = 0;
     270             :     }
     271             :     delete scopedName;
     272             :     delete typeArgs;
     273             :     return decl;
     274             : }
     275             : 
     276             : bool includes(AstDeclaration const * type1, AstDeclaration const * type2) {
     277             :     OSL_ASSERT(type2 != 0);
     278             :     if (type1 != 0) {
     279             :         if (type1->getNodeType() == NT_instantiated_struct) {
     280             :             AstStructInstance const * inst
     281             :                 = static_cast< AstStructInstance const * >(type1);
     282             :             if (inst->getTypeTemplate() == type2) {
     283             :                 return true;
     284             :             }
     285             :             for (DeclList::const_iterator i(inst->getTypeArgumentsBegin());
     286             :                  i != inst->getTypeArgumentsEnd(); ++i)
     287             :             {
     288             :                 if (includes(*i, type2)) {
     289             :                     return true;
     290             :                 }
     291             :             }
     292             :         } else if (type1 == type2) {
     293             :             return true;
     294             :         }
     295             :     }
     296             :     return false;
     297             : }
     298             : 
     299             : // Suppress any warnings from generated code:
     300             : #if defined __SUNPRO_CC
     301             : #pragma disable_warn
     302             : #elif defined _MSC_VER
     303             : #pragma warning(push, 1)
     304             : #pragma warning(disable: 4273 4701 4702 4706)
     305             : #endif
     306             : 
     307             : 
     308             : /* Line 268 of yacc.c  */
     309             : #line 310 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/idlc/source/parser.cxx"
     310             : 
     311             : /* Enabling traces.  */
     312             : #ifndef YYDEBUG
     313             : # define YYDEBUG 0
     314             : #endif
     315             : 
     316             : /* Enabling verbose error messages.  */
     317             : #ifdef YYERROR_VERBOSE
     318             : # undef YYERROR_VERBOSE
     319             : # define YYERROR_VERBOSE 1
     320             : #else
     321             : # define YYERROR_VERBOSE 0
     322             : #endif
     323             : 
     324             : /* Enabling the token table.  */
     325             : #ifndef YYTOKEN_TABLE
     326             : # define YYTOKEN_TABLE 0
     327             : #endif
     328             : 
     329             : 
     330             : /* Tokens.  */
     331             : #ifndef YYTOKENTYPE
     332             : # define YYTOKENTYPE
     333             :    /* Put the tokens into the symbol table, so that GDB and other debuggers
     334             :       know about them.  */
     335             :    enum yytokentype {
     336             :      IDL_IDENTIFIER = 258,
     337             :      IDL_ATTRIBUTE = 259,
     338             :      IDL_BOUND = 260,
     339             :      IDL_CASE = 261,
     340             :      IDL_CONST = 262,
     341             :      IDL_CONSTANTS = 263,
     342             :      IDL_CONSTRAINED = 264,
     343             :      IDL_DEFAULT = 265,
     344             :      IDL_ENUM = 266,
     345             :      IDL_EXCEPTION = 267,
     346             :      IDL_INTERFACE = 268,
     347             :      IDL_MAYBEAMBIGUOUS = 269,
     348             :      IDL_MAYBEDEFAULT = 270,
     349             :      IDL_MAYBEVOID = 271,
     350             :      IDL_MODULE = 272,
     351             :      IDL_NEEDS = 273,
     352             :      IDL_OBSERVES = 274,
     353             :      IDL_OPTIONAL = 275,
     354             :      IDL_PROPERTY = 276,
     355             :      IDL_RAISES = 277,
     356             :      IDL_READONLY = 278,
     357             :      IDL_REMOVEABLE = 279,
     358             :      IDL_SERVICE = 280,
     359             :      IDL_SEQUENCE = 281,
     360             :      IDL_SINGLETON = 282,
     361             :      IDL_STRUCT = 283,
     362             :      IDL_SWITCH = 284,
     363             :      IDL_TYPEDEF = 285,
     364             :      IDL_TRANSIENT = 286,
     365             :      IDL_UNION = 287,
     366             :      IDL_ANY = 288,
     367             :      IDL_CHAR = 289,
     368             :      IDL_BOOLEAN = 290,
     369             :      IDL_BYTE = 291,
     370             :      IDL_DOUBLE = 292,
     371             :      IDL_FLOAT = 293,
     372             :      IDL_HYPER = 294,
     373             :      IDL_LONG = 295,
     374             :      IDL_SHORT = 296,
     375             :      IDL_VOID = 297,
     376             :      IDL_STRING = 298,
     377             :      IDL_TYPE = 299,
     378             :      IDL_UNSIGNED = 300,
     379             :      IDL_TRUE = 301,
     380             :      IDL_FALSE = 302,
     381             :      IDL_IN = 303,
     382             :      IDL_OUT = 304,
     383             :      IDL_INOUT = 305,
     384             :      IDL_GET = 306,
     385             :      IDL_SET = 307,
     386             :      IDL_PUBLISHED = 308,
     387             :      IDL_ELLIPSIS = 309,
     388             :      IDL_LEFTSHIFT = 310,
     389             :      IDL_RIGHTSHIFT = 311,
     390             :      IDL_SCOPESEPARATOR = 312,
     391             :      IDL_INTEGER_LITERAL = 313,
     392             :      IDL_INTEGER_ULITERAL = 314,
     393             :      IDL_FLOATING_PT_LITERAL = 315
     394             :    };
     395             : #endif
     396             : 
     397             : 
     398             : 
     399             : #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
     400             : typedef union YYSTYPE
     401             : {
     402             : 
     403             : /* Line 293 of yacc.c  */
     404             : #line 263 "/usr/local/src/libreoffice/idlc/source/parser.y"
     405             : 
     406             :         ExprType                                etval;     /* Expression type */
     407             :         AstDeclaration*         dclval;    /* Declaration */
     408             :     AstDeclaration const * cdclval;
     409             :     DeclList * dclsval;
     410             :         AstExpression*          exval;          /* expression value */
     411             :         ExprList*                               exlval; /* expression list value */
     412             :         FeDeclarator*                   fdval;          /* declarator value */
     413             :         FeDeclList*                     dlval;          /* declarator list value */
     414             :         FeInheritanceHeader*    ihval;          /* inheritance header value */
     415             :         ::rtl::OString*         sval;           /* OString value */
     416             :     std::vector< rtl::OString > * svals;
     417             :         sal_Char*                       strval; /* sal_Char* value */
     418             :         bool                            bval;           /* sal_Boolean* value */
     419             :         sal_Int64                               ival;           /* sal_Int64 value */
     420             :     sal_uInt64 uval; /* sal_uInt64 value */
     421             :         sal_uInt32                      ulval;          /* sal_uInt32 value */
     422             :         double                                  dval;           /* double value */
     423             :         float                                   fval;           /* float value */
     424             :         StringList*                     slval;          /* StringList value     */
     425             :         LabelList*                      llval;          /* LabelList value      */
     426             :         AstUnionLabel*          lbval;          /* union label value */
     427             :         AstMember*                      mval;           /* member value */
     428             :     AttributeExceptions::Part attexcpval;
     429             :     AttributeExceptions attexcval;
     430             : 
     431             : 
     432             : 
     433             : /* Line 293 of yacc.c  */
     434             : #line 435 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/idlc/source/parser.cxx"
     435             : } YYSTYPE;
     436             : # define YYSTYPE_IS_TRIVIAL 1
     437             : # define yystype YYSTYPE /* obsolescent; will be withdrawn */
     438             : # define YYSTYPE_IS_DECLARED 1
     439             : #endif
     440             : 
     441             : 
     442             : /* Copy the second part of user declarations.  */
     443             : 
     444             : 
     445             : /* Line 343 of yacc.c  */
     446             : #line 447 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/idlc/source/parser.cxx"
     447             : 
     448             : #ifdef short
     449             : # undef short
     450             : #endif
     451             : 
     452             : #ifdef YYTYPE_UINT8
     453             : typedef YYTYPE_UINT8 yytype_uint8;
     454             : #else
     455             : typedef unsigned char yytype_uint8;
     456             : #endif
     457             : 
     458             : #ifdef YYTYPE_INT8
     459             : typedef YYTYPE_INT8 yytype_int8;
     460             : #elif (defined __STDC__ || defined __C99__FUNC__ \
     461             :      || defined __cplusplus || defined _MSC_VER)
     462             : typedef signed char yytype_int8;
     463             : #else
     464             : typedef short int yytype_int8;
     465             : #endif
     466             : 
     467             : #ifdef YYTYPE_UINT16
     468             : typedef YYTYPE_UINT16 yytype_uint16;
     469             : #else
     470             : typedef unsigned short int yytype_uint16;
     471             : #endif
     472             : 
     473             : #ifdef YYTYPE_INT16
     474             : typedef YYTYPE_INT16 yytype_int16;
     475             : #else
     476             : typedef short int yytype_int16;
     477             : #endif
     478             : 
     479             : #ifndef YYSIZE_T
     480             : # ifdef __SIZE_TYPE__
     481             : #  define YYSIZE_T __SIZE_TYPE__
     482             : # elif defined size_t
     483             : #  define YYSIZE_T size_t
     484             : # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
     485             :      || defined __cplusplus || defined _MSC_VER)
     486             : #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
     487             : #  define YYSIZE_T size_t
     488             : # else
     489             : #  define YYSIZE_T unsigned int
     490             : # endif
     491             : #endif
     492             : 
     493             : #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
     494             : 
     495             : #ifndef YY_
     496             : # if defined YYENABLE_NLS && YYENABLE_NLS
     497             : #  if ENABLE_NLS
     498             : #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
     499             : #   define YY_(msgid) dgettext ("bison-runtime", msgid)
     500             : #  endif
     501             : # endif
     502             : # ifndef YY_
     503             : #  define YY_(msgid) msgid
     504             : # endif
     505             : #endif
     506             : 
     507             : /* Suppress unused-variable warnings by "using" E.  */
     508             : #if ! defined lint || defined __GNUC__
     509             : # define YYUSE(e) ((void) (e))
     510             : #else
     511             : # define YYUSE(e) /* empty */
     512             : #endif
     513             : 
     514             : /* Identity function, used to suppress warnings about constant conditions.  */
     515             : #ifndef lint
     516             : # define YYID(n) (n)
     517             : #else
     518             : #if (defined __STDC__ || defined __C99__FUNC__ \
     519             :      || defined __cplusplus || defined _MSC_VER)
     520             : static int
     521             : YYID (int yyi)
     522             : #else
     523             : static int
     524             : YYID (yyi)
     525             :     int yyi;
     526             : #endif
     527             : {
     528             :   return yyi;
     529             : }
     530             : #endif
     531             : 
     532             : #if ! defined yyoverflow || YYERROR_VERBOSE
     533             : 
     534             : /* The parser invokes alloca or malloc; define the necessary symbols.  */
     535             : 
     536             : # ifdef YYSTACK_USE_ALLOCA
     537             : #  if YYSTACK_USE_ALLOCA
     538             : #   ifdef __GNUC__
     539             : #    define YYSTACK_ALLOC __builtin_alloca
     540             : #   elif defined __BUILTIN_VA_ARG_INCR
     541             : #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
     542             : #   elif defined _AIX
     543             : #    define YYSTACK_ALLOC __alloca
     544             : #   elif defined _MSC_VER
     545             : #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
     546             : #    define alloca _alloca
     547             : #   else
     548             : #    define YYSTACK_ALLOC alloca
     549             : #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
     550             :      || defined __cplusplus || defined _MSC_VER)
     551             : #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
     552             : #     ifndef EXIT_SUCCESS
     553             : #      define EXIT_SUCCESS 0
     554             : #     endif
     555             : #    endif
     556             : #   endif
     557             : #  endif
     558             : # endif
     559             : 
     560             : # ifdef YYSTACK_ALLOC
     561             :    /* Pacify GCC's `empty if-body' warning.  */
     562             : #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
     563             : #  ifndef YYSTACK_ALLOC_MAXIMUM
     564             :     /* The OS might guarantee only one guard page at the bottom of the stack,
     565             :        and a page size can be as small as 4096 bytes.  So we cannot safely
     566             :        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
     567             :        to allow for a few compiler-allocated temporary stack slots.  */
     568             : #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
     569             : #  endif
     570             : # else
     571             : #  define YYSTACK_ALLOC YYMALLOC
     572             : #  define YYSTACK_FREE YYFREE
     573             : #  ifndef YYSTACK_ALLOC_MAXIMUM
     574             : #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
     575             : #  endif
     576             : #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
     577             :        && ! ((defined YYMALLOC || defined malloc) \
     578             :              && (defined YYFREE || defined free)))
     579             : #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
     580             : #   ifndef EXIT_SUCCESS
     581             : #    define EXIT_SUCCESS 0
     582             : #   endif
     583             : #  endif
     584             : #  ifndef YYMALLOC
     585             : #   define YYMALLOC malloc
     586             : #   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
     587             :      || defined __cplusplus || defined _MSC_VER)
     588             : void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
     589             : #   endif
     590             : #  endif
     591             : #  ifndef YYFREE
     592             : #   define YYFREE free
     593             : #   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
     594             :      || defined __cplusplus || defined _MSC_VER)
     595             : void free (void *); /* INFRINGES ON USER NAME SPACE */
     596             : #   endif
     597             : #  endif
     598             : # endif
     599             : #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
     600             : 
     601             : 
     602             : #if (! defined yyoverflow \
     603             :      && (! defined __cplusplus \
     604             :          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
     605             : 
     606             : /* A type that is properly aligned for any stack member.  */
     607             : union yyalloc
     608             : {
     609             :   yytype_int16 yyss_alloc;
     610             :   YYSTYPE yyvs_alloc;
     611             : };
     612             : 
     613             : /* The size of the maximum gap between one aligned stack and the next.  */
     614             : # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
     615             : 
     616             : /* The size of an array large to enough to hold all stacks, each with
     617             :    N elements.  */
     618             : # define YYSTACK_BYTES(N) \
     619             :      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
     620             :       + YYSTACK_GAP_MAXIMUM)
     621             : 
     622             : # define YYCOPY_NEEDED 1
     623             : 
     624             : /* Relocate STACK from its old location to the new one.  The
     625             :    local variables YYSIZE and YYSTACKSIZE give the old and new number of
     626             :    elements in the stack, and YYPTR gives the new location of the
     627             :    stack.  Advance YYPTR to a properly aligned location for the next
     628             :    stack.  */
     629             : # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
     630             :     do                                                                  \
     631             :       {                                                                 \
     632             :         YYSIZE_T yynewbytes;                                            \
     633             :         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                     \
     634             :         Stack = &yyptr->Stack_alloc;                                     \
     635             :         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
     636             :         yyptr += yynewbytes / sizeof (*yyptr);                          \
     637             :       }                                                                 \
     638             :     while (YYID (0))
     639             : 
     640             : #endif
     641             : 
     642             : #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
     643             : /* Copy COUNT objects from FROM to TO.  The source and destination do
     644             :    not overlap.  */
     645             : # ifndef YYCOPY
     646             : #  if defined __GNUC__ && 1 < __GNUC__
     647             : #   define YYCOPY(To, From, Count) \
     648             :       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
     649             : #  else
     650             : #   define YYCOPY(To, From, Count)              \
     651             :       do                                        \
     652             :         {                                       \
     653             :           YYSIZE_T yyi;                         \
     654             :           for (yyi = 0; yyi < (Count); yyi++)        \
     655             :             (To)[yyi] = (From)[yyi];            \
     656             :         }                                       \
     657             :       while (YYID (0))
     658             : #  endif
     659             : # endif
     660             : #endif /* !YYCOPY_NEEDED */
     661             : 
     662             : /* YYFINAL -- State number of the termination state.  */
     663             : #define YYFINAL  11
     664             : /* YYLAST -- Last index in YYTABLE.  */
     665             : #define YYLAST   800
     666             : 
     667             : /* YYNTOKENS -- Number of terminals.  */
     668             : #define YYNTOKENS  82
     669             : /* YYNNTS -- Number of nonterminals.  */
     670             : #define YYNNTS  227
     671             : /* YYNRULES -- Number of rules.  */
     672             : #define YYNRULES  359
     673             : /* YYNRULES -- Number of states.  */
     674             : #define YYNSTATES  516
     675             : 
     676             : /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
     677             : #define YYUNDEFTOK  2
     678             : #define YYMAXUTOK   315
     679             : 
     680             : #define YYTRANSLATE(YYX)                                                \
     681             :   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
     682             : 
     683             : /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
     684             : static const yytype_uint8 yytranslate[] =
     685             : {
     686             :        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     687             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     688             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     689             :        2,     2,     2,     2,     2,     2,     2,    78,    73,     2,
     690             :       68,    69,    76,    74,    67,    75,     2,    77,     2,     2,
     691             :        2,     2,     2,     2,     2,     2,     2,     2,    64,    61,
     692             :       80,    70,    81,     2,     2,     2,     2,     2,     2,     2,
     693             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     694             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     695             :        2,    65,     2,    66,    72,     2,     2,     2,     2,     2,
     696             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     697             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     698             :        2,     2,     2,    62,    71,    63,    79,     2,     2,     2,
     699             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     700             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     701             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     702             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     703             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     704             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     705             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     706             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     707             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     708             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     709             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     710             :        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     711             :        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
     712             :        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
     713             :       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
     714             :       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
     715             :       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
     716             :       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
     717             :       55,    56,    57,    58,    59,    60
     718             : };
     719             : 
     720             : #if YYDEBUG
     721             : /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
     722             :    YYRHS.  */
     723             : static const yytype_uint16 yyprhs[] =
     724             : {
     725             :        0,     0,     3,     5,     8,     9,    12,    13,    17,    20,
     726             :       22,    23,    24,    28,    29,    33,    34,    38,    39,    43,
     727             :       44,    48,    49,    53,    54,    58,    59,    60,    61,    62,
     728             :       72,    74,    76,    77,    81,    83,    84,    85,    86,    94,
     729             :       97,   100,   101,   105,   106,   109,   110,   111,   115,   116,
     730             :      120,   121,   125,   126,   127,   134,   138,   142,   144,   146,
     731             :      148,   150,   152,   154,   156,   158,   160,   162,   164,   166,
     732             :      169,   172,   173,   176,   179,   182,   185,   186,   188,   189,
     733             :      193,   195,   196,   197,   202,   203,   204,   205,   206,   207,
     734             :      219,   221,   223,   225,   226,   231,   232,   235,   236,   237,
     735             :      246,   249,   251,   253,   255,   257,   258,   260,   261,   262,
     736             :      263,   270,   272,   276,   278,   279,   284,   288,   289,   292,
     737             :      293,   294,   298,   299,   300,   301,   302,   312,   313,   314,
     738             :      315,   316,   326,   328,   330,   332,   336,   338,   342,   344,
     739             :      348,   350,   354,   358,   360,   364,   368,   370,   374,   378,
     740             :      382,   384,   387,   390,   393,   395,   397,   401,   403,   405,
     741             :      407,   409,   411,   413,   415,   417,   419,   421,   423,   425,
     742             :      426,   427,   433,   434,   435,   436,   444,   445,   450,   453,
     743             :      456,   457,   461,   465,   469,   473,   476,   478,   481,   483,
     744             :      486,   487,   488,   494,   496,   498,   499,   504,   506,   507,
     745             :      511,   514,   515,   516,   517,   526,   527,   528,   534,   536,
     746             :      538,   541,   542,   543,   549,   550,   554,   556,   558,   560,
     747             :      561,   565,   568,   569,   574,   575,   577,   579,   581,   583,
     748             :      584,   588,   591,   594,   595,   596,   597,   603,   606,   607,
     749             :      612,   613,   615,   616,   620,   621,   626,   628,   630,   632,
     750             :      635,   637,   639,   643,   644,   646,   650,   652,   654,   656,
     751             :      658,   660,   662,   664,   666,   668,   670,   672,   674,   676,
     752             :      678,   681,   684,   687,   689,   691,   693,   695,   697,   699,
     753             :      701,   703,   705,   707,   709,   711,   713,   714,   718,   719,
     754             :      720,   721,   729,   732,   733,   734,   735,   743,   744,   745,
     755             :      752,   756,   757,   759,   763,   766,   769,   770,   771,   772,
     756             :      778,   781,   783,   786,   787,   788,   789,   790,   800,   803,
     757             :      804,   809,   810,   813,   815,   819,   820,   821,   822,   823,
     758             :      824,   825,   826,   827,   845,   847,   849,   851,   853,   855,
     759             :      858,   861,   862,   863,   867,   870,   873,   874,   875,   879,
     760             :      880,   881,   887,   888,   889,   895,   898,   900,   902,   904
     761             : };
     762             : 
     763             : /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
     764             : static const yytype_int16 yyrhs[] =
     765             : {
     766             :       83,     0,    -1,    84,    -1,    85,    84,    -1,    -1,    87,
     767             :       88,    -1,    -1,    96,    86,    61,    -1,     1,    61,    -1,
     768             :       53,    -1,    -1,    -1,   213,    89,    61,    -1,    -1,   157,
     769             :       90,    61,    -1,    -1,   183,    91,    61,    -1,    -1,   101,
     770             :       92,    61,    -1,    -1,   193,    93,    61,    -1,    -1,   205,
     771             :       94,    61,    -1,    -1,   162,    95,    61,    -1,    -1,    -1,
     772             :       -1,    -1,    17,    97,   308,    98,    62,    99,    84,   100,
     773             :       63,    -1,   105,    -1,   104,    -1,    -1,    13,   103,   308,
     774             :       -1,   102,    -1,    -1,    -1,    -1,   109,   106,    62,   107,
     775             :      112,   108,    63,    -1,     1,    63,    -1,   102,   110,    -1,
     776             :       -1,    64,   111,   233,    -1,    -1,   112,   113,    -1,    -1,
     777             :       -1,   117,   114,    61,    -1,    -1,   131,   115,    61,    -1,
     778             :       -1,   151,   116,    61,    -1,    -1,    -1,   120,   237,   118,
     779             :      221,   119,   123,    -1,    65,   121,    66,    -1,   121,    67,
     780             :      122,    -1,   122,    -1,     4,    -1,    21,    -1,    23,    -1,
     781             :       20,    -1,    16,    -1,     5,    -1,     9,    -1,    31,    -1,
     782             :       14,    -1,    15,    -1,    24,    -1,     1,    66,    -1,    62,
     783             :      124,    -1,    -1,   125,    63,    -1,     1,    63,    -1,   127,
     784             :      128,    -1,   129,   126,    -1,    -1,   127,    -1,    -1,    51,
     785             :      146,    61,    -1,   129,    -1,    -1,    -1,    52,   130,   146,
     786             :       61,    -1,    -1,    -1,    -1,    -1,    -1,   137,   132,   308,
     787             :      133,    68,   134,   138,   135,    69,   136,   145,    -1,   237,
     788             :       -1,    42,    -1,   140,    -1,    -1,   138,    67,   139,   140,
     789             :       -1,    -1,     1,    67,    -1,    -1,    -1,    65,   143,    66,
     790             :      141,   237,   142,   144,   220,    -1,     1,   237,    -1,    48,
     791             :       -1,    49,    -1,    50,    -1,    54,    -1,    -1,   146,    -1,
     792             :       -1,    -1,    -1,    22,   147,    68,   148,   149,    69,    -1,
     793             :      150,    -1,   149,    67,   150,    -1,   233,    -1,    -1,   153,
     794             :       13,   152,   233,    -1,    65,    20,    66,    -1,    -1,   155,
     795             :      154,    -1,    -1,    -1,   157,   156,    61,    -1,    -1,    -1,
     796             :       -1,    -1,     7,   158,   179,   159,   308,   160,    70,   161,
     797             :      167,    -1,    -1,    -1,    -1,    -1,     8,   163,   308,   164,
     798             :       62,   165,   154,   166,    63,    -1,   168,    -1,   169,    -1,
     799             :      170,    -1,   169,    71,   170,    -1,   171,    -1,   170,    72,
     800             :      171,    -1,   172,    -1,   171,    73,   172,    -1,   173,    -1,
     801             :      172,    55,   173,    -1,   172,    56,   173,    -1,   174,    -1,
     802             :      173,    74,   174,    -1,   173,    75,   174,    -1,   175,    -1,
     803             :      174,    76,   175,    -1,   174,    77,   175,    -1,   174,    78,
     804             :      175,    -1,   176,    -1,    74,   176,    -1,    75,   176,    -1,
     805             :       79,   176,    -1,   233,    -1,   177,    -1,    68,   168,    69,
     806             :       -1,    58,    -1,    59,    -1,    60,    -1,    46,    -1,    47,
     807             :       -1,   168,    -1,   243,    -1,   247,    -1,   248,    -1,   249,
     808             :       -1,   246,    -1,   233,    -1,    -1,    -1,    12,   181,   308,
     809             :      182,   110,    -1,    -1,    -1,    -1,   180,   184,    62,   185,
     810             :      271,   186,    63,    -1,    -1,   120,   237,   188,   217,    -1,
     811             :        1,    61,    -1,   189,   190,    -1,    -1,   191,   230,    61,
     812             :       -1,   192,   230,    61,    -1,    19,   230,    61,    -1,    18,
     813             :      230,    61,    -1,   187,    61,    -1,    13,    -1,   120,    13,
     814             :       -1,    25,    -1,   120,    25,    -1,    -1,    -1,    25,   194,
     815             :      308,   195,   196,    -1,   197,    -1,   210,    -1,    -1,    64,
     816             :      233,   198,   199,    -1,   200,    -1,    -1,    62,   201,    63,
     817             :       -1,   201,   202,    -1,    -1,    -1,    -1,   308,   203,    68,
     818             :      138,    69,   145,   204,    61,    -1,    -1,    -1,    27,   206,
     819             :      308,   207,   208,    -1,   209,    -1,   210,    -1,    64,   233,
     820             :       -1,    -1,    -1,    62,   211,   189,   212,    63,    -1,    -1,
     821             :       30,   214,   215,    -1,   261,    -1,   285,    -1,   276,    -1,
     822             :       -1,   236,   216,   217,    -1,   220,   218,    -1,    -1,   218,
     823             :       67,   219,   220,    -1,    -1,   221,    -1,   222,    -1,   308,
     824             :       -1,   223,    -1,    -1,   308,   224,   225,    -1,   227,   226,
     825             :       -1,   226,   227,    -1,    -1,    -1,    -1,    65,   228,   178,
     826             :      229,    66,    -1,   233,   231,    -1,    -1,   231,    67,   232,
     827             :      233,    -1,    -1,   308,    -1,    -1,    57,   234,   308,    -1,
     828             :       -1,   233,    57,   235,   308,    -1,   237,    -1,   254,    -1,
     829             :      238,    -1,   233,   239,    -1,   242,    -1,   253,    -1,    80,
     830             :      240,    81,    -1,    -1,   241,    -1,   240,    67,   241,    -1,
     831             :      237,    -1,   243,    -1,   246,    -1,   247,    -1,   249,    -1,
     832             :      248,    -1,   250,    -1,   251,    -1,   252,    -1,   244,    -1,
     833             :      245,    -1,    40,    -1,    39,    -1,    41,    -1,    45,    40,
     834             :       -1,    45,    39,    -1,    45,    41,    -1,    37,    -1,    38,
     835             :       -1,    34,    -1,    36,    -1,    35,    -1,    33,    -1,    44,
     836             :       -1,    43,    -1,   257,    -1,   255,    -1,   261,    -1,   285,
     837             :       -1,   276,    -1,    -1,   237,   256,   225,    -1,    -1,    -1,
     838             :       -1,    26,   258,    80,   259,   237,   260,    81,    -1,     1,
     839             :       81,    -1,    -1,    -1,    -1,   265,   262,    62,   263,   270,
     840             :      264,    63,    -1,    -1,    -1,    28,   266,   308,   267,   268,
     841             :      110,    -1,    80,   269,    81,    -1,    -1,   308,    -1,   269,
     842             :       67,   308,    -1,   272,   271,    -1,   271,   272,    -1,    -1,
     843             :       -1,    -1,   275,   273,   217,   274,    61,    -1,     1,    61,
     844             :       -1,   238,    -1,   233,   239,    -1,    -1,    -1,    -1,    -1,
     845             :       11,   277,   308,   278,    62,   279,   281,   280,    63,    -1,
     846             :      284,   282,    -1,    -1,   282,    67,   283,   284,    -1,    -1,
     847             :        1,    67,    -1,   308,    -1,   308,    70,   168,    -1,    -1,
     848             :       -1,    -1,    -1,    -1,    -1,    -1,    -1,    32,   286,   308,
     849             :      287,    29,   288,    68,   289,   294,   290,    69,   291,    62,
     850             :      292,   295,   293,    63,    -1,   243,    -1,   247,    -1,   249,
     851             :       -1,   276,    -1,   233,    -1,   297,   296,    -1,   296,   297,
     852             :       -1,    -1,    -1,   299,   298,   305,    -1,   301,   300,    -1,
     853             :      300,   301,    -1,    -1,    -1,    10,   302,    64,    -1,    -1,
     854             :       -1,     6,   303,   168,   304,    64,    -1,    -1,    -1,   236,
     855             :      306,   220,   307,    61,    -1,     1,    61,    -1,     3,    -1,
     856             :       51,    -1,    52,    -1,    53,    -1
     857             : };
     858             : 
     859             : /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
     860             : static const yytype_uint16 yyrline[] =
     861             : {
     862             :        0,   413,   413,   416,   417,   421,   423,   422,   430,   438,
     863             :      439,   444,   443,   452,   451,   460,   459,   468,   467,   476,
     864             :      475,   484,   483,   492,   491,   503,   508,   543,   547,   502,
     865             :      561,   562,   567,   566,   579,   619,   699,   703,   618,   724,
     866             :      732,   743,   742,   751,   757,   758,   763,   762,   771,   770,
     867             :      779,   778,   791,   795,   789,   828,   836,   843,   850,   855,
     868             :      860,   865,   870,   875,   880,   885,   890,   895,   900,   905,
     869             :      913,   915,   924,   925,   937,   943,   950,   959,   960,   964,
     870             :      974,   975,   980,   979,   998,  1002,  1040,  1044,  1048,   997,
     871             :     1074,  1075,  1082,  1085,  1083,  1089,  1090,  1101,  1105,  1098,
     872             :     1165,  1174,  1178,  1182,  1189,  1194,  1200,  1202,  1209,  1213,
     873             :     1208,  1225,  1230,  1238,  1261,  1259,  1281,  1282,  1286,  1287,
     874             :     1292,  1291,  1299,  1303,  1307,  1312,  1298,  1339,  1343,  1348,
     875             :     1372,  1338,  1385,  1387,  1390,  1391,  1398,  1399,  1406,  1407,
     876             :     1414,  1415,  1419,  1426,  1427,  1431,  1438,  1439,  1443,  1447,
     877             :     1454,  1455,  1459,  1463,  1469,  1478,  1479,  1486,  1490,  1494,
     878             :     1498,  1502,  1509,  1522,  1523,  1524,  1525,  1526,  1527,  1558,
     879             :     1562,  1557,  1577,  1597,  1601,  1576,  1615,  1613,  1677,  1685,
     880             :     1686,  1690,  1740,  1782,  1824,  1866,  1874,  1879,  1890,  1895,
     881             :     1907,  1911,  1906,  1940,  1941,  1946,  1945,  1970,  1971,  1975,
     882             :     1981,  1982,  1987,  1999,  1986,  2015,  2019,  2014,  2048,  2049,
     883             :     2053,  2072,  2078,  2071,  2093,  2092,  2097,  2098,  2099,  2104,
     884             :     2103,  2158,  2176,  2174,  2194,  2200,  2201,  2205,  2224,  2232,
     885             :     2231,  2245,  2261,  2275,  2282,  2286,  2281,  2306,  2325,  2323,
     886             :     2344,  2350,  2357,  2356,  2370,  2368,  2383,  2384,  2388,  2389,
     887             :     2396,  2400,  2404,  2405,  2409,  2414,  2422,  2432,  2433,  2434,
     888             :     2435,  2436,  2437,  2438,  2439,  2443,  2444,  2448,  2452,  2456,
     889             :     2463,  2467,  2471,  2478,  2482,  2489,  2496,  2503,  2510,  2517,
     890             :     2524,  2531,  2532,  2536,  2537,  2538,  2543,  2542,  2574,  2582,
     891             :     2586,  2573,  2624,  2634,  2654,  2658,  2633,  2671,  2675,  2670,
     892             :     2707,  2708,  2712,  2718,  2729,  2732,  2733,  2738,  2742,  2737,
     893             :     2792,  2800,  2801,  2825,  2829,  2856,  2860,  2824,  2879,  2884,
     894             :     2882,  2888,  2889,  2897,  2921,  2958,  2962,  2967,  2971,  2975,
     895             :     2979,  3008,  3012,  2957,  3024,  3028,  3032,  3036,  3037,  3105,
     896             :     3108,  3109,  3114,  3113,  3152,  3168,  3182,  3189,  3188,  3198,
     897             :     3202,  3197,  3214,  3218,  3213,  3246,  3254,  3255,  3256,  3257
     898             : };
     899             : #endif
     900             : 
     901             : #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
     902             : /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
     903             :    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
     904             : static const char *const yytname[] =
     905             : {
     906             :   "$end", "error", "$undefined", "IDL_IDENTIFIER", "IDL_ATTRIBUTE",
     907             :   "IDL_BOUND", "IDL_CASE", "IDL_CONST", "IDL_CONSTANTS", "IDL_CONSTRAINED",
     908             :   "IDL_DEFAULT", "IDL_ENUM", "IDL_EXCEPTION", "IDL_INTERFACE",
     909             :   "IDL_MAYBEAMBIGUOUS", "IDL_MAYBEDEFAULT", "IDL_MAYBEVOID", "IDL_MODULE",
     910             :   "IDL_NEEDS", "IDL_OBSERVES", "IDL_OPTIONAL", "IDL_PROPERTY",
     911             :   "IDL_RAISES", "IDL_READONLY", "IDL_REMOVEABLE", "IDL_SERVICE",
     912             :   "IDL_SEQUENCE", "IDL_SINGLETON", "IDL_STRUCT", "IDL_SWITCH",
     913             :   "IDL_TYPEDEF", "IDL_TRANSIENT", "IDL_UNION", "IDL_ANY", "IDL_CHAR",
     914             :   "IDL_BOOLEAN", "IDL_BYTE", "IDL_DOUBLE", "IDL_FLOAT", "IDL_HYPER",
     915             :   "IDL_LONG", "IDL_SHORT", "IDL_VOID", "IDL_STRING", "IDL_TYPE",
     916             :   "IDL_UNSIGNED", "IDL_TRUE", "IDL_FALSE", "IDL_IN", "IDL_OUT",
     917             :   "IDL_INOUT", "IDL_GET", "IDL_SET", "IDL_PUBLISHED", "IDL_ELLIPSIS",
     918             :   "IDL_LEFTSHIFT", "IDL_RIGHTSHIFT", "IDL_SCOPESEPARATOR",
     919             :   "IDL_INTEGER_LITERAL", "IDL_INTEGER_ULITERAL", "IDL_FLOATING_PT_LITERAL",
     920             :   "';'", "'{'", "'}'", "':'", "'['", "']'", "','", "'('", "')'", "'='",
     921             :   "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "'<'",
     922             :   "'>'", "$accept", "start", "definitions", "definition", "$@1",
     923             :   "opt_published", "publishable_definition", "$@2", "$@3", "$@4", "$@5",
     924             :   "$@6", "$@7", "$@8", "module_dcl", "$@9", "$@10", "$@11", "$@12",
     925             :   "interface", "interface_decl", "$@13", "forward_dcl", "interface_dcl",
     926             :   "$@14", "$@15", "$@16", "interfaceheader", "inheritance_spec", "$@17",
     927             :   "exports", "export", "$@18", "$@19", "$@20", "attribute", "$@21", "$@22",
     928             :   "flag_header", "opt_attrflags", "opt_attrflag", "opt_attribute_block",
     929             :   "attribute_block_rest", "opt_attribute_raises",
     930             :   "opt_attribute_get_raises", "attribute_get_raises",
     931             :   "opt_attribute_set_raises", "attribute_set_raises", "$@23", "operation",
     932             :   "$@24", "$@25", "$@26", "$@27", "$@28", "op_type_spec", "parameters",
     933             :   "$@29", "parameter", "$@30", "$@31", "direction", "opt_rest",
     934             :   "opt_raises", "raises", "$@32", "$@33", "exception_list",
     935             :   "exception_name", "interface_inheritance_decl", "$@34",
     936             :   "optional_inherited_interface", "constants_exports", "constants_export",
     937             :   "$@35", "const_dcl", "$@36", "$@37", "$@38", "$@39", "constants_dcl",
     938             :   "$@40", "$@41", "$@42", "$@43", "expression", "const_expr", "or_expr",
     939             :   "xor_expr", "and_expr", "shift_expr", "add_expr", "mult_expr",
     940             :   "unary_expr", "primary_expr", "literal", "positive_int_expr",
     941             :   "const_type", "exception_header", "$@44", "$@45", "exception_dcl",
     942             :   "$@46", "$@47", "$@48", "property", "$@49", "service_exports",
     943             :   "service_export", "service_interface_header", "service_service_header",
     944             :   "service_dcl", "$@50", "$@51", "service_dfn", "service_interface_dfn",
     945             :   "$@52", "opt_service_body", "service_body", "constructors",
     946             :   "constructor", "$@53", "$@54", "singleton_dcl", "$@55", "$@56",
     947             :   "singleton_dfn", "singleton_interface_dfn", "service_obsolete_dfn",
     948             :   "$@57", "$@58", "type_dcl", "$@59", "type_declarator", "$@60",
     949             :   "at_least_one_declarator", "declarators", "$@61", "declarator",
     950             :   "simple_declarator", "complex_declarator", "array_declarator", "$@62",
     951             :   "at_least_one_array_dim", "array_dims", "array_dim", "$@63", "$@64",
     952             :   "at_least_one_scoped_name", "scoped_names", "$@65", "scoped_name",
     953             :   "$@66", "$@67", "type_spec", "simple_type_spec", "fundamental_type",
     954             :   "opt_type_args", "type_args", "type_arg", "base_type_spec",
     955             :   "integer_type", "signed_int", "unsigned_int", "floating_pt_type",
     956             :   "char_type", "byte_type", "boolean_type", "any_type", "type_type",
     957             :   "string_type", "template_type_spec", "constructed_type_spec",
     958             :   "array_type", "$@68", "sequence_type_spec", "$@69", "$@70", "$@71",
     959             :   "struct_type", "$@72", "$@73", "$@74", "structure_header", "$@75",
     960             :   "$@76", "opt_type_params", "type_params", "at_least_one_member",
     961             :   "members", "member", "$@77", "$@78", "type_or_parameter", "enum_type",
     962             :   "$@79", "$@80", "$@81", "$@82", "at_least_one_enumerator", "enumerators",
     963             :   "$@83", "enumerator", "union_type", "$@84", "$@85", "$@86", "$@87",
     964             :   "$@88", "$@89", "$@90", "$@91", "switch_type_spec",
     965             :   "at_least_one_case_branch", "case_branches", "case_branch", "$@92",
     966             :   "at_least_one_case_label", "case_labels", "case_label", "$@93", "$@94",
     967             :   "$@95", "element_spec", "$@96", "$@97", "identifier", 0
     968             : };
     969             : #endif
     970             : 
     971             : # ifdef YYPRINT
     972             : /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
     973             :    token YYLEX-NUM.  */
     974             : static const yytype_uint16 yytoknum[] =
     975             : {
     976             :        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     977             :      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     978             :      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     979             :      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     980             :      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
     981             :      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
     982             :      315,    59,   123,   125,    58,    91,    93,    44,    40,    41,
     983             :       61,   124,    94,    38,    43,    45,    42,    47,    37,   126,
     984             :       60,    62
     985             : };
     986             : # endif
     987             : 
     988             : /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
     989             : static const yytype_uint16 yyr1[] =
     990             : {
     991             :        0,    82,    83,    84,    84,    85,    86,    85,    85,    87,
     992             :       87,    89,    88,    90,    88,    91,    88,    92,    88,    93,
     993             :       88,    94,    88,    95,    88,    97,    98,    99,   100,    96,
     994             :      101,   101,   103,   102,   104,   106,   107,   108,   105,   105,
     995             :      109,   111,   110,   110,   112,   112,   114,   113,   115,   113,
     996             :      116,   113,   118,   119,   117,   120,   121,   121,   122,   122,
     997             :      122,   122,   122,   122,   122,   122,   122,   122,   122,   122,
     998             :      123,   123,   124,   124,   125,   125,   125,   126,   126,   127,
     999             :      128,   128,   130,   129,   132,   133,   134,   135,   136,   131,
    1000             :      137,   137,   138,   139,   138,   138,   138,   141,   142,   140,
    1001             :      140,   143,   143,   143,   144,   144,   145,   145,   147,   148,
    1002             :      146,   149,   149,   150,   152,   151,   153,   153,   154,   154,
    1003             :      156,   155,   158,   159,   160,   161,   157,   163,   164,   165,
    1004             :      166,   162,   167,   168,   169,   169,   170,   170,   171,   171,
    1005             :      172,   172,   172,   173,   173,   173,   174,   174,   174,   174,
    1006             :      175,   175,   175,   175,   176,   176,   176,   177,   177,   177,
    1007             :      177,   177,   178,   179,   179,   179,   179,   179,   179,   181,
    1008             :      182,   180,   184,   185,   186,   183,   188,   187,   187,   189,
    1009             :      189,   190,   190,   190,   190,   190,   191,   191,   192,   192,
    1010             :      194,   195,   193,   196,   196,   198,   197,   199,   199,   200,
    1011             :      201,   201,   203,   204,   202,   206,   207,   205,   208,   208,
    1012             :      209,   211,   212,   210,   214,   213,   213,   213,   213,   216,
    1013             :      215,   217,   219,   218,   218,   220,   220,   221,   222,   224,
    1014             :      223,   225,   226,   226,   228,   229,   227,   230,   232,   231,
    1015             :      231,   233,   234,   233,   235,   233,   236,   236,   237,   237,
    1016             :      238,   238,   239,   239,   240,   240,   241,   242,   242,   242,
    1017             :      242,   242,   242,   242,   242,   243,   243,   244,   244,   244,
    1018             :      245,   245,   245,   246,   246,   247,   248,   249,   250,   251,
    1019             :      252,   253,   253,   254,   254,   254,   256,   255,   258,   259,
    1020             :      260,   257,   257,   262,   263,   264,   261,   266,   267,   265,
    1021             :      268,   268,   269,   269,   270,   271,   271,   273,   274,   272,
    1022             :      272,   275,   275,   277,   278,   279,   280,   276,   281,   283,
    1023             :      282,   282,   282,   284,   284,   286,   287,   288,   289,   290,
    1024             :      291,   292,   293,   285,   294,   294,   294,   294,   294,   295,
    1025             :      296,   296,   298,   297,   299,   300,   300,   302,   301,   303,
    1026             :      304,   301,   306,   307,   305,   305,   308,   308,   308,   308
    1027             : };
    1028             : 
    1029             : /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
    1030             : static const yytype_uint8 yyr2[] =
    1031             : {
    1032             :        0,     2,     1,     2,     0,     2,     0,     3,     2,     1,
    1033             :        0,     0,     3,     0,     3,     0,     3,     0,     3,     0,
    1034             :        3,     0,     3,     0,     3,     0,     0,     0,     0,     9,
    1035             :        1,     1,     0,     3,     1,     0,     0,     0,     7,     2,
    1036             :        2,     0,     3,     0,     2,     0,     0,     3,     0,     3,
    1037             :        0,     3,     0,     0,     6,     3,     3,     1,     1,     1,
    1038             :        1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
    1039             :        2,     0,     2,     2,     2,     2,     0,     1,     0,     3,
    1040             :        1,     0,     0,     4,     0,     0,     0,     0,     0,    11,
    1041             :        1,     1,     1,     0,     4,     0,     2,     0,     0,     8,
    1042             :        2,     1,     1,     1,     1,     0,     1,     0,     0,     0,
    1043             :        6,     1,     3,     1,     0,     4,     3,     0,     2,     0,
    1044             :        0,     3,     0,     0,     0,     0,     9,     0,     0,     0,
    1045             :        0,     9,     1,     1,     1,     3,     1,     3,     1,     3,
    1046             :        1,     3,     3,     1,     3,     3,     1,     3,     3,     3,
    1047             :        1,     2,     2,     2,     1,     1,     3,     1,     1,     1,
    1048             :        1,     1,     1,     1,     1,     1,     1,     1,     1,     0,
    1049             :        0,     5,     0,     0,     0,     7,     0,     4,     2,     2,
    1050             :        0,     3,     3,     3,     3,     2,     1,     2,     1,     2,
    1051             :        0,     0,     5,     1,     1,     0,     4,     1,     0,     3,
    1052             :        2,     0,     0,     0,     8,     0,     0,     5,     1,     1,
    1053             :        2,     0,     0,     5,     0,     3,     1,     1,     1,     0,
    1054             :        3,     2,     0,     4,     0,     1,     1,     1,     1,     0,
    1055             :        3,     2,     2,     0,     0,     0,     5,     2,     0,     4,
    1056             :        0,     1,     0,     3,     0,     4,     1,     1,     1,     2,
    1057             :        1,     1,     3,     0,     1,     3,     1,     1,     1,     1,
    1058             :        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
    1059             :        2,     2,     2,     1,     1,     1,     1,     1,     1,     1,
    1060             :        1,     1,     1,     1,     1,     1,     0,     3,     0,     0,
    1061             :        0,     7,     2,     0,     0,     0,     7,     0,     0,     6,
    1062             :        3,     0,     1,     3,     2,     2,     0,     0,     0,     5,
    1063             :        2,     1,     2,     0,     0,     0,     0,     9,     2,     0,
    1064             :        4,     0,     2,     1,     3,     0,     0,     0,     0,     0,
    1065             :        0,     0,     0,    17,     1,     1,     1,     1,     1,     2,
    1066             :        2,     0,     0,     3,     2,     2,     0,     0,     3,     0,
    1067             :        0,     5,     0,     0,     5,     2,     1,     1,     1,     1
    1068             : };
    1069             : 
    1070             : /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
    1071             :    Performed when YYTABLE doesn't specify something else to do.  Zero
    1072             :    means the default is an error.  */
    1073             : static const yytype_uint16 yydefact[] =
    1074             : {
    1075             :        0,     0,    25,     9,     0,     2,     0,     0,     6,     8,
    1076             :        0,     1,     3,     0,   122,   127,   313,   169,    32,   190,
    1077             :      205,   297,   214,   325,     5,    17,    34,    31,    30,    35,
    1078             :       13,    23,   172,    15,    19,    21,    11,   216,   293,   218,
    1079             :      217,     0,   356,   357,   358,   359,    26,    39,     0,     0,
    1080             :        0,     0,     0,     0,     0,     0,     0,     0,     0,    41,
    1081             :       40,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    1082             :        7,     0,   275,   277,   276,   273,   274,   268,   267,   269,
    1083             :        0,   242,   123,   168,   163,   265,   266,   167,   164,   165,
    1084             :      166,   241,   128,   314,   170,    33,   191,   206,   298,     0,
    1085             :      288,   278,   280,   279,   215,   253,   219,   246,   248,   250,
    1086             :      257,   258,   259,   261,   260,   262,   263,   264,   251,   247,
    1087             :      282,   281,   283,   285,   284,   326,    18,     0,    36,    14,
    1088             :       24,   173,    16,    20,    22,    12,   294,    27,   271,   270,
    1089             :      272,     0,     0,   244,     0,     0,    43,     0,     0,   301,
    1090             :      292,     0,     0,   249,     0,     0,     0,    42,    45,   306,
    1091             :        0,     0,   243,   124,     0,   129,   315,   171,   211,     0,
    1092             :      192,   193,   194,     0,   207,   208,   209,     0,    43,   289,
    1093             :      256,     0,   254,   220,   224,   225,   226,   228,   227,   234,
    1094             :      287,   233,   327,     0,     0,     0,   253,   286,   311,   295,
    1095             :      306,   307,    28,     0,   245,   119,     0,   180,   195,   210,
    1096             :        0,   302,   299,     0,     0,   252,   221,     0,     0,   231,
    1097             :        0,    91,     0,     0,    44,    46,     0,    48,    84,    50,
    1098             :        0,    90,     0,   305,   310,   312,     0,     0,     0,     0,
    1099             :      125,   130,   119,   120,   316,     0,   323,     0,   198,     0,
    1100             :      300,   286,   255,   222,   230,   160,   161,   157,   158,   159,
    1101             :        0,     0,     0,     0,   162,   133,   134,   136,   138,   140,
    1102             :      143,   146,   150,   155,   235,   154,   232,   328,     0,    58,
    1103             :       63,    64,    66,    67,    62,    61,    59,    60,    68,    65,
    1104             :        0,    57,    38,     0,    52,     0,     0,     0,   114,   175,
    1105             :      296,   308,    29,     0,     0,   118,     0,     0,     0,   318,
    1106             :        0,     0,   186,     0,     0,   188,     0,     0,     0,   179,
    1107             :        0,     0,     0,   201,   196,   197,   303,     0,     0,     0,
    1108             :      151,   152,   153,     0,     0,     0,     0,     0,     0,     0,
    1109             :        0,     0,     0,     0,     0,    69,   116,    55,     0,    47,
    1110             :        0,    49,    85,    51,     0,     0,   126,   132,   131,   121,
    1111             :      317,   322,   319,   324,   178,     0,   240,     0,    61,   187,
    1112             :      189,   176,   185,     0,     0,   213,     0,   291,   223,   156,
    1113             :      135,   137,   139,   141,   142,   144,   145,   147,   148,   149,
    1114             :      236,   338,   334,   335,   336,   337,   329,    56,    53,   227,
    1115             :        0,   115,   309,     0,   184,   237,   183,     0,   181,   182,
    1116             :      199,   200,   202,     0,    71,    86,   320,   238,   177,     0,
    1117             :      330,     0,    54,     0,     0,     0,     0,     0,     0,    82,
    1118             :       70,     0,    81,    78,     0,     0,    87,    92,   239,     0,
    1119             :      331,    73,   108,     0,     0,    72,    74,    80,    75,    77,
    1120             :       96,   100,   101,   102,   103,     0,    93,     0,   107,     0,
    1121             :        0,    79,     0,    97,     0,    88,   203,   106,   349,   347,
    1122             :      332,   341,   342,   346,   109,    83,     0,     0,    94,   107,
    1123             :        0,     0,     0,     0,   339,     0,   344,     0,    98,    89,
    1124             :      204,   350,   348,   333,   340,     0,   352,   343,   345,     0,
    1125             :      111,   113,   105,     0,   355,     0,     0,   110,   104,     0,
    1126             :      351,   353,   112,    99,     0,   354
    1127             : };
    1128             : 
    1129             : /* YYDEFGOTO[NTERM-NUM].  */
    1130             : static const yytype_int16 yydefgoto[] =
    1131             : {
    1132             :       -1,     4,     5,     6,    41,     7,    24,    68,    62,    65,
    1133             :       58,    66,    67,    63,     8,    10,    71,   161,   239,    25,
    1134             :       26,    52,    27,    28,    61,   158,   223,    29,    60,   127,
    1135             :      193,   224,   293,   295,   297,   225,   350,   414,   226,   290,
    1136             :      291,   422,   430,   431,   448,   432,   446,   433,   444,   227,
    1137             :      296,   400,   423,   457,   479,   228,   436,   464,   437,   476,
    1138             :      502,   455,   509,   466,   467,   460,   487,   499,   500,   229,
    1139             :      354,   230,   241,   242,   306,   243,    48,   142,   203,   303,
    1140             :       31,    49,   144,   205,   304,   356,   264,   265,   266,   267,
    1141             :      268,   269,   270,   271,   272,   273,   274,    82,    32,    51,
    1142             :      146,    33,    64,   159,   232,   318,   407,   247,   319,   320,
    1143             :      321,    34,    53,   147,   170,   171,   248,   324,   325,   376,
    1144             :      411,   419,   480,    35,    54,   148,   174,   175,   172,   207,
    1145             :      322,    36,    56,   104,   154,   183,   216,   328,   184,   185,
    1146             :      186,   187,   217,   190,   219,   191,   218,   343,   365,   405,
    1147             :      424,   275,   141,   164,   106,   197,   108,   153,   181,   182,
    1148             :      109,   110,    85,    86,   111,   112,   113,   114,   115,   116,
    1149             :      117,   118,   119,   120,   155,   121,   151,   213,   327,   122,
    1150             :       69,   160,   236,    38,    55,   149,   178,   210,   199,   194,
    1151             :      233,   238,   355,   201,   123,    50,   145,   206,   307,   244,
    1152             :      309,   403,   245,   124,    57,   156,   220,   344,   413,   426,
    1153             :      459,   483,   396,   470,   484,   471,   485,   472,   486,   473,
    1154             :      482,   481,   503,   497,   505,   514,    91
    1155             : };
    1156             : 
    1157             : /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    1158             :    STATE-NUM.  */
    1159             : #define YYPACT_NINF -415
    1160             : static const yytype_int16 yypact[] =
    1161             : {
    1162             :      708,     0,  -415,  -415,    35,  -415,   234,   716,  -415,  -415,
    1163             :      147,  -415,  -415,    17,  -415,  -415,  -415,  -415,  -415,  -415,
    1164             :     -415,  -415,  -415,  -415,  -415,  -415,   -36,  -415,  -415,  -415,
    1165             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1166             :     -415,     2,  -415,  -415,  -415,  -415,  -415,  -415,   661,   147,
    1167             :      147,   147,   147,   147,   147,   147,   490,   147,    29,  -415,
    1168             :     -415,    61,    52,    72,    96,    98,    99,   102,   103,   104,
    1169             :     -415,   109,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1170             :       77,  -415,  -415,   -39,  -415,  -415,  -415,  -415,  -415,  -415,
    1171             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,    92,
    1172             :     -415,  -415,  -415,  -415,  -415,   -32,  -415,   110,  -415,  -415,
    1173             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1174             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,    83,  -415,  -415,
    1175             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1176             :     -415,   147,   147,  -415,   114,   115,    30,   -33,   -26,   100,
    1177             :     -415,   105,   608,  -415,   147,   117,   150,   -39,  -415,  -415,
    1178             :      637,   458,  -415,  -415,   147,  -415,  -415,  -415,  -415,    83,
    1179             :     -415,  -415,  -415,    83,  -415,  -415,  -415,   147,    30,  -415,
    1180             :      110,   -44,  -415,  -415,  -415,  -415,  -415,  -415,   118,  -415,
    1181             :     -415,  -415,  -415,   290,   366,   -29,   -32,  -415,   121,  -415,
    1182             :     -415,  -415,  -415,   119,  -415,   180,   147,  -415,   -39,   -39,
    1183             :      -12,  -415,  -415,   608,   608,  -415,   123,   117,    13,   117,
    1184             :      125,  -415,   748,   128,  -415,  -415,   608,  -415,  -415,  -415,
    1185             :      181,   110,   134,  -415,  -415,   136,   148,   411,   147,   152,
    1186             :     -415,  -415,   180,  -415,  -415,    12,   146,    49,   155,   147,
    1187             :     -415,   137,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1188             :       13,    51,    51,    51,  -415,   153,   151,   154,     1,    31,
    1189             :       44,  -415,  -415,  -415,  -415,   -39,  -415,  -415,   159,  -415,
    1190             :     -415,  -415,  -415,  -415,  -415,   164,  -415,  -415,  -415,  -415,
    1191             :       63,  -415,  -415,   158,   110,   170,   147,   171,  -415,  -415,
    1192             :     -415,  -415,  -415,    13,   174,  -415,   172,   175,   173,   176,
    1193             :       13,   183,  -415,    83,    83,  -415,   769,   580,   187,  -415,
    1194             :       83,    83,   186,  -415,  -415,  -415,  -415,   177,   147,   184,
    1195             :     -415,  -415,  -415,    13,    13,    13,    13,    13,    13,    13,
    1196             :       13,    13,    13,   188,   311,  -415,  -415,  -415,   769,  -415,
    1197             :      147,  -415,  -415,  -415,    83,   189,  -415,  -415,  -415,  -415,
    1198             :     -415,  -415,  -415,  -415,  -415,   191,   -39,   194,  -415,  -415,
    1199             :     -415,   110,  -415,   195,   196,  -415,    74,  -415,  -415,  -415,
    1200             :      151,   154,     1,    31,    31,    44,    44,  -415,  -415,  -415,
    1201             :     -415,   -39,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1202             :      192,   -39,  -415,   147,  -415,   200,  -415,   147,  -415,  -415,
    1203             :     -415,  -415,  -415,   201,   209,  -415,  -415,  -415,  -415,   205,
    1204             :     -415,    33,  -415,    26,    83,    26,   212,   214,   241,  -415,
    1205             :     -415,   215,   227,   229,   169,    97,   216,  -415,   -39,     9,
    1206             :     -415,  -415,  -415,   220,   241,  -415,  -415,  -415,  -415,  -415,
    1207             :     -415,   110,  -415,  -415,  -415,   218,  -415,   213,   241,    14,
    1208             :      217,  -415,   228,  -415,    18,  -415,  -415,  -415,  -415,  -415,
    1209             :     -415,  -415,  -415,  -415,  -415,  -415,   608,   608,  -415,   241,
    1210             :      231,    13,   224,   232,    14,   535,    14,    83,   110,  -415,
    1211             :     -415,  -415,  -415,  -415,  -415,   -28,  -415,  -415,  -415,    32,
    1212             :     -415,   -39,   236,   230,  -415,   147,    83,  -415,  -415,   147,
    1213             :     -415,  -415,  -415,  -415,   235,  -415
    1214             : };
    1215             : 
    1216             : /* YYPGOTO[NTERM-NUM].  */
    1217             : static const yytype_int16 yypgoto[] =
    1218             : {
    1219             :     -415,  -415,     4,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1220             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1221             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -129,  -415,
    1222             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,    53,  -415,
    1223             :      -41,  -415,  -415,  -415,  -415,  -128,  -415,  -126,  -415,  -415,
    1224             :     -415,  -415,  -415,  -415,  -415,  -415,  -121,  -415,  -156,  -415,
    1225             :     -415,  -415,  -415,  -169,  -414,  -415,  -415,  -415,  -195,  -415,
    1226             :     -415,  -415,    70,  -415,  -415,   306,  -415,  -415,  -415,  -415,
    1227             :     -415,  -415,  -415,  -415,  -415,  -415,  -252,  -415,   -18,   -17,
    1228             :      -16,  -198,  -196,  -189,  -106,  -415,  -415,  -415,  -415,  -415,
    1229             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1230             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,
    1231             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,   206,  -415,
    1232             :     -415,  -415,  -415,  -415,  -415,  -229,  -415,  -415,  -321,   -30,
    1233             :     -415,  -415,  -415,   120,  -415,   129,  -415,  -415,  -299,  -415,
    1234             :     -415,   -45,  -415,  -415,  -164,   -52,  -148,   140,  -415,   130,
    1235             :     -415,   -46,  -415,  -415,   291,   -43,   301,   -42,  -415,  -415,
    1236             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,   350,
    1237             :     -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,  -415,   160,
    1238             :      198,  -415,  -415,  -415,    -6,  -415,  -415,  -415,  -415,  -415,
    1239             :     -415,  -415,   -38,   352,  -415,  -415,  -415,  -415,  -415,  -415,
    1240             :     -415,  -415,  -415,  -415,  -415,  -123,  -415,  -415,  -415,  -116,
    1241             :     -415,  -415,  -415,  -415,  -415,  -415,   -10
    1242             : };
    1243             : 
    1244             : /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    1245             :    positive, shift that token.  If negative, reduce the rule which
    1246             :    number is the opposite.  If YYTABLE_NINF, syntax error.  */
    1247             : #define YYTABLE_NINF -322
    1248             : static const yytype_int16 yytable[] =
    1249             : {
    1250             :       46,    39,    84,    83,   107,    88,    90,   378,   329,   301,
    1251             :       12,   105,   198,   308,   443,   367,    42,   167,   143,   477,
    1252             :      468,   373,   374,   214,   469,   143,   -43,   434,    59,   168,
    1253             :      462,   169,   234,   504,   427,    11,   168,   215,   173,    92,
    1254             :       93,    94,    95,    96,    97,    98,   198,   125,   152,   212,
    1255             :      311,   357,   150,   150,    42,   249,   336,   337,   363,   255,
    1256             :      256,     9,   312,    70,    43,    44,    45,   313,   314,   250,
    1257             :       81,   257,   258,   259,   315,  -321,   456,    42,   458,  -321,
    1258             :       47,   260,   157,   435,   428,   429,    42,   261,   262,   198,
    1259             :      126,   435,   263,   -95,    59,   -95,   -76,   255,   256,   506,
    1260             :      180,   507,    43,    44,    45,   338,   339,   105,    81,   257,
    1261             :      258,   259,  -212,   129,   316,   196,   138,   139,   140,   260,
    1262             :      340,   341,   342,   128,   208,    43,    44,    45,   209,   347,
    1263             :      348,   162,   163,   130,    43,    44,    45,   410,   383,   384,
    1264             :       81,   231,   385,   386,   188,   452,   453,   454,   105,   196,
    1265             :       42,   387,   388,   389,   204,   330,   331,   332,   131,   132,
    1266             :      133,   251,   180,   134,   135,   202,   136,   211,   105,   105,
    1267             :       99,   137,    42,   150,   294,  -286,   165,   166,   418,   192,
    1268             :      177,   105,   189,  -229,   511,   179,  -248,    14,   513,   240,
    1269             :      253,   292,   196,   277,   298,   100,   246,   299,    43,    44,
    1270             :       45,  -249,   101,    72,    73,    74,    75,    76,    77,    78,
    1271             :       79,   300,   102,   103,    80,   302,   310,   323,  -290,   349,
    1272             :       43,    44,    45,   334,   333,   345,    81,   335,   188,   491,
    1273             :      346,   351,   353,   359,    -4,     1,   450,   358,   360,   326,
    1274             :      361,   -10,   -10,   362,   364,   -10,   -10,   -10,   372,   375,
    1275             :      402,     2,   404,   379,   390,   406,   408,   409,   377,   -10,
    1276             :      415,   -10,   -10,   442,   -10,   371,   -10,   417,   366,   366,
    1277             :      420,   421,   105,   425,   440,   366,   366,   441,   445,   429,
    1278             :      428,   461,   465,   456,   463,   474,   352,     3,   492,   475,
    1279             :      508,    99,   490,    42,   510,   493,   515,    -4,   392,   391,
    1280             :      317,   393,   394,  -117,   439,   449,   447,   397,   478,   401,
    1281             :      489,   512,   305,    30,    42,   380,   100,   381,   188,   382,
    1282             :      398,   496,    16,   101,    72,    73,    74,    75,    76,    77,
    1283             :       78,    79,   221,   102,   103,    80,   235,   254,   395,    87,
    1284             :      399,    43,    44,    45,   252,    72,    73,    81,   276,    89,
    1285             :       77,    78,    79,   -37,   176,   222,    80,    37,   200,    40,
    1286             :      237,   494,    43,    44,    45,   416,   412,   195,    81,    42,
    1287             :      498,     0,     0,     0,     0,     0,     0,     0,     0,   438,
    1288             :        0,     0,   451,     0,     0,     0,     0,     0,     0,   105,
    1289             :        0,     0,   100,   246,     0,     0,     0,   188,     0,   101,
    1290             :       72,    73,    74,    75,    76,    77,    78,    79,     0,   102,
    1291             :      103,    80,   195,     0,    42,     0,     0,    43,    44,    45,
    1292             :        0,     0,     0,    81,   488,   451,     0,     0,     0,  -174,
    1293             :        0,   105,   105,   107,     0,     0,     0,   100,     0,     0,
    1294             :      105,     0,   501,     0,   101,    72,    73,    74,    75,    76,
    1295             :       77,    78,    79,     0,   102,   103,    80,     0,     0,     1,
    1296             :        0,   501,    43,    44,    45,   -10,   -10,     0,    81,   -10,
    1297             :      -10,   -10,     0,     0,  -304,     2,     0,     0,     0,     0,
    1298             :        0,     0,     0,   -10,     0,   -10,   -10,     0,   -10,     0,
    1299             :      -10,    99,     0,    42,     0,   188,     0,     0,     0,   188,
    1300             :        0,    16,     0,     0,     0,     0,     0,     0,     0,     0,
    1301             :        0,     3,     0,     0,     0,     0,   100,     0,    21,     0,
    1302             :        0,    -4,    23,   101,    72,    73,    74,    75,    76,    77,
    1303             :       78,    79,     0,   102,   103,    80,   495,     0,    42,     0,
    1304             :        0,    43,    44,    45,     0,     0,    16,    81,     0,     0,
    1305             :        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    1306             :        0,   100,     0,    21,     0,     0,     0,    23,   101,    72,
    1307             :       73,    74,    75,    76,    77,    78,    79,     0,   102,   103,
    1308             :       80,    99,     0,    42,     0,     0,    43,    44,    45,     0,
    1309             :        0,     0,    81,   369,     0,     0,     0,     0,     0,     0,
    1310             :        0,     0,     0,     0,     0,   370,   100,     0,     0,    99,
    1311             :        0,    42,     0,   101,    72,    73,    74,    75,    76,    77,
    1312             :       78,    79,     0,   102,   103,    80,     0,     0,     0,     0,
    1313             :        0,    43,    44,    45,   100,     0,     0,    81,   195,     0,
    1314             :       42,   101,    72,    73,    74,    75,    76,    77,    78,    79,
    1315             :        0,   102,   103,    80,     0,     0,     0,     0,     0,    43,
    1316             :       44,    45,     0,   100,    42,    81,     0,     0,     0,     0,
    1317             :      101,    72,    73,    74,    75,    76,    77,    78,    79,     0,
    1318             :      102,   103,    80,     0,     0,     0,     0,     0,    43,    44,
    1319             :       45,     0,     0,     0,    81,    72,    73,    74,    75,    76,
    1320             :       77,    78,    79,     0,     0,     0,    80,     0,    -4,     1,
    1321             :        0,     0,    43,    44,    45,   -10,   -10,    13,    81,   -10,
    1322             :      -10,   -10,     0,    14,    15,     2,     0,    16,    17,    18,
    1323             :        0,     0,     0,   -10,     0,   -10,   -10,     0,   -10,     0,
    1324             :      -10,    19,     0,    20,    21,     0,    22,     0,    23,   278,
    1325             :        0,     0,   279,   280,     0,     0,     0,   281,     0,     0,
    1326             :        0,     3,   282,   283,   284,     0,     0,     0,   285,   286,
    1327             :      278,   287,   288,   279,   280,     0,     0,     0,   281,   289,
    1328             :        0,     0,     0,   282,   283,   284,     0,     0,     0,   368,
    1329             :      286,     0,   287,   288,     0,     0,     0,     0,     0,     0,
    1330             :      289
    1331             : };
    1332             : 
    1333             : #define yypact_value_is_default(yystate) \
    1334             :   ((yystate) == (-415))
    1335             : 
    1336             : #define yytable_value_is_error(yytable_value) \
    1337             :   YYID (0)
    1338             : 
    1339             : static const yytype_int16 yycheck[] =
    1340             : {
    1341             :       10,     7,    48,    48,    56,    48,    48,   328,   260,   238,
    1342             :        6,    56,   160,     1,   428,   314,     3,   146,    57,     1,
    1343             :        6,   320,   321,    67,    10,    57,    62,     1,    64,    62,
    1344             :      444,    64,    61,    61,     1,     0,    62,    81,    64,    49,
    1345             :       50,    51,    52,    53,    54,    55,   194,    57,    80,   178,
    1346             :        1,   303,    81,    81,     3,    67,    55,    56,   310,    46,
    1347             :       47,    61,    13,    61,    51,    52,    53,    18,    19,    81,
    1348             :       57,    58,    59,    60,    25,    63,    67,     3,    69,    67,
    1349             :       63,    68,   127,    65,    51,    52,     3,    74,    75,   237,
    1350             :       61,    65,    79,    67,    64,    69,    63,    46,    47,    67,
    1351             :      152,    69,    51,    52,    53,    74,    75,   152,    57,    58,
    1352             :       59,    60,    63,    61,    65,   160,    39,    40,    41,    68,
    1353             :       76,    77,    78,    62,   169,    51,    52,    53,   173,    66,
    1354             :       67,   141,   142,    61,    51,    52,    53,    63,   336,   337,
    1355             :       57,   193,   338,   339,   154,    48,    49,    50,   193,   194,
    1356             :        3,   340,   341,   342,   164,   261,   262,   263,    62,    61,
    1357             :       61,   213,   214,    61,    61,   161,    62,   177,   213,   214,
    1358             :        1,    62,     3,    81,   226,    65,    62,    62,   407,    29,
    1359             :       80,   226,    65,    65,   505,    80,    65,     7,   509,    70,
    1360             :       67,    63,   237,    68,    13,    26,   206,    63,    51,    52,
    1361             :       53,    65,    33,    34,    35,    36,    37,    38,    39,    40,
    1362             :       41,    63,    43,    44,    45,    63,    70,    62,    81,    61,
    1363             :       51,    52,    53,    72,    71,    66,    57,    73,   238,   481,
    1364             :       66,    61,    61,    61,     0,     1,    67,    63,    63,   249,
    1365             :       67,     7,     8,    67,    61,    11,    12,    13,    61,    63,
    1366             :       61,    17,    61,    69,    66,    61,    61,    61,    81,    25,
    1367             :       68,    27,    28,    22,    30,   317,    32,    67,   313,   314,
    1368             :       69,    62,   317,    68,    62,   320,   321,    63,    63,    52,
    1369             :       51,    61,    69,    67,    66,    68,   296,    53,    64,    61,
    1370             :       54,     1,    61,     3,    64,    63,    61,    63,   344,   344,
    1371             :      247,   344,   344,    13,   425,   433,   432,   348,   464,   354,
    1372             :      479,   506,   242,     7,     3,   333,    26,   334,   328,   335,
    1373             :      350,   485,    11,    33,    34,    35,    36,    37,    38,    39,
    1374             :       40,    41,    42,    43,    44,    45,   196,   217,   344,    48,
    1375             :      350,    51,    52,    53,   214,    34,    35,    57,   219,    48,
    1376             :       39,    40,    41,    63,   148,    65,    45,     7,   160,     7,
    1377             :      200,   484,    51,    52,    53,   403,   376,     1,    57,     3,
    1378             :      486,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   424,
    1379             :       -1,    -1,   434,    -1,    -1,    -1,    -1,    -1,    -1,   434,
    1380             :       -1,    -1,    26,   403,    -1,    -1,    -1,   407,    -1,    33,
    1381             :       34,    35,    36,    37,    38,    39,    40,    41,    -1,    43,
    1382             :       44,    45,     1,    -1,     3,    -1,    -1,    51,    52,    53,
    1383             :       -1,    -1,    -1,    57,   476,   477,    -1,    -1,    -1,    63,
    1384             :       -1,   476,   477,   485,    -1,    -1,    -1,    26,    -1,    -1,
    1385             :      485,    -1,   487,    -1,    33,    34,    35,    36,    37,    38,
    1386             :       39,    40,    41,    -1,    43,    44,    45,    -1,    -1,     1,
    1387             :       -1,   506,    51,    52,    53,     7,     8,    -1,    57,    11,
    1388             :       12,    13,    -1,    -1,    63,    17,    -1,    -1,    -1,    -1,
    1389             :       -1,    -1,    -1,    25,    -1,    27,    28,    -1,    30,    -1,
    1390             :       32,     1,    -1,     3,    -1,   505,    -1,    -1,    -1,   509,
    1391             :       -1,    11,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    1392             :       -1,    53,    -1,    -1,    -1,    -1,    26,    -1,    28,    -1,
    1393             :       -1,    63,    32,    33,    34,    35,    36,    37,    38,    39,
    1394             :       40,    41,    -1,    43,    44,    45,     1,    -1,     3,    -1,
    1395             :       -1,    51,    52,    53,    -1,    -1,    11,    57,    -1,    -1,
    1396             :       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    1397             :       -1,    26,    -1,    28,    -1,    -1,    -1,    32,    33,    34,
    1398             :       35,    36,    37,    38,    39,    40,    41,    -1,    43,    44,
    1399             :       45,     1,    -1,     3,    -1,    -1,    51,    52,    53,    -1,
    1400             :       -1,    -1,    57,    13,    -1,    -1,    -1,    -1,    -1,    -1,
    1401             :       -1,    -1,    -1,    -1,    -1,    25,    26,    -1,    -1,     1,
    1402             :       -1,     3,    -1,    33,    34,    35,    36,    37,    38,    39,
    1403             :       40,    41,    -1,    43,    44,    45,    -1,    -1,    -1,    -1,
    1404             :       -1,    51,    52,    53,    26,    -1,    -1,    57,     1,    -1,
    1405             :        3,    33,    34,    35,    36,    37,    38,    39,    40,    41,
    1406             :       -1,    43,    44,    45,    -1,    -1,    -1,    -1,    -1,    51,
    1407             :       52,    53,    -1,    26,     3,    57,    -1,    -1,    -1,    -1,
    1408             :       33,    34,    35,    36,    37,    38,    39,    40,    41,    -1,
    1409             :       43,    44,    45,    -1,    -1,    -1,    -1,    -1,    51,    52,
    1410             :       53,    -1,    -1,    -1,    57,    34,    35,    36,    37,    38,
    1411             :       39,    40,    41,    -1,    -1,    -1,    45,    -1,     0,     1,
    1412             :       -1,    -1,    51,    52,    53,     7,     8,     1,    57,    11,
    1413             :       12,    13,    -1,     7,     8,    17,    -1,    11,    12,    13,
    1414             :       -1,    -1,    -1,    25,    -1,    27,    28,    -1,    30,    -1,
    1415             :       32,    25,    -1,    27,    28,    -1,    30,    -1,    32,     1,
    1416             :       -1,    -1,     4,     5,    -1,    -1,    -1,     9,    -1,    -1,
    1417             :       -1,    53,    14,    15,    16,    -1,    -1,    -1,    20,    21,
    1418             :        1,    23,    24,     4,     5,    -1,    -1,    -1,     9,    31,
    1419             :       -1,    -1,    -1,    14,    15,    16,    -1,    -1,    -1,    20,
    1420             :       21,    -1,    23,    24,    -1,    -1,    -1,    -1,    -1,    -1,
    1421             :       31
    1422             : };
    1423             : 
    1424             : /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    1425             :    symbol of state STATE-NUM.  */
    1426             : static const yytype_uint16 yystos[] =
    1427             : {
    1428             :        0,     1,    17,    53,    83,    84,    85,    87,    96,    61,
    1429             :       97,     0,    84,     1,     7,     8,    11,    12,    13,    25,
    1430             :       27,    28,    30,    32,    88,   101,   102,   104,   105,   109,
    1431             :      157,   162,   180,   183,   193,   205,   213,   261,   265,   276,
    1432             :      285,    86,     3,    51,    52,    53,   308,    63,   158,   163,
    1433             :      277,   181,   103,   194,   206,   266,   214,   286,    92,    64,
    1434             :      110,   106,    90,    95,   184,    91,    93,    94,    89,   262,
    1435             :       61,    98,    34,    35,    36,    37,    38,    39,    40,    41,
    1436             :       45,    57,   179,   233,   243,   244,   245,   246,   247,   248,
    1437             :      249,   308,   308,   308,   308,   308,   308,   308,   308,     1,
    1438             :       26,    33,    43,    44,   215,   233,   236,   237,   238,   242,
    1439             :      243,   246,   247,   248,   249,   250,   251,   252,   253,   254,
    1440             :      255,   257,   261,   276,   285,   308,    61,   111,    62,    61,
    1441             :       61,    62,    61,    61,    61,    61,    62,    62,    39,    40,
    1442             :       41,   234,   159,    57,   164,   278,   182,   195,   207,   267,
    1443             :       81,   258,    80,   239,   216,   256,   287,   233,   107,   185,
    1444             :      263,    99,   308,   308,   235,    62,    62,   110,    62,    64,
    1445             :      196,   197,   210,    64,   208,   209,   210,    80,   268,    80,
    1446             :      237,   240,   241,   217,   220,   221,   222,   223,   308,    65,
    1447             :      225,   227,    29,   112,   271,     1,   233,   237,   238,   270,
    1448             :      272,   275,    84,   160,   308,   165,   279,   211,   233,   233,
    1449             :      269,   308,   110,   259,    67,    81,   218,   224,   228,   226,
    1450             :      288,    42,    65,   108,   113,   117,   120,   131,   137,   151,
    1451             :      153,   237,   186,   272,    61,   239,   264,   271,   273,   100,
    1452             :       70,   154,   155,   157,   281,   284,   308,   189,   198,    67,
    1453             :       81,   237,   241,    67,   225,    46,    47,    58,    59,    60,
    1454             :       68,    74,    75,    79,   168,   169,   170,   171,   172,   173,
    1455             :      174,   175,   176,   177,   178,   233,   227,    68,     1,     4,
    1456             :        5,     9,    14,    15,    16,    20,    21,    23,    24,    31,
    1457             :      121,   122,    63,   114,   237,   115,   132,   116,    13,    63,
    1458             :       63,   217,    63,   161,   166,   154,   156,   280,     1,   282,
    1459             :       70,     1,    13,    18,    19,    25,    65,   120,   187,   190,
    1460             :      191,   192,   212,    62,   199,   200,   308,   260,   219,   168,
    1461             :      176,   176,   176,    71,    72,    73,    55,    56,    74,    75,
    1462             :       76,    77,    78,   229,   289,    66,    66,    66,    67,    61,
    1463             :      118,    61,   308,    61,   152,   274,   167,   168,    63,    61,
    1464             :       63,    67,    67,   168,    61,   230,   233,   230,    20,    13,
    1465             :       25,   237,    61,   230,   230,    63,   201,    81,   220,    69,
    1466             :      170,   171,   172,   173,   173,   174,   174,   175,   175,   175,
    1467             :       66,   233,   243,   247,   249,   276,   294,   122,   221,   308,
    1468             :      133,   233,    61,   283,    61,   231,    61,   188,    61,    61,
    1469             :       63,   202,   308,   290,   119,    68,   284,    67,   217,   203,
    1470             :       69,    62,   123,   134,   232,    68,   291,     1,    51,    52,
    1471             :      124,   125,   127,   129,     1,    65,   138,   140,   233,   138,
    1472             :       62,    63,    22,   146,   130,    63,   128,   129,   126,   127,
    1473             :       67,   237,    48,    49,    50,   143,    67,   135,    69,   292,
    1474             :      147,    61,   146,    66,   139,    69,   145,   146,     6,    10,
    1475             :      295,   297,   299,   301,    68,    61,   141,     1,   140,   136,
    1476             :      204,   303,   302,   293,   296,   298,   300,   148,   237,   145,
    1477             :       61,   168,    64,    63,   297,     1,   236,   305,   301,   149,
    1478             :      150,   233,   142,   304,    61,   306,    67,    69,    54,   144,
    1479             :       64,   220,   150,   220,   307,    61
    1480             : };
    1481             : 
    1482             : #define yyerrok         (yyerrstatus = 0)
    1483             : #define yyclearin       (yychar = YYEMPTY)
    1484             : #define YYEMPTY         (-2)
    1485             : #define YYEOF           0
    1486             : 
    1487             : #define YYACCEPT        goto yyacceptlab
    1488             : #define YYABORT         goto yyabortlab
    1489             : #define YYERROR         goto yyerrorlab
    1490             : 
    1491             : 
    1492             : /* Like YYERROR except do call yyerror.  This remains here temporarily
    1493             :    to ease the transition to the new meaning of YYERROR, for GCC.
    1494             :    Once GCC version 2 has supplanted version 1, this can go.  However,
    1495             :    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
    1496             :    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
    1497             :    discussed.  */
    1498             : 
    1499             : #define YYFAIL          goto yyerrlab
    1500             : #if defined YYFAIL
    1501             :   /* This is here to suppress warnings from the GCC cpp's
    1502             :      -Wunused-macros.  Normally we don't worry about that warning, but
    1503             :      some users do, and we want to make it easy for users to remove
    1504             :      YYFAIL uses, which will produce warnings from Bison 2.5.  */
    1505             : #endif
    1506             : 
    1507             : #define YYRECOVERING()  (!!yyerrstatus)
    1508             : 
    1509             : #define YYBACKUP(Token, Value)                                  \
    1510             : do                                                              \
    1511             :   if (yychar == YYEMPTY && yylen == 1)                          \
    1512             :     {                                                           \
    1513             :       yychar = (Token);                                         \
    1514             :       yylval = (Value);                                         \
    1515             :       YYPOPSTACK (1);                                           \
    1516             :       goto yybackup;                                            \
    1517             :     }                                                           \
    1518             :   else                                                          \
    1519             :     {                                                           \
    1520             :       yyerror (YY_("syntax error: cannot back up")); \
    1521             :       YYERROR;                                                  \
    1522             :     }                                                           \
    1523             : while (YYID (0))
    1524             : 
    1525             : 
    1526             : #define YYTERROR        1
    1527             : #define YYERRCODE       256
    1528             : 
    1529             : 
    1530             : /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
    1531             :    If N is 0, then set CURRENT to the empty location which ends
    1532             :    the previous symbol: RHS[0] (always defined).  */
    1533             : 
    1534             : #define YYRHSLOC(Rhs, K) ((Rhs)[K])
    1535             : #ifndef YYLLOC_DEFAULT
    1536             : # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
    1537             :     do                                                                  \
    1538             :       if (YYID (N))                                                    \
    1539             :         {                                                               \
    1540             :           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
    1541             :           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
    1542             :           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
    1543             :           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
    1544             :         }                                                               \
    1545             :       else                                                              \
    1546             :         {                                                               \
    1547             :           (Current).first_line   = (Current).last_line   =              \
    1548             :             YYRHSLOC (Rhs, 0).last_line;                                \
    1549             :           (Current).first_column = (Current).last_column =              \
    1550             :             YYRHSLOC (Rhs, 0).last_column;                              \
    1551             :         }                                                               \
    1552             :     while (YYID (0))
    1553             : #endif
    1554             : 
    1555             : 
    1556             : /* This macro is provided for backward compatibility. */
    1557             : 
    1558             : #ifndef YY_LOCATION_PRINT
    1559             : # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
    1560             : #endif
    1561             : 
    1562             : 
    1563             : /* YYLEX -- calling `yylex' with the right arguments.  */
    1564             : 
    1565             : #ifdef YYLEX_PARAM
    1566             : # define YYLEX yylex (YYLEX_PARAM)
    1567             : #else
    1568             : # define YYLEX yylex ()
    1569             : #endif
    1570             : 
    1571             : /* Enable debugging if requested.  */
    1572             : #if YYDEBUG
    1573             : 
    1574             : # ifndef YYFPRINTF
    1575             : #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
    1576             : #  define YYFPRINTF fprintf
    1577             : # endif
    1578             : 
    1579             : # define YYDPRINTF(Args)                        \
    1580             : do {                                            \
    1581             :   if (yydebug)                                  \
    1582             :     YYFPRINTF Args;                             \
    1583             : } while (YYID (0))
    1584             : 
    1585             : # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
    1586             : do {                                                                      \
    1587             :   if (yydebug)                                                            \
    1588             :     {                                                                     \
    1589             :       YYFPRINTF (stderr, "%s ", Title);                                         \
    1590             :       yy_symbol_print (stderr,                                            \
    1591             :                   Type, Value); \
    1592             :       YYFPRINTF (stderr, "\n");                                                 \
    1593             :     }                                                                     \
    1594             : } while (YYID (0))
    1595             : 
    1596             : 
    1597             : /*--------------------------------.
    1598             : | Print this symbol on YYOUTPUT.  |
    1599             : `--------------------------------*/
    1600             : 
    1601             : /*ARGSUSED*/
    1602             : #if (defined __STDC__ || defined __C99__FUNC__ \
    1603             :      || defined __cplusplus || defined _MSC_VER)
    1604             : static void
    1605           0 : yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
    1606             : #else
    1607             : static void
    1608             : yy_symbol_value_print (yyoutput, yytype, yyvaluep)
    1609             :     FILE *yyoutput;
    1610             :     int yytype;
    1611             :     YYSTYPE const * const yyvaluep;
    1612             : #endif
    1613             : {
    1614           0 :   if (!yyvaluep)
    1615           0 :     return;
    1616             : # ifdef YYPRINT
    1617             :   if (yytype < YYNTOKENS)
    1618             :     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
    1619             : # else
    1620             :   YYUSE (yyoutput);
    1621             : # endif
    1622             :   switch (yytype)
    1623             :     {
    1624             :       default:
    1625           0 :         break;
    1626             :     }
    1627             : }
    1628             : 
    1629             : 
    1630             : /*--------------------------------.
    1631             : | Print this symbol on YYOUTPUT.  |
    1632             : `--------------------------------*/
    1633             : 
    1634             : #if (defined __STDC__ || defined __C99__FUNC__ \
    1635             :      || defined __cplusplus || defined _MSC_VER)
    1636             : static void
    1637           0 : yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
    1638             : #else
    1639             : static void
    1640             : yy_symbol_print (yyoutput, yytype, yyvaluep)
    1641             :     FILE *yyoutput;
    1642             :     int yytype;
    1643             :     YYSTYPE const * const yyvaluep;
    1644             : #endif
    1645             : {
    1646           0 :   if (yytype < YYNTOKENS)
    1647           0 :     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
    1648             :   else
    1649           0 :     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
    1650             : 
    1651           0 :   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
    1652           0 :   YYFPRINTF (yyoutput, ")");
    1653           0 : }
    1654             : 
    1655             : /*------------------------------------------------------------------.
    1656             : | yy_stack_print -- Print the state stack from its BOTTOM up to its |
    1657             : | TOP (included).                                                   |
    1658             : `------------------------------------------------------------------*/
    1659             : 
    1660             : #if (defined __STDC__ || defined __C99__FUNC__ \
    1661             :      || defined __cplusplus || defined _MSC_VER)
    1662             : static void
    1663           0 : yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
    1664             : #else
    1665             : static void
    1666             : yy_stack_print (yybottom, yytop)
    1667             :     yytype_int16 *yybottom;
    1668             :     yytype_int16 *yytop;
    1669             : #endif
    1670             : {
    1671           0 :   YYFPRINTF (stderr, "Stack now");
    1672           0 :   for (; yybottom <= yytop; yybottom++)
    1673             :     {
    1674           0 :       int yybot = *yybottom;
    1675           0 :       YYFPRINTF (stderr, " %d", yybot);
    1676             :     }
    1677           0 :   YYFPRINTF (stderr, "\n");
    1678           0 : }
    1679             : 
    1680             : # define YY_STACK_PRINT(Bottom, Top)                            \
    1681             : do {                                                            \
    1682             :   if (yydebug)                                                  \
    1683             :     yy_stack_print ((Bottom), (Top));                           \
    1684             : } while (YYID (0))
    1685             : 
    1686             : 
    1687             : /*------------------------------------------------.
    1688             : | Report that the YYRULE is going to be reduced.  |
    1689             : `------------------------------------------------*/
    1690             : 
    1691             : #if (defined __STDC__ || defined __C99__FUNC__ \
    1692             :      || defined __cplusplus || defined _MSC_VER)
    1693             : static void
    1694           0 : yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
    1695             : #else
    1696             : static void
    1697             : yy_reduce_print (yyvsp, yyrule)
    1698             :     YYSTYPE *yyvsp;
    1699             :     int yyrule;
    1700             : #endif
    1701             : {
    1702           0 :   int yynrhs = yyr2[yyrule];
    1703             :   int yyi;
    1704           0 :   unsigned long int yylno = yyrline[yyrule];
    1705             :   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
    1706           0 :              yyrule - 1, yylno);
    1707             :   /* The symbols being reduced.  */
    1708           0 :   for (yyi = 0; yyi < yynrhs; yyi++)
    1709             :     {
    1710           0 :       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
    1711           0 :       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
    1712             :                        &(yyvsp[(yyi + 1) - (yynrhs)])
    1713           0 :                                        );
    1714           0 :       YYFPRINTF (stderr, "\n");
    1715             :     }
    1716           0 : }
    1717             : 
    1718             : # define YY_REDUCE_PRINT(Rule)          \
    1719             : do {                                    \
    1720             :   if (yydebug)                          \
    1721             :     yy_reduce_print (yyvsp, Rule); \
    1722             : } while (YYID (0))
    1723             : 
    1724             : /* Nonzero means print parse trace.  It is left uninitialized so that
    1725             :    multiple parsers can coexist.  */
    1726             : int yydebug;
    1727             : #else /* !YYDEBUG */
    1728             : # define YYDPRINTF(Args)
    1729             : # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
    1730             : # define YY_STACK_PRINT(Bottom, Top)
    1731             : # define YY_REDUCE_PRINT(Rule)
    1732             : #endif /* !YYDEBUG */
    1733             : 
    1734             : 
    1735             : /* YYINITDEPTH -- initial size of the parser's stacks.  */
    1736             : #ifndef YYINITDEPTH
    1737             : # define YYINITDEPTH 200
    1738             : #endif
    1739             : 
    1740             : /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
    1741             :    if the built-in stack extension method is used).
    1742             : 
    1743             :    Do not make this value too large; the results are undefined if
    1744             :    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
    1745             :    evaluated with infinite-precision integer arithmetic.  */
    1746             : 
    1747             : #ifndef YYMAXDEPTH
    1748             : # define YYMAXDEPTH 10000
    1749             : #endif
    1750             : 
    1751             : 
    1752             : #if YYERROR_VERBOSE
    1753             : 
    1754             : # ifndef yystrlen
    1755             : #  if defined __GLIBC__ && defined _STRING_H
    1756             : #   define yystrlen strlen
    1757             : #  else
    1758             : /* Return the length of YYSTR.  */
    1759             : #if (defined __STDC__ || defined __C99__FUNC__ \
    1760             :      || defined __cplusplus || defined _MSC_VER)
    1761             : static YYSIZE_T
    1762             : yystrlen (const char *yystr)
    1763             : #else
    1764             : static YYSIZE_T
    1765             : yystrlen (yystr)
    1766             :     const char *yystr;
    1767             : #endif
    1768             : {
    1769             :   YYSIZE_T yylen;
    1770             :   for (yylen = 0; yystr[yylen]; yylen++)
    1771             :     continue;
    1772             :   return yylen;
    1773             : }
    1774             : #  endif
    1775             : # endif
    1776             : 
    1777             : # ifndef yystpcpy
    1778             : #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
    1779             : #   define yystpcpy stpcpy
    1780             : #  else
    1781             : /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
    1782             :    YYDEST.  */
    1783             : #if (defined __STDC__ || defined __C99__FUNC__ \
    1784             :      || defined __cplusplus || defined _MSC_VER)
    1785             : static char *
    1786             : yystpcpy (char *yydest, const char *yysrc)
    1787             : #else
    1788             : static char *
    1789             : yystpcpy (yydest, yysrc)
    1790             :     char *yydest;
    1791             :     const char *yysrc;
    1792             : #endif
    1793             : {
    1794             :   char *yyd = yydest;
    1795             :   const char *yys = yysrc;
    1796             : 
    1797             :   while ((*yyd++ = *yys++) != '\0')
    1798             :     continue;
    1799             : 
    1800             :   return yyd - 1;
    1801             : }
    1802             : #  endif
    1803             : # endif
    1804             : 
    1805             : # ifndef yytnamerr
    1806             : /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
    1807             :    quotes and backslashes, so that it's suitable for yyerror.  The
    1808             :    heuristic is that double-quoting is unnecessary unless the string
    1809             :    contains an apostrophe, a comma, or backslash (other than
    1810             :    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
    1811             :    null, do not copy; instead, return the length of what the result
    1812             :    would have been.  */
    1813             : static YYSIZE_T
    1814           0 : yytnamerr (char *yyres, const char *yystr)
    1815             : {
    1816           0 :   if (*yystr == '"')
    1817             :     {
    1818           0 :       YYSIZE_T yyn = 0;
    1819           0 :       char const *yyp = yystr;
    1820             : 
    1821           0 :       for (;;)
    1822           0 :         switch (*++yyp)
    1823             :           {
    1824             :           case '\'':
    1825             :           case ',':
    1826           0 :             goto do_not_strip_quotes;
    1827             : 
    1828             :           case '\\':
    1829           0 :             if (*++yyp != '\\')
    1830           0 :               goto do_not_strip_quotes;
    1831             :             /* Fall through.  */
    1832             :           default:
    1833           0 :             if (yyres)
    1834           0 :               yyres[yyn] = *yyp;
    1835           0 :             yyn++;
    1836           0 :             break;
    1837             : 
    1838             :           case '"':
    1839           0 :             if (yyres)
    1840           0 :               yyres[yyn] = '\0';
    1841           0 :             return yyn;
    1842             :           }
    1843             :     do_not_strip_quotes: ;
    1844             :     }
    1845             : 
    1846           0 :   if (! yyres)
    1847           0 :     return yystrlen (yystr);
    1848             : 
    1849           0 :   return yystpcpy (yyres, yystr) - yyres;
    1850             : }
    1851             : # endif
    1852             : 
    1853             : /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
    1854             :    about the unexpected token YYTOKEN for the state stack whose top is
    1855             :    YYSSP.
    1856             : 
    1857             :    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
    1858             :    not large enough to hold the message.  In that case, also set
    1859             :    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
    1860             :    required number of bytes is too large to store.  */
    1861             : static int
    1862           0 : yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
    1863             :                 yytype_int16 *yyssp, int yytoken)
    1864             : {
    1865           0 :   YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
    1866           0 :   YYSIZE_T yysize = yysize0;
    1867             :   YYSIZE_T yysize1;
    1868             :   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
    1869             :   /* Internationalized format string. */
    1870           0 :   const char *yyformat = 0;
    1871             :   /* Arguments of yyformat. */
    1872             :   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
    1873             :   /* Number of reported tokens (one for the "unexpected", one per
    1874             :      "expected"). */
    1875           0 :   int yycount = 0;
    1876             : 
    1877             :   /* There are many possibilities here to consider:
    1878             :      - Assume YYFAIL is not used.  It's too flawed to consider.  See
    1879             :        <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
    1880             :        for details.  YYERROR is fine as it does not invoke this
    1881             :        function.
    1882             :      - If this state is a consistent state with a default action, then
    1883             :        the only way this function was invoked is if the default action
    1884             :        is an error action.  In that case, don't check for expected
    1885             :        tokens because there are none.
    1886             :      - The only way there can be no lookahead present (in yychar) is if
    1887             :        this state is a consistent state with a default action.  Thus,
    1888             :        detecting the absence of a lookahead is sufficient to determine
    1889             :        that there is no unexpected or expected token to report.  In that
    1890             :        case, just report a simple "syntax error".
    1891             :      - Don't assume there isn't a lookahead just because this state is a
    1892             :        consistent state with a default action.  There might have been a
    1893             :        previous inconsistent state, consistent state with a non-default
    1894             :        action, or user semantic action that manipulated yychar.
    1895             :      - Of course, the expected token list depends on states to have
    1896             :        correct lookahead information, and it depends on the parser not
    1897             :        to perform extra reductions after fetching a lookahead from the
    1898             :        scanner and before detecting a syntax error.  Thus, state merging
    1899             :        (from LALR or IELR) and default reductions corrupt the expected
    1900             :        token list.  However, the list is correct for canonical LR with
    1901             :        one exception: it will still contain any token that will not be
    1902             :        accepted due to an error action in a later state.
    1903             :   */
    1904           0 :   if (yytoken != YYEMPTY)
    1905             :     {
    1906           0 :       int yyn = yypact[*yyssp];
    1907           0 :       yyarg[yycount++] = yytname[yytoken];
    1908           0 :       if (!yypact_value_is_default (yyn))
    1909             :         {
    1910             :           /* Start YYX at -YYN if negative to avoid negative indexes in
    1911             :              YYCHECK.  In other words, skip the first -YYN actions for
    1912             :              this state because they are default actions.  */
    1913           0 :           int yyxbegin = yyn < 0 ? -yyn : 0;
    1914             :           /* Stay within bounds of both yycheck and yytname.  */
    1915           0 :           int yychecklim = YYLAST - yyn + 1;
    1916           0 :           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
    1917             :           int yyx;
    1918             : 
    1919           0 :           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
    1920           0 :             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
    1921             :                 && !yytable_value_is_error (yytable[yyx + yyn]))
    1922             :               {
    1923           0 :                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
    1924             :                   {
    1925           0 :                     yycount = 1;
    1926           0 :                     yysize = yysize0;
    1927           0 :                     break;
    1928             :                   }
    1929           0 :                 yyarg[yycount++] = yytname[yyx];
    1930           0 :                 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
    1931           0 :                 if (! (yysize <= yysize1
    1932             :                        && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
    1933           0 :                   return 2;
    1934           0 :                 yysize = yysize1;
    1935             :               }
    1936             :         }
    1937             :     }
    1938             : 
    1939           0 :   switch (yycount)
    1940             :     {
    1941             : # define YYCASE_(N, S)                      \
    1942             :       case N:                               \
    1943             :         yyformat = S;                       \
    1944             :       break
    1945           0 :       YYCASE_(0, YY_("syntax error"));
    1946           0 :       YYCASE_(1, YY_("syntax error, unexpected %s"));
    1947           0 :       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
    1948           0 :       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
    1949           0 :       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
    1950           0 :       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
    1951             : # undef YYCASE_
    1952             :     }
    1953             : 
    1954           0 :   yysize1 = yysize + yystrlen (yyformat);
    1955           0 :   if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
    1956           0 :     return 2;
    1957           0 :   yysize = yysize1;
    1958             : 
    1959           0 :   if (*yymsg_alloc < yysize)
    1960             :     {
    1961           0 :       *yymsg_alloc = 2 * yysize;
    1962           0 :       if (! (yysize <= *yymsg_alloc
    1963           0 :              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
    1964           0 :         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
    1965           0 :       return 1;
    1966             :     }
    1967             : 
    1968             :   /* Avoid sprintf, as that infringes on the user's name space.
    1969             :      Don't have undefined behavior even if the translation
    1970             :      produced a string with the wrong number of "%s"s.  */
    1971             :   {
    1972           0 :     char *yyp = *yymsg;
    1973           0 :     int yyi = 0;
    1974           0 :     while ((*yyp = *yyformat) != '\0')
    1975           0 :       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
    1976             :         {
    1977           0 :           yyp += yytnamerr (yyp, yyarg[yyi++]);
    1978           0 :           yyformat += 2;
    1979             :         }
    1980             :       else
    1981             :         {
    1982           0 :           yyp++;
    1983           0 :           yyformat++;
    1984             :         }
    1985             :   }
    1986           0 :   return 0;
    1987             : }
    1988             : #endif /* YYERROR_VERBOSE */
    1989             : 
    1990             : /*-----------------------------------------------.
    1991             : | Release the memory associated to this symbol.  |
    1992             : `-----------------------------------------------*/
    1993             : 
    1994             : /*ARGSUSED*/
    1995             : #if (defined __STDC__ || defined __C99__FUNC__ \
    1996             :      || defined __cplusplus || defined _MSC_VER)
    1997             : static void
    1998           0 : yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
    1999             : #else
    2000             : static void
    2001             : yydestruct (yymsg, yytype, yyvaluep)
    2002             :     const char *yymsg;
    2003             :     int yytype;
    2004             :     YYSTYPE *yyvaluep;
    2005             : #endif
    2006             : {
    2007             :   YYUSE (yyvaluep);
    2008             : 
    2009           0 :   if (!yymsg)
    2010           0 :     yymsg = "Deleting";
    2011           0 :   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
    2012             : 
    2013             :   switch (yytype)
    2014             :     {
    2015             : 
    2016             :       default:
    2017           0 :         break;
    2018             :     }
    2019           0 : }
    2020             : 
    2021             : 
    2022             : /* Prevent warnings from -Wmissing-prototypes.  */
    2023             : #ifdef YYPARSE_PARAM
    2024             : #if defined __STDC__ || defined __cplusplus
    2025             : int yyparse (void *YYPARSE_PARAM);
    2026             : #else
    2027             : int yyparse ();
    2028             : #endif
    2029             : #else /* ! YYPARSE_PARAM */
    2030             : #if defined __STDC__ || defined __cplusplus
    2031             : int yyparse (void);
    2032             : #else
    2033             : int yyparse ();
    2034             : #endif
    2035             : #endif /* ! YYPARSE_PARAM */
    2036             : 
    2037             : 
    2038             : /* The lookahead symbol.  */
    2039             : int yychar;
    2040             : 
    2041             : /* The semantic value of the lookahead symbol.  */
    2042             : YYSTYPE yylval;
    2043             : 
    2044             : /* Number of syntax errors so far.  */
    2045             : int yynerrs;
    2046             : 
    2047             : 
    2048             : /*----------.
    2049             : | yyparse.  |
    2050             : `----------*/
    2051             : 
    2052             : #ifdef YYPARSE_PARAM
    2053             : #if (defined __STDC__ || defined __C99__FUNC__ \
    2054             :      || defined __cplusplus || defined _MSC_VER)
    2055             : int
    2056             : yyparse (void *YYPARSE_PARAM)
    2057             : #else
    2058             : int
    2059             : yyparse (YYPARSE_PARAM)
    2060             :     void *YYPARSE_PARAM;
    2061             : #endif
    2062             : #else /* ! YYPARSE_PARAM */
    2063             : #if (defined __STDC__ || defined __C99__FUNC__ \
    2064             :      || defined __cplusplus || defined _MSC_VER)
    2065             : int
    2066           0 : yyparse (void)
    2067             : #else
    2068             : int
    2069             : yyparse ()
    2070             : 
    2071             : #endif
    2072             : #endif
    2073             : {
    2074             :     int yystate;
    2075             :     /* Number of tokens to shift before error messages enabled.  */
    2076             :     int yyerrstatus;
    2077             : 
    2078             :     /* The stacks and their tools:
    2079             :        `yyss': related to states.
    2080             :        `yyvs': related to semantic values.
    2081             : 
    2082             :        Refer to the stacks thru separate pointers, to allow yyoverflow
    2083             :        to reallocate them elsewhere.  */
    2084             : 
    2085             :     /* The state stack.  */
    2086             :     yytype_int16 yyssa[YYINITDEPTH];
    2087             :     yytype_int16 *yyss;
    2088             :     yytype_int16 *yyssp;
    2089             : 
    2090             :     /* The semantic value stack.  */
    2091             :     YYSTYPE yyvsa[YYINITDEPTH];
    2092             :     YYSTYPE *yyvs;
    2093             :     YYSTYPE *yyvsp;
    2094             : 
    2095             :     YYSIZE_T yystacksize;
    2096             : 
    2097             :   int yyn;
    2098             :   int yyresult;
    2099             :   /* Lookahead token as an internal (translated) token number.  */
    2100             :   int yytoken;
    2101             :   /* The variables used to return semantic value and location from the
    2102             :      action routines.  */
    2103             :   YYSTYPE yyval;
    2104             : 
    2105             : #if YYERROR_VERBOSE
    2106             :   /* Buffer for error messages, and its allocated size.  */
    2107             :   char yymsgbuf[128];
    2108           0 :   char *yymsg = yymsgbuf;
    2109           0 :   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
    2110             : #endif
    2111             : 
    2112             : #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
    2113             : 
    2114             :   /* The number of symbols on the RHS of the reduced rule.
    2115             :      Keep to zero when no symbol should be popped.  */
    2116           0 :   int yylen = 0;
    2117             : 
    2118           0 :   yytoken = 0;
    2119           0 :   yyss = yyssa;
    2120           0 :   yyvs = yyvsa;
    2121           0 :   yystacksize = YYINITDEPTH;
    2122             : 
    2123           0 :   YYDPRINTF ((stderr, "Starting parse\n"));
    2124             : 
    2125           0 :   yystate = 0;
    2126           0 :   yyerrstatus = 0;
    2127           0 :   yynerrs = 0;
    2128           0 :   yychar = YYEMPTY; /* Cause a token to be read.  */
    2129             : 
    2130             :   /* Initialize stack pointers.
    2131             :      Waste one element of value and location stack
    2132             :      so that they stay on the same level as the state stack.
    2133             :      The wasted elements are never initialized.  */
    2134           0 :   yyssp = yyss;
    2135           0 :   yyvsp = yyvs;
    2136             : 
    2137           0 :   goto yysetstate;
    2138             : 
    2139             : /*------------------------------------------------------------.
    2140             : | yynewstate -- Push a new state, which is found in yystate.  |
    2141             : `------------------------------------------------------------*/
    2142             :  yynewstate:
    2143             :   /* In all cases, when you get here, the value and location stacks
    2144             :      have just been pushed.  So pushing a state here evens the stacks.  */
    2145           0 :   yyssp++;
    2146             : 
    2147             :  yysetstate:
    2148           0 :   *yyssp = yystate;
    2149             : 
    2150           0 :   if (yyss + yystacksize - 1 <= yyssp)
    2151             :     {
    2152             :       /* Get the current used size of the three stacks, in elements.  */
    2153           0 :       YYSIZE_T yysize = yyssp - yyss + 1;
    2154             : 
    2155             : #ifdef yyoverflow
    2156             :       {
    2157             :         /* Give user a chance to reallocate the stack.  Use copies of
    2158             :            these so that the &'s don't force the real ones into
    2159             :            memory.  */
    2160             :         YYSTYPE *yyvs1 = yyvs;
    2161             :         yytype_int16 *yyss1 = yyss;
    2162             : 
    2163             :         /* Each stack pointer address is followed by the size of the
    2164             :            data in use in that stack, in bytes.  This used to be a
    2165             :            conditional around just the two extra args, but that might
    2166             :            be undefined if yyoverflow is a macro.  */
    2167             :         yyoverflow (YY_("memory exhausted"),
    2168             :                     &yyss1, yysize * sizeof (*yyssp),
    2169             :                     &yyvs1, yysize * sizeof (*yyvsp),
    2170             :                     &yystacksize);
    2171             : 
    2172             :         yyss = yyss1;
    2173             :         yyvs = yyvs1;
    2174             :       }
    2175             : #else /* no yyoverflow */
    2176             : # ifndef YYSTACK_RELOCATE
    2177             :       goto yyexhaustedlab;
    2178             : # else
    2179             :       /* Extend the stack our own way.  */
    2180           0 :       if (YYMAXDEPTH <= yystacksize)
    2181           0 :         goto yyexhaustedlab;
    2182           0 :       yystacksize *= 2;
    2183           0 :       if (YYMAXDEPTH < yystacksize)
    2184           0 :         yystacksize = YYMAXDEPTH;
    2185             : 
    2186             :       {
    2187           0 :         yytype_int16 *yyss1 = yyss;
    2188             :         union yyalloc *yyptr =
    2189           0 :           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
    2190           0 :         if (! yyptr)
    2191           0 :           goto yyexhaustedlab;
    2192           0 :         YYSTACK_RELOCATE (yyss_alloc, yyss);
    2193           0 :         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
    2194             : #  undef YYSTACK_RELOCATE
    2195           0 :         if (yyss1 != yyssa)
    2196           0 :           YYSTACK_FREE (yyss1);
    2197             :       }
    2198             : # endif
    2199             : #endif /* no yyoverflow */
    2200             : 
    2201           0 :       yyssp = yyss + yysize - 1;
    2202           0 :       yyvsp = yyvs + yysize - 1;
    2203             : 
    2204           0 :       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
    2205             :                   (unsigned long int) yystacksize));
    2206             : 
    2207           0 :       if (yyss + yystacksize - 1 <= yyssp)
    2208           0 :         YYABORT;
    2209             :     }
    2210             : 
    2211           0 :   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
    2212             : 
    2213           0 :   if (yystate == YYFINAL)
    2214           0 :     YYACCEPT;
    2215             : 
    2216           0 :   goto yybackup;
    2217             : 
    2218             : /*-----------.
    2219             : | yybackup.  |
    2220             : `-----------*/
    2221             : yybackup:
    2222             : 
    2223             :   /* Do appropriate processing given the current state.  Read a
    2224             :      lookahead token if we need one and don't already have one.  */
    2225             : 
    2226             :   /* First try to decide what to do without reference to lookahead token.  */
    2227           0 :   yyn = yypact[yystate];
    2228           0 :   if (yypact_value_is_default (yyn))
    2229           0 :     goto yydefault;
    2230             : 
    2231             :   /* Not known => get a lookahead token if don't already have one.  */
    2232             : 
    2233             :   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
    2234           0 :   if (yychar == YYEMPTY)
    2235             :     {
    2236           0 :       YYDPRINTF ((stderr, "Reading a token: "));
    2237           0 :       yychar = YYLEX;
    2238             :     }
    2239             : 
    2240           0 :   if (yychar <= YYEOF)
    2241             :     {
    2242           0 :       yychar = yytoken = YYEOF;
    2243           0 :       YYDPRINTF ((stderr, "Now at end of input.\n"));
    2244             :     }
    2245             :   else
    2246             :     {
    2247           0 :       yytoken = YYTRANSLATE (yychar);
    2248           0 :       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    2249             :     }
    2250             : 
    2251             :   /* If the proper action on seeing token YYTOKEN is to reduce or to
    2252             :      detect an error, take that action.  */
    2253           0 :   yyn += yytoken;
    2254           0 :   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    2255             :     goto yydefault;
    2256           0 :   yyn = yytable[yyn];
    2257           0 :   if (yyn <= 0)
    2258             :     {
    2259             :       if (yytable_value_is_error (yyn))
    2260             :         goto yyerrlab;
    2261           0 :       yyn = -yyn;
    2262           0 :       goto yyreduce;
    2263             :     }
    2264             : 
    2265             :   /* Count tokens shifted since error; after three, turn off error
    2266             :      status.  */
    2267           0 :   if (yyerrstatus)
    2268           0 :     yyerrstatus--;
    2269             : 
    2270             :   /* Shift the lookahead token.  */
    2271           0 :   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
    2272             : 
    2273             :   /* Discard the shifted token.  */
    2274           0 :   yychar = YYEMPTY;
    2275             : 
    2276           0 :   yystate = yyn;
    2277           0 :   *++yyvsp = yylval;
    2278             : 
    2279           0 :   goto yynewstate;
    2280             : 
    2281             : 
    2282             : /*-----------------------------------------------------------.
    2283             : | yydefault -- do the default action for the current state.  |
    2284             : `-----------------------------------------------------------*/
    2285             : yydefault:
    2286           0 :   yyn = yydefact[yystate];
    2287           0 :   if (yyn == 0)
    2288           0 :     goto yyerrlab;
    2289           0 :   goto yyreduce;
    2290             : 
    2291             : 
    2292             : /*-----------------------------.
    2293             : | yyreduce -- Do a reduction.  |
    2294             : `-----------------------------*/
    2295             : yyreduce:
    2296             :   /* yyn is the number of a rule to reduce with.  */
    2297           0 :   yylen = yyr2[yyn];
    2298             : 
    2299             :   /* If YYLEN is nonzero, implement the default value of the action:
    2300             :      `$$ = $1'.
    2301             : 
    2302             :      Otherwise, the following line sets YYVAL to garbage.
    2303             :      This behavior is undocumented and Bison
    2304             :      users should not rely upon it.  Assigning to YYVAL
    2305             :      unconditionally makes the parser a bit smaller, and it avoids a
    2306             :      GCC warning that YYVAL may be used uninitialized.  */
    2307           0 :   yyval = yyvsp[1-yylen];
    2308             : 
    2309             : 
    2310           0 :   YY_REDUCE_PRINT (yyn);
    2311           0 :   switch (yyn)
    2312             :     {
    2313             :         case 6:
    2314             : 
    2315             : /* Line 1806 of yacc.c  */
    2316             : #line 423 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2317             :     {
    2318             :                 idlc()->setParseState(PS_ModuleDeclSeen);
    2319             :         }
    2320             :     break;
    2321             : 
    2322             :   case 7:
    2323             : 
    2324             : /* Line 1806 of yacc.c  */
    2325             : #line 427 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2326             :     {
    2327             :                 idlc()->setParseState(PS_NoState);
    2328             :         }
    2329             :     break;
    2330             : 
    2331             :   case 8:
    2332             : 
    2333             : /* Line 1806 of yacc.c  */
    2334             : #line 431 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2335             :     {
    2336             :                 yyerror("definitions");
    2337             :                 yyerrok;
    2338             :         }
    2339             :     break;
    2340             : 
    2341             :   case 9:
    2342             : 
    2343             : /* Line 1806 of yacc.c  */
    2344             : #line 438 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2345             :     { idlc()->setPublished(true); }
    2346             :     break;
    2347             : 
    2348             :   case 10:
    2349             : 
    2350             : /* Line 1806 of yacc.c  */
    2351             : #line 439 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2352             :     { idlc()->setPublished(false); }
    2353             :     break;
    2354             : 
    2355             :   case 11:
    2356             : 
    2357             : /* Line 1806 of yacc.c  */
    2358             : #line 444 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2359             :     {
    2360             :                 idlc()->setParseState(PS_TypeDeclSeen);
    2361             :         }
    2362             :     break;
    2363             : 
    2364             :   case 12:
    2365             : 
    2366             : /* Line 1806 of yacc.c  */
    2367             : #line 448 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2368             :     {
    2369             :                 idlc()->setParseState(PS_NoState);
    2370             :         }
    2371             :     break;
    2372             : 
    2373             :   case 13:
    2374             : 
    2375             : /* Line 1806 of yacc.c  */
    2376             : #line 452 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2377             :     {
    2378             :                 idlc()->setParseState(PS_ConstantDeclSeen);
    2379             :         }
    2380             :     break;
    2381             : 
    2382             :   case 14:
    2383             : 
    2384             : /* Line 1806 of yacc.c  */
    2385             : #line 456 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2386             :     {
    2387             :                 idlc()->setParseState(PS_NoState);
    2388             :         }
    2389             :     break;
    2390             : 
    2391             :   case 15:
    2392             : 
    2393             : /* Line 1806 of yacc.c  */
    2394             : #line 460 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2395             :     {
    2396             :                 idlc()->setParseState(PS_ExceptionDeclSeen);
    2397             :         }
    2398             :     break;
    2399             : 
    2400             :   case 16:
    2401             : 
    2402             : /* Line 1806 of yacc.c  */
    2403             : #line 464 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2404             :     {
    2405             :                 idlc()->setParseState(PS_NoState);
    2406             :         }
    2407             :     break;
    2408             : 
    2409             :   case 17:
    2410             : 
    2411             : /* Line 1806 of yacc.c  */
    2412             : #line 468 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2413             :     {
    2414             :                 idlc()->setParseState(PS_InterfaceDeclSeen);
    2415             :         }
    2416             :     break;
    2417             : 
    2418             :   case 18:
    2419             : 
    2420             : /* Line 1806 of yacc.c  */
    2421             : #line 472 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2422             :     {
    2423             :                 idlc()->setParseState(PS_NoState);
    2424             :         }
    2425             :     break;
    2426             : 
    2427             :   case 19:
    2428             : 
    2429             : /* Line 1806 of yacc.c  */
    2430             : #line 476 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2431             :     {
    2432             :                 idlc()->setParseState(PS_ServiceDeclSeen);
    2433             :         }
    2434             :     break;
    2435             : 
    2436             :   case 20:
    2437             : 
    2438             : /* Line 1806 of yacc.c  */
    2439             : #line 480 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2440             :     {
    2441             :                 idlc()->setParseState(PS_NoState);
    2442             :         }
    2443             :     break;
    2444             : 
    2445             :   case 21:
    2446             : 
    2447             : /* Line 1806 of yacc.c  */
    2448             : #line 484 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2449             :     {
    2450             :                 idlc()->setParseState(PS_SingletonDeclSeen);
    2451             :         }
    2452             :     break;
    2453             : 
    2454             :   case 22:
    2455             : 
    2456             : /* Line 1806 of yacc.c  */
    2457             : #line 488 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2458             :     {
    2459             :                 idlc()->setParseState(PS_NoState);
    2460             :         }
    2461             :     break;
    2462             : 
    2463             :   case 23:
    2464             : 
    2465             : /* Line 1806 of yacc.c  */
    2466             : #line 492 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2467             :     {
    2468             :                 idlc()->setParseState(PS_ConstantsDeclSeen);
    2469             :         }
    2470             :     break;
    2471             : 
    2472             :   case 24:
    2473             : 
    2474             : /* Line 1806 of yacc.c  */
    2475             : #line 496 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2476             :     {
    2477             :                 idlc()->setParseState(PS_NoState);
    2478             :         }
    2479             :     break;
    2480             : 
    2481             :   case 25:
    2482             : 
    2483             : /* Line 1806 of yacc.c  */
    2484             : #line 503 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2485             :     {
    2486             :                 idlc()->setParseState(PS_ModuleSeen);
    2487             :         idlc()->setPublished(false);
    2488             :         }
    2489             :     break;
    2490             : 
    2491             :   case 26:
    2492             : 
    2493             : /* Line 1806 of yacc.c  */
    2494             : #line 508 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2495             :     {
    2496             :         idlc()->setParseState(PS_ModuleIDSeen);
    2497             :         checkIdentifier((yyvsp[(3) - (3)].sval));
    2498             : 
    2499             :         AstScope*               pScope = idlc()->scopes()->topNonNull();
    2500             :         AstModule*              pModule = NULL;
    2501             :         AstDeclaration* pExists = NULL;
    2502             : 
    2503             :         if ( pScope )
    2504             :         {
    2505             :                 pModule = new AstModule(*(yyvsp[(3) - (3)].sval), pScope);
    2506             :                         if( (pExists = pScope->lookupForAdd(pModule)) )
    2507             :                         {
    2508             :                                 pExists->setInMainfile(idlc()->isInMainFile());
    2509             :                                 pExists->setFileName(pModule->getFileName());
    2510             :                 if (pExists->isPredefined())
    2511             :                 {
    2512             :                     pExists->setPredefined(false);
    2513             :                     if (pExists->getDocumentation().getLength() == 0 &&
    2514             :                         pModule->getDocumentation().getLength() > 0)
    2515             :                     {
    2516             :                         pExists->setDocumentation(pModule->getDocumentation());
    2517             :                     }
    2518             :                 }
    2519             :                                 delete(pModule);
    2520             :                                 pModule = (AstModule*)pExists;
    2521             :                         } else
    2522             :                         {
    2523             :                                 pScope->addDeclaration(pModule);
    2524             :                         }
    2525             :                         idlc()->scopes()->push(pModule);
    2526             :         }
    2527             :         delete (yyvsp[(3) - (3)].sval);
    2528             :     }
    2529             :     break;
    2530             : 
    2531             :   case 27:
    2532             : 
    2533             : /* Line 1806 of yacc.c  */
    2534             : #line 543 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2535             :     {
    2536             :         idlc()->setParseState(PS_ModuleSqSeen);
    2537             :     }
    2538             :     break;
    2539             : 
    2540             :   case 28:
    2541             : 
    2542             : /* Line 1806 of yacc.c  */
    2543             : #line 547 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2544             :     {
    2545             :                 idlc()->setParseState(PS_ModuleBodySeen);
    2546             :         }
    2547             :     break;
    2548             : 
    2549             :   case 29:
    2550             : 
    2551             : /* Line 1806 of yacc.c  */
    2552             : #line 551 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2553             :     {
    2554             :                 idlc()->setParseState(PS_ModuleQsSeen);
    2555             :                 /*
    2556             :                  * Finished with this module - pop it from the scope stack
    2557             :                  */
    2558             :                 idlc()->scopes()->pop();
    2559             :         }
    2560             :     break;
    2561             : 
    2562             :   case 32:
    2563             : 
    2564             : /* Line 1806 of yacc.c  */
    2565             : #line 567 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2566             :     {
    2567             :                 idlc()->setParseState(PS_InterfaceSeen);
    2568             :         }
    2569             :     break;
    2570             : 
    2571             :   case 33:
    2572             : 
    2573             : /* Line 1806 of yacc.c  */
    2574             : #line 571 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2575             :     {
    2576             :                 idlc()->setParseState(PS_InterfaceIDSeen);
    2577             :        checkIdentifier((yyvsp[(3) - (3)].sval));
    2578             :                 (yyval.sval) = (yyvsp[(3) - (3)].sval);
    2579             :         }
    2580             :     break;
    2581             : 
    2582             :   case 34:
    2583             : 
    2584             : /* Line 1806 of yacc.c  */
    2585             : #line 580 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2586             :     {
    2587             :                 idlc()->setParseState(PS_ForwardDeclSeen);
    2588             : 
    2589             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    2590             :                 AstInterface*   pForward = NULL;
    2591             :                 AstDeclaration* pDecl = NULL;
    2592             : 
    2593             :         /*
    2594             :                  * Make a new forward interface node and add it to its enclosing scope
    2595             :                  */
    2596             :                 if ( pScope && (yyvsp[(1) - (1)].sval) ) 
    2597             :                 {
    2598             :                         pForward = new AstInterface(*(yyvsp[(1) - (1)].sval), NULL, pScope);
    2599             :                         
    2600             :                         pDecl = pScope->lookupByName(pForward->getScopedName());
    2601             :                         if ( pDecl ) 
    2602             :                         {
    2603             :                                 if ( (pDecl != pForward) && 
    2604             :                                          (pDecl->getNodeType() == NT_interface) )
    2605             :                                 {
    2606             :                                         delete pForward;
    2607             :                                 } else
    2608             :                                 {
    2609             :                                         idlc()->error()->error2(EIDL_REDEF_SCOPE, scopeAsDecl(pScope), pDecl);
    2610             :                                 }
    2611             :                         } else
    2612             :                         {
    2613             :                                 /*
    2614             :                                  * Add the interface to its definition scope
    2615             :                                  */
    2616             :                                 pScope->addDeclaration(pForward);
    2617             :                         }
    2618             :                 }
    2619             :                 delete (yyvsp[(1) - (1)].sval);
    2620             :         }
    2621             :     break;
    2622             : 
    2623             :   case 35:
    2624             : 
    2625             : /* Line 1806 of yacc.c  */
    2626             : #line 619 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2627             :     {
    2628             :                 idlc()->setParseState(PS_InterfaceHeadSeen);
    2629             : 
    2630             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    2631             :                 AstInterface*   pInterface = NULL;
    2632             :                 AstInterface*   pForward = NULL;
    2633             :                 AstDeclaration* pDecl = NULL;
    2634             : 
    2635             :         /*
    2636             :                  * Make a new interface node and add it to its enclosing scope
    2637             :                  */
    2638             :                 if ( pScope && (yyvsp[(1) - (1)].ihval) ) 
    2639             :                 {
    2640             :                         pInterface = new AstInterface(
    2641             :                 *(yyvsp[(1) - (1)].ihval)->getName(),
    2642             :                 static_cast< AstInterface * >((yyvsp[(1) - (1)].ihval)->getInherits()), pScope);
    2643             :                         if ( pInterface &&
    2644             :                                 (pDecl = pScope->lookupByName(pInterface->getScopedName())) ) 
    2645             :                         {
    2646             :                                 /*
    2647             :                                  * See if we're defining a forward declared interface.
    2648             :                                  */
    2649             :                                 if (pDecl->getNodeType() == NT_interface) 
    2650             :                                 {
    2651             :                                         pForward = (AstInterface*)pDecl;
    2652             :                                         if ( !pForward->isDefined() ) 
    2653             :                                         {
    2654             :                                                 /*
    2655             :                                                  * Check if redefining in same scope
    2656             :                                                  */
    2657             :                                                 if ( pForward->getScope() != pScope ) 
    2658             :                                                 {
    2659             :                                                         if ( pForward->getScopedName() != pInterface->getScopedName() )
    2660             :                                                         {
    2661             :                                                                 idlc()->error()->error3(EIDL_SCOPE_CONFLICT,
    2662             :                                                                                  pInterface, pForward, scopeAsDecl(pScope));
    2663             :                                                         }
    2664             :                                                 }
    2665             :                         else if ( !pInterface->isPublished()
    2666             :                                   && pForward->isPublished() )
    2667             :                         {
    2668             :                             idlc()->error()->error0(EIDL_PUBLISHED_FORWARD);
    2669             :                         }
    2670             :                                                 /*
    2671             :                                                  * All OK, set full definition
    2672             :                                                  */
    2673             :                                                 else 
    2674             :                                                 {
    2675             :                             pForward->forwardDefined(*pInterface);
    2676             :                                                         delete pInterface;
    2677             :                                                         pInterface = pForward;
    2678             :                                                 }
    2679             :                                         } else {
    2680             :                         // special handling for XInterface because it is predefined
    2681             :                         if ( pForward->isPredefined() &&
    2682             :                              pForward->getScopedName() == "com::sun::star::uno::XInterface")
    2683             :                         {
    2684             :                             /* replace the predefined XInterface */
    2685             :                             *pForward = *pInterface;
    2686             :                             delete pInterface;
    2687             :                             pInterface = pForward;
    2688             :                         }
    2689             :                         
    2690             :                     }
    2691             :                                 }
    2692             :                         } else
    2693             :                         {
    2694             :                                 /*
    2695             :                                  * Add the interface to its definition scope
    2696             :                                  */
    2697             :                                 pScope->addDeclaration(pInterface);
    2698             :                         }
    2699             :                 }
    2700             :                 /*
    2701             :                  * Push it on the scope stack
    2702             :                  */
    2703             :                 idlc()->scopes()->push(pInterface);
    2704             :                 delete((yyvsp[(1) - (1)].ihval));
    2705             :         }
    2706             :     break;
    2707             : 
    2708             :   case 36:
    2709             : 
    2710             : /* Line 1806 of yacc.c  */
    2711             : #line 699 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2712             :     {
    2713             :                 idlc()->setParseState(PS_InterfaceSqSeen);
    2714             :         }
    2715             :     break;
    2716             : 
    2717             :   case 37:
    2718             : 
    2719             : /* Line 1806 of yacc.c  */
    2720             : #line 703 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2721             :     {
    2722             :         AstInterface * ifc = static_cast< AstInterface * >(
    2723             :             idlc()->scopes()->topNonNull());
    2724             :         if (!ifc->hasMandatoryInheritedInterfaces()
    2725             :             && ifc->getScopedName() != "com::sun::star::uno::XInterface")
    2726             :         {
    2727             :             addInheritedInterface(
    2728             :                 ifc, rtl::OString("::com::sun::star::uno::XInterface"), false,
    2729             :                 rtl::OUString());
    2730             :         }
    2731             :         ifc->setDefined();
    2732             :                 idlc()->setParseState(PS_InterfaceBodySeen);
    2733             :         }
    2734             :     break;
    2735             : 
    2736             :   case 38:
    2737             : 
    2738             : /* Line 1806 of yacc.c  */
    2739             : #line 717 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2740             :     {
    2741             :                 idlc()->setParseState(PS_InterfaceQsSeen);
    2742             :                 /*
    2743             :                  * Done with this interface - pop it off the scopes stack
    2744             :                  */
    2745             :                 idlc()->scopes()->pop();
    2746             :         }
    2747             :     break;
    2748             : 
    2749             :   case 39:
    2750             : 
    2751             : /* Line 1806 of yacc.c  */
    2752             : #line 725 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2753             :     {
    2754             :                 yyerror("interface definition");
    2755             :                 yyerrok;
    2756             :         }
    2757             :     break;
    2758             : 
    2759             :   case 40:
    2760             : 
    2761             : /* Line 1806 of yacc.c  */
    2762             : #line 733 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2763             :     {
    2764             :                 idlc()->setParseState(PS_InheritSpecSeen);
    2765             : 
    2766             :                 (yyval.ihval) = new FeInheritanceHeader(NT_interface, (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].sval), 0);
    2767             :                 delete (yyvsp[(2) - (2)].sval);
    2768             :         }
    2769             :     break;
    2770             : 
    2771             :   case 41:
    2772             : 
    2773             : /* Line 1806 of yacc.c  */
    2774             : #line 743 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2775             :     {
    2776             :                 idlc()->setParseState(PS_InheritColonSeen);
    2777             :         }
    2778             :     break;
    2779             : 
    2780             :   case 42:
    2781             : 
    2782             : /* Line 1806 of yacc.c  */
    2783             : #line 747 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2784             :     {
    2785             :         (yyval.sval) = (yyvsp[(3) - (3)].sval);
    2786             :         }
    2787             :     break;
    2788             : 
    2789             :   case 43:
    2790             : 
    2791             : /* Line 1806 of yacc.c  */
    2792             : #line 751 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2793             :     {
    2794             :                 (yyval.sval) = NULL;
    2795             :         }
    2796             :     break;
    2797             : 
    2798             :   case 46:
    2799             : 
    2800             : /* Line 1806 of yacc.c  */
    2801             : #line 763 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2802             :     {
    2803             :                 idlc()->setParseState(PS_AttributeDeclSeen);
    2804             :         }
    2805             :     break;
    2806             : 
    2807             :   case 47:
    2808             : 
    2809             : /* Line 1806 of yacc.c  */
    2810             : #line 767 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2811             :     {
    2812             :                 idlc()->setParseState(PS_NoState);
    2813             :         }
    2814             :     break;
    2815             : 
    2816             :   case 48:
    2817             : 
    2818             : /* Line 1806 of yacc.c  */
    2819             : #line 771 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2820             :     {
    2821             :                 idlc()->setParseState(PS_OperationDeclSeen);
    2822             :         }
    2823             :     break;
    2824             : 
    2825             :   case 49:
    2826             : 
    2827             : /* Line 1806 of yacc.c  */
    2828             : #line 775 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2829             :     {
    2830             :                 idlc()->setParseState(PS_NoState);
    2831             :         }
    2832             :     break;
    2833             : 
    2834             :   case 50:
    2835             : 
    2836             : /* Line 1806 of yacc.c  */
    2837             : #line 779 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2838             :     {
    2839             :                 idlc()->setParseState(PS_InterfaceInheritanceDeclSeen);
    2840             :     }
    2841             :     break;
    2842             : 
    2843             :   case 51:
    2844             : 
    2845             : /* Line 1806 of yacc.c  */
    2846             : #line 783 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2847             :     {
    2848             :                 idlc()->setParseState(PS_NoState);
    2849             :         }
    2850             :     break;
    2851             : 
    2852             :   case 52:
    2853             : 
    2854             : /* Line 1806 of yacc.c  */
    2855             : #line 791 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2856             :     {
    2857             :                 idlc()->setParseState(PS_AttrTypeSeen);
    2858             :         }
    2859             :     break;
    2860             : 
    2861             :   case 53:
    2862             : 
    2863             : /* Line 1806 of yacc.c  */
    2864             : #line 795 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2865             :     {
    2866             :                 idlc()->setParseState(PS_AttrCompleted);
    2867             :         if (((yyvsp[(1) - (4)].ulval) & ~(AF_BOUND | AF_READONLY)) != AF_ATTRIBUTE) {
    2868             :             idlc()->error()->flagError(EIDL_BAD_ATTRIBUTE_FLAGS, (yyvsp[(1) - (4)].ulval));
    2869             :         }
    2870             :         AstInterface * scope = static_cast< AstInterface * >(
    2871             :             idlc()->scopes()->top());
    2872             :         AstAttribute * attr = new AstAttribute(
    2873             :             (yyvsp[(1) - (4)].ulval), (yyvsp[(4) - (4)].fdval)->compose((yyvsp[(2) - (4)].cdclval)), (yyvsp[(4) - (4)].fdval)->getName(), scope);
    2874             :         delete (yyvsp[(4) - (4)].fdval);
    2875             :         AstInterface::DoubleMemberDeclarations doubleMembers(
    2876             :             scope->checkMemberClashes(attr));
    2877             :         if (doubleMembers.empty()) {
    2878             :             scope->addMember(attr);
    2879             :         } else {
    2880             :             reportDoubleMemberDeclarations(doubleMembers);
    2881             :         }
    2882             :         idlc()->scopes()->push(attr);
    2883             :     }
    2884             :     break;
    2885             : 
    2886             :   case 54:
    2887             : 
    2888             : /* Line 1806 of yacc.c  */
    2889             : #line 815 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2890             :     {
    2891             :         static_cast< AstAttribute * >(idlc()->scopes()->top())->setExceptions(
    2892             :             (yyvsp[(6) - (6)].attexcval).get.documentation, (yyvsp[(6) - (6)].attexcval).get.exceptions, (yyvsp[(6) - (6)].attexcval).set.documentation,
    2893             :             (yyvsp[(6) - (6)].attexcval).set.exceptions);
    2894             :         delete (yyvsp[(6) - (6)].attexcval).get.documentation;
    2895             :         delete (yyvsp[(6) - (6)].attexcval).get.exceptions;
    2896             :         delete (yyvsp[(6) - (6)].attexcval).set.documentation;
    2897             :         delete (yyvsp[(6) - (6)].attexcval).set.exceptions;
    2898             :         idlc()->scopes()->pop();
    2899             :     }
    2900             :     break;
    2901             : 
    2902             :   case 55:
    2903             : 
    2904             : /* Line 1806 of yacc.c  */
    2905             : #line 829 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2906             :     {
    2907             :                 idlc()->setParseState(PS_FlagHeaderSeen);
    2908             :                 (yyval.ulval) = (yyvsp[(2) - (3)].ulval);
    2909             :         }
    2910             :     break;
    2911             : 
    2912             :   case 56:
    2913             : 
    2914             : /* Line 1806 of yacc.c  */
    2915             : #line 837 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2916             :     {
    2917             :                 if ( ((yyvsp[(1) - (3)].ulval) & (yyvsp[(3) - (3)].ulval)) == (yyvsp[(3) - (3)].ulval) )
    2918             :                         idlc()->error()->flagError(EIDL_DEFINED_ATTRIBUTEFLAG, (yyvsp[(3) - (3)].ulval));
    2919             :  
    2920             :                 (yyval.ulval) = (yyvsp[(1) - (3)].ulval) | (yyvsp[(3) - (3)].ulval);
    2921             :         }
    2922             :     break;
    2923             : 
    2924             :   case 57:
    2925             : 
    2926             : /* Line 1806 of yacc.c  */
    2927             : #line 844 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2928             :     {
    2929             :                 (yyval.ulval) = (yyvsp[(1) - (1)].ulval);
    2930             :         }
    2931             :     break;
    2932             : 
    2933             :   case 58:
    2934             : 
    2935             : /* Line 1806 of yacc.c  */
    2936             : #line 851 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2937             :     {
    2938             :                 idlc()->setParseState(PS_AttrSeen);
    2939             :                 (yyval.ulval) = AF_ATTRIBUTE;
    2940             :         }
    2941             :     break;
    2942             : 
    2943             :   case 59:
    2944             : 
    2945             : /* Line 1806 of yacc.c  */
    2946             : #line 856 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2947             :     {
    2948             :                 idlc()->setParseState(PS_PropertySeen);
    2949             :                 (yyval.ulval) = AF_PROPERTY;
    2950             :         }
    2951             :     break;
    2952             : 
    2953             :   case 60:
    2954             : 
    2955             : /* Line 1806 of yacc.c  */
    2956             : #line 861 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2957             :     {
    2958             :                 idlc()->setParseState(PS_ReadOnlySeen);
    2959             :                 (yyval.ulval) = AF_READONLY;
    2960             :         }
    2961             :     break;
    2962             : 
    2963             :   case 61:
    2964             : 
    2965             : /* Line 1806 of yacc.c  */
    2966             : #line 866 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2967             :     {
    2968             :                 idlc()->setParseState(PS_OptionalSeen);
    2969             :                 (yyval.ulval) = AF_OPTIONAL;
    2970             :         }
    2971             :     break;
    2972             : 
    2973             :   case 62:
    2974             : 
    2975             : /* Line 1806 of yacc.c  */
    2976             : #line 871 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2977             :     {
    2978             :                 idlc()->setParseState(PS_MayBeVoidSeen);
    2979             :                 (yyval.ulval) = AF_MAYBEVOID;
    2980             :         }
    2981             :     break;
    2982             : 
    2983             :   case 63:
    2984             : 
    2985             : /* Line 1806 of yacc.c  */
    2986             : #line 876 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2987             :     {
    2988             :                 idlc()->setParseState(PS_BoundSeen);
    2989             :                 (yyval.ulval) = AF_BOUND;
    2990             :         }
    2991             :     break;
    2992             : 
    2993             :   case 64:
    2994             : 
    2995             : /* Line 1806 of yacc.c  */
    2996             : #line 881 "/usr/local/src/libreoffice/idlc/source/parser.y"
    2997             :     {
    2998             :                 idlc()->setParseState(PS_ConstrainedSeen);
    2999             :                 (yyval.ulval) = AF_CONSTRAINED;
    3000             :         }
    3001             :     break;
    3002             : 
    3003             :   case 65:
    3004             : 
    3005             : /* Line 1806 of yacc.c  */
    3006             : #line 886 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3007             :     {
    3008             :                 idlc()->setParseState(PS_TransientSeen);
    3009             :                 (yyval.ulval) = AF_TRANSIENT;
    3010             :         }
    3011             :     break;
    3012             : 
    3013             :   case 66:
    3014             : 
    3015             : /* Line 1806 of yacc.c  */
    3016             : #line 891 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3017             :     {
    3018             :                 idlc()->setParseState(PS_MayBeAmbigiousSeen);
    3019             :                 (yyval.ulval) = AF_MAYBEAMBIGUOUS;
    3020             :         }
    3021             :     break;
    3022             : 
    3023             :   case 67:
    3024             : 
    3025             : /* Line 1806 of yacc.c  */
    3026             : #line 896 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3027             :     {
    3028             :                 idlc()->setParseState(PS_MayBeDefaultSeen);
    3029             :                 (yyval.ulval) = AF_MAYBEDEFAULT;
    3030             :         }
    3031             :     break;
    3032             : 
    3033             :   case 68:
    3034             : 
    3035             : /* Line 1806 of yacc.c  */
    3036             : #line 901 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3037             :     {
    3038             :                 idlc()->setParseState(PS_RemoveableSeen);
    3039             :                 (yyval.ulval) = AF_REMOVEABLE;
    3040             :         }
    3041             :     break;
    3042             : 
    3043             :   case 69:
    3044             : 
    3045             : /* Line 1806 of yacc.c  */
    3046             : #line 906 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3047             :     {
    3048             :        yyerror("unknown property|attribute flag");
    3049             :                 yyerrok;
    3050             :         }
    3051             :     break;
    3052             : 
    3053             :   case 70:
    3054             : 
    3055             : /* Line 1806 of yacc.c  */
    3056             : #line 913 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3057             :     { (yyval.attexcval) = (yyvsp[(2) - (2)].attexcval); }
    3058             :     break;
    3059             : 
    3060             :   case 71:
    3061             : 
    3062             : /* Line 1806 of yacc.c  */
    3063             : #line 915 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3064             :     {
    3065             :         (yyval.attexcval).get.documentation = 0;
    3066             :         (yyval.attexcval).get.exceptions = 0;
    3067             :         (yyval.attexcval).set.documentation = 0;
    3068             :         (yyval.attexcval).set.exceptions = 0;
    3069             :     }
    3070             :     break;
    3071             : 
    3072             :   case 73:
    3073             : 
    3074             : /* Line 1806 of yacc.c  */
    3075             : #line 926 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3076             :     {
    3077             :         yyerror("bad attribute raises block");
    3078             :         yyerrok;
    3079             :         (yyval.attexcval).get.documentation = 0;
    3080             :         (yyval.attexcval).get.exceptions = 0;
    3081             :         (yyval.attexcval).set.documentation = 0;
    3082             :         (yyval.attexcval).set.exceptions = 0;
    3083             :     }
    3084             :     break;
    3085             : 
    3086             :   case 74:
    3087             : 
    3088             : /* Line 1806 of yacc.c  */
    3089             : #line 939 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3090             :     {
    3091             :         (yyval.attexcval).get = (yyvsp[(1) - (2)].attexcpval);
    3092             :         (yyval.attexcval).set = (yyvsp[(2) - (2)].attexcpval);
    3093             :     }
    3094             :     break;
    3095             : 
    3096             :   case 75:
    3097             : 
    3098             : /* Line 1806 of yacc.c  */
    3099             : #line 945 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3100             :     {
    3101             :         (yyval.attexcval).get = (yyvsp[(2) - (2)].attexcpval);
    3102             :         (yyval.attexcval).set = (yyvsp[(1) - (2)].attexcpval);
    3103             :     }
    3104             :     break;
    3105             : 
    3106             :   case 76:
    3107             : 
    3108             : /* Line 1806 of yacc.c  */
    3109             : #line 950 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3110             :     {
    3111             :         (yyval.attexcval).get.documentation = 0;
    3112             :         (yyval.attexcval).get.exceptions = 0;
    3113             :         (yyval.attexcval).set.documentation = 0;
    3114             :         (yyval.attexcval).set.exceptions = 0;
    3115             :     }
    3116             :     break;
    3117             : 
    3118             :   case 78:
    3119             : 
    3120             : /* Line 1806 of yacc.c  */
    3121             : #line 960 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3122             :     { (yyval.attexcpval).documentation = 0; (yyval.attexcpval).exceptions = 0; }
    3123             :     break;
    3124             : 
    3125             :   case 79:
    3126             : 
    3127             : /* Line 1806 of yacc.c  */
    3128             : #line 965 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3129             :     {
    3130             :         (yyval.attexcpval).documentation = new rtl::OUString(
    3131             :             rtl::OStringToOUString(
    3132             :                 idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8));
    3133             :         (yyval.attexcpval).exceptions = (yyvsp[(2) - (3)].dclsval);
    3134             :     }
    3135             :     break;
    3136             : 
    3137             :   case 81:
    3138             : 
    3139             : /* Line 1806 of yacc.c  */
    3140             : #line 975 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3141             :     { (yyval.attexcpval).documentation = 0; (yyval.attexcpval).exceptions = 0; }
    3142             :     break;
    3143             : 
    3144             :   case 82:
    3145             : 
    3146             : /* Line 1806 of yacc.c  */
    3147             : #line 980 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3148             :     {
    3149             :         if (static_cast< AstAttribute * >(idlc()->scopes()->top())->
    3150             :             isReadonly())
    3151             :         {
    3152             :             idlc()->error()->error0(EIDL_READONLY_ATTRIBUTE_SET_EXCEPTIONS);
    3153             :         }
    3154             :     }
    3155             :     break;
    3156             : 
    3157             :   case 83:
    3158             : 
    3159             : /* Line 1806 of yacc.c  */
    3160             : #line 988 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3161             :     {
    3162             :         (yyval.attexcpval).documentation = new rtl::OUString(
    3163             :             rtl::OStringToOUString(
    3164             :                 idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8));
    3165             :         (yyval.attexcpval).exceptions = (yyvsp[(3) - (4)].dclsval);
    3166             :     }
    3167             :     break;
    3168             : 
    3169             :   case 84:
    3170             : 
    3171             : /* Line 1806 of yacc.c  */
    3172             : #line 998 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3173             :     {
    3174             :                 idlc()->setParseState(PS_OpTypeSeen);
    3175             :         }
    3176             :     break;
    3177             : 
    3178             :   case 85:
    3179             : 
    3180             : /* Line 1806 of yacc.c  */
    3181             : #line 1002 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3182             :     {
    3183             :                 idlc()->setParseState(PS_OpIDSeen);
    3184             :        checkIdentifier((yyvsp[(3) - (3)].sval));
    3185             : 
    3186             :                 AstInterface * pScope = static_cast< AstInterface * >(
    3187             :             idlc()->scopes()->top());
    3188             :                 AstOperation*   pOp = NULL;
    3189             : 
    3190             :                 /*
    3191             :                  * Create a node representing an operation on an interface
    3192             :                  * and add it to its enclosing scope
    3193             :                  */
    3194             :                 if ( pScope && (yyvsp[(1) - (3)].cdclval) )
    3195             :                 {
    3196             :                         AstType *pType = (AstType*)(yyvsp[(1) - (3)].cdclval);
    3197             :                         if ( !pType || (pType->getNodeType() == NT_exception) )
    3198             :                         {
    3199             :                                 // type ERROR 
    3200             :                         } else 
    3201             :                         {
    3202             :                                 pOp = new AstOperation(pType, *(yyvsp[(3) - (3)].sval), pScope);
    3203             : 
    3204             :                 AstInterface::DoubleMemberDeclarations doubleMembers(
    3205             :                     pScope->checkMemberClashes(pOp));
    3206             :                 if (doubleMembers.empty()) {
    3207             :                     pScope->addMember(pOp);
    3208             :                 } else {
    3209             :                     reportDoubleMemberDeclarations(doubleMembers);
    3210             :                 }
    3211             :                         }
    3212             :                 }
    3213             :                 delete (yyvsp[(3) - (3)].sval);
    3214             :                 /*
    3215             :                  * Push the operation scope onto the scopes stack
    3216             :                  */
    3217             :                 idlc()->scopes()->push(pOp);
    3218             :         }
    3219             :     break;
    3220             : 
    3221             :   case 86:
    3222             : 
    3223             : /* Line 1806 of yacc.c  */
    3224             : #line 1040 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3225             :     {
    3226             :                 idlc()->setParseState(PS_OpSqSeen);
    3227             :         }
    3228             :     break;
    3229             : 
    3230             :   case 87:
    3231             : 
    3232             : /* Line 1806 of yacc.c  */
    3233             : #line 1044 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3234             :     {
    3235             :                 idlc()->setParseState(PS_OpParsCompleted);
    3236             :         }
    3237             :     break;
    3238             : 
    3239             :   case 88:
    3240             : 
    3241             : /* Line 1806 of yacc.c  */
    3242             : #line 1048 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3243             :     {
    3244             :                 idlc()->setParseState(PS_OpQsSeen);
    3245             :         }
    3246             :     break;
    3247             : 
    3248             :   case 89:
    3249             : 
    3250             : /* Line 1806 of yacc.c  */
    3251             : #line 1052 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3252             :     {
    3253             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    3254             :                 AstOperation*   pOp = NULL;
    3255             :                 /*
    3256             :                  * Add exceptions and context to the operation
    3257             :                  */
    3258             :                 if ( pScope && pScope->getScopeNodeType() == NT_operation)
    3259             :                 {
    3260             :                         pOp = (AstOperation*)pScope;
    3261             : 
    3262             :                         if ( pOp )
    3263             :                                 pOp->setExceptions((yyvsp[(11) - (11)].dclsval));
    3264             :                 }
    3265             :         delete (yyvsp[(11) - (11)].dclsval);
    3266             :                 /*
    3267             :                  * Done with this operation. Pop its scope from the scopes stack
    3268             :                  */
    3269             :                 idlc()->scopes()->pop();
    3270             :         }
    3271             :     break;
    3272             : 
    3273             :   case 91:
    3274             : 
    3275             : /* Line 1806 of yacc.c  */
    3276             : #line 1076 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3277             :     {
    3278             :                 (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType(ET_void);
    3279             :         }
    3280             :     break;
    3281             : 
    3282             :   case 93:
    3283             : 
    3284             : /* Line 1806 of yacc.c  */
    3285             : #line 1085 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3286             :     {
    3287             :                 idlc()->setParseState(PS_OpParCommaSeen);
    3288             :         }
    3289             :     break;
    3290             : 
    3291             :   case 96:
    3292             : 
    3293             : /* Line 1806 of yacc.c  */
    3294             : #line 1091 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3295             :     {
    3296             :                 yyerror("parameter definition");
    3297             :                 yyerrok;
    3298             :         }
    3299             :     break;
    3300             : 
    3301             :   case 97:
    3302             : 
    3303             : /* Line 1806 of yacc.c  */
    3304             : #line 1101 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3305             :     {
    3306             :                 idlc()->setParseState(PS_OpParDirSeen);
    3307             :         }
    3308             :     break;
    3309             : 
    3310             :   case 98:
    3311             : 
    3312             : /* Line 1806 of yacc.c  */
    3313             : #line 1105 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3314             :     {
    3315             :                 idlc()->setParseState(PS_OpParTypeSeen);
    3316             :         }
    3317             :     break;
    3318             : 
    3319             :   case 99:
    3320             : 
    3321             : /* Line 1806 of yacc.c  */
    3322             : #line 1110 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3323             :     {
    3324             :                 idlc()->setParseState(PS_OpParDeclSeen);
    3325             : 
    3326             :         AstOperation * pScope = static_cast< AstOperation * >(
    3327             :             idlc()->scopes()->top());
    3328             :                 AstParameter*   pParam = NULL;
    3329             : 
    3330             :                 /*
    3331             :                  * Create a node representing an argument to an operation
    3332             :                  * Add it to the enclosing scope (the operation scope)
    3333             :                  */
    3334             :                 if ( pScope && (yyvsp[(5) - (8)].cdclval) && (yyvsp[(8) - (8)].fdval) )
    3335             :                 {
    3336             :             AstType const * pType = (yyvsp[(8) - (8)].fdval)->compose((yyvsp[(5) - (8)].cdclval));
    3337             :                         if ( pType )
    3338             :                         {
    3339             :                 if (pScope->isConstructor() && (yyvsp[(2) - (8)].ulval) != DIR_IN) {
    3340             :                     idlc()->error()->error0(EIDL_CONSTRUCTOR_PARAMETER_NOT_IN);
    3341             :                 }
    3342             :                 if (pScope->isVariadic()) {
    3343             :                     idlc()->error()->error0(EIDL_REST_PARAMETER_NOT_LAST);
    3344             :                 }
    3345             :                 if ((yyvsp[(7) - (8)].bval)) {
    3346             :                     AstDeclaration const * type = resolveTypedefs(pType);
    3347             :                     if (type->getNodeType() != NT_predefined
    3348             :                         || (static_cast< AstBaseType const * >(type)->
    3349             :                             getExprType() != ET_any))
    3350             :                     {
    3351             :                         idlc()->error()->error0(EIDL_REST_PARAMETER_NOT_ANY);
    3352             :                     }
    3353             :                     if (pScope->isConstructor()) {
    3354             :                         if (pScope->getIteratorBegin()
    3355             :                             != pScope->getIteratorEnd())
    3356             :                         {
    3357             :                             idlc()->error()->error0(
    3358             :                                 EIDL_CONSTRUCTOR_REST_PARAMETER_NOT_FIRST);
    3359             :                         }
    3360             :                     } else {
    3361             :                         idlc()->error()->error0(EIDL_METHOD_HAS_REST_PARAMETER);
    3362             :                     }
    3363             :                 }
    3364             : 
    3365             :                                 pParam = new AstParameter(
    3366             :                     static_cast< Direction >((yyvsp[(2) - (8)].ulval)), (yyvsp[(7) - (8)].bval), pType, (yyvsp[(8) - (8)].fdval)->getName(),
    3367             :                     pScope);
    3368             :                                                                 
    3369             :                                 if ( !(yyvsp[(8) - (8)].fdval)->checkType((yyvsp[(5) - (8)].cdclval)) )
    3370             :                                 {
    3371             :                                         // WARNING      
    3372             :                                 }
    3373             : 
    3374             :                                 pScope->addDeclaration(pParam);
    3375             :                         }
    3376             :                 }
    3377             :         }
    3378             :     break;
    3379             : 
    3380             :   case 100:
    3381             : 
    3382             : /* Line 1806 of yacc.c  */
    3383             : #line 1167 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3384             :     {
    3385             :                 idlc()->setParseState(PS_NoState);
    3386             :                 yyerrok;
    3387             :         }
    3388             :     break;
    3389             : 
    3390             :   case 101:
    3391             : 
    3392             : /* Line 1806 of yacc.c  */
    3393             : #line 1175 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3394             :     {
    3395             :                 (yyval.ulval) = DIR_IN;
    3396             :         }
    3397             :     break;
    3398             : 
    3399             :   case 102:
    3400             : 
    3401             : /* Line 1806 of yacc.c  */
    3402             : #line 1179 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3403             :     {
    3404             :                 (yyval.ulval) = DIR_OUT;
    3405             :         }
    3406             :     break;
    3407             : 
    3408             :   case 103:
    3409             : 
    3410             : /* Line 1806 of yacc.c  */
    3411             : #line 1183 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3412             :     {
    3413             :                 (yyval.ulval) = DIR_INOUT;
    3414             :         }
    3415             :     break;
    3416             : 
    3417             :   case 104:
    3418             : 
    3419             : /* Line 1806 of yacc.c  */
    3420             : #line 1190 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3421             :     {
    3422             :         (yyval.bval) = true;
    3423             :     }
    3424             :     break;
    3425             : 
    3426             :   case 105:
    3427             : 
    3428             : /* Line 1806 of yacc.c  */
    3429             : #line 1194 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3430             :     {
    3431             :         (yyval.bval) = false;
    3432             :     }
    3433             :     break;
    3434             : 
    3435             :   case 107:
    3436             : 
    3437             : /* Line 1806 of yacc.c  */
    3438             : #line 1202 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3439             :     {
    3440             :         (yyval.dclsval) = 0;
    3441             :     }
    3442             :     break;
    3443             : 
    3444             :   case 108:
    3445             : 
    3446             : /* Line 1806 of yacc.c  */
    3447             : #line 1209 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3448             :     {
    3449             :         idlc()->setParseState(PS_RaiseSeen);
    3450             :     }
    3451             :     break;
    3452             : 
    3453             :   case 109:
    3454             : 
    3455             : /* Line 1806 of yacc.c  */
    3456             : #line 1213 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3457             :     {
    3458             :         idlc()->setParseState(PS_RaiseSqSeen);
    3459             :     }
    3460             :     break;
    3461             : 
    3462             :   case 110:
    3463             : 
    3464             : /* Line 1806 of yacc.c  */
    3465             : #line 1218 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3466             :     {
    3467             :         idlc()->setParseState(PS_RaiseQsSeen);
    3468             :         (yyval.dclsval) = (yyvsp[(5) - (6)].dclsval);
    3469             :     }
    3470             :     break;
    3471             : 
    3472             :   case 111:
    3473             : 
    3474             : /* Line 1806 of yacc.c  */
    3475             : #line 1226 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3476             :     {
    3477             :         (yyval.dclsval) = new DeclList;
    3478             :         (yyval.dclsval)->push_back((yyvsp[(1) - (1)].dclval));
    3479             :     }
    3480             :     break;
    3481             : 
    3482             :   case 112:
    3483             : 
    3484             : /* Line 1806 of yacc.c  */
    3485             : #line 1231 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3486             :     {
    3487             :         (yyvsp[(1) - (3)].dclsval)->push_back((yyvsp[(3) - (3)].dclval));
    3488             :         (yyval.dclsval) = (yyvsp[(1) - (3)].dclsval);
    3489             :     }
    3490             :     break;
    3491             : 
    3492             :   case 113:
    3493             : 
    3494             : /* Line 1806 of yacc.c  */
    3495             : #line 1239 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3496             :     {
    3497             :         // The topmost scope is either an AstOperation (for interface methods
    3498             :         // and service constructors) or an AstAttribute (for interface
    3499             :         // attributes), so look up exception names in the next-to-topmost scope:
    3500             :         AstDeclaration * decl = idlc()->scopes()->nextToTop()->lookupByName(
    3501             :             *(yyvsp[(1) - (1)].sval));
    3502             :         if (decl == 0) {
    3503             :             idlc()->error()->lookupError(*(yyvsp[(1) - (1)].sval));
    3504             :         } else if (!idlc()->error()->checkPublished(decl)) {
    3505             :             decl = 0;
    3506             :         } else if (decl->getNodeType() != NT_exception) {
    3507             :             idlc()->error()->error1(EIDL_ILLEGAL_RAISES, decl);
    3508             :             decl = 0;
    3509             :         }
    3510             :         delete (yyvsp[(1) - (1)].sval);
    3511             :         (yyval.dclval) = decl;
    3512             :     }
    3513             :     break;
    3514             : 
    3515             :   case 114:
    3516             : 
    3517             : /* Line 1806 of yacc.c  */
    3518             : #line 1261 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3519             :     {
    3520             :         idlc()->setParseState(PS_ServiceIFHeadSeen);
    3521             :     }
    3522             :     break;
    3523             : 
    3524             :   case 115:
    3525             : 
    3526             : /* Line 1806 of yacc.c  */
    3527             : #line 1265 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3528             :     {
    3529             :         AstInterface * ifc = static_cast< AstInterface * >(
    3530             :             idlc()->scopes()->top());
    3531             :         if (ifc->usesSingleInheritance()) {
    3532             :             idlc()->error()->error0(EIDL_MIXED_INHERITANCE);
    3533             :         } else {
    3534             :             addInheritedInterface(
    3535             :                 ifc, *(yyvsp[(4) - (4)].sval), (yyvsp[(1) - (4)].bval),
    3536             :                 rtl::OStringToOUString(
    3537             :                     idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8));
    3538             :         }
    3539             :         delete (yyvsp[(4) - (4)].sval);
    3540             :     }
    3541             :     break;
    3542             : 
    3543             :   case 116:
    3544             : 
    3545             : /* Line 1806 of yacc.c  */
    3546             : #line 1281 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3547             :     { (yyval.bval) = true; }
    3548             :     break;
    3549             : 
    3550             :   case 117:
    3551             : 
    3552             : /* Line 1806 of yacc.c  */
    3553             : #line 1282 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3554             :     { (yyval.bval) = false; }
    3555             :     break;
    3556             : 
    3557             :   case 120:
    3558             : 
    3559             : /* Line 1806 of yacc.c  */
    3560             : #line 1292 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3561             :     {
    3562             :                 idlc()->setParseState(PS_ConstantDeclSeen);
    3563             :         }
    3564             :     break;
    3565             : 
    3566             :   case 121:
    3567             : 
    3568             : /* Line 1806 of yacc.c  */
    3569             : #line 1295 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3570             :     {}
    3571             :     break;
    3572             : 
    3573             :   case 122:
    3574             : 
    3575             : /* Line 1806 of yacc.c  */
    3576             : #line 1299 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3577             :     {
    3578             :                 idlc()->setParseState(PS_ConstSeen);
    3579             :         }
    3580             :     break;
    3581             : 
    3582             :   case 123:
    3583             : 
    3584             : /* Line 1806 of yacc.c  */
    3585             : #line 1303 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3586             :     {
    3587             :                 idlc()->setParseState(PS_ConstTypeSeen);
    3588             :         }
    3589             :     break;
    3590             : 
    3591             :   case 124:
    3592             : 
    3593             : /* Line 1806 of yacc.c  */
    3594             : #line 1307 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3595             :     {
    3596             :         idlc()->setParseState(PS_ConstIDSeen);
    3597             :         checkIdentifier((yyvsp[(5) - (5)].sval));
    3598             :         }
    3599             :     break;
    3600             : 
    3601             :   case 125:
    3602             : 
    3603             : /* Line 1806 of yacc.c  */
    3604             : #line 1312 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3605             :     {
    3606             :                 idlc()->setParseState(PS_ConstAssignSeen);
    3607             :         }
    3608             :     break;
    3609             : 
    3610             :   case 126:
    3611             : 
    3612             : /* Line 1806 of yacc.c  */
    3613             : #line 1316 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3614             :     {
    3615             :                 idlc()->setParseState(PS_ConstExprSeen);
    3616             : 
    3617             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    3618             :                 AstConstant*    pConstant = NULL;
    3619             : 
    3620             :                 if ( (yyvsp[(9) - (9)].exval) && pScope )
    3621             :                 {
    3622             :                         if ( !(yyvsp[(9) - (9)].exval)->coerce((yyvsp[(3) - (9)].etval)) )
    3623             :                         {
    3624             :                                 idlc()->error()->coercionError((yyvsp[(9) - (9)].exval), (yyvsp[(3) - (9)].etval));
    3625             :                         } else
    3626             :                         {
    3627             :                                 pConstant = new AstConstant((yyvsp[(3) - (9)].etval), (yyvsp[(9) - (9)].exval), *(yyvsp[(5) - (9)].sval), pScope);
    3628             :                                 pScope->addDeclaration(pConstant);
    3629             :                         }
    3630             :                 }
    3631             :                 delete (yyvsp[(5) - (9)].sval);
    3632             :         }
    3633             :     break;
    3634             : 
    3635             :   case 127:
    3636             : 
    3637             : /* Line 1806 of yacc.c  */
    3638             : #line 1339 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3639             :     {
    3640             :                 idlc()->setParseState(PS_ConstantsSeen);
    3641             :         }
    3642             :     break;
    3643             : 
    3644             :   case 128:
    3645             : 
    3646             : /* Line 1806 of yacc.c  */
    3647             : #line 1343 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3648             :     {
    3649             :         idlc()->setParseState(PS_ConstantsIDSeen);
    3650             :         checkIdentifier((yyvsp[(3) - (3)].sval));
    3651             :         }
    3652             :     break;
    3653             : 
    3654             :   case 129:
    3655             : 
    3656             : /* Line 1806 of yacc.c  */
    3657             : #line 1348 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3658             :     {
    3659             :                 idlc()->setParseState(PS_ConstantsSqSeen);
    3660             : 
    3661             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    3662             :                 AstConstants*   pConstants = NULL;
    3663             :                 AstDeclaration* pExists = NULL;
    3664             : 
    3665             :                 if ( pScope )
    3666             :                 {
    3667             :                         pConstants = new AstConstants(*(yyvsp[(3) - (5)].sval), pScope);
    3668             :                         if( (pExists = pScope->lookupForAdd(pConstants)) )
    3669             :                         {
    3670             :                                 pExists->setInMainfile(idlc()->isInMainFile());
    3671             :                                 delete(pConstants);
    3672             :                                 pConstants = (AstConstants*)pExists;
    3673             :                         } else
    3674             :                         {
    3675             :                                 pScope->addDeclaration(pConstants);
    3676             :                         }
    3677             :                         idlc()->scopes()->push(pConstants);
    3678             :                 }
    3679             :                 delete (yyvsp[(3) - (5)].sval);
    3680             :         }
    3681             :     break;
    3682             : 
    3683             :   case 130:
    3684             : 
    3685             : /* Line 1806 of yacc.c  */
    3686             : #line 1372 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3687             :     {
    3688             :                 idlc()->setParseState(PS_ConstantsBodySeen);
    3689             :         }
    3690             :     break;
    3691             : 
    3692             :   case 131:
    3693             : 
    3694             : /* Line 1806 of yacc.c  */
    3695             : #line 1376 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3696             :     {
    3697             :                 idlc()->setParseState(PS_ConstantsQsSeen);
    3698             :                 /*
    3699             :                  * Finished with this constants - pop it from the scope stack
    3700             :                  */
    3701             :                 idlc()->scopes()->pop();
    3702             :         }
    3703             :     break;
    3704             : 
    3705             :   case 135:
    3706             : 
    3707             : /* Line 1806 of yacc.c  */
    3708             : #line 1392 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3709             :     {
    3710             :                 (yyval.exval) = new AstExpression(EC_or, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3711             :         }
    3712             :     break;
    3713             : 
    3714             :   case 137:
    3715             : 
    3716             : /* Line 1806 of yacc.c  */
    3717             : #line 1400 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3718             :     {
    3719             :                 (yyval.exval) = new AstExpression(EC_xor, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3720             :         }
    3721             :     break;
    3722             : 
    3723             :   case 139:
    3724             : 
    3725             : /* Line 1806 of yacc.c  */
    3726             : #line 1408 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3727             :     {
    3728             :                 (yyval.exval) = new AstExpression(EC_and, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3729             :         }
    3730             :     break;
    3731             : 
    3732             :   case 141:
    3733             : 
    3734             : /* Line 1806 of yacc.c  */
    3735             : #line 1416 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3736             :     {
    3737             :                 (yyval.exval) = new AstExpression(EC_left, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3738             :         }
    3739             :     break;
    3740             : 
    3741             :   case 142:
    3742             : 
    3743             : /* Line 1806 of yacc.c  */
    3744             : #line 1420 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3745             :     {
    3746             :                 (yyval.exval) = new AstExpression(EC_right, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3747             :         }
    3748             :     break;
    3749             : 
    3750             :   case 144:
    3751             : 
    3752             : /* Line 1806 of yacc.c  */
    3753             : #line 1428 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3754             :     {
    3755             :                 (yyval.exval) = new AstExpression(EC_add, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3756             :         }
    3757             :     break;
    3758             : 
    3759             :   case 145:
    3760             : 
    3761             : /* Line 1806 of yacc.c  */
    3762             : #line 1432 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3763             :     {
    3764             :                 (yyval.exval) = new AstExpression(EC_minus, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3765             :         }
    3766             :     break;
    3767             : 
    3768             :   case 147:
    3769             : 
    3770             : /* Line 1806 of yacc.c  */
    3771             : #line 1440 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3772             :     {
    3773             :                 (yyval.exval) = new AstExpression(EC_mul, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3774             :         }
    3775             :     break;
    3776             : 
    3777             :   case 148:
    3778             : 
    3779             : /* Line 1806 of yacc.c  */
    3780             : #line 1444 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3781             :     {
    3782             :                 (yyval.exval) = new AstExpression(EC_div, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3783             :         }
    3784             :     break;
    3785             : 
    3786             :   case 149:
    3787             : 
    3788             : /* Line 1806 of yacc.c  */
    3789             : #line 1448 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3790             :     {
    3791             :                 (yyval.exval) = new AstExpression(EC_mod, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
    3792             :         }
    3793             :     break;
    3794             : 
    3795             :   case 151:
    3796             : 
    3797             : /* Line 1806 of yacc.c  */
    3798             : #line 1456 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3799             :     {
    3800             :                 (yyval.exval) = new AstExpression(EC_u_plus, (yyvsp[(2) - (2)].exval), NULL);
    3801             :         }
    3802             :     break;
    3803             : 
    3804             :   case 152:
    3805             : 
    3806             : /* Line 1806 of yacc.c  */
    3807             : #line 1460 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3808             :     {
    3809             :                 (yyval.exval) = new AstExpression(EC_u_minus, (yyvsp[(2) - (2)].exval), NULL);
    3810             :         }
    3811             :     break;
    3812             : 
    3813             :   case 153:
    3814             : 
    3815             : /* Line 1806 of yacc.c  */
    3816             : #line 1464 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3817             :     {
    3818             :         }
    3819             :     break;
    3820             : 
    3821             :   case 154:
    3822             : 
    3823             : /* Line 1806 of yacc.c  */
    3824             : #line 1470 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3825             :     {
    3826             :                 /*
    3827             :                  * An expression which is a scoped name is not resolved now,
    3828             :                  * but only when it is evaluated (such as when it is assigned
    3829             :                  * as a constant value)
    3830             :                  */
    3831             :                 (yyval.exval) = new AstExpression((yyvsp[(1) - (1)].sval));
    3832             :         }
    3833             :     break;
    3834             : 
    3835             :   case 156:
    3836             : 
    3837             : /* Line 1806 of yacc.c  */
    3838             : #line 1480 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3839             :     {
    3840             :                 (yyval.exval) = (yyvsp[(2) - (3)].exval);
    3841             :         }
    3842             :     break;
    3843             : 
    3844             :   case 157:
    3845             : 
    3846             : /* Line 1806 of yacc.c  */
    3847             : #line 1487 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3848             :     {
    3849             :                 (yyval.exval) = new AstExpression((yyvsp[(1) - (1)].ival));
    3850             :         }
    3851             :     break;
    3852             : 
    3853             :   case 158:
    3854             : 
    3855             : /* Line 1806 of yacc.c  */
    3856             : #line 1491 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3857             :     {
    3858             :         (yyval.exval) = new AstExpression((yyvsp[(1) - (1)].uval));
    3859             :     }
    3860             :     break;
    3861             : 
    3862             :   case 159:
    3863             : 
    3864             : /* Line 1806 of yacc.c  */
    3865             : #line 1495 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3866             :     {
    3867             :                 (yyval.exval) = new AstExpression((yyvsp[(1) - (1)].dval));
    3868             :         }
    3869             :     break;
    3870             : 
    3871             :   case 160:
    3872             : 
    3873             : /* Line 1806 of yacc.c  */
    3874             : #line 1499 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3875             :     {
    3876             :                 (yyval.exval) = new AstExpression((sal_Int32)1, ET_boolean);
    3877             :         }
    3878             :     break;
    3879             : 
    3880             :   case 161:
    3881             : 
    3882             : /* Line 1806 of yacc.c  */
    3883             : #line 1503 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3884             :     {
    3885             :                 (yyval.exval) = new AstExpression((sal_Int32)0, ET_boolean);
    3886             :         }
    3887             :     break;
    3888             : 
    3889             :   case 162:
    3890             : 
    3891             : /* Line 1806 of yacc.c  */
    3892             : #line 1510 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3893             :     {
    3894             :                 (yyvsp[(1) - (1)].exval)->evaluate(EK_const);
    3895             :                 if ( !(yyvsp[(1) - (1)].exval)->coerce(ET_ulong) )
    3896             :                 {
    3897             :                         idlc()->error()->coercionError((yyvsp[(1) - (1)].exval), ET_ulong);
    3898             :                         delete (yyvsp[(1) - (1)].exval);
    3899             :                         (yyval.exval) = NULL;
    3900             :                 }
    3901             :         }
    3902             :     break;
    3903             : 
    3904             :   case 168:
    3905             : 
    3906             : /* Line 1806 of yacc.c  */
    3907             : #line 1528 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3908             :     {
    3909             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    3910             :         AstDeclaration const * type = 0;
    3911             :                 
    3912             :                 /*
    3913             :                  * If the constant's type is a scoped name, it must resolve
    3914             :                  * to a scalar constant type
    3915             :                  */
    3916             :                 if ( pScope && (type = pScope->lookupByName(*(yyvsp[(1) - (1)].sval))) ) {
    3917             :             if (!idlc()->error()->checkPublished(type))
    3918             :             {
    3919             :                 type = 0;
    3920             :             }
    3921             :             else
    3922             :             {
    3923             :                 type = resolveTypedefs(type);
    3924             :                 if (type->getNodeType() == NT_predefined) 
    3925             :                 {
    3926             :                     (yyval.etval) = static_cast< AstBaseType const * >(type)->
    3927             :                         getExprType();
    3928             :                 } else
    3929             :                     (yyval.etval) = ET_any;
    3930             :             }
    3931             :                 } else
    3932             :                         (yyval.etval) = ET_any;
    3933             :         }
    3934             :     break;
    3935             : 
    3936             :   case 169:
    3937             : 
    3938             : /* Line 1806 of yacc.c  */
    3939             : #line 1558 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3940             :     {
    3941             :                 idlc()->setParseState(PS_ExceptSeen);
    3942             :         }
    3943             :     break;
    3944             : 
    3945             :   case 170:
    3946             : 
    3947             : /* Line 1806 of yacc.c  */
    3948             : #line 1562 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3949             :     {
    3950             :         idlc()->setParseState(PS_ExceptIDSeen);
    3951             :         checkIdentifier((yyvsp[(3) - (3)].sval));
    3952             :         }
    3953             :     break;
    3954             : 
    3955             :   case 171:
    3956             : 
    3957             : /* Line 1806 of yacc.c  */
    3958             : #line 1567 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3959             :     {
    3960             :                 idlc()->setParseState(PS_InheritSpecSeen);
    3961             : 
    3962             :                 (yyval.ihval) = new FeInheritanceHeader(NT_exception, (yyvsp[(3) - (5)].sval), (yyvsp[(5) - (5)].sval), 0);
    3963             :                 delete (yyvsp[(5) - (5)].sval);
    3964             :         }
    3965             :     break;
    3966             : 
    3967             :   case 172:
    3968             : 
    3969             : /* Line 1806 of yacc.c  */
    3970             : #line 1577 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3971             :     {
    3972             :                 idlc()->setParseState(PS_ExceptHeaderSeen);
    3973             : 
    3974             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    3975             :                 AstException*   pExcept = NULL;
    3976             : 
    3977             :                 if ( pScope )
    3978             :                 {
    3979             :                         AstException* pBase = static_cast< AstException* >(
    3980             :                 (yyvsp[(1) - (1)].ihval)->getInherits());
    3981             :                         pExcept = new AstException(*(yyvsp[(1) - (1)].ihval)->getName(), pBase, pScope);     
    3982             :                         pScope->addDeclaration(pExcept);
    3983             :                 }
    3984             :                 /*
    3985             :                  * Push the scope of the exception on the scopes stack
    3986             :                  */
    3987             :                 idlc()->scopes()->push(pExcept);
    3988             :                 delete (yyvsp[(1) - (1)].ihval);
    3989             :         }
    3990             :     break;
    3991             : 
    3992             :   case 173:
    3993             : 
    3994             : /* Line 1806 of yacc.c  */
    3995             : #line 1597 "/usr/local/src/libreoffice/idlc/source/parser.y"
    3996             :     {
    3997             :                 idlc()->setParseState(PS_ExceptSqSeen);
    3998             :         }
    3999             :     break;
    4000             : 
    4001             :   case 174:
    4002             : 
    4003             : /* Line 1806 of yacc.c  */
    4004             : #line 1601 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4005             :     {
    4006             :                 idlc()->setParseState(PS_ExceptBodySeen);
    4007             :         }
    4008             :     break;
    4009             : 
    4010             :   case 175:
    4011             : 
    4012             : /* Line 1806 of yacc.c  */
    4013             : #line 1605 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4014             :     {
    4015             :                 idlc()->setParseState(PS_ExceptQsSeen);
    4016             :                 /* this exception is finished, pop its scope from the stack */ 
    4017             :                 idlc()->scopes()->pop();
    4018             :         }
    4019             :     break;
    4020             : 
    4021             :   case 176:
    4022             : 
    4023             : /* Line 1806 of yacc.c  */
    4024             : #line 1615 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4025             :     {
    4026             :                 idlc()->setParseState(PS_PropertyTypeSeen);
    4027             :         }
    4028             :     break;
    4029             : 
    4030             :   case 177:
    4031             : 
    4032             : /* Line 1806 of yacc.c  */
    4033             : #line 1619 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4034             :     {
    4035             :                 idlc()->setParseState(PS_PropertyCompleted);
    4036             : 
    4037             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    4038             :                 AstAttribute*   pAttr = NULL;
    4039             :                 FeDeclList*             pList = (yyvsp[(4) - (4)].dlval);
    4040             :                 FeDeclarator*   pDecl = NULL;
    4041             :         AstType const * pType = NULL;
    4042             : 
    4043             :                 if ( pScope->getScopeNodeType() == NT_singleton )
    4044             :                 {
    4045             :                         idlc()->error()->error0(EIDL_ILLEGAL_ADD);                        
    4046             :                 } else
    4047             :                 {
    4048             :                         if ( ((yyvsp[(1) - (4)].ulval) & AF_ATTRIBUTE) == AF_ATTRIBUTE )
    4049             :                                 idlc()->error()->flagError(EIDL_WRONGATTRIBUTEKEYWORD, AF_ATTRIBUTE);
    4050             : 
    4051             :                         if ( ((yyvsp[(1) - (4)].ulval) & AF_PROPERTY) != AF_PROPERTY )
    4052             :                                 idlc()->error()->flagError(EIDL_MISSINGATTRIBUTEKEYWORD, AF_PROPERTY);
    4053             : 
    4054             :                         /*
    4055             :                          * Create nodes representing attributes and add them to the
    4056             :                          * enclosing scope
    4057             :                          */
    4058             :                         if ( pScope && (yyvsp[(2) - (4)].cdclval) && pList )
    4059             :                         {
    4060             :                                 FeDeclList::iterator iter = pList->begin();
    4061             :                                 FeDeclList::iterator end = pList->end();
    4062             : 
    4063             :                                 while (iter != end)
    4064             :                                 {
    4065             :                                         pDecl = (*iter);
    4066             :                                         if ( !pDecl )
    4067             :                                         {
    4068             :                                                 iter++;
    4069             :                                                 continue;
    4070             :                                         }
    4071             : 
    4072             :                                         pType = pDecl->compose((yyvsp[(2) - (4)].cdclval));                          
    4073             : 
    4074             :                                         if ( !pType )
    4075             :                                         {
    4076             :                                                 iter++;
    4077             :                                                 continue;
    4078             :                                         }
    4079             : 
    4080             :                                         pAttr = new AstAttribute(NT_property, (yyvsp[(1) - (4)].ulval), pType, pDecl->getName(), pScope);
    4081             : 
    4082             :                                         pScope->addDeclaration(pAttr);
    4083             :                                         iter++;
    4084             :                                         delete pDecl;
    4085             :                                 }
    4086             :                         }
    4087             :                 }                       
    4088             : 
    4089             :                 if ( pList )
    4090             :                         delete pList;
    4091             :         }
    4092             :     break;
    4093             : 
    4094             :   case 178:
    4095             : 
    4096             : /* Line 1806 of yacc.c  */
    4097             : #line 1678 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4098             :     {
    4099             :                 yyerror("property");
    4100             :                 yyerrok;
    4101             :         }
    4102             :     break;
    4103             : 
    4104             :   case 181:
    4105             : 
    4106             : /* Line 1806 of yacc.c  */
    4107             : #line 1693 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4108             :     {
    4109             :                 idlc()->setParseState(PS_ServiceMemberSeen);
    4110             :                 
    4111             :                 AstScope*                       pScope = idlc()->scopes()->topNonNull();
    4112             :                 AstDeclaration*         pDecl = NULL;
    4113             :                 AstInterfaceMember* pIMember = NULL;
    4114             : 
    4115             :                 if ( pScope->getScopeNodeType() == NT_singleton )
    4116             :                 {
    4117             :                         idlc()->error()->error0(EIDL_ILLEGAL_ADD);                        
    4118             :                 } else
    4119             :                 {
    4120             :                         /*
    4121             :                          * Create a node representing a class member.
    4122             :                          * Store it in the enclosing scope
    4123             :                  */
    4124             :                         if ( pScope && (yyvsp[(2) - (3)].slval) )
    4125             :                         {
    4126             :                                 StringList::iterator iter = (yyvsp[(2) - (3)].slval)->begin();
    4127             :                                 StringList::iterator end = (yyvsp[(2) - (3)].slval)->end();                                          
    4128             : 
    4129             :                                 while ( iter != end )
    4130             :                                 {
    4131             :                                         pDecl = pScope->lookupByName(*iter);
    4132             :                                         if ( pDecl && (pDecl->getNodeType() == NT_interface) )
    4133             :                                         {
    4134             :                         /* we relax the strict published check and allow to add new
    4135             :                          * interfaces if they are optional
    4136             :                          */
    4137             :                         bool bOptional = (((yyvsp[(1) - (3)].ulval) & AF_OPTIONAL) == AF_OPTIONAL);
    4138             :                         if ( idlc()->error()->checkPublished(pDecl, bOptional) )
    4139             :                         {
    4140             :                             pIMember = new AstInterfaceMember(
    4141             :                                 (yyvsp[(1) - (3)].ulval), (AstInterface*)pDecl, *iter, pScope);
    4142             :                             pScope->addDeclaration(pIMember);
    4143             :                         }
    4144             :                                         } else
    4145             :                                         {
    4146             :                                                 idlc()->error()->
    4147             :                                                         lookupError(EIDL_INTERFACEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
    4148             :                                         }
    4149             :                                         iter++;
    4150             :                                 }
    4151             :                         }                               
    4152             :                 }
    4153             :                 delete (yyvsp[(2) - (3)].slval);
    4154             :         }
    4155             :     break;
    4156             : 
    4157             :   case 182:
    4158             : 
    4159             : /* Line 1806 of yacc.c  */
    4160             : #line 1743 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4161             :     {
    4162             :                 idlc()->setParseState(PS_ServiceMemberSeen);
    4163             : 
    4164             :                 AstScope*                 pScope = idlc()->scopes()->topNonNull();
    4165             :                 AstDeclaration*   pDecl = NULL;
    4166             :                 AstServiceMember* pSMember = NULL;
    4167             : 
    4168             :                 /*
    4169             :                  * Create a node representing a class member.
    4170             :                  * Store it in the enclosing scope
    4171             :          */
    4172             :                 if ( pScope && (yyvsp[(2) - (3)].slval) )
    4173             :                 {
    4174             :                         StringList::iterator iter = (yyvsp[(2) - (3)].slval)->begin();
    4175             :                         StringList::iterator end = (yyvsp[(2) - (3)].slval)->end();                                          
    4176             : 
    4177             :                         while ( iter != end )
    4178             :                         {
    4179             :                                 pDecl = pScope->lookupByName(*iter);
    4180             :                                 if ( pDecl && (pDecl->getNodeType() == NT_service) )
    4181             :                                 {
    4182             :                                         if ( pScope->getScopeNodeType() == NT_singleton && pScope->nMembers() > 0 )
    4183             :                                                 idlc()->error()->error0(EIDL_ILLEGAL_ADD);                                                                                
    4184             :                     else if ( idlc()->error()->checkPublished(pDecl) )
    4185             :                     {
    4186             :                         pSMember = new AstServiceMember(
    4187             :                             (yyvsp[(1) - (3)].ulval), (AstService*)pDecl, *iter, pScope);
    4188             :                         pScope->addDeclaration(pSMember);
    4189             :                     }
    4190             :                                 } else
    4191             :                                 {
    4192             :                                         idlc()->error()->
    4193             :                                                 lookupError(EIDL_SERVICEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
    4194             :                                 }
    4195             :                                 iter++;
    4196             :                         }
    4197             :                 }                               
    4198             :                 delete (yyvsp[(2) - (3)].slval);
    4199             :         }
    4200             :     break;
    4201             : 
    4202             :   case 183:
    4203             : 
    4204             : /* Line 1806 of yacc.c  */
    4205             : #line 1785 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4206             :     {
    4207             :                 idlc()->setParseState(PS_ServiceMemberSeen);
    4208             : 
    4209             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    4210             :                 AstDeclaration* pDecl = NULL;
    4211             :                 AstObserves*    pObserves = NULL;
    4212             : 
    4213             :                 if ( pScope->getScopeNodeType() == NT_singleton )
    4214             :                 {
    4215             :                         idlc()->error()->error0(EIDL_ILLEGAL_ADD);                        
    4216             :                 } else
    4217             :                 {
    4218             :                         /*
    4219             :                          * Create a node representing a class member.
    4220             :                          * Store it in the enclosing scope
    4221             :                  */
    4222             :                         if ( pScope && (yyvsp[(2) - (3)].slval) )
    4223             :                         {
    4224             :                                 StringList::iterator iter = (yyvsp[(2) - (3)].slval)->begin();
    4225             :                                 StringList::iterator end = (yyvsp[(2) - (3)].slval)->end();                                          
    4226             : 
    4227             :                                 while ( iter != end )
    4228             :                                 {
    4229             :                                         pDecl = pScope->lookupByName(*iter);
    4230             :                                         if ( pDecl && (pDecl->getNodeType() == NT_interface) )
    4231             :                                         {
    4232             :                                                 pObserves = new AstObserves((AstInterface*)pDecl, *iter, pScope);
    4233             :                                                 pScope->addDeclaration(pObserves);
    4234             :                                         } else
    4235             :                                         {
    4236             :                                                 idlc()->error()->
    4237             :                                                         lookupError(EIDL_INTERFACEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
    4238             :                                         }
    4239             :                                         iter++;
    4240             :                                 }
    4241             :                         }                               
    4242             :                 }
    4243             :                 delete (yyvsp[(2) - (3)].slval);
    4244             :         }
    4245             :     break;
    4246             : 
    4247             :   case 184:
    4248             : 
    4249             : /* Line 1806 of yacc.c  */
    4250             : #line 1827 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4251             :     {
    4252             :                 idlc()->setParseState(PS_ServiceMemberSeen);
    4253             : 
    4254             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    4255             :                 AstDeclaration* pDecl = NULL;
    4256             :                 AstNeeds*               pNeeds = NULL;
    4257             : 
    4258             :                 if ( pScope->getScopeNodeType() == NT_singleton )
    4259             :                 {
    4260             :                         idlc()->error()->error0(EIDL_ILLEGAL_ADD);                        
    4261             :                 } else
    4262             :                 {
    4263             :                         /*
    4264             :                          * Create a node representing a class member.
    4265             :                          * Store it in the enclosing scope
    4266             :                  */
    4267             :                         if ( pScope && (yyvsp[(2) - (3)].slval) )
    4268             :                         {
    4269             :                                 StringList::iterator iter = (yyvsp[(2) - (3)].slval)->begin();
    4270             :                                 StringList::iterator end = (yyvsp[(2) - (3)].slval)->end();                                          
    4271             : 
    4272             :                                 while ( iter != end )
    4273             :                                 {
    4274             :                                         pDecl = pScope->lookupByName(*iter);
    4275             :                                         if ( pDecl && (pDecl->getNodeType() == NT_service) )
    4276             :                                         {
    4277             :                                                 pNeeds = new AstNeeds((AstService*)pDecl, *iter, pScope);
    4278             :                                                 pScope->addDeclaration(pNeeds);
    4279             :                                         } else
    4280             :                                         {
    4281             :                                                 idlc()->error()->
    4282             :                                                         lookupError(EIDL_SERVICEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
    4283             :                                         }
    4284             :                                         iter++;
    4285             :                                 }
    4286             :                         }                               
    4287             :                 }
    4288             :                 delete (yyvsp[(2) - (3)].slval);
    4289             :         }
    4290             :     break;
    4291             : 
    4292             :   case 185:
    4293             : 
    4294             : /* Line 1806 of yacc.c  */
    4295             : #line 1868 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4296             :     {
    4297             :                 idlc()->setParseState(PS_PropertyDeclSeen);
    4298             :         }
    4299             :     break;
    4300             : 
    4301             :   case 186:
    4302             : 
    4303             : /* Line 1806 of yacc.c  */
    4304             : #line 1875 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4305             :     {
    4306             :                 idlc()->setParseState(PS_ServiceIFHeadSeen);
    4307             :                 (yyval.ulval) = AF_INVALID;
    4308             :         }
    4309             :     break;
    4310             : 
    4311             :   case 187:
    4312             : 
    4313             : /* Line 1806 of yacc.c  */
    4314             : #line 1881 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4315             :     {
    4316             :                 idlc()->setParseState(PS_ServiceIFHeadSeen);
    4317             :                 if ( (AF_OPTIONAL != (yyvsp[(1) - (2)].ulval)) && ( AF_INVALID != (yyvsp[(1) - (2)].ulval)) )
    4318             :                         idlc()->error()->flagError(EIDL_OPTIONALEXPECTED, (yyvsp[(1) - (2)].ulval));
    4319             :                 (yyval.ulval) = (yyvsp[(1) - (2)].ulval);
    4320             :         }
    4321             :     break;
    4322             : 
    4323             :   case 188:
    4324             : 
    4325             : /* Line 1806 of yacc.c  */
    4326             : #line 1891 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4327             :     {
    4328             :                 idlc()->setParseState(PS_ServiceSHeadSeen);
    4329             :                 (yyval.ulval) = AF_INVALID;
    4330             :         }
    4331             :     break;
    4332             : 
    4333             :   case 189:
    4334             : 
    4335             : /* Line 1806 of yacc.c  */
    4336             : #line 1897 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4337             :     {
    4338             :                 idlc()->setParseState(PS_ServiceSHeadSeen);
    4339             :                 if ( (AF_OPTIONAL != (yyvsp[(1) - (2)].ulval)) && ( AF_INVALID != (yyvsp[(1) - (2)].ulval)) )
    4340             :                         idlc()->error()->flagError(EIDL_OPTIONALEXPECTED, (yyvsp[(1) - (2)].ulval));
    4341             :                 (yyval.ulval) = (yyvsp[(1) - (2)].ulval);
    4342             :         }
    4343             :     break;
    4344             : 
    4345             :   case 190:
    4346             : 
    4347             : /* Line 1806 of yacc.c  */
    4348             : #line 1907 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4349             :     {
    4350             :                 idlc()->setParseState(PS_ServiceSeen);
    4351             :         }
    4352             :     break;
    4353             : 
    4354             :   case 191:
    4355             : 
    4356             : /* Line 1806 of yacc.c  */
    4357             : #line 1911 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4358             :     {
    4359             :         idlc()->setParseState(PS_ServiceIDSeen);
    4360             :         checkIdentifier((yyvsp[(3) - (3)].sval));
    4361             : 
    4362             :         AstScope*       pScope = idlc()->scopes()->topNonNull();
    4363             :         AstService*     pService = NULL;
    4364             : 
    4365             :         /*
    4366             :          * Make a new service and add it to the enclosing scope
    4367             :          */
    4368             :         if (pScope != NULL)
    4369             :         {
    4370             :             pService = new AstService(*(yyvsp[(3) - (3)].sval), pScope);
    4371             :             pScope->addDeclaration(pService);
    4372             :         }
    4373             :         delete (yyvsp[(3) - (3)].sval);
    4374             :         /*
    4375             :          * Push it on the stack
    4376             :          */
    4377             :         idlc()->scopes()->push(pService);
    4378             :         }
    4379             :     break;
    4380             : 
    4381             :   case 192:
    4382             : 
    4383             : /* Line 1806 of yacc.c  */
    4384             : #line 1933 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4385             :     {
    4386             :                 /* this service is finished, pop its scope from the stack */ 
    4387             :                 idlc()->scopes()->pop();
    4388             :         }
    4389             :     break;
    4390             : 
    4391             :   case 195:
    4392             : 
    4393             : /* Line 1806 of yacc.c  */
    4394             : #line 1946 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4395             :     {
    4396             :         AstScope * scope = idlc()->scopes()->nextToTop();
    4397             :             // skip the scope pushed by service_dcl
    4398             :         AstDeclaration * decl = scope->lookupByName(*(yyvsp[(2) - (2)].sval));
    4399             :         if (decl != 0 && resolveTypedefs(decl)->getNodeType() == NT_interface) {
    4400             :             if (idlc()->error()->checkPublished(decl)) {
    4401             :                 idlc()->scopes()->top()->addDeclaration(decl);
    4402             :             }
    4403             :         } else {
    4404             :             idlc()->error()->lookupError(
    4405             :                 EIDL_INTERFACEMEMBER_LOOKUP, *(yyvsp[(2) - (2)].sval), scopeAsDecl(scope));
    4406             :         }
    4407             :         delete (yyvsp[(2) - (2)].sval);
    4408             :     }
    4409             :     break;
    4410             : 
    4411             :   case 196:
    4412             : 
    4413             : /* Line 1806 of yacc.c  */
    4414             : #line 1961 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4415             :     {
    4416             :         AstService * s = static_cast< AstService * >(idlc()->scopes()->top());
    4417             :         if (s != 0) {
    4418             :             s->setDefaultConstructor(!(yyvsp[(4) - (4)].bval));
    4419             :         }
    4420             :     }
    4421             :     break;
    4422             : 
    4423             :   case 197:
    4424             : 
    4425             : /* Line 1806 of yacc.c  */
    4426             : #line 1970 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4427             :     { (yyval.bval) = true; }
    4428             :     break;
    4429             : 
    4430             :   case 198:
    4431             : 
    4432             : /* Line 1806 of yacc.c  */
    4433             : #line 1971 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4434             :     { (yyval.bval) = false; }
    4435             :     break;
    4436             : 
    4437             :   case 202:
    4438             : 
    4439             : /* Line 1806 of yacc.c  */
    4440             : #line 1987 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4441             :     {
    4442             :         checkIdentifier((yyvsp[(1) - (1)].sval));
    4443             :         AstScope * scope = idlc()->scopes()->top();
    4444             :         AstOperation * ctor = new AstOperation(0, *(yyvsp[(1) - (1)].sval), scope);
    4445             :         delete (yyvsp[(1) - (1)].sval);
    4446             :         scope->addDeclaration(ctor);
    4447             :                 idlc()->scopes()->push(ctor);
    4448             :     }
    4449             :     break;
    4450             : 
    4451             :   case 203:
    4452             : 
    4453             : /* Line 1806 of yacc.c  */
    4454             : #line 1999 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4455             :     {
    4456             :         static_cast< AstOperation * >(idlc()->scopes()->top())->setExceptions(
    4457             :             (yyvsp[(6) - (6)].dclsval));
    4458             :         delete (yyvsp[(6) - (6)].dclsval);
    4459             :         idlc()->scopes()->pop();
    4460             :         if (static_cast< AstService * >(idlc()->scopes()->top())->
    4461             :             checkLastConstructor())
    4462             :         {
    4463             :             idlc()->error()->error0(EIDL_SIMILAR_CONSTRUCTORS);
    4464             :         }
    4465             :     }
    4466             :     break;
    4467             : 
    4468             :   case 205:
    4469             : 
    4470             : /* Line 1806 of yacc.c  */
    4471             : #line 2015 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4472             :     {
    4473             :                 idlc()->setParseState(PS_SingletonSeen);
    4474             :         }
    4475             :     break;
    4476             : 
    4477             :   case 206:
    4478             : 
    4479             : /* Line 1806 of yacc.c  */
    4480             : #line 2019 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4481             :     {
    4482             :         idlc()->setParseState(PS_SingletonIDSeen);
    4483             :         checkIdentifier((yyvsp[(3) - (3)].sval));
    4484             : 
    4485             :                 AstScope*       pScope = idlc()->scopes()->topNonNull();
    4486             :                 AstService*     pService = NULL;
    4487             :                 
    4488             :                 /*
    4489             :                  * Make a new service and add it to the enclosing scope
    4490             :                  */
    4491             :                 if (pScope != NULL) 
    4492             :                 {
    4493             :                         pService = new AstService(NT_singleton, *(yyvsp[(3) - (3)].sval), pScope);
    4494             :                         pScope->addDeclaration(pService);
    4495             :                 }
    4496             :                 delete (yyvsp[(3) - (3)].sval);
    4497             :                 /*
    4498             :                  * Push it on the stack
    4499             :                  */
    4500             :                 idlc()->scopes()->push(pService);
    4501             :         }
    4502             :     break;
    4503             : 
    4504             :   case 207:
    4505             : 
    4506             : /* Line 1806 of yacc.c  */
    4507             : #line 2041 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4508             :     {
    4509             :                 /* this singelton is finished, pop its scope from the stack */ 
    4510             :                 idlc()->scopes()->pop();
    4511             :         }
    4512             :     break;
    4513             : 
    4514             :   case 210:
    4515             : 
    4516             : /* Line 1806 of yacc.c  */
    4517             : #line 2054 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4518             :     {
    4519             :         AstScope * scope = idlc()->scopes()->nextToTop();
    4520             :             // skip the scope (needlessly) pushed by singleton_dcl
    4521             :         AstDeclaration * decl = scope->lookupByName(*(yyvsp[(2) - (2)].sval));
    4522             :         if (decl != 0 && resolveTypedefs(decl)->getNodeType() == NT_interface) {
    4523             :             if (idlc()->error()->checkPublished(decl)) {
    4524             :                 idlc()->scopes()->top()->addDeclaration(decl);
    4525             :             }
    4526             :         } else {
    4527             :             idlc()->error()->lookupError(
    4528             :                 EIDL_INTERFACEMEMBER_LOOKUP, *(yyvsp[(2) - (2)].sval), scopeAsDecl(scope));
    4529             :         }
    4530             :         delete (yyvsp[(2) - (2)].sval);
    4531             :     }
    4532             :     break;
    4533             : 
    4534             :   case 211:
    4535             : 
    4536             : /* Line 1806 of yacc.c  */
    4537             : #line 2072 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4538             :     {
    4539             :         idlc()->setParseState(
    4540             :             idlc()->scopes()->top()->getScopeNodeType() == NT_service
    4541             :             ? PS_ServiceSqSeen : PS_SingletonSqSeen);
    4542             :     }
    4543             :     break;
    4544             : 
    4545             :   case 212:
    4546             : 
    4547             : /* Line 1806 of yacc.c  */
    4548             : #line 2078 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4549             :     {
    4550             :         idlc()->setParseState(
    4551             :             idlc()->scopes()->top()->getScopeNodeType() == NT_service
    4552             :             ? PS_ServiceBodySeen : PS_SingletonBodySeen);
    4553             :     }
    4554             :     break;
    4555             : 
    4556             :   case 213:
    4557             : 
    4558             : /* Line 1806 of yacc.c  */
    4559             : #line 2084 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4560             :     {
    4561             :         idlc()->setParseState(
    4562             :             idlc()->scopes()->top()->getScopeNodeType() == NT_service
    4563             :             ? PS_ServiceQsSeen : PS_SingletonQsSeen);
    4564             :     }
    4565             :     break;
    4566             : 
    4567             :   case 214:
    4568             : 
    4569             : /* Line 1806 of yacc.c  */
    4570             : #line 2093 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4571             :     {
    4572             :                 idlc()->setParseState(PS_TypedefSeen);
    4573             :         }
    4574             :     break;
    4575             : 
    4576             :   case 215:
    4577             : 
    4578             : /* Line 1806 of yacc.c  */
    4579             : #line 2096 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4580             :     {}
    4581             :     break;
    4582             : 
    4583             :   case 216:
    4584             : 
    4585             : /* Line 1806 of yacc.c  */
    4586             : #line 2097 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4587             :     {}
    4588             :     break;
    4589             : 
    4590             :   case 217:
    4591             : 
    4592             : /* Line 1806 of yacc.c  */
    4593             : #line 2098 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4594             :     {}
    4595             :     break;
    4596             : 
    4597             :   case 218:
    4598             : 
    4599             : /* Line 1806 of yacc.c  */
    4600             : #line 2099 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4601             :     {}
    4602             :     break;
    4603             : 
    4604             :   case 219:
    4605             : 
    4606             : /* Line 1806 of yacc.c  */
    4607             : #line 2104 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4608             :     {
    4609             :                 idlc()->setParseState(PS_TypeSpecSeen);
    4610             :         if ((yyvsp[(1) - (1)].cdclval) != 0 && (yyvsp[(1) - (1)].cdclval)->getNodeType() == NT_instantiated_struct) {
    4611             :             idlc()->error()->error0(EIDL_INSTANTIATED_STRUCT_TYPE_TYPEDEF);
    4612             :         }
    4613             :         }
    4614             :     break;
    4615             : 
    4616             :   case 220:
    4617             : 
    4618             : /* Line 1806 of yacc.c  */
    4619             : #line 2111 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4620             :     {
    4621             :                 idlc()->setParseState(PS_DeclaratorsSeen);
    4622             : 
    4623             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    4624             :                 AstTypeDef*     pTypeDef = NULL;
    4625             :                 FeDeclList*             pList = (yyvsp[(3) - (3)].dlval);
    4626             :                 FeDeclarator*   pDecl = NULL;
    4627             :         AstType const * pType = NULL;
    4628             : 
    4629             :                 /*
    4630             :                  * Create nodes representing typedefs and add them to the
    4631             :                  * enclosing scope
    4632             :                  */
    4633             :                 if ( pScope && (yyvsp[(1) - (3)].cdclval) && pList )
    4634             :                 {
    4635             :                         FeDeclList::iterator iter = pList->begin();
    4636             :                         FeDeclList::iterator end = pList->end();
    4637             : 
    4638             :                         while (iter != end)
    4639             :                         {
    4640             :                                 pDecl = (*iter);
    4641             :                                 if ( !pDecl )
    4642             :                                 {
    4643             :                                         iter++;
    4644             :                                         continue;
    4645             :                                 }
    4646             : 
    4647             :                                 pType = pDecl->compose((yyvsp[(1) - (3)].cdclval));
    4648             : 
    4649             :                                 if ( !pType )
    4650             :                                 {
    4651             :                                         iter++;
    4652             :                                         continue;
    4653             :                                 }
    4654             : 
    4655             :                                 pTypeDef = new AstTypeDef(pType, pDecl->getName(), pScope);
    4656             : 
    4657             :                                 pScope->addDeclaration(pTypeDef);
    4658             :                                 iter++;
    4659             :                                 delete pDecl;
    4660             :                         }
    4661             :                         delete pList;
    4662             :                 }
    4663             :         }
    4664             :     break;
    4665             : 
    4666             :   case 221:
    4667             : 
    4668             : /* Line 1806 of yacc.c  */
    4669             : #line 2159 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4670             :     {
    4671             :                 if ( (yyvsp[(2) - (2)].dlval) )
    4672             :                 {
    4673             :                         (yyvsp[(2) - (2)].dlval)->push_back((yyvsp[(1) - (2)].fdval));
    4674             :                         (yyval.dlval) = (yyvsp[(2) - (2)].dlval);
    4675             :                 } else
    4676             :                 {
    4677             :                         FeDeclList* pList = new FeDeclList();
    4678             :                         pList->push_back((yyvsp[(1) - (2)].fdval));
    4679             :                         (yyval.dlval) = pList;
    4680             :                 }
    4681             :         }
    4682             :     break;
    4683             : 
    4684             :   case 222:
    4685             : 
    4686             : /* Line 1806 of yacc.c  */
    4687             : #line 2176 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4688             :     {
    4689             :                 idlc()->setParseState(PS_DeclsCommaSeen);
    4690             :         }
    4691             :     break;
    4692             : 
    4693             :   case 223:
    4694             : 
    4695             : /* Line 1806 of yacc.c  */
    4696             : #line 2180 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4697             :     {
    4698             :                 idlc()->setParseState(PS_DeclsDeclSeen);
    4699             :                 if ( (yyvsp[(1) - (4)].dlval) )
    4700             :                 {
    4701             :                         (yyvsp[(1) - (4)].dlval)->push_back((yyvsp[(4) - (4)].fdval));
    4702             :                         (yyval.dlval) = (yyvsp[(1) - (4)].dlval);
    4703             :                 } else
    4704             :                 {
    4705             :                         FeDeclList* pList = new FeDeclList();
    4706             :                         pList->push_back((yyvsp[(4) - (4)].fdval));
    4707             :                         (yyval.dlval) = pList;
    4708             :                 }
    4709             :         }
    4710             :     break;
    4711             : 
    4712             :   case 224:
    4713             : 
    4714             : /* Line 1806 of yacc.c  */
    4715             : #line 2194 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4716             :     {
    4717             :                 (yyval.dlval) = NULL;
    4718             :         }
    4719             :     break;
    4720             : 
    4721             :   case 227:
    4722             : 
    4723             : /* Line 1806 of yacc.c  */
    4724             : #line 2206 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4725             :     {
    4726             :         // For historic reasons, the struct com.sun.star.uno.Uik contains
    4727             :         // members with illegal names (of the form "m_DataN"); avoid useless
    4728             :         // warnings about them:
    4729             :         AstScope * scope = idlc()->scopes()->top();
    4730             :         if (scope == 0 || scope->getScopeNodeType() != NT_struct
    4731             :             || (scopeAsDecl(scope)->getScopedName()
    4732             :                 != "com::sun::star::uno::Uik"))
    4733             :         {
    4734             :             checkIdentifier((yyvsp[(1) - (1)].sval));
    4735             :         }
    4736             : 
    4737             :         (yyval.fdval) = new FeDeclarator(*(yyvsp[(1) - (1)].sval), FeDeclarator::FD_simple, NULL);
    4738             :         delete (yyvsp[(1) - (1)].sval);
    4739             :         }
    4740             :     break;
    4741             : 
    4742             :   case 228:
    4743             : 
    4744             : /* Line 1806 of yacc.c  */
    4745             : #line 2225 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4746             :     {
    4747             :                 (yyval.fdval) = new FeDeclarator((yyvsp[(1) - (1)].dclval)->getLocalName(), FeDeclarator::FD_complex, (yyvsp[(1) - (1)].dclval));
    4748             :         }
    4749             :     break;
    4750             : 
    4751             :   case 229:
    4752             : 
    4753             : /* Line 1806 of yacc.c  */
    4754             : #line 2232 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4755             :     {
    4756             :         idlc()->setParseState(PS_ArrayIDSeen);
    4757             :         checkIdentifier((yyvsp[(1) - (1)].sval));
    4758             :         }
    4759             :     break;
    4760             : 
    4761             :   case 230:
    4762             : 
    4763             : /* Line 1806 of yacc.c  */
    4764             : #line 2237 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4765             :     {
    4766             :                 idlc()->setParseState(PS_ArrayCompleted);
    4767             :                 (yyval.dclval) = new AstArray(*(yyvsp[(1) - (3)].sval), NULL, *(yyvsp[(3) - (3)].exlval), idlc()->scopes()->bottom());
    4768             :                 delete (yyvsp[(1) - (3)].sval);
    4769             :         }
    4770             :     break;
    4771             : 
    4772             :   case 231:
    4773             : 
    4774             : /* Line 1806 of yacc.c  */
    4775             : #line 2246 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4776             :     {
    4777             :                 if( (yyvsp[(2) - (2)].exlval) )
    4778             :                 {
    4779             :                         (yyvsp[(2) - (2)].exlval)->push_front((yyvsp[(1) - (2)].exval));
    4780             :                         (yyval.exlval) = (yyvsp[(2) - (2)].exlval);
    4781             :                 } else
    4782             :                 {
    4783             :                         ExprList* pList = new ExprList();
    4784             :                         pList->push_back((yyvsp[(1) - (2)].exval));
    4785             :                         (yyval.exlval) = pList;
    4786             :                 }
    4787             :         }
    4788             :     break;
    4789             : 
    4790             :   case 232:
    4791             : 
    4792             : /* Line 1806 of yacc.c  */
    4793             : #line 2262 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4794             :     {
    4795             :                 if( (yyvsp[(1) - (2)].exlval) )
    4796             :                 {
    4797             :                         (yyvsp[(1) - (2)].exlval)->push_back((yyvsp[(2) - (2)].exval));
    4798             :                         (yyval.exlval) = (yyvsp[(1) - (2)].exlval);
    4799             :                 } else
    4800             :                 {
    4801             :                         ExprList* pList = new ExprList();
    4802             :                         pList->push_back((yyvsp[(2) - (2)].exval));
    4803             :                         (yyval.exlval) = pList;
    4804             :                 }
    4805             :         }
    4806             :     break;
    4807             : 
    4808             :   case 233:
    4809             : 
    4810             : /* Line 1806 of yacc.c  */
    4811             : #line 2275 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4812             :     {
    4813             :                 (yyval.exlval) = NULL;
    4814             :         }
    4815             :     break;
    4816             : 
    4817             :   case 234:
    4818             : 
    4819             : /* Line 1806 of yacc.c  */
    4820             : #line 2282 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4821             :     {
    4822             :                 idlc()->setParseState(PS_DimSqSeen);
    4823             :         }
    4824             :     break;
    4825             : 
    4826             :   case 235:
    4827             : 
    4828             : /* Line 1806 of yacc.c  */
    4829             : #line 2286 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4830             :     {
    4831             :                 idlc()->setParseState(PS_DimExprSeen);
    4832             :         }
    4833             :     break;
    4834             : 
    4835             :   case 236:
    4836             : 
    4837             : /* Line 1806 of yacc.c  */
    4838             : #line 2290 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4839             :     {
    4840             :                 idlc()->setParseState(PS_DimQsSeen);
    4841             :                 /*
    4842             :                  * Array dimensions are expressions which must be coerced to
    4843             :                  * positive integers
    4844             :                  */
    4845             :                 if ( !(yyvsp[(3) - (5)].exval) || !(yyvsp[(3) - (5)].exval)->coerce(ET_uhyper) ) 
    4846             :                 {
    4847             :                         idlc()->error()->coercionError((yyvsp[(3) - (5)].exval), ET_uhyper);
    4848             :                         (yyval.exval) = NULL;
    4849             :                 } else
    4850             :                         (yyval.exval) = (yyvsp[(3) - (5)].exval);
    4851             :         }
    4852             :     break;
    4853             : 
    4854             :   case 237:
    4855             : 
    4856             : /* Line 1806 of yacc.c  */
    4857             : #line 2307 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4858             :     {
    4859             :                 if ((yyvsp[(2) - (2)].slval))
    4860             :                 {
    4861             :                         (yyvsp[(2) - (2)].slval)->push_front(*(yyvsp[(1) - (2)].sval));
    4862             :                         (yyval.slval) = (yyvsp[(2) - (2)].slval);
    4863             :                 } else
    4864             :                 {
    4865             :                         StringList* pNames = new StringList();
    4866             :                         pNames->push_back(*(yyvsp[(1) - (2)].sval));
    4867             :                         (yyval.slval) = pNames;
    4868             :                 }
    4869             :                 delete((yyvsp[(1) - (2)].sval));
    4870             :         }
    4871             :     break;
    4872             : 
    4873             :   case 238:
    4874             : 
    4875             : /* Line 1806 of yacc.c  */
    4876             : #line 2325 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4877             :     {
    4878             :                 idlc()->setParseState(PS_SNListCommaSeen);
    4879             :         }
    4880             :     break;
    4881             : 
    4882             :   case 239:
    4883             : 
    4884             : /* Line 1806 of yacc.c  */
    4885             : #line 2329 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4886             :     {
    4887             :                 idlc()->setParseState(PS_ScopedNameSeen);
    4888             :                 if ((yyvsp[(1) - (4)].slval))
    4889             :                 {
    4890             :                         (yyvsp[(1) - (4)].slval)->push_back(*(yyvsp[(4) - (4)].sval));
    4891             :                         (yyval.slval) = (yyvsp[(1) - (4)].slval);
    4892             :                 } else
    4893             :                 {
    4894             :                         StringList* pNames = new StringList();
    4895             :                         pNames->push_back(*(yyvsp[(4) - (4)].sval));
    4896             :                         (yyval.slval) = pNames;
    4897             :                 }
    4898             :                 delete((yyvsp[(4) - (4)].sval));
    4899             :         }
    4900             :     break;
    4901             : 
    4902             :   case 240:
    4903             : 
    4904             : /* Line 1806 of yacc.c  */
    4905             : #line 2344 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4906             :     {
    4907             :                 (yyval.slval) = NULL;
    4908             :         }
    4909             :     break;
    4910             : 
    4911             :   case 241:
    4912             : 
    4913             : /* Line 1806 of yacc.c  */
    4914             : #line 2351 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4915             :     {
    4916             :         idlc()->setParseState(PS_SN_IDSeen);
    4917             :         checkIdentifier((yyvsp[(1) - (1)].sval));
    4918             :         (yyval.sval) = (yyvsp[(1) - (1)].sval);
    4919             :         }
    4920             :     break;
    4921             : 
    4922             :   case 242:
    4923             : 
    4924             : /* Line 1806 of yacc.c  */
    4925             : #line 2357 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4926             :     {
    4927             :                 idlc()->setParseState(PS_ScopeDelimSeen);
    4928             :         }
    4929             :     break;
    4930             : 
    4931             :   case 243:
    4932             : 
    4933             : /* Line 1806 of yacc.c  */
    4934             : #line 2361 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4935             :     {
    4936             :         checkIdentifier((yyvsp[(3) - (3)].sval));
    4937             :         OString* pName = new OString("::");
    4938             :         *pName += *(yyvsp[(3) - (3)].sval);
    4939             :         delete (yyvsp[(3) - (3)].sval);
    4940             :         (yyval.sval) = pName;
    4941             :         }
    4942             :     break;
    4943             : 
    4944             :   case 244:
    4945             : 
    4946             : /* Line 1806 of yacc.c  */
    4947             : #line 2370 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4948             :     {
    4949             :         }
    4950             :     break;
    4951             : 
    4952             :   case 245:
    4953             : 
    4954             : /* Line 1806 of yacc.c  */
    4955             : #line 2373 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4956             :     {
    4957             :         checkIdentifier((yyvsp[(4) - (4)].sval));
    4958             :         *(yyvsp[(1) - (4)].sval) += ::rtl::OString("::");
    4959             :         *(yyvsp[(1) - (4)].sval) += *(yyvsp[(4) - (4)].sval);
    4960             :         delete (yyvsp[(4) - (4)].sval);
    4961             :         (yyval.sval) = (yyvsp[(1) - (4)].sval);
    4962             :         }
    4963             :     break;
    4964             : 
    4965             :   case 249:
    4966             : 
    4967             : /* Line 1806 of yacc.c  */
    4968             : #line 2390 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4969             :     {
    4970             :         (yyval.cdclval) = createNamedType((yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].dclsval));
    4971             :         }
    4972             :     break;
    4973             : 
    4974             :   case 250:
    4975             : 
    4976             : /* Line 1806 of yacc.c  */
    4977             : #line 2397 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4978             :     {
    4979             :                 (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType((yyvsp[(1) - (1)].etval));
    4980             :         }
    4981             :     break;
    4982             : 
    4983             :   case 252:
    4984             : 
    4985             : /* Line 1806 of yacc.c  */
    4986             : #line 2404 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4987             :     { (yyval.dclsval) = (yyvsp[(2) - (3)].dclsval); }
    4988             :     break;
    4989             : 
    4990             :   case 253:
    4991             : 
    4992             : /* Line 1806 of yacc.c  */
    4993             : #line 2405 "/usr/local/src/libreoffice/idlc/source/parser.y"
    4994             :     { (yyval.dclsval) = 0; }
    4995             :     break;
    4996             : 
    4997             :   case 254:
    4998             : 
    4999             : /* Line 1806 of yacc.c  */
    5000             : #line 2410 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5001             :     {
    5002             :         (yyval.dclsval) = new DeclList;
    5003             :         (yyval.dclsval)->push_back(const_cast< AstDeclaration * >((yyvsp[(1) - (1)].cdclval))); //TODO: const_cast
    5004             :     }
    5005             :     break;
    5006             : 
    5007             :   case 255:
    5008             : 
    5009             : /* Line 1806 of yacc.c  */
    5010             : #line 2415 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5011             :     {
    5012             :         (yyvsp[(1) - (3)].dclsval)->push_back(const_cast< AstDeclaration * >((yyvsp[(3) - (3)].cdclval))); //TODO: const_cast
    5013             :         (yyval.dclsval) = (yyvsp[(1) - (3)].dclsval);
    5014             :     }
    5015             :     break;
    5016             : 
    5017             :   case 256:
    5018             : 
    5019             : /* Line 1806 of yacc.c  */
    5020             : #line 2423 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5021             :     {
    5022             :         if ((yyvsp[(1) - (1)].cdclval) != 0 && static_cast< AstType const * >((yyvsp[(1) - (1)].cdclval))->isUnsigned()) {
    5023             :             idlc()->error()->error0(EIDL_UNSIGNED_TYPE_ARGUMENT);
    5024             :         }
    5025             :         (yyval.cdclval) = (yyvsp[(1) - (1)].cdclval);
    5026             :     }
    5027             :     break;
    5028             : 
    5029             :   case 267:
    5030             : 
    5031             : /* Line 1806 of yacc.c  */
    5032             : #line 2449 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5033             :     {
    5034             :                 (yyval.etval) = ET_long;
    5035             :         }
    5036             :     break;
    5037             : 
    5038             :   case 268:
    5039             : 
    5040             : /* Line 1806 of yacc.c  */
    5041             : #line 2453 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5042             :     {
    5043             :                 (yyval.etval) = ET_hyper;
    5044             :         }
    5045             :     break;
    5046             : 
    5047             :   case 269:
    5048             : 
    5049             : /* Line 1806 of yacc.c  */
    5050             : #line 2457 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5051             :     {
    5052             :                 (yyval.etval) = ET_short;
    5053             :         }
    5054             :     break;
    5055             : 
    5056             :   case 270:
    5057             : 
    5058             : /* Line 1806 of yacc.c  */
    5059             : #line 2464 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5060             :     {
    5061             :                 (yyval.etval) = ET_ulong;
    5062             :         }
    5063             :     break;
    5064             : 
    5065             :   case 271:
    5066             : 
    5067             : /* Line 1806 of yacc.c  */
    5068             : #line 2468 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5069             :     {
    5070             :                 (yyval.etval) = ET_uhyper;
    5071             :         }
    5072             :     break;
    5073             : 
    5074             :   case 272:
    5075             : 
    5076             : /* Line 1806 of yacc.c  */
    5077             : #line 2472 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5078             :     {
    5079             :                 (yyval.etval) = ET_ushort;
    5080             :         }
    5081             :     break;
    5082             : 
    5083             :   case 273:
    5084             : 
    5085             : /* Line 1806 of yacc.c  */
    5086             : #line 2479 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5087             :     {
    5088             :                 (yyval.etval) = ET_double;
    5089             :         }
    5090             :     break;
    5091             : 
    5092             :   case 274:
    5093             : 
    5094             : /* Line 1806 of yacc.c  */
    5095             : #line 2483 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5096             :     {
    5097             :                 (yyval.etval) = ET_float;
    5098             :         }
    5099             :     break;
    5100             : 
    5101             :   case 275:
    5102             : 
    5103             : /* Line 1806 of yacc.c  */
    5104             : #line 2490 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5105             :     {
    5106             :                 (yyval.etval) = ET_char;
    5107             :         }
    5108             :     break;
    5109             : 
    5110             :   case 276:
    5111             : 
    5112             : /* Line 1806 of yacc.c  */
    5113             : #line 2497 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5114             :     {
    5115             :                 (yyval.etval) = ET_byte;
    5116             :         }
    5117             :     break;
    5118             : 
    5119             :   case 277:
    5120             : 
    5121             : /* Line 1806 of yacc.c  */
    5122             : #line 2504 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5123             :     {
    5124             :                 (yyval.etval) = ET_boolean;
    5125             :         }
    5126             :     break;
    5127             : 
    5128             :   case 278:
    5129             : 
    5130             : /* Line 1806 of yacc.c  */
    5131             : #line 2511 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5132             :     {
    5133             :                 (yyval.etval) = ET_any;
    5134             :         }
    5135             :     break;
    5136             : 
    5137             :   case 279:
    5138             : 
    5139             : /* Line 1806 of yacc.c  */
    5140             : #line 2518 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5141             :     {
    5142             :                 (yyval.etval) = ET_type;
    5143             :         }
    5144             :     break;
    5145             : 
    5146             :   case 280:
    5147             : 
    5148             : /* Line 1806 of yacc.c  */
    5149             : #line 2525 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5150             :     {
    5151             :                 (yyval.etval) = ET_string;
    5152             :         }
    5153             :     break;
    5154             : 
    5155             :   case 286:
    5156             : 
    5157             : /* Line 1806 of yacc.c  */
    5158             : #line 2543 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5159             :     {
    5160             :                 idlc()->setParseState(PS_ArrayTypeSeen);
    5161             :         }
    5162             :     break;
    5163             : 
    5164             :   case 287:
    5165             : 
    5166             : /* Line 1806 of yacc.c  */
    5167             : #line 2547 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5168             :     {
    5169             :                 idlc()->setParseState(PS_ArrayCompleted);
    5170             : 
    5171             :                 AstScope* pScope = idlc()->scopes()->bottom();
    5172             :                 AstDeclaration* pDecl = NULL;
    5173             :                 AstDeclaration* pArray = NULL;
    5174             : 
    5175             :                 if ( (yyvsp[(1) - (3)].cdclval) )
    5176             :                 {
    5177             :                         pArray = new AstArray((AstType*)(yyvsp[(1) - (3)].cdclval), *(yyvsp[(3) - (3)].exlval), idlc()->scopes()->bottom());
    5178             :                         if ( pScope )
    5179             :                         {
    5180             :                                 pDecl = pScope->addDeclaration(pArray);                              
    5181             :                                 if ( pArray != pDecl )
    5182             :                                 {
    5183             :                                         // if array type already defined then use it
    5184             :                                         delete pArray;
    5185             :                                         pArray = pDecl;                                 
    5186             :                                 }
    5187             :                         }
    5188             :                 }
    5189             :                 (yyval.cdclval) = pArray; 
    5190             :         }
    5191             :     break;
    5192             : 
    5193             :   case 288:
    5194             : 
    5195             : /* Line 1806 of yacc.c  */
    5196             : #line 2574 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5197             :     {
    5198             :                 idlc()->setParseState(PS_SequenceSeen);
    5199             :                 /*
    5200             :                  * Push a sequence marker on scopes stack
    5201             :                  */
    5202             :                 idlc()->scopes()->push(NULL);
    5203             :         }
    5204             :     break;
    5205             : 
    5206             :   case 289:
    5207             : 
    5208             : /* Line 1806 of yacc.c  */
    5209             : #line 2582 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5210             :     {
    5211             :                 idlc()->setParseState(PS_SequenceSqSeen);
    5212             :         }
    5213             :     break;
    5214             : 
    5215             :   case 290:
    5216             : 
    5217             : /* Line 1806 of yacc.c  */
    5218             : #line 2586 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5219             :     {
    5220             :                 idlc()->setParseState(PS_SequenceTypeSeen);
    5221             :         }
    5222             :     break;
    5223             : 
    5224             :   case 291:
    5225             : 
    5226             : /* Line 1806 of yacc.c  */
    5227             : #line 2590 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5228             :     {
    5229             :                 idlc()->setParseState(PS_SequenceQsSeen);
    5230             :                 /*
    5231             :                  * Remove sequence marker from scopes stack
    5232             :                  */
    5233             :                 if (idlc()->scopes()->top() == NULL)
    5234             :                         idlc()->scopes()->pop();
    5235             :                 /*
    5236             :                  * Create a node representing a sequence
    5237             :                  */
    5238             :                 AstScope* pScope = idlc()->scopes()->bottom();
    5239             :                 AstDeclaration* pDecl = NULL;
    5240             :                 AstDeclaration* pSeq = NULL;
    5241             :                 
    5242             :                 if ( (yyvsp[(5) - (7)].cdclval) )
    5243             :                 {
    5244             :                         AstType *pType = (AstType*)(yyvsp[(5) - (7)].cdclval);
    5245             :                         if ( pType )
    5246             :                         {
    5247             :                                 pSeq = new AstSequence(pType, pScope);
    5248             :                                 /*
    5249             :                                  * Add this AstSequence to the types defined in the global scope
    5250             :                                  */
    5251             :                                 pDecl = pScope->addDeclaration(pSeq);
    5252             :                                 if ( pSeq != pDecl )
    5253             :                                 {
    5254             :                                         // if sequence type already defined then use it
    5255             :                                         delete pSeq;
    5256             :                                         pSeq = pDecl;
    5257             :                                 }
    5258             :                         }
    5259             :         }
    5260             :                 (yyval.cdclval) = pSeq;
    5261             :         }
    5262             :     break;
    5263             : 
    5264             :   case 292:
    5265             : 
    5266             : /* Line 1806 of yacc.c  */
    5267             : #line 2625 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5268             :     {
    5269             :                 yyerror("sequence declaration");
    5270             :                 yyerrok;
    5271             :         (yyval.cdclval) = 0;
    5272             :         }
    5273             :     break;
    5274             : 
    5275             :   case 293:
    5276             : 
    5277             : /* Line 1806 of yacc.c  */
    5278             : #line 2634 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5279             :     {
    5280             :                 idlc()->setParseState(PS_StructHeaderSeen);
    5281             : 
    5282             :                 AstScope*       pScope = idlc()->scopes()->topNonNull();
    5283             :                 AstStruct*      pStruct = NULL;
    5284             : 
    5285             :                 if ( pScope )
    5286             :                 {
    5287             :                         AstStruct* pBase= static_cast< AstStruct* >((yyvsp[(1) - (1)].ihval)->getInherits());
    5288             :             pStruct = new AstStruct(
    5289             :                 *(yyvsp[(1) - (1)].ihval)->getName(), (yyvsp[(1) - (1)].ihval)->getTypeParameters(), pBase, pScope);
    5290             :                         pScope->addDeclaration(pStruct);
    5291             :                 }
    5292             :                 /*
    5293             :                  * Push the scope of the struct on the scopes stack
    5294             :                  */
    5295             :                 idlc()->scopes()->push(pStruct);
    5296             :                 delete (yyvsp[(1) - (1)].ihval);
    5297             :         }
    5298             :     break;
    5299             : 
    5300             :   case 294:
    5301             : 
    5302             : /* Line 1806 of yacc.c  */
    5303             : #line 2654 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5304             :     {
    5305             :                 idlc()->setParseState(PS_StructSqSeen);
    5306             :         }
    5307             :     break;
    5308             : 
    5309             :   case 295:
    5310             : 
    5311             : /* Line 1806 of yacc.c  */
    5312             : #line 2658 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5313             :     {
    5314             :                 idlc()->setParseState(PS_StructBodySeen);
    5315             :         }
    5316             :     break;
    5317             : 
    5318             :   case 296:
    5319             : 
    5320             : /* Line 1806 of yacc.c  */
    5321             : #line 2662 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5322             :     {
    5323             :                 idlc()->setParseState(PS_StructQsSeen);
    5324             :                 /* this exception is finished, pop its scope from the stack */ 
    5325             :                 idlc()->scopes()->pop();
    5326             :         }
    5327             :     break;
    5328             : 
    5329             :   case 297:
    5330             : 
    5331             : /* Line 1806 of yacc.c  */
    5332             : #line 2671 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5333             :     {
    5334             :         idlc()->setParseState(PS_StructSeen);
    5335             :         }
    5336             :     break;
    5337             : 
    5338             :   case 298:
    5339             : 
    5340             : /* Line 1806 of yacc.c  */
    5341             : #line 2675 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5342             :     {
    5343             :         idlc()->setParseState(PS_StructIDSeen);
    5344             :         checkIdentifier((yyvsp[(3) - (3)].sval));
    5345             :         }
    5346             :     break;
    5347             : 
    5348             :   case 299:
    5349             : 
    5350             : /* Line 1806 of yacc.c  */
    5351             : #line 2681 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5352             :     {
    5353             :         idlc()->setParseState(PS_InheritSpecSeen);
    5354             : 
    5355             :         // Polymorphic struct type templates with base types would cause various
    5356             :         // problems in language bindings, so forbid them here.  For example,
    5357             :         // GCC prior to version 3.4 fails with code like
    5358             :         //
    5359             :         //  struct Base { ... };
    5360             :         //  template< typename typeparam_T > struct Derived: public Base {
    5361             :         //      int member1 CPPU_GCC3_ALIGN(Base);
    5362             :         //      ... };
    5363             :         //
    5364             :         // (Note that plain struct types with instantiated polymorphic struct
    5365             :         // type bases, which might also cause problems in language bindings, are
    5366             :         // already rejected on a syntactic level.)
    5367             :         if ((yyvsp[(5) - (6)].svals) != 0 && (yyvsp[(6) - (6)].sval) != 0) {
    5368             :             idlc()->error()->error0(EIDL_STRUCT_TYPE_TEMPLATE_WITH_BASE);
    5369             :         }
    5370             : 
    5371             :         (yyval.ihval) = new FeInheritanceHeader(NT_struct, (yyvsp[(3) - (6)].sval), (yyvsp[(6) - (6)].sval), (yyvsp[(5) - (6)].svals));
    5372             :         delete (yyvsp[(5) - (6)].svals);
    5373             :         delete (yyvsp[(6) - (6)].sval);
    5374             :         }
    5375             :     break;
    5376             : 
    5377             :   case 300:
    5378             : 
    5379             : /* Line 1806 of yacc.c  */
    5380             : #line 2707 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5381             :     { (yyval.svals) = (yyvsp[(2) - (3)].svals); }
    5382             :     break;
    5383             : 
    5384             :   case 301:
    5385             : 
    5386             : /* Line 1806 of yacc.c  */
    5387             : #line 2708 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5388             :     { (yyval.svals) = 0; }
    5389             :     break;
    5390             : 
    5391             :   case 302:
    5392             : 
    5393             : /* Line 1806 of yacc.c  */
    5394             : #line 2713 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5395             :     {
    5396             :         (yyval.svals) = new std::vector< rtl::OString >;
    5397             :         (yyval.svals)->push_back(*(yyvsp[(1) - (1)].sval));
    5398             :         delete (yyvsp[(1) - (1)].sval);
    5399             :     }
    5400             :     break;
    5401             : 
    5402             :   case 303:
    5403             : 
    5404             : /* Line 1806 of yacc.c  */
    5405             : #line 2719 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5406             :     {
    5407             :         if (std::find((yyvsp[(1) - (3)].svals)->begin(), (yyvsp[(1) - (3)].svals)->end(), *(yyvsp[(3) - (3)].sval)) != (yyvsp[(1) - (3)].svals)->end()) {
    5408             :             idlc()->error()->error0(EIDL_IDENTICAL_TYPE_PARAMETERS);
    5409             :         }
    5410             :         (yyvsp[(1) - (3)].svals)->push_back(*(yyvsp[(3) - (3)].sval));
    5411             :         delete (yyvsp[(3) - (3)].sval);
    5412             :         (yyval.svals) = (yyvsp[(1) - (3)].svals);
    5413             :     }
    5414             :     break;
    5415             : 
    5416             :   case 307:
    5417             : 
    5418             : /* Line 1806 of yacc.c  */
    5419             : #line 2738 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5420             :     {
    5421             :                 idlc()->setParseState(PS_MemberTypeSeen);
    5422             :         }
    5423             :     break;
    5424             : 
    5425             :   case 308:
    5426             : 
    5427             : /* Line 1806 of yacc.c  */
    5428             : #line 2742 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5429             :     {
    5430             :                 idlc()->setParseState(PS_MemberDeclsSeen);
    5431             :         }
    5432             :     break;
    5433             : 
    5434             :   case 309:
    5435             : 
    5436             : /* Line 1806 of yacc.c  */
    5437             : #line 2746 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5438             :     {
    5439             :                 idlc()->setParseState(PS_MemberDeclsCompleted);
    5440             : 
    5441             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    5442             :                 AstMember*              pMember = NULL;
    5443             :                 FeDeclList*             pList = (yyvsp[(3) - (5)].dlval);
    5444             :                 FeDeclarator*   pDecl = NULL;
    5445             :         AstType const * pType = NULL;
    5446             : 
    5447             :                 // !!! check recursive type
    5448             : 
    5449             :                 if ( pScope && pList && (yyvsp[(1) - (5)].cdclval) )
    5450             :                 {
    5451             :                         FeDeclList::iterator iter = pList->begin();
    5452             :                         FeDeclList::iterator end = pList->end();
    5453             :                         while (iter != end)
    5454             :                         {
    5455             :                                 pDecl = (*iter);
    5456             :                                 if ( !pDecl )
    5457             :                                 {
    5458             :                                         iter++;
    5459             :                                         continue;
    5460             :                                 }
    5461             : 
    5462             :                                 pType = pDecl->compose((yyvsp[(1) - (5)].cdclval));                          
    5463             : 
    5464             :                                 if ( !pType )
    5465             :                                 {
    5466             :                                         iter++;
    5467             :                                         continue;
    5468             :                                 }
    5469             : 
    5470             :                                 pMember = new AstMember(pType, pDecl->getName(), pScope);
    5471             : 
    5472             :                                 if ( !pDecl->checkType((yyvsp[(1) - (5)].cdclval)) )
    5473             :                                 {
    5474             :                                         // WARNING      
    5475             :                                 }
    5476             : 
    5477             :                                 pScope->addDeclaration(pMember);
    5478             :                                 iter++;
    5479             :                                 delete pDecl;
    5480             :                         }
    5481             :                         delete pList;
    5482             :                 }
    5483             :         }
    5484             :     break;
    5485             : 
    5486             :   case 310:
    5487             : 
    5488             : /* Line 1806 of yacc.c  */
    5489             : #line 2793 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5490             :     {
    5491             :                 yyerror("member definition");
    5492             :                 yyerrok;
    5493             :         }
    5494             :     break;
    5495             : 
    5496             :   case 312:
    5497             : 
    5498             : /* Line 1806 of yacc.c  */
    5499             : #line 2802 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5500             :     {
    5501             :         AstDeclaration const * decl = 0;
    5502             :         AstStruct * scope = static_cast< AstStruct * >(idlc()->scopes()->top());
    5503             :         if (scope != 0 && (yyvsp[(2) - (2)].dclsval) == 0) {
    5504             :             decl = scope->findTypeParameter(*(yyvsp[(1) - (2)].sval));
    5505             :         }
    5506             :         if (decl != 0) {
    5507             :             delete (yyvsp[(1) - (2)].sval);
    5508             :             delete (yyvsp[(2) - (2)].dclsval);
    5509             :         } else {
    5510             :             decl = createNamedType((yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].dclsval));
    5511             :             if (scope != 0 && includes(decl, scopeAsDecl(scope))) {
    5512             :                 idlc()->error()->error1(
    5513             :                     EIDL_RECURSIVE_TYPE, scopeAsDecl(scope));
    5514             :                 decl = 0;
    5515             :             }
    5516             :         }
    5517             :         (yyval.cdclval) = decl;
    5518             :         }
    5519             :     break;
    5520             : 
    5521             :   case 313:
    5522             : 
    5523             : /* Line 1806 of yacc.c  */
    5524             : #line 2825 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5525             :     {
    5526             :                 idlc()->setParseState(PS_EnumSeen);
    5527             :         }
    5528             :     break;
    5529             : 
    5530             :   case 314:
    5531             : 
    5532             : /* Line 1806 of yacc.c  */
    5533             : #line 2829 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5534             :     {
    5535             :         idlc()->setParseState(PS_EnumIDSeen);
    5536             :         checkIdentifier((yyvsp[(3) - (3)].sval));
    5537             : 
    5538             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    5539             :                 AstEnum*                pEnum = NULL;
    5540             : 
    5541             :                 /*
    5542             :                  * Create a node representing an enum and add it to its
    5543             :                  * enclosing scope
    5544             :                  */
    5545             :                 if (pScope != NULL) 
    5546             :                 {
    5547             :                         pEnum = new AstEnum(*(yyvsp[(3) - (3)].sval), pScope);
    5548             :                         /*
    5549             :                          * Add it to its defining scope
    5550             :                          */
    5551             :                         pScope->addDeclaration(pEnum);
    5552             :                 }
    5553             :                 delete (yyvsp[(3) - (3)].sval);
    5554             :                 /*
    5555             :                  * Push the enum scope on the scopes stack
    5556             :                  */
    5557             :                 idlc()->scopes()->push(pEnum);
    5558             :                 
    5559             :         }
    5560             :     break;
    5561             : 
    5562             :   case 315:
    5563             : 
    5564             : /* Line 1806 of yacc.c  */
    5565             : #line 2856 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5566             :     {
    5567             :                 idlc()->setParseState(PS_EnumSqSeen);
    5568             :         }
    5569             :     break;
    5570             : 
    5571             :   case 316:
    5572             : 
    5573             : /* Line 1806 of yacc.c  */
    5574             : #line 2860 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5575             :     {
    5576             :                 idlc()->setParseState(PS_EnumBodySeen);
    5577             :         }
    5578             :     break;
    5579             : 
    5580             :   case 317:
    5581             : 
    5582             : /* Line 1806 of yacc.c  */
    5583             : #line 2864 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5584             :     {
    5585             :                 idlc()->setParseState(PS_EnumQsSeen);
    5586             :                 /*
    5587             :                  * Done with this enum. Pop its scope from the scopes stack
    5588             :                  */
    5589             :                 if (idlc()->scopes()->top() == NULL)
    5590             :                         (yyval.cdclval) = NULL;
    5591             :                 else 
    5592             :                 {
    5593             :                         (yyval.cdclval) = (AstEnum*)idlc()->scopes()->topNonNull();
    5594             :                         idlc()->scopes()->pop();
    5595             :                 }
    5596             :         }
    5597             :     break;
    5598             : 
    5599             :   case 319:
    5600             : 
    5601             : /* Line 1806 of yacc.c  */
    5602             : #line 2884 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5603             :     {
    5604             :                 idlc()->setParseState(PS_EnumCommaSeen);
    5605             :         }
    5606             :     break;
    5607             : 
    5608             :   case 322:
    5609             : 
    5610             : /* Line 1806 of yacc.c  */
    5611             : #line 2890 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5612             :     {
    5613             :                 yyerror("enumerator definition");
    5614             :                 yyerrok;
    5615             :         }
    5616             :     break;
    5617             : 
    5618             :   case 323:
    5619             : 
    5620             : /* Line 1806 of yacc.c  */
    5621             : #line 2898 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5622             :     {
    5623             :         checkIdentifier((yyvsp[(1) - (1)].sval));
    5624             : 
    5625             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    5626             :                 AstEnum*                pEnum = NULL;
    5627             :                 AstConstant*    pEnumVal = NULL;
    5628             : 
    5629             :                 if ( pScope && pScope->getScopeNodeType() == NT_enum) 
    5630             :                 {
    5631             :                         pEnum = (AstEnum*)pScope;
    5632             :                         if (pEnum && (yyvsp[(1) - (1)].sval))
    5633             :                         {
    5634             :                                 AstExpression* pExpr = new AstExpression(pEnum->getEnumValueCount());
    5635             :                                 pEnumVal = new AstConstant(ET_long , NT_enum_val, 
    5636             :                                                                                    pExpr, *(yyvsp[(1) - (1)].sval), pScope);
    5637             :                         }
    5638             :                         if ( pEnum->checkValue(pEnumVal->getConstValue()) )
    5639             :                                 idlc()->error()->error1(EIDL_EVAL_ERROR, pEnum);                          
    5640             : 
    5641             :                         pScope->addDeclaration(pEnumVal);
    5642             :                 }
    5643             :                 delete (yyvsp[(1) - (1)].sval);
    5644             :         }
    5645             :     break;
    5646             : 
    5647             :   case 324:
    5648             : 
    5649             : /* Line 1806 of yacc.c  */
    5650             : #line 2924 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5651             :     {
    5652             :         checkIdentifier((yyvsp[(1) - (3)].sval));
    5653             : 
    5654             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    5655             :                 AstEnum*                pEnum = NULL;
    5656             :                 AstConstant*    pEnumVal = NULL;
    5657             : 
    5658             :                 if ( (yyvsp[(3) - (3)].exval) && pScope && pScope->getScopeNodeType() == NT_enum) 
    5659             :                 {
    5660             :                         (yyvsp[(3) - (3)].exval)->evaluate(EK_const);
    5661             :                         if ( (yyvsp[(3) - (3)].exval)->coerce(ET_long) )
    5662             :                         {
    5663             :                                 pEnum = (AstEnum*)pScope;
    5664             :                                 if (pEnum)
    5665             :                                 {
    5666             :                                         pEnumVal = new AstConstant(ET_long , NT_enum_val, 
    5667             :                                                                                            (yyvsp[(3) - (3)].exval), *(yyvsp[(1) - (3)].sval), pScope);
    5668             :                                 }
    5669             :                                 if ( pEnum->checkValue(pEnumVal->getConstValue()) )
    5670             :                                         idlc()->error()->error1(EIDL_EVAL_ERROR, pEnum);                          
    5671             : 
    5672             :                                 pScope->addDeclaration(pEnumVal);
    5673             :                         } else
    5674             :                         {
    5675             :                                 idlc()->error()->coercionError((yyvsp[(3) - (3)].exval), ET_long);
    5676             :                                 delete (yyvsp[(3) - (3)].exval);
    5677             :                         }
    5678             :                 }
    5679             :                 delete (yyvsp[(1) - (3)].sval);
    5680             :         }
    5681             :     break;
    5682             : 
    5683             :   case 325:
    5684             : 
    5685             : /* Line 1806 of yacc.c  */
    5686             : #line 2958 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5687             :     {
    5688             :                 idlc()->setParseState(PS_UnionSeen);
    5689             :         }
    5690             :     break;
    5691             : 
    5692             :   case 326:
    5693             : 
    5694             : /* Line 1806 of yacc.c  */
    5695             : #line 2962 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5696             :     {
    5697             :         idlc()->setParseState(PS_UnionIDSeen);
    5698             :         checkIdentifier((yyvsp[(3) - (3)].sval));
    5699             :         }
    5700             :     break;
    5701             : 
    5702             :   case 327:
    5703             : 
    5704             : /* Line 1806 of yacc.c  */
    5705             : #line 2967 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5706             :     {
    5707             :                 idlc()->setParseState(PS_SwitchSeen);
    5708             :         }
    5709             :     break;
    5710             : 
    5711             :   case 328:
    5712             : 
    5713             : /* Line 1806 of yacc.c  */
    5714             : #line 2971 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5715             :     {
    5716             :                 idlc()->setParseState(PS_SwitchOpenParSeen);
    5717             :         }
    5718             :     break;
    5719             : 
    5720             :   case 329:
    5721             : 
    5722             : /* Line 1806 of yacc.c  */
    5723             : #line 2975 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5724             :     {
    5725             :                 idlc()->setParseState(PS_SwitchTypeSeen);
    5726             :         }
    5727             :     break;
    5728             : 
    5729             :   case 330:
    5730             : 
    5731             : /* Line 1806 of yacc.c  */
    5732             : #line 2979 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5733             :     {
    5734             :                 idlc()->setParseState(PS_SwitchCloseParSeen);
    5735             : 
    5736             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    5737             :                 AstUnion*               pUnion = NULL;
    5738             : 
    5739             :                 /*
    5740             :                  * Create a node representing a union. Add it to its enclosing
    5741             :                  * scope
    5742             :                  */
    5743             :                 if ( (yyvsp[(9) - (11)].cdclval) && pScope ) 
    5744             :                 {
    5745             :                         AstType* pType = (AstType*)(yyvsp[(9) - (11)].cdclval);
    5746             :                         if ( !pType) 
    5747             :                         {
    5748             :                                 idlc()->error()->noTypeError((yyvsp[(9) - (11)].cdclval));
    5749             :                         } else 
    5750             :                         {
    5751             :                                 pUnion = new AstUnion(*(yyvsp[(3) - (11)].sval), pType, pScope);
    5752             :                                 pScope->addDeclaration(pUnion);
    5753             :                         }
    5754             :                 }
    5755             :                 delete (yyvsp[(3) - (11)].sval);
    5756             :                 /*
    5757             :                  * Push the scope of the union on the scopes stack
    5758             :                  */
    5759             :                 idlc()->scopes()->push(pUnion);
    5760             :         }
    5761             :     break;
    5762             : 
    5763             :   case 331:
    5764             : 
    5765             : /* Line 1806 of yacc.c  */
    5766             : #line 3008 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5767             :     {
    5768             :                 idlc()->setParseState(PS_UnionSqSeen);
    5769             :         }
    5770             :     break;
    5771             : 
    5772             :   case 332:
    5773             : 
    5774             : /* Line 1806 of yacc.c  */
    5775             : #line 3012 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5776             :     {
    5777             :                 idlc()->setParseState(PS_UnionBodySeen);
    5778             :         }
    5779             :     break;
    5780             : 
    5781             :   case 333:
    5782             : 
    5783             : /* Line 1806 of yacc.c  */
    5784             : #line 3016 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5785             :     {
    5786             :                 idlc()->setParseState(PS_UnionQsSeen);
    5787             :                 /* this union is finished, pop its scope from the stack */ 
    5788             :                 idlc()->scopes()->pop();
    5789             :         }
    5790             :     break;
    5791             : 
    5792             :   case 334:
    5793             : 
    5794             : /* Line 1806 of yacc.c  */
    5795             : #line 3025 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5796             :     {   
    5797             :                 (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType((yyvsp[(1) - (1)].etval));
    5798             :         }
    5799             :     break;
    5800             : 
    5801             :   case 335:
    5802             : 
    5803             : /* Line 1806 of yacc.c  */
    5804             : #line 3029 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5805             :     {
    5806             :                 (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType((yyvsp[(1) - (1)].etval));
    5807             :         }
    5808             :     break;
    5809             : 
    5810             :   case 336:
    5811             : 
    5812             : /* Line 1806 of yacc.c  */
    5813             : #line 3033 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5814             :     {
    5815             :                 (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType((yyvsp[(1) - (1)].etval));
    5816             :         }
    5817             :     break;
    5818             : 
    5819             :   case 338:
    5820             : 
    5821             : /* Line 1806 of yacc.c  */
    5822             : #line 3038 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5823             :     {
    5824             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    5825             :                 AstBaseType*    pBaseType = NULL;
    5826             :         AstDeclaration const * pDecl = NULL;
    5827             :                 AstTypeDef*             pTypeDef = NULL;
    5828             :                 sal_Bool                bFound = sal_False;
    5829             :                 /*
    5830             :                  * If the constant's type is a scoped name, it must resolve
    5831             :                  * to a scalar constant type
    5832             :                  */
    5833             :                 if ( pScope && (pDecl = pScope->lookupByName(*(yyvsp[(1) - (1)].sval))) ) 
    5834             :                 {
    5835             :                         /*
    5836             :                          * Look through typedefs
    5837             :                          */
    5838             :                         while ( !bFound ) 
    5839             :                         {
    5840             :                                 switch (pDecl->getNodeType()) 
    5841             :                                 {
    5842             :                                         case NT_enum:
    5843             :                                                 (yyval.cdclval) = pDecl;
    5844             :                                                 bFound = sal_True;
    5845             :                                                 break;
    5846             :                                         case NT_predefined:
    5847             :                                                 pBaseType = (AstBaseType*)pDecl;
    5848             :                                                 if ( pBaseType ) 
    5849             :                                                 {
    5850             :                                                         switch (pBaseType->getExprType()) 
    5851             :                                                         {
    5852             :                                                                 case ET_short:
    5853             :                                                                 case ET_ushort:
    5854             :                                                                 case ET_long:
    5855             :                                                                 case ET_ulong:
    5856             :                                                                 case ET_hyper:
    5857             :                                                                 case ET_uhyper:
    5858             :                                                                 case ET_char:
    5859             :                                                                 case ET_byte:
    5860             :                                                                 case ET_boolean:
    5861             :                                                                         (yyval.cdclval) = pBaseType;
    5862             :                                                                         bFound = sal_True;
    5863             :                                                                         break;
    5864             :                                                                 default:
    5865             :                                                                         (yyval.cdclval) = NULL;
    5866             :                                                                         bFound = sal_True;
    5867             :                                                                         break;
    5868             :                                                         }
    5869             :                                                 }
    5870             :                                                 break;
    5871             :                                         case NT_typedef:
    5872             :                                                 pTypeDef = (AstTypeDef*)pDecl;
    5873             :                                                 if ( pTypeDef )
    5874             :                                                         pDecl = pTypeDef->getBaseType();
    5875             :                                                 break;
    5876             :                                         default:
    5877             :                                                 (yyval.cdclval) = NULL;
    5878             :                                                 bFound = sal_True;
    5879             :                                break;           
    5880             :                                 }
    5881             :                         }
    5882             :                 } else
    5883             :                         (yyval.cdclval) = NULL;
    5884             : 
    5885             :                 if ((yyval.cdclval) == NULL)
    5886             :                         idlc()->error()->lookupError(*(yyvsp[(1) - (1)].sval));
    5887             :         }
    5888             :     break;
    5889             : 
    5890             :   case 342:
    5891             : 
    5892             : /* Line 1806 of yacc.c  */
    5893             : #line 3114 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5894             :     {
    5895             :                 idlc()->setParseState(PS_UnionLabelSeen);
    5896             :         }
    5897             :     break;
    5898             : 
    5899             :   case 343:
    5900             : 
    5901             : /* Line 1806 of yacc.c  */
    5902             : #line 3118 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5903             :     {
    5904             :                 idlc()->setParseState(PS_UnionElemSeen);
    5905             : 
    5906             :                 AstScope*               pScope = idlc()->scopes()->topNonNull();
    5907             :                 AstUnionLabel*  pLabel = NULL;
    5908             :                 AstUnionBranch* pBranch = NULL;
    5909             :                 AstMember*              pMember = (yyvsp[(3) - (3)].mval);
    5910             : 
    5911             :                 /*
    5912             :                  * Create several nodes representing branches of a union.
    5913             :                  * Add them to the enclosing scope (the union scope)
    5914             :                  */
    5915             :                 if ( pScope && (yyvsp[(1) - (3)].llval) && (yyvsp[(3) - (3)].mval) ) 
    5916             :                 {
    5917             :                         LabelList::iterator iter = (yyvsp[(1) - (3)].llval)->begin();
    5918             :                         LabelList::iterator end = (yyvsp[(1) - (3)].llval)->end();
    5919             :                         for (;iter != end; iter++) 
    5920             :                         {
    5921             :                                 pLabel = *iter;
    5922             :                                 if ( !pLabel )
    5923             :                                 {
    5924             :                                         iter++;
    5925             :                                         continue;
    5926             :                                 }
    5927             :                                 pBranch = new AstUnionBranch(pLabel, pMember->getType(),
    5928             :                                                  pMember->getLocalName(), pScope);
    5929             :                                 pScope->addDeclaration(pBranch);
    5930             :                         }
    5931             :                 }
    5932             :                 if ( (yyvsp[(1) - (3)].llval) ) delete((yyvsp[(1) - (3)].llval));
    5933             :         }
    5934             :     break;
    5935             : 
    5936             :   case 344:
    5937             : 
    5938             : /* Line 1806 of yacc.c  */
    5939             : #line 3153 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5940             :     {
    5941             :                 if ( (yyvsp[(2) - (2)].llval) )
    5942             :                 {
    5943             :                         (yyvsp[(2) - (2)].llval)->push_front((yyvsp[(1) - (2)].lbval));
    5944             :                         (yyval.llval) = (yyvsp[(2) - (2)].llval);
    5945             :                 } else
    5946             :                 {
    5947             :                         LabelList* pLabels = new LabelList();
    5948             :                         pLabels->push_back((yyvsp[(1) - (2)].lbval));
    5949             :                         (yyval.llval) = pLabels;
    5950             :                 }
    5951             :         }
    5952             :     break;
    5953             : 
    5954             :   case 345:
    5955             : 
    5956             : /* Line 1806 of yacc.c  */
    5957             : #line 3169 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5958             :     {
    5959             :                 if ( (yyvsp[(1) - (2)].llval) )
    5960             :                 {
    5961             :                         (yyvsp[(1) - (2)].llval)->push_back((yyvsp[(2) - (2)].lbval));
    5962             :                         (yyval.llval) = (yyvsp[(1) - (2)].llval);
    5963             :                 } else
    5964             :                 {
    5965             :                         LabelList* pLabels = new LabelList();
    5966             :                         pLabels->push_back((yyvsp[(2) - (2)].lbval));
    5967             :                         (yyval.llval) = pLabels;
    5968             :                 }
    5969             :         }
    5970             :     break;
    5971             : 
    5972             :   case 346:
    5973             : 
    5974             : /* Line 1806 of yacc.c  */
    5975             : #line 3182 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5976             :     {
    5977             :                 (yyval.llval) = NULL;
    5978             :         }
    5979             :     break;
    5980             : 
    5981             :   case 347:
    5982             : 
    5983             : /* Line 1806 of yacc.c  */
    5984             : #line 3189 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5985             :     {
    5986             :                 idlc()->setParseState(PS_DefaultSeen);
    5987             :         }
    5988             :     break;
    5989             : 
    5990             :   case 348:
    5991             : 
    5992             : /* Line 1806 of yacc.c  */
    5993             : #line 3193 "/usr/local/src/libreoffice/idlc/source/parser.y"
    5994             :     {
    5995             :                 idlc()->setParseState(PS_LabelColonSeen);
    5996             :                 (yyval.lbval) = new AstUnionLabel(UL_default, NULL);
    5997             :         }
    5998             :     break;
    5999             : 
    6000             :   case 349:
    6001             : 
    6002             : /* Line 1806 of yacc.c  */
    6003             : #line 3198 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6004             :     {
    6005             :                 idlc()->setParseState(PS_CaseSeen);
    6006             :         }
    6007             :     break;
    6008             : 
    6009             :   case 350:
    6010             : 
    6011             : /* Line 1806 of yacc.c  */
    6012             : #line 3202 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6013             :     {
    6014             :                 idlc()->setParseState(PS_LabelExprSeen);
    6015             :         }
    6016             :     break;
    6017             : 
    6018             :   case 351:
    6019             : 
    6020             : /* Line 1806 of yacc.c  */
    6021             : #line 3206 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6022             :     {
    6023             :                 idlc()->setParseState(PS_LabelColonSeen);
    6024             :                 (yyval.lbval) = new AstUnionLabel(UL_label, (yyvsp[(3) - (5)].exval));
    6025             :         }
    6026             :     break;
    6027             : 
    6028             :   case 352:
    6029             : 
    6030             : /* Line 1806 of yacc.c  */
    6031             : #line 3214 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6032             :     {
    6033             :                 idlc()->setParseState(PS_UnionElemTypeSeen);
    6034             :         }
    6035             :     break;
    6036             : 
    6037             :   case 353:
    6038             : 
    6039             : /* Line 1806 of yacc.c  */
    6040             : #line 3218 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6041             :     {
    6042             :                 idlc()->setParseState(PS_UnionElemDeclSeen);
    6043             :         }
    6044             :     break;
    6045             : 
    6046             :   case 354:
    6047             : 
    6048             : /* Line 1806 of yacc.c  */
    6049             : #line 3222 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6050             :     {
    6051             :                 idlc()->setParseState(PS_UnionElemCompleted);
    6052             : 
    6053             :                 AstScope* pScope = idlc()->scopes()->topNonNull();
    6054             :                 /*
    6055             :                  * Check for illegal recursive use of type
    6056             :                  */
    6057             : //              if ( $1 && AST_illegal_recursive_type($1))
    6058             : //                      idlc()->error()->error1(EIDL_RECURSIVE_TYPE, $1);
    6059             :                 /*
    6060             :                  * Create a field in a union branch
    6061             :                  */
    6062             :                 if ( (yyvsp[(1) - (5)].cdclval) && (yyvsp[(3) - (5)].fdval) )
    6063             :                 {
    6064             :             AstType const * pType = (yyvsp[(3) - (5)].fdval)->compose((yyvsp[(1) - (5)].cdclval));
    6065             :                         if ( !pType )
    6066             :                                 (yyval.mval) = NULL;
    6067             :                         else
    6068             :                                 (yyval.mval) = new AstMember(pType, (yyvsp[(3) - (5)].fdval)->getName(), pScope);
    6069             :                 } else
    6070             :                         (yyval.mval) = NULL;
    6071             :                 
    6072             :                 if ( (yyvsp[(3) - (5)].fdval) ) delete (yyvsp[(3) - (5)].fdval);
    6073             :         }
    6074             :     break;
    6075             : 
    6076             :   case 355:
    6077             : 
    6078             : /* Line 1806 of yacc.c  */
    6079             : #line 3248 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6080             :     {
    6081             :                 (yyval.mval) = NULL;
    6082             :         }
    6083             :     break;
    6084             : 
    6085             :   case 357:
    6086             : 
    6087             : /* Line 1806 of yacc.c  */
    6088             : #line 3255 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6089             :     { (yyval.sval) = new OString("get"); }
    6090             :     break;
    6091             : 
    6092             :   case 358:
    6093             : 
    6094             : /* Line 1806 of yacc.c  */
    6095             : #line 3256 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6096             :     { (yyval.sval) = new OString("set"); }
    6097             :     break;
    6098             : 
    6099             :   case 359:
    6100             : 
    6101             : /* Line 1806 of yacc.c  */
    6102             : #line 3257 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6103             :     { (yyval.sval) = new OString("published"); }
    6104             :     break;
    6105             : 
    6106             : 
    6107             : 
    6108             : /* Line 1806 of yacc.c  */
    6109             : #line 6110 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/idlc/source/parser.cxx"
    6110           0 :       default: break;
    6111             :     }
    6112             :   /* User semantic actions sometimes alter yychar, and that requires
    6113             :      that yytoken be updated with the new translation.  We take the
    6114             :      approach of translating immediately before every use of yytoken.
    6115             :      One alternative is translating here after every semantic action,
    6116             :      but that translation would be missed if the semantic action invokes
    6117             :      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
    6118             :      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
    6119             :      incorrect destructor might then be invoked immediately.  In the
    6120             :      case of YYERROR or YYBACKUP, subsequent parser actions might lead
    6121             :      to an incorrect destructor call or verbose syntax error message
    6122             :      before the lookahead is translated.  */
    6123           0 :   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
    6124             : 
    6125           0 :   YYPOPSTACK (yylen);
    6126           0 :   yylen = 0;
    6127           0 :   YY_STACK_PRINT (yyss, yyssp);
    6128             : 
    6129           0 :   *++yyvsp = yyval;
    6130             : 
    6131             :   /* Now `shift' the result of the reduction.  Determine what state
    6132             :      that goes to, based on the state we popped back to and the rule
    6133             :      number reduced by.  */
    6134             : 
    6135           0 :   yyn = yyr1[yyn];
    6136             : 
    6137           0 :   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
    6138           0 :   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    6139           0 :     yystate = yytable[yystate];
    6140             :   else
    6141           0 :     yystate = yydefgoto[yyn - YYNTOKENS];
    6142             : 
    6143           0 :   goto yynewstate;
    6144             : 
    6145             : 
    6146             : /*------------------------------------.
    6147             : | yyerrlab -- here on detecting error |
    6148             : `------------------------------------*/
    6149             : yyerrlab:
    6150             :   /* Make sure we have latest lookahead translation.  See comments at
    6151             :      user semantic actions for why this is necessary.  */
    6152           0 :   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
    6153             : 
    6154             :   /* If not already recovering from an error, report this error.  */
    6155           0 :   if (!yyerrstatus)
    6156             :     {
    6157           0 :       ++yynerrs;
    6158             : #if ! YYERROR_VERBOSE
    6159             :       yyerror (YY_("syntax error"));
    6160             : #else
    6161             : # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
    6162             :                                         yyssp, yytoken)
    6163             :       {
    6164           0 :         char const *yymsgp = YY_("syntax error");
    6165             :         int yysyntax_error_status;
    6166           0 :         yysyntax_error_status = YYSYNTAX_ERROR;
    6167           0 :         if (yysyntax_error_status == 0)
    6168           0 :           yymsgp = yymsg;
    6169           0 :         else if (yysyntax_error_status == 1)
    6170             :           {
    6171           0 :             if (yymsg != yymsgbuf)
    6172           0 :               YYSTACK_FREE (yymsg);
    6173           0 :             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
    6174           0 :             if (!yymsg)
    6175             :               {
    6176           0 :                 yymsg = yymsgbuf;
    6177           0 :                 yymsg_alloc = sizeof yymsgbuf;
    6178           0 :                 yysyntax_error_status = 2;
    6179             :               }
    6180             :             else
    6181             :               {
    6182           0 :                 yysyntax_error_status = YYSYNTAX_ERROR;
    6183           0 :                 yymsgp = yymsg;
    6184             :               }
    6185             :           }
    6186           0 :         yyerror (yymsgp);
    6187           0 :         if (yysyntax_error_status == 2)
    6188           0 :           goto yyexhaustedlab;
    6189             :       }
    6190             : # undef YYSYNTAX_ERROR
    6191             : #endif
    6192             :     }
    6193             : 
    6194             : 
    6195             : 
    6196           0 :   if (yyerrstatus == 3)
    6197             :     {
    6198             :       /* If just tried and failed to reuse lookahead token after an
    6199             :          error, discard it.  */
    6200             : 
    6201           0 :       if (yychar <= YYEOF)
    6202             :         {
    6203             :           /* Return failure if at end of input.  */
    6204           0 :           if (yychar == YYEOF)
    6205           0 :             YYABORT;
    6206             :         }
    6207             :       else
    6208             :         {
    6209             :           yydestruct ("Error: discarding",
    6210           0 :                       yytoken, &yylval);
    6211           0 :           yychar = YYEMPTY;
    6212             :         }
    6213             :     }
    6214             : 
    6215             :   /* Else will try to reuse lookahead token after shifting the error
    6216             :      token.  */
    6217           0 :   goto yyerrlab1;
    6218             : 
    6219             : 
    6220             : /*---------------------------------------------------.
    6221             : | yyerrorlab -- error raised explicitly by YYERROR.  |
    6222             : `---------------------------------------------------*/
    6223             : yyerrorlab:
    6224             : 
    6225             :   /* Pacify compilers like GCC when the user code never invokes
    6226             :      YYERROR and the label yyerrorlab therefore never appears in user
    6227             :      code.  */
    6228             :   if (/*CONSTCOND*/ 0)
    6229             :      goto yyerrorlab;
    6230             : 
    6231             :   /* Do not reclaim the symbols of the rule which action triggered
    6232             :      this YYERROR.  */
    6233             :   YYPOPSTACK (yylen);
    6234             :   yylen = 0;
    6235             :   YY_STACK_PRINT (yyss, yyssp);
    6236             :   yystate = *yyssp;
    6237             :   goto yyerrlab1;
    6238             : 
    6239             : 
    6240             : /*-------------------------------------------------------------.
    6241             : | yyerrlab1 -- common code for both syntax error and YYERROR.  |
    6242             : `-------------------------------------------------------------*/
    6243             : yyerrlab1:
    6244           0 :   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
    6245             : 
    6246           0 :   for (;;)
    6247             :     {
    6248           0 :       yyn = yypact[yystate];
    6249           0 :       if (!yypact_value_is_default (yyn))
    6250             :         {
    6251           0 :           yyn += YYTERROR;
    6252           0 :           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
    6253             :             {
    6254           0 :               yyn = yytable[yyn];
    6255           0 :               if (0 < yyn)
    6256           0 :                 break;
    6257             :             }
    6258             :         }
    6259             : 
    6260             :       /* Pop the current state because it cannot handle the error token.  */
    6261           0 :       if (yyssp == yyss)
    6262           0 :         YYABORT;
    6263             : 
    6264             : 
    6265             :       yydestruct ("Error: popping",
    6266           0 :                   yystos[yystate], yyvsp);
    6267           0 :       YYPOPSTACK (1);
    6268           0 :       yystate = *yyssp;
    6269           0 :       YY_STACK_PRINT (yyss, yyssp);
    6270             :     }
    6271             : 
    6272           0 :   *++yyvsp = yylval;
    6273             : 
    6274             : 
    6275             :   /* Shift the error token.  */
    6276           0 :   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
    6277             : 
    6278           0 :   yystate = yyn;
    6279           0 :   goto yynewstate;
    6280             : 
    6281             : 
    6282             : /*-------------------------------------.
    6283             : | yyacceptlab -- YYACCEPT comes here.  |
    6284             : `-------------------------------------*/
    6285             : yyacceptlab:
    6286           0 :   yyresult = 0;
    6287           0 :   goto yyreturn;
    6288             : 
    6289             : /*-----------------------------------.
    6290             : | yyabortlab -- YYABORT comes here.  |
    6291             : `-----------------------------------*/
    6292             : yyabortlab:
    6293           0 :   yyresult = 1;
    6294           0 :   goto yyreturn;
    6295             : 
    6296             : #if !defined(yyoverflow) || YYERROR_VERBOSE
    6297             : /*-------------------------------------------------.
    6298             : | yyexhaustedlab -- memory exhaustion comes here.  |
    6299             : `-------------------------------------------------*/
    6300             : yyexhaustedlab:
    6301           0 :   yyerror (YY_("memory exhausted"));
    6302           0 :   yyresult = 2;
    6303             :   /* Fall through.  */
    6304             : #endif
    6305             : 
    6306             : yyreturn:
    6307           0 :   if (yychar != YYEMPTY)
    6308             :     {
    6309             :       /* Make sure we have latest lookahead translation.  See comments at
    6310             :          user semantic actions for why this is necessary.  */
    6311           0 :       yytoken = YYTRANSLATE (yychar);
    6312             :       yydestruct ("Cleanup: discarding lookahead",
    6313           0 :                   yytoken, &yylval);
    6314             :     }
    6315             :   /* Do not reclaim the symbols of the rule which action triggered
    6316             :      this YYABORT or YYACCEPT.  */
    6317           0 :   YYPOPSTACK (yylen);
    6318           0 :   YY_STACK_PRINT (yyss, yyssp);
    6319           0 :   while (yyssp != yyss)
    6320             :     {
    6321             :       yydestruct ("Cleanup: popping",
    6322           0 :                   yystos[*yyssp], yyvsp);
    6323           0 :       YYPOPSTACK (1);
    6324             :     }
    6325             : #ifndef yyoverflow
    6326           0 :   if (yyss != yyssa)
    6327           0 :     YYSTACK_FREE (yyss);
    6328             : #endif
    6329             : #if YYERROR_VERBOSE
    6330           0 :   if (yymsg != yymsgbuf)
    6331           0 :     YYSTACK_FREE (yymsg);
    6332             : #endif
    6333             :   /* Make sure YYID is used.  */
    6334           0 :   return YYID (yyresult);
    6335             : }
    6336             : 
    6337             : 
    6338             : 
    6339             : /* Line 2067 of yacc.c  */
    6340             : #line 3260 "/usr/local/src/libreoffice/idlc/source/parser.y"
    6341             : 
    6342             : 
    6343             : /*
    6344             :  * Report an error situation discovered in a production
    6345             :  */
    6346             : void yyerror(char const *errmsg)
    6347             : {
    6348             :         idlc()->error()->syntaxError(idlc()->getParseState(), idlc()->getLineNumber(), errmsg);
    6349             :         idlc()->setParseState(PS_NoState);
    6350             : }
    6351             : 

Generated by: LCOV version 1.10