dhcp6_parser.h 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612
  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 dhcp6_parser.h
  27. ** Define the isc::dhcp::parser class.
  28. */
  29. // C++ LALR(1) parser skeleton written by Akim Demaille.
  30. #ifndef YY_PARSER6_DHCP6_PARSER_H_INCLUDED
  31. # define YY_PARSER6_DHCP6_PARSER_H_INCLUDED
  32. // // "%code requires" blocks.
  33. #line 17 "dhcp6_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 <dhcp6/parser_context_decl.h>
  39. using namespace isc::dhcp;
  40. using namespace isc::data;
  41. using namespace std;
  42. #line 56 "dhcp6_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 PARSER6_DEBUG
  105. # if defined YYDEBUG
  106. #if YYDEBUG
  107. # define PARSER6_DEBUG 1
  108. # else
  109. # define PARSER6_DEBUG 0
  110. # endif
  111. # else /* ! defined YYDEBUG */
  112. # define PARSER6_DEBUG 1
  113. # endif /* ! defined YYDEBUG */
  114. #endif /* ! defined PARSER6_DEBUG */
  115. #line 14 "dhcp6_parser.yy" // lalr1.cc:377
  116. namespace isc { namespace dhcp {
  117. #line 141 "dhcp6_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 Dhcp6Parser
  257. {
  258. public:
  259. #ifndef PARSER6_STYPE
  260. /// An auxiliary type to compute the largest semantic type.
  261. union union_type
  262. {
  263. // value
  264. // map_value
  265. // db_type
  266. // duid_type
  267. // ncr_protocol_value
  268. // replace_client_name_value
  269. char dummy1[sizeof(ElementPtr)];
  270. // "boolean"
  271. char dummy2[sizeof(bool)];
  272. // "floating point"
  273. char dummy3[sizeof(double)];
  274. // "integer"
  275. char dummy4[sizeof(int64_t)];
  276. // "constant string"
  277. char dummy5[sizeof(std::string)];
  278. };
  279. /// Symbol semantic values.
  280. typedef variant<sizeof(union_type)> semantic_type;
  281. #else
  282. typedef PARSER6_STYPE semantic_type;
  283. #endif
  284. /// Symbol locations.
  285. typedef location location_type;
  286. /// Syntax errors thrown from user actions.
  287. struct syntax_error : std::runtime_error
  288. {
  289. syntax_error (const location_type& l, const std::string& m);
  290. location_type location;
  291. };
  292. /// Tokens.
  293. struct token
  294. {
  295. enum yytokentype
  296. {
  297. TOKEN_END = 0,
  298. TOKEN_COMMA = 258,
  299. TOKEN_COLON = 259,
  300. TOKEN_LSQUARE_BRACKET = 260,
  301. TOKEN_RSQUARE_BRACKET = 261,
  302. TOKEN_LCURLY_BRACKET = 262,
  303. TOKEN_RCURLY_BRACKET = 263,
  304. TOKEN_NULL_TYPE = 264,
  305. TOKEN_DHCP6 = 265,
  306. TOKEN_INTERFACES_CONFIG = 266,
  307. TOKEN_INTERFACES = 267,
  308. TOKEN_LEASE_DATABASE = 268,
  309. TOKEN_HOSTS_DATABASE = 269,
  310. TOKEN_TYPE = 270,
  311. TOKEN_MEMFILE = 271,
  312. TOKEN_MYSQL = 272,
  313. TOKEN_POSTGRESQL = 273,
  314. TOKEN_CQL = 274,
  315. TOKEN_USER = 275,
  316. TOKEN_PASSWORD = 276,
  317. TOKEN_HOST = 277,
  318. TOKEN_PORT = 278,
  319. TOKEN_PERSIST = 279,
  320. TOKEN_LFC_INTERVAL = 280,
  321. TOKEN_READONLY = 281,
  322. TOKEN_CONNECT_TIMEOUT = 282,
  323. TOKEN_CONTACT_POINTS = 283,
  324. TOKEN_KEYSPACE = 284,
  325. TOKEN_PREFERRED_LIFETIME = 285,
  326. TOKEN_VALID_LIFETIME = 286,
  327. TOKEN_RENEW_TIMER = 287,
  328. TOKEN_REBIND_TIMER = 288,
  329. TOKEN_DECLINE_PROBATION_PERIOD = 289,
  330. TOKEN_SUBNET6 = 290,
  331. TOKEN_OPTION_DEF = 291,
  332. TOKEN_OPTION_DATA = 292,
  333. TOKEN_NAME = 293,
  334. TOKEN_DATA = 294,
  335. TOKEN_CODE = 295,
  336. TOKEN_SPACE = 296,
  337. TOKEN_CSV_FORMAT = 297,
  338. TOKEN_RECORD_TYPES = 298,
  339. TOKEN_ENCAPSULATE = 299,
  340. TOKEN_ARRAY = 300,
  341. TOKEN_POOLS = 301,
  342. TOKEN_POOL = 302,
  343. TOKEN_PD_POOLS = 303,
  344. TOKEN_PREFIX = 304,
  345. TOKEN_PREFIX_LEN = 305,
  346. TOKEN_EXCLUDED_PREFIX = 306,
  347. TOKEN_EXCLUDED_PREFIX_LEN = 307,
  348. TOKEN_DELEGATED_LEN = 308,
  349. TOKEN_USER_CONTEXT = 309,
  350. TOKEN_SUBNET = 310,
  351. TOKEN_INTERFACE = 311,
  352. TOKEN_INTERFACE_ID = 312,
  353. TOKEN_ID = 313,
  354. TOKEN_RAPID_COMMIT = 314,
  355. TOKEN_RESERVATION_MODE = 315,
  356. TOKEN_MAC_SOURCES = 316,
  357. TOKEN_RELAY_SUPPLIED_OPTIONS = 317,
  358. TOKEN_HOST_RESERVATION_IDENTIFIERS = 318,
  359. TOKEN_CLIENT_CLASSES = 319,
  360. TOKEN_TEST = 320,
  361. TOKEN_CLIENT_CLASS = 321,
  362. TOKEN_RESERVATIONS = 322,
  363. TOKEN_IP_ADDRESSES = 323,
  364. TOKEN_PREFIXES = 324,
  365. TOKEN_DUID = 325,
  366. TOKEN_HW_ADDRESS = 326,
  367. TOKEN_HOSTNAME = 327,
  368. TOKEN_RELAY = 328,
  369. TOKEN_IP_ADDRESS = 329,
  370. TOKEN_HOOKS_LIBRARIES = 330,
  371. TOKEN_LIBRARY = 331,
  372. TOKEN_PARAMETERS = 332,
  373. TOKEN_EXPIRED_LEASES_PROCESSING = 333,
  374. TOKEN_RECLAIM_TIMER_WAIT_TIME = 334,
  375. TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME = 335,
  376. TOKEN_HOLD_RECLAIMED_TIME = 336,
  377. TOKEN_MAX_RECLAIM_LEASES = 337,
  378. TOKEN_MAX_RECLAIM_TIME = 338,
  379. TOKEN_UNWARNED_RECLAIM_CYCLES = 339,
  380. TOKEN_SERVER_ID = 340,
  381. TOKEN_LLT = 341,
  382. TOKEN_EN = 342,
  383. TOKEN_LL = 343,
  384. TOKEN_IDENTIFIER = 344,
  385. TOKEN_HTYPE = 345,
  386. TOKEN_TIME = 346,
  387. TOKEN_ENTERPRISE_ID = 347,
  388. TOKEN_DHCP4O6_PORT = 348,
  389. TOKEN_CONTROL_SOCKET = 349,
  390. TOKEN_SOCKET_TYPE = 350,
  391. TOKEN_SOCKET_NAME = 351,
  392. TOKEN_DHCP_DDNS = 352,
  393. TOKEN_ENABLE_UPDATES = 353,
  394. TOKEN_QUALIFYING_SUFFIX = 354,
  395. TOKEN_SERVER_IP = 355,
  396. TOKEN_SERVER_PORT = 356,
  397. TOKEN_SENDER_IP = 357,
  398. TOKEN_SENDER_PORT = 358,
  399. TOKEN_MAX_QUEUE_SIZE = 359,
  400. TOKEN_NCR_PROTOCOL = 360,
  401. TOKEN_NCR_FORMAT = 361,
  402. TOKEN_ALWAYS_INCLUDE_FQDN = 362,
  403. TOKEN_OVERRIDE_NO_UPDATE = 363,
  404. TOKEN_OVERRIDE_CLIENT_UPDATE = 364,
  405. TOKEN_REPLACE_CLIENT_NAME = 365,
  406. TOKEN_GENERATED_PREFIX = 366,
  407. TOKEN_UDP = 367,
  408. TOKEN_TCP = 368,
  409. TOKEN_JSON = 369,
  410. TOKEN_WHEN_PRESENT = 370,
  411. TOKEN_NEVER = 371,
  412. TOKEN_ALWAYS = 372,
  413. TOKEN_WHEN_NOT_PRESENT = 373,
  414. TOKEN_LOGGING = 374,
  415. TOKEN_LOGGERS = 375,
  416. TOKEN_OUTPUT_OPTIONS = 376,
  417. TOKEN_OUTPUT = 377,
  418. TOKEN_DEBUGLEVEL = 378,
  419. TOKEN_SEVERITY = 379,
  420. TOKEN_DHCP4 = 380,
  421. TOKEN_DHCPDDNS = 381,
  422. TOKEN_TOPLEVEL_JSON = 382,
  423. TOKEN_TOPLEVEL_DHCP6 = 383,
  424. TOKEN_SUB_DHCP6 = 384,
  425. TOKEN_SUB_INTERFACES6 = 385,
  426. TOKEN_SUB_SUBNET6 = 386,
  427. TOKEN_SUB_POOL6 = 387,
  428. TOKEN_SUB_PD_POOL = 388,
  429. TOKEN_SUB_RESERVATION = 389,
  430. TOKEN_SUB_OPTION_DEF = 390,
  431. TOKEN_SUB_OPTION_DATA = 391,
  432. TOKEN_SUB_HOOKS_LIBRARY = 392,
  433. TOKEN_SUB_DHCP_DDNS = 393,
  434. TOKEN_STRING = 394,
  435. TOKEN_INTEGER = 395,
  436. TOKEN_FLOAT = 396,
  437. TOKEN_BOOLEAN = 397
  438. };
  439. };
  440. /// (External) token type, as returned by yylex.
  441. typedef token::yytokentype token_type;
  442. /// Symbol type: an internal symbol number.
  443. typedef int symbol_number_type;
  444. /// The symbol type number to denote an empty symbol.
  445. enum { empty_symbol = -2 };
  446. /// Internal symbol number for tokens (subsumed by symbol_number_type).
  447. typedef unsigned char token_number_type;
  448. /// A complete symbol.
  449. ///
  450. /// Expects its Base type to provide access to the symbol type
  451. /// via type_get().
  452. ///
  453. /// Provide access to semantic value and location.
  454. template <typename Base>
  455. struct basic_symbol : Base
  456. {
  457. /// Alias to Base.
  458. typedef Base super_type;
  459. /// Default constructor.
  460. basic_symbol ();
  461. /// Copy constructor.
  462. basic_symbol (const basic_symbol& other);
  463. /// Constructor for valueless symbols, and symbols from each type.
  464. basic_symbol (typename Base::kind_type t, const location_type& l);
  465. basic_symbol (typename Base::kind_type t, const ElementPtr v, const location_type& l);
  466. basic_symbol (typename Base::kind_type t, const bool v, const location_type& l);
  467. basic_symbol (typename Base::kind_type t, const double v, const location_type& l);
  468. basic_symbol (typename Base::kind_type t, const int64_t v, const location_type& l);
  469. basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l);
  470. /// Constructor for symbols with semantic value.
  471. basic_symbol (typename Base::kind_type t,
  472. const semantic_type& v,
  473. const location_type& l);
  474. /// Destroy the symbol.
  475. ~basic_symbol ();
  476. /// Destroy contents, and record that is empty.
  477. void clear ();
  478. /// Whether empty.
  479. bool empty () const;
  480. /// Destructive move, \a s is emptied into this.
  481. void move (basic_symbol& s);
  482. /// The semantic value.
  483. semantic_type value;
  484. /// The location.
  485. location_type location;
  486. private:
  487. /// Assignment operator.
  488. basic_symbol& operator= (const basic_symbol& other);
  489. };
  490. /// Type access provider for token (enum) based symbols.
  491. struct by_type
  492. {
  493. /// Default constructor.
  494. by_type ();
  495. /// Copy constructor.
  496. by_type (const by_type& other);
  497. /// The symbol type as needed by the constructor.
  498. typedef token_type kind_type;
  499. /// Constructor from (external) token numbers.
  500. by_type (kind_type t);
  501. /// Record that this symbol is empty.
  502. void clear ();
  503. /// Steal the symbol type from \a that.
  504. void move (by_type& that);
  505. /// The (internal) type number (corresponding to \a type).
  506. /// \a empty when empty.
  507. symbol_number_type type_get () const;
  508. /// The token.
  509. token_type token () const;
  510. /// The symbol type.
  511. /// \a empty_symbol when empty.
  512. /// An int, not token_number_type, to be able to store empty_symbol.
  513. int type;
  514. };
  515. /// "External" symbols: returned by the scanner.
  516. typedef basic_symbol<by_type> symbol_type;
  517. // Symbol constructors declarations.
  518. static inline
  519. symbol_type
  520. make_END (const location_type& l);
  521. static inline
  522. symbol_type
  523. make_COMMA (const location_type& l);
  524. static inline
  525. symbol_type
  526. make_COLON (const location_type& l);
  527. static inline
  528. symbol_type
  529. make_LSQUARE_BRACKET (const location_type& l);
  530. static inline
  531. symbol_type
  532. make_RSQUARE_BRACKET (const location_type& l);
  533. static inline
  534. symbol_type
  535. make_LCURLY_BRACKET (const location_type& l);
  536. static inline
  537. symbol_type
  538. make_RCURLY_BRACKET (const location_type& l);
  539. static inline
  540. symbol_type
  541. make_NULL_TYPE (const location_type& l);
  542. static inline
  543. symbol_type
  544. make_DHCP6 (const location_type& l);
  545. static inline
  546. symbol_type
  547. make_INTERFACES_CONFIG (const location_type& l);
  548. static inline
  549. symbol_type
  550. make_INTERFACES (const location_type& l);
  551. static inline
  552. symbol_type
  553. make_LEASE_DATABASE (const location_type& l);
  554. static inline
  555. symbol_type
  556. make_HOSTS_DATABASE (const location_type& l);
  557. static inline
  558. symbol_type
  559. make_TYPE (const location_type& l);
  560. static inline
  561. symbol_type
  562. make_MEMFILE (const location_type& l);
  563. static inline
  564. symbol_type
  565. make_MYSQL (const location_type& l);
  566. static inline
  567. symbol_type
  568. make_POSTGRESQL (const location_type& l);
  569. static inline
  570. symbol_type
  571. make_CQL (const location_type& l);
  572. static inline
  573. symbol_type
  574. make_USER (const location_type& l);
  575. static inline
  576. symbol_type
  577. make_PASSWORD (const location_type& l);
  578. static inline
  579. symbol_type
  580. make_HOST (const location_type& l);
  581. static inline
  582. symbol_type
  583. make_PORT (const location_type& l);
  584. static inline
  585. symbol_type
  586. make_PERSIST (const location_type& l);
  587. static inline
  588. symbol_type
  589. make_LFC_INTERVAL (const location_type& l);
  590. static inline
  591. symbol_type
  592. make_READONLY (const location_type& l);
  593. static inline
  594. symbol_type
  595. make_CONNECT_TIMEOUT (const location_type& l);
  596. static inline
  597. symbol_type
  598. make_CONTACT_POINTS (const location_type& l);
  599. static inline
  600. symbol_type
  601. make_KEYSPACE (const location_type& l);
  602. static inline
  603. symbol_type
  604. make_PREFERRED_LIFETIME (const location_type& l);
  605. static inline
  606. symbol_type
  607. make_VALID_LIFETIME (const location_type& l);
  608. static inline
  609. symbol_type
  610. make_RENEW_TIMER (const location_type& l);
  611. static inline
  612. symbol_type
  613. make_REBIND_TIMER (const location_type& l);
  614. static inline
  615. symbol_type
  616. make_DECLINE_PROBATION_PERIOD (const location_type& l);
  617. static inline
  618. symbol_type
  619. make_SUBNET6 (const location_type& l);
  620. static inline
  621. symbol_type
  622. make_OPTION_DEF (const location_type& l);
  623. static inline
  624. symbol_type
  625. make_OPTION_DATA (const location_type& l);
  626. static inline
  627. symbol_type
  628. make_NAME (const location_type& l);
  629. static inline
  630. symbol_type
  631. make_DATA (const location_type& l);
  632. static inline
  633. symbol_type
  634. make_CODE (const location_type& l);
  635. static inline
  636. symbol_type
  637. make_SPACE (const location_type& l);
  638. static inline
  639. symbol_type
  640. make_CSV_FORMAT (const location_type& l);
  641. static inline
  642. symbol_type
  643. make_RECORD_TYPES (const location_type& l);
  644. static inline
  645. symbol_type
  646. make_ENCAPSULATE (const location_type& l);
  647. static inline
  648. symbol_type
  649. make_ARRAY (const location_type& l);
  650. static inline
  651. symbol_type
  652. make_POOLS (const location_type& l);
  653. static inline
  654. symbol_type
  655. make_POOL (const location_type& l);
  656. static inline
  657. symbol_type
  658. make_PD_POOLS (const location_type& l);
  659. static inline
  660. symbol_type
  661. make_PREFIX (const location_type& l);
  662. static inline
  663. symbol_type
  664. make_PREFIX_LEN (const location_type& l);
  665. static inline
  666. symbol_type
  667. make_EXCLUDED_PREFIX (const location_type& l);
  668. static inline
  669. symbol_type
  670. make_EXCLUDED_PREFIX_LEN (const location_type& l);
  671. static inline
  672. symbol_type
  673. make_DELEGATED_LEN (const location_type& l);
  674. static inline
  675. symbol_type
  676. make_USER_CONTEXT (const location_type& l);
  677. static inline
  678. symbol_type
  679. make_SUBNET (const location_type& l);
  680. static inline
  681. symbol_type
  682. make_INTERFACE (const location_type& l);
  683. static inline
  684. symbol_type
  685. make_INTERFACE_ID (const location_type& l);
  686. static inline
  687. symbol_type
  688. make_ID (const location_type& l);
  689. static inline
  690. symbol_type
  691. make_RAPID_COMMIT (const location_type& l);
  692. static inline
  693. symbol_type
  694. make_RESERVATION_MODE (const location_type& l);
  695. static inline
  696. symbol_type
  697. make_MAC_SOURCES (const location_type& l);
  698. static inline
  699. symbol_type
  700. make_RELAY_SUPPLIED_OPTIONS (const location_type& l);
  701. static inline
  702. symbol_type
  703. make_HOST_RESERVATION_IDENTIFIERS (const location_type& l);
  704. static inline
  705. symbol_type
  706. make_CLIENT_CLASSES (const location_type& l);
  707. static inline
  708. symbol_type
  709. make_TEST (const location_type& l);
  710. static inline
  711. symbol_type
  712. make_CLIENT_CLASS (const location_type& l);
  713. static inline
  714. symbol_type
  715. make_RESERVATIONS (const location_type& l);
  716. static inline
  717. symbol_type
  718. make_IP_ADDRESSES (const location_type& l);
  719. static inline
  720. symbol_type
  721. make_PREFIXES (const location_type& l);
  722. static inline
  723. symbol_type
  724. make_DUID (const location_type& l);
  725. static inline
  726. symbol_type
  727. make_HW_ADDRESS (const location_type& l);
  728. static inline
  729. symbol_type
  730. make_HOSTNAME (const location_type& l);
  731. static inline
  732. symbol_type
  733. make_RELAY (const location_type& l);
  734. static inline
  735. symbol_type
  736. make_IP_ADDRESS (const location_type& l);
  737. static inline
  738. symbol_type
  739. make_HOOKS_LIBRARIES (const location_type& l);
  740. static inline
  741. symbol_type
  742. make_LIBRARY (const location_type& l);
  743. static inline
  744. symbol_type
  745. make_PARAMETERS (const location_type& l);
  746. static inline
  747. symbol_type
  748. make_EXPIRED_LEASES_PROCESSING (const location_type& l);
  749. static inline
  750. symbol_type
  751. make_RECLAIM_TIMER_WAIT_TIME (const location_type& l);
  752. static inline
  753. symbol_type
  754. make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (const location_type& l);
  755. static inline
  756. symbol_type
  757. make_HOLD_RECLAIMED_TIME (const location_type& l);
  758. static inline
  759. symbol_type
  760. make_MAX_RECLAIM_LEASES (const location_type& l);
  761. static inline
  762. symbol_type
  763. make_MAX_RECLAIM_TIME (const location_type& l);
  764. static inline
  765. symbol_type
  766. make_UNWARNED_RECLAIM_CYCLES (const location_type& l);
  767. static inline
  768. symbol_type
  769. make_SERVER_ID (const location_type& l);
  770. static inline
  771. symbol_type
  772. make_LLT (const location_type& l);
  773. static inline
  774. symbol_type
  775. make_EN (const location_type& l);
  776. static inline
  777. symbol_type
  778. make_LL (const location_type& l);
  779. static inline
  780. symbol_type
  781. make_IDENTIFIER (const location_type& l);
  782. static inline
  783. symbol_type
  784. make_HTYPE (const location_type& l);
  785. static inline
  786. symbol_type
  787. make_TIME (const location_type& l);
  788. static inline
  789. symbol_type
  790. make_ENTERPRISE_ID (const location_type& l);
  791. static inline
  792. symbol_type
  793. make_DHCP4O6_PORT (const location_type& l);
  794. static inline
  795. symbol_type
  796. make_CONTROL_SOCKET (const location_type& l);
  797. static inline
  798. symbol_type
  799. make_SOCKET_TYPE (const location_type& l);
  800. static inline
  801. symbol_type
  802. make_SOCKET_NAME (const location_type& l);
  803. static inline
  804. symbol_type
  805. make_DHCP_DDNS (const location_type& l);
  806. static inline
  807. symbol_type
  808. make_ENABLE_UPDATES (const location_type& l);
  809. static inline
  810. symbol_type
  811. make_QUALIFYING_SUFFIX (const location_type& l);
  812. static inline
  813. symbol_type
  814. make_SERVER_IP (const location_type& l);
  815. static inline
  816. symbol_type
  817. make_SERVER_PORT (const location_type& l);
  818. static inline
  819. symbol_type
  820. make_SENDER_IP (const location_type& l);
  821. static inline
  822. symbol_type
  823. make_SENDER_PORT (const location_type& l);
  824. static inline
  825. symbol_type
  826. make_MAX_QUEUE_SIZE (const location_type& l);
  827. static inline
  828. symbol_type
  829. make_NCR_PROTOCOL (const location_type& l);
  830. static inline
  831. symbol_type
  832. make_NCR_FORMAT (const location_type& l);
  833. static inline
  834. symbol_type
  835. make_ALWAYS_INCLUDE_FQDN (const location_type& l);
  836. static inline
  837. symbol_type
  838. make_OVERRIDE_NO_UPDATE (const location_type& l);
  839. static inline
  840. symbol_type
  841. make_OVERRIDE_CLIENT_UPDATE (const location_type& l);
  842. static inline
  843. symbol_type
  844. make_REPLACE_CLIENT_NAME (const location_type& l);
  845. static inline
  846. symbol_type
  847. make_GENERATED_PREFIX (const location_type& l);
  848. static inline
  849. symbol_type
  850. make_UDP (const location_type& l);
  851. static inline
  852. symbol_type
  853. make_TCP (const location_type& l);
  854. static inline
  855. symbol_type
  856. make_JSON (const location_type& l);
  857. static inline
  858. symbol_type
  859. make_WHEN_PRESENT (const location_type& l);
  860. static inline
  861. symbol_type
  862. make_NEVER (const location_type& l);
  863. static inline
  864. symbol_type
  865. make_ALWAYS (const location_type& l);
  866. static inline
  867. symbol_type
  868. make_WHEN_NOT_PRESENT (const location_type& l);
  869. static inline
  870. symbol_type
  871. make_LOGGING (const location_type& l);
  872. static inline
  873. symbol_type
  874. make_LOGGERS (const location_type& l);
  875. static inline
  876. symbol_type
  877. make_OUTPUT_OPTIONS (const location_type& l);
  878. static inline
  879. symbol_type
  880. make_OUTPUT (const location_type& l);
  881. static inline
  882. symbol_type
  883. make_DEBUGLEVEL (const location_type& l);
  884. static inline
  885. symbol_type
  886. make_SEVERITY (const location_type& l);
  887. static inline
  888. symbol_type
  889. make_DHCP4 (const location_type& l);
  890. static inline
  891. symbol_type
  892. make_DHCPDDNS (const location_type& l);
  893. static inline
  894. symbol_type
  895. make_TOPLEVEL_JSON (const location_type& l);
  896. static inline
  897. symbol_type
  898. make_TOPLEVEL_DHCP6 (const location_type& l);
  899. static inline
  900. symbol_type
  901. make_SUB_DHCP6 (const location_type& l);
  902. static inline
  903. symbol_type
  904. make_SUB_INTERFACES6 (const location_type& l);
  905. static inline
  906. symbol_type
  907. make_SUB_SUBNET6 (const location_type& l);
  908. static inline
  909. symbol_type
  910. make_SUB_POOL6 (const location_type& l);
  911. static inline
  912. symbol_type
  913. make_SUB_PD_POOL (const location_type& l);
  914. static inline
  915. symbol_type
  916. make_SUB_RESERVATION (const location_type& l);
  917. static inline
  918. symbol_type
  919. make_SUB_OPTION_DEF (const location_type& l);
  920. static inline
  921. symbol_type
  922. make_SUB_OPTION_DATA (const location_type& l);
  923. static inline
  924. symbol_type
  925. make_SUB_HOOKS_LIBRARY (const location_type& l);
  926. static inline
  927. symbol_type
  928. make_SUB_DHCP_DDNS (const location_type& l);
  929. static inline
  930. symbol_type
  931. make_STRING (const std::string& v, const location_type& l);
  932. static inline
  933. symbol_type
  934. make_INTEGER (const int64_t& v, const location_type& l);
  935. static inline
  936. symbol_type
  937. make_FLOAT (const double& v, const location_type& l);
  938. static inline
  939. symbol_type
  940. make_BOOLEAN (const bool& v, const location_type& l);
  941. /// Build a parser object.
  942. Dhcp6Parser (isc::dhcp::Parser6Context& ctx_yyarg);
  943. virtual ~Dhcp6Parser ();
  944. /// Parse.
  945. /// \returns 0 iff parsing succeeded.
  946. virtual int parse ();
  947. #if PARSER6_DEBUG
  948. /// The current debugging stream.
  949. std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
  950. /// Set the current debugging stream.
  951. void set_debug_stream (std::ostream &);
  952. /// Type for debugging levels.
  953. typedef int debug_level_type;
  954. /// The current debugging level.
  955. debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
  956. /// Set the current debugging level.
  957. void set_debug_level (debug_level_type l);
  958. #endif
  959. /// Report a syntax error.
  960. /// \param loc where the syntax error is found.
  961. /// \param msg a description of the syntax error.
  962. virtual void error (const location_type& loc, const std::string& msg);
  963. /// Report a syntax error.
  964. void error (const syntax_error& err);
  965. private:
  966. /// This class is not copyable.
  967. Dhcp6Parser (const Dhcp6Parser&);
  968. Dhcp6Parser& operator= (const Dhcp6Parser&);
  969. /// State numbers.
  970. typedef int state_type;
  971. /// Generate an error message.
  972. /// \param yystate the state where the error occurred.
  973. /// \param yyla the lookahead token.
  974. virtual std::string yysyntax_error_ (state_type yystate,
  975. const symbol_type& yyla) const;
  976. /// Compute post-reduction state.
  977. /// \param yystate the current state
  978. /// \param yysym the nonterminal to push on the stack
  979. state_type yy_lr_goto_state_ (state_type yystate, int yysym);
  980. /// Whether the given \c yypact_ value indicates a defaulted state.
  981. /// \param yyvalue the value to check
  982. static bool yy_pact_value_is_default_ (int yyvalue);
  983. /// Whether the given \c yytable_ value indicates a syntax error.
  984. /// \param yyvalue the value to check
  985. static bool yy_table_value_is_error_ (int yyvalue);
  986. static const short int yypact_ninf_;
  987. static const signed char yytable_ninf_;
  988. /// Convert a scanner token number \a t to a symbol number.
  989. static token_number_type yytranslate_ (token_type t);
  990. // Tables.
  991. // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  992. // STATE-NUM.
  993. static const short int yypact_[];
  994. // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  995. // Performed when YYTABLE does not specify something else to do. Zero
  996. // means the default is an error.
  997. static const unsigned short int yydefact_[];
  998. // YYPGOTO[NTERM-NUM].
  999. static const short int yypgoto_[];
  1000. // YYDEFGOTO[NTERM-NUM].
  1001. static const short int yydefgoto_[];
  1002. // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
  1003. // positive, shift that token. If negative, reduce the rule whose
  1004. // number is the opposite. If YYTABLE_NINF, syntax error.
  1005. static const unsigned short int yytable_[];
  1006. static const short int yycheck_[];
  1007. // YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  1008. // symbol of state STATE-NUM.
  1009. static const unsigned short int yystos_[];
  1010. // YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
  1011. static const unsigned short int yyr1_[];
  1012. // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
  1013. static const unsigned char yyr2_[];
  1014. /// Convert the symbol name \a n to a form suitable for a diagnostic.
  1015. static std::string yytnamerr_ (const char *n);
  1016. /// For a symbol, its name in clear.
  1017. static const char* const yytname_[];
  1018. #if PARSER6_DEBUG
  1019. // YYRLINE[YYN] -- Source line where rule number YYN was defined.
  1020. static const unsigned short int yyrline_[];
  1021. /// Report on the debug stream that the rule \a r is going to be reduced.
  1022. virtual void yy_reduce_print_ (int r);
  1023. /// Print the state stack on the debug stream.
  1024. virtual void yystack_print_ ();
  1025. // Debugging.
  1026. int yydebug_;
  1027. std::ostream* yycdebug_;
  1028. /// \brief Display a symbol type, value and location.
  1029. /// \param yyo The output stream.
  1030. /// \param yysym The symbol.
  1031. template <typename Base>
  1032. void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
  1033. #endif
  1034. /// \brief Reclaim the memory associated to a symbol.
  1035. /// \param yymsg Why this token is reclaimed.
  1036. /// If null, print nothing.
  1037. /// \param yysym The symbol.
  1038. template <typename Base>
  1039. void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
  1040. private:
  1041. /// Type access provider for state based symbols.
  1042. struct by_state
  1043. {
  1044. /// Default constructor.
  1045. by_state ();
  1046. /// The symbol type as needed by the constructor.
  1047. typedef state_type kind_type;
  1048. /// Constructor.
  1049. by_state (kind_type s);
  1050. /// Copy constructor.
  1051. by_state (const by_state& other);
  1052. /// Record that this symbol is empty.
  1053. void clear ();
  1054. /// Steal the symbol type from \a that.
  1055. void move (by_state& that);
  1056. /// The (internal) type number (corresponding to \a state).
  1057. /// \a empty_symbol when empty.
  1058. symbol_number_type type_get () const;
  1059. /// The state number used to denote an empty symbol.
  1060. enum { empty_state = -1 };
  1061. /// The state.
  1062. /// \a empty when empty.
  1063. state_type state;
  1064. };
  1065. /// "Internal" symbol: element of the stack.
  1066. struct stack_symbol_type : basic_symbol<by_state>
  1067. {
  1068. /// Superclass.
  1069. typedef basic_symbol<by_state> super_type;
  1070. /// Construct an empty symbol.
  1071. stack_symbol_type ();
  1072. /// Steal the contents from \a sym to build this.
  1073. stack_symbol_type (state_type s, symbol_type& sym);
  1074. /// Assignment, needed by push_back.
  1075. stack_symbol_type& operator= (const stack_symbol_type& that);
  1076. };
  1077. /// Stack type.
  1078. typedef stack<stack_symbol_type> stack_type;
  1079. /// The stack.
  1080. stack_type yystack_;
  1081. /// Push a new state on the stack.
  1082. /// \param m a debug message to display
  1083. /// if null, no trace is output.
  1084. /// \param s the symbol
  1085. /// \warning the contents of \a s.value is stolen.
  1086. void yypush_ (const char* m, stack_symbol_type& s);
  1087. /// Push a new look ahead token on the state on the stack.
  1088. /// \param m a debug message to display
  1089. /// if null, no trace is output.
  1090. /// \param s the state
  1091. /// \param sym the symbol (for its value and location).
  1092. /// \warning the contents of \a s.value is stolen.
  1093. void yypush_ (const char* m, state_type s, symbol_type& sym);
  1094. /// Pop \a n symbols the three stacks.
  1095. void yypop_ (unsigned int n = 1);
  1096. /// Constants.
  1097. enum
  1098. {
  1099. yyeof_ = 0,
  1100. yylast_ = 777, ///< Last index in yytable_.
  1101. yynnts_ = 321, ///< Number of nonterminal symbols.
  1102. yyfinal_ = 26, ///< Termination state number.
  1103. yyterror_ = 1,
  1104. yyerrcode_ = 256,
  1105. yyntokens_ = 143 ///< Number of tokens.
  1106. };
  1107. // User arguments.
  1108. isc::dhcp::Parser6Context& ctx;
  1109. };
  1110. // Symbol number corresponding to token number t.
  1111. inline
  1112. Dhcp6Parser::token_number_type
  1113. Dhcp6Parser::yytranslate_ (token_type t)
  1114. {
  1115. static
  1116. const token_number_type
  1117. translate_table[] =
  1118. {
  1119. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1120. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1121. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1122. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1123. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1124. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1125. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1126. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1127. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1128. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1129. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1130. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1131. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1132. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1133. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1134. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1135. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1136. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1137. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1138. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1139. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1140. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1141. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1142. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1143. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1144. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  1145. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  1146. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  1147. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  1148. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  1149. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
  1150. 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
  1151. 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
  1152. 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
  1153. 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
  1154. 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
  1155. 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
  1156. 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
  1157. 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
  1158. 135, 136, 137, 138, 139, 140, 141, 142
  1159. };
  1160. const unsigned int user_token_number_max_ = 397;
  1161. const token_number_type undef_token_ = 2;
  1162. if (static_cast<int>(t) <= yyeof_)
  1163. return yyeof_;
  1164. else if (static_cast<unsigned int> (t) <= user_token_number_max_)
  1165. return translate_table[t];
  1166. else
  1167. return undef_token_;
  1168. }
  1169. inline
  1170. Dhcp6Parser::syntax_error::syntax_error (const location_type& l, const std::string& m)
  1171. : std::runtime_error (m)
  1172. , location (l)
  1173. {}
  1174. // basic_symbol.
  1175. template <typename Base>
  1176. inline
  1177. Dhcp6Parser::basic_symbol<Base>::basic_symbol ()
  1178. : value ()
  1179. {}
  1180. template <typename Base>
  1181. inline
  1182. Dhcp6Parser::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
  1183. : Base (other)
  1184. , value ()
  1185. , location (other.location)
  1186. {
  1187. switch (other.type_get ())
  1188. {
  1189. case 157: // value
  1190. case 161: // map_value
  1191. case 202: // db_type
  1192. case 394: // duid_type
  1193. case 427: // ncr_protocol_value
  1194. case 435: // replace_client_name_value
  1195. value.copy< ElementPtr > (other.value);
  1196. break;
  1197. case 142: // "boolean"
  1198. value.copy< bool > (other.value);
  1199. break;
  1200. case 141: // "floating point"
  1201. value.copy< double > (other.value);
  1202. break;
  1203. case 140: // "integer"
  1204. value.copy< int64_t > (other.value);
  1205. break;
  1206. case 139: // "constant string"
  1207. value.copy< std::string > (other.value);
  1208. break;
  1209. default:
  1210. break;
  1211. }
  1212. }
  1213. template <typename Base>
  1214. inline
  1215. Dhcp6Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const semantic_type& v, const location_type& l)
  1216. : Base (t)
  1217. , value ()
  1218. , location (l)
  1219. {
  1220. (void) v;
  1221. switch (this->type_get ())
  1222. {
  1223. case 157: // value
  1224. case 161: // map_value
  1225. case 202: // db_type
  1226. case 394: // duid_type
  1227. case 427: // ncr_protocol_value
  1228. case 435: // replace_client_name_value
  1229. value.copy< ElementPtr > (v);
  1230. break;
  1231. case 142: // "boolean"
  1232. value.copy< bool > (v);
  1233. break;
  1234. case 141: // "floating point"
  1235. value.copy< double > (v);
  1236. break;
  1237. case 140: // "integer"
  1238. value.copy< int64_t > (v);
  1239. break;
  1240. case 139: // "constant string"
  1241. value.copy< std::string > (v);
  1242. break;
  1243. default:
  1244. break;
  1245. }
  1246. }
  1247. // Implementation of basic_symbol constructor for each type.
  1248. template <typename Base>
  1249. Dhcp6Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const location_type& l)
  1250. : Base (t)
  1251. , value ()
  1252. , location (l)
  1253. {}
  1254. template <typename Base>
  1255. Dhcp6Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const ElementPtr v, const location_type& l)
  1256. : Base (t)
  1257. , value (v)
  1258. , location (l)
  1259. {}
  1260. template <typename Base>
  1261. Dhcp6Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const bool v, const location_type& l)
  1262. : Base (t)
  1263. , value (v)
  1264. , location (l)
  1265. {}
  1266. template <typename Base>
  1267. Dhcp6Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const double v, const location_type& l)
  1268. : Base (t)
  1269. , value (v)
  1270. , location (l)
  1271. {}
  1272. template <typename Base>
  1273. Dhcp6Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const int64_t v, const location_type& l)
  1274. : Base (t)
  1275. , value (v)
  1276. , location (l)
  1277. {}
  1278. template <typename Base>
  1279. Dhcp6Parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, const std::string v, const location_type& l)
  1280. : Base (t)
  1281. , value (v)
  1282. , location (l)
  1283. {}
  1284. template <typename Base>
  1285. inline
  1286. Dhcp6Parser::basic_symbol<Base>::~basic_symbol ()
  1287. {
  1288. clear ();
  1289. }
  1290. template <typename Base>
  1291. inline
  1292. void
  1293. Dhcp6Parser::basic_symbol<Base>::clear ()
  1294. {
  1295. // User destructor.
  1296. symbol_number_type yytype = this->type_get ();
  1297. basic_symbol<Base>& yysym = *this;
  1298. (void) yysym;
  1299. switch (yytype)
  1300. {
  1301. default:
  1302. break;
  1303. }
  1304. // Type destructor.
  1305. switch (yytype)
  1306. {
  1307. case 157: // value
  1308. case 161: // map_value
  1309. case 202: // db_type
  1310. case 394: // duid_type
  1311. case 427: // ncr_protocol_value
  1312. case 435: // replace_client_name_value
  1313. value.template destroy< ElementPtr > ();
  1314. break;
  1315. case 142: // "boolean"
  1316. value.template destroy< bool > ();
  1317. break;
  1318. case 141: // "floating point"
  1319. value.template destroy< double > ();
  1320. break;
  1321. case 140: // "integer"
  1322. value.template destroy< int64_t > ();
  1323. break;
  1324. case 139: // "constant string"
  1325. value.template destroy< std::string > ();
  1326. break;
  1327. default:
  1328. break;
  1329. }
  1330. Base::clear ();
  1331. }
  1332. template <typename Base>
  1333. inline
  1334. bool
  1335. Dhcp6Parser::basic_symbol<Base>::empty () const
  1336. {
  1337. return Base::type_get () == empty_symbol;
  1338. }
  1339. template <typename Base>
  1340. inline
  1341. void
  1342. Dhcp6Parser::basic_symbol<Base>::move (basic_symbol& s)
  1343. {
  1344. super_type::move(s);
  1345. switch (this->type_get ())
  1346. {
  1347. case 157: // value
  1348. case 161: // map_value
  1349. case 202: // db_type
  1350. case 394: // duid_type
  1351. case 427: // ncr_protocol_value
  1352. case 435: // replace_client_name_value
  1353. value.move< ElementPtr > (s.value);
  1354. break;
  1355. case 142: // "boolean"
  1356. value.move< bool > (s.value);
  1357. break;
  1358. case 141: // "floating point"
  1359. value.move< double > (s.value);
  1360. break;
  1361. case 140: // "integer"
  1362. value.move< int64_t > (s.value);
  1363. break;
  1364. case 139: // "constant string"
  1365. value.move< std::string > (s.value);
  1366. break;
  1367. default:
  1368. break;
  1369. }
  1370. location = s.location;
  1371. }
  1372. // by_type.
  1373. inline
  1374. Dhcp6Parser::by_type::by_type ()
  1375. : type (empty_symbol)
  1376. {}
  1377. inline
  1378. Dhcp6Parser::by_type::by_type (const by_type& other)
  1379. : type (other.type)
  1380. {}
  1381. inline
  1382. Dhcp6Parser::by_type::by_type (token_type t)
  1383. : type (yytranslate_ (t))
  1384. {}
  1385. inline
  1386. void
  1387. Dhcp6Parser::by_type::clear ()
  1388. {
  1389. type = empty_symbol;
  1390. }
  1391. inline
  1392. void
  1393. Dhcp6Parser::by_type::move (by_type& that)
  1394. {
  1395. type = that.type;
  1396. that.clear ();
  1397. }
  1398. inline
  1399. int
  1400. Dhcp6Parser::by_type::type_get () const
  1401. {
  1402. return type;
  1403. }
  1404. inline
  1405. Dhcp6Parser::token_type
  1406. Dhcp6Parser::by_type::token () const
  1407. {
  1408. // YYTOKNUM[NUM] -- (External) token number corresponding to the
  1409. // (internal) symbol number NUM (which must be that of a token). */
  1410. static
  1411. const unsigned short int
  1412. yytoken_number_[] =
  1413. {
  1414. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  1415. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  1416. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  1417. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  1418. 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
  1419. 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
  1420. 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
  1421. 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
  1422. 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
  1423. 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
  1424. 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
  1425. 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
  1426. 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
  1427. 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
  1428. 395, 396, 397
  1429. };
  1430. return static_cast<token_type> (yytoken_number_[type]);
  1431. }
  1432. // Implementation of make_symbol for each symbol type.
  1433. Dhcp6Parser::symbol_type
  1434. Dhcp6Parser::make_END (const location_type& l)
  1435. {
  1436. return symbol_type (token::TOKEN_END, l);
  1437. }
  1438. Dhcp6Parser::symbol_type
  1439. Dhcp6Parser::make_COMMA (const location_type& l)
  1440. {
  1441. return symbol_type (token::TOKEN_COMMA, l);
  1442. }
  1443. Dhcp6Parser::symbol_type
  1444. Dhcp6Parser::make_COLON (const location_type& l)
  1445. {
  1446. return symbol_type (token::TOKEN_COLON, l);
  1447. }
  1448. Dhcp6Parser::symbol_type
  1449. Dhcp6Parser::make_LSQUARE_BRACKET (const location_type& l)
  1450. {
  1451. return symbol_type (token::TOKEN_LSQUARE_BRACKET, l);
  1452. }
  1453. Dhcp6Parser::symbol_type
  1454. Dhcp6Parser::make_RSQUARE_BRACKET (const location_type& l)
  1455. {
  1456. return symbol_type (token::TOKEN_RSQUARE_BRACKET, l);
  1457. }
  1458. Dhcp6Parser::symbol_type
  1459. Dhcp6Parser::make_LCURLY_BRACKET (const location_type& l)
  1460. {
  1461. return symbol_type (token::TOKEN_LCURLY_BRACKET, l);
  1462. }
  1463. Dhcp6Parser::symbol_type
  1464. Dhcp6Parser::make_RCURLY_BRACKET (const location_type& l)
  1465. {
  1466. return symbol_type (token::TOKEN_RCURLY_BRACKET, l);
  1467. }
  1468. Dhcp6Parser::symbol_type
  1469. Dhcp6Parser::make_NULL_TYPE (const location_type& l)
  1470. {
  1471. return symbol_type (token::TOKEN_NULL_TYPE, l);
  1472. }
  1473. Dhcp6Parser::symbol_type
  1474. Dhcp6Parser::make_DHCP6 (const location_type& l)
  1475. {
  1476. return symbol_type (token::TOKEN_DHCP6, l);
  1477. }
  1478. Dhcp6Parser::symbol_type
  1479. Dhcp6Parser::make_INTERFACES_CONFIG (const location_type& l)
  1480. {
  1481. return symbol_type (token::TOKEN_INTERFACES_CONFIG, l);
  1482. }
  1483. Dhcp6Parser::symbol_type
  1484. Dhcp6Parser::make_INTERFACES (const location_type& l)
  1485. {
  1486. return symbol_type (token::TOKEN_INTERFACES, l);
  1487. }
  1488. Dhcp6Parser::symbol_type
  1489. Dhcp6Parser::make_LEASE_DATABASE (const location_type& l)
  1490. {
  1491. return symbol_type (token::TOKEN_LEASE_DATABASE, l);
  1492. }
  1493. Dhcp6Parser::symbol_type
  1494. Dhcp6Parser::make_HOSTS_DATABASE (const location_type& l)
  1495. {
  1496. return symbol_type (token::TOKEN_HOSTS_DATABASE, l);
  1497. }
  1498. Dhcp6Parser::symbol_type
  1499. Dhcp6Parser::make_TYPE (const location_type& l)
  1500. {
  1501. return symbol_type (token::TOKEN_TYPE, l);
  1502. }
  1503. Dhcp6Parser::symbol_type
  1504. Dhcp6Parser::make_MEMFILE (const location_type& l)
  1505. {
  1506. return symbol_type (token::TOKEN_MEMFILE, l);
  1507. }
  1508. Dhcp6Parser::symbol_type
  1509. Dhcp6Parser::make_MYSQL (const location_type& l)
  1510. {
  1511. return symbol_type (token::TOKEN_MYSQL, l);
  1512. }
  1513. Dhcp6Parser::symbol_type
  1514. Dhcp6Parser::make_POSTGRESQL (const location_type& l)
  1515. {
  1516. return symbol_type (token::TOKEN_POSTGRESQL, l);
  1517. }
  1518. Dhcp6Parser::symbol_type
  1519. Dhcp6Parser::make_CQL (const location_type& l)
  1520. {
  1521. return symbol_type (token::TOKEN_CQL, l);
  1522. }
  1523. Dhcp6Parser::symbol_type
  1524. Dhcp6Parser::make_USER (const location_type& l)
  1525. {
  1526. return symbol_type (token::TOKEN_USER, l);
  1527. }
  1528. Dhcp6Parser::symbol_type
  1529. Dhcp6Parser::make_PASSWORD (const location_type& l)
  1530. {
  1531. return symbol_type (token::TOKEN_PASSWORD, l);
  1532. }
  1533. Dhcp6Parser::symbol_type
  1534. Dhcp6Parser::make_HOST (const location_type& l)
  1535. {
  1536. return symbol_type (token::TOKEN_HOST, l);
  1537. }
  1538. Dhcp6Parser::symbol_type
  1539. Dhcp6Parser::make_PORT (const location_type& l)
  1540. {
  1541. return symbol_type (token::TOKEN_PORT, l);
  1542. }
  1543. Dhcp6Parser::symbol_type
  1544. Dhcp6Parser::make_PERSIST (const location_type& l)
  1545. {
  1546. return symbol_type (token::TOKEN_PERSIST, l);
  1547. }
  1548. Dhcp6Parser::symbol_type
  1549. Dhcp6Parser::make_LFC_INTERVAL (const location_type& l)
  1550. {
  1551. return symbol_type (token::TOKEN_LFC_INTERVAL, l);
  1552. }
  1553. Dhcp6Parser::symbol_type
  1554. Dhcp6Parser::make_READONLY (const location_type& l)
  1555. {
  1556. return symbol_type (token::TOKEN_READONLY, l);
  1557. }
  1558. Dhcp6Parser::symbol_type
  1559. Dhcp6Parser::make_CONNECT_TIMEOUT (const location_type& l)
  1560. {
  1561. return symbol_type (token::TOKEN_CONNECT_TIMEOUT, l);
  1562. }
  1563. Dhcp6Parser::symbol_type
  1564. Dhcp6Parser::make_CONTACT_POINTS (const location_type& l)
  1565. {
  1566. return symbol_type (token::TOKEN_CONTACT_POINTS, l);
  1567. }
  1568. Dhcp6Parser::symbol_type
  1569. Dhcp6Parser::make_KEYSPACE (const location_type& l)
  1570. {
  1571. return symbol_type (token::TOKEN_KEYSPACE, l);
  1572. }
  1573. Dhcp6Parser::symbol_type
  1574. Dhcp6Parser::make_PREFERRED_LIFETIME (const location_type& l)
  1575. {
  1576. return symbol_type (token::TOKEN_PREFERRED_LIFETIME, l);
  1577. }
  1578. Dhcp6Parser::symbol_type
  1579. Dhcp6Parser::make_VALID_LIFETIME (const location_type& l)
  1580. {
  1581. return symbol_type (token::TOKEN_VALID_LIFETIME, l);
  1582. }
  1583. Dhcp6Parser::symbol_type
  1584. Dhcp6Parser::make_RENEW_TIMER (const location_type& l)
  1585. {
  1586. return symbol_type (token::TOKEN_RENEW_TIMER, l);
  1587. }
  1588. Dhcp6Parser::symbol_type
  1589. Dhcp6Parser::make_REBIND_TIMER (const location_type& l)
  1590. {
  1591. return symbol_type (token::TOKEN_REBIND_TIMER, l);
  1592. }
  1593. Dhcp6Parser::symbol_type
  1594. Dhcp6Parser::make_DECLINE_PROBATION_PERIOD (const location_type& l)
  1595. {
  1596. return symbol_type (token::TOKEN_DECLINE_PROBATION_PERIOD, l);
  1597. }
  1598. Dhcp6Parser::symbol_type
  1599. Dhcp6Parser::make_SUBNET6 (const location_type& l)
  1600. {
  1601. return symbol_type (token::TOKEN_SUBNET6, l);
  1602. }
  1603. Dhcp6Parser::symbol_type
  1604. Dhcp6Parser::make_OPTION_DEF (const location_type& l)
  1605. {
  1606. return symbol_type (token::TOKEN_OPTION_DEF, l);
  1607. }
  1608. Dhcp6Parser::symbol_type
  1609. Dhcp6Parser::make_OPTION_DATA (const location_type& l)
  1610. {
  1611. return symbol_type (token::TOKEN_OPTION_DATA, l);
  1612. }
  1613. Dhcp6Parser::symbol_type
  1614. Dhcp6Parser::make_NAME (const location_type& l)
  1615. {
  1616. return symbol_type (token::TOKEN_NAME, l);
  1617. }
  1618. Dhcp6Parser::symbol_type
  1619. Dhcp6Parser::make_DATA (const location_type& l)
  1620. {
  1621. return symbol_type (token::TOKEN_DATA, l);
  1622. }
  1623. Dhcp6Parser::symbol_type
  1624. Dhcp6Parser::make_CODE (const location_type& l)
  1625. {
  1626. return symbol_type (token::TOKEN_CODE, l);
  1627. }
  1628. Dhcp6Parser::symbol_type
  1629. Dhcp6Parser::make_SPACE (const location_type& l)
  1630. {
  1631. return symbol_type (token::TOKEN_SPACE, l);
  1632. }
  1633. Dhcp6Parser::symbol_type
  1634. Dhcp6Parser::make_CSV_FORMAT (const location_type& l)
  1635. {
  1636. return symbol_type (token::TOKEN_CSV_FORMAT, l);
  1637. }
  1638. Dhcp6Parser::symbol_type
  1639. Dhcp6Parser::make_RECORD_TYPES (const location_type& l)
  1640. {
  1641. return symbol_type (token::TOKEN_RECORD_TYPES, l);
  1642. }
  1643. Dhcp6Parser::symbol_type
  1644. Dhcp6Parser::make_ENCAPSULATE (const location_type& l)
  1645. {
  1646. return symbol_type (token::TOKEN_ENCAPSULATE, l);
  1647. }
  1648. Dhcp6Parser::symbol_type
  1649. Dhcp6Parser::make_ARRAY (const location_type& l)
  1650. {
  1651. return symbol_type (token::TOKEN_ARRAY, l);
  1652. }
  1653. Dhcp6Parser::symbol_type
  1654. Dhcp6Parser::make_POOLS (const location_type& l)
  1655. {
  1656. return symbol_type (token::TOKEN_POOLS, l);
  1657. }
  1658. Dhcp6Parser::symbol_type
  1659. Dhcp6Parser::make_POOL (const location_type& l)
  1660. {
  1661. return symbol_type (token::TOKEN_POOL, l);
  1662. }
  1663. Dhcp6Parser::symbol_type
  1664. Dhcp6Parser::make_PD_POOLS (const location_type& l)
  1665. {
  1666. return symbol_type (token::TOKEN_PD_POOLS, l);
  1667. }
  1668. Dhcp6Parser::symbol_type
  1669. Dhcp6Parser::make_PREFIX (const location_type& l)
  1670. {
  1671. return symbol_type (token::TOKEN_PREFIX, l);
  1672. }
  1673. Dhcp6Parser::symbol_type
  1674. Dhcp6Parser::make_PREFIX_LEN (const location_type& l)
  1675. {
  1676. return symbol_type (token::TOKEN_PREFIX_LEN, l);
  1677. }
  1678. Dhcp6Parser::symbol_type
  1679. Dhcp6Parser::make_EXCLUDED_PREFIX (const location_type& l)
  1680. {
  1681. return symbol_type (token::TOKEN_EXCLUDED_PREFIX, l);
  1682. }
  1683. Dhcp6Parser::symbol_type
  1684. Dhcp6Parser::make_EXCLUDED_PREFIX_LEN (const location_type& l)
  1685. {
  1686. return symbol_type (token::TOKEN_EXCLUDED_PREFIX_LEN, l);
  1687. }
  1688. Dhcp6Parser::symbol_type
  1689. Dhcp6Parser::make_DELEGATED_LEN (const location_type& l)
  1690. {
  1691. return symbol_type (token::TOKEN_DELEGATED_LEN, l);
  1692. }
  1693. Dhcp6Parser::symbol_type
  1694. Dhcp6Parser::make_USER_CONTEXT (const location_type& l)
  1695. {
  1696. return symbol_type (token::TOKEN_USER_CONTEXT, l);
  1697. }
  1698. Dhcp6Parser::symbol_type
  1699. Dhcp6Parser::make_SUBNET (const location_type& l)
  1700. {
  1701. return symbol_type (token::TOKEN_SUBNET, l);
  1702. }
  1703. Dhcp6Parser::symbol_type
  1704. Dhcp6Parser::make_INTERFACE (const location_type& l)
  1705. {
  1706. return symbol_type (token::TOKEN_INTERFACE, l);
  1707. }
  1708. Dhcp6Parser::symbol_type
  1709. Dhcp6Parser::make_INTERFACE_ID (const location_type& l)
  1710. {
  1711. return symbol_type (token::TOKEN_INTERFACE_ID, l);
  1712. }
  1713. Dhcp6Parser::symbol_type
  1714. Dhcp6Parser::make_ID (const location_type& l)
  1715. {
  1716. return symbol_type (token::TOKEN_ID, l);
  1717. }
  1718. Dhcp6Parser::symbol_type
  1719. Dhcp6Parser::make_RAPID_COMMIT (const location_type& l)
  1720. {
  1721. return symbol_type (token::TOKEN_RAPID_COMMIT, l);
  1722. }
  1723. Dhcp6Parser::symbol_type
  1724. Dhcp6Parser::make_RESERVATION_MODE (const location_type& l)
  1725. {
  1726. return symbol_type (token::TOKEN_RESERVATION_MODE, l);
  1727. }
  1728. Dhcp6Parser::symbol_type
  1729. Dhcp6Parser::make_MAC_SOURCES (const location_type& l)
  1730. {
  1731. return symbol_type (token::TOKEN_MAC_SOURCES, l);
  1732. }
  1733. Dhcp6Parser::symbol_type
  1734. Dhcp6Parser::make_RELAY_SUPPLIED_OPTIONS (const location_type& l)
  1735. {
  1736. return symbol_type (token::TOKEN_RELAY_SUPPLIED_OPTIONS, l);
  1737. }
  1738. Dhcp6Parser::symbol_type
  1739. Dhcp6Parser::make_HOST_RESERVATION_IDENTIFIERS (const location_type& l)
  1740. {
  1741. return symbol_type (token::TOKEN_HOST_RESERVATION_IDENTIFIERS, l);
  1742. }
  1743. Dhcp6Parser::symbol_type
  1744. Dhcp6Parser::make_CLIENT_CLASSES (const location_type& l)
  1745. {
  1746. return symbol_type (token::TOKEN_CLIENT_CLASSES, l);
  1747. }
  1748. Dhcp6Parser::symbol_type
  1749. Dhcp6Parser::make_TEST (const location_type& l)
  1750. {
  1751. return symbol_type (token::TOKEN_TEST, l);
  1752. }
  1753. Dhcp6Parser::symbol_type
  1754. Dhcp6Parser::make_CLIENT_CLASS (const location_type& l)
  1755. {
  1756. return symbol_type (token::TOKEN_CLIENT_CLASS, l);
  1757. }
  1758. Dhcp6Parser::symbol_type
  1759. Dhcp6Parser::make_RESERVATIONS (const location_type& l)
  1760. {
  1761. return symbol_type (token::TOKEN_RESERVATIONS, l);
  1762. }
  1763. Dhcp6Parser::symbol_type
  1764. Dhcp6Parser::make_IP_ADDRESSES (const location_type& l)
  1765. {
  1766. return symbol_type (token::TOKEN_IP_ADDRESSES, l);
  1767. }
  1768. Dhcp6Parser::symbol_type
  1769. Dhcp6Parser::make_PREFIXES (const location_type& l)
  1770. {
  1771. return symbol_type (token::TOKEN_PREFIXES, l);
  1772. }
  1773. Dhcp6Parser::symbol_type
  1774. Dhcp6Parser::make_DUID (const location_type& l)
  1775. {
  1776. return symbol_type (token::TOKEN_DUID, l);
  1777. }
  1778. Dhcp6Parser::symbol_type
  1779. Dhcp6Parser::make_HW_ADDRESS (const location_type& l)
  1780. {
  1781. return symbol_type (token::TOKEN_HW_ADDRESS, l);
  1782. }
  1783. Dhcp6Parser::symbol_type
  1784. Dhcp6Parser::make_HOSTNAME (const location_type& l)
  1785. {
  1786. return symbol_type (token::TOKEN_HOSTNAME, l);
  1787. }
  1788. Dhcp6Parser::symbol_type
  1789. Dhcp6Parser::make_RELAY (const location_type& l)
  1790. {
  1791. return symbol_type (token::TOKEN_RELAY, l);
  1792. }
  1793. Dhcp6Parser::symbol_type
  1794. Dhcp6Parser::make_IP_ADDRESS (const location_type& l)
  1795. {
  1796. return symbol_type (token::TOKEN_IP_ADDRESS, l);
  1797. }
  1798. Dhcp6Parser::symbol_type
  1799. Dhcp6Parser::make_HOOKS_LIBRARIES (const location_type& l)
  1800. {
  1801. return symbol_type (token::TOKEN_HOOKS_LIBRARIES, l);
  1802. }
  1803. Dhcp6Parser::symbol_type
  1804. Dhcp6Parser::make_LIBRARY (const location_type& l)
  1805. {
  1806. return symbol_type (token::TOKEN_LIBRARY, l);
  1807. }
  1808. Dhcp6Parser::symbol_type
  1809. Dhcp6Parser::make_PARAMETERS (const location_type& l)
  1810. {
  1811. return symbol_type (token::TOKEN_PARAMETERS, l);
  1812. }
  1813. Dhcp6Parser::symbol_type
  1814. Dhcp6Parser::make_EXPIRED_LEASES_PROCESSING (const location_type& l)
  1815. {
  1816. return symbol_type (token::TOKEN_EXPIRED_LEASES_PROCESSING, l);
  1817. }
  1818. Dhcp6Parser::symbol_type
  1819. Dhcp6Parser::make_RECLAIM_TIMER_WAIT_TIME (const location_type& l)
  1820. {
  1821. return symbol_type (token::TOKEN_RECLAIM_TIMER_WAIT_TIME, l);
  1822. }
  1823. Dhcp6Parser::symbol_type
  1824. Dhcp6Parser::make_FLUSH_RECLAIMED_TIMER_WAIT_TIME (const location_type& l)
  1825. {
  1826. return symbol_type (token::TOKEN_FLUSH_RECLAIMED_TIMER_WAIT_TIME, l);
  1827. }
  1828. Dhcp6Parser::symbol_type
  1829. Dhcp6Parser::make_HOLD_RECLAIMED_TIME (const location_type& l)
  1830. {
  1831. return symbol_type (token::TOKEN_HOLD_RECLAIMED_TIME, l);
  1832. }
  1833. Dhcp6Parser::symbol_type
  1834. Dhcp6Parser::make_MAX_RECLAIM_LEASES (const location_type& l)
  1835. {
  1836. return symbol_type (token::TOKEN_MAX_RECLAIM_LEASES, l);
  1837. }
  1838. Dhcp6Parser::symbol_type
  1839. Dhcp6Parser::make_MAX_RECLAIM_TIME (const location_type& l)
  1840. {
  1841. return symbol_type (token::TOKEN_MAX_RECLAIM_TIME, l);
  1842. }
  1843. Dhcp6Parser::symbol_type
  1844. Dhcp6Parser::make_UNWARNED_RECLAIM_CYCLES (const location_type& l)
  1845. {
  1846. return symbol_type (token::TOKEN_UNWARNED_RECLAIM_CYCLES, l);
  1847. }
  1848. Dhcp6Parser::symbol_type
  1849. Dhcp6Parser::make_SERVER_ID (const location_type& l)
  1850. {
  1851. return symbol_type (token::TOKEN_SERVER_ID, l);
  1852. }
  1853. Dhcp6Parser::symbol_type
  1854. Dhcp6Parser::make_LLT (const location_type& l)
  1855. {
  1856. return symbol_type (token::TOKEN_LLT, l);
  1857. }
  1858. Dhcp6Parser::symbol_type
  1859. Dhcp6Parser::make_EN (const location_type& l)
  1860. {
  1861. return symbol_type (token::TOKEN_EN, l);
  1862. }
  1863. Dhcp6Parser::symbol_type
  1864. Dhcp6Parser::make_LL (const location_type& l)
  1865. {
  1866. return symbol_type (token::TOKEN_LL, l);
  1867. }
  1868. Dhcp6Parser::symbol_type
  1869. Dhcp6Parser::make_IDENTIFIER (const location_type& l)
  1870. {
  1871. return symbol_type (token::TOKEN_IDENTIFIER, l);
  1872. }
  1873. Dhcp6Parser::symbol_type
  1874. Dhcp6Parser::make_HTYPE (const location_type& l)
  1875. {
  1876. return symbol_type (token::TOKEN_HTYPE, l);
  1877. }
  1878. Dhcp6Parser::symbol_type
  1879. Dhcp6Parser::make_TIME (const location_type& l)
  1880. {
  1881. return symbol_type (token::TOKEN_TIME, l);
  1882. }
  1883. Dhcp6Parser::symbol_type
  1884. Dhcp6Parser::make_ENTERPRISE_ID (const location_type& l)
  1885. {
  1886. return symbol_type (token::TOKEN_ENTERPRISE_ID, l);
  1887. }
  1888. Dhcp6Parser::symbol_type
  1889. Dhcp6Parser::make_DHCP4O6_PORT (const location_type& l)
  1890. {
  1891. return symbol_type (token::TOKEN_DHCP4O6_PORT, l);
  1892. }
  1893. Dhcp6Parser::symbol_type
  1894. Dhcp6Parser::make_CONTROL_SOCKET (const location_type& l)
  1895. {
  1896. return symbol_type (token::TOKEN_CONTROL_SOCKET, l);
  1897. }
  1898. Dhcp6Parser::symbol_type
  1899. Dhcp6Parser::make_SOCKET_TYPE (const location_type& l)
  1900. {
  1901. return symbol_type (token::TOKEN_SOCKET_TYPE, l);
  1902. }
  1903. Dhcp6Parser::symbol_type
  1904. Dhcp6Parser::make_SOCKET_NAME (const location_type& l)
  1905. {
  1906. return symbol_type (token::TOKEN_SOCKET_NAME, l);
  1907. }
  1908. Dhcp6Parser::symbol_type
  1909. Dhcp6Parser::make_DHCP_DDNS (const location_type& l)
  1910. {
  1911. return symbol_type (token::TOKEN_DHCP_DDNS, l);
  1912. }
  1913. Dhcp6Parser::symbol_type
  1914. Dhcp6Parser::make_ENABLE_UPDATES (const location_type& l)
  1915. {
  1916. return symbol_type (token::TOKEN_ENABLE_UPDATES, l);
  1917. }
  1918. Dhcp6Parser::symbol_type
  1919. Dhcp6Parser::make_QUALIFYING_SUFFIX (const location_type& l)
  1920. {
  1921. return symbol_type (token::TOKEN_QUALIFYING_SUFFIX, l);
  1922. }
  1923. Dhcp6Parser::symbol_type
  1924. Dhcp6Parser::make_SERVER_IP (const location_type& l)
  1925. {
  1926. return symbol_type (token::TOKEN_SERVER_IP, l);
  1927. }
  1928. Dhcp6Parser::symbol_type
  1929. Dhcp6Parser::make_SERVER_PORT (const location_type& l)
  1930. {
  1931. return symbol_type (token::TOKEN_SERVER_PORT, l);
  1932. }
  1933. Dhcp6Parser::symbol_type
  1934. Dhcp6Parser::make_SENDER_IP (const location_type& l)
  1935. {
  1936. return symbol_type (token::TOKEN_SENDER_IP, l);
  1937. }
  1938. Dhcp6Parser::symbol_type
  1939. Dhcp6Parser::make_SENDER_PORT (const location_type& l)
  1940. {
  1941. return symbol_type (token::TOKEN_SENDER_PORT, l);
  1942. }
  1943. Dhcp6Parser::symbol_type
  1944. Dhcp6Parser::make_MAX_QUEUE_SIZE (const location_type& l)
  1945. {
  1946. return symbol_type (token::TOKEN_MAX_QUEUE_SIZE, l);
  1947. }
  1948. Dhcp6Parser::symbol_type
  1949. Dhcp6Parser::make_NCR_PROTOCOL (const location_type& l)
  1950. {
  1951. return symbol_type (token::TOKEN_NCR_PROTOCOL, l);
  1952. }
  1953. Dhcp6Parser::symbol_type
  1954. Dhcp6Parser::make_NCR_FORMAT (const location_type& l)
  1955. {
  1956. return symbol_type (token::TOKEN_NCR_FORMAT, l);
  1957. }
  1958. Dhcp6Parser::symbol_type
  1959. Dhcp6Parser::make_ALWAYS_INCLUDE_FQDN (const location_type& l)
  1960. {
  1961. return symbol_type (token::TOKEN_ALWAYS_INCLUDE_FQDN, l);
  1962. }
  1963. Dhcp6Parser::symbol_type
  1964. Dhcp6Parser::make_OVERRIDE_NO_UPDATE (const location_type& l)
  1965. {
  1966. return symbol_type (token::TOKEN_OVERRIDE_NO_UPDATE, l);
  1967. }
  1968. Dhcp6Parser::symbol_type
  1969. Dhcp6Parser::make_OVERRIDE_CLIENT_UPDATE (const location_type& l)
  1970. {
  1971. return symbol_type (token::TOKEN_OVERRIDE_CLIENT_UPDATE, l);
  1972. }
  1973. Dhcp6Parser::symbol_type
  1974. Dhcp6Parser::make_REPLACE_CLIENT_NAME (const location_type& l)
  1975. {
  1976. return symbol_type (token::TOKEN_REPLACE_CLIENT_NAME, l);
  1977. }
  1978. Dhcp6Parser::symbol_type
  1979. Dhcp6Parser::make_GENERATED_PREFIX (const location_type& l)
  1980. {
  1981. return symbol_type (token::TOKEN_GENERATED_PREFIX, l);
  1982. }
  1983. Dhcp6Parser::symbol_type
  1984. Dhcp6Parser::make_UDP (const location_type& l)
  1985. {
  1986. return symbol_type (token::TOKEN_UDP, l);
  1987. }
  1988. Dhcp6Parser::symbol_type
  1989. Dhcp6Parser::make_TCP (const location_type& l)
  1990. {
  1991. return symbol_type (token::TOKEN_TCP, l);
  1992. }
  1993. Dhcp6Parser::symbol_type
  1994. Dhcp6Parser::make_JSON (const location_type& l)
  1995. {
  1996. return symbol_type (token::TOKEN_JSON, l);
  1997. }
  1998. Dhcp6Parser::symbol_type
  1999. Dhcp6Parser::make_WHEN_PRESENT (const location_type& l)
  2000. {
  2001. return symbol_type (token::TOKEN_WHEN_PRESENT, l);
  2002. }
  2003. Dhcp6Parser::symbol_type
  2004. Dhcp6Parser::make_NEVER (const location_type& l)
  2005. {
  2006. return symbol_type (token::TOKEN_NEVER, l);
  2007. }
  2008. Dhcp6Parser::symbol_type
  2009. Dhcp6Parser::make_ALWAYS (const location_type& l)
  2010. {
  2011. return symbol_type (token::TOKEN_ALWAYS, l);
  2012. }
  2013. Dhcp6Parser::symbol_type
  2014. Dhcp6Parser::make_WHEN_NOT_PRESENT (const location_type& l)
  2015. {
  2016. return symbol_type (token::TOKEN_WHEN_NOT_PRESENT, l);
  2017. }
  2018. Dhcp6Parser::symbol_type
  2019. Dhcp6Parser::make_LOGGING (const location_type& l)
  2020. {
  2021. return symbol_type (token::TOKEN_LOGGING, l);
  2022. }
  2023. Dhcp6Parser::symbol_type
  2024. Dhcp6Parser::make_LOGGERS (const location_type& l)
  2025. {
  2026. return symbol_type (token::TOKEN_LOGGERS, l);
  2027. }
  2028. Dhcp6Parser::symbol_type
  2029. Dhcp6Parser::make_OUTPUT_OPTIONS (const location_type& l)
  2030. {
  2031. return symbol_type (token::TOKEN_OUTPUT_OPTIONS, l);
  2032. }
  2033. Dhcp6Parser::symbol_type
  2034. Dhcp6Parser::make_OUTPUT (const location_type& l)
  2035. {
  2036. return symbol_type (token::TOKEN_OUTPUT, l);
  2037. }
  2038. Dhcp6Parser::symbol_type
  2039. Dhcp6Parser::make_DEBUGLEVEL (const location_type& l)
  2040. {
  2041. return symbol_type (token::TOKEN_DEBUGLEVEL, l);
  2042. }
  2043. Dhcp6Parser::symbol_type
  2044. Dhcp6Parser::make_SEVERITY (const location_type& l)
  2045. {
  2046. return symbol_type (token::TOKEN_SEVERITY, l);
  2047. }
  2048. Dhcp6Parser::symbol_type
  2049. Dhcp6Parser::make_DHCP4 (const location_type& l)
  2050. {
  2051. return symbol_type (token::TOKEN_DHCP4, l);
  2052. }
  2053. Dhcp6Parser::symbol_type
  2054. Dhcp6Parser::make_DHCPDDNS (const location_type& l)
  2055. {
  2056. return symbol_type (token::TOKEN_DHCPDDNS, l);
  2057. }
  2058. Dhcp6Parser::symbol_type
  2059. Dhcp6Parser::make_TOPLEVEL_JSON (const location_type& l)
  2060. {
  2061. return symbol_type (token::TOKEN_TOPLEVEL_JSON, l);
  2062. }
  2063. Dhcp6Parser::symbol_type
  2064. Dhcp6Parser::make_TOPLEVEL_DHCP6 (const location_type& l)
  2065. {
  2066. return symbol_type (token::TOKEN_TOPLEVEL_DHCP6, l);
  2067. }
  2068. Dhcp6Parser::symbol_type
  2069. Dhcp6Parser::make_SUB_DHCP6 (const location_type& l)
  2070. {
  2071. return symbol_type (token::TOKEN_SUB_DHCP6, l);
  2072. }
  2073. Dhcp6Parser::symbol_type
  2074. Dhcp6Parser::make_SUB_INTERFACES6 (const location_type& l)
  2075. {
  2076. return symbol_type (token::TOKEN_SUB_INTERFACES6, l);
  2077. }
  2078. Dhcp6Parser::symbol_type
  2079. Dhcp6Parser::make_SUB_SUBNET6 (const location_type& l)
  2080. {
  2081. return symbol_type (token::TOKEN_SUB_SUBNET6, l);
  2082. }
  2083. Dhcp6Parser::symbol_type
  2084. Dhcp6Parser::make_SUB_POOL6 (const location_type& l)
  2085. {
  2086. return symbol_type (token::TOKEN_SUB_POOL6, l);
  2087. }
  2088. Dhcp6Parser::symbol_type
  2089. Dhcp6Parser::make_SUB_PD_POOL (const location_type& l)
  2090. {
  2091. return symbol_type (token::TOKEN_SUB_PD_POOL, l);
  2092. }
  2093. Dhcp6Parser::symbol_type
  2094. Dhcp6Parser::make_SUB_RESERVATION (const location_type& l)
  2095. {
  2096. return symbol_type (token::TOKEN_SUB_RESERVATION, l);
  2097. }
  2098. Dhcp6Parser::symbol_type
  2099. Dhcp6Parser::make_SUB_OPTION_DEF (const location_type& l)
  2100. {
  2101. return symbol_type (token::TOKEN_SUB_OPTION_DEF, l);
  2102. }
  2103. Dhcp6Parser::symbol_type
  2104. Dhcp6Parser::make_SUB_OPTION_DATA (const location_type& l)
  2105. {
  2106. return symbol_type (token::TOKEN_SUB_OPTION_DATA, l);
  2107. }
  2108. Dhcp6Parser::symbol_type
  2109. Dhcp6Parser::make_SUB_HOOKS_LIBRARY (const location_type& l)
  2110. {
  2111. return symbol_type (token::TOKEN_SUB_HOOKS_LIBRARY, l);
  2112. }
  2113. Dhcp6Parser::symbol_type
  2114. Dhcp6Parser::make_SUB_DHCP_DDNS (const location_type& l)
  2115. {
  2116. return symbol_type (token::TOKEN_SUB_DHCP_DDNS, l);
  2117. }
  2118. Dhcp6Parser::symbol_type
  2119. Dhcp6Parser::make_STRING (const std::string& v, const location_type& l)
  2120. {
  2121. return symbol_type (token::TOKEN_STRING, v, l);
  2122. }
  2123. Dhcp6Parser::symbol_type
  2124. Dhcp6Parser::make_INTEGER (const int64_t& v, const location_type& l)
  2125. {
  2126. return symbol_type (token::TOKEN_INTEGER, v, l);
  2127. }
  2128. Dhcp6Parser::symbol_type
  2129. Dhcp6Parser::make_FLOAT (const double& v, const location_type& l)
  2130. {
  2131. return symbol_type (token::TOKEN_FLOAT, v, l);
  2132. }
  2133. Dhcp6Parser::symbol_type
  2134. Dhcp6Parser::make_BOOLEAN (const bool& v, const location_type& l)
  2135. {
  2136. return symbol_type (token::TOKEN_BOOLEAN, v, l);
  2137. }
  2138. #line 14 "dhcp6_parser.yy" // lalr1.cc:377
  2139. } } // isc::dhcp
  2140. #line 2608 "dhcp6_parser.h" // lalr1.cc:377
  2141. #endif // !YY_PARSER6_DHCP6_PARSER_H_INCLUDED