feat: Add DataStreamExpressions
All lex/yacc scanners/parsers are now generated with a proper dotnet nuget pkg, YaccLexTools. * Implements BooleanExpressionFilter with the new Parser.
This commit is contained in:
1 parent
ac1ede5986
commit
248e37577f
38 files changed
+4024
-67
No files matched your search
@@ -0,0 +1,18 @@
|
||||
namespace Bts.DataStreamExpressions;
|
||||
|
||||
using System.Text;
|
||||
|
||||
partial class DataStreamExpressionParser {
|
||||
public DataStreamExpressionParser() : base(null) { }
|
||||
|
||||
public ValueType? Parse(string s) {
|
||||
using var ms = new MemoryStream(Encoding.Default.GetBytes(s));
|
||||
return Parse(ms);
|
||||
}
|
||||
|
||||
public ValueType? Parse(Stream stream) {
|
||||
Scanner = new DataStreamExpressionScanner(stream);
|
||||
Parse();
|
||||
return CurrentSemanticValue;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user