00001 #ifndef YY_clntParser_h_included
00002 #define YY_clntParser_h_included
00003 #define YY_USE_CLASS
00004
00005 #line 1 "../bison++/bison.h"
00006
00007 #ifdef c_plusplus
00008 #ifndef __cplusplus
00009 #define __cplusplus
00010 #endif
00011 #endif
00012
00013
00014 #line 8 "../bison++/bison.h"
00015 #line 3 "ClntParser.y"
00016
00017 #include <iostream>
00018 #include <string>
00019 #include <malloc.h>
00020 #include "DHCPConst.h"
00021 #include "SmartPtr.h"
00022 #include "Container.h"
00023 #include "ClntParser.h"
00024 #include "ClntParsGlobalOpt.h"
00025 #include "ClntCfgIface.h"
00026 #include "ClntCfgAddr.h"
00027 #include "ClntCfgIA.h"
00028 #include "ClntCfgGroup.h"
00029 #include "Logger.h"
00030
00031 using namespace std;
00032
00033 #define YY_USE_CLASS
00034 #define YY_clntParser_MEMBERS yyFlexLexer * lex; \
00035 \
00036 TContainer<SmartPtr<TClntParsGlobalOpt> > ParserOptStack; \
00037 \
00038 \
00039 \
00040 TContainer<SmartPtr<TClntCfgIface> > ClntCfgIfaceLst; \
00041 TContainer<SmartPtr<TClntCfgGroup> > ClntCfgGroupLst; \
00042 TContainer<SmartPtr<TClntCfgIA> > ClntCfgIALst; \
00043 TContainer<SmartPtr<TClntCfgAddr> > ClntCfgAddrLst; \
00044 \
00045 \
00046 TContainer<SmartPtr<TStationID> > PresentStationLst; \
00047 TContainer<SmartPtr<TIPv6Addr> > PresentAddrLst; \
00048 TContainer<SmartPtr<string> > PresentStringLst; \
00049 \
00050 \
00051 bool CheckIsIface(int ifaceNr); \
00052 \
00053 bool CheckIsIface(string ifaceName); \
00054 void StartIfaceDeclaration(); \
00055 bool EndIfaceDeclaration(); \
00056 void EmptyIface(); \
00057 void StartIADeclaration(bool aggregation); \
00058 void EndIADeclaration(long iaCnt); \
00059 void EmptyIA(); \
00060 void EmptyAddr(); \
00061 virtual ~clntParser();
00062 #define YY_clntParser_CONSTRUCTOR_PARAM yyFlexLexer * lex
00063 #define YY_clntParser_CONSTRUCTOR_CODE \
00064 this->lex = lex; \
00065 ParserOptStack.append(new TClntParsGlobalOpt()); \
00066 ParserOptStack.getFirst()->setIAIDCnt(1); \
00067 ParserOptStack.getLast();
00068
00069 #line 65 "ClntParser.y"
00070 typedef union
00071 {
00072 int ival;
00073 char *strval;
00074 struct SDuid {
00075 int length;
00076 char* duid;
00077 } duidval;
00078 char addrval[16];
00079 } yy_clntParser_stype;
00080 #define YY_clntParser_STYPE yy_clntParser_stype
00081
00082 #line 21 "../bison++/bison.h"
00083
00084 #ifndef YY_clntParser_COMPATIBILITY
00085 #ifndef YY_USE_CLASS
00086 #define YY_clntParser_COMPATIBILITY 1
00087 #else
00088 #define YY_clntParser_COMPATIBILITY 0
00089 #endif
00090 #endif
00091
00092 #if YY_clntParser_COMPATIBILITY != 0
00093
00094 #ifdef YYLTYPE
00095 #ifndef YY_clntParser_LTYPE
00096 #define YY_clntParser_LTYPE YYLTYPE
00097
00098
00099 #endif
00100 #endif
00101
00102 #ifndef YY_clntParser_STYPE
00103 #define YY_clntParser_STYPE YYSTYPE
00104
00105
00106 #endif
00107
00108 #ifdef YYDEBUG
00109 #ifndef YY_clntParser_DEBUG
00110 #define YY_clntParser_DEBUG YYDEBUG
00111
00112
00113 #endif
00114 #endif
00115
00116 #ifndef YY_clntParser_USE_GOTO
00117 #define YY_clntParser_USE_GOTO 1
00118 #endif
00119 #endif
00120
00121
00122 #ifndef YY_clntParser_USE_GOTO
00123 #define YY_clntParser_USE_GOTO 0
00124 #endif
00125
00126 #ifndef YY_clntParser_PURE
00127
00128 #line 65 "../bison++/bison.h"
00129
00130 #line 65 "../bison++/bison.h"
00131
00132 #endif
00133
00134
00135 #line 68 "../bison++/bison.h"
00136
00137 #line 68 "../bison++/bison.h"
00138
00139
00140 #ifndef YY_clntParser_DEBUG
00141
00142 #line 71 "../bison++/bison.h"
00143
00144 #line 71 "../bison++/bison.h"
00145
00146 #endif
00147
00148 #ifndef YY_clntParser_LSP_NEEDED
00149
00150 #line 75 "../bison++/bison.h"
00151
00152 #line 75 "../bison++/bison.h"
00153
00154 #endif
00155
00156
00157 #ifdef YY_clntParser_LSP_NEEDED
00158 #ifndef YY_clntParser_LTYPE
00159 #ifndef BISON_YYLTYPE_ISDECLARED
00160 #define BISON_YYLTYPE_ISDECLARED
00161 typedef
00162 struct yyltype
00163 {
00164 int timestamp;
00165 int first_line;
00166 int first_column;
00167 int last_line;
00168 int last_column;
00169 char *text;
00170 }
00171 yyltype;
00172 #endif
00173
00174 #define YY_clntParser_LTYPE yyltype
00175 #endif
00176 #endif
00177
00178
00179 #ifndef YY_clntParser_STYPE
00180 #define YY_clntParser_STYPE int
00181 #endif
00182
00183
00184 #ifndef YY_clntParser_PARSE
00185 #define YY_clntParser_PARSE yyparse
00186 #endif
00187
00188 #ifndef YY_clntParser_LEX
00189 #define YY_clntParser_LEX yylex
00190 #endif
00191
00192 #ifndef YY_clntParser_LVAL
00193 #define YY_clntParser_LVAL yylval
00194 #endif
00195
00196 #ifndef YY_clntParser_LLOC
00197 #define YY_clntParser_LLOC yylloc
00198 #endif
00199
00200 #ifndef YY_clntParser_CHAR
00201 #define YY_clntParser_CHAR yychar
00202 #endif
00203
00204 #ifndef YY_clntParser_NERRS
00205 #define YY_clntParser_NERRS yynerrs
00206 #endif
00207
00208 #ifndef YY_clntParser_DEBUG_FLAG
00209 #define YY_clntParser_DEBUG_FLAG yydebug
00210 #endif
00211
00212 #ifndef YY_clntParser_ERROR
00213 #define YY_clntParser_ERROR yyerror
00214 #endif
00215
00216 #ifndef YY_clntParser_PARSE_PARAM
00217 #ifndef __STDC__
00218 #ifndef __cplusplus
00219 #ifndef YY_USE_CLASS
00220 #define YY_clntParser_PARSE_PARAM
00221 #ifndef YY_clntParser_PARSE_PARAM_DEF
00222 #define YY_clntParser_PARSE_PARAM_DEF
00223 #endif
00224 #endif
00225 #endif
00226 #endif
00227 #ifndef YY_clntParser_PARSE_PARAM
00228 #define YY_clntParser_PARSE_PARAM void
00229 #endif
00230 #endif
00231
00232
00233 #ifndef YY_USE_CLASS
00234
00235 #ifndef YY_clntParser_PURE
00236 #ifndef yylval
00237 extern YY_clntParser_STYPE YY_clntParser_LVAL;
00238 #else
00239 #if yylval != YY_clntParser_LVAL
00240 extern YY_clntParser_STYPE YY_clntParser_LVAL;
00241 #else
00242 #warning "Namespace conflict, disabling some functionality (bison++ only)"
00243 #endif
00244 #endif
00245 #endif
00246
00247
00248 #line 169 "../bison++/bison.h"
00249 #define T1_ 258
00250 #define T2_ 259
00251 #define PREF_TIME_ 260
00252 #define DNS_SERVER_ 261
00253 #define VALID_TIME_ 262
00254 #define UNICAST_ 263
00255 #define NTP_SERVER_ 264
00256 #define DOMAIN_ 265
00257 #define TIME_ZONE_ 266
00258 #define SIP_SERVER_ 267
00259 #define SIP_DOMAIN_ 268
00260 #define NIS_SERVER_ 269
00261 #define NISP_SERVER_ 270
00262 #define NIS_DOMAIN_ 271
00263 #define NISP_DOMAIN_ 272
00264 #define FQDN_ 273
00265 #define LIFETIME_ 274
00266 #define IFACE_ 275
00267 #define NO_CONFIG_ 276
00268 #define REJECT_SERVERS_ 277
00269 #define PREFERRED_SERVERS_ 278
00270 #define IA_ 279
00271 #define ADDRES_ 280
00272 #define IPV6ADDR_ 281
00273 #define WORKDIR_ 282
00274 #define RAPID_COMMIT_ 283
00275 #define STATELESS_ 284
00276 #define OPTION_ 285
00277 #define LOGNAME_ 286
00278 #define LOGLEVEL_ 287
00279 #define LOGMODE_ 288
00280 #define STRING_ 289
00281 #define HEXNUMBER_ 290
00282 #define INTNUMBER_ 291
00283 #define DUID_ 292
00284
00285
00286 #line 169 "../bison++/bison.h"
00287
00288
00289 #else
00290 #ifndef YY_clntParser_CLASS
00291 #define YY_clntParser_CLASS clntParser
00292 #endif
00293
00294 #ifndef YY_clntParser_INHERIT
00295 #define YY_clntParser_INHERIT
00296 #endif
00297
00298 #ifndef YY_clntParser_MEMBERS
00299 #define YY_clntParser_MEMBERS
00300 #endif
00301
00302 #ifndef YY_clntParser_LEX_BODY
00303 #define YY_clntParser_LEX_BODY
00304 #endif
00305
00306 #ifndef YY_clntParser_ERROR_BODY
00307 #define YY_clntParser_ERROR_BODY
00308 #endif
00309
00310 #ifndef YY_clntParser_CONSTRUCTOR_PARAM
00311 #define YY_clntParser_CONSTRUCTOR_PARAM
00312 #endif
00313
00314 #ifndef YY_clntParser_USE_CONST_TOKEN
00315 #define YY_clntParser_USE_CONST_TOKEN 0
00316
00317
00318 #endif
00319 #if YY_clntParser_USE_CONST_TOKEN != 0
00320 #ifndef YY_clntParser_ENUM_TOKEN
00321 #define YY_clntParser_ENUM_TOKEN yy_clntParser_enum_token
00322 #endif
00323 #endif
00324
00325 class YY_clntParser_CLASS YY_clntParser_INHERIT
00326 {
00327 public:
00328 #if YY_clntParser_USE_CONST_TOKEN != 0
00329
00330
00331 #line 212 "../bison++/bison.h"
00332 static const int T1_;
00333 static const int T2_;
00334 static const int PREF_TIME_;
00335 static const int DNS_SERVER_;
00336 static const int VALID_TIME_;
00337 static const int UNICAST_;
00338 static const int NTP_SERVER_;
00339 static const int DOMAIN_;
00340 static const int TIME_ZONE_;
00341 static const int SIP_SERVER_;
00342 static const int SIP_DOMAIN_;
00343 static const int NIS_SERVER_;
00344 static const int NISP_SERVER_;
00345 static const int NIS_DOMAIN_;
00346 static const int NISP_DOMAIN_;
00347 static const int FQDN_;
00348 static const int LIFETIME_;
00349 static const int IFACE_;
00350 static const int NO_CONFIG_;
00351 static const int REJECT_SERVERS_;
00352 static const int PREFERRED_SERVERS_;
00353 static const int IA_;
00354 static const int ADDRES_;
00355 static const int IPV6ADDR_;
00356 static const int WORKDIR_;
00357 static const int RAPID_COMMIT_;
00358 static const int STATELESS_;
00359 static const int OPTION_;
00360 static const int LOGNAME_;
00361 static const int LOGLEVEL_;
00362 static const int LOGMODE_;
00363 static const int STRING_;
00364 static const int HEXNUMBER_;
00365 static const int INTNUMBER_;
00366 static const int DUID_;
00367
00368
00369 #line 212 "../bison++/bison.h"
00370
00371 #else
00372 enum YY_clntParser_ENUM_TOKEN { YY_clntParser_NULL_TOKEN=0
00373
00374 #line 215 "../bison++/bison.h"
00375 ,T1_=258
00376 ,T2_=259
00377 ,PREF_TIME_=260
00378 ,DNS_SERVER_=261
00379 ,VALID_TIME_=262
00380 ,UNICAST_=263
00381 ,NTP_SERVER_=264
00382 ,DOMAIN_=265
00383 ,TIME_ZONE_=266
00384 ,SIP_SERVER_=267
00385 ,SIP_DOMAIN_=268
00386 ,NIS_SERVER_=269
00387 ,NISP_SERVER_=270
00388 ,NIS_DOMAIN_=271
00389 ,NISP_DOMAIN_=272
00390 ,FQDN_=273
00391 ,LIFETIME_=274
00392 ,IFACE_=275
00393 ,NO_CONFIG_=276
00394 ,REJECT_SERVERS_=277
00395 ,PREFERRED_SERVERS_=278
00396 ,IA_=279
00397 ,ADDRES_=280
00398 ,IPV6ADDR_=281
00399 ,WORKDIR_=282
00400 ,RAPID_COMMIT_=283
00401 ,STATELESS_=284
00402 ,OPTION_=285
00403 ,LOGNAME_=286
00404 ,LOGLEVEL_=287
00405 ,LOGMODE_=288
00406 ,STRING_=289
00407 ,HEXNUMBER_=290
00408 ,INTNUMBER_=291
00409 ,DUID_=292
00410
00411
00412 #line 215 "../bison++/bison.h"
00413
00414 };
00415 #endif
00416 public:
00417 int YY_clntParser_PARSE(YY_clntParser_PARSE_PARAM);
00418 virtual void YY_clntParser_ERROR(char *msg) YY_clntParser_ERROR_BODY;
00419 #ifdef YY_clntParser_PURE
00420 #ifdef YY_clntParser_LSP_NEEDED
00421 virtual int YY_clntParser_LEX(YY_clntParser_STYPE *YY_clntParser_LVAL,YY_clntParser_LTYPE *YY_clntParser_LLOC) YY_clntParser_LEX_BODY;
00422 #else
00423 virtual int YY_clntParser_LEX(YY_clntParser_STYPE *YY_clntParser_LVAL) YY_clntParser_LEX_BODY;
00424 #endif
00425 #else
00426 virtual int YY_clntParser_LEX() YY_clntParser_LEX_BODY;
00427 YY_clntParser_STYPE YY_clntParser_LVAL;
00428 #ifdef YY_clntParser_LSP_NEEDED
00429 YY_clntParser_LTYPE YY_clntParser_LLOC;
00430 #endif
00431 int YY_clntParser_NERRS;
00432 int YY_clntParser_CHAR;
00433 #endif
00434 #if YY_clntParser_DEBUG != 0
00435 public:
00436 int YY_clntParser_DEBUG_FLAG;
00437 #endif
00438 public:
00439 YY_clntParser_CLASS(YY_clntParser_CONSTRUCTOR_PARAM);
00440 public:
00441 YY_clntParser_MEMBERS
00442 };
00443
00444 #endif
00445
00446
00447 #if YY_clntParser_COMPATIBILITY != 0
00448
00449
00450
00451
00452
00453
00454 #ifndef YYLTYPE
00455 #define YYLTYPE YY_clntParser_LTYPE
00456 #endif
00457 #ifndef YYDEBUG
00458 #ifdef YY_clntParser_DEBUG
00459 #define YYDEBUG YY_clntParser_DEBUG
00460 #endif
00461 #endif
00462
00463 #endif
00464
00465
00466 #line 267 "../bison++/bison.h"
00467 #endif
00468