Debian Codegraph @

bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java

raw
1 /*******************************************************************************
2 * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
3 *
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
8 *
9 * SPDX-License-Identifier: EPL-2.0
10 *
11 * Contributors:
12 * Cloudsmith Inc. - initial API and implementation
13 *******************************************************************************/
14 package org.eclipse.equinox.p2.metadata.expression;
15
16 /**
17 * A parser that produces an expression tree based on a string representation. An
18 * implementation will use the {@link IExpressionFactory} to create the actual expressions
19 * @since 2.0
20 */
21 public interface IExpressionParser {
22 /**
23 * Create a new expression. The expression will have access to the global
24 * variable 'this' and to the context parameters.
25 * @param exprString The string representing the boolean expression.
26 * @return The resulting expression tree.
27 * @throws ExpressionParseException If an error occurred during parsing.
28 */
29 IExpression parse(String exprString);
30
31 /**
32 * Create an arbitrary expression. The expression will have access to the global
33 * variable 'everything' and to the context parameters.
34 * @param exprString The string representing the boolean expression.
35 * @return The resulting expression tree.
36 * @throws ExpressionParseException If an error occurred during parsing.
37 */
38 IExpression parseQuery(String exprString);
39 }