private static FilterCluster AnalysisConcatenator(IFilter leftExpr, ConcatenatorTuple coTuple) { if (coTuple.Expression == null) { return new FilterCluster() { Filters = new[] { leftExpr } }; } else { return new FilterCluster() { ConcatenateAnd = coTuple.IsConcatenateAnd, Filters = new[]{ leftExpr, AnalysisConcatenator(AnalysisExpression(coTuple.Expression), coTuple.Concatenator)} }; } }
private static FilterCluster AnalysisConcatenator(IFilter leftExpr, ConcatenatorTuple coTuple) { if (coTuple.Expression == null) { return(new FilterCluster() { Filters = new[] { leftExpr } }); } else { return(new FilterCluster() { ConcatenateAnd = coTuple.IsConcatenateAnd, Filters = new[] { leftExpr, AnalysisConcatenator(AnalysisExpression(coTuple.Expression), coTuple.Concatenator) } }); } }
private static ConcatenatorTuple MakeConcatenator(ref TokenReader reader) { System.Diagnostics.Debug.WriteLine("MakeConcatenator"); ConcatenatorTuple ret = new ConcatenatorTuple(); if (TryLookAhead(ref reader, Token.TokenType.ConcatenatorAnd)) { ret.IsConcatenateAnd = true; ret.Expression = MakeExpression(ref reader); ret.Concatenator = MakeConcatenator(ref reader); } else if (TryLookAhead(ref reader, Token.TokenType.ConcatenatorOr)) { ret.IsConcatenateAnd = false; ret.Expression = MakeExpression(ref reader); ret.Concatenator = MakeConcatenator(ref reader); } else { ret = new ConcatenatorTuple(); } AssertNextAny(ref reader, false, Token.TokenType.CloseBracket); return(ret); }
private static ConcatenatorTuple MakeConcatenator(ref TokenReader reader) { System.Diagnostics.Debug.WriteLine("MakeConcatenator"); ConcatenatorTuple ret = new ConcatenatorTuple(); if (TryLookAhead(ref reader, Token.TokenType.ConcatenatorAnd)) { ret.IsConcatenateAnd = true; ret.Expression = MakeExpression(ref reader); ret.Concatenator = MakeConcatenator(ref reader); } else if (TryLookAhead(ref reader, Token.TokenType.ConcatenatorOr)) { ret.IsConcatenateAnd = false; ret.Expression = MakeExpression(ref reader); ret.Concatenator = MakeConcatenator(ref reader); } else { ret = new ConcatenatorTuple(); } AssertNextAny(ref reader, false, Token.TokenType.CloseBracket); return ret; }