Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 2013-2017 Cinchapi Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.cinchapi.ccl;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import java.util.function.Function;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.ThreadSafe;
import com.cinchapi.ccl.grammar.ExpressionSymbol;
import com.cinchapi.ccl.grammar.PostfixNotationSymbol;
import com.cinchapi.ccl.grammar.Symbol;
import com.cinchapi.ccl.syntax.AbstractSyntaxTree;
import com.cinchapi.ccl.syntax.ConditionTree;
import com.cinchapi.ccl.type.Operator;
import com.cinchapi.common.base.Verify;
import com.cinchapi.common.function.TriFunction;
import com.google.common.collect.Multimap;
/**
* A {@link Parser} is a stateful object that transforms raw CCL strings into
* organized structures that can be logically evaluated.
*
* @deprecated use {@link Compiler} instead
*
* @author Jeff Nelson
*/
@ThreadSafe
@Immutable
@Deprecated
public abstract class Parser {
/**
* Return a new {@link Parser} for the {@code ccl} statement that uses the
* {@code valueTransformFunction} and {@code operatorTransformFunction}.
*
* @param ccl the ccl query to parse
* @param valueTransformFunction value function
* @param operatorTransformFunction operator function
* @return the {@link Parser}
* @deprecated use {@link Compiler#create(Function, Function)} instead
*/
@Deprecated
public static Parser create(String ccl,
Function valueTransformFunction,
Function operatorTransformFunction) {
return create(ccl, valueTransformFunction, operatorTransformFunction,
null);
}
/**
* Return a new {@link Parser} for the {@code ccl} statement that uses the
* {@code valueTransformFunction} and {@code operatorTransformFunction}.
*
* @param ccl the ccl query to parse
* @param valueTransformFunction value function
* @param operatorTransformFunction operator function
* @param localEvaluationFunction a {@link TriFunction} that takes a value
* and determine whether it satisfies an {@link Operator} in
* relation to a list of other values
* @return the {@link Parser}
* @deprecated use {@link Compiler#create(Function, Function)} instead
*/
@Deprecated
public static Parser create(String ccl,
Function valueTransformFunction,
Function operatorTransformFunction,
TriFunction