 |
Kea
1.5.0
|
Go to the documentation of this file.
7 #ifndef PARSER_CONTEXT_H
8 #define PARSER_CONTEXT_H
17 #define YY_DECL isc::d2::D2Parser::symbol_type d2_parser_lex (D2ParserContext& driver)
80 std::vector<isc::data::ElementPtr>
stack_;
134 void error(
const isc::d2::location& loc,
const std::string& what);
143 void error(
const std::string& what);
152 static void fatal(
const std::string& what);
237 std::vector<isc::d2::location>
locs_;
281 bool trace_scanning_;
287 std::vector<ParserContext> cstack_;
static void fatal(const std::string &what)
Fatal error handler.
@ DNS_SERVERS
Used while parsing content of Logging.
ParserType
Defines currently supported scopes.
@ LOGGERS
Used while parsing Logging/loggers structures.
void leave()
Leave a syntactic context.
ParserContext
Defines syntactic contexts for lexical tie-ins.
@ ALGORITHM
Used while parsing content of DhcpDdns/tsig-keys/digest-bits.
@ PARSER_TSIG_KEYS
Used for parsing content of a DDNS Domain.
D2ParseError(const char *file, size_t line, const char *what)
@ OUTPUT_OPTIONS
Used while parsing Logging/loggers/output_options structures.
@ NO_KEYWORD
This one is used in pure JSON mode.
@ DDNS_DOMAIN
Used while parsing a list of ddns-domains.
@ PARSER_DHCPDDNS
Used for parsing content of DhcpDdns.
@ REVERSE_DDNS
Used while parsing content of a ddns-domain.
D2ParserContext()
Default constructor.
@ NCR_FORMAT
Used while parsing DhcpDdns/ncr-format.
std::vector< std::string > files_
File name stack.
@ DHCPDDNS
Used while parsing content of a tsig-key.
@ PARSER_DDNS_DOMAINS
Used for parsing content of a DNS Server.
std::vector< FILE * > sfiles_
sFile (aka FILE) stack
std::vector< isc::data::ElementPtr > stack_
JSON elements being parsed.
FILE * sfile_
sFile (aka FILE)
@ CONFIG
Used while parsing content of DhcpDdns.
void scanStringBegin(const std::string &str, ParserType type)
Method called before scanning starts on a string.
isc::data::ElementPtr parseFile(const std::string &filename, ParserType parser_type)
Run the parser on the file specified.
const std::string contextName()
Get the syntax context name.
@ DDNS_DOMAINS
Used while parsing content of a dns-server.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
isc::data::Element::Position loc2pos(isc::d2::location &loc)
Converts bison's position to one understood by isc::data::Element.
ParserContext ctx_
Current syntactic context.
@ NCR_PROTOCOL
Used while parsing DhcpDdns/ncr-protocol.
std::vector< struct yy_buffer_state * > states_
Lexer state stack.
Represents the position of the data element within a configuration string.
void error(const isc::d2::location &loc, const std::string &what)
Error handler.
std::string file_
File name.
void includeFile(const std::string &filename)
Divert input to an include file.
@ PARSER_DNS_SERVER
Used for parsing a list of DNS servers.
@ FORWARD_DDNS
Used while parsing content of DhcpDdns/reverse-ddns.
void scanEnd()
Method called after the last tokens are scanned.
std::vector< isc::d2::location > locs_
Location stack.
@ PARSER_TSIG_KEY
Used for parsing a list of TSIG Keys.
@ PARSER_JSON
This parser will parse the content as generic JSON.
@ DNS_SERVER
Used while parsing content of list of dns-servers.
@ PARSER_DDNS_DOMAIN
Used for parsing a list a DDNS Domains.
@ DIGEST_BITS
Used while parsing content of DhcpDdns/tsig-keys/secret.
@ TSIG_KEY
Used while parsing a list of tsig-keys.
@ TSIG_KEYS
Used while parsing content of DhcpDdns/tsig-keys/algorithm.
Evaluation context, an interface to the expression evaluation.
void enter(const ParserContext &ctx)
Enter a new syntactic context.
boost::shared_ptr< Element > ElementPtr
@ SECRET
Used while parsing content of DhcpDdns/forward-ddns.
void scanFileBegin(FILE *f, const std::string &filename, ParserType type)
Method called before scanning starts on a file.
isc::data::ElementPtr parseString(const std::string &str, ParserType parser_type)
Run the parser on the string specified.
Evaluation error exception raised when trying to parse.
isc::d2::location loc_
Location of the current token.
@ PARSER_SUB_DHCPDDNS
Used for parsing content of a TSIG key.