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 CLASS_  259
00238 #define LOGNAME_        260
00239 #define LOGLEVEL_       261
00240 #define LOGMODE_        262
00241 #define WORKDIR_        263
00242 #define OPTION_ 264
00243 #define DNS_SERVER_     265
00244 #define DOMAIN_ 266
00245 #define NTP_SERVER_     267
00246 #define TIME_ZONE_      268
00247 #define SIP_SERVER_     269
00248 #define SIP_DOMAIN_     270
00249 #define NIS_SERVER_     271
00250 #define NIS_DOMAIN_     272
00251 #define NISP_SERVER_    273
00252 #define NISP_DOMAIN_    274
00253 #define FQDN_   275
00254 #define LIFETIME_       276
00255 #define ACCEPT_ONLY_    277
00256 #define REJECT_CLIENTS_ 278
00257 #define POOL_   279
00258 #define T1_     280
00259 #define T2_     281
00260 #define PREF_TIME_      282
00261 #define VALID_TIME_     283
00262 #define UNICAST_        284
00263 #define PREFERENCE_     285
00264 #define RAPID_COMMIT_   286
00265 #define IFACE_MAX_LEASE_        287
00266 #define CLASS_MAX_LEASE_        288
00267 #define CLNT_MAX_LEASE_ 289
00268 #define STATELESS_      290
00269 #define STRING_ 291
00270 #define HEXNUMBER_      292
00271 #define INTNUMBER_      293
00272 #define IPV6ADDR_       294
00273 #define DUID_   295
00274 
00275 
00276 #line 169 "../bison++/bison.h"
00277  /* #defines token */
00278 /* after #define tokens, before const tokens S5*/
00279 #else
00280  #ifndef YY_SrvParser_CLASS
00281   #define YY_SrvParser_CLASS SrvParser
00282  #endif
00283 
00284  #ifndef YY_SrvParser_INHERIT
00285   #define YY_SrvParser_INHERIT
00286  #endif
00287 
00288  #ifndef YY_SrvParser_MEMBERS
00289   #define YY_SrvParser_MEMBERS 
00290  #endif
00291 
00292  #ifndef YY_SrvParser_LEX_BODY
00293   #define YY_SrvParser_LEX_BODY  
00294  #endif
00295 
00296  #ifndef YY_SrvParser_ERROR_BODY
00297   #define YY_SrvParser_ERROR_BODY  
00298  #endif
00299 
00300  #ifndef YY_SrvParser_CONSTRUCTOR_PARAM
00301   #define YY_SrvParser_CONSTRUCTOR_PARAM
00302  #endif
00303  /* choose between enum and const */
00304  #ifndef YY_SrvParser_USE_CONST_TOKEN
00305   #define YY_SrvParser_USE_CONST_TOKEN 0
00306   /* yes enum is more compatible with flex,  */
00307   /* so by default we use it */ 
00308  #endif
00309  #if YY_SrvParser_USE_CONST_TOKEN != 0
00310   #ifndef YY_SrvParser_ENUM_TOKEN
00311    #define YY_SrvParser_ENUM_TOKEN yy_SrvParser_enum_token
00312   #endif
00313  #endif
00314 
00315 class YY_SrvParser_CLASS YY_SrvParser_INHERIT
00316 {
00317 public: 
00318  #if YY_SrvParser_USE_CONST_TOKEN != 0
00319   /* static const int token ... */
00320   
00321  #line 212 "../bison++/bison.h"
00322 static const int IFACE_;
00323 static const int CLASS_;
00324 static const int LOGNAME_;
00325 static const int LOGLEVEL_;
00326 static const int LOGMODE_;
00327 static const int WORKDIR_;
00328 static const int OPTION_;
00329 static const int DNS_SERVER_;
00330 static const int DOMAIN_;
00331 static const int NTP_SERVER_;
00332 static const int TIME_ZONE_;
00333 static const int SIP_SERVER_;
00334 static const int SIP_DOMAIN_;
00335 static const int NIS_SERVER_;
00336 static const int NIS_DOMAIN_;
00337 static const int NISP_SERVER_;
00338 static const int NISP_DOMAIN_;
00339 static const int FQDN_;
00340 static const int LIFETIME_;
00341 static const int ACCEPT_ONLY_;
00342 static const int REJECT_CLIENTS_;
00343 static const int POOL_;
00344 static const int T1_;
00345 static const int T2_;
00346 static const int PREF_TIME_;
00347 static const int VALID_TIME_;
00348 static const int UNICAST_;
00349 static const int PREFERENCE_;
00350 static const int RAPID_COMMIT_;
00351 static const int IFACE_MAX_LEASE_;
00352 static const int CLASS_MAX_LEASE_;
00353 static const int CLNT_MAX_LEASE_;
00354 static const int STATELESS_;
00355 static const int STRING_;
00356 static const int HEXNUMBER_;
00357 static const int INTNUMBER_;
00358 static const int IPV6ADDR_;
00359 static const int DUID_;
00360 
00361 
00362 #line 212 "../bison++/bison.h"
00363  /* decl const */
00364  #else
00365   enum YY_SrvParser_ENUM_TOKEN { YY_SrvParser_NULL_TOKEN=0
00366   
00367  #line 215 "../bison++/bison.h"
00368         ,IFACE_=258
00369         ,CLASS_=259
00370         ,LOGNAME_=260
00371         ,LOGLEVEL_=261
00372         ,LOGMODE_=262
00373         ,WORKDIR_=263
00374         ,OPTION_=264
00375         ,DNS_SERVER_=265
00376         ,DOMAIN_=266
00377         ,NTP_SERVER_=267
00378         ,TIME_ZONE_=268
00379         ,SIP_SERVER_=269
00380         ,SIP_DOMAIN_=270
00381         ,NIS_SERVER_=271
00382         ,NIS_DOMAIN_=272
00383         ,NISP_SERVER_=273
00384         ,NISP_DOMAIN_=274
00385         ,FQDN_=275
00386         ,LIFETIME_=276
00387         ,ACCEPT_ONLY_=277
00388         ,REJECT_CLIENTS_=278
00389         ,POOL_=279
00390         ,T1_=280
00391         ,T2_=281
00392         ,PREF_TIME_=282
00393         ,VALID_TIME_=283
00394         ,UNICAST_=284
00395         ,PREFERENCE_=285
00396         ,RAPID_COMMIT_=286
00397         ,IFACE_MAX_LEASE_=287
00398         ,CLASS_MAX_LEASE_=288
00399         ,CLNT_MAX_LEASE_=289
00400         ,STATELESS_=290
00401         ,STRING_=291
00402         ,HEXNUMBER_=292
00403         ,INTNUMBER_=293
00404         ,IPV6ADDR_=294
00405         ,DUID_=295
00406 
00407 
00408 #line 215 "../bison++/bison.h"
00409  /* enum token */
00410      }; /* end of enum declaration */
00411  #endif
00412 public:
00413  int YY_SrvParser_PARSE(YY_SrvParser_PARSE_PARAM);
00414  virtual void YY_SrvParser_ERROR(char *msg) YY_SrvParser_ERROR_BODY;
00415  #ifdef YY_SrvParser_PURE
00416   #ifdef YY_SrvParser_LSP_NEEDED
00417    virtual int  YY_SrvParser_LEX(YY_SrvParser_STYPE *YY_SrvParser_LVAL,YY_SrvParser_LTYPE *YY_SrvParser_LLOC) YY_SrvParser_LEX_BODY;
00418   #else
00419    virtual int  YY_SrvParser_LEX(YY_SrvParser_STYPE *YY_SrvParser_LVAL) YY_SrvParser_LEX_BODY;
00420   #endif
00421  #else
00422   virtual int YY_SrvParser_LEX() YY_SrvParser_LEX_BODY;
00423   YY_SrvParser_STYPE YY_SrvParser_LVAL;
00424   #ifdef YY_SrvParser_LSP_NEEDED
00425    YY_SrvParser_LTYPE YY_SrvParser_LLOC;
00426   #endif
00427   int YY_SrvParser_NERRS;
00428   int YY_SrvParser_CHAR;
00429  #endif
00430  #if YY_SrvParser_DEBUG != 0
00431   public:
00432    int YY_SrvParser_DEBUG_FLAG; /*  nonzero means print parse trace     */
00433  #endif
00434 public:
00435  YY_SrvParser_CLASS(YY_SrvParser_CONSTRUCTOR_PARAM);
00436 public:
00437  YY_SrvParser_MEMBERS 
00438 };
00439 /* other declare folow */
00440 #endif
00441 
00442 
00443 #if YY_SrvParser_COMPATIBILITY != 0
00444  /* backward compatibility */
00445  /* Removed due to bison problems
00446  /#ifndef YYSTYPE
00447  / #define YYSTYPE YY_SrvParser_STYPE
00448  /#endif*/
00449 
00450  #ifndef YYLTYPE
00451   #define YYLTYPE YY_SrvParser_LTYPE
00452  #endif
00453  #ifndef YYDEBUG
00454   #ifdef YY_SrvParser_DEBUG 
00455    #define YYDEBUG YY_SrvParser_DEBUG
00456   #endif
00457  #endif
00458 
00459 #endif
00460 /* END */
00461 
00462  #line 267 "../bison++/bison.h"
00463 #endif
00464 

Generated on Mon Dec 27 21:55:22 2004 for Dibbler - a portable DHCPv6 by  doxygen 1.3.9.1