diff options
Diffstat (limited to 'tools/bookmaker/fiddleParser.cpp')
-rw-r--r-- | tools/bookmaker/fiddleParser.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/bookmaker/fiddleParser.cpp b/tools/bookmaker/fiddleParser.cpp index ec36e4b564..79c4a70252 100644 --- a/tools/bookmaker/fiddleParser.cpp +++ b/tools/bookmaker/fiddleParser.cpp @@ -5,7 +5,8 @@ * found in the LICENSE file. */ -#include "bookmaker.h" +#include "bmhParser.h" +#include "fiddleParser.h" // could make this more elaborate and look up the example definition in the bmh file; // see if a simpler hint provided is sufficient @@ -14,6 +15,10 @@ static bool report_error(const char* blockName, const char* errorMessage) { return false; } +Definition* FiddleBase::findExample(string name) const { + return fBmhParser->findExample(name); +} + bool FiddleBase::parseFiddles() { if (fStack.empty()) { return false; @@ -86,6 +91,17 @@ bool FiddleBase::parseFiddles() { return true; } +bool FiddleParser::parseFromFile(const char* path) { + if (!INHERITED::parseFromFile(path)) { + return false; + } + fBmhParser->resetExampleHashes(); + if (!INHERITED::parseFiddles()) { + return false; + } + return fBmhParser->checkExampleHashes(); +} + bool FiddleParser::textOut(Definition* example, const char* stdOutStart, const char* stdOutEnd) { bool foundStdOut = false; |