1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420
|
#ifndef YY_RelParser_h_included
#define YY_RelParser_h_included
#define YY_USE_CLASS
#line 1 "../bison++/bison.h"
/* before anything */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
#line 8 "../bison++/bison.h"
#line 3 "RelParser.y"
#include <string.h>
#include <iostream>
#include <string>
#include <malloc.h>
#include "DHCPConst.h"
#include "SmartPtr.h"
#include "Container.h"
#include "RelParser.h"
#include "RelParsGlobalOpt.h"
#include "RelParsIfaceOpt.h"
#include "RelCfgIface.h"
#include "RelCfgMgr.h"
#include "OptVendorData.h"
#include "OptDUID.h"
#include "DUID.h"
#include "Logger.h"
#include "Portable.h"
using namespace std;
#define YY_USE_CLASS
#define YY_RelParser_MEMBERS FlexLexer * lex; \
List(TRelParsGlobalOpt) ParserOptStack; /* list of parsed interfaces/IAs/addrs */ \
List(TRelCfgIface) RelCfgIfaceLst; /* list of RelCfg interfaces */ \
List(TIPv6Addr) PresentAddrLst; /* address list (used for DNS,NTP,etc.)*/ \
List(std::string) PresentStringLst; /* string list */ \
SPtr<TRelOptEcho> EchoOpt; /* echo request option */ \
/*method check whether interface with id=ifaceNr has been already declared */ \
bool CheckIsIface(int ifaceNr); \
/*method check whether interface with id=ifaceName has been already declared*/ \
bool CheckIsIface(string ifaceName); \
void StartIfaceDeclaration(); \
bool EndIfaceDeclaration(); \
TRelCfgMgr* CfgMgr; \
virtual ~RelParser();
#define YY_RelParser_CONSTRUCTOR_PARAM yyFlexLexer * lex
#define YY_RelParser_CONSTRUCTOR_CODE \
ParserOptStack.append(new TRelParsGlobalOpt()); \
this->lex = lex; \
yynerrs = 0; \
yychar = 0;
#line 55 "RelParser.y"
typedef union
{
unsigned int ival;
char *strval;
char addrval[16];
struct SDuid
{
int length;
char* duid;
} duidval;
} yy_RelParser_stype;
#define YY_RelParser_STYPE yy_RelParser_stype
#line 21 "../bison++/bison.h"
/* %{ and %header{ and %union, during decl */
#ifndef YY_RelParser_COMPATIBILITY
#ifndef YY_USE_CLASS
#define YY_RelParser_COMPATIBILITY 1
#else
#define YY_RelParser_COMPATIBILITY 0
#endif
#endif
#if YY_RelParser_COMPATIBILITY != 0
/* backward compatibility */
#ifdef YYLTYPE
#ifndef YY_RelParser_LTYPE
#define YY_RelParser_LTYPE YYLTYPE
/* WARNING obsolete !!! user defined YYLTYPE not reported into generated header */
/* use %define LTYPE */
#endif
#endif
/*#ifdef YYSTYPE*/
#ifndef YY_RelParser_STYPE
#define YY_RelParser_STYPE YYSTYPE
/* WARNING obsolete !!! user defined YYSTYPE not reported into generated header */
/* use %define STYPE */
#endif
/*#endif*/
#ifdef YYDEBUG
#ifndef YY_RelParser_DEBUG
#define YY_RelParser_DEBUG YYDEBUG
/* WARNING obsolete !!! user defined YYDEBUG not reported into generated header */
/* use %define DEBUG */
#endif
#endif
/* use goto to be compatible */
#ifndef YY_RelParser_USE_GOTO
#define YY_RelParser_USE_GOTO 1
#endif
#endif
/* use no goto to be clean in C++ */
#ifndef YY_RelParser_USE_GOTO
#define YY_RelParser_USE_GOTO 0
#endif
#ifndef YY_RelParser_PURE
#line 65 "../bison++/bison.h"
#line 65 "../bison++/bison.h"
/* YY_RelParser_PURE */
#endif
#line 68 "../bison++/bison.h"
#line 68 "../bison++/bison.h"
/* prefix */
#ifndef YY_RelParser_DEBUG
#line 71 "../bison++/bison.h"
#define YY_RelParser_DEBUG 1
#line 71 "../bison++/bison.h"
/* YY_RelParser_DEBUG */
#endif
#ifndef YY_RelParser_LSP_NEEDED
#line 75 "../bison++/bison.h"
#line 75 "../bison++/bison.h"
/* YY_RelParser_LSP_NEEDED*/
#endif
/* DEFAULT LTYPE*/
#ifdef YY_RelParser_LSP_NEEDED
#ifndef YY_RelParser_LTYPE
#ifndef BISON_YYLTYPE_ISDECLARED
#define BISON_YYLTYPE_ISDECLARED
typedef
struct yyltype
{
int timestamp;
int first_line;
int first_column;
int last_line;
int last_column;
char *text;
}
yyltype;
#endif
#define YY_RelParser_LTYPE yyltype
#endif
#endif
/* DEFAULT STYPE*/
#ifndef YY_RelParser_STYPE
#define YY_RelParser_STYPE int
#endif
/* DEFAULT MISCELANEOUS */
#ifndef YY_RelParser_PARSE
#define YY_RelParser_PARSE yyparse
#endif
#ifndef YY_RelParser_LEX
#define YY_RelParser_LEX yylex
#endif
#ifndef YY_RelParser_LVAL
#define YY_RelParser_LVAL yylval
#endif
#ifndef YY_RelParser_LLOC
#define YY_RelParser_LLOC yylloc
#endif
#ifndef YY_RelParser_CHAR
#define YY_RelParser_CHAR yychar
#endif
#ifndef YY_RelParser_NERRS
#define YY_RelParser_NERRS yynerrs
#endif
#ifndef YY_RelParser_DEBUG_FLAG
#define YY_RelParser_DEBUG_FLAG yydebug
#endif
#ifndef YY_RelParser_ERROR
#define YY_RelParser_ERROR yyerror
#endif
#ifndef YY_RelParser_PARSE_PARAM
#ifndef __STDC__
#ifndef __cplusplus
#ifndef YY_USE_CLASS
#define YY_RelParser_PARSE_PARAM
#ifndef YY_RelParser_PARSE_PARAM_DEF
#define YY_RelParser_PARSE_PARAM_DEF
#endif
#endif
#endif
#endif
#ifndef YY_RelParser_PARSE_PARAM
#define YY_RelParser_PARSE_PARAM void
#endif
#endif
/* TOKEN C */
#ifndef YY_USE_CLASS
#ifndef YY_RelParser_PURE
#ifndef yylval
extern YY_RelParser_STYPE YY_RelParser_LVAL;
#else
#if yylval != YY_RelParser_LVAL
extern YY_RelParser_STYPE YY_RelParser_LVAL;
#else
#warning "Namespace conflict, disabling some functionality (bison++ only)"
#endif
#endif
#endif
#line 169 "../bison++/bison.h"
#define IFACE_ 258
#define CLIENT_ 259
#define SERVER_ 260
#define UNICAST_ 261
#define MULTICAST_ 262
#define IFACE_ID_ 263
#define IFACE_ID_ORDER_ 264
#define LOGNAME_ 265
#define LOGLEVEL_ 266
#define LOGMODE_ 267
#define WORKDIR_ 268
#define DUID_ 269
#define OPTION_ 270
#define REMOTE_ID_ 271
#define ECHO_REQUEST_ 272
#define RELAY_ID_ 273
#define LINK_LAYER_ 274
#define GUESS_MODE_ 275
#define STRING_ 276
#define HEXNUMBER_ 277
#define INTNUMBER_ 278
#define IPV6ADDR_ 279
#line 169 "../bison++/bison.h"
/* #defines token */
/* after #define tokens, before const tokens S5*/
#else
#ifndef YY_RelParser_CLASS
#define YY_RelParser_CLASS RelParser
#endif
#ifndef YY_RelParser_INHERIT
#define YY_RelParser_INHERIT
#endif
#ifndef YY_RelParser_MEMBERS
#define YY_RelParser_MEMBERS
#endif
#ifndef YY_RelParser_LEX_BODY
#define YY_RelParser_LEX_BODY
#endif
#ifndef YY_RelParser_ERROR_BODY
#define YY_RelParser_ERROR_BODY
#endif
#ifndef YY_RelParser_CONSTRUCTOR_PARAM
#define YY_RelParser_CONSTRUCTOR_PARAM
#endif
/* choose between enum and const */
#ifndef YY_RelParser_USE_CONST_TOKEN
#define YY_RelParser_USE_CONST_TOKEN 0
/* yes enum is more compatible with flex, */
/* so by default we use it */
#endif
#if YY_RelParser_USE_CONST_TOKEN != 0
#ifndef YY_RelParser_ENUM_TOKEN
#define YY_RelParser_ENUM_TOKEN yy_RelParser_enum_token
#endif
#endif
class YY_RelParser_CLASS YY_RelParser_INHERIT
{
public:
#if YY_RelParser_USE_CONST_TOKEN != 0
/* static const int token ... */
#line 212 "../bison++/bison.h"
static const int IFACE_;
static const int CLIENT_;
static const int SERVER_;
static const int UNICAST_;
static const int MULTICAST_;
static const int IFACE_ID_;
static const int IFACE_ID_ORDER_;
static const int LOGNAME_;
static const int LOGLEVEL_;
static const int LOGMODE_;
static const int WORKDIR_;
static const int DUID_;
static const int OPTION_;
static const int REMOTE_ID_;
static const int ECHO_REQUEST_;
static const int RELAY_ID_;
static const int LINK_LAYER_;
static const int GUESS_MODE_;
static const int STRING_;
static const int HEXNUMBER_;
static const int INTNUMBER_;
static const int IPV6ADDR_;
#line 212 "../bison++/bison.h"
/* decl const */
#else
enum YY_RelParser_ENUM_TOKEN { YY_RelParser_NULL_TOKEN=0
#line 215 "../bison++/bison.h"
,IFACE_=258
,CLIENT_=259
,SERVER_=260
,UNICAST_=261
,MULTICAST_=262
,IFACE_ID_=263
,IFACE_ID_ORDER_=264
,LOGNAME_=265
,LOGLEVEL_=266
,LOGMODE_=267
,WORKDIR_=268
,DUID_=269
,OPTION_=270
,REMOTE_ID_=271
,ECHO_REQUEST_=272
,RELAY_ID_=273
,LINK_LAYER_=274
,GUESS_MODE_=275
,STRING_=276
,HEXNUMBER_=277
,INTNUMBER_=278
,IPV6ADDR_=279
#line 215 "../bison++/bison.h"
/* enum token */
}; /* end of enum declaration */
#endif
public:
int YY_RelParser_PARSE(YY_RelParser_PARSE_PARAM);
virtual void YY_RelParser_ERROR(char *msg) YY_RelParser_ERROR_BODY;
#ifdef YY_RelParser_PURE
#ifdef YY_RelParser_LSP_NEEDED
virtual int YY_RelParser_LEX(YY_RelParser_STYPE *YY_RelParser_LVAL,YY_RelParser_LTYPE *YY_RelParser_LLOC) YY_RelParser_LEX_BODY;
#else
virtual int YY_RelParser_LEX(YY_RelParser_STYPE *YY_RelParser_LVAL) YY_RelParser_LEX_BODY;
#endif
#else
virtual int YY_RelParser_LEX() YY_RelParser_LEX_BODY;
YY_RelParser_STYPE YY_RelParser_LVAL;
#ifdef YY_RelParser_LSP_NEEDED
YY_RelParser_LTYPE YY_RelParser_LLOC;
#endif
int YY_RelParser_NERRS;
int YY_RelParser_CHAR;
#endif
#if YY_RelParser_DEBUG != 0
public:
int YY_RelParser_DEBUG_FLAG; /* nonzero means print parse trace */
#endif
public:
YY_RelParser_CLASS(YY_RelParser_CONSTRUCTOR_PARAM);
public:
YY_RelParser_MEMBERS
};
/* other declare folow */
#endif
#if YY_RelParser_COMPATIBILITY != 0
/* backward compatibility */
/* Removed due to bison problems
/#ifndef YYSTYPE
/ #define YYSTYPE YY_RelParser_STYPE
/#endif*/
#ifndef YYLTYPE
#define YYLTYPE YY_RelParser_LTYPE
#endif
#ifndef YYDEBUG
#ifdef YY_RelParser_DEBUG
#define YYDEBUG YY_RelParser_DEBUG
#endif
#endif
#endif
/* END */
#line 267 "../bison++/bison.h"
#endif
|