Browse Source

[4088fd] Renamed file to file_

Francis Dupont 9 years ago
parent
commit
f18bc3cdb1

+ 1 - 1
src/lib/eval/eval_context.cc

@@ -29,7 +29,7 @@ EvalContext::~EvalContext()
 int
 EvalContext::parseFile(const std::string &filename)
 {
-    file = filename;
+    file_ = filename;
     scanBegin();
     isc::eval::EvalParser parser(*this);
     parser.set_debug_level(trace_parsing_);

+ 1 - 1
src/lib/eval/eval_context.h

@@ -69,7 +69,7 @@ public:
 
     /// @brief The name of the file being parsed.
     /// Used later to pass the file name to the location tracker.
-    std::string file;
+    std::string file_;
 
     /// @brief Error handler
     ///

+ 3 - 3
src/lib/eval/lexer.cc

@@ -2237,11 +2237,11 @@ void
 EvalContext::scanBegin()
 {
     yy_flex_debug = trace_scanning_;
-    if (file.empty () || file == "-") {
+    if (file_.empty () || file_ == "-") {
         yyin = stdin;
     }
-    else if (!(yyin = fopen(file.c_str (), "r"))) {
-        error("cannot open " + file + ": " + strerror(errno));
+    else if (!(yyin = fopen(file_.c_str (), "r"))) {
+        error("cannot open " + file_ + ": " + strerror(errno));
         exit(EXIT_FAILURE);
     }
 }

+ 3 - 3
src/lib/eval/lexer.ll

@@ -149,11 +149,11 @@ void
 EvalContext::scanBegin()
 {
     yy_flex_debug = trace_scanning_;
-    if (file.empty () || file == "-") {
+    if (file_.empty () || file_ == "-") {
         yyin = stdin;
     }
-    else if (!(yyin = fopen(file.c_str (), "r"))) {
-        error("cannot open " + file + ": " + strerror(errno));
+    else if (!(yyin = fopen(file_.c_str (), "r"))) {
+        error("cannot open " + file_ + ": " + strerror(errno));
         exit(EXIT_FAILURE);
     }
 }

+ 1 - 1
src/lib/eval/parser.cc

@@ -454,7 +454,7 @@ namespace isc { namespace eval {
     #line 36 "parser.yy" // lalr1.cc:745
 {
   // Initialize the initial location.
-  yyla.location.begin.filename = yyla.location.end.filename = &ctx.file;
+  yyla.location.begin.filename = yyla.location.end.filename = &ctx.file_;
 }
 
 #line 461 "parser.cc" // lalr1.cc:745

+ 1 - 1
src/lib/eval/parser.yy

@@ -35,7 +35,7 @@ using namespace isc::eval;
 %initial-action
 {
   // Initialize the initial location.
-  @$.begin.filename = @$.end.filename = &ctx.file;
+  @$.begin.filename = @$.end.filename = &ctx.file_;
 };
 %define parse.trace
 %define parse.error verbose