| 171 | using TExpressionRegexMatcher = std::function<bool(TStringBuf str, TStringBuf rx)>; |
| 172 | |
| 173 | class IExpressionImpl { |
| 174 | public: |
| 175 | IExpressionImpl(); |
| 176 | virtual ~IExpressionImpl(); |
| 177 | virtual TString CalcExpressionStr(const IExpressionAdaptor& iadapter) const = 0; |
| 178 | virtual double CalcExpression(const IExpressionAdaptor& iadapter) const = 0; |
| 179 | virtual void GetTokensWithSuffix(const TString& suffix, TVector<TString>& tokens) const = 0; |
| 180 | virtual void GetTokensWithPrefix(const TString& prefix, TVector<TString>& tokens) const = 0; |
| 181 | virtual void SetRegexMatcher(TExpressionRegexMatcher&& matcher) = 0; |
| 182 | }; |
| 183 | |
| 184 | class TExpression { |
| 185 | private: |