1 // =================================
 2 // Copyright (c) 2024 Seppo Laakko
 3 // Distributed under the MIT license
 4 // =================================
 5 
 6 using System;
 7 using System.Collections;
 8 
 9 namespace System.Lex
10 {
11     public abstract class ParsingLog
12     {
13         public ParsingLog() : maxLineLength(80)
14         {
15         }
16         public ParsingLog(int maxLineLength_) : maxLineLength(maxLineLength_)
17         {
18         }
19         public virtual default ~ParsingLog();
20         public abstract void IncIndent();
21         public abstract void DecIndent();
22         public abstract Result<bool> WriteBeginRule(const ustring& ruleName);
23         public abstract Result<bool> WriteEndRule(const ustring& ruleName);
24         public abstract Result<bool> WriteTry(const ustring& s);
25         public abstract Result<bool> WriteSuccess(const ustring& match);
26         public abstract Result<bool> WriteFail();
27         public virtual int MaxLineLength() const
28         {
29             return maxLineLength;
30         }
31         private int maxLineLength;
32     }
33