Package org.h2.bnf
Interface BnfVisitor
public interface BnfVisitor
The visitor interface for BNF rules.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
visitRuleElement
(boolean keyword, String name, Rule link) Visit a rule element.void
visitRuleExtension
(Rule rule, boolean compatibility) Visit a rule with non-standard extension.void
visitRuleFixed
(int type) Visit a fixed rule.void
visitRuleList
(boolean or, ArrayList<Rule> list) Visit a rule list.void
visitRuleOptional
(ArrayList<Rule> list) Visit an OR list of optional rules.void
visitRuleOptional
(Rule rule) Visit an optional rule.void
visitRuleRepeat
(boolean comma, Rule rule) Visit a repeat rule.
-
Method Details
-
visitRuleElement
Visit a rule element.- Parameters:
keyword
- whether this is a keywordname
- the element namelink
- the linked rule if it's not a keyword
-
visitRuleRepeat
Visit a repeat rule.- Parameters:
comma
- whether the comma is repeated as wellrule
- the element to repeat
-
visitRuleFixed
void visitRuleFixed(int type) Visit a fixed rule.- Parameters:
type
- the type
-
visitRuleList
Visit a rule list.- Parameters:
or
- true for OR, false for ANDlist
- the rules
-
visitRuleOptional
Visit an optional rule.- Parameters:
rule
- the rule
-
visitRuleOptional
Visit an OR list of optional rules.- Parameters:
list
- the optional rules
-
visitRuleExtension
Visit a rule with non-standard extension.- Parameters:
rule
- the rulecompatibility
- whether this rule exists for compatibility only
-