00001 #ifndef YY_RelParser_h_included
00002 #define YY_RelParser_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 "RelParser.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 "RelParser.h"
00024 #include "RelParsGlobalOpt.h"
00025 #include "RelParsIfaceOpt.h"
00026 #include "RelCfgIface.h"
00027 #include "DUID.h"
00028 #include "Logger.h"
00029
00030 #define YY_USE_CLASS
00031 #define YY_RelParser_MEMBERS FlexLexer * lex; \
00032 TContainer< SmartPtr<TRelParsGlobalOpt> > ParserOptStack; \
00033 TContainer< SmartPtr<TRelCfgIface> > RelCfgIfaceLst; \
00034 TContainer< SmartPtr<TIPv6Addr> > PresentAddrLst; \
00035 TContainer< SmartPtr<string> > PresentStringLst; \
00036 \
00037 bool CheckIsIface(int ifaceNr); \
00038 \
00039 bool CheckIsIface(string ifaceName); \
00040 void StartIfaceDeclaration(); \
00041 bool EndIfaceDeclaration(); \
00042 virtual ~RelParser();
00043 #define YY_RelParser_CONSTRUCTOR_PARAM yyFlexLexer * lex
00044 #define YY_RelParser_CONSTRUCTOR_CODE \
00045 ParserOptStack.append(new TRelParsGlobalOpt()); \
00046 this->lex = lex;
00047
00048 #line 44 "RelParser.y"
00049 typedef union
00050 {
00051 unsigned int ival;
00052 char *strval;
00053 char addrval[16];
00054 } yy_RelParser_stype;
00055 #define YY_RelParser_STYPE yy_RelParser_stype
00056
00057 #line 21 "../bison++/bison.h"
00058
00059 #ifndef YY_RelParser_COMPATIBILITY
00060 #ifndef YY_USE_CLASS
00061 #define YY_RelParser_COMPATIBILITY 1
00062 #else
00063 #define YY_RelParser_COMPATIBILITY 0
00064 #endif
00065 #endif
00066
00067 #if YY_RelParser_COMPATIBILITY != 0
00068
00069 #ifdef YYLTYPE
00070 #ifndef YY_RelParser_LTYPE
00071 #define YY_RelParser_LTYPE YYLTYPE
00072
00073
00074 #endif
00075 #endif
00076
00077 #ifndef YY_RelParser_STYPE
00078 #define YY_RelParser_STYPE YYSTYPE
00079
00080
00081 #endif
00082
00083 #ifdef YYDEBUG
00084 #ifndef YY_RelParser_DEBUG
00085 #define YY_RelParser_DEBUG YYDEBUG
00086
00087
00088 #endif
00089 #endif
00090
00091 #ifndef YY_RelParser_USE_GOTO
00092 #define YY_RelParser_USE_GOTO 1
00093 #endif
00094 #endif
00095
00096
00097 #ifndef YY_RelParser_USE_GOTO
00098 #define YY_RelParser_USE_GOTO 0
00099 #endif
00100
00101 #ifndef YY_RelParser_PURE
00102
00103 #line 65 "../bison++/bison.h"
00104
00105 #line 65 "../bison++/bison.h"
00106
00107 #endif
00108
00109
00110 #line 68 "../bison++/bison.h"
00111
00112 #line 68 "../bison++/bison.h"
00113
00114
00115 #ifndef YY_RelParser_DEBUG
00116
00117 #line 71 "../bison++/bison.h"
00118
00119 #line 71 "../bison++/bison.h"
00120
00121 #endif
00122
00123 #ifndef YY_RelParser_LSP_NEEDED
00124
00125 #line 75 "../bison++/bison.h"
00126
00127 #line 75 "../bison++/bison.h"
00128
00129 #endif
00130
00131
00132 #ifdef YY_RelParser_LSP_NEEDED
00133 #ifndef YY_RelParser_LTYPE
00134 #ifndef BISON_YYLTYPE_ISDECLARED
00135 #define BISON_YYLTYPE_ISDECLARED
00136 typedef
00137 struct yyltype
00138 {
00139 int timestamp;
00140 int first_line;
00141 int first_column;
00142 int last_line;
00143 int last_column;
00144 char *text;
00145 }
00146 yyltype;
00147 #endif
00148
00149 #define YY_RelParser_LTYPE yyltype
00150 #endif
00151 #endif
00152
00153
00154 #ifndef YY_RelParser_STYPE
00155 #define YY_RelParser_STYPE int
00156 #endif
00157
00158
00159 #ifndef YY_RelParser_PARSE
00160 #define YY_RelParser_PARSE yyparse
00161 #endif
00162
00163 #ifndef YY_RelParser_LEX
00164 #define YY_RelParser_LEX yylex
00165 #endif
00166
00167 #ifndef YY_RelParser_LVAL
00168 #define YY_RelParser_LVAL yylval
00169 #endif
00170
00171 #ifndef YY_RelParser_LLOC
00172 #define YY_RelParser_LLOC yylloc
00173 #endif
00174
00175 #ifndef YY_RelParser_CHAR
00176 #define YY_RelParser_CHAR yychar
00177 #endif
00178
00179 #ifndef YY_RelParser_NERRS
00180 #define YY_RelParser_NERRS yynerrs
00181 #endif
00182
00183 #ifndef YY_RelParser_DEBUG_FLAG
00184 #define YY_RelParser_DEBUG_FLAG yydebug
00185 #endif
00186
00187 #ifndef YY_RelParser_ERROR
00188 #define YY_RelParser_ERROR yyerror
00189 #endif
00190
00191 #ifndef YY_RelParser_PARSE_PARAM
00192 #ifndef __STDC__
00193 #ifndef __cplusplus
00194 #ifndef YY_USE_CLASS
00195 #define YY_RelParser_PARSE_PARAM
00196 #ifndef YY_RelParser_PARSE_PARAM_DEF
00197 #define YY_RelParser_PARSE_PARAM_DEF
00198 #endif
00199 #endif
00200 #endif
00201 #endif
00202 #ifndef YY_RelParser_PARSE_PARAM
00203 #define YY_RelParser_PARSE_PARAM void
00204 #endif
00205 #endif
00206
00207
00208 #ifndef YY_USE_CLASS
00209
00210 #ifndef YY_RelParser_PURE
00211 #ifndef yylval
00212 extern YY_RelParser_STYPE YY_RelParser_LVAL;
00213 #else
00214 #if yylval != YY_RelParser_LVAL
00215 extern YY_RelParser_STYPE YY_RelParser_LVAL;
00216 #else
00217 #warning "Namespace conflict, disabling some functionality (bison++ only)"
00218 #endif
00219 #endif
00220 #endif
00221
00222
00223 #line 169 "../bison++/bison.h"
00224 #define IFACE_ 258
00225 #define CLIENT_ 259
00226 #define SERVER_ 260
00227 #define UNICAST_ 261
00228 #define MULTICAST_ 262
00229 #define IFACE_ID_ 263
00230 #define LOGNAME_ 264
00231 #define LOGLEVEL_ 265
00232 #define LOGMODE_ 266
00233 #define WORKDIR_ 267
00234 #define STRING_ 268
00235 #define HEXNUMBER_ 269
00236 #define INTNUMBER_ 270
00237 #define IPV6ADDR_ 271
00238
00239
00240 #line 169 "../bison++/bison.h"
00241
00242
00243 #else
00244 #ifndef YY_RelParser_CLASS
00245 #define YY_RelParser_CLASS RelParser
00246 #endif
00247
00248 #ifndef YY_RelParser_INHERIT
00249 #define YY_RelParser_INHERIT
00250 #endif
00251
00252 #ifndef YY_RelParser_MEMBERS
00253 #define YY_RelParser_MEMBERS
00254 #endif
00255
00256 #ifndef YY_RelParser_LEX_BODY
00257 #define YY_RelParser_LEX_BODY
00258 #endif
00259
00260 #ifndef YY_RelParser_ERROR_BODY
00261 #define YY_RelParser_ERROR_BODY
00262 #endif
00263
00264 #ifndef YY_RelParser_CONSTRUCTOR_PARAM
00265 #define YY_RelParser_CONSTRUCTOR_PARAM
00266 #endif
00267
00268 #ifndef YY_RelParser_USE_CONST_TOKEN
00269 #define YY_RelParser_USE_CONST_TOKEN 0
00270
00271
00272 #endif
00273 #if YY_RelParser_USE_CONST_TOKEN != 0
00274 #ifndef YY_RelParser_ENUM_TOKEN
00275 #define YY_RelParser_ENUM_TOKEN yy_RelParser_enum_token
00276 #endif
00277 #endif
00278
00279 class YY_RelParser_CLASS YY_RelParser_INHERIT
00280 {
00281 public:
00282 #if YY_RelParser_USE_CONST_TOKEN != 0
00283
00284
00285 #line 212 "../bison++/bison.h"
00286 static const int IFACE_;
00287 static const int CLIENT_;
00288 static const int SERVER_;
00289 static const int UNICAST_;
00290 static const int MULTICAST_;
00291 static const int IFACE_ID_;
00292 static const int LOGNAME_;
00293 static const int LOGLEVEL_;
00294 static const int LOGMODE_;
00295 static const int WORKDIR_;
00296 static const int STRING_;
00297 static const int HEXNUMBER_;
00298 static const int INTNUMBER_;
00299 static const int IPV6ADDR_;
00300
00301
00302 #line 212 "../bison++/bison.h"
00303
00304 #else
00305 enum YY_RelParser_ENUM_TOKEN { YY_RelParser_NULL_TOKEN=0
00306
00307 #line 215 "../bison++/bison.h"
00308 ,IFACE_=258
00309 ,CLIENT_=259
00310 ,SERVER_=260
00311 ,UNICAST_=261
00312 ,MULTICAST_=262
00313 ,IFACE_ID_=263
00314 ,LOGNAME_=264
00315 ,LOGLEVEL_=265
00316 ,LOGMODE_=266
00317 ,WORKDIR_=267
00318 ,STRING_=268
00319 ,HEXNUMBER_=269
00320 ,INTNUMBER_=270
00321 ,IPV6ADDR_=271
00322
00323
00324 #line 215 "../bison++/bison.h"
00325
00326 };
00327 #endif
00328 public:
00329 int YY_RelParser_PARSE(YY_RelParser_PARSE_PARAM);
00330 virtual void YY_RelParser_ERROR(char *msg) YY_RelParser_ERROR_BODY;
00331 #ifdef YY_RelParser_PURE
00332 #ifdef YY_RelParser_LSP_NEEDED
00333 virtual int YY_RelParser_LEX(YY_RelParser_STYPE *YY_RelParser_LVAL,YY_RelParser_LTYPE *YY_RelParser_LLOC) YY_RelParser_LEX_BODY;
00334 #else
00335 virtual int YY_RelParser_LEX(YY_RelParser_STYPE *YY_RelParser_LVAL) YY_RelParser_LEX_BODY;
00336 #endif
00337 #else
00338 virtual int YY_RelParser_LEX() YY_RelParser_LEX_BODY;
00339 YY_RelParser_STYPE YY_RelParser_LVAL;
00340 #ifdef YY_RelParser_LSP_NEEDED
00341 YY_RelParser_LTYPE YY_RelParser_LLOC;
00342 #endif
00343 int YY_RelParser_NERRS;
00344 int YY_RelParser_CHAR;
00345 #endif
00346 #if YY_RelParser_DEBUG != 0
00347 public:
00348 int YY_RelParser_DEBUG_FLAG;
00349 #endif
00350 public:
00351 YY_RelParser_CLASS(YY_RelParser_CONSTRUCTOR_PARAM);
00352 public:
00353 YY_RelParser_MEMBERS
00354 };
00355
00356 #endif
00357
00358
00359 #if YY_RelParser_COMPATIBILITY != 0
00360
00361
00362
00363
00364
00365
00366 #ifndef YYLTYPE
00367 #define YYLTYPE YY_RelParser_LTYPE
00368 #endif
00369 #ifndef YYDEBUG
00370 #ifdef YY_RelParser_DEBUG
00371 #define YYDEBUG YY_RelParser_DEBUG
00372 #endif
00373 #endif
00374
00375 #endif
00376
00377
00378 #line 267 "../bison++/bison.h"
00379 #endif
00380