1
2
3
4
5
6 #ifndef SOULNG_LEXER_PARSING_LOG_INCLUDED
7 #define SOULNG_LEXER_PARSING_LOG_INCLUDED
8 #include <soulng/lexer/LexerApi.hpp>
9 #include <soulng/util/CodeFormatter.hpp>
10 #include <string>
11
12 namespace soulng { namespace lexer {
13
14 class ParsingLog
15 {
16 public:
17 ParsingLog();
18 ParsingLog(int maxLineLength_);
19 virtual ~ParsingLog();
20 virtual void IncIndent() = 0;
21 virtual void DecIndent() = 0;
22 virtual void WriteBeginRule(const std::u32string& ruleName) = 0;
23 virtual void WriteEndRule(const std::u32string& ruleName) = 0;
24 virtual void WriteTry(const std::u32string& s) = 0;
25 virtual void WriteSuccess(const std::u32string& match) = 0;
26 virtual void WriteFail() = 0;
27 virtual int MaxLineLength() const;
28 private:
29 int maxLineLength;
30 };
31
32 } }
33
34 #endif // SOULNG_LEXER_PARSING_LOG_INCLUDED