Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SrvParser.h

Go to the documentation of this file.
00001 #ifndef YY_SrvParser_h_included
00002 #define YY_SrvParser_h_included
00003 #define YY_USE_CLASS
00004 
00005 #line 1 "../bison++/bison.h"
00006 /* before anything */
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 "SrvParser.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 "SrvParser.h"
00024 #include "SrvParsGlobalOpt.h"
00025 #include "SrvParsClassOpt.h"
00026 #include "SrvParsIfaceOpt.h"
00027 #include "SrvCfgAddrClass.h"
00028 #include "SrvCfgIface.h"
00029 #include "DUID.h"
00030 #include "Logger.h"
00031 
00032 #define YY_USE_CLASS
00033 #define YY_SrvParser_MEMBERS  FlexLexer * lex;                                                     \
00034 TContainer< SmartPtr<TSrvParsGlobalOpt> > ParserOptStack;    /* list of parsed interfaces/IAs/addrs */ \
00035 TContainer< SmartPtr<TSrvCfgIface> > SrvCfgIfaceLst;         /* list of SrvCfg interfaces */           \
00036 TContainer< SmartPtr<TSrvCfgAddrClass> > SrvCfgAddrClassLst; /* list of SrvCfg address classes */      \
00037 TContainer< SmartPtr<TIPv6Addr> > PresentAddrLst;            /* address list (used for DNS,NTP,etc.)*/ \
00038 TContainer< SmartPtr<string> > PresentStringLst;             /* string list */                         \
00039 TContainer< SmartPtr<TStationRange> > PresentRangeLst;                                                 \
00040 /*method check whether interface with id=ifaceNr has been already declared */        \
00041 bool CheckIsIface(int ifaceNr);                                                      \
00042 /*method check whether interface with id=ifaceName has been already declared*/       \
00043 bool CheckIsIface(string ifaceName);                                                 \
00044 void StartIfaceDeclaration();                                                        \
00045 bool EndIfaceDeclaration();                                                          \
00046 void StartClassDeclaration();                                                        \
00047 bool EndClassDeclaration();                                                          \
00048 virtual ~SrvParser();
00049 #define YY_SrvParser_CONSTRUCTOR_PARAM  yyFlexLexer * lex
00050 #define YY_SrvParser_CONSTRUCTOR_CODE                                                           \
00051     ParserOptStack.append(new TSrvParsGlobalOpt());                               \
00052     ParserOptStack.getLast()->setUnicast(false);                                  \
00053     this->lex = lex;
00054 
00055 #line 51 "SrvParser.y"
00056 typedef union    
00057 {
00058     unsigned int ival;
00059     char *strval;
00060     struct SDuid
00061     {
00062         int length;
00063         char* duid;
00064     } duidval;
00065     char addrval[16];
00066 } yy_SrvParser_stype;
00067 #define YY_SrvParser_STYPE yy_SrvParser_stype
00068 
00069 #line 21 "../bison++/bison.h"
00070  /* %{ and %header{ and %union, during decl */
00071 #ifndef YY_SrvParser_COMPATIBILITY
00072  #ifndef YY_USE_CLASS
00073   #define  YY_SrvParser_COMPATIBILITY 1
00074  #else
00075   #define  YY_SrvParser_COMPATIBILITY 0
00076  #endif
00077 #endif
00078 
00079 #if YY_SrvParser_COMPATIBILITY != 0
00080 /* backward compatibility */
00081  #ifdef YYLTYPE
00082   #ifndef YY_SrvParser_LTYPE
00083    #define YY_SrvParser_LTYPE YYLTYPE
00084 /* WARNING obsolete !!! user defined YYLTYPE not reported into generated header */
00085 /* use %define LTYPE */
00086   #endif
00087  #endif
00088 /*#ifdef YYSTYPE*/
00089   #ifndef YY_SrvParser_STYPE
00090    #define YY_SrvParser_STYPE YYSTYPE
00091   /* WARNING obsolete !!! user defined YYSTYPE not reported into generated header */
00092    /* use %define STYPE */
00093   #endif
00094 /*#endif*/
00095  #ifdef YYDEBUG
00096   #ifndef YY_SrvParser_DEBUG
00097    #define  YY_SrvParser_DEBUG YYDEBUG
00098    /* WARNING obsolete !!! user defined YYDEBUG not reported into generated header */
00099    /* use %define DEBUG */
00100   #endif
00101  #endif 
00102  /* use goto to be compatible */
00103  #ifndef YY_SrvParser_USE_GOTO
00104   #define YY_SrvParser_USE_GOTO 1
00105  #endif
00106 #endif
00107 
00108 /* use no goto to be clean in C++ */
00109 #ifndef YY_SrvParser_USE_GOTO
00110  #define YY_SrvParser_USE_GOTO 0
00111 #endif
00112 
00113 #ifndef YY_SrvParser_PURE
00114 
00115  #line 65 "../bison++/bison.h"
00116 
00117 #line 65 "../bison++/bison.h"
00118 /* YY_SrvParser_PURE */
00119 #endif
00120 
00121 
00122  #line 68 "../bison++/bison.h"
00123 
00124 #line 68 "../bison++/bison.h"
00125 /* prefix */
00126 
00127 #ifndef YY_SrvParser_DEBUG
00128 
00129  #line 71 "../bison++/bison.h"
00130 
00131 #line 71 "../bison++/bison.h"
00132 /* YY_SrvParser_DEBUG */
00133 #endif
00134 
00135 #ifndef YY_SrvParser_LSP_NEEDED
00136 
00137  #line 75 "../bison++/bison.h"
00138 
00139 #line 75 "../bison++/bison.h"
00140  /* YY_SrvParser_LSP_NEEDED*/
00141 #endif
00142 
00143 /* DEFAULT LTYPE*/
00144 #ifdef YY_SrvParser_LSP_NEEDED
00145  #ifndef YY_SrvParser_LTYPE
00146   #ifndef BISON_YYLTYPE_ISDECLARED
00147    #define BISON_YYLTYPE_ISDECLARED
00148 typedef
00149   struct yyltype
00150     {
00151       int timestamp;
00152       int first_line;
00153       int first_column;
00154       int last_line;
00155       int last_column;
00156       char *text;
00157    }
00158   yyltype;
00159   #endif
00160 
00161   #define YY_SrvParser_LTYPE yyltype
00162  #endif
00163 #endif
00164 
00165 /* DEFAULT STYPE*/
00166 #ifndef YY_SrvParser_STYPE
00167  #define YY_SrvParser_STYPE int
00168 #endif
00169 
00170 /* DEFAULT MISCELANEOUS */
00171 #ifndef YY_SrvParser_PARSE
00172  #define YY_SrvParser_PARSE yyparse
00173 #endif
00174 
00175 #ifndef YY_SrvParser_LEX
00176  #define YY_SrvParser_LEX yylex
00177 #endif
00178 
00179 #ifndef YY_SrvParser_LVAL
00180  #define YY_SrvParser_LVAL yylval
00181 #endif
00182 
00183 #ifndef YY_SrvParser_LLOC
00184  #define YY_SrvParser_LLOC yylloc
00185 #endif
00186 
00187 #ifndef YY_SrvParser_CHAR
00188  #define YY_SrvParser_CHAR yychar
00189 #endif
00190 
00191 #ifndef YY_SrvParser_NERRS
00192  #define YY_SrvParser_NERRS yynerrs
00193 #endif
00194 
00195 #ifndef YY_SrvParser_DEBUG_FLAG
00196  #define YY_SrvParser_DEBUG_FLAG yydebug
00197 #endif
00198 
00199 #ifndef YY_SrvParser_ERROR
00200  #define YY_SrvParser_ERROR yyerror
00201 #endif
00202 
00203 #ifndef YY_SrvParser_PARSE_PARAM
00204  #ifndef __STDC__
00205   #ifndef __cplusplus
00206    #ifndef YY_USE_CLASS
00207     #define YY_SrvParser_PARSE_PARAM
00208     #ifndef YY_SrvParser_PARSE_PARAM_DEF
00209      #define YY_SrvParser_PARSE_PARAM_DEF
00210     #endif
00211    #endif
00212   #endif
00213  #endif
00214  #ifndef YY_SrvParser_PARSE_PARAM
00215   #define YY_SrvParser_PARSE_PARAM void
00216  #endif
00217 #endif
00218 
00219 /* TOKEN C */
00220 #ifndef YY_USE_CLASS
00221 
00222  #ifndef YY_SrvParser_PURE
00223   #ifndef yylval
00224    extern YY_SrvParser_STYPE YY_SrvParser_LVAL;
00225   #else
00226    #if yylval != YY_SrvParser_LVAL
00227     extern YY_SrvParser_STYPE YY_SrvParser_LVAL;
00228    #else
00229     #warning "Namespace conflict, disabling some functionality (bison++ only)"
00230    #endif
00231   #endif
00232  #endif
00233 
00234 
00235  #line 169 "../bison++/bison.h"
00236 #define IFACE_  258
00237 #define RELAY_  259
00238 #define IFACE_ID_       260
00239 #define CLASS_  261
00240 #define LOGNAME_        262
00241 #define LOGLEVEL_       263
00242 #define LOGMODE_        264
00243 #define WORKDIR_        265
00244 #define OPTION_ 266
00245 #define DNS_SERVER_     267
00246 #define DOMAIN_ 268
00247 #define NTP_SERVER_     269
00248 #define TIME_ZONE_      270
00249 #define SIP_SERVER_     271
00250 #define SIP_DOMAIN_     272
00251 #define NIS_SERVER_     273
00252 #define NIS_DOMAIN_     274
00253 #define NISP_SERVER_    275
00254 #define NISP_DOMAIN_    276
00255 #define FQDN_   277
00256 #define LIFETIME_       278
00257 #define ACCEPT_ONLY_    279
00258 #define REJECT_CLIENTS_ 280
00259 #define POOL_   281
00260 #define T1_     282
00261 #define T2_     283
00262 #define PREF_TIME_      284
00263 #define VALID_TIME_     285
00264 #define UNICAST_        286
00265 #define PREFERENCE_     287
00266 #define RAPID_COMMIT_   288
00267 #define IFACE_MAX_LEASE_        289
00268 #define CLASS_MAX_LEASE_        290
00269 #define CLNT_MAX_LEASE_ 291
00270 #define STATELESS_      292
00271 #define STRING_ 293
00272 #define HEXNUMBER_      294
00273 #define INTNUMBER_      295
00274 #define IPV6ADDR_       296
00275 #define DUID_   297
00276 
00277 
00278 #line 169 "../bison++/bison.h"
00279  /* #defines token */
00280 /* after #define tokens, before const tokens S5*/
00281 #else
00282  #ifndef YY_SrvParser_CLASS
00283   #define YY_SrvParser_CLASS SrvParser
00284  #endif
00285 
00286  #ifndef YY_SrvParser_INHERIT
00287   #define YY_SrvParser_INHERIT
00288  #endif
00289 
00290  #ifndef YY_SrvParser_MEMBERS
00291   #define YY_SrvParser_MEMBERS 
00292  #endif
00293 
00294  #ifndef YY_SrvParser_LEX_BODY
00295   #define YY_SrvParser_LEX_BODY  
00296  #endif
00297 
00298  #ifndef YY_SrvParser_ERROR_BODY
00299   #define YY_SrvParser_ERROR_BODY  
00300  #endif
00301 
00302  #ifndef YY_SrvParser_CONSTRUCTOR_PARAM
00303   #define YY_SrvParser_CONSTRUCTOR_PARAM
00304  #endif
00305  /* choose between enum and const */
00306  #ifndef YY_SrvParser_USE_CONST_TOKEN
00307   #define YY_SrvParser_USE_CONST_TOKEN 0
00308   /* yes enum is more compatible with flex,  */
00309   /* so by default we use it */ 
00310  #endif
00311  #if YY_SrvParser_USE_CONST_TOKEN != 0
00312   #ifndef YY_SrvParser_ENUM_TOKEN
00313    #define YY_SrvParser_ENUM_TOKEN yy_SrvParser_enum_token
00314   #endif
00315  #endif
00316 
00317 class YY_SrvParser_CLASS YY_SrvParser_INHERIT
00318 {
00319 public: 
00320  #if YY_SrvParser_USE_CONST_TOKEN != 0
00321   /* static const int token ... */
00322   
00323  #line 212 "../bison++/bison.h"
00324 static const int IFACE_;
00325 static const int RELAY_;
00326 static const int IFACE_ID_;
00327 static const int CLASS_;
00328 static const int LOGNAME_;
00329 static const int LOGLEVEL_;
00330 static const int LOGMODE_;
00331 static const int WORKDIR_;
00332 static const int OPTION_;
00333 static const int DNS_SERVER_;
00334 static const int DOMAIN_;
00335 static const int NTP_SERVER_;
00336 static const int TIME_ZONE_;
00337 static const int SIP_SERVER_;
00338 static const int SIP_DOMAIN_;
00339 static const int NIS_SERVER_;
00340 static const int NIS_DOMAIN_;
00341 static const int NISP_SERVER_;
00342 static const int NISP_DOMAIN_;
00343 static const int FQDN_;
00344 static const int LIFETIME_;
00345 static const int ACCEPT_ONLY_;
00346 static const int REJECT_CLIENTS_;
00347 static const int POOL_;
00348 static const int T1_;
00349 static const int T2_;
00350 static const int PREF_TIME_;
00351 static const int VALID_TIME_;
00352 static const int UNICAST_;
00353 static const int PREFERENCE_;
00354 static const int RAPID_COMMIT_;
00355 static const int IFACE_MAX_LEASE_;
00356 static const int CLASS_MAX_LEASE_;
00357 static const int CLNT_MAX_LEASE_;
00358 static const int STATELESS_;
00359 static const int STRING_;
00360 static const int HEXNUMBER_;
00361 static const int INTNUMBER_;
00362 static const int IPV6ADDR_;
00363 static const int DUID_;
00364 
00365 
00366 #line 212 "../bison++/bison.h"
00367  /* decl const */
00368  #else
00369   enum YY_SrvParser_ENUM_TOKEN { YY_SrvParser_NULL_TOKEN=0
00370   
00371  #line 215 "../bison++/bison.h"
00372         ,IFACE_=258
00373         ,RELAY_=259
00374         ,IFACE_ID_=260
00375         ,CLASS_=261
00376         ,LOGNAME_=262
00377         ,LOGLEVEL_=263
00378         ,LOGMODE_=264
00379         ,WORKDIR_=265
00380         ,OPTION_=266
00381         ,DNS_SERVER_=267
00382         ,DOMAIN_=268
00383         ,NTP_SERVER_=269
00384         ,TIME_ZONE_=270
00385         ,SIP_SERVER_=271
00386         ,SIP_DOMAIN_=272
00387         ,NIS_SERVER_=273
00388         ,NIS_DOMAIN_=274
00389         ,NISP_SERVER_=275
00390         ,NISP_DOMAIN_=276
00391         ,FQDN_=277
00392         ,LIFETIME_=278
00393         ,ACCEPT_ONLY_=279
00394         ,REJECT_CLIENTS_=280
00395         ,POOL_=281
00396         ,T1_=282
00397         ,T2_=283
00398         ,PREF_TIME_=284
00399         ,VALID_TIME_=285
00400         ,UNICAST_=286
00401         ,PREFERENCE_=287
00402         ,RAPID_COMMIT_=288
00403         ,IFACE_MAX_LEASE_=289
00404         ,CLASS_MAX_LEASE_=290
00405         ,CLNT_MAX_LEASE_=291
00406         ,STATELESS_=292
00407         ,STRING_=293
00408         ,HEXNUMBER_=294
00409         ,INTNUMBER_=295
00410         ,IPV6ADDR_=296
00411         ,DUID_=297
00412 
00413 
00414 #line 215 "../bison++/bison.h"
00415  /* enum token */
00416      }; /* end of enum declaration */
00417  #endif
00418 public:
00419  int YY_SrvParser_PARSE(YY_SrvParser_PARSE_PARAM);
00420  virtual void YY_SrvParser_ERROR(char *msg) YY_SrvParser_ERROR_BODY;
00421  #ifdef YY_SrvParser_PURE
00422   #ifdef YY_SrvParser_LSP_NEEDED
00423    virtual int  YY_SrvParser_LEX(YY_SrvParser_STYPE *YY_SrvParser_LVAL,YY_SrvParser_LTYPE *YY_SrvParser_LLOC) YY_SrvParser_LEX_BODY;
00424   #else
00425    virtual int  YY_SrvParser_LEX(YY_SrvParser_STYPE *YY_SrvParser_LVAL) YY_SrvParser_LEX_BODY;
00426   #endif
00427  #else
00428   virtual int YY_SrvParser_LEX() YY_SrvParser_LEX_BODY;
00429   YY_SrvParser_STYPE YY_SrvParser_LVAL;
00430   #ifdef YY_SrvParser_LSP_NEEDED
00431    YY_SrvParser_LTYPE YY_SrvParser_LLOC;
00432   #endif
00433   int YY_SrvParser_NERRS;
00434   int YY_SrvParser_CHAR;
00435  #endif
00436  #if YY_SrvParser_DEBUG != 0
00437   public:
00438    int YY_SrvParser_DEBUG_FLAG; /*  nonzero means print parse trace     */
00439  #endif
00440 public:
00441  YY_SrvParser_CLASS(YY_SrvParser_CONSTRUCTOR_PARAM);
00442 public:
00443  YY_SrvParser_MEMBERS 
00444 };
00445 /* other declare folow */
00446 #endif
00447 
00448 
00449 #if YY_SrvParser_COMPATIBILITY != 0
00450  /* backward compatibility */
00451  /* Removed due to bison problems
00452  /#ifndef YYSTYPE
00453  / #define YYSTYPE YY_SrvParser_STYPE
00454  /#endif*/
00455 
00456  #ifndef YYLTYPE
00457   #define YYLTYPE YY_SrvParser_LTYPE
00458  #endif
00459  #ifndef YYDEBUG
00460   #ifdef YY_SrvParser_DEBUG 
00461    #define YYDEBUG YY_SrvParser_DEBUG
00462   #endif
00463  #endif
00464 
00465 #endif
00466 /* END */
00467 
00468  #line 267 "../bison++/bison.h"
00469 #endif
00470 

Generated on Wed Mar 16 00:10:28 2005 for Dibbler - a portable DHCPv6 by  doxygen 1.3.9.1