-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIExpression.cs
More file actions
35 lines (25 loc) · 1.18 KB
/
IExpression.cs
File metadata and controls
35 lines (25 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
namespace NewPaloAltoTB;
internal interface IExpression {
//internal static Expression Shared;
//private static readonly Lazy<Expression> shared = new(() => new Expression());
//internal CodeParser Parser = CodeParser.Shared;
/// <summary>
/// Evaluate an expression fragment, at 1st level of operator precedence (comparison operators).
/// This operator cannot be repeated (1<2<3 and a=b=c are illegal).
/// </summary>
/// <returns>Signed short value of expression, if successful</returns>
/// <exception cref="RuntimeException">Thrown if parsing or calculation fails</exception>
internal bool TryEvaluateExpr(out Value? value);
/// <summary>
/// Evaluate an expression fragment, at 2nd level of operator precedence ( [-] a (+|-) b )
/// </summary>
/// <returns></returns>
/// <exception cref="RuntimeException"></exception>
//public short? TryExprComparisonTerm();
//public short? TryExprAddSubTerm();
//public short? TryExprMulDivTerm();
//public bool TryGetFunction(out short value);
//public bool TryGetVariable(out short value);
internal Value? ParenExpr();
internal bool TryGetParen(out Value? value);
}