]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4088fd] Removed unused File functions
authorFrancis Dupont <fdupont@isc.org>
Wed, 11 Nov 2015 16:13:54 +0000 (17:13 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 11 Nov 2015 16:13:54 +0000 (17:13 +0100)
src/lib/eval/eval.dox
src/lib/eval/eval_context.cc
src/lib/eval/eval_context.h
src/lib/eval/lexer.cc
src/lib/eval/lexer.ll

index 95a0c53f2ee2a218ea1cacf2c8d6924c9d1ed098..b116f337e781ec115d159f40a90caf702f86d35d 100644 (file)
@@ -22,9 +22,8 @@
   classification, but in the future may be also used for other applications.
 
   The external interface to the library is the @ref isc::eval::EvalContext
-  class.  Once instantiated, it offers two major methods:
-  @ref isc::eval::EvalContext::parseFile which parses the content of a file
-  and @ref isc::eval::EvalContext::parseString, which parses the specified
+  class.  Once instantiated, it offers a major method:
+  @ref isc::eval::EvalContext::parseString, which parses the specified
   string.  Once the expression is parsed, it is converted to a collection of
   tokens that are stored in Reverse Polish Notation in
   EvalContext::expression.
index 9c6a9ddd7267ae7a14d5b8d3c294c7e19f02750a..7dc46fc4ccbf6913d82e41eb90369e9e134859d9 100644 (file)
@@ -26,18 +26,6 @@ EvalContext::~EvalContext()
 {
 }
 
-bool
-EvalContext::parseFile(const std::string &filename)
-{
-    file_ = filename;
-    scanFileBegin();
-    isc::eval::EvalParser parser(*this);
-    parser.set_debug_level(trace_parsing_);
-    int res = parser.parse();
-    scanFileEnd();
-    return (res == 0);
-}
-
 bool
 EvalContext::parseString(const std::string& str)
 {
index 3cb31eddcf586c642848526031ee82e933754908..6b28e2b16147946c7632f580162dc9c2690a99fe 100644 (file)
@@ -50,24 +50,12 @@ public:
     /// @brief Parsed expression (output tokens are stored here)
     isc::dhcp::Expression expression;
 
-    /// @brief Method called before scanning starts on a file.
-    void scanFileBegin();
-
-    /// @brief Method called after the last tokens are scanned from a file.
-    void scanFileEnd();
-    
     /// @brief Method called before scanning starts on a string.
     void scanStringBegin();
 
     /// @brief Method called after the last tokens are scanned from a string.
     void scanStringEnd();
     
-    /// @brief Runs the parser on specified file.
-    ///
-    /// @param filename
-    /// @return true on success.
-    bool parseFile(const std::string& filename);
-
     /// @brief Run the parser on the string specified.
     ///
     /// @param str string to be written
index 696de045ecc1c5feadf4911258a036d83c5081a9..3dbd4d19dd7f225cdafeadbf684b11c3e6cae4e0 100644 (file)
@@ -2262,26 +2262,6 @@ void yyfree (void * ptr )
 
 using namespace isc::eval;
 
-void
-EvalContext::scanFileBegin()
-{
-    loc.initialize(&file_);
-    yy_flex_debug = trace_scanning_;
-    if (file_.empty () || file_ == "-") {
-        yyin = stdin;
-    }
-    else if (!(yyin = fopen(file_.c_str (), "r"))) {
-        error("cannot open " + file_ + ": " + strerror(errno));
-        exit(EXIT_FAILURE);
-    }
-}
-
-void
-EvalContext::scanFileEnd()
-{
-    fclose(yyin);
-}
-
 void
 EvalContext::scanStringBegin()
 {
index 61d851b474d3c172cb77b53def9f154c6e80f13c..9044c2f2e8dfbf4965c2e7d9c77b508d4c9a20b9 100644 (file)
@@ -150,26 +150,6 @@ blank [ \t]
 
 using namespace isc::eval;
 
-void
-EvalContext::scanFileBegin()
-{
-    loc.initialize(&file_);
-    yy_flex_debug = trace_scanning_;
-    if (file_.empty () || file_ == "-") {
-        yyin = stdin;
-    }
-    else if (!(yyin = fopen(file_.c_str (), "r"))) {
-        error("cannot open " + file_ + ": " + strerror(errno));
-        exit(EXIT_FAILURE);
-    }
-}
-
-void
-EvalContext::scanFileEnd()
-{
-    fclose(yyin);
-}
-
 void
 EvalContext::scanStringBegin()
 {