All lex/yacc scanners/parsers are now generated with a proper dotnet nuget pkg, YaccLexTools. * Implements BooleanExpressionFilter with the new Parser.
29 lines
681 B
C#
29 lines
681 B
C#
namespace Bts.DataStreamExpressions;
|
|
|
|
using BCG;
|
|
|
|
public abstract class StatementExpression {
|
|
ViewStream? view;
|
|
|
|
protected StatementExpression() { }
|
|
|
|
public virtual string? print(int startCol, IList<string> activeBindings) =>
|
|
null;
|
|
|
|
public virtual string? printView(int startCol) =>
|
|
null;
|
|
|
|
public ViewStream? getView(IDictionary<string, StatementExpression> env) =>
|
|
view ??= myGetView(env);
|
|
|
|
public virtual ViewStream? myGetView(IDictionary<string, StatementExpression> env) =>
|
|
null;
|
|
|
|
public static string makeCSString(string s) {
|
|
if (s == null)
|
|
return "(string) null";
|
|
else
|
|
return "\"" + s + "\"";
|
|
}
|
|
}
|