File D:\maven-qcr-plugin-testsunitaires\qcr4java\h2-1.3.170-sources\target\site\qc\lecode\bnf\Rule.java.html

1 /*
2 * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
3 * Version 1.0, and under the Eclipse Public License, Version 1.0
4 * (http://h2database.com/html/license.html).
5 * Initial Developer: H2 Group
6 */
7 package org.h2.bnf;
8
9 import java.util.HashMap;
10
11 /**
12 * Represents a BNF rule.
13 */
14 public interface Rule {
15
16 /**
17 * Update cross references.
18 *
19 * @param ruleMap the reference map
20 */
21 void setLinks(HashMap<String, RuleHead> ruleMap);
22
23 /**
24 * Add the next possible token(s). If there was a match, the query in the
25 * sentence is updated (the matched token is removed).
26 *
27 * @param sentence the sentence context
28 * @return true if a full match
29 */
30 boolean autoComplete(Sentence sentence);
31
32 /**
33 * Call the visit method in the given visitor.
34 *
35 * @param visitor the visitor
36 */
37 void accept(BnfVisitor visitor);
38
39 }
40