-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy pathParser.java
More file actions
42 lines (35 loc) · 1.12 KB
/
Copy pathParser.java
File metadata and controls
42 lines (35 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package io.cloudevents.sql;
import io.cloudevents.sql.impl.parser.ParserBuilder;
import io.cloudevents.sql.impl.parser.ParserImpl;
public interface Parser {
/**
* Parse the expression.
*
* @param inputExpression input expression
* @return the parsed expression
* @throws ParseException if the expression cannot be parsed
*/
Expression parse(String inputExpression) throws ParseException;
/**
* Parse the expression with default parser instance.
*
* @param inputExpression input expression
* @return the parsed expression
* @throws ParseException if the expression cannot be parsed
*/
static Expression parseDefault(String inputExpression) throws ParseException {
return ParserImpl.getInstance().parse(inputExpression);
}
/**
* @return the default instance of the parser
*/
static Parser getDefault() {
return ParserImpl.getInstance();
}
/**
* @return a new {@link ParserBuilder}, to create a customized parser instance
*/
static ParserBuilder builder() {
return new ParserBuilder();
}
}