#define YY_ClntParser_h_included
#define YY_USE_CLASS

/*  A Bison++ parser, made from ClntParser.y  */

 /* with Bison++ version bison++ Version 1.21.9-1, adapted from GNU bison by coetmeur@icdc.fr
Maintained by Magnus Ekdahl <magnus@debian.org>
  */

#define YY_USE_CLASS

#line 1 "../bison++/bison.cc"
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman

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

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

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

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

*/

/* HEADER SECTION */
#if defined( _MSDOS ) || defined(MSDOS) || defined(__MSDOS__) 
 #define __MSDOS_AND_ALIKE
#endif

#if defined(_WINDOWS) && defined(_MSC_VER)
 #define __HAVE_NO_ALLOCA
 #define __MSDOS_AND_ALIKE
#endif

#ifndef alloca
 #if defined( __GNUC__)
  #define alloca __builtin_alloca

 #elif (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc)  || defined (__sgi)
  #include <alloca.h>

 #elif defined (__MSDOS_AND_ALIKE)
  #include <malloc.h>
  #ifndef __TURBOC__
   /* MS C runtime lib */
   #define alloca _alloca
  #endif

 #elif defined(_AIX)
  /* pragma must be put before any C/C++ instruction !! */
  #pragma alloca
  #include <malloc.h>

 #elif defined(__hpux)
  #ifdef __cplusplus
   extern "C" {
     void *alloca (unsigned int);
   };
  #else /* not __cplusplus */
   void *alloca ();
  #endif /* not __cplusplus */

 #endif /* not _AIX  not MSDOS, or __TURBOC__ or _AIX, not sparc.  */
#endif /* alloca not defined.  */

#ifdef c_plusplus
 #ifndef __cplusplus
  #define __cplusplus
 #endif
#endif

#ifdef __cplusplus
 #ifndef YY_USE_CLASS
/*#warning "For C++ its recomended to use bison++, otherwise classes won't be generated"*/
 #endif
#else
 #ifndef __STDC__
  #define const
 #endif
 #ifdef YY_USE_CLASS
  #error "This is a C++ header generated by bison++, please use a C++ compiler!"
 #endif
#endif

#include <stdio.h>
#define YYBISON 1  

 #line 88 "../bison++/bison.cc"
#line 3 "ClntParser.y"

#include <iostream>
#include <string>
#include <malloc.h>
#include "DHCPConst.h"
#include "SmartPtr.h"
#include "Container.h"
#include "ClntParser.h"
#include "ClntParsGlobalOpt.h"
#include "ClntCfgIface.h"
#include "ClntCfgAddr.h"
#include "ClntCfgIA.h"
#include "ClntCfgTA.h"
#include "ClntCfgPD.h"
#include "ClntOptVendorSpec.h"
#include "CfgMgr.h"
#include "Logger.h"

using namespace std;
    
#define YY_USE_CLASS
#line 26 "ClntParser.y"

#include "FlexLexer.h"
#define YY_ClntParser_MEMBERS  yyFlexLexer * lex;                                          \
/*List of options in scope stack,the most fresh is last in the list*/       \
List(TClntParsGlobalOpt) ParserOptStack;			            \
/*List of parsed interfaces/IAs/Addresses, last */                          \
/*interface/IA/address is just being parsing or have been just parsed*/     \
List(TClntCfgIface) ClntCfgIfaceLst;	                                    \
List(TClntCfgIA)    ClntCfgIALst;		                            \
List(TClntCfgTA)    ClntCfgTALst;                                           \
List(TClntCfgPD)    ClntCfgPDLst;                                           \
List(TClntCfgAddr)  ClntCfgAddrLst;                                         \
List(DigestTypes)   DigestLst;                                              \
/*Pointer to list which should contain either rejected servers or */        \
/*preffered servers*/                                                       \
TContainer<SmartPtr<TStationID> > PresentStationLst;                        \
TContainer<SmartPtr<TIPv6Addr> > PresentAddrLst;                            \
TContainer<SmartPtr<string> > PresentStringLst;                             \
List(TClntOptVendorSpec) VendorSpec;					    \
/*method check whether interface with id=ifaceNr has been */                \
/*already declared */                                                       \
bool CheckIsIface(int ifaceNr);                                             \
/* method check if interface with id=ifaceName has been already declared */ \
bool CheckIsIface(string ifaceName);                                        \
void StartIfaceDeclaration();                                               \
bool EndIfaceDeclaration();                                                 \
void EmptyIface();                                                          \
void StartIADeclaration(bool aggregation);                                  \
void EndIADeclaration();                                                    \
void StartPDDeclaration();                                                  \
bool EndPDDeclaration();                                                    \
void EmptyIA();                                                             \
void EmptyAddr();                                                           \
bool iaidSet;                                                               \
unsigned int iaid;                                                          \
virtual ~ClntParser();                                                      \
EDUIDType DUIDType;                                                         \
int DUIDEnterpriseNumber;                                                   \
SPtr<TDUID> DUIDEnterpriseID;
#define YY_ClntParser_CONSTRUCTOR_PARAM  yyFlexLexer * lex
#define YY_ClntParser_CONSTRUCTOR_CODE                                                     \
    this->lex = lex;                                                        \
    ParserOptStack.append(new TClntParsGlobalOpt());                        \
    ParserOptStack.getFirst()->setIAIDCnt(1);                               \
    ParserOptStack.getLast();                                               \
    DUIDType = DUID_TYPE_NOT_DEFINED;                                       \
    DUIDEnterpriseID = 0;

#line 79 "ClntParser.y"
typedef union    
{
    int ival;    
    char *strval;  
    struct SDuid  {      
        int length;    
        char* duid;  
    } duidval;  
    char addrval[16];  
} yy_ClntParser_stype;
#define YY_ClntParser_STYPE yy_ClntParser_stype
#line 90 "ClntParser.y"

namespace std
{
    extern yy_ClntParser_stype yylval;
}

#line 88 "../bison++/bison.cc"
/* %{ and %header{ and %union, during decl */
#define YY_ClntParser_BISON 1

#ifndef YY_ClntParser_COMPATIBILITY
 #ifndef YY_USE_CLASS
  #define  YY_ClntParser_COMPATIBILITY 1
 #else
  #define  YY_ClntParser_COMPATIBILITY 0
 #endif
#endif

#if YY_ClntParser_COMPATIBILITY != 0
 /* backward compatibility */
 #ifdef YYLTYPE
  #ifndef YY_ClntParser_LTYPE
   #define YY_ClntParser_LTYPE YYLTYPE
  #endif
 #endif
/* Testing alternative bison solution
   /#ifdef YYSTYPE*/
#ifndef YY_ClntParser_STYPE 
   #define YY_ClntParser_STYPE YYSTYPE
#endif
/*#endif*/
 #ifdef YYDEBUG
  #ifndef YY_ClntParser_DEBUG
   #define  YY_ClntParser_DEBUG YYDEBUG
  #endif
 #endif
 
 /* use goto to be compatible */
 #ifndef YY_ClntParser_USE_GOTO
  #define YY_ClntParser_USE_GOTO 1
 #endif
#endif

/* use no goto to be clean in C++ */
#ifndef YY_ClntParser_USE_GOTO
 #define YY_ClntParser_USE_GOTO 0
#endif

#ifndef YY_ClntParser_PURE

 #line 130 "../bison++/bison.cc"

#line 130 "../bison++/bison.cc"
/*  YY_ClntParser_PURE */
#endif

/* section apres lecture def, avant lecture grammaire S2 */

 #line 134 "../bison++/bison.cc"

#line 134 "../bison++/bison.cc"
/* prefix */
#ifndef YY_ClntParser_DEBUG

 #line 136 "../bison++/bison.cc"

#line 136 "../bison++/bison.cc"
/* YY_ClntParser_DEBUG */
#endif


#ifndef YY_ClntParser_LSP_NEEDED

 #line 141 "../bison++/bison.cc"

#line 141 "../bison++/bison.cc"
 /* YY_ClntParser_LSP_NEEDED*/
#endif



/* DEFAULT LTYPE*/
#ifdef YY_ClntParser_LSP_NEEDED
#ifndef YY_ClntParser_LTYPE
#ifndef BISON_YYLTYPE_ISDECLARED
#define BISON_YYLTYPE_ISDECLARED
typedef
  struct yyltype
    {
      int timestamp;
      int first_line;
      int first_column;
      int last_line;
      int last_column;
      char *text;
   }
  yyltype;

#endif
#define YY_ClntParser_LTYPE yyltype
#endif
#endif
/* DEFAULT STYPE*/
      /* We used to use `unsigned long' as YY_ClntParser_STYPE on MSDOS,
	 but it seems better to be consistent.
	 Most programs should declare their own type anyway.  */

#ifndef YY_ClntParser_STYPE
#define YY_ClntParser_STYPE int
#endif
/* DEFAULT MISCELANEOUS */
#ifndef YY_ClntParser_PARSE
#define YY_ClntParser_PARSE yyparse
#endif
#ifndef YY_ClntParser_LEX
#define YY_ClntParser_LEX yylex
#endif
#ifndef YY_ClntParser_LVAL
#define YY_ClntParser_LVAL yylval
#endif
#ifndef YY_ClntParser_LLOC
#define YY_ClntParser_LLOC yylloc
#endif
#ifndef YY_ClntParser_CHAR
#define YY_ClntParser_CHAR yychar
#endif
#ifndef YY_ClntParser_NERRS
#define YY_ClntParser_NERRS yynerrs
#endif
#ifndef YY_ClntParser_DEBUG_FLAG
#define YY_ClntParser_DEBUG_FLAG yydebug
#endif
#ifndef YY_ClntParser_ERROR
#define YY_ClntParser_ERROR yyerror
#endif

#ifndef YY_ClntParser_PARSE_PARAM
 #ifndef YY_USE_CLASS
  #ifdef YYPARSE_PARAM
   #define YY_ClntParser_PARSE_PARAM void* YYPARSE_PARAM 
  #else
   #ifndef __STDC__
    #ifndef __cplusplus
     #define YY_ClntParser_PARSE_PARAM
    #endif
   #endif
  #endif
 #endif
 #ifndef YY_ClntParser_PARSE_PARAM
  #define YY_ClntParser_PARSE_PARAM void
 #endif
#endif

#if YY_ClntParser_COMPATIBILITY != 0
/* backward compatibility */
#ifdef YY_ClntParser_LTYPE
#ifndef YYLTYPE
#define YYLTYPE YY_ClntParser_LTYPE
#else
/* WARNING obsolete !!! user defined YYLTYPE not reported into generated header */
#endif
#endif

/* Removed due to bison compabilityproblems
/#ifndef YYSTYPE
/#define YYSTYPE YY_ClntParser_STYPE
/#else*/
/* WARNING obsolete !!! user defined YYSTYPE not reported into generated header */
/*#endif*/

#ifdef YY_ClntParser_PURE
#  ifndef YYPURE
#    define YYPURE YY_ClntParser_PURE
#  endif
#endif

#ifdef YY_ClntParser_DEBUG
#  ifndef YYDEBUG
#    define YYDEBUG YY_ClntParser_DEBUG 
#  endif
#endif

#ifndef YY_ClntParser_ERROR_VERBOSE
 #ifdef YYERROR_VERBOSE
  #define YY_ClntParser_ERROR_VERBOSE YYERROR_VERBOSE
 #endif
#endif

#ifndef YY_ClntParser_LSP_NEEDED
#  ifdef YYLSP_NEEDED
#    define YY_ClntParser_LSP_NEEDED YYLSP_NEEDED
#  endif
#endif

#endif

#ifndef YY_USE_CLASS
/* TOKEN C */

 #line 263 "../bison++/bison.cc"
#define	T1_	258
#define	T2_	259
#define	PREF_TIME_	260
#define	DNS_SERVER_	261
#define	VALID_TIME_	262
#define	UNICAST_	263
#define	NTP_SERVER_	264
#define	DOMAIN_	265
#define	TIME_ZONE_	266
#define	SIP_SERVER_	267
#define	SIP_DOMAIN_	268
#define	NIS_SERVER_	269
#define	NISP_SERVER_	270
#define	NIS_DOMAIN_	271
#define	NISP_DOMAIN_	272
#define	FQDN_	273
#define	FQDN_S_	274
#define	LIFETIME_	275
#define	VENDOR_SPEC_	276
#define	IFACE_	277
#define	NO_CONFIG_	278
#define	REJECT_SERVERS_	279
#define	PREFERRED_SERVERS_	280
#define	IA_	281
#define	TA_	282
#define	IAID_	283
#define	ADDRES_	284
#define	IPV6ADDR_	285
#define	WORKDIR_	286
#define	RAPID_COMMIT_	287
#define	OPTION_	288
#define	SCRIPTS_DIR_	289
#define	LOGNAME_	290
#define	LOGLEVEL_	291
#define	LOGMODE_	292
#define	STRING_	293
#define	HEXNUMBER_	294
#define	INTNUMBER_	295
#define	DUID_	296
#define	STRICT_RFC_NO_ROUTING_	297
#define	PD_	298
#define	DUID_TYPE_	299
#define	DUID_TYPE_LLT_	300
#define	DUID_TYPE_LL_	301
#define	DUID_TYPE_EN_	302
#define	AUTH_ENABLED_	303
#define	AUTH_ACCEPT_METHODS_	304
#define	DIGEST_NONE_	305
#define	DIGEST_PLAIN_	306
#define	DIGEST_HMAC_MD5_	307
#define	DIGEST_HMAC_SHA1_	308
#define	DIGEST_HMAC_SHA224_	309
#define	DIGEST_HMAC_SHA256_	310
#define	DIGEST_HMAC_SHA384_	311
#define	DIGEST_HMAC_SHA512_	312
#define	STATELESS_	313
#define	ANON_INF_REQUEST_	314
#define	INSIST_MODE_	315
#define	INACTIVE_MODE_	316
#define	EXPERIMENTAL_	317
#define	ADDR_PARAMS_	318
#define	MAPPING_PREFIX_	319


#line 263 "../bison++/bison.cc"
 /* #defines tokens */
#else
/* CLASS */
#ifndef YY_ClntParser_CLASS
#define YY_ClntParser_CLASS ClntParser
#endif
#ifndef YY_ClntParser_INHERIT
#define YY_ClntParser_INHERIT
#endif
#ifndef YY_ClntParser_MEMBERS
#define YY_ClntParser_MEMBERS 
#endif
#ifndef YY_ClntParser_LEX_BODY
#define YY_ClntParser_LEX_BODY  
#endif
#ifndef YY_ClntParser_ERROR_BODY
#define YY_ClntParser_ERROR_BODY  
#endif
#ifndef YY_ClntParser_CONSTRUCTOR_PARAM
#define YY_ClntParser_CONSTRUCTOR_PARAM
#endif
#ifndef YY_ClntParser_CONSTRUCTOR_CODE
#define YY_ClntParser_CONSTRUCTOR_CODE
#endif
#ifndef YY_ClntParser_CONSTRUCTOR_INIT
#define YY_ClntParser_CONSTRUCTOR_INIT
#endif
/* choose between enum and const */
#ifndef YY_ClntParser_USE_CONST_TOKEN
#define YY_ClntParser_USE_CONST_TOKEN 0
/* yes enum is more compatible with flex,  */
/* so by default we use it */ 
#endif
#if YY_ClntParser_USE_CONST_TOKEN != 0
#ifndef YY_ClntParser_ENUM_TOKEN
#define YY_ClntParser_ENUM_TOKEN yy_ClntParser_enum_token
#endif
#endif

class YY_ClntParser_CLASS YY_ClntParser_INHERIT
{
public: 
#if YY_ClntParser_USE_CONST_TOKEN != 0
/* static const int token ... */

 #line 307 "../bison++/bison.cc"
static const int T1_;
static const int T2_;
static const int PREF_TIME_;
static const int DNS_SERVER_;
static const int VALID_TIME_;
static const int UNICAST_;
static const int NTP_SERVER_;
static const int DOMAIN_;
static const int TIME_ZONE_;
static const int SIP_SERVER_;
static const int SIP_DOMAIN_;
static const int NIS_SERVER_;
static const int NISP_SERVER_;
static const int NIS_DOMAIN_;
static const int NISP_DOMAIN_;
static const int FQDN_;
static const int FQDN_S_;
static const int LIFETIME_;
static const int VENDOR_SPEC_;
static const int IFACE_;
static const int NO_CONFIG_;
static const int REJECT_SERVERS_;
static const int PREFERRED_SERVERS_;
static const int IA_;
static const int TA_;
static const int IAID_;
static const int ADDRES_;
static const int IPV6ADDR_;
static const int WORKDIR_;
static const int RAPID_COMMIT_;
static const int OPTION_;
static const int SCRIPTS_DIR_;
static const int LOGNAME_;
static const int LOGLEVEL_;
static const int LOGMODE_;
static const int STRING_;
static const int HEXNUMBER_;
static const int INTNUMBER_;
static const int DUID_;
static const int STRICT_RFC_NO_ROUTING_;
static const int PD_;
static const int DUID_TYPE_;
static const int DUID_TYPE_LLT_;
static const int DUID_TYPE_LL_;
static const int DUID_TYPE_EN_;
static const int AUTH_ENABLED_;
static const int AUTH_ACCEPT_METHODS_;
static const int DIGEST_NONE_;
static const int DIGEST_PLAIN_;
static const int DIGEST_HMAC_MD5_;
static const int DIGEST_HMAC_SHA1_;
static const int DIGEST_HMAC_SHA224_;
static const int DIGEST_HMAC_SHA256_;
static const int DIGEST_HMAC_SHA384_;
static const int DIGEST_HMAC_SHA512_;
static const int STATELESS_;
static const int ANON_INF_REQUEST_;
static const int INSIST_MODE_;
static const int INACTIVE_MODE_;
static const int EXPERIMENTAL_;
static const int ADDR_PARAMS_;
static const int MAPPING_PREFIX_;


#line 307 "../bison++/bison.cc"
 /* decl const */
#else
enum YY_ClntParser_ENUM_TOKEN { YY_ClntParser_NULL_TOKEN=0

 #line 310 "../bison++/bison.cc"
	,T1_=258
	,T2_=259
	,PREF_TIME_=260
	,DNS_SERVER_=261
	,VALID_TIME_=262
	,UNICAST_=263
	,NTP_SERVER_=264
	,DOMAIN_=265
	,TIME_ZONE_=266
	,SIP_SERVER_=267
	,SIP_DOMAIN_=268
	,NIS_SERVER_=269
	,NISP_SERVER_=270
	,NIS_DOMAIN_=271
	,NISP_DOMAIN_=272
	,FQDN_=273
	,FQDN_S_=274
	,LIFETIME_=275
	,VENDOR_SPEC_=276
	,IFACE_=277
	,NO_CONFIG_=278
	,REJECT_SERVERS_=279
	,PREFERRED_SERVERS_=280
	,IA_=281
	,TA_=282
	,IAID_=283
	,ADDRES_=284
	,IPV6ADDR_=285
	,WORKDIR_=286
	,RAPID_COMMIT_=287
	,OPTION_=288
	,SCRIPTS_DIR_=289
	,LOGNAME_=290
	,LOGLEVEL_=291
	,LOGMODE_=292
	,STRING_=293
	,HEXNUMBER_=294
	,INTNUMBER_=295
	,DUID_=296
	,STRICT_RFC_NO_ROUTING_=297
	,PD_=298
	,DUID_TYPE_=299
	,DUID_TYPE_LLT_=300
	,DUID_TYPE_LL_=301
	,DUID_TYPE_EN_=302
	,AUTH_ENABLED_=303
	,AUTH_ACCEPT_METHODS_=304
	,DIGEST_NONE_=305
	,DIGEST_PLAIN_=306
	,DIGEST_HMAC_MD5_=307
	,DIGEST_HMAC_SHA1_=308
	,DIGEST_HMAC_SHA224_=309
	,DIGEST_HMAC_SHA256_=310
	,DIGEST_HMAC_SHA384_=311
	,DIGEST_HMAC_SHA512_=312
	,STATELESS_=313
	,ANON_INF_REQUEST_=314
	,INSIST_MODE_=315
	,INACTIVE_MODE_=316
	,EXPERIMENTAL_=317
	,ADDR_PARAMS_=318
	,MAPPING_PREFIX_=319


#line 310 "../bison++/bison.cc"
 /* enum token */
     }; /* end of enum declaration */
#endif
public:
 int YY_ClntParser_PARSE (YY_ClntParser_PARSE_PARAM);
 virtual void YY_ClntParser_ERROR(char *msg) YY_ClntParser_ERROR_BODY;
#ifdef YY_ClntParser_PURE
#ifdef YY_ClntParser_LSP_NEEDED
 virtual int  YY_ClntParser_LEX (YY_ClntParser_STYPE *YY_ClntParser_LVAL,YY_ClntParser_LTYPE *YY_ClntParser_LLOC) YY_ClntParser_LEX_BODY;
#else
 virtual int  YY_ClntParser_LEX (YY_ClntParser_STYPE *YY_ClntParser_LVAL) YY_ClntParser_LEX_BODY;
#endif
#else
 virtual int YY_ClntParser_LEX() YY_ClntParser_LEX_BODY;
 YY_ClntParser_STYPE YY_ClntParser_LVAL;
#ifdef YY_ClntParser_LSP_NEEDED
 YY_ClntParser_LTYPE YY_ClntParser_LLOC;
#endif
 int   YY_ClntParser_NERRS;
 int    YY_ClntParser_CHAR;
#endif
#if YY_ClntParser_DEBUG != 0
 int YY_ClntParser_DEBUG_FLAG;   /*  nonzero means print parse trace     */
#endif
public:
 YY_ClntParser_CLASS(YY_ClntParser_CONSTRUCTOR_PARAM);
public:
 YY_ClntParser_MEMBERS 
};
/* other declare folow */
#if YY_ClntParser_USE_CONST_TOKEN != 0

 #line 341 "../bison++/bison.cc"
const int YY_ClntParser_CLASS::T1_=258;
const int YY_ClntParser_CLASS::T2_=259;
const int YY_ClntParser_CLASS::PREF_TIME_=260;
const int YY_ClntParser_CLASS::DNS_SERVER_=261;
const int YY_ClntParser_CLASS::VALID_TIME_=262;
const int YY_ClntParser_CLASS::UNICAST_=263;
const int YY_ClntParser_CLASS::NTP_SERVER_=264;
const int YY_ClntParser_CLASS::DOMAIN_=265;
const int YY_ClntParser_CLASS::TIME_ZONE_=266;
const int YY_ClntParser_CLASS::SIP_SERVER_=267;
const int YY_ClntParser_CLASS::SIP_DOMAIN_=268;
const int YY_ClntParser_CLASS::NIS_SERVER_=269;
const int YY_ClntParser_CLASS::NISP_SERVER_=270;
const int YY_ClntParser_CLASS::NIS_DOMAIN_=271;
const int YY_ClntParser_CLASS::NISP_DOMAIN_=272;
const int YY_ClntParser_CLASS::FQDN_=273;
const int YY_ClntParser_CLASS::FQDN_S_=274;
const int YY_ClntParser_CLASS::LIFETIME_=275;
const int YY_ClntParser_CLASS::VENDOR_SPEC_=276;
const int YY_ClntParser_CLASS::IFACE_=277;
const int YY_ClntParser_CLASS::NO_CONFIG_=278;
const int YY_ClntParser_CLASS::REJECT_SERVERS_=279;
const int YY_ClntParser_CLASS::PREFERRED_SERVERS_=280;
const int YY_ClntParser_CLASS::IA_=281;
const int YY_ClntParser_CLASS::TA_=282;
const int YY_ClntParser_CLASS::IAID_=283;
const int YY_ClntParser_CLASS::ADDRES_=284;
const int YY_ClntParser_CLASS::IPV6ADDR_=285;
const int YY_ClntParser_CLASS::WORKDIR_=286;
const int YY_ClntParser_CLASS::RAPID_COMMIT_=287;
const int YY_ClntParser_CLASS::OPTION_=288;
const int YY_ClntParser_CLASS::SCRIPTS_DIR_=289;
const int YY_ClntParser_CLASS::LOGNAME_=290;
const int YY_ClntParser_CLASS::LOGLEVEL_=291;
const int YY_ClntParser_CLASS::LOGMODE_=292;
const int YY_ClntParser_CLASS::STRING_=293;
const int YY_ClntParser_CLASS::HEXNUMBER_=294;
const int YY_ClntParser_CLASS::INTNUMBER_=295;
const int YY_ClntParser_CLASS::DUID_=296;
const int YY_ClntParser_CLASS::STRICT_RFC_NO_ROUTING_=297;
const int YY_ClntParser_CLASS::PD_=298;
const int YY_ClntParser_CLASS::DUID_TYPE_=299;
const int YY_ClntParser_CLASS::DUID_TYPE_LLT_=300;
const int YY_ClntParser_CLASS::DUID_TYPE_LL_=301;
const int YY_ClntParser_CLASS::DUID_TYPE_EN_=302;
const int YY_ClntParser_CLASS::AUTH_ENABLED_=303;
const int YY_ClntParser_CLASS::AUTH_ACCEPT_METHODS_=304;
const int YY_ClntParser_CLASS::DIGEST_NONE_=305;
const int YY_ClntParser_CLASS::DIGEST_PLAIN_=306;
const int YY_ClntParser_CLASS::DIGEST_HMAC_MD5_=307;
const int YY_ClntParser_CLASS::DIGEST_HMAC_SHA1_=308;
const int YY_ClntParser_CLASS::DIGEST_HMAC_SHA224_=309;
const int YY_ClntParser_CLASS::DIGEST_HMAC_SHA256_=310;
const int YY_ClntParser_CLASS::DIGEST_HMAC_SHA384_=311;
const int YY_ClntParser_CLASS::DIGEST_HMAC_SHA512_=312;
const int YY_ClntParser_CLASS::STATELESS_=313;
const int YY_ClntParser_CLASS::ANON_INF_REQUEST_=314;
const int YY_ClntParser_CLASS::INSIST_MODE_=315;
const int YY_ClntParser_CLASS::INACTIVE_MODE_=316;
const int YY_ClntParser_CLASS::EXPERIMENTAL_=317;
const int YY_ClntParser_CLASS::ADDR_PARAMS_=318;
const int YY_ClntParser_CLASS::MAPPING_PREFIX_=319;


#line 341 "../bison++/bison.cc"
 /* const YY_ClntParser_CLASS::token */
#endif
/*apres const  */
YY_ClntParser_CLASS::YY_ClntParser_CLASS(YY_ClntParser_CONSTRUCTOR_PARAM) YY_ClntParser_CONSTRUCTOR_INIT
{
#if YY_ClntParser_DEBUG != 0
YY_ClntParser_DEBUG_FLAG=0;
#endif
YY_ClntParser_CONSTRUCTOR_CODE;
}
#endif

 #line 352 "../bison++/bison.cc"


#define	YYFINAL		228
#define	YYFLAG		-32768
#define	YYNTBASE	68

#define YYTRANSLATE(x) ((unsigned)(x) <= 319 ? yytranslate[x] : 149)

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

#if YY_ClntParser_DEBUG != 0
static const short yyprhs[] = {     0,
     0,     2,     3,     5,     7,    10,    13,    15,    17,    19,
    21,    23,    25,    27,    29,    31,    33,    35,    37,    39,
    41,    43,    45,    47,    49,    51,    53,    55,    57,    59,
    61,    63,    65,    67,    69,    71,    73,    75,    77,    79,
    81,    83,    85,    87,    89,    91,    92,    99,   100,   107,
   112,   117,   121,   125,   127,   130,   132,   135,   137,   140,
   142,   145,   147,   148,   149,   156,   160,   163,   165,   168,
   169,   175,   179,   181,   183,   186,   188,   191,   192,   198,
   199,   206,   211,   215,   218,   220,   222,   225,   227,   230,
   232,   234,   237,   240,   243,   246,   249,   254,   256,   259,
   261,   264,   267,   268,   272,   274,   278,   280,   282,   284,
   286,   288,   290,   292,   294,   296,   298,   300,   301,   305,
   306,   310,   313,   316,   318,   321,   324,   327,   329,   333,
   334,   340,   342,   345,   347,   349,   352,   354,   356,   360,
   364,   366,   370,   372,   376,   378,   380,   383,   384,   389,
   392,   393,   398,   401,   402,   407,   410,   414,   417,   418,
   423,   426,   427,   432,   435,   439,   443,   446,   447,   452,
   455,   456,   461,   464,   468,   471,   475,   478,   481,   486,
   490,   492
};

static const short yyrhs[] = {    69,
     0,     0,    70,     0,    73,     0,    69,    70,     0,    69,
    73,     0,    71,     0,    91,     0,    92,     0,    90,     0,
    95,     0,    93,     0,    96,     0,    97,     0,    98,     0,
    99,     0,   103,     0,   104,     0,   105,     0,   139,     0,
   106,     0,   107,     0,    72,     0,    94,     0,   122,     0,
   127,     0,   129,     0,   131,     0,   133,     0,   134,     0,
   136,     0,   138,     0,   140,     0,   142,     0,   144,     0,
   145,     0,   146,     0,   147,     0,   108,     0,   110,     0,
   116,     0,   117,     0,   113,     0,    89,     0,   114,     0,
     0,    22,    38,    65,    74,    76,    66,     0,     0,    22,
   126,    65,    75,    76,    66,     0,    22,    38,    65,    66,
     0,    22,   126,    65,    66,     0,    22,    38,    23,     0,
    22,   126,    23,     0,    71,     0,    76,    71,     0,    82,
     0,    76,    82,     0,    77,     0,    76,    77,     0,   118,
     0,    76,   118,     0,    27,     0,     0,     0,    27,    65,
    78,    80,    79,    66,     0,    27,    65,    66,     0,    80,
    81,     0,    81,     0,    28,   126,     0,     0,    26,    65,
    83,    84,    66,     0,    26,    65,    66,     0,    26,     0,
    72,     0,    84,    72,     0,    85,     0,    84,    85,     0,
     0,    29,    65,    86,    88,    66,     0,     0,    29,   126,
    65,    87,    88,    66,     0,    29,   126,    65,    66,     0,
    29,    65,    66,     0,    29,   126,     0,    29,     0,    89,
     0,    88,    89,     0,    30,     0,    88,    30,     0,   112,
     0,   115,     0,    36,   126,     0,    37,    38,     0,    35,
    38,     0,    44,    45,     0,    44,    46,     0,    44,    47,
   126,    41,     0,    58,     0,    31,    38,     0,    42,     0,
    34,    38,     0,    48,   126,     0,     0,    49,   100,   101,
     0,   102,     0,   101,    67,   102,     0,    52,     0,    53,
     0,    54,     0,    55,     0,    56,     0,    57,     0,    59,
     0,    61,     0,    60,     0,    62,     0,    64,     0,     0,
    24,   109,   123,     0,     0,    25,   111,   123,     0,     5,
   126,     0,    32,   126,     0,    63,     0,     7,   126,     0,
     3,   126,     0,     4,   126,     0,    43,     0,    43,    65,
    66,     0,     0,    43,    65,   119,   120,    66,     0,   121,
     0,   120,   121,     0,   116,     0,   117,     0,     8,   126,
     0,    30,     0,    41,     0,   123,    67,    30,     0,   123,
    67,    41,     0,    30,     0,   124,    67,    30,     0,    38,
     0,   125,    67,    38,     0,    39,     0,    40,     0,    33,
     6,     0,     0,    33,     6,   128,   124,     0,    33,    10,
     0,     0,    33,    10,   130,   125,     0,    33,     9,     0,
     0,    33,     9,   132,   124,     0,    33,    11,     0,    33,
    11,    38,     0,    33,    12,     0,     0,    33,    12,   135,
   124,     0,    33,    13,     0,     0,    33,    13,   137,   125,
     0,    33,    18,     0,    33,    18,    38,     0,    33,    19,
   126,     0,    33,    14,     0,     0,    33,    14,   141,   124,
     0,    33,    15,     0,     0,    33,    15,   143,   124,     0,
    33,    16,     0,    33,    16,    38,     0,    33,    17,     0,
    33,    17,    38,     0,    33,    20,     0,    33,    21,     0,
    33,    21,   126,    41,     0,    33,    21,   148,     0,   126,
     0,   148,    67,   126,     0
};

#endif

#if (YY_ClntParser_DEBUG != 0) || defined(YY_ClntParser_ERROR_VERBOSE) 
static const short yyrline[] = { 0,
   127,   128,   132,   133,   134,   135,   139,   140,   141,   142,
   143,   144,   145,   146,   147,   148,   149,   150,   151,   152,
   153,   154,   158,   159,   160,   161,   162,   163,   164,   165,
   166,   167,   168,   169,   170,   171,   172,   173,   174,   175,
   179,   180,   181,   182,   183,   190,   195,   208,   213,   223,
   234,   244,   256,   269,   270,   271,   272,   273,   274,   275,
   276,   283,   288,   295,   301,   301,   309,   310,   314,   326,
   330,   338,   347,   355,   356,   357,   358,   362,   368,   377,
   382,   388,   393,   398,   403,   410,   411,   412,   422,   435,
   436,   440,   450,   455,   460,   461,   462,   470,   477,   484,
   493,   499,   502,   505,   510,   511,   515,   516,   517,   518,
   519,   520,   524,   530,   536,   542,   549,   561,   566,   572,
   575,   582,   589,   596,   607,   614,   621,   628,   634,   640,
   644,   651,   652,   656,   657,   661,   679,   683,   687,   691,
   698,   699,   703,   704,   707,   708,   715,   721,   725,   734,
   739,   742,   751,   757,   760,   769,   773,   783,   789,   792,
   801,   806,   809,   818,   822,   829,   844,   850,   853,   862,
   868,   871,   880,   884,   895,   899,   909,   916,   922,   928,
   936,   937
};

static const char * const yytname[] = {   "$","error","$illegal.","T1_","T2_",
"PREF_TIME_","DNS_SERVER_","VALID_TIME_","UNICAST_","NTP_SERVER_","DOMAIN_",
"TIME_ZONE_","SIP_SERVER_","SIP_DOMAIN_","NIS_SERVER_","NISP_SERVER_","NIS_DOMAIN_",
"NISP_DOMAIN_","FQDN_","FQDN_S_","LIFETIME_","VENDOR_SPEC_","IFACE_","NO_CONFIG_",
"REJECT_SERVERS_","PREFERRED_SERVERS_","IA_","TA_","IAID_","ADDRES_","IPV6ADDR_",
"WORKDIR_","RAPID_COMMIT_","OPTION_","SCRIPTS_DIR_","LOGNAME_","LOGLEVEL_","LOGMODE_",
"STRING_","HEXNUMBER_","INTNUMBER_","DUID_","STRICT_RFC_NO_ROUTING_","PD_","DUID_TYPE_",
"DUID_TYPE_LLT_","DUID_TYPE_LL_","DUID_TYPE_EN_","AUTH_ENABLED_","AUTH_ACCEPT_METHODS_",
"DIGEST_NONE_","DIGEST_PLAIN_","DIGEST_HMAC_MD5_","DIGEST_HMAC_SHA1_","DIGEST_HMAC_SHA224_",
"DIGEST_HMAC_SHA256_","DIGEST_HMAC_SHA384_","DIGEST_HMAC_SHA512_","STATELESS_",
"ANON_INF_REQUEST_","INSIST_MODE_","INACTIVE_MODE_","EXPERIMENTAL_","ADDR_PARAMS_",
"MAPPING_PREFIX_","'{'","'}'","','","Grammar","GlobalDeclarationList","GlobalOptionDeclaration",
"InterfaceOptionDeclaration","IAOptionDeclaration","InterfaceDeclaration","@1",
"@2","InterfaceDeclarationsList","TADeclaration","@3","@4","TADeclarationList",
"IAID","IADeclaration","@5","IADeclarationList","ADDRESDeclaration","@6","@7",
"ADDRESDeclarationList","ADDRESOptionDeclaration","LogLevelOption","LogModeOption",
"LogNameOption","DuidTypeOption","NoIAsOptions","WorkDirOption","StrictRfcNoRoutingOption",
"ScriptsDir","AuthEnabledOption","AuthAcceptOption","@8","DigestList","Digest",
"AnonInfRequest","InactiveMode","InsistMode","Experimental","ExperimentalMappingPrefix",
"RejectServersOption","@9","PreferServersOption","@10","PreferredTimeOption",
"RapidCommitOption","ExperimentalAddrParams","ValidTimeOption","T1Option","T2Option",
"PDDeclaration","@11","PDOptionsList","PDOption","UnicastOption","ADDRESDUIDList",
"ADDRESSList","StringList","Number","DNSServerOption","@12","DomainOption","@13",
"NTPServerOption","@14","TimeZoneOption","SIPServerOption","@15","SIPDomainOption",
"@16","FQDNOption","FQDNBits","NISServerOption","@17","NISPServerOption","@18",
"NISDomainOption","NISPDomainOption","LifetimeOption","VendorSpecOption","VendorSpecList",
""
};
#endif

static const short yyr1[] = {     0,
    68,    68,    69,    69,    69,    69,    70,    70,    70,    70,
    70,    70,    70,    70,    70,    70,    70,    70,    70,    70,
    70,    70,    71,    71,    71,    71,    71,    71,    71,    71,
    71,    71,    71,    71,    71,    71,    71,    71,    71,    71,
    72,    72,    72,    72,    72,    74,    73,    75,    73,    73,
    73,    73,    73,    76,    76,    76,    76,    76,    76,    76,
    76,    77,    78,    79,    77,    77,    80,    80,    81,    83,
    82,    82,    82,    84,    84,    84,    84,    86,    85,    87,
    85,    85,    85,    85,    85,    88,    88,    88,    88,    89,
    89,    90,    91,    92,    93,    93,    93,    94,    95,    96,
    97,    98,   100,    99,   101,   101,   102,   102,   102,   102,
   102,   102,   103,   104,   105,   106,   107,   109,   108,   111,
   110,   112,   113,   114,   115,   116,   117,   118,   118,   119,
   118,   120,   120,   121,   121,   122,   123,   123,   123,   123,
   124,   124,   125,   125,   126,   126,   127,   128,   127,   129,
   130,   129,   131,   132,   131,   133,   133,   134,   135,   134,
   136,   137,   136,   138,   138,   139,   140,   141,   140,   142,
   143,   142,   144,   144,   145,   145,   146,   147,   147,   147,
   148,   148
};

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

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

static const short yydefgoto[] = {   226,
    27,    28,    29,    30,    31,   141,   143,   163,   164,   188,
   208,   196,   197,   165,   186,   193,   194,   213,   220,   217,
    32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
    42,   106,   138,   139,    43,    44,    45,    46,    47,    48,
    80,    49,    81,    50,    51,    52,    53,    54,    55,   166,
   190,   200,   201,    56,   115,   146,   149,    73,    57,   117,
    58,   119,    59,   118,    60,    61,   121,    62,   122,    63,
    64,    65,   123,    66,   124,    67,    68,    69,    70,   130
};

static const short yypact[] = {    82,
    19,    19,    19,    19,    19,   125,-32768,-32768,    23,    19,
   199,    35,    50,    19,    65,-32768,   127,    19,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,    82,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,    -3,     1,    41,
    41,-32768,-32768,    78,    80,    73,    83,    90,    98,   108,
   109,   112,   116,   117,    19,-32768,    19,-32768,-32768,-32768,
-32768,-32768,-32768,    19,-32768,   105,-32768,-32768,-32768,    62,
-32768,   100,-32768,-32768,   111,   111,   137,   137,   141,-32768,
   137,   141,   137,   137,-32768,-32768,-32768,-32768,   134,   113,
   140,-32768,-32768,-32768,-32768,-32768,-32768,   115,-32768,-32768,
   144,-32768,   144,    53,-32768,   118,   118,-32768,   119,   118,
   119,   118,   118,-32768,    19,-32768,   105,   123,   126,   215,
   129,-32768,     2,-32768,-32768,-32768,    14,-32768,-32768,   153,
   146,-32768,-32768,   124,   130,   131,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,    93,-32768,   164,-32768,    33,
     4,-32768,    46,-32768,    19,   164,-32768,-32768,-32768,    10,
-32768,   132,   135,-32768,-32768,-32768,-32768,   133,-32768,-32768,
-32768,-32768,    26,   138,-32768,-32768,    18,-32768,-32768,    26,
-32768,-32768,-32768,    25,-32768,   195,   201,-32768
};

static const short yypgoto[] = {-32768,
-32768,   176,   -62,   -94,   179,-32768,-32768,    79,  -152,-32768,
-32768,-32768,    27,   -40,-32768,-32768,    44,-32768,-32768,    20,
  -150,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,    77,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,  -148,  -136,   -30,
-32768,-32768,    38,-32768,   158,    11,   120,    -2,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768
};


#define	YYLAST		242


static const short yytable[] = {    74,
    75,    76,    77,    79,     1,     2,     3,    83,     4,     5,
   179,   100,     1,     2,   179,   105,     1,     2,     3,   109,
     4,     5,     3,   111,     4,     7,     8,   158,   159,     3,
     3,     4,     4,    10,   160,     1,     2,     7,     8,   158,
   159,   198,    71,    72,   161,    10,   160,   221,     1,     2,
     3,   198,     4,   199,   221,   216,   161,    71,    72,    20,
    82,   110,   218,   199,    25,   112,   223,   177,   202,   218,
   113,    20,    98,   223,   191,   210,    25,    10,   162,   182,
   162,   114,   168,   222,     1,     2,     3,    99,     4,     5,
   225,   192,   128,   169,   129,     1,     2,     3,   205,     4,
   178,   131,   101,     6,   178,     7,     8,  -148,    25,  -154,
  -151,   204,     9,    10,    11,    12,    13,    14,    15,  -159,
   120,   191,   180,    16,    10,    17,   180,   140,   147,    18,
    19,   150,   181,   152,   153,  -162,   181,  -168,  -171,    20,
    21,    22,    23,    24,    25,    26,     1,     2,     3,   125,
     4,     5,   172,   126,   127,    25,   132,   133,   134,   135,
   136,   137,    78,    71,    72,   142,   145,     7,     8,   158,
   159,   102,   103,   104,   154,    10,   160,   144,   148,   155,
   156,   157,   183,   184,   170,   171,   161,   174,   203,   185,
   175,   195,   207,   176,   227,   187,   189,   212,   215,   214,
   228,    20,   107,   219,    84,   108,    25,    85,    86,    87,
    88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
    84,   167,   209,    85,    86,    87,    88,    89,    90,    91,
    92,    93,    94,   173,    96,    97,   206,   211,   116,   224,
     0,   151
};

static const short yycheck[] = {     2,
     3,     4,     5,     6,     3,     4,     5,    10,     7,     8,
   163,    14,     3,     4,   167,    18,     3,     4,     5,    23,
     7,     8,     5,    23,     7,    24,    25,    26,    27,     5,
     5,     7,     7,    32,    33,     3,     4,    24,    25,    26,
    27,   190,    39,    40,    43,    32,    33,    30,     3,     4,
     5,   200,     7,   190,    30,    30,    43,    39,    40,    58,
    38,    65,   213,   200,    63,    65,   217,    66,    65,   220,
    30,    58,    38,   224,    29,    66,    63,    32,   141,    66,
   143,    41,    30,    66,     3,     4,     5,    38,     7,     8,
    66,   186,    95,    41,    97,     3,     4,     5,   193,     7,
   163,   104,    38,    22,   167,    24,    25,    30,    63,    30,
    38,    66,    31,    32,    33,    34,    35,    36,    37,    30,
    38,    29,   163,    42,    32,    44,   167,    66,   118,    48,
    49,   121,   163,   123,   124,    38,   167,    30,    30,    58,
    59,    60,    61,    62,    63,    64,     3,     4,     5,    38,
     7,     8,   155,    38,    38,    63,    52,    53,    54,    55,
    56,    57,    38,    39,    40,    66,    30,    24,    25,    26,
    27,    45,    46,    47,    41,    32,    33,    67,    38,    67,
    41,    67,    30,    38,    67,    67,    43,    65,   191,    66,
    65,    28,   195,    65,     0,    66,    66,    66,    66,    65,
     0,    58,    27,    66,     6,    27,    63,     9,    10,    11,
    12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
     6,   143,   196,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,   157,    20,    21,   193,   200,    81,   220,
    -1,   122
};

#line 352 "../bison++/bison.cc"
 /* fattrs + tables */

/* parser code folow  */


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

/* Note: dollar marks section change
   the next  is replaced by the list of actions, each action
   as one case of the switch.  */ 

#if YY_ClntParser_USE_GOTO != 0
/* 
 SUPRESSION OF GOTO : on some C++ compiler (sun c++)
  the goto is strictly forbidden if any constructor/destructor
  is used in the whole function (very stupid isn't it ?)
 so goto are to be replaced with a 'while/switch/case construct'
 here are the macro to keep some apparent compatibility
*/
#define YYGOTO(lb) {yy_gotostate=lb;continue;}
#define YYBEGINGOTO  enum yy_labels yy_gotostate=yygotostart; \
                     for(;;) switch(yy_gotostate) { case yygotostart: {
#define YYLABEL(lb) } case lb: {
#define YYENDGOTO } } 
#define YYBEGINDECLARELABEL enum yy_labels {yygotostart
#define YYDECLARELABEL(lb) ,lb
#define YYENDDECLARELABEL  }
#else
/* macro to keep goto */
#define YYGOTO(lb) goto lb
#define YYBEGINGOTO 
#define YYLABEL(lb) lb:
#define YYENDGOTO
#define YYBEGINDECLARELABEL 
#define YYDECLARELABEL(lb)
#define YYENDDECLARELABEL  
#endif
/* LABEL DECLARATION */
YYBEGINDECLARELABEL
  YYDECLARELABEL(yynewstate)
  YYDECLARELABEL(yybackup)
/* YYDECLARELABEL(yyresume) */
  YYDECLARELABEL(yydefault)
  YYDECLARELABEL(yyreduce)
  YYDECLARELABEL(yyerrlab)   /* here on detecting error */
  YYDECLARELABEL(yyerrlab1)   /* here on error raised explicitly by an action */
  YYDECLARELABEL(yyerrdefault)  /* current state does not do anything special for the error token. */
  YYDECLARELABEL(yyerrpop)   /* pop the current state because it cannot handle the error token */
  YYDECLARELABEL(yyerrhandle)  
YYENDDECLARELABEL
/* ALLOCA SIMULATION */
/* __HAVE_NO_ALLOCA */
#ifdef __HAVE_NO_ALLOCA
int __alloca_free_ptr(char *ptr,char *ref)
{if(ptr!=ref) free(ptr);
 return 0;}

#define __ALLOCA_alloca(size) malloc(size)
#define __ALLOCA_free(ptr,ref) __alloca_free_ptr((char *)ptr,(char *)ref)

#ifdef YY_ClntParser_LSP_NEEDED
#define __ALLOCA_return(num) \
            do { return( __ALLOCA_free(yyss,yyssa)+\
		    __ALLOCA_free(yyvs,yyvsa)+\
		    __ALLOCA_free(yyls,yylsa)+\
		   (num)); } while(0)
#else
#define __ALLOCA_return(num) \
            do { return( __ALLOCA_free(yyss,yyssa)+\
		    __ALLOCA_free(yyvs,yyvsa)+\
		   (num)); } while(0)
#endif
#else
#define __ALLOCA_return(num) do { return(num); } while(0)
#define __ALLOCA_alloca(size) alloca(size)
#define __ALLOCA_free(ptr,ref) 
#endif

/* ENDALLOCA SIMULATION */

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

#define YYTERROR        1
#define YYERRCODE       256

#ifndef YY_ClntParser_PURE
/* UNPURE */
#define YYLEX           YY_ClntParser_LEX()
#ifndef YY_USE_CLASS
/* If nonreentrant, and not class , generate the variables here */
int     YY_ClntParser_CHAR;                      /*  the lookahead symbol        */
YY_ClntParser_STYPE      YY_ClntParser_LVAL;              /*  the semantic value of the */
				/*  lookahead symbol    */
int YY_ClntParser_NERRS;                 /*  number of parse errors so far */
#ifdef YY_ClntParser_LSP_NEEDED
YY_ClntParser_LTYPE YY_ClntParser_LLOC;   /*  location data for the lookahead     */
			/*  symbol                              */
#endif
#endif


#else
/* PURE */
#ifdef YY_ClntParser_LSP_NEEDED
#define YYLEX           YY_ClntParser_LEX(&YY_ClntParser_LVAL, &YY_ClntParser_LLOC)
#else
#define YYLEX           YY_ClntParser_LEX(&YY_ClntParser_LVAL)
#endif
#endif
#ifndef YY_USE_CLASS
#if YY_ClntParser_DEBUG != 0
int YY_ClntParser_DEBUG_FLAG;                    /*  nonzero means print parse trace     */
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif
#endif



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

#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif

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

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif


#if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
#define __yy_bcopy(FROM,TO,COUNT)       __builtin_memcpy(TO,FROM,COUNT)
#else                           /* not GNU C or C++ */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */

#ifdef __cplusplus
static void __yy_bcopy (char *from, char *to, int count)
#else
#ifdef __STDC__
static void __yy_bcopy (char *from, char *to, int count)
#else
static void __yy_bcopy (from, to, count)
     char *from;
     char *to;
     int count;
#endif
#endif
{
  register char *f = from;
  register char *t = to;
  register int i = count;

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


int
#ifdef YY_USE_CLASS
 YY_ClntParser_CLASS::
#endif
     YY_ClntParser_PARSE(YY_ClntParser_PARSE_PARAM)
#ifndef __STDC__
#ifndef __cplusplus
#ifndef YY_USE_CLASS
/* parameter definition without protypes */
YY_ClntParser_PARSE_PARAM_DEF
#endif
#endif
#endif
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YY_ClntParser_STYPE *yyvsp;
  int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
  int yychar1=0;          /*  lookahead token as an internal (translated) token number */

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

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

#ifdef YY_ClntParser_LSP_NEEDED
  YY_ClntParser_LTYPE yylsa[YYINITDEPTH];        /*  the location stack                  */
  YY_ClntParser_LTYPE *yyls = yylsa;
  YY_ClntParser_LTYPE *yylsp;

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

  int yystacksize = YYINITDEPTH;

#ifdef YY_ClntParser_PURE
  int YY_ClntParser_CHAR;
  YY_ClntParser_STYPE YY_ClntParser_LVAL;
  int YY_ClntParser_NERRS;
#ifdef YY_ClntParser_LSP_NEEDED
  YY_ClntParser_LTYPE YY_ClntParser_LLOC;
#endif
#endif

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

  int yylen;
/* start loop, in which YYGOTO may be used. */
YYBEGINGOTO

#if YY_ClntParser_DEBUG != 0
  if (YY_ClntParser_DEBUG_FLAG)
    fprintf(stderr, "Starting parse\n");
#endif
  yystate = 0;
  yyerrstatus = 0;
  YY_ClntParser_NERRS = 0;
  YY_ClntParser_CHAR = YYEMPTY;          /* Cause a token to be read.  */

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

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

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

  *++yyssp = yystate;

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

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

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

      yyss = yyss1; yyvs = yyvs1;
#ifdef YY_ClntParser_LSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	    YY_ClntParser_ERROR(((char*)"parser stack overflow"));
	  __ALLOCA_return(2);
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
      yyss = (short *) __ALLOCA_alloca (yystacksize * sizeof (*yyssp));
      __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
      __ALLOCA_free(yyss1,yyssa);
      yyvs = (YY_ClntParser_STYPE *) __ALLOCA_alloca (yystacksize * sizeof (*yyvsp));
      __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
      __ALLOCA_free(yyvs1,yyvsa);
#ifdef YY_ClntParser_LSP_NEEDED
      yyls = (YY_ClntParser_LTYPE *) __ALLOCA_alloca (yystacksize * sizeof (*yylsp));
      __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
      __ALLOCA_free(yyls1,yylsa);
#endif
#endif /* no yyoverflow */

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

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

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

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

  YYGOTO(yybackup);
YYLABEL(yybackup)

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

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

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

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

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

  if (YY_ClntParser_CHAR == YYEMPTY)
    {
#if YY_ClntParser_DEBUG != 0
      if (YY_ClntParser_DEBUG_FLAG)
	fprintf(stderr, "Reading a token: ");
#endif
      YY_ClntParser_CHAR = YYLEX;
    }

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

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

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

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

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

  yyn = yytable[yyn];

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

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

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YY_ClntParser_DEBUG != 0
  if (YY_ClntParser_DEBUG_FLAG)
    fprintf(stderr, "Shifting token %d (%s), ", YY_ClntParser_CHAR, yytname[yychar1]);
#endif

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

  *++yyvsp = YY_ClntParser_LVAL;
#ifdef YY_ClntParser_LSP_NEEDED
  *++yylsp = YY_ClntParser_LLOC;
#endif

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

  yystate = yyn;
  YYGOTO(yynewstate);

/* Do the default action for the current state.  */
YYLABEL(yydefault)

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

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

#if YY_ClntParser_DEBUG != 0
  if (YY_ClntParser_DEBUG_FLAG)
    {
      int i;

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

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


 #line 839 "../bison++/bison.cc"

  switch (yyn) {

case 46:
#line 191 "ClntParser.y"
{
    CheckIsIface(string(yyvsp[-1].strval)); //If no - everything is ok
    StartIfaceDeclaration();
;
    break;}
case 47:
#line 196 "ClntParser.y"
{
    //Information about new interface has been read
    //Add it to list of read interfaces
    ClntCfgIfaceLst.append(new TClntCfgIface(yyvsp[-4].strval));
    delete [] yyvsp[-4].strval;
    if (!EndIfaceDeclaration())
	YYABORT;
;
    break;}
case 48:
#line 209 "ClntParser.y"
{
    CheckIsIface(yyvsp[-1].ival);   //If no - everything is ok
    StartIfaceDeclaration();
;
    break;}
case 49:
#line 214 "ClntParser.y"
{
    ClntCfgIfaceLst.append(new TClntCfgIface(yyvsp[-4].ival) );
    if (!EndIfaceDeclaration())
	YYABORT;
;
    break;}
case 50:
#line 224 "ClntParser.y"
{
    CheckIsIface(string(yyvsp[-2].strval));
    ClntCfgIfaceLst.append(new TClntCfgIface(yyvsp[-2].strval));
    delete [] yyvsp[-2].strval;
    EmptyIface();
;
    break;}
case 51:
#line 235 "ClntParser.y"
{
    CheckIsIface(yyvsp[-2].ival);
    ClntCfgIfaceLst.append(new TClntCfgIface(yyvsp[-2].ival));
    EmptyIface();
;
    break;}
case 52:
#line 245 "ClntParser.y"
{
    CheckIsIface(string(yyvsp[-1].strval));
    ClntCfgIfaceLst.append(new TClntCfgIface(yyvsp[-1].strval));
    ClntCfgIfaceLst.getLast()->setOptions(ParserOptStack.getLast());
    ClntCfgIfaceLst.getLast()->setNoConfig();
    delete yyvsp[-1].strval;
;
    break;}
case 53:
#line 257 "ClntParser.y"
{
    CheckIsIface(yyvsp[-1].ival);
    ClntCfgIfaceLst.append(SmartPtr<TClntCfgIface> (new TClntCfgIface(yyvsp[-1].ival)) );
    ClntCfgIfaceLst.getLast()->setOptions(ParserOptStack.getLast());
    ClntCfgIfaceLst.getLast()->setNoConfig();
;
    break;}
case 62:
#line 284 "ClntParser.y"
{ 
    //Log(Crit) << "TA without params." << LogEnd;
    this->ClntCfgTALst.append( new TClntCfgTA() ); // append new TA
;
    break;}
case 63:
#line 289 "ClntParser.y"
{
    //Log(Crit) << "TA with params started." << LogEnd;
    this->ClntCfgTALst.append( new TClntCfgTA() ); // append new TA
    this->iaidSet = false;
;
    break;}
case 64:
#line 295 "ClntParser.y"
{
    if (this->iaidSet)
	this->ClntCfgTALst.getLast()->setIAID(this->iaid);
    //Log(Crit) << "TA with params ended." << LogEnd;
;
    break;}
case 66:
#line 302 "ClntParser.y"
{
    //Log(Crit) << "TA without params." << LogEnd;
    this->ClntCfgTALst.append( new TClntCfgTA() ); // append new TA
;
    break;}
case 69:
#line 315 "ClntParser.y"
{
    this->iaidSet = true;
    this->iaid = yyvsp[0].ival;
    Log(Crit) << "IAID=" << this->iaid << " parsed." << LogEnd;
;
    break;}
case 70:
#line 327 "ClntParser.y"
{ 
    StartIADeclaration(false);
;
    break;}
case 71:
#line 331 "ClntParser.y"
{
    EndIADeclaration();
;
    break;}
case 72:
#line 339 "ClntParser.y"
{
    StartIADeclaration(true);
    EndIADeclaration();
;
    break;}
case 73:
#line 348 "ClntParser.y"
{
    StartIADeclaration(true);
    EndIADeclaration();
;
    break;}
case 78:
#line 363 "ClntParser.y"
{
    SmartPtr<TClntParsGlobalOpt> globalOpt = ParserOptStack.getLast();
    SmartPtr<TClntParsGlobalOpt> newOpt = new TClntParsGlobalOpt(*globalOpt);
    ParserOptStack.append(newOpt);
;
    break;}
case 79:
#line 369 "ClntParser.y"
{
    //ClntCfgAddrLst.append(SmartPtr<TClntCfgAddr> (new TClntCfgAddr()));
    //set proper options specific for this Address
    //ClntCfgAddrLst.getLast()->setOptions(&(*ParserOptStack.getLast()));
    if (ParserOptStack.count())
	ParserOptStack.delLast();
;
    break;}
case 80:
#line 378 "ClntParser.y"
{
    ParserOptStack.append(new TClntParsGlobalOpt(*ParserOptStack.getLast()));
    ParserOptStack.getLast()->setAddrHint(false);
;
    break;}
case 81:
#line 383 "ClntParser.y"
{
    for (int i=0;i<yyvsp[-4].ival; i++) EmptyAddr();
    ParserOptStack.delLast();
;
    break;}
case 82:
#line 389 "ClntParser.y"
{
    for (int i=0;i<yyvsp[-2].ival; i++) EmptyAddr();
;
    break;}
case 83:
#line 394 "ClntParser.y"
{
    EmptyAddr();
;
    break;}
case 84:
#line 399 "ClntParser.y"
{
    for (int i=0;i<yyvsp[0].ival; i++) EmptyAddr();
;
    break;}
case 85:
#line 404 "ClntParser.y"
{
    EmptyAddr();
;
    break;}
case 88:
#line 413 "ClntParser.y"
{
    if (ParserOptStack.getLast()->getAddrHint())
    {
        ClntCfgAddrLst.append(new TClntCfgAddr(new TIPv6Addr(yyvsp[0].addrval)));
        ClntCfgAddrLst.getLast()->setOptions(ParserOptStack.getLast());
    }
    else
	YYABORT;  //this is aggregated version of IA
;
    break;}
case 89:
#line 423 "ClntParser.y"
{
    if (ParserOptStack.getLast()->getAddrHint())
    {
	ClntCfgAddrLst.append(new TClntCfgAddr(new TIPv6Addr(yyvsp[0].addrval)));
	ClntCfgAddrLst.getLast()->setOptions(ParserOptStack.getLast());
    }
    else
	YYABORT; //here is agregated version of IA
;
    break;}
case 92:
#line 441 "ClntParser.y"
{
    if ( (yyvsp[0].ival<1) || (yyvsp[0].ival>8) ) {
	Log(Crit) << "Invalid loglevel specified: " << yyvsp[0].ival << ". Allowed range: 1-8." << LogEnd;
    }
    logger::setLogLevel(yyvsp[0].ival);
;
    break;}
case 93:
#line 450 "ClntParser.y"
{
    logger::setLogMode(yyvsp[0].strval);
;
    break;}
case 94:
#line 455 "ClntParser.y"
{
    logger::setLogName(yyvsp[0].strval);
;
    break;}
case 95:
#line 460 "ClntParser.y"
{ this->DUIDType  = DUID_TYPE_LLT;;
    break;}
case 96:
#line 461 "ClntParser.y"
{ this->DUIDType  = DUID_TYPE_LL; ;
    break;}
case 97:
#line 462 "ClntParser.y"
{ 
  this->DUIDType       = DUID_TYPE_EN; 
  this->DUIDEnterpriseNumber = yyvsp[-1].ival;
  this->DUIDEnterpriseID     = new TDUID(yyvsp[0].duidval.duid, yyvsp[0].duidval.length); 
;
    break;}
case 98:
#line 471 "ClntParser.y"
{
    ParserOptStack.getLast()->setIsIAs(false);
;
    break;}
case 99:
#line 478 "ClntParser.y"
{
    ParserOptStack.getLast()->setWorkDir(yyvsp[0].strval);
;
    break;}
case 100:
#line 485 "ClntParser.y"
{
    Log(Notice) << "Strict-rfc-no-routing directive set: addresses will be added with 128 prefix." << LogEnd;
    ParserOptStack.getLast()->setPrefixLength(128);
    // by default prefix is set to 128
;
    break;}
case 101:
#line 494 "ClntParser.y"
{
    ParserOptStack.getLast()->setScriptsDir(yyvsp[0].strval);
;
    break;}
case 102:
#line 499 "ClntParser.y"
{ ParserOptStack.getLast()->setAuthEnabled(yyvsp[0].ival); ;
    break;}
case 103:
#line 503 "ClntParser.y"
{
    DigestLst.clear();
;
    break;}
case 104:
#line 505 "ClntParser.y"
{ 
    ParserOptStack.getLast()->setAuthAcceptMethods(DigestLst); 
;
    break;}
case 107:
#line 515 "ClntParser.y"
{ SmartPtr<DigestTypes> dt = new DigestTypes; *dt = DIGEST_HMAC_MD5; DigestLst.append(dt); ;
    break;}
case 108:
#line 516 "ClntParser.y"
{ SmartPtr<DigestTypes> dt = new DigestTypes; *dt = DIGEST_HMAC_SHA1; DigestLst.append(dt); ;
    break;}
case 109:
#line 517 "ClntParser.y"
{ SmartPtr<DigestTypes> dt = new DigestTypes; *dt = DIGEST_HMAC_SHA224; DigestLst.append(dt); ;
    break;}
case 110:
#line 518 "ClntParser.y"
{ SmartPtr<DigestTypes> dt = new DigestTypes; *dt = DIGEST_HMAC_SHA256; DigestLst.append(dt); ;
    break;}
case 111:
#line 519 "ClntParser.y"
{ SmartPtr<DigestTypes> dt = new DigestTypes; *dt = DIGEST_HMAC_SHA384; DigestLst.append(dt); ;
    break;}
case 112:
#line 520 "ClntParser.y"
{ SmartPtr<DigestTypes> dt = new DigestTypes; *dt = DIGEST_HMAC_SHA512; DigestLst.append(dt); ;
    break;}
case 113:
#line 525 "ClntParser.y"
{
    ParserOptStack.getLast()->setAnonInfRequest(true);
;
    break;}
case 114:
#line 531 "ClntParser.y"
{
    ParserOptStack.getLast()->setInactiveMode(true);
;
    break;}
case 115:
#line 537 "ClntParser.y"
{
    ParserOptStack.getLast()->setInsistMode(true);
;
    break;}
case 116:
#line 543 "ClntParser.y"
{
    Log(Crit) << "Experimental features are allowed." << LogEnd;
    ParserOptStack.getLast()->setExperimental();
;
    break;}
case 117:
#line 550 "ClntParser.y"
{
    if (!ParserOptStack.getLast()->getExperimental()) {
	Log(Crit) << "Experimental 'mapping-prefix' defined, but experimental features are disabled."
		  << "Add 'experimental' in global section of client.conf to enable it." << LogEnd;
	YYABORT;
    }
    ParserOptStack.getLast()->setMappingPrefix(true);
;
    break;}
case 118:
#line 562 "ClntParser.y"
{
    //ParserOptStack.getLast()->clearRejedSrv();
    PresentStationLst.clear();
;
    break;}
case 119:
#line 566 "ClntParser.y"
{
    ParserOptStack.getLast()->setRejedSrvLst(&PresentStationLst);
;
    break;}
case 120:
#line 573 "ClntParser.y"
{
    PresentStationLst.clear();
;
    break;}
case 121:
#line 575 "ClntParser.y"
{
    ParserOptStack.getLast()->setPrefSrvLst(&PresentStationLst);
;
    break;}
case 122:
#line 583 "ClntParser.y"
{
    ParserOptStack.getLast()->setPref(yyvsp[0].ival);
;
    break;}
case 123:
#line 590 "ClntParser.y"
{ 
    ParserOptStack.getLast()->setRapidCommit(yyvsp[0].ival);
;
    break;}
case 124:
#line 597 "ClntParser.y"
{
    if (!ParserOptStack.getLast()->getExperimental()) {
	Log(Crit) << "Experimental 'addr-params' defined, but experimental features are disabled."
		  << "Add 'experimental' in global section of client.conf to enable it." << LogEnd;
	YYABORT;
    }
    ParserOptStack.getLast()->setAddrParams(true);
;
    break;}
case 125:
#line 608 "ClntParser.y"
{
    ParserOptStack.getLast()->setValid(yyvsp[0].ival);
;
    break;}
case 126:
#line 615 "ClntParser.y"
{
    ParserOptStack.getLast()->setT1(yyvsp[0].ival);
;
    break;}
case 127:
#line 622 "ClntParser.y"
{
    ParserOptStack.getLast()->setT2(yyvsp[0].ival);
;
    break;}
case 128:
#line 629 "ClntParser.y"
{
    Log(Debug) << "Prefix delegation option found." << LogEnd;
    StartPDDeclaration();
    EndPDDeclaration();
;
    break;}
case 129:
#line 635 "ClntParser.y"
{
    Log(Debug) << "Prefix delegation option found." << LogEnd;
    StartPDDeclaration();
    EndPDDeclaration();
;
    break;}
case 130:
#line 641 "ClntParser.y"
{
    StartPDDeclaration();
;
    break;}
case 131:
#line 645 "ClntParser.y"
{
    EndPDDeclaration();
;
    break;}
case 136:
#line 662 "ClntParser.y"
{
    switch(yyvsp[0].ival) {
    case 0:
	ParserOptStack.getLast()->setUnicast(false);
	break;
    case 1:
	ParserOptStack.getLast()->setUnicast(true);
	break;
    default:
	Log(Error) << "Invalid parameter (" << yyvsp[0].ival << ") passed to unicast in line " 
		   << lex->YYText() << "." << LogEnd;
	return 1;
    }
;
    break;}
case 137:
#line 680 "ClntParser.y"
{
    PresentStationLst.append(SmartPtr<TStationID> (new TStationID(new TIPv6Addr(yyvsp[0].addrval))));
;
    break;}
case 138:
#line 684 "ClntParser.y"
{
    PresentStationLst.append(SmartPtr<TStationID> (new TStationID(new TDUID(yyvsp[0].duidval.duid,yyvsp[0].duidval.length))));
;
    break;}
case 139:
#line 688 "ClntParser.y"
{
    PresentStationLst.append(SmartPtr<TStationID> (new TStationID(new TIPv6Addr(yyvsp[0].addrval))));
;
    break;}
case 140:
#line 692 "ClntParser.y"
{
    PresentStationLst.append(SmartPtr<TStationID> (new TStationID( new TDUID(yyvsp[0].duidval.duid,yyvsp[0].duidval.length))));
;
    break;}
case 141:
#line 698 "ClntParser.y"
{PresentAddrLst.append(SmartPtr<TIPv6Addr> (new TIPv6Addr(yyvsp[0].addrval)));;
    break;}
case 142:
#line 699 "ClntParser.y"
{PresentAddrLst.append(SmartPtr<TIPv6Addr> (new TIPv6Addr(yyvsp[0].addrval)));;
    break;}
case 143:
#line 703 "ClntParser.y"
{ PresentStringLst.append(SmartPtr<string> (new string(yyvsp[0].strval))); ;
    break;}
case 144:
#line 704 "ClntParser.y"
{ PresentStringLst.append(SmartPtr<string> (new string(yyvsp[0].strval))); ;
    break;}
case 145:
#line 707 "ClntParser.y"
{yyval.ival=yyvsp[0].ival;;
    break;}
case 146:
#line 708 "ClntParser.y"
{yyval.ival=yyvsp[0].ival;;
    break;}
case 147:
#line 716 "ClntParser.y"
{
    PresentAddrLst.clear();
//    PresentAddrLst.append(SmartPtr<TIPv6Addr> (new TIPv6Addr()));
    ParserOptStack.getLast()->setDNSServerLst(&PresentAddrLst);
;
    break;}
case 148:
#line 722 "ClntParser.y"
{
    PresentAddrLst.clear();
;
    break;}
case 149:
#line 725 "ClntParser.y"
{
    ParserOptStack.getLast()->setDNSServerLst(&PresentAddrLst);
;
    break;}
case 150:
#line 735 "ClntParser.y"
{
    PresentStringLst.clear();
    ParserOptStack.getLast()->setDomainLst(&PresentStringLst);
;
    break;}
case 151:
#line 739 "ClntParser.y"
{ 
    PresentStringLst.clear();
;
    break;}
case 152:
#line 742 "ClntParser.y"
{
    ParserOptStack.getLast()->setDomainLst(&PresentStringLst);
;
    break;}
case 153:
#line 752 "ClntParser.y"
{
    PresentAddrLst.clear();
//    PresentAddrLst.append(SmartPtr<TIPv6Addr> (new TIPv6Addr()));
    ParserOptStack.getLast()->setNTPServerLst(&PresentAddrLst);
;
    break;}
case 154:
#line 757 "ClntParser.y"
{
    PresentAddrLst.clear();
;
    break;}
case 155:
#line 760 "ClntParser.y"
{
    ParserOptStack.getLast()->setNTPServerLst(&PresentAddrLst);
;
    break;}
case 156:
#line 770 "ClntParser.y"
{
    ParserOptStack.getLast()->setTimezone(string(""));
  ;
    break;}
case 157:
#line 774 "ClntParser.y"
{
    ParserOptStack.getLast()->setTimezone(yyvsp[0].strval);
;
    break;}
case 158:
#line 784 "ClntParser.y"
{
    PresentAddrLst.clear();
//    PresentAddrLst.append(SmartPtr<TIPv6Addr> (new TIPv6Addr()));
    ParserOptStack.getLast()->setSIPServerLst(&PresentAddrLst);
;
    break;}
case 159:
#line 789 "ClntParser.y"
{
    PresentAddrLst.clear();
;
    break;}
case 160:
#line 792 "ClntParser.y"
{
    ParserOptStack.getLast()->setSIPServerLst(&PresentAddrLst);
;
    break;}
case 161:
#line 802 "ClntParser.y"
{
    PresentStringLst.clear();
    ParserOptStack.getLast()->setSIPDomainLst(&PresentStringLst);
;
    break;}
case 162:
#line 806 "ClntParser.y"
{
    PresentStringLst.clear();
;
    break;}
case 163:
#line 809 "ClntParser.y"
{
    ParserOptStack.getLast()->setSIPDomainLst(&PresentStringLst);
;
    break;}
case 164:
#line 819 "ClntParser.y"
{
    ParserOptStack.getLast()->setFQDN(string(""));
;
    break;}
case 165:
#line 823 "ClntParser.y"
{
    ParserOptStack.getLast()->setFQDN(yyvsp[0].strval);
;
    break;}
case 166:
#line 830 "ClntParser.y"
{
    if (yyvsp[0].ival!=0 && yyvsp[0].ival!=1) {
	Log(Crit) << "Invalid FQDN S bit value: " << yyvsp[0].ival << ", expected 0 or 1." << LogEnd;
	YYABORT;
    }

    Log(Info) << "Setting FQDN S bit to " << yyvsp[0].ival << LogEnd;
    ParserOptStack.getLast()->setFQDNFlagS(yyvsp[0].ival);
;
    break;}
case 167:
#line 845 "ClntParser.y"
{
    PresentAddrLst.clear();
//    PresentAddrLst.append(SmartPtr<TIPv6Addr> (new TIPv6Addr()));
    ParserOptStack.getLast()->setNISServerLst(&PresentAddrLst);
;
    break;}
case 168:
#line 850 "ClntParser.y"
{
    PresentAddrLst.clear();
;
    break;}
case 169:
#line 853 "ClntParser.y"
{
    ParserOptStack.getLast()->setNISServerLst(&PresentAddrLst);
;
    break;}
case 170:
#line 863 "ClntParser.y"
{
    PresentAddrLst.clear();
//    PresentAddrLst.append(SmartPtr<TIPv6Addr> (new TIPv6Addr()));
    ParserOptStack.getLast()->setNISPServerLst(&PresentAddrLst);
;
    break;}
case 171:
#line 868 "ClntParser.y"
{
    PresentAddrLst.clear();
;
    break;}
case 172:
#line 871 "ClntParser.y"
{
    ParserOptStack.getLast()->setNISPServerLst(&PresentAddrLst);
;
    break;}
case 173:
#line 881 "ClntParser.y"
{
    ParserOptStack.getLast()->setNISDomain("");
;
    break;}
case 174:
#line 885 "ClntParser.y"
{
    ParserOptStack.getLast()->setNISDomain(yyvsp[0].strval);
;
    break;}
case 175:
#line 896 "ClntParser.y"
{
    ParserOptStack.getLast()->setNISPDomain("");
;
    break;}
case 176:
#line 900 "ClntParser.y"
{
    ParserOptStack.getLast()->setNISPDomain(yyvsp[0].strval);
;
    break;}
case 177:
#line 910 "ClntParser.y"
{
    ParserOptStack.getLast()->setLifetime();
;
    break;}
case 178:
#line 917 "ClntParser.y"
{
    Log(Debug) << "VendorSpec defined (no details)." << LogEnd;
    ParserOptStack.getLast()->setVendorSpec();
    this->VendorSpec.clear();
;
    break;}
case 179:
#line 923 "ClntParser.y"
{
    Log(Debug) << "VendorSpec defined (enterprise=" << yyvsp[-1].ival << ", hint data length=" << yyvsp[0].duidval.length << ")." << LogEnd;
    ParserOptStack.getLast()->setVendorSpec();
    this->VendorSpec.append(new TClntOptVendorSpec(yyvsp[-1].ival, yyvsp[0].duidval.duid, yyvsp[0].duidval.length, 0));
;
    break;}
case 180:
#line 929 "ClntParser.y"
{
    ParserOptStack.getLast()->setVendorSpec();
    Log(Debug) << "VendorSpec defined (multiple times)." << LogEnd;
;
    break;}
case 181:
#line 936 "ClntParser.y"
{ VendorSpec.append( new TClntOptVendorSpec(yyvsp[0].ival,0,0,0) ); ;
    break;}
case 182:
#line 937 "ClntParser.y"
{ VendorSpec.append( new TClntOptVendorSpec(yyvsp[0].ival,0,0,0) ); ;
    break;}
}

#line 839 "../bison++/bison.cc"
   /* the action file gets copied in in place of this dollarsign  */
  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YY_ClntParser_LSP_NEEDED
  yylsp -= yylen;
#endif

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

  *++yyvsp = yyval;

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

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

  yyn = yyr1[yyn];

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

  YYGOTO(yynewstate);

YYLABEL(yyerrlab)   /* here on detecting error */

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

#ifdef YY_ClntParser_ERROR_VERBOSE
      yyn = yypact[yystate];

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

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

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

  YYGOTO(yyerrlab1);
YYLABEL(yyerrlab1)   /* here on error raised explicitly by an action */

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

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

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

      YY_ClntParser_CHAR = YYEMPTY;
    }

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

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

  YYGOTO(yyerrhandle);

YYLABEL(yyerrdefault)  /* current state does not do anything special for the error token. */

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

YYLABEL(yyerrpop)   /* pop the current state because it cannot handle the error token */

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

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

YYLABEL(yyerrhandle)

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

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

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

  if (yyn == YYFINAL)
    YYACCEPT;

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

  *++yyvsp = YY_ClntParser_LVAL;
#ifdef YY_ClntParser_LSP_NEEDED
  *++yylsp = YY_ClntParser_LLOC;
#endif

  yystate = yyn;
  YYGOTO(yynewstate);
/* end loop, in which YYGOTO may be used. */
  YYENDGOTO
}

/* END */

 #line 1038 "../bison++/bison.cc"
#line 941 "ClntParser.y"


/////////////////////////////////////////////////////////////////////////////
// programs section
/////////////////////////////////////////////////////////////////////////////

//
/** 
 * method check whether interface with id=ifaceNr has been 
 * already declared. YYABORT macro is called to abort parsing.
 * 
 * @param ifaceNr 
 * 
 * @return true if not declared.
 */
bool ClntParser::CheckIsIface(int ifaceNr)
{
  SmartPtr<TClntCfgIface> ptr;
  ClntCfgIfaceLst.first();
  while (ptr=ClntCfgIfaceLst.get())
    if ((ptr->getID())==ifaceNr) YYABORT;
  return true;
}
    
//method check whether interface with id=ifaceName has been
//already declared 
bool ClntParser::CheckIsIface(string ifaceName)
{
  SmartPtr<TClntCfgIface> ptr;
  ClntCfgIfaceLst.first();
  while (ptr=ClntCfgIfaceLst.get())
  {
    string presName=ptr->getName();
    if (presName==ifaceName) YYABORT;
  };
  return true;
}

/** 
 * creates new scope appropriately for interface options and declarations
 * clears all lists except the list of interfaces and adds new group
 */
void ClntParser::StartIfaceDeclaration()
{
  //Interface scope, so parameters associated with global scope are pushed on stack
  ParserOptStack.append(new TClntParsGlobalOpt(*ParserOptStack.getLast()));
  ClntCfgIALst.clear();
  ClntCfgAddrLst.clear();
  this->VendorSpec.clear();
}

bool ClntParser::EndIfaceDeclaration()
{
    SmartPtr<TClntCfgIface> iface = ClntCfgIfaceLst.getLast();
    if (!iface) {
	Log(Crit) << "Internal error: Interface not found. Something is wrong. Very wrong." << LogEnd;
	return false;
    }

    // set interface options on the basis of just read information
    // preferred-server and rejected-servers are also copied here
    if (VendorSpec.count())
	ParserOptStack.getLast()->setVendorSpec(VendorSpec);
    iface->setOptions(ParserOptStack.getLast());
    iface->setPrefixLength(ParserOptStack.getLast()->getPrefixLength());

    if ( (iface->stateless()) && (ClntCfgIALst.count()) ) {
	Log(Crit) << "Interface " << iface->getFullName() << " is configured stateless, "
	    " but has " << ClntCfgIALst.count() << " IA(s) defined." << LogEnd;
	return false;
    }

    if ( (iface->stateless()) && (ClntCfgTALst.count()) ) {
	Log(Crit) << "Interface " << iface->getFullName() << " is configured stateless, "
	    " but has TA defined." << LogEnd;
	return false;
    }

    // add all IAs to the interface
    SmartPtr<TClntCfgIA> ia;
    ClntCfgIALst.first();
    while (ia=ClntCfgIALst.get()) {
	ClntCfgIfaceLst.getLast()->addIA(ia);
    }
    
    //add all TAs to the interface
    SmartPtr<TClntCfgTA> ptrTA;
    ClntCfgTALst.first();
    while ( ptrTA = ClntCfgTALst.get() ) {
	iface->addTA(ptrTA);
    }

    //add all PDs to the interface
    SPtr<TClntCfgPD> pd;
    ClntCfgPDLst.first();
    while (pd = ClntCfgPDLst.get() ) {
	iface->addPD(pd);
    }

    //restore global options
    ParserOptStack.delLast();
    ClntCfgIALst.clear();
    return true;
}   

void ClntParser::EmptyIface()
{
    //set iface options on the basis of recent information
    ClntCfgIfaceLst.getLast()->setOptions(ParserOptStack.getLast());
    //add one IA with one address to this iface
    EmptyIA();
    ClntCfgIALst.getLast()->setOptions(ParserOptStack.getLast());
    ClntCfgIfaceLst.getLast()->addIA(ClntCfgIALst.getLast());
}

/** 
 * method creates new scope appropriately for interface options and declarations
 * clears list of addresses
 * 
 * @param aggregation - does this IA contains suboptions ( ia { ... } )
 */
void ClntParser::StartIADeclaration(bool aggregation)
{
  ParserOptStack.append(new TClntParsGlobalOpt(*ParserOptStack.getLast()));
  ParserOptStack.getLast()->setAddrHint(!aggregation);
  ClntCfgAddrLst.clear();
}

/** 
 * Inbelivable piece of crap code. If you read this, rewrite this code immediately.
 * 
 */
void ClntParser::EndIADeclaration()
{
    if(!ClntCfgAddrLst.count()) {
	EmptyIA();
    } else {
	SmartPtr<TClntCfgIA> ia = new TClntCfgIA();
	ClntCfgIALst.append(ia);
	SmartPtr<TClntCfgAddr> ptr;
	ClntCfgAddrLst.first();
	while(ptr=ClntCfgAddrLst.get())
	    ia->addAddr(ptr);
    }

    //set proper options specific for this IA
    ClntCfgIALst.getLast()->setOptions(ParserOptStack.getLast());

    ClntCfgAddrLst.clear();
    ParserOptStack.delLast();

    //this IA matches with previous ones and can be grouped with them
    //so it's should be left on the list and be appended with them to present list
}

void ClntParser::StartPDDeclaration()
{
  ParserOptStack.append(new TClntParsGlobalOpt(*ParserOptStack.getLast()));
  ClntCfgAddrLst.clear();
}

bool ClntParser::EndPDDeclaration()
{
    SPtr<TClntCfgPD> pd = new TClntCfgPD();
    pd->setOptions(ParserOptStack.getLast());
    ClntCfgPDLst.append(pd);
    ParserOptStack.delLast();
    return true;
}

/** 
 * method adds 1 IA object (containing 1 address) to the ClntCfgIA list.
 * Both objects' properties are set to last parsed values
 * 
 */void ClntParser::EmptyIA()
{
    EmptyAddr();
    ClntCfgIALst.append(new TClntCfgIA());
    ClntCfgIALst.getLast()->setOptions(ParserOptStack.getLast());
    //ClntCfgIALst.getLast()->addAddr(ClntCfgAddrLst.getLast());
}   

/** 
 * method adds empty address to the ClntCfgAddrList list and sets
 * its properties to last parsed values
 * 
 */
void ClntParser::EmptyAddr()
{
    ClntCfgAddrLst.append(new TClntCfgAddr());
    ClntCfgAddrLst.getLast()->setOptions(ParserOptStack.getLast());
}   


int ClntParser::yylex()
{
    memset(&std::yylval,0, sizeof(std::yylval));
    memset(&this->yylval,0, sizeof(this->yylval));
    int x = this->lex->yylex();
    this->yylval=std::yylval;
    return x;
}

/** 
 * This method is called when parsing error is detected.
 * 
 * @param m - first invalid character
 */
void ClntParser::yyerror(char *m)
{
    Log(Crit) << "Config parse error: line " << lex->lineno() 
	      << ", unexpected [" << lex->YYText() << "] token." << LogEnd;
}

/** 
 * Desctructor. Just cleans things up
 * 
 */

ClntParser::~ClntParser() {
    this->ClntCfgIfaceLst.clear();
    this->ClntCfgIALst.clear();
    this->ClntCfgTALst.clear();
    this->ClntCfgAddrLst.clear();
}
