23 lines
546 B
C#
23 lines
546 B
C#
namespace Bts.BooleanExpressions;
|
|
|
|
using QUT.Gppg;
|
|
|
|
using System.IO;
|
|
using System.Text;
|
|
|
|
partial class BooleanExpressionParserImpl {
|
|
public BooleanExpressionParserImpl(AbstractScanner<ValueType, LexLocation>? scanner = null)
|
|
: base(scanner) { }
|
|
|
|
public ValueType Parse(string s) {
|
|
using var ms = new MemoryStream(Encoding.Default.GetBytes(s));
|
|
return Parse(ms);
|
|
}
|
|
|
|
public ValueType Parse(Stream stream) {
|
|
Scanner = new BooleanExpressionScanner(stream);
|
|
Parse();
|
|
return CurrentSemanticValue;
|
|
}
|
|
}
|