From 7060df78f37f0d75e32212f24e2327069f5dea94 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Tue, 3 Feb 2015 02:28:30 +0100 Subject: Added "deduceState" function --- src/core/parser/ParserStack.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/core/parser/ParserStack.hpp') diff --git a/src/core/parser/ParserStack.hpp b/src/core/parser/ParserStack.hpp index 7ad3da1..8561d42 100644 --- a/src/core/parser/ParserStack.hpp +++ b/src/core/parser/ParserStack.hpp @@ -270,6 +270,20 @@ public: ParserStack(ParserContext &ctx, const std::multimap &states); + /** + * Tries to reconstruct the parser state from the Scope instance of the + * ParserContext given in the constructor. This functionality is needed for + * including files,as the Parser of the included file needs to be brought to + + an equivalent state as the one in the including file. + * + * @param scope is the ParserScope instance from which the ParserState + * should be reconstructed. + * @param logger is the logger instance to which error messages should be + * written. + * @return true if the operation was sucessful, false otherwise. + */ + bool deduceState(); + /** * Returns the state the ParserStack instance currently is in. * -- cgit v1.2.3