Merge 03d08047a8 into 14751996b1
This commit is contained in:
commit
d3fda29664
|
|
@ -49,15 +49,25 @@ parseLibertyFile(std::string_view filename,
|
|||
std::string fn(filename);
|
||||
gzstream::igzstream stream(fn.c_str());
|
||||
if (stream.is_open()) {
|
||||
LibertyParser reader(filename, library_visitor, report);
|
||||
LibertyScanner scanner(&stream, filename, &reader, report);
|
||||
LibertyParse parser(&scanner, &reader);
|
||||
parser.parse();
|
||||
parseLibertyFile(stream, filename, library_visitor, report);
|
||||
}
|
||||
else
|
||||
throw FileNotReadable(filename);
|
||||
}
|
||||
|
||||
void
|
||||
parseLibertyFile(std::istream& file_contents,
|
||||
std::string_view filename,
|
||||
LibertyGroupVisitor *library_visitor,
|
||||
Report *report)
|
||||
{
|
||||
|
||||
LibertyParser reader(filename, library_visitor, report);
|
||||
LibertyScanner scanner(&file_contents, filename, &reader, report);
|
||||
LibertyParse parser(&scanner, &reader);
|
||||
parser.parse();
|
||||
}
|
||||
|
||||
LibertyParser::LibertyParser(std::string_view filename,
|
||||
LibertyGroupVisitor *library_visitor,
|
||||
Report *report) :
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <istream>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
|
@ -277,6 +278,11 @@ public:
|
|||
virtual void visitVariable(LibertyVariable *variable) = 0;
|
||||
};
|
||||
|
||||
void
|
||||
parseLibertyFile(std::istream& file_contents,
|
||||
std::string_view filename,
|
||||
LibertyGroupVisitor *library_visitor,
|
||||
Report *report);
|
||||
void
|
||||
parseLibertyFile(std::string_view filename,
|
||||
LibertyGroupVisitor *library_visitor,
|
||||
|
|
|
|||
Loading…
Reference in New Issue