dhcp4_parser.h 56 KB

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