dhcp4_parser.h 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133
  1. // A Bison parser, made by GNU Bison 3.0.4.
  2. // Skeleton interface for Bison LALR(1) parsers in C++
  3. // Copyright (C) 2002-2015 Free Software Foundation, Inc.
  4. // This program is free software: you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation, either version 3 of the License, or
  7. // (at your option) any later version.
  8. // This program is distributed in the hope that it will be useful,
  9. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. // GNU General Public License for more details.
  12. // You should have received a copy of the GNU General Public License
  13. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. // As a special exception, you may create a larger work that contains
  15. // part or all of the Bison parser skeleton and distribute that work
  16. // under terms of your choice, so long as that work isn't itself a
  17. // parser generator using the skeleton or a modified version thereof
  18. // as a parser skeleton. Alternatively, if you modify or redistribute
  19. // the parser skeleton itself, you may (at your option) remove this
  20. // special exception, which will cause the skeleton and the resulting
  21. // Bison output files to be licensed under the GNU General Public
  22. // License without this special exception.
  23. // This special exception was added by the Free Software Foundation in
  24. // version 2.2 of Bison.
  25. /**
  26. ** \file dhcp4_parser.h
  27. ** Define the isc::dhcp::parser class.
  28. */
  29. // C++ LALR(1) parser skeleton written by Akim Demaille.
  30. #ifndef YY_PARSER4_DHCP4_PARSER_H_INCLUDED
  31. # define YY_PARSER4_DHCP4_PARSER_H_INCLUDED
  32. // // "%code requires" blocks.
  33. #line 17 "dhcp4_parser.yy" // lalr1.cc:377
  34. #include <string>
  35. #include <cc/data.h>
  36. #include <dhcp/option.h>
  37. #include <boost/lexical_cast.hpp>
  38. #include <dhcp4/parser_context_decl.h>
  39. using namespace isc::dhcp;
  40. using namespace isc::data;
  41. using namespace std;
  42. #line 56 "dhcp4_parser.h" // lalr1.cc:377
  43. # include <cassert>
  44. # include <cstdlib> // std::abort
  45. # include <iostream>
  46. # include <stdexcept>
  47. # include <string>
  48. # include <vector>
  49. # include "stack.hh"
  50. # include "location.hh"
  51. #include <typeinfo>
  52. #ifndef YYASSERT
  53. # include <cassert>
  54. # define YYASSERT assert
  55. #endif
  56. #ifndef YY_ATTRIBUTE
  57. # if (defined __GNUC__ \
  58. && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
  59. || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
  60. # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
  61. # else
  62. # define YY_ATTRIBUTE(Spec) /* empty */
  63. # endif
  64. #endif
  65. #ifndef YY_ATTRIBUTE_PURE
  66. # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
  67. #endif
  68. #ifndef YY_ATTRIBUTE_UNUSED
  69. # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
  70. #endif
  71. #if !defined _Noreturn \
  72. && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
  73. # if defined _MSC_VER && 1200 <= _MSC_VER
  74. # define _Noreturn __declspec (noreturn)
  75. # else
  76. # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
  77. # endif
  78. #endif
  79. /* Suppress unused-variable warnings by "using" E. */
  80. #if ! defined lint || defined __GNUC__
  81. # define YYUSE(E) ((void) (E))
  82. #else
  83. # define YYUSE(E) /* empty */
  84. #endif
  85. #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
  86. /* Suppress an incorrect diagnostic about yylval being uninitialized. */
  87. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  88. _Pragma ("GCC diagnostic push") \
  89. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
  90. _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  91. # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
  92. _Pragma ("GCC diagnostic pop")
  93. #else
  94. # define YY_INITIAL_VALUE(Value) Value
  95. #endif
  96. #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  97. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  98. # define YY_IGNORE_MAYBE_UNINITIALIZED_END
  99. #endif
  100. #ifndef YY_INITIAL_VALUE
  101. # define YY_INITIAL_VALUE(Value) /* Nothing. */
  102. #endif
  103. /* Debug traces. */
  104. #ifndef PARSER4_DEBUG
  105. # if defined YYDEBUG
  106. #if YYDEBUG
  107. # define PARSER4_DEBUG 1
  108. # else
  109. # define PARSER4_DEBUG 0
  110. # endif
  111. # else /* ! defined YYDEBUG */
  112. # define PARSER4_DEBUG 1
  113. # endif /* ! defined YYDEBUG */
  114. #endif /* ! defined PARSER4_DEBUG */
  115. #line 14 "dhcp4_parser.yy" // lalr1.cc:377
  116. namespace isc { namespace dhcp {
  117. #line 141 "dhcp4_parser.h" // lalr1.cc:377
  118. /// A char[S] buffer to store and retrieve objects.
  119. ///
  120. /// Sort of a variant, but does not keep track of the nature
  121. /// of the stored data, since that knowledge is available
  122. /// via the current state.
  123. template <size_t S>
  124. struct variant
  125. {
  126. /// Type of *this.
  127. typedef variant<S> self_type;
  128. /// Empty construction.
  129. variant ()
  130. : yytypeid_ (YY_NULLPTR)
  131. {}
  132. /// Construct and fill.
  133. template <typename T>
  134. variant (const T& t)
  135. : yytypeid_ (&typeid (T))
  136. {
  137. YYASSERT (sizeof (T) <= S);
  138. new (yyas_<T> ()) T (t);
  139. }
  140. /// Destruction, allowed only if empty.
  141. ~variant ()
  142. {
  143. YYASSERT (!yytypeid_);
  144. }
  145. /// Instantiate an empty \a T in here.
  146. template <typename T>
  147. T&
  148. build ()
  149. {
  150. YYASSERT (!yytypeid_);
  151. YYASSERT (sizeof (T) <= S);
  152. yytypeid_ = & typeid (T);
  153. return *new (yyas_<T> ()) T;
  154. }
  155. /// Instantiate a \a T in here from \a t.
  156. template <typename T>
  157. T&
  158. build (const T& t)
  159. {
  160. YYASSERT (!yytypeid_);
  161. YYASSERT (sizeof (T) <= S);
  162. yytypeid_ = & typeid (T);
  163. return *new (yyas_<T> ()) T (t);
  164. }
  165. /// Accessor to a built \a T.
  166. template <typename T>
  167. T&
  168. as ()
  169. {
  170. YYASSERT (*yytypeid_ == typeid (T));
  171. YYASSERT (sizeof (T) <= S);
  172. return *yyas_<T> ();
  173. }
  174. /// Const accessor to a built \a T (for %printer).
  175. template <typename T>
  176. const T&
  177. as () const
  178. {
  179. YYASSERT (*yytypeid_ == typeid (T));
  180. YYASSERT (sizeof (T) <= S);
  181. return *yyas_<T> ();
  182. }
  183. /// Swap the content with \a other, of same type.
  184. ///
  185. /// Both variants must be built beforehand, because swapping the actual
  186. /// data requires reading it (with as()), and this is not possible on
  187. /// unconstructed variants: it would require some dynamic testing, which
  188. /// should not be the variant's responsability.
  189. /// Swapping between built and (possibly) non-built is done with
  190. /// variant::move ().
  191. template <typename T>
  192. void
  193. swap (self_type& other)
  194. {
  195. YYASSERT (yytypeid_);
  196. YYASSERT (*yytypeid_ == *other.yytypeid_);
  197. std::swap (as<T> (), other.as<T> ());
  198. }
  199. /// Move the content of \a other to this.
  200. ///
  201. /// Destroys \a other.
  202. template <typename T>
  203. void
  204. move (self_type& other)
  205. {
  206. build<T> ();
  207. swap<T> (other);
  208. other.destroy<T> ();
  209. }
  210. /// Copy the content of \a other to this.
  211. template <typename T>
  212. void
  213. copy (const self_type& other)
  214. {
  215. build<T> (other.as<T> ());
  216. }
  217. /// Destroy the stored \a T.
  218. template <typename T>
  219. void
  220. destroy ()
  221. {
  222. as<T> ().~T ();
  223. yytypeid_ = YY_NULLPTR;
  224. }
  225. private:
  226. /// Prohibit blind copies.
  227. self_type& operator=(const self_type&);
  228. variant (const self_type&);
  229. /// Accessor to raw memory as \a T.
  230. template <typename T>
  231. T*
  232. yyas_ ()
  233. {
  234. void *yyp = yybuffer_.yyraw;
  235. return static_cast<T*> (yyp);
  236. }
  237. /// Const accessor to raw memory as \a T.
  238. template <typename T>
  239. const T*
  240. yyas_ () const
  241. {
  242. const void *yyp = yybuffer_.yyraw;
  243. return static_cast<const T*> (yyp);
  244. }
  245. union
  246. {
  247. /// Strongest alignment constraints.
  248. long double yyalign_me;
  249. /// A buffer large enough to store any of the semantic values.
  250. char yyraw[S];
  251. } yybuffer_;
  252. /// Whether the content is built: if defined, the name of the stored type.
  253. const std::type_info *yytypeid_;
  254. };
  255. /// A Bison parser.
  256. class Dhcp4Parser
  257. {
  258. public:
  259. #ifndef PARSER4_STYPE
  260. /// An auxiliary type to compute the largest semantic type.
  261. union union_type
  262. {
  263. // value
  264. // db_type
  265. char dummy1[sizeof(ElementPtr)];
  266. // "boolean"
  267. char dummy2[sizeof(bool)];
  268. // "floating point"
  269. char dummy3[sizeof(double)];
  270. // "integer"
  271. char dummy4[sizeof(int64_t)];
  272. // "constant string"
  273. char dummy5[sizeof(std::string)];
  274. };
  275. /// Symbol semantic values.
  276. typedef variant<sizeof(union_type)> semantic_type;
  277. #else
  278. typedef PARSER4_STYPE semantic_type;
  279. #endif
  280. /// Symbol locations.
  281. typedef location location_type;
  282. /// Syntax errors thrown from user actions.
  283. struct syntax_error : std::runtime_error
  284. {
  285. syntax_error (const location_type& l, const std::string& m);
  286. location_type location;
  287. };
  288. /// Tokens.
  289. struct token
  290. {
  291. enum yytokentype
  292. {
  293. TOKEN_END = 0,
  294. TOKEN_COMMA = 258,
  295. TOKEN_COLON = 259,
  296. TOKEN_LSQUARE_BRACKET = 260,
  297. TOKEN_RSQUARE_BRACKET = 261,
  298. TOKEN_LCURLY_BRACKET = 262,
  299. TOKEN_RCURLY_BRACKET = 263,
  300. TOKEN_NULL_TYPE = 264,
  301. TOKEN_DHCP4 = 265,
  302. TOKEN_INTERFACES_CONFIG = 266,
  303. TOKEN_INTERFACES = 267,
  304. TOKEN_DHCP_SOCKET_TYPE = 268,
  305. TOKEN_ECHO_CLIENT_ID = 269,
  306. TOKEN_MATCH_CLIENT_ID = 270,
  307. TOKEN_NEXT_SERVER = 271,
  308. TOKEN_SERVER_HOSTNAME = 272,
  309. TOKEN_BOOT_FILE_NAME = 273,
  310. TOKEN_LEASE_DATABASE = 274,
  311. TOKEN_HOSTS_DATABASE = 275,
  312. TOKEN_TYPE = 276,
  313. TOKEN_MEMFILE = 277,
  314. TOKEN_MYSQL = 278,
  315. TOKEN_POSTGRESQL = 279,
  316. TOKEN_CQL = 280,
  317. TOKEN_USER = 281,
  318. TOKEN_PASSWORD = 282,
  319. TOKEN_HOST = 283,
  320. TOKEN_PERSIST = 284,
  321. TOKEN_LFC_INTERVAL = 285,
  322. TOKEN_READONLY = 286,
  323. TOKEN_CONNECT_TIMEOUT = 287,
  324. TOKEN_VALID_LIFETIME = 288,
  325. TOKEN_RENEW_TIMER = 289,
  326. TOKEN_REBIND_TIMER = 290,
  327. TOKEN_DECLINE_PROBATION_PERIOD = 291,
  328. TOKEN_SUBNET4 = 292,
  329. TOKEN_SUBNET_4O6_INTERFACE = 293,
  330. TOKEN_SUBNET_4O6_INTERFACE_ID = 294,
  331. TOKEN_SUBNET_4O6_SUBNET = 295,
  332. TOKEN_OPTION_DEF = 296,
  333. TOKEN_OPTION_DATA = 297,
  334. TOKEN_NAME = 298,
  335. TOKEN_DATA = 299,
  336. TOKEN_CODE = 300,
  337. TOKEN_SPACE = 301,
  338. TOKEN_CSV_FORMAT = 302,
  339. TOKEN_RECORD_TYPES = 303,
  340. TOKEN_ENCAPSULATE = 304,
  341. TOKEN_ARRAY = 305,
  342. TOKEN_POOLS = 306,
  343. TOKEN_POOL = 307,
  344. TOKEN_SUBNET = 308,
  345. TOKEN_INTERFACE = 309,
  346. TOKEN_INTERFACE_ID = 310,
  347. TOKEN_ID = 311,
  348. TOKEN_RAPID_COMMIT = 312,
  349. TOKEN_RESERVATION_MODE = 313,
  350. TOKEN_HOST_RESERVATION_IDENTIFIERS = 314,
  351. TOKEN_CLIENT_CLASSES = 315,
  352. TOKEN_TEST = 316,
  353. TOKEN_CLIENT_CLASS = 317,
  354. TOKEN_RESERVATIONS = 318,
  355. TOKEN_DUID = 319,
  356. TOKEN_HW_ADDRESS = 320,
  357. TOKEN_CIRCUIT_ID = 321,
  358. TOKEN_CLIENT_ID = 322,
  359. TOKEN_HOSTNAME = 323,
  360. TOKEN_RELAY = 324,
  361. TOKEN_IP_ADDRESS = 325,
  362. TOKEN_HOOKS_LIBRARIES = 326,
  363. TOKEN_LIBRARY = 327,
  364. TOKEN_PARAMETERS = 328,
  365. TOKEN_EXPIRED_LEASES_PROCESSING = 329,
  366. TOKEN_DHCP4O6_PORT = 330,
  367. TOKEN_CONTROL_SOCKET = 331,
  368. TOKEN_SOCKET_TYPE = 332,
  369. TOKEN_SOCKET_NAME = 333,
  370. TOKEN_DHCP_DDNS = 334,
  371. TOKEN_LOGGING = 335,
  372. TOKEN_LOGGERS = 336,
  373. TOKEN_OUTPUT_OPTIONS = 337,
  374. TOKEN_OUTPUT = 338,
  375. TOKEN_DEBUGLEVEL = 339,
  376. TOKEN_SEVERITY = 340,
  377. TOKEN_DHCP6 = 341,
  378. TOKEN_DHCPDDNS = 342,
  379. TOKEN_TOPLEVEL_JSON = 343,
  380. TOKEN_TOPLEVEL_DHCP4 = 344,
  381. TOKEN_SUB_DHCP4 = 345,
  382. TOKEN_SUB_INTERFACES4 = 346,
  383. TOKEN_SUB_SUBNET4 = 347,
  384. TOKEN_SUB_POOL4 = 348,
  385. TOKEN_SUB_RESERVATION = 349,
  386. TOKEN_SUB_OPTION_DEF = 350,
  387. TOKEN_SUB_OPTION_DATA = 351,
  388. TOKEN_SUB_HOOKS_LIBRARY = 352,
  389. TOKEN_STRING = 353,
  390. TOKEN_INTEGER = 354,
  391. TOKEN_FLOAT = 355,
  392. TOKEN_BOOLEAN = 356
  393. };
  394. };
  395. /// (External) token type, as returned by yylex.
  396. typedef token::yytokentype token_type;
  397. /// Symbol type: an internal symbol number.
  398. typedef int symbol_number_type;
  399. /// The symbol type number to denote an empty symbol.
  400. enum { empty_symbol = -2 };
  401. /// Internal symbol number for tokens (subsumed by symbol_number_type).
  402. typedef unsigned char token_number_type;
  403. /// A complete symbol.
  404. ///
  405. /// Expects its Base type to provide access to the symbol type
  406. /// via type_get().
  407. ///
  408. /// Provide access to semantic value and location.
  409. template <typename Base>
  410. struct basic_symbol : Base
  411. {
  412. /// Alias to Base.
  413. typedef Base super_type;
  414. /// Default constructor.
  415. basic_symbol ();
  416. /// Copy constructor.
  417. basic_symbol (const basic_symbol& other);
  418. /// Constructor for valueless symbols, and symbols from each type.
  419. basic_symbol (typename Base::kind_type t, const location_type& l);
  420. basic_symbol (typename Base::kind_type t, const ElementPtr v, const location_type& l);
  421. basic_symbol (typename Base::kind_type t, const bool v, const location_type& l);
  422. basic_symbol (typename Base::kind_type t, const double v, const location_type& l);
  423. basic_symbol (typename Base::kind_type t, const int64_t v, const location_type& l);
  424. basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l);
  425. /// Constructor for symbols with semantic value.
  426. basic_symbol (typename Base::kind_type t,
  427. const semantic_type& v,
  428. const location_type& l);
  429. /// Destroy the symbol.
  430. ~basic_symbol ();
  431. /// Destroy contents, and record that is empty.
  432. void clear ();
  433. /// Whether empty.
  434. bool empty () const;
  435. /// Destructive move, \a s is emptied into this.
  436. void move (basic_symbol& s);
  437. /// The semantic value.
  438. semantic_type value;
  439. /// The location.
  440. location_type location;
  441. private:
  442. /// Assignment operator.
  443. basic_symbol& operator= (const basic_symbol& other);
  444. };
  445. /// Type access provider for token (enum) based symbols.
  446. struct by_type
  447. {
  448. /// Default constructor.
  449. by_type ();
  450. /// Copy constructor.
  451. by_type (const by_type& other);
  452. /// The symbol type as needed by the constructor.
  453. typedef token_type kind_type;
  454. /// Constructor from (external) token numbers.
  455. by_type (kind_type t);
  456. /// Record that this symbol is empty.
  457. void clear ();
  458. /// Steal the symbol type from \a that.
  459. void move (by_type& that);
  460. /// The (internal) type number (corresponding to \a type).
  461. /// \a empty when empty.
  462. symbol_number_type type_get () const;
  463. /// The token.
  464. token_type token () const;
  465. /// The symbol type.
  466. /// \a empty_symbol when empty.
  467. /// An int, not token_number_type, to be able to store empty_symbol.
  468. int type;
  469. };
  470. /// "External" symbols: returned by the scanner.
  471. typedef basic_symbol<by_type> symbol_type;
  472. // Symbol constructors declarations.
  473. static inline
  474. symbol_type
  475. make_END (const location_type& l);
  476. static inline
  477. symbol_type
  478. make_COMMA (const location_type& l);
  479. static inline
  480. symbol_type
  481. make_COLON (const location_type& l);
  482. static inline
  483. symbol_type
  484. make_LSQUARE_BRACKET (const location_type& l);
  485. static inline
  486. symbol_type
  487. make_RSQUARE_BRACKET (const location_type& l);
  488. static inline
  489. symbol_type
  490. make_LCURLY_BRACKET (const location_type& l);
  491. static inline
  492. symbol_type
  493. make_RCURLY_BRACKET (const location_type& l);
  494. static inline
  495. symbol_type
  496. make_NULL_TYPE (const location_type& l);
  497. static inline
  498. symbol_type
  499. make_DHCP4 (const location_type& l);
  500. static inline
  501. symbol_type
  502. make_INTERFACES_CONFIG (const location_type& l);
  503. static inline
  504. symbol_type
  505. make_INTERFACES (const location_type& l);
  506. static inline
  507. symbol_type
  508. make_DHCP_SOCKET_TYPE (const location_type& l);
  509. static inline
  510. symbol_type
  511. make_ECHO_CLIENT_ID (const location_type& l);
  512. static inline
  513. symbol_type
  514. make_MATCH_CLIENT_ID (const location_type& l);
  515. static inline
  516. symbol_type
  517. make_NEXT_SERVER (const location_type& l);
  518. static inline
  519. symbol_type
  520. make_SERVER_HOSTNAME (const location_type& l);
  521. static inline
  522. symbol_type
  523. make_BOOT_FILE_NAME (const location_type& l);
  524. static inline
  525. symbol_type
  526. make_LEASE_DATABASE (const location_type& l);
  527. static inline
  528. symbol_type
  529. make_HOSTS_DATABASE (const location_type& l);
  530. static inline
  531. symbol_type
  532. make_TYPE (const location_type& l);
  533. static inline
  534. symbol_type
  535. make_MEMFILE (const location_type& l);
  536. static inline
  537. symbol_type
  538. make_MYSQL (const location_type& l);
  539. static inline
  540. symbol_type
  541. make_POSTGRESQL (const location_type& l);
  542. static inline
  543. symbol_type
  544. make_CQL (const location_type& l);
  545. static inline
  546. symbol_type
  547. make_USER (const location_type& l);
  548. static inline
  549. symbol_type
  550. make_PASSWORD (const location_type& l);
  551. static inline
  552. symbol_type
  553. make_HOST (const location_type& l);
  554. static inline
  555. symbol_type
  556. make_PERSIST (const location_type& l);
  557. static inline
  558. symbol_type
  559. make_LFC_INTERVAL (const location_type& l);
  560. static inline
  561. symbol_type
  562. make_READONLY (const location_type& l);
  563. static inline
  564. symbol_type
  565. make_CONNECT_TIMEOUT (const location_type& l);
  566. static inline
  567. symbol_type
  568. make_VALID_LIFETIME (const location_type& l);
  569. static inline
  570. symbol_type
  571. make_RENEW_TIMER (const location_type& l);
  572. static inline
  573. symbol_type
  574. make_REBIND_TIMER (const location_type& l);
  575. static inline
  576. symbol_type
  577. make_DECLINE_PROBATION_PERIOD (const location_type& l);
  578. static inline
  579. symbol_type
  580. make_SUBNET4 (const location_type& l);
  581. static inline
  582. symbol_type
  583. make_SUBNET_4O6_INTERFACE (const location_type& l);
  584. static inline
  585. symbol_type
  586. make_SUBNET_4O6_INTERFACE_ID (const location_type& l);
  587. static inline
  588. symbol_type
  589. make_SUBNET_4O6_SUBNET (const location_type& l);
  590. static inline
  591. symbol_type
  592. make_OPTION_DEF (const location_type& l);
  593. static inline
  594. symbol_type
  595. make_OPTION_DATA (const location_type& l);
  596. static inline
  597. symbol_type
  598. make_NAME (const location_type& l);
  599. static inline
  600. symbol_type
  601. make_DATA (const location_type& l);
  602. static inline
  603. symbol_type
  604. make_CODE (const location_type& l);
  605. static inline
  606. symbol_type
  607. make_SPACE (const location_type& l);
  608. static inline
  609. symbol_type
  610. make_CSV_FORMAT (const location_type& l);
  611. static inline
  612. symbol_type
  613. make_RECORD_TYPES (const location_type& l);
  614. static inline
  615. symbol_type
  616. make_ENCAPSULATE (const location_type& l);
  617. static inline
  618. symbol_type
  619. make_ARRAY (const location_type& l);
  620. static inline
  621. symbol_type
  622. make_POOLS (const location_type& l);
  623. static inline
  624. symbol_type
  625. make_POOL (const location_type& l);
  626. static inline
  627. symbol_type
  628. make_SUBNET (const location_type& l);
  629. static inline
  630. symbol_type
  631. make_INTERFACE (const location_type& l);
  632. static inline
  633. symbol_type
  634. make_INTERFACE_ID (const location_type& l);
  635. static inline
  636. symbol_type
  637. make_ID (const location_type& l);
  638. static inline
  639. symbol_type
  640. make_RAPID_COMMIT (const location_type& l);
  641. static inline
  642. symbol_type
  643. make_RESERVATION_MODE (const location_type& l);
  644. static inline
  645. symbol_type
  646. make_HOST_RESERVATION_IDENTIFIERS (const location_type& l);
  647. static inline
  648. symbol_type
  649. make_CLIENT_CLASSES (const location_type& l);
  650. static inline
  651. symbol_type
  652. make_TEST (const location_type& l);
  653. static inline
  654. symbol_type
  655. make_CLIENT_CLASS (const location_type& l);
  656. static inline
  657. symbol_type
  658. make_RESERVATIONS (const location_type& l);
  659. static inline
  660. symbol_type
  661. make_DUID (const location_type& l);
  662. static inline
  663. symbol_type
  664. make_HW_ADDRESS (const location_type& l);
  665. static inline
  666. symbol_type
  667. make_CIRCUIT_ID (const location_type& l);
  668. static inline
  669. symbol_type
  670. make_CLIENT_ID (const location_type& l);
  671. static inline
  672. symbol_type
  673. make_HOSTNAME (const location_type& l);
  674. static inline
  675. symbol_type
  676. make_RELAY (const location_type& l);
  677. static inline
  678. symbol_type
  679. make_IP_ADDRESS (const location_type& l);
  680. static inline
  681. symbol_type
  682. make_HOOKS_LIBRARIES (const location_type& l);
  683. static inline
  684. symbol_type
  685. make_LIBRARY (const location_type& l);
  686. static inline
  687. symbol_type
  688. make_PARAMETERS (const location_type& l);
  689. static inline
  690. symbol_type
  691. make_EXPIRED_LEASES_PROCESSING (const location_type& l);
  692. static inline
  693. symbol_type
  694. make_DHCP4O6_PORT (const location_type& l);
  695. static inline
  696. symbol_type
  697. make_CONTROL_SOCKET (const location_type& l);
  698. static inline
  699. symbol_type
  700. make_SOCKET_TYPE (const location_type& l);
  701. static inline
  702. symbol_type
  703. make_SOCKET_NAME (const location_type& l);
  704. static inline
  705. symbol_type
  706. make_DHCP_DDNS (const location_type& l);
  707. static inline
  708. symbol_type
  709. make_LOGGING (const location_type& l);
  710. static inline
  711. symbol_type
  712. make_LOGGERS (const location_type& l);
  713. static inline
  714. symbol_type
  715. make_OUTPUT_OPTIONS (const location_type& l);
  716. static inline
  717. symbol_type
  718. make_OUTPUT (const location_type& l);
  719. static inline
  720. symbol_type
  721. make_DEBUGLEVEL (const location_type& l);
  722. static inline
  723. symbol_type
  724. make_SEVERITY (const location_type& l);
  725. static inline
  726. symbol_type
  727. make_DHCP6 (const location_type& l);
  728. static inline
  729. symbol_type
  730. make_DHCPDDNS (const location_type& l);
  731. static inline
  732. symbol_type
  733. make_TOPLEVEL_JSON (const location_type& l);
  734. static inline
  735. symbol_type
  736. make_TOPLEVEL_DHCP4 (const location_type& l);
  737. static inline
  738. symbol_type
  739. make_SUB_DHCP4 (const location_type& l);
  740. static inline
  741. symbol_type
  742. make_SUB_INTERFACES4 (const location_type& l);
  743. static inline
  744. symbol_type
  745. make_SUB_SUBNET4 (const location_type& l);
  746. static inline
  747. symbol_type
  748. make_SUB_POOL4 (const location_type& l);
  749. static inline
  750. symbol_type
  751. make_SUB_RESERVATION (const location_type& l);
  752. static inline
  753. symbol_type
  754. make_SUB_OPTION_DEF (const location_type& l);
  755. static inline
  756. symbol_type
  757. make_SUB_OPTION_DATA (const location_type& l);
  758. static inline
  759. symbol_type
  760. make_SUB_HOOKS_LIBRARY (const location_type& l);
  761. static inline
  762. symbol_type
  763. make_STRING (const std::string& v, const location_type& l);
  764. static inline
  765. symbol_type
  766. make_INTEGER (const int64_t& v, const location_type& l);
  767. static inline
  768. symbol_type
  769. make_FLOAT (const double& v, const location_type& l);
  770. static inline
  771. symbol_type
  772. make_BOOLEAN (const bool& v, const location_type& l);
  773. /// Build a parser object.
  774. Dhcp4Parser (isc::dhcp::Parser4Context& ctx_yyarg);
  775. virtual ~Dhcp4Parser ();
  776. /// Parse.
  777. /// \returns 0 iff parsing succeeded.
  778. virtual int parse ();
  779. #if PARSER4_DEBUG
  780. /// The current debugging stream.
  781. std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
  782. /// Set the current debugging stream.
  783. void set_debug_stream (std::ostream &);
  784. /// Type for debugging levels.
  785. typedef int debug_level_type;
  786. /// The current debugging level.
  787. debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
  788. /// Set the current debugging level.
  789. void set_debug_level (debug_level_type l);
  790. #endif
  791. /// Report a syntax error.
  792. /// \param loc where the syntax error is found.
  793. /// \param msg a description of the syntax error.
  794. virtual void error (const location_type& loc, const std::string& msg);
  795. /// Report a syntax error.
  796. void error (const syntax_error& err);
  797. private:
  798. /// This class is not copyable.
  799. Dhcp4Parser (const Dhcp4Parser&);
  800. Dhcp4Parser& operator= (const Dhcp4Parser&);
  801. /// State numbers.
  802. typedef int state_type;
  803. /// Generate an error message.
  804. /// \param yystate the state where the error occurred.
  805. /// \param yyla the lookahead token.
  806. virtual std::string yysyntax_error_ (state_type yystate,
  807. const symbol_type& yyla) const;
  808. /// Compute post-reduction state.
  809. /// \param yystate the current state
  810. /// \param yysym the nonterminal to push on the stack
  811. state_type yy_lr_goto_state_ (state_type yystate, int yysym);
  812. /// Whether the given \c yypact_ value indicates a defaulted state.
  813. /// \param yyvalue the value to check
  814. static bool yy_pact_value_is_default_ (int yyvalue);
  815. /// Whether the given \c yytable_ value indicates a syntax error.
  816. /// \param yyvalue the value to check
  817. static bool yy_table_value_is_error_ (int yyvalue);
  818. static const short int yypact_ninf_;
  819. static const signed char yytable_ninf_;
  820. /// Convert a scanner token number \a t to a symbol number.
  821. static token_number_type yytranslate_ (token_type t);
  822. // Tables.
  823. // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  824. // STATE-NUM.
  825. static const short int yypact_[];
  826. // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  827. // Performed when YYTABLE does not specify something else to do. Zero
  828. // means the default is an error.
  829. static const unsigned short int yydefact_[];
  830. // YYPGOTO[NTERM-NUM].
  831. static const short int yypgoto_[];
  832. // YYDEFGOTO[NTERM-NUM].
  833. static const short int yydefgoto_[];
  834. // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
  835. // positive, shift that token. If negative, reduce the rule whose
  836. // number is the opposite. If YYTABLE_NINF, syntax error.
  837. static const unsigned short int yytable_[];
  838. static const short int yycheck_[];
  839. // YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  840. // symbol of state STATE-NUM.
  841. static const unsigned short int yystos_[];
  842. // YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
  843. static const unsigned short int yyr1_[];
  844. // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
  845. static const unsigned char yyr2_[];
  846. /// Convert the symbol name \a n to a form suitable for a diagnostic.
  847. static std::string yytnamerr_ (const char *n);
  848. /// For a symbol, its name in clear.
  849. static const char* const yytname_[];
  850. #if PARSER4_DEBUG
  851. // YYRLINE[YYN] -- Source line where rule number YYN was defined.
  852. static const unsigned short int yyrline_[];
  853. /// Report on the debug stream that the rule \a r is going to be reduced.
  854. virtual void yy_reduce_print_ (int r);
  855. /// Print the state stack on the debug stream.
  856. virtual void yystack_print_ ();
  857. // Debugging.
  858. int yydebug_;
  859. std::ostream* yycdebug_;
  860. /// \brief Display a symbol type, value and location.
  861. /// \param yyo The output stream.
  862. /// \param yysym The symbol.
  863. template <typename Base>
  864. void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
  865. #endif
  866. /// \brief Reclaim the memory associated to a symbol.
  867. /// \param yymsg Why this token is reclaimed.
  868. /// If null, print nothing.
  869. /// \param yysym The symbol.
  870. template <typename Base>
  871. void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
  872. private:
  873. /// Type access provider for state based symbols.
  874. struct by_state
  875. {
  876. /// Default constructor.
  877. by_state ();
  878. /// The symbol type as needed by the constructor.
  879. typedef state_type kind_type;
  880. /// Constructor.
  881. by_state (kind_type s);
  882. /// Copy constructor.
  883. by_state (const by_state& other);
  884. /// Record that this symbol is empty.
  885. void clear ();
  886. /// Steal the symbol type from \a that.
  887. void move (by_state& that);
  888. /// The (internal) type number (corresponding to \a state).
  889. /// \a empty_symbol when empty.
  890. symbol_number_type type_get () const;
  891. /// The state number used to denote an empty symbol.
  892. enum { empty_state = -1 };
  893. /// The state.
  894. /// \a empty when empty.
  895. state_type state;
  896. };
  897. /// "Internal" symbol: element of the stack.
  898. struct stack_symbol_type : basic_symbol<by_state>
  899. {
  900. /// Superclass.
  901. typedef basic_symbol<by_state> super_type;
  902. /// Construct an empty symbol.
  903. stack_symbol_type ();
  904. /// Steal the contents from \a sym to build this.
  905. stack_symbol_type (state_type s, symbol_type& sym);
  906. /// Assignment, needed by push_back.
  907. stack_symbol_type& operator= (const stack_symbol_type& that);
  908. };
  909. /// Stack type.
  910. typedef stack<stack_symbol_type> stack_type;
  911. /// The stack.
  912. stack_type yystack_;
  913. /// Push a new state on the stack.
  914. /// \param m a debug message to display
  915. /// if null, no trace is output.
  916. /// \param s the symbol
  917. /// \warning the contents of \a s.value is stolen.
  918. void yypush_ (const char* m, stack_symbol_type& s);
  919. /// Push a new look ahead token on the state on the stack.
  920. /// \param m a debug message to display
  921. /// if null, no trace is output.
  922. /// \param s the state
  923. /// \param sym the symbol (for its value and location).
  924. /// \warning the contents of \a s.value is stolen.
  925. void yypush_ (const char* m, state_type s, symbol_type& sym);
  926. /// Pop \a n symbols the three stacks.
  927. void yypop_ (unsigned int n = 1);
  928. /// Constants.
  929. enum
  930. {
  931. yyeof_ = 0,
  932. yylast_ = 605, ///< Last index in yytable_.
  933. yynnts_ = 261, ///< Number of nonterminal symbols.
  934. yyfinal_ = 22, ///< Termination state number.
  935. yyterror_ = 1,
  936. yyerrcode_ = 256,
  937. yyntokens_ = 102 ///< Number of tokens.
  938. };
  939. // User arguments.
  940. isc::dhcp::Parser4Context& ctx;
  941. };
  942. // Symbol number corresponding to token number t.
  943. inline
  944. Dhcp4Parser::token_number_type
  945. Dhcp4Parser::yytranslate_ (token_type t)
  946. {
  947. static
  948. const token_number_type
  949. translate_table[] =
  950. {
  951. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  952. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  953. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  954. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  955. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  956. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  957. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  958. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  959. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  960. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  961. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  962. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  963. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  964. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  965. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  966. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  967. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  968. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  969. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  970. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  971. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  972. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  973. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  974. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  975. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  976. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  977. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  978. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  979. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  980. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  981. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
  982. 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
  983. 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
  984. 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
  985. 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
  986. 95, 96, 97, 98, 99, 100, 101
  987. };
  988. const unsigned int user_token_number_max_ = 356;
  989. const token_number_type undef_token_ = 2;
  990. if (static_cast<int>(t) <= yyeof_)
  991. return yyeof_;
  992. else if (static_cast<unsigned int> (t) <= user_token_number_max_)
  993. return translate_table[t];
  994. else
  995. return undef_token_;
  996. }
  997. inline
  998. Dhcp4Parser::syntax_error::syntax_error (const location_type& l, const std::string& m)
  999. : std::runtime_error (m)
  1000. , location (l)
  1001. {}
  1002. // basic_symbol.
  1003. template <typename Base>
  1004. inline
  1005. Dhcp4Parser::basic_symbol<Base>::basic_symbol ()
  1006. : value ()
  1007. {}
  1008. template <typename Base>
  1009. inline
  1010. Dhcp4Parser::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
  1011. : Base (other)
  1012. , value ()
  1013. , location (other.location)
  1014. {
  1015. switch (other.type_get ())
  1016. {
  1017. case 114: // value
  1018. case 161: // db_type
  1019. value.copy< ElementPtr > (other.value);
  1020. break;
  1021. case 101: // "boolean"
  1022. value.copy< bool > (other.value);
  1023. break;
  1024. case 100: // "floating point"
  1025. value.copy< double > (other.value);
  1026. break;
  1027. case 99: // "integer"
  1028. value.copy< int64_t > (other.value);
  1029. break;
  1030. case 98: // "constant string"
  1031. value.copy< std::string > (other.value);
  1032. break;
  1033. default:
  1034. break;
  1035. }
  1036. }
  1037. template <typename Base>
  1038. inline
  1039. Dhcp4Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const semantic_type& v, const location_type& l)
  1040. : Base (t)
  1041. , value ()
  1042. , location (l)
  1043. {
  1044. (void) v;
  1045. switch (this->type_get ())
  1046. {
  1047. case 114: // value
  1048. case 161: // db_type
  1049. value.copy< ElementPtr > (v);
  1050. break;
  1051. case 101: // "boolean"
  1052. value.copy< bool > (v);
  1053. break;
  1054. case 100: // "floating point"
  1055. value.copy< double > (v);
  1056. break;
  1057. case 99: // "integer"
  1058. value.copy< int64_t > (v);
  1059. break;
  1060. case 98: // "constant string"
  1061. value.copy< std::string > (v);
  1062. break;
  1063. default:
  1064. break;
  1065. }
  1066. }
  1067. // Implementation of basic_symbol constructor for each type.
  1068. template <typename Base>
  1069. Dhcp4Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const location_type& l)
  1070. : Base (t)
  1071. , value ()
  1072. , location (l)
  1073. {}
  1074. template <typename Base>
  1075. Dhcp4Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const ElementPtr v, const location_type& l)
  1076. : Base (t)
  1077. , value (v)
  1078. , location (l)
  1079. {}
  1080. template <typename Base>
  1081. Dhcp4Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const bool v, const location_type& l)
  1082. : Base (t)
  1083. , value (v)
  1084. , location (l)
  1085. {}
  1086. template <typename Base>
  1087. Dhcp4Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const double v, const location_type& l)
  1088. : Base (t)
  1089. , value (v)
  1090. , location (l)
  1091. {}
  1092. template <typename Base>
  1093. Dhcp4Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const int64_t v, const location_type& l)
  1094. : Base (t)
  1095. , value (v)
  1096. , location (l)
  1097. {}
  1098. template <typename Base>
  1099. Dhcp4Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l)
  1100. : Base (t)
  1101. , value (v)
  1102. , location (l)
  1103. {}
  1104. template <typename Base>
  1105. inline
  1106. Dhcp4Parser::basic_symbol<Base>::~basic_symbol ()
  1107. {
  1108. clear ();
  1109. }
  1110. template <typename Base>
  1111. inline
  1112. void
  1113. Dhcp4Parser::basic_symbol<Base>::clear ()
  1114. {
  1115. // User destructor.
  1116. symbol_number_type yytype = this->type_get ();
  1117. basic_symbol<Base>& yysym = *this;
  1118. (void) yysym;
  1119. switch (yytype)
  1120. {
  1121. default:
  1122. break;
  1123. }
  1124. // Type destructor.
  1125. switch (yytype)
  1126. {
  1127. case 114: // value
  1128. case 161: // db_type
  1129. value.template destroy< ElementPtr > ();
  1130. break;
  1131. case 101: // "boolean"
  1132. value.template destroy< bool > ();
  1133. break;
  1134. case 100: // "floating point"
  1135. value.template destroy< double > ();
  1136. break;
  1137. case 99: // "integer"
  1138. value.template destroy< int64_t > ();
  1139. break;
  1140. case 98: // "constant string"
  1141. value.template destroy< std::string > ();
  1142. break;
  1143. default:
  1144. break;
  1145. }
  1146. Base::clear ();
  1147. }
  1148. template <typename Base>
  1149. inline
  1150. bool
  1151. Dhcp4Parser::basic_symbol<Base>::empty () const
  1152. {
  1153. return Base::type_get () == empty_symbol;
  1154. }
  1155. template <typename Base>
  1156. inline
  1157. void
  1158. Dhcp4Parser::basic_symbol<Base>::move (basic_symbol& s)
  1159. {
  1160. super_type::move(s);
  1161. switch (this->type_get ())
  1162. {
  1163. case 114: // value
  1164. case 161: // db_type
  1165. value.move< ElementPtr > (s.value);
  1166. break;
  1167. case 101: // "boolean"
  1168. value.move< bool > (s.value);
  1169. break;
  1170. case 100: // "floating point"
  1171. value.move< double > (s.value);
  1172. break;
  1173. case 99: // "integer"
  1174. value.move< int64_t > (s.value);
  1175. break;
  1176. case 98: // "constant string"
  1177. value.move< std::string > (s.value);
  1178. break;
  1179. default:
  1180. break;
  1181. }
  1182. location = s.location;
  1183. }
  1184. // by_type.
  1185. inline
  1186. Dhcp4Parser::by_type::by_type ()
  1187. : type (empty_symbol)
  1188. {}
  1189. inline
  1190. Dhcp4Parser::by_type::by_type (const by_type& other)
  1191. : type (other.type)
  1192. {}
  1193. inline
  1194. Dhcp4Parser::by_type::by_type (token_type t)
  1195. : type (yytranslate_ (t))
  1196. {}
  1197. inline
  1198. void
  1199. Dhcp4Parser::by_type::clear ()
  1200. {
  1201. type = empty_symbol;
  1202. }
  1203. inline
  1204. void
  1205. Dhcp4Parser::by_type::move (by_type& that)
  1206. {
  1207. type = that.type;
  1208. that.clear ();
  1209. }
  1210. inline
  1211. int
  1212. Dhcp4Parser::by_type::type_get () const
  1213. {
  1214. return type;
  1215. }
  1216. inline
  1217. Dhcp4Parser::token_type
  1218. Dhcp4Parser::by_type::token () const
  1219. {
  1220. // YYTOKNUM[NUM] -- (External) token number corresponding to the
  1221. // (internal) symbol number NUM (which must be that of a token). */
  1222. static
  1223. const unsigned short int
  1224. yytoken_number_[] =
  1225. {
  1226. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  1227. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  1228. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  1229. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  1230. 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
  1231. 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
  1232. 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
  1233. 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
  1234. 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
  1235. 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
  1236. 355, 356
  1237. };
  1238. return static_cast<token_type> (yytoken_number_[type]);
  1239. }
  1240. // Implementation of make_symbol for each symbol type.
  1241. Dhcp4Parser::symbol_type
  1242. Dhcp4Parser::make_END (const location_type& l)
  1243. {
  1244. return symbol_type (token::TOKEN_END, l);
  1245. }
  1246. Dhcp4Parser::symbol_type
  1247. Dhcp4Parser::make_COMMA (const location_type& l)
  1248. {
  1249. return symbol_type (token::TOKEN_COMMA, l);
  1250. }
  1251. Dhcp4Parser::symbol_type
  1252. Dhcp4Parser::make_COLON (const location_type& l)
  1253. {
  1254. return symbol_type (token::TOKEN_COLON, l);
  1255. }
  1256. Dhcp4Parser::symbol_type
  1257. Dhcp4Parser::make_LSQUARE_BRACKET (const location_type& l)
  1258. {
  1259. return symbol_type (token::TOKEN_LSQUARE_BRACKET, l);
  1260. }
  1261. Dhcp4Parser::symbol_type
  1262. Dhcp4Parser::make_RSQUARE_BRACKET (const location_type& l)
  1263. {
  1264. return symbol_type (token::TOKEN_RSQUARE_BRACKET, l);
  1265. }
  1266. Dhcp4Parser::symbol_type
  1267. Dhcp4Parser::make_LCURLY_BRACKET (const location_type& l)
  1268. {
  1269. return symbol_type (token::TOKEN_LCURLY_BRACKET, l);
  1270. }
  1271. Dhcp4Parser::symbol_type
  1272. Dhcp4Parser::make_RCURLY_BRACKET (const location_type& l)
  1273. {
  1274. return symbol_type (token::TOKEN_RCURLY_BRACKET, l);
  1275. }
  1276. Dhcp4Parser::symbol_type
  1277. Dhcp4Parser::make_NULL_TYPE (const location_type& l)
  1278. {
  1279. return symbol_type (token::TOKEN_NULL_TYPE, l);
  1280. }
  1281. Dhcp4Parser::symbol_type
  1282. Dhcp4Parser::make_DHCP4 (const location_type& l)
  1283. {
  1284. return symbol_type (token::TOKEN_DHCP4, l);
  1285. }
  1286. Dhcp4Parser::symbol_type
  1287. Dhcp4Parser::make_INTERFACES_CONFIG (const location_type& l)
  1288. {
  1289. return symbol_type (token::TOKEN_INTERFACES_CONFIG, l);
  1290. }
  1291. Dhcp4Parser::symbol_type
  1292. Dhcp4Parser::make_INTERFACES (const location_type& l)
  1293. {
  1294. return symbol_type (token::TOKEN_INTERFACES, l);
  1295. }
  1296. Dhcp4Parser::symbol_type
  1297. Dhcp4Parser::make_DHCP_SOCKET_TYPE (const location_type& l)
  1298. {
  1299. return symbol_type (token::TOKEN_DHCP_SOCKET_TYPE, l);
  1300. }
  1301. Dhcp4Parser::symbol_type
  1302. Dhcp4Parser::make_ECHO_CLIENT_ID (const location_type& l)
  1303. {
  1304. return symbol_type (token::TOKEN_ECHO_CLIENT_ID, l);
  1305. }
  1306. Dhcp4Parser::symbol_type
  1307. Dhcp4Parser::make_MATCH_CLIENT_ID (const location_type& l)
  1308. {
  1309. return symbol_type (token::TOKEN_MATCH_CLIENT_ID, l);
  1310. }
  1311. Dhcp4Parser::symbol_type
  1312. Dhcp4Parser::make_NEXT_SERVER (const location_type& l)
  1313. {
  1314. return symbol_type (token::TOKEN_NEXT_SERVER, l);
  1315. }
  1316. Dhcp4Parser::symbol_type
  1317. Dhcp4Parser::make_SERVER_HOSTNAME (const location_type& l)
  1318. {
  1319. return symbol_type (token::TOKEN_SERVER_HOSTNAME, l);
  1320. }
  1321. Dhcp4Parser::symbol_type
  1322. Dhcp4Parser::make_BOOT_FILE_NAME (const location_type& l)
  1323. {
  1324. return symbol_type (token::TOKEN_BOOT_FILE_NAME, l);
  1325. }
  1326. Dhcp4Parser::symbol_type
  1327. Dhcp4Parser::make_LEASE_DATABASE (const location_type& l)
  1328. {
  1329. return symbol_type (token::TOKEN_LEASE_DATABASE, l);
  1330. }
  1331. Dhcp4Parser::symbol_type
  1332. Dhcp4Parser::make_HOSTS_DATABASE (const location_type& l)
  1333. {
  1334. return symbol_type (token::TOKEN_HOSTS_DATABASE, l);
  1335. }
  1336. Dhcp4Parser::symbol_type
  1337. Dhcp4Parser::make_TYPE (const location_type& l)
  1338. {
  1339. return symbol_type (token::TOKEN_TYPE, l);
  1340. }
  1341. Dhcp4Parser::symbol_type
  1342. Dhcp4Parser::make_MEMFILE (const location_type& l)
  1343. {
  1344. return symbol_type (token::TOKEN_MEMFILE, l);
  1345. }
  1346. Dhcp4Parser::symbol_type
  1347. Dhcp4Parser::make_MYSQL (const location_type& l)
  1348. {
  1349. return symbol_type (token::TOKEN_MYSQL, l);
  1350. }
  1351. Dhcp4Parser::symbol_type
  1352. Dhcp4Parser::make_POSTGRESQL (const location_type& l)
  1353. {
  1354. return symbol_type (token::TOKEN_POSTGRESQL, l);
  1355. }
  1356. Dhcp4Parser::symbol_type
  1357. Dhcp4Parser::make_CQL (const location_type& l)
  1358. {
  1359. return symbol_type (token::TOKEN_CQL, l);
  1360. }
  1361. Dhcp4Parser::symbol_type
  1362. Dhcp4Parser::make_USER (const location_type& l)
  1363. {
  1364. return symbol_type (token::TOKEN_USER, l);
  1365. }
  1366. Dhcp4Parser::symbol_type
  1367. Dhcp4Parser::make_PASSWORD (const location_type& l)
  1368. {
  1369. return symbol_type (token::TOKEN_PASSWORD, l);
  1370. }
  1371. Dhcp4Parser::symbol_type
  1372. Dhcp4Parser::make_HOST (const location_type& l)
  1373. {
  1374. return symbol_type (token::TOKEN_HOST, l);
  1375. }
  1376. Dhcp4Parser::symbol_type
  1377. Dhcp4Parser::make_PERSIST (const location_type& l)
  1378. {
  1379. return symbol_type (token::TOKEN_PERSIST, l);
  1380. }
  1381. Dhcp4Parser::symbol_type
  1382. Dhcp4Parser::make_LFC_INTERVAL (const location_type& l)
  1383. {
  1384. return symbol_type (token::TOKEN_LFC_INTERVAL, l);
  1385. }
  1386. Dhcp4Parser::symbol_type
  1387. Dhcp4Parser::make_READONLY (const location_type& l)
  1388. {
  1389. return symbol_type (token::TOKEN_READONLY, l);
  1390. }
  1391. Dhcp4Parser::symbol_type
  1392. Dhcp4Parser::make_CONNECT_TIMEOUT (const location_type& l)
  1393. {
  1394. return symbol_type (token::TOKEN_CONNECT_TIMEOUT, l);
  1395. }
  1396. Dhcp4Parser::symbol_type
  1397. Dhcp4Parser::make_VALID_LIFETIME (const location_type& l)
  1398. {
  1399. return symbol_type (token::TOKEN_VALID_LIFETIME, l);
  1400. }
  1401. Dhcp4Parser::symbol_type
  1402. Dhcp4Parser::make_RENEW_TIMER (const location_type& l)
  1403. {
  1404. return symbol_type (token::TOKEN_RENEW_TIMER, l);
  1405. }
  1406. Dhcp4Parser::symbol_type
  1407. Dhcp4Parser::make_REBIND_TIMER (const location_type& l)
  1408. {
  1409. return symbol_type (token::TOKEN_REBIND_TIMER, l);
  1410. }
  1411. Dhcp4Parser::symbol_type
  1412. Dhcp4Parser::make_DECLINE_PROBATION_PERIOD (const location_type& l)
  1413. {
  1414. return symbol_type (token::TOKEN_DECLINE_PROBATION_PERIOD, l);
  1415. }
  1416. Dhcp4Parser::symbol_type
  1417. Dhcp4Parser::make_SUBNET4 (const location_type& l)
  1418. {
  1419. return symbol_type (token::TOKEN_SUBNET4, l);
  1420. }
  1421. Dhcp4Parser::symbol_type
  1422. Dhcp4Parser::make_SUBNET_4O6_INTERFACE (const location_type& l)
  1423. {
  1424. return symbol_type (token::TOKEN_SUBNET_4O6_INTERFACE, l);
  1425. }
  1426. Dhcp4Parser::symbol_type
  1427. Dhcp4Parser::make_SUBNET_4O6_INTERFACE_ID (const location_type& l)
  1428. {
  1429. return symbol_type (token::TOKEN_SUBNET_4O6_INTERFACE_ID, l);
  1430. }
  1431. Dhcp4Parser::symbol_type
  1432. Dhcp4Parser::make_SUBNET_4O6_SUBNET (const location_type& l)
  1433. {
  1434. return symbol_type (token::TOKEN_SUBNET_4O6_SUBNET, l);
  1435. }
  1436. Dhcp4Parser::symbol_type
  1437. Dhcp4Parser::make_OPTION_DEF (const location_type& l)
  1438. {
  1439. return symbol_type (token::TOKEN_OPTION_DEF, l);
  1440. }
  1441. Dhcp4Parser::symbol_type
  1442. Dhcp4Parser::make_OPTION_DATA (const location_type& l)
  1443. {
  1444. return symbol_type (token::TOKEN_OPTION_DATA, l);
  1445. }
  1446. Dhcp4Parser::symbol_type
  1447. Dhcp4Parser::make_NAME (const location_type& l)
  1448. {
  1449. return symbol_type (token::TOKEN_NAME, l);
  1450. }
  1451. Dhcp4Parser::symbol_type
  1452. Dhcp4Parser::make_DATA (const location_type& l)
  1453. {
  1454. return symbol_type (token::TOKEN_DATA, l);
  1455. }
  1456. Dhcp4Parser::symbol_type
  1457. Dhcp4Parser::make_CODE (const location_type& l)
  1458. {
  1459. return symbol_type (token::TOKEN_CODE, l);
  1460. }
  1461. Dhcp4Parser::symbol_type
  1462. Dhcp4Parser::make_SPACE (const location_type& l)
  1463. {
  1464. return symbol_type (token::TOKEN_SPACE, l);
  1465. }
  1466. Dhcp4Parser::symbol_type
  1467. Dhcp4Parser::make_CSV_FORMAT (const location_type& l)
  1468. {
  1469. return symbol_type (token::TOKEN_CSV_FORMAT, l);
  1470. }
  1471. Dhcp4Parser::symbol_type
  1472. Dhcp4Parser::make_RECORD_TYPES (const location_type& l)
  1473. {
  1474. return symbol_type (token::TOKEN_RECORD_TYPES, l);
  1475. }
  1476. Dhcp4Parser::symbol_type
  1477. Dhcp4Parser::make_ENCAPSULATE (const location_type& l)
  1478. {
  1479. return symbol_type (token::TOKEN_ENCAPSULATE, l);
  1480. }
  1481. Dhcp4Parser::symbol_type
  1482. Dhcp4Parser::make_ARRAY (const location_type& l)
  1483. {
  1484. return symbol_type (token::TOKEN_ARRAY, l);
  1485. }
  1486. Dhcp4Parser::symbol_type
  1487. Dhcp4Parser::make_POOLS (const location_type& l)
  1488. {
  1489. return symbol_type (token::TOKEN_POOLS, l);
  1490. }
  1491. Dhcp4Parser::symbol_type
  1492. Dhcp4Parser::make_POOL (const location_type& l)
  1493. {
  1494. return symbol_type (token::TOKEN_POOL, l);
  1495. }
  1496. Dhcp4Parser::symbol_type
  1497. Dhcp4Parser::make_SUBNET (const location_type& l)
  1498. {
  1499. return symbol_type (token::TOKEN_SUBNET, l);
  1500. }
  1501. Dhcp4Parser::symbol_type
  1502. Dhcp4Parser::make_INTERFACE (const location_type& l)
  1503. {
  1504. return symbol_type (token::TOKEN_INTERFACE, l);
  1505. }
  1506. Dhcp4Parser::symbol_type
  1507. Dhcp4Parser::make_INTERFACE_ID (const location_type& l)
  1508. {
  1509. return symbol_type (token::TOKEN_INTERFACE_ID, l);
  1510. }
  1511. Dhcp4Parser::symbol_type
  1512. Dhcp4Parser::make_ID (const location_type& l)
  1513. {
  1514. return symbol_type (token::TOKEN_ID, l);
  1515. }
  1516. Dhcp4Parser::symbol_type
  1517. Dhcp4Parser::make_RAPID_COMMIT (const location_type& l)
  1518. {
  1519. return symbol_type (token::TOKEN_RAPID_COMMIT, l);
  1520. }
  1521. Dhcp4Parser::symbol_type
  1522. Dhcp4Parser::make_RESERVATION_MODE (const location_type& l)
  1523. {
  1524. return symbol_type (token::TOKEN_RESERVATION_MODE, l);
  1525. }
  1526. Dhcp4Parser::symbol_type
  1527. Dhcp4Parser::make_HOST_RESERVATION_IDENTIFIERS (const location_type& l)
  1528. {
  1529. return symbol_type (token::TOKEN_HOST_RESERVATION_IDENTIFIERS, l);
  1530. }
  1531. Dhcp4Parser::symbol_type
  1532. Dhcp4Parser::make_CLIENT_CLASSES (const location_type& l)
  1533. {
  1534. return symbol_type (token::TOKEN_CLIENT_CLASSES, l);
  1535. }
  1536. Dhcp4Parser::symbol_type
  1537. Dhcp4Parser::make_TEST (const location_type& l)
  1538. {
  1539. return symbol_type (token::TOKEN_TEST, l);
  1540. }
  1541. Dhcp4Parser::symbol_type
  1542. Dhcp4Parser::make_CLIENT_CLASS (const location_type& l)
  1543. {
  1544. return symbol_type (token::TOKEN_CLIENT_CLASS, l);
  1545. }
  1546. Dhcp4Parser::symbol_type
  1547. Dhcp4Parser::make_RESERVATIONS (const location_type& l)
  1548. {
  1549. return symbol_type (token::TOKEN_RESERVATIONS, l);
  1550. }
  1551. Dhcp4Parser::symbol_type
  1552. Dhcp4Parser::make_DUID (const location_type& l)
  1553. {
  1554. return symbol_type (token::TOKEN_DUID, l);
  1555. }
  1556. Dhcp4Parser::symbol_type
  1557. Dhcp4Parser::make_HW_ADDRESS (const location_type& l)
  1558. {
  1559. return symbol_type (token::TOKEN_HW_ADDRESS, l);
  1560. }
  1561. Dhcp4Parser::symbol_type
  1562. Dhcp4Parser::make_CIRCUIT_ID (const location_type& l)
  1563. {
  1564. return symbol_type (token::TOKEN_CIRCUIT_ID, l);
  1565. }
  1566. Dhcp4Parser::symbol_type
  1567. Dhcp4Parser::make_CLIENT_ID (const location_type& l)
  1568. {
  1569. return symbol_type (token::TOKEN_CLIENT_ID, l);
  1570. }
  1571. Dhcp4Parser::symbol_type
  1572. Dhcp4Parser::make_HOSTNAME (const location_type& l)
  1573. {
  1574. return symbol_type (token::TOKEN_HOSTNAME, l);
  1575. }
  1576. Dhcp4Parser::symbol_type
  1577. Dhcp4Parser::make_RELAY (const location_type& l)
  1578. {
  1579. return symbol_type (token::TOKEN_RELAY, l);
  1580. }
  1581. Dhcp4Parser::symbol_type
  1582. Dhcp4Parser::make_IP_ADDRESS (const location_type& l)
  1583. {
  1584. return symbol_type (token::TOKEN_IP_ADDRESS, l);
  1585. }
  1586. Dhcp4Parser::symbol_type
  1587. Dhcp4Parser::make_HOOKS_LIBRARIES (const location_type& l)
  1588. {
  1589. return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l);
  1590. }
  1591. Dhcp4Parser::symbol_type
  1592. Dhcp4Parser::make_LIBRARY (const location_type& l)
  1593. {
  1594. return symbol_type (token::TOKEN_LIBRARY, l);
  1595. }
  1596. Dhcp4Parser::symbol_type
  1597. Dhcp4Parser::make_PARAMETERS (const location_type& l)
  1598. {
  1599. return symbol_type (token::TOKEN_PARAMETERS, l);
  1600. }
  1601. Dhcp4Parser::symbol_type
  1602. Dhcp4Parser::make_EXPIRED_LEASES_PROCESSING (const location_type& l)
  1603. {
  1604. return symbol_type (token::TOKEN_EXPIRED_LEASES_PROCESSING, l);
  1605. }
  1606. Dhcp4Parser::symbol_type
  1607. Dhcp4Parser::make_DHCP4O6_PORT (const location_type& l)
  1608. {
  1609. return symbol_type (token::TOKEN_DHCP4O6_PORT, l);
  1610. }
  1611. Dhcp4Parser::symbol_type
  1612. Dhcp4Parser::make_CONTROL_SOCKET (const location_type& l)
  1613. {
  1614. return symbol_type (token::TOKEN_CONTROL_SOCKET, l);
  1615. }
  1616. Dhcp4Parser::symbol_type
  1617. Dhcp4Parser::make_SOCKET_TYPE (const location_type& l)
  1618. {
  1619. return symbol_type (token::TOKEN_SOCKET_TYPE, l);
  1620. }
  1621. Dhcp4Parser::symbol_type
  1622. Dhcp4Parser::make_SOCKET_NAME (const location_type& l)
  1623. {
  1624. return symbol_type (token::TOKEN_SOCKET_NAME, l);
  1625. }
  1626. Dhcp4Parser::symbol_type
  1627. Dhcp4Parser::make_DHCP_DDNS (const location_type& l)
  1628. {
  1629. return symbol_type (token::TOKEN_DHCP_DDNS, l);
  1630. }
  1631. Dhcp4Parser::symbol_type
  1632. Dhcp4Parser::make_LOGGING (const location_type& l)
  1633. {
  1634. return symbol_type (token::TOKEN_LOGGING, l);
  1635. }
  1636. Dhcp4Parser::symbol_type
  1637. Dhcp4Parser::make_LOGGERS (const location_type& l)
  1638. {
  1639. return symbol_type (token::TOKEN_LOGGERS, l);
  1640. }
  1641. Dhcp4Parser::symbol_type
  1642. Dhcp4Parser::make_OUTPUT_OPTIONS (const location_type& l)
  1643. {
  1644. return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l);
  1645. }
  1646. Dhcp4Parser::symbol_type
  1647. Dhcp4Parser::make_OUTPUT (const location_type& l)
  1648. {
  1649. return symbol_type (token::TOKEN_OUTPUT, l);
  1650. }
  1651. Dhcp4Parser::symbol_type
  1652. Dhcp4Parser::make_DEBUGLEVEL (const location_type& l)
  1653. {
  1654. return symbol_type (token::TOKEN_DEBUGLEVEL, l);
  1655. }
  1656. Dhcp4Parser::symbol_type
  1657. Dhcp4Parser::make_SEVERITY (const location_type& l)
  1658. {
  1659. return symbol_type (token::TOKEN_SEVERITY, l);
  1660. }
  1661. Dhcp4Parser::symbol_type
  1662. Dhcp4Parser::make_DHCP6 (const location_type& l)
  1663. {
  1664. return symbol_type (token::TOKEN_DHCP6, l);
  1665. }
  1666. Dhcp4Parser::symbol_type
  1667. Dhcp4Parser::make_DHCPDDNS (const location_type& l)
  1668. {
  1669. return symbol_type (token::TOKEN_DHCPDDNS, l);
  1670. }
  1671. Dhcp4Parser::symbol_type
  1672. Dhcp4Parser::make_TOPLEVEL_JSON (const location_type& l)
  1673. {
  1674. return symbol_type (token::TOKEN_TOPLEVEL_JSON, l);
  1675. }
  1676. Dhcp4Parser::symbol_type
  1677. Dhcp4Parser::make_TOPLEVEL_DHCP4 (const location_type& l)
  1678. {
  1679. return symbol_type (token::TOKEN_TOPLEVEL_DHCP4, l);
  1680. }
  1681. Dhcp4Parser::symbol_type
  1682. Dhcp4Parser::make_SUB_DHCP4 (const location_type& l)
  1683. {
  1684. return symbol_type (token::TOKEN_SUB_DHCP4, l);
  1685. }
  1686. Dhcp4Parser::symbol_type
  1687. Dhcp4Parser::make_SUB_INTERFACES4 (const location_type& l)
  1688. {
  1689. return symbol_type (token::TOKEN_SUB_INTERFACES4, l);
  1690. }
  1691. Dhcp4Parser::symbol_type
  1692. Dhcp4Parser::make_SUB_SUBNET4 (const location_type& l)
  1693. {
  1694. return symbol_type (token::TOKEN_SUB_SUBNET4, l);
  1695. }
  1696. Dhcp4Parser::symbol_type
  1697. Dhcp4Parser::make_SUB_POOL4 (const location_type& l)
  1698. {
  1699. return symbol_type (token::TOKEN_SUB_POOL4, l);
  1700. }
  1701. Dhcp4Parser::symbol_type
  1702. Dhcp4Parser::make_SUB_RESERVATION (const location_type& l)
  1703. {
  1704. return symbol_type (token::TOKEN_SUB_RESERVATION, l);
  1705. }
  1706. Dhcp4Parser::symbol_type
  1707. Dhcp4Parser::make_SUB_OPTION_DEF (const location_type& l)
  1708. {
  1709. return symbol_type (token::TOKEN_SUB_OPTION_DEF, l);
  1710. }
  1711. Dhcp4Parser::symbol_type
  1712. Dhcp4Parser::make_SUB_OPTION_DATA (const location_type& l)
  1713. {
  1714. return symbol_type (token::TOKEN_SUB_OPTION_DATA, l);
  1715. }
  1716. Dhcp4Parser::symbol_type
  1717. Dhcp4Parser::make_SUB_HOOKS_LIBRARY (const location_type& l)
  1718. {
  1719. return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, l);
  1720. }
  1721. Dhcp4Parser::symbol_type
  1722. Dhcp4Parser::make_STRING (const std::string& v, const location_type& l)
  1723. {
  1724. return symbol_type (token::TOKEN_STRING, v, l);
  1725. }
  1726. Dhcp4Parser::symbol_type
  1727. Dhcp4Parser::make_INTEGER (const int64_t& v, const location_type& l)
  1728. {
  1729. return symbol_type (token::TOKEN_INTEGER, v, l);
  1730. }
  1731. Dhcp4Parser::symbol_type
  1732. Dhcp4Parser::make_FLOAT (const double& v, const location_type& l)
  1733. {
  1734. return symbol_type (token::TOKEN_FLOAT, v, l);
  1735. }
  1736. Dhcp4Parser::symbol_type
  1737. Dhcp4Parser::make_BOOLEAN (const bool& v, const location_type& l)
  1738. {
  1739. return symbol_type (token::TOKEN_BOOLEAN, v, l);
  1740. }
  1741. #line 14 "dhcp4_parser.yy" // lalr1.cc:377
  1742. } } // isc::dhcp
  1743. #line 2129 "dhcp4_parser.h" // lalr1.cc:377
  1744. #endif // !YY_PARSER4_DHCP4_PARSER_H_INCLUDED