File D:\maven-qcr-plugin-testsunitaires\qcr4java\h2-1.3.170-sources\target\site\qc\lecode\bnf\BnfVisitor.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.ArrayList;
10
11 /**
12 * The visitor interface for BNF rules.
13 */
14 public interface BnfVisitor {
15
16 /**
17 * Visit a rule element.
18 *
19 * @param keyword whether this is a keyword
20 * @param name the element name
21 * @param link the linked rule if it's not a keyword
22 */
23 void visitRuleElement(boolean keyword, String name, Rule link);
24
25 /**
26 * Visit a repeat rule.
27 *
28 * @param comma whether the comma is repeated as well
29 * @param rule the element to repeat
30 */
31 void visitRuleRepeat(boolean comma, Rule rule);
32
33 /**
34 * Visit a fixed rule.
35 *
36 * @param type the type
37 */
38 void visitRuleFixed(int type);
39
40 /**
41 * Visit a rule list.
42 *
43 * @param or true for OR, false for AND
44 * @param list the rules
45 */
46 void visitRuleList(boolean or, ArrayList<Rule> list);
47
48 /**
49 * Visit an optional rule.
50 *
51 * @param rule the rule
52 */
53 void visitRuleOptional(Rule rule);
54
55 }
56