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

Generated on Sun Aug 7 22:47:17 2005 for Dibbler - a portable DHCPv6 by  doxygen 1.3.9.1