mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-05 00:15:17 +00:00
[5014] Added scanner include
This commit is contained in:
committed by
Tomek Mrugalski
parent
77bee10170
commit
b27c84297a
@@ -57,11 +57,14 @@ public:
|
||||
void scanStringEnd();
|
||||
|
||||
/// @brief Method called before scanning starts on a file.
|
||||
void scanFileBegin(FILE * f, ParserType type);
|
||||
void scanFileBegin(FILE * f, const std::string& filename, ParserType type);
|
||||
|
||||
/// @brief Method called after the last tokens are scanned from a file.
|
||||
void scanFileEnd(FILE * f);
|
||||
|
||||
/// @brief Divert input to an include file.
|
||||
static void includeFile(const std::string& filename);
|
||||
|
||||
/// @brief Run the parser on the string specified.
|
||||
///
|
||||
/// @param str string to be parsed
|
||||
@@ -74,10 +77,6 @@ public:
|
||||
isc::data::ConstElementPtr parseFile(const std::string& filename,
|
||||
ParserType parser_type);
|
||||
|
||||
/// @brief The name of the file being parsed.
|
||||
/// Used later to pass the file name to the location tracker.
|
||||
std::string file_;
|
||||
|
||||
/// @brief Error handler
|
||||
///
|
||||
/// @param loc location within the parsed file when experienced a problem.
|
||||
@@ -96,18 +95,6 @@ public:
|
||||
static void fatal(const std::string& what);
|
||||
|
||||
private:
|
||||
/// @brief Divert input to an include file.
|
||||
void includeFile(const std::string& filename);
|
||||
|
||||
/// @brief File name stack.
|
||||
std::vector<std::string> files_;
|
||||
|
||||
/// @brief Location stack.
|
||||
std::vector<isc::dhcp::location> locs_;
|
||||
|
||||
/// @brief State stack.
|
||||
std::vector<struct yy_buffer_state*> states_;
|
||||
|
||||
/// @brief Flag determining scanner debugging.
|
||||
bool trace_scanning_;
|
||||
|
||||
|
Reference in New Issue
Block a user