int
EvalContext::parseFile(const std::string &filename)
{
- file = filename;
+ file_ = filename;
scanBegin();
isc::eval::EvalParser parser(*this);
parser.set_debug_level(trace_parsing_);
/// @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
///
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);
}
}
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);
}
}
#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
%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