7 #ifndef PARSER_CONTEXT_H
8 #define PARSER_CONTEXT_H
17 #define YY_DECL isc::d2::D2Parser::symbol_type d2_parser_lex (D2ParserContext& driver)
85 std::vector<isc::data::ElementPtr>
stack_;
143 void error(
const isc::d2::location& loc,
144 const std::string& what,
154 void error(
const std::string& what);
163 static void fatal(
const std::string& what);
183 void require(
const std::string& name,
195 void unique(
const std::string& name,
275 std::vector<isc::d2::location>
locs_;
319 bool trace_scanning_;
325 std::vector<ParserContext> cstack_;
Used while parsing a list of tsig-keys.
Define the isc::d2::parser class.
Used for parsing a list of TSIG Keys.
Used while parsing DhcpDdns/loggers/output_options structures.
Used while parsing content of a dns-server.
Used while parsing content of DhcpDdns/tsig-keys/algorithm.
Evaluation context, an interface to the expression evaluation.
void includeFile(const std::string &filename)
Divert input to an include file.
std::vector< struct yy_buffer_state * > states_
Lexer state stack.
Used while parsing content of DhcpDdns/forward-ddns.
This one is used in pure JSON mode.
Used for parsing a list of DNS servers.
virtual ~D2ParserContext()
destructor.
void require(const std::string &name, isc::data::Element::Position open_loc, isc::data::Element::Position close_loc)
Check if a required parameter is present.
boost::shared_ptr< Element > ElementPtr
D2ParseError(const char *file, size_t line, const char *what)
void scanEnd()
Method called after the last tokens are scanned.
Used while parsing content of a tsig-key.
std::vector< isc::d2::location > locs_
Location stack.
Used while parsing DhcpDdns/loggers structures.
void unique(const std::string &name, isc::data::Element::Position loc)
Check if a parameter is already present.
This parser will parse the content as generic JSON.
isc::data::ElementPtr parseString(const std::string &str, ParserType parser_type)
Run the parser on the string specified.
static void fatal(const std::string &what)
Fatal error handler.
isc::d2::location loc_
Location of the current token.
Used while parsing content of DhcpDdns/tsig-keys/secret.
Used while parsing content of a ddns-domain.
Used while parsing DhcpDdns/hooks-libraries.
Used while parsing content of DhcpDdns/reverse-ddns.
void leave()
Leave a syntactic context.
Used while parsing content of a control-socket.
Used while parsing DhcpDdns/ncr-protocol.
Used for parsing content of a DNS Server.
std::vector< std::string > files_
File name stack.
std::vector< FILE * > sfiles_
sFile (aka FILE) stack
Used for parsing content of a TSIG key.
ParserType
Defines currently supported scopes.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Used while parsing DhcpDdns/ncr-format.
Represents the position of the data element within a configuration string.
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.
void enter(const ParserContext &ctx)
Enter a new syntactic context.
Evaluation error exception raised when trying to parse.
void error(const isc::d2::location &loc, const std::string &what, size_t pos=0)
Error handler.
Used while parsing content of DhcpDdns.
void scanFileBegin(FILE *f, const std::string &filename, ParserType type)
Method called before scanning starts on a file.
FILE * sfile_
sFile (aka FILE)
Forward declaration of the ParserContext class.
Used while parsing a list of ddns-domains.
ParserContext
Defines syntactic contexts for lexical tie-ins.
Used for parsing a list a DDNS Domains.
D2ParserContext()
Default constructor.
std::vector< isc::data::ElementPtr > stack_
JSON elements being parsed.
isc::data::ElementPtr parseFile(const std::string &filename, ParserType parser_type)
Run the parser on the file specified.
Used for parsing content of DhcpDdns.
Used while parsing content of DhcpDdns/tsig-keys/digest-bits.
Used for parsing content of a DDNS Domain.
void scanStringBegin(const std::string &str, ParserType type)
Method called before scanning starts on a string.
ParserContext ctx_
Current syntactic context.
Used while parsing content of list of dns-servers.
std::string file_
File name.
isc::data::Element::Position loc2pos(isc::d2::location &loc)
Converts bison's position to one understood by isc::data::Element.
const std::string contextName()
Get the syntax context name.
Used for parsing content of hooks libraries.