blob: 470ef3b50d591a3839dbbf332f7302be622dfaef (
plain)
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
|
package bjc.pratt;
import bjc.utils.data.ITree;
import bjc.utils.parserutils.ParserException;
/**
* Represents an initial command in parsing.
*
* @author EVE
*
* @param <K>
* The key type for the tokens.
*
* @param <V>
* The value type for the tokens.
*
* @param <C>
* The state type of the parser.
*
*
*/
@FunctionalInterface
public interface InitialCommand<K, V, C> {
/**
* Construct the null denotation of this command.
*
* @param operator
* The operator for this command.
* @param ctx
* The context for the command.
*
* @return The tree for this command.
*
* @throws ParserException
* If something goes wrong during parsing.
*/
ITree<Token<K, V>> denote(Token<K, V> operator, ParserContext<K, V, C> ctx) throws ParserException;
}
|